fontdue-js 2.7.0 → 2.8.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.
- package/CHANGELOG.md +5 -0
- package/dist/__generated__/AddressFields_viewer.graphql.d.ts +1 -1
- package/dist/__generated__/AddressFields_viewer.graphql.js +4 -2
- package/dist/__generated__/CartItem_node.graphql.d.ts +15 -1
- package/dist/__generated__/CartItem_node.graphql.js +51 -17
- package/dist/__generated__/CartOrderCompleteOrderMutation.graphql.d.ts +1 -1
- package/dist/__generated__/CartOrderCompleteOrderMutation.graphql.js +48 -16
- package/dist/__generated__/CartOrderRemoveDiscountMutation.graphql.d.ts +1 -1
- package/dist/__generated__/CartOrderRemoveDiscountMutation.graphql.js +48 -16
- package/dist/__generated__/CartOrderUpdateMutation.graphql.d.ts +1 -1
- package/dist/__generated__/CartOrderUpdateMutation.graphql.js +48 -16
- package/dist/__generated__/CartOrder_viewer.graphql.d.ts +2 -2
- package/dist/__generated__/CartOrder_viewer.graphql.js +2 -6
- package/dist/__generated__/CartQuery.graphql.d.ts +1 -1
- package/dist/__generated__/CartQuery.graphql.js +79 -77
- package/dist/__generated__/CartStateUpdateMutation.graphql.d.ts +1 -1
- package/dist/__generated__/CartStateUpdateMutation.graphql.js +65 -32
- package/dist/__generated__/CheckoutUpdateCustomerMutation.graphql.d.ts +1 -1
- package/dist/__generated__/CheckoutUpdateCustomerMutation.graphql.js +48 -16
- package/dist/__generated__/CheckoutUpdateOrderMutation.graphql.d.ts +1 -1
- package/dist/__generated__/CheckoutUpdateOrderMutation.graphql.js +48 -16
- package/dist/__generated__/Checkout_viewer.graphql.d.ts +2 -1
- package/dist/__generated__/Checkout_viewer.graphql.js +8 -2
- package/dist/__generated__/CouponCodeInput_viewer.graphql.d.ts +1 -1
- package/dist/__generated__/CouponCodeInput_viewer.graphql.js +4 -2
- package/dist/__generated__/NodePasswordFormAccessNodeMutation.graphql.d.ts +25 -0
- package/dist/__generated__/NodePasswordFormAccessNodeMutation.graphql.js +72 -0
- package/dist/__generated__/PrecartAddToCartMutation.graphql.d.ts +1 -1
- package/dist/__generated__/PrecartAddToCartMutation.graphql.js +48 -16
- package/dist/__generated__/PrecartQuery.graphql.d.ts +1 -1
- package/dist/__generated__/PrecartQuery.graphql.js +57 -62
- package/dist/__generated__/Precart_collection.graphql.d.ts +13 -1
- package/dist/__generated__/Precart_collection.graphql.js +64 -17
- package/dist/__generated__/Precart_viewer.graphql.d.ts +1 -13
- package/dist/__generated__/Precart_viewer.graphql.js +23 -65
- package/dist/__generated__/PriceBarSection_node.graphql.d.ts +1 -1
- package/dist/__generated__/PriceBarSection_node.graphql.js +4 -2
- package/dist/__generated__/SKUPrice_sku.graphql.d.ts +1 -1
- package/dist/__generated__/SKUPrice_sku.graphql.js +4 -2
- package/dist/__generated__/StoreModalCartQuery.graphql.d.ts +2 -2
- package/dist/__generated__/StoreModalCartQuery.graphql.js +44 -47
- package/dist/__generated__/StoreModalCheckoutQuery.graphql.d.ts +1 -1
- package/dist/__generated__/StoreModalCheckoutQuery.graphql.js +17 -16
- package/dist/__generated__/StoreModalProductLicenseSelection_collection.graphql.d.ts +20 -0
- package/dist/__generated__/StoreModalProductLicenseSelection_collection.graphql.js +47 -0
- package/dist/__generated__/StoreModalProductQuery.graphql.d.ts +3 -3
- package/dist/__generated__/StoreModalProductQuery.graphql.js +82 -65
- package/dist/__generated__/StoreModalProductSummaryRefetchQuery.graphql.d.ts +1 -1
- package/dist/__generated__/StoreModalProductSummaryRefetchQuery.graphql.js +24 -3
- package/dist/__generated__/StoreModalProductSummary_viewer.graphql.d.ts +5 -1
- package/dist/__generated__/StoreModalProductSummary_viewer.graphql.js +23 -2
- package/dist/__generated__/TestFontsFormUpdateCustomerMutation.graphql.d.ts +1 -1
- package/dist/__generated__/TestFontsFormUpdateCustomerMutation.graphql.js +48 -16
- package/dist/components/AddToCartBanner/index.js +7 -5
- package/dist/components/BuyButton/index.js +7 -5
- package/dist/components/Cart/AddressFields.js +3 -3
- package/dist/components/Cart/CartItem/index.d.ts +1 -3
- package/dist/components/Cart/CartItem/index.js +15 -13
- package/dist/components/Cart/CartOrder.js +17 -10
- package/dist/components/Cart/CartState.js +7 -4
- package/dist/components/Cart/CartTotals.js +2 -2
- package/dist/components/Cart/Checkout.js +14 -9
- package/dist/components/Cart/CouponCodeInput.js +5 -4
- package/dist/components/Cart/Download.js +5 -4
- package/dist/components/Cart/IdentityBox.js +2 -2
- package/dist/components/Cart/index.js +2 -2
- package/dist/components/CartButton/index.js +5 -4
- package/dist/components/CharacterViewer/index.js +8 -5
- package/dist/components/CollectionAa/index.js +4 -3
- package/dist/components/CookieNotification/index.js +6 -7
- package/dist/components/CouponText/index.js +3 -2
- package/dist/components/CustomerLoginForm/index.js +3 -3
- package/dist/components/Family/FamilyList.js +2 -2
- package/dist/components/Family/index.js +3 -3
- package/dist/components/FontFamilies/index.js +3 -3
- package/dist/components/FontStyle/index.js +2 -2
- package/dist/components/FontdueProvider/index.d.ts +1 -1
- package/dist/components/FontdueProvider/index.js +1 -9
- package/dist/components/NewsletterSignup/index.js +5 -4
- package/dist/components/NodePasswordForm/index.d.ts +7 -0
- package/dist/components/NodePasswordForm/index.js +63 -0
- package/dist/components/Precart/License.js +2 -2
- package/dist/components/Precart/index.js +17 -13
- package/dist/components/Price/index.js +2 -2
- package/dist/components/PriceBar/PriceBarSection.js +3 -3
- package/dist/components/PriceBar/index.js +3 -3
- package/dist/components/Root/index.js +2 -1
- package/dist/components/Root/productState.js +11 -6
- package/dist/components/SKUPrice/index.js +3 -3
- package/dist/components/SelectButton/index.js +3 -3
- package/dist/components/SpecimenLink/index.js +2 -2
- package/dist/components/StoreModal/StoreModalBundleButton.js +2 -2
- package/dist/components/StoreModal/StoreModalCart.js +4 -3
- package/dist/components/StoreModal/StoreModalCheckout.js +3 -3
- package/dist/components/StoreModal/StoreModalContainer.js +3 -3
- package/dist/components/StoreModal/StoreModalDownload.js +5 -4
- package/dist/components/StoreModal/StoreModalFamily.js +3 -3
- package/dist/components/StoreModal/StoreModalFamilyButton.js +2 -2
- package/dist/components/StoreModal/StoreModalIndex.js +2 -2
- package/dist/components/StoreModal/StoreModalIndexItem.js +3 -3
- package/dist/components/StoreModal/StoreModalProduct.js +12 -7
- package/dist/components/StoreModal/StoreModalReview.js +11 -7
- package/dist/components/StoreModal/StoreModalReviewIdentity.js +3 -2
- package/dist/components/StoreModal/StoreModalStyleButton.js +5 -4
- package/dist/components/StoreModalProductLicenseSelection/StoreModalProductLicense.js +3 -3
- package/dist/components/StoreModalProductLicenseSelection/index.d.ts +3 -3
- package/dist/components/StoreModalProductLicenseSelection/index.js +5 -4
- package/dist/components/StoreModalProductSummary/index.js +18 -6
- package/dist/components/StripeProvider/index.js +3 -2
- package/dist/components/TestFontsForm/index.js +5 -4
- package/dist/components/TestModeBanner/index.js +2 -2
- package/dist/components/ThemeConfig/index.js +2 -2
- package/dist/components/TypeTester/TypeTesterFeatures.js +3 -3
- package/dist/components/TypeTester/TypeTesterFeaturesButton.js +3 -3
- package/dist/components/TypeTester/TypeTesterFloatingToolbar.js +3 -3
- package/dist/components/TypeTester/TypeTesterInput.d.ts +1 -0
- package/dist/components/TypeTester/TypeTesterInput.js +5 -2
- package/dist/components/TypeTester/TypeTesterStandalone.js +3 -3
- package/dist/components/TypeTester/TypeTesterStyleSelectData.js +7 -5
- package/dist/components/TypeTester/TypeTesterToolbar.js +9 -5
- package/dist/components/TypeTester/TypeTesterVariableAxes.js +2 -2
- package/dist/components/TypeTester/index.js +9 -6
- package/dist/components/TypeTester/useFeaturesData.js +2 -2
- package/dist/components/TypeTesters/index.js +9 -6
- package/dist/components/VariableTableAmounts/index.js +4 -3
- package/dist/components/useTotalStyles.js +3 -2
- package/dist/fontdue.css +18 -3
- package/dist/reducer.js +3 -1
- package/dist/relay/environment.js +12 -4
- package/package.json +3 -2
|
@@ -7,6 +7,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.TypeTestersPreloadedIDQueryRenderer = TypeTestersPreloadedIDQueryRenderer;
|
|
8
8
|
exports.TypeTestersPreloadedSlugQueryRenderer = TypeTestersPreloadedSlugQueryRenderer;
|
|
9
9
|
exports.default = TypeTesters;
|
|
10
|
+
var _TypeTestersSlugQuery2 = _interopRequireDefault(require("../../__generated__/TypeTestersSlugQuery.graphql"));
|
|
11
|
+
var _TypeTestersIDQuery2 = _interopRequireDefault(require("../../__generated__/TypeTestersIDQuery.graphql"));
|
|
12
|
+
var _TypeTesters_viewer2 = _interopRequireDefault(require("../../__generated__/TypeTesters_viewer.graphql"));
|
|
13
|
+
var _TypeTesters_collection2 = _interopRequireDefault(require("../../__generated__/TypeTesters_collection.graphql"));
|
|
10
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
15
|
var _reactRelay = require("react-relay");
|
|
12
16
|
var _reactRedux = require("react-redux");
|
|
@@ -17,10 +21,9 @@ var _ConfigContext = _interopRequireDefault(require("../ConfigContext"));
|
|
|
17
21
|
var _TypeTester = _interopRequireDefault(require("../TypeTester"));
|
|
18
22
|
var _TypeTesterFloatingToolbar = _interopRequireDefault(require("../TypeTester/TypeTesterFloatingToolbar"));
|
|
19
23
|
var _useSerializablePreloadedQuery = _interopRequireDefault(require("../../relay/useSerializablePreloadedQuery"));
|
|
20
|
-
var _TypeTesters_collection, _TypeTesters_viewer, _TypeTestersIDQuery, _TypeTestersSlugQuery;
|
|
21
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
24
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
25
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
27
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
28
|
const findPriceBarCollection = (collection, familyId) => {
|
|
26
29
|
if (collection.id === familyId) return collection;
|
|
@@ -60,8 +63,8 @@ function TypeTestersComponent(_ref) {
|
|
|
60
63
|
onToolbarOpenClose,
|
|
61
64
|
...rest
|
|
62
65
|
} = _ref;
|
|
63
|
-
const collection = (0, _reactRelay.useFragment)(
|
|
64
|
-
const viewer = (0, _reactRelay.useFragment)(
|
|
66
|
+
const collection = (0, _reactRelay.useFragment)((_TypeTesters_collection2.default.hash && _TypeTesters_collection2.default.hash !== "4e661d9d957e3a3f4a7b23f3665cadf9" && console.error("The definition of 'TypeTesters_collection' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _TypeTesters_collection), collectionKey);
|
|
67
|
+
const viewer = (0, _reactRelay.useFragment)((_TypeTesters_viewer2.default.hash && _TypeTesters_viewer2.default.hash !== "9dce7dd7815ccdea1c4b3c5a076b589e" && console.error("The definition of 'TypeTesters_viewer' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _TypeTesters_viewer), viewerKey);
|
|
65
68
|
const precartOpen = (0, _reactRedux.useSelector)(state => state.precartOpen);
|
|
66
69
|
const {
|
|
67
70
|
typeTester: config
|
|
@@ -127,7 +130,7 @@ function TypeTestersComponent(_ref) {
|
|
|
127
130
|
}))));
|
|
128
131
|
}));
|
|
129
132
|
}
|
|
130
|
-
const idQuery =
|
|
133
|
+
const idQuery = (_TypeTestersIDQuery2.default.hash && _TypeTestersIDQuery2.default.hash !== "f62d86e50379a25ca0a8eb10812704c2" && console.error("The definition of 'TypeTestersIDQuery' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _TypeTestersIDQuery);
|
|
131
134
|
function TypeTestersPreloadedIDQueryRenderer(_ref3) {
|
|
132
135
|
let {
|
|
133
136
|
preloadedQuery,
|
|
@@ -151,7 +154,7 @@ function TypeTestersIDQueryRenderer(_ref4) {
|
|
|
151
154
|
});
|
|
152
155
|
return /*#__PURE__*/_react.default.createElement(TypeTestersComponent, _extends({}, data, rest));
|
|
153
156
|
}
|
|
154
|
-
const slugQuery =
|
|
157
|
+
const slugQuery = (_TypeTestersSlugQuery2.default.hash && _TypeTestersSlugQuery2.default.hash !== "eb11a6ae2b690cb3cdd8a14c6e2afed6" && console.error("The definition of 'TypeTestersSlugQuery' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _TypeTestersSlugQuery);
|
|
155
158
|
function TypeTestersPreloadedSlugQueryRenderer(_ref5) {
|
|
156
159
|
var _data$viewer$slug;
|
|
157
160
|
let {
|
|
@@ -4,9 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = VariableTableAmounts;
|
|
7
|
+
var _VariableTableAmounts_option2 = _interopRequireDefault(require("../../__generated__/VariableTableAmounts_option.graphql"));
|
|
8
|
+
var _VariableTableAmounts_variable2 = _interopRequireDefault(require("../../__generated__/VariableTableAmounts_variable.graphql"));
|
|
7
9
|
var _react = _interopRequireDefault(require("react"));
|
|
8
10
|
var _reactRelay = require("react-relay");
|
|
9
|
-
var _VariableTableAmounts_variable, _VariableTableAmounts_option;
|
|
10
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
12
|
function VariableTableAmounts(_ref) {
|
|
12
13
|
var _variable$units;
|
|
@@ -14,8 +15,8 @@ function VariableTableAmounts(_ref) {
|
|
|
14
15
|
variable: variableKey,
|
|
15
16
|
option: optionKey
|
|
16
17
|
} = _ref;
|
|
17
|
-
const variable = (0, _reactRelay.useFragment)(
|
|
18
|
-
const option = (0, _reactRelay.useFragment)(
|
|
18
|
+
const variable = (0, _reactRelay.useFragment)((_VariableTableAmounts_variable2.default.hash && _VariableTableAmounts_variable2.default.hash !== "400d25ad39816f2e153c8bb67e0e8695" && console.error("The definition of 'VariableTableAmounts_variable' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _VariableTableAmounts_variable), variableKey);
|
|
19
|
+
const option = (0, _reactRelay.useFragment)((_VariableTableAmounts_option2.default.hash && _VariableTableAmounts_option2.default.hash !== "fe03c602c33f1f6e5afe209afc9e6cd6" && console.error("The definition of 'VariableTableAmounts_option' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _VariableTableAmounts_option), optionKey);
|
|
19
20
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
20
21
|
className: "variable-table-amounts"
|
|
21
22
|
}, variable === null || variable === void 0 ? void 0 : (_variable$units = variable.units) === null || _variable$units === void 0 ? void 0 : _variable$units.map((unit, i) => {
|
|
@@ -4,14 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
var _useTotalStyles_fontCollection2 = _interopRequireDefault(require("../__generated__/useTotalStyles_fontCollection.graphql"));
|
|
7
8
|
var _reactRelay = require("react-relay");
|
|
8
|
-
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
10
|
const useTotalStyles = _ref => {
|
|
10
11
|
var _data$children;
|
|
11
12
|
let {
|
|
12
13
|
fontCollection
|
|
13
14
|
} = _ref;
|
|
14
|
-
const data = (0, _reactRelay.useFragment)(
|
|
15
|
+
const data = (0, _reactRelay.useFragment)((_useTotalStyles_fontCollection2.default.hash && _useTotalStyles_fontCollection2.default.hash !== "24cf564c6f5bf49e27a9a0d65c937882" && console.error("The definition of 'useTotalStyles_fontCollection' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _useTotalStyles_fontCollection), fontCollection);
|
|
15
16
|
const variableFonts = (_data$children = data.children) === null || _data$children === void 0 ? void 0 : _data$children.filter(child => child.isVariableFont);
|
|
16
17
|
let totalStyles = data.totalStyles;
|
|
17
18
|
if (variableFonts !== null && variableFonts !== void 0 && variableFonts.length) {
|
package/dist/fontdue.css
CHANGED
|
@@ -123,6 +123,14 @@
|
|
|
123
123
|
color: var(--error_color);
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
.node-password-form__error {
|
|
127
|
+
color: var(--error_color);
|
|
128
|
+
margin-bottom: 1em;
|
|
129
|
+
}
|
|
130
|
+
.node-password-form__section {
|
|
131
|
+
margin-bottom: 30px;
|
|
132
|
+
}
|
|
133
|
+
|
|
126
134
|
.test-fonts__title, .test-fonts__text, .test-fonts__text p, .test-fonts__section {
|
|
127
135
|
margin-bottom: 30px;
|
|
128
136
|
}
|
|
@@ -485,6 +493,9 @@ div[data-component=TypeTesters] {
|
|
|
485
493
|
margin: 0;
|
|
486
494
|
appearance: none;
|
|
487
495
|
text-transform: inherit;
|
|
496
|
+
border: 0 !important;
|
|
497
|
+
color: inherit !important;
|
|
498
|
+
background: transparent !important;
|
|
488
499
|
width: 3em;
|
|
489
500
|
text-align: right;
|
|
490
501
|
}
|
|
@@ -595,6 +606,7 @@ div[data-component=TypeTesters] {
|
|
|
595
606
|
.type-tester__features-button .icon {
|
|
596
607
|
font-size: 18px;
|
|
597
608
|
vertical-align: middle;
|
|
609
|
+
margin: 0;
|
|
598
610
|
}
|
|
599
611
|
.type-tester__features-container .type-tester__variable-axes {
|
|
600
612
|
padding-bottom: 10px;
|
|
@@ -829,7 +841,7 @@ div[data-component=TypeTesters] {
|
|
|
829
841
|
}
|
|
830
842
|
|
|
831
843
|
.character-viewer {
|
|
832
|
-
--size: calc(var(--monitor-width) * 1/2);
|
|
844
|
+
--size: calc(var(--monitor-width) * 1 / 2);
|
|
833
845
|
--half-gap: calc(var(--line-gap) / 2);
|
|
834
846
|
--scale: calc(var(--size) / var(--units-per-em));
|
|
835
847
|
font-size: 1rem;
|
|
@@ -903,7 +915,7 @@ div[data-component=TypeTesters] {
|
|
|
903
915
|
justify-content: space-between;
|
|
904
916
|
}
|
|
905
917
|
.character-viewer__monitor__line[data-name=baseline] {
|
|
906
|
-
top: calc(1px * (var(--ascender) + var(--half-gap)) * var(--scale));
|
|
918
|
+
top: calc(1px * (var(--ascender) + var(--half-gap)) * var(--scale) - 0.5px);
|
|
907
919
|
}
|
|
908
920
|
.character-viewer__monitor__line[data-name=ascender] {
|
|
909
921
|
top: calc(1px * var(--half-gap) * var(--scale));
|
|
@@ -945,7 +957,7 @@ div[data-component=TypeTesters] {
|
|
|
945
957
|
}
|
|
946
958
|
|
|
947
959
|
.character-viewer__feature-monitor__characters {
|
|
948
|
-
--size: calc(var(--monitor-width) * 1/3);
|
|
960
|
+
--size: calc(var(--monitor-width) * 1 / 3);
|
|
949
961
|
--scale: calc(var(--size) / var(--units-per-em));
|
|
950
962
|
margin-top: 12px;
|
|
951
963
|
margin-bottom: 32px;
|
|
@@ -1080,6 +1092,7 @@ input:checked + .checkbox__icon {
|
|
|
1080
1092
|
position: relative;
|
|
1081
1093
|
display: block;
|
|
1082
1094
|
white-space: nowrap;
|
|
1095
|
+
font-weight: inherit;
|
|
1083
1096
|
}
|
|
1084
1097
|
.select__select {
|
|
1085
1098
|
position: absolute;
|
|
@@ -1097,6 +1110,7 @@ input:checked + .checkbox__icon {
|
|
|
1097
1110
|
position: relative;
|
|
1098
1111
|
bottom: -3px;
|
|
1099
1112
|
margin-right: 8px;
|
|
1113
|
+
margin-left: 0;
|
|
1100
1114
|
}
|
|
1101
1115
|
|
|
1102
1116
|
body[data-fontdue-store-modal=open] {
|
|
@@ -1220,6 +1234,7 @@ body[data-fontdue-store-modal=open] {
|
|
|
1220
1234
|
flex-direction: column;
|
|
1221
1235
|
font-size: 16px;
|
|
1222
1236
|
animation: slideIn 300ms forwards;
|
|
1237
|
+
line-height: normal;
|
|
1223
1238
|
}
|
|
1224
1239
|
.store-modal__container__container * {
|
|
1225
1240
|
box-sizing: border-box;
|
package/dist/reducer.js
CHANGED
|
@@ -216,12 +216,14 @@ const reducer = (state, action) => {
|
|
|
216
216
|
cartOpen: false
|
|
217
217
|
};
|
|
218
218
|
case 'REGISTER_STYLESHEET':
|
|
219
|
+
const existing = document.querySelector(`link[href="${action.href}"]`);
|
|
220
|
+
if (existing) return state;
|
|
219
221
|
return {
|
|
220
222
|
...state,
|
|
221
223
|
stylesheets: state.stylesheets.filter(href => href !== action.href).concat(action.href).sort()
|
|
222
224
|
|
|
223
225
|
// sort is important here since moving stylesheets around causes them to
|
|
224
|
-
// get re-
|
|
226
|
+
// get re-evaluated
|
|
225
227
|
};
|
|
226
228
|
case 'STORE_MODAL_NAVIGATE':
|
|
227
229
|
return storeModalNavigate(state, action);
|
|
@@ -8,12 +8,19 @@ exports.responseCache = exports.networkFetch = void 0;
|
|
|
8
8
|
exports.useCurrentEnvironment = useCurrentEnvironment;
|
|
9
9
|
var _react = require("react");
|
|
10
10
|
var _relayRuntime = require("relay-runtime");
|
|
11
|
+
class GraphQLError extends Error {
|
|
12
|
+
constructor(error) {
|
|
13
|
+
super(error.message);
|
|
14
|
+
this.message = error.message;
|
|
15
|
+
this.code = error.code;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
11
18
|
const IS_SERVER = typeof window === typeof undefined;
|
|
12
|
-
const FONTDUE_URL = process.env.NEXT_PUBLIC_FONTDUE_URL;
|
|
19
|
+
const FONTDUE_URL = typeof process !== 'undefined' ? process.env.NEXT_PUBLIC_FONTDUE_URL : undefined;
|
|
13
20
|
if (IS_SERVER && (FONTDUE_URL == null || FONTDUE_URL === '')) {
|
|
14
21
|
throw new Error('fontdue-js requires a Fontdue URL to be configured via environment variables on the server, please set a NEXT_PUBLIC_FONTDUE_URL');
|
|
15
22
|
}
|
|
16
|
-
const STRIPE_INTEGRATION = process.env.NEXT_PUBLIC_FONTDUE_STRIPE_INTEGRATION;
|
|
23
|
+
const STRIPE_INTEGRATION = typeof process !== 'undefined' ? process.env.NEXT_PUBLIC_FONTDUE_STRIPE_INTEGRATION : undefined;
|
|
17
24
|
const CACHE_TTL = 10 * 1000; // 10 seconds, to resolve preloaded results
|
|
18
25
|
|
|
19
26
|
function createNetworkFetch(options) {
|
|
@@ -38,8 +45,9 @@ function createNetworkFetch(options) {
|
|
|
38
45
|
// property of the response. If any exceptions occurred when processing the request,
|
|
39
46
|
// throw an error to indicate to the developer what went wrong.
|
|
40
47
|
if (Array.isArray(json.errors)) {
|
|
41
|
-
|
|
42
|
-
|
|
48
|
+
var _json$errors;
|
|
49
|
+
const error = (_json$errors = json.errors) === null || _json$errors === void 0 ? void 0 : _json$errors[0];
|
|
50
|
+
throw new GraphQLError(error);
|
|
43
51
|
}
|
|
44
52
|
return json;
|
|
45
53
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fontdue-js",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "npm run relay && run-p build-js build-css build-ts-declarations",
|
|
6
6
|
"build-js": "babel src --out-dir dist --extensions .ts,.tsx,.js,.jsx",
|
|
@@ -67,7 +67,8 @@
|
|
|
67
67
|
"artifactDirectory": "./src/__generated__",
|
|
68
68
|
"customScalars": {
|
|
69
69
|
"Decimal": "string"
|
|
70
|
-
}
|
|
70
|
+
},
|
|
71
|
+
"eagerEsModules": true
|
|
71
72
|
},
|
|
72
73
|
"resolutions": {
|
|
73
74
|
"@types/react": "18.2.7"
|