fontdue-js 3.13.0 → 3.14.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__/StoreModalFamily_collection.graphql.d.ts +2 -1
- package/dist/__generated__/StoreModalFamily_collection.graphql.js +8 -2
- package/dist/__generated__/StoreModalProductQuery.graphql.d.ts +1 -1
- package/dist/__generated__/StoreModalProductQuery.graphql.js +5 -5
- package/dist/__generated__/StoreModalProductRefetchQuery.graphql.d.ts +1 -1
- package/dist/__generated__/StoreModalProductRefetchQuery.graphql.js +5 -5
- package/dist/__generated__/StoreModalProductSlugQuery.graphql.d.ts +1 -1
- package/dist/__generated__/StoreModalProductSlugQuery.graphql.js +5 -5
- package/dist/__tests__/storeModalBundlePairs.test.js +142 -0
- package/dist/components/StoreModal/StoreModalFamily.d.ts +3 -0
- package/dist/components/StoreModal/StoreModalFamily.js +13 -3
- package/dist/components/elements/StoreModalFamily/index.d.ts +1 -1
- package/dist/components/elements/StoreModalFamily/index.js +6 -3
- package/dist/fontdue.css +27 -0
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
## 3.14.0
|
|
2
|
+
|
|
3
|
+
- `StoreModal` puts two bundles on one row when the second directly follows the first and repeats its name plus a suffix, such as *Thin* and *Thin Italic*.
|
|
4
|
+
- Fixed the `StoreModal` back link running into the title on mobile, on sites that set a percentage `max-width` on `svg` elements, as Tailwind’s preflight does.
|
|
5
|
+
|
|
1
6
|
## 3.13.0
|
|
2
7
|
|
|
3
8
|
- `StoreModal` offers a superfamily’s bundles that mix styles from several of its families, or styles alongside whole families, and shows a superfamily’s bundles even when the superfamily has no price of its own.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @generated SignedSource<<
|
|
2
|
+
* @generated SignedSource<<c5c1d2d9bea572068b76d4552495484d>>
|
|
3
3
|
* @lightSyntaxTransform
|
|
4
4
|
* @nogrep
|
|
5
5
|
*/
|
|
@@ -16,6 +16,7 @@ export type StoreModalFamily_collection$data = {
|
|
|
16
16
|
readonly " $fragmentSpreads": FragmentRefs<"StoreModalStyleButton_fontStyle">;
|
|
17
17
|
}> | null;
|
|
18
18
|
readonly id: string;
|
|
19
|
+
readonly name: string;
|
|
19
20
|
readonly visibility: Visibility;
|
|
20
21
|
readonly " $fragmentSpreads": FragmentRefs<"StoreModalBundleButton_bundle">;
|
|
21
22
|
}> | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @generated SignedSource<<
|
|
2
|
+
* @generated SignedSource<<c5c1d2d9bea572068b76d4552495484d>>
|
|
3
3
|
* @lightSyntaxTransform
|
|
4
4
|
* @nogrep
|
|
5
5
|
*/
|
|
@@ -101,6 +101,12 @@ const node = function () {
|
|
|
101
101
|
"name": "bundles",
|
|
102
102
|
"plural": true,
|
|
103
103
|
"selections": [v1 /*: any*/, {
|
|
104
|
+
"alias": null,
|
|
105
|
+
"args": null,
|
|
106
|
+
"kind": "ScalarField",
|
|
107
|
+
"name": "name",
|
|
108
|
+
"storageKey": null
|
|
109
|
+
}, {
|
|
104
110
|
"alias": null,
|
|
105
111
|
"args": null,
|
|
106
112
|
"kind": "ScalarField",
|
|
@@ -141,5 +147,5 @@ const node = function () {
|
|
|
141
147
|
"abstractKey": null
|
|
142
148
|
};
|
|
143
149
|
}();
|
|
144
|
-
node.hash = "
|
|
150
|
+
node.hash = "ed59465ca68bf3d3278773a671ddefb3";
|
|
145
151
|
export default node;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @generated SignedSource<<
|
|
2
|
+
* @generated SignedSource<<736ad1206cfda5f9db8419bc44791988>>
|
|
3
3
|
* @lightSyntaxTransform
|
|
4
4
|
* @nogrep
|
|
5
5
|
*/
|
|
@@ -297,7 +297,7 @@ const node = function () {
|
|
|
297
297
|
"kind": "LinkedField",
|
|
298
298
|
"name": "bundles",
|
|
299
299
|
"plural": true,
|
|
300
|
-
"selections": [v4 /*: any*/, v9 /*: any*/, {
|
|
300
|
+
"selections": [v4 /*: any*/, v12 /*: any*/, v9 /*: any*/, {
|
|
301
301
|
"alias": null,
|
|
302
302
|
"args": null,
|
|
303
303
|
"concreteType": "FontStyle",
|
|
@@ -306,7 +306,7 @@ const node = function () {
|
|
|
306
306
|
"plural": true,
|
|
307
307
|
"selections": [v4 /*: any*/, v18 /*: any*/, v27 /*: any*/, v28 /*: any*/, v12 /*: any*/, v22 /*: any*/, v29 /*: any*/, v15 /*: any*/, v20 /*: any*/, v21 /*: any*/],
|
|
308
308
|
"storageKey": null
|
|
309
|
-
},
|
|
309
|
+
}, v15 /*: any*/],
|
|
310
310
|
"storageKey": "bundles(acrossFamilies:true)"
|
|
311
311
|
},
|
|
312
312
|
v31 = {
|
|
@@ -778,12 +778,12 @@ const node = function () {
|
|
|
778
778
|
}]
|
|
779
779
|
},
|
|
780
780
|
"params": {
|
|
781
|
-
"cacheID": "
|
|
781
|
+
"cacheID": "55f9c9300355f867f5150f0c070d800c",
|
|
782
782
|
"id": null,
|
|
783
783
|
"metadata": {},
|
|
784
784
|
"name": "StoreModalProductQuery",
|
|
785
785
|
"operationKind": "query",
|
|
786
|
-
"text": "query StoreModalProductQuery(\n $productId: ID!\n $licenseOptions: [LicenseOptionsSpec]!\n $orderVariables: [OrderVariableSelectionInput!]\n) {\n collection: node(id: $productId) {\n __typename\n id\n ...StoreModalProductContent_collection_4sncub\n }\n viewer {\n ...StoreModalProductViewer_4sncub\n id\n }\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n ...useFontStyle_fontStyle\n}\n\nfragment OrderVariableSelectionRedux_viewer_2ZguDv on Viewer {\n ...OrderVariableSelection_variables_2ZguDv\n detectedCountry\n orderVariables {\n id\n variableType\n }\n}\n\nfragment OrderVariableSelection_variables_2ZguDv on Viewer {\n orderVariables {\n id\n name\n variableType\n description(format: HTML, orderVariables: $orderVariables)\n orderVariableOptions {\n id\n amount\n }\n }\n countries {\n code\n name\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 StoreModalBundleButton_bundle_4sncub on Bundle {\n id\n name\n sku {\n ...SKUPrice_sku_4sncub\n id\n }\n fontStyles {\n id\n ...FontStyle_fontStyle\n }\n}\n\nfragment StoreModalFamilyButton_collection_4sncub on FontCollection {\n isVariableFont\n collectionType\n name\n sku {\n ...SKUPrice_sku_4sncub\n id\n }\n parent {\n id\n }\n featureStyle {\n ...FontStyle_fontStyle\n supportedLanguages\n id\n }\n totalStyles\n totalStylesPrice {\n ...Price_price\n }\n ...useTotalStyles_fontCollection\n}\n\nfragment StoreModalFamily_collection_4sncub on FontCollection {\n ...StoreModalFamilyButton_collection_4sncub\n collectionType\n sku {\n id\n }\n isVariableFont\n bundles(acrossFamilies: true) {\n id\n visibility\n fontStyles {\n id\n cssFamily\n cssWeight\n cssStretch\n ...StoreModalStyleButton_fontStyle_4sncub\n }\n ...StoreModalBundleButton_bundle_4sncub\n }\n fontStyles {\n id\n cssFamily\n cssWeight\n cssStretch\n cssStyle\n ...StoreModalStyleButton_fontStyle_4sncub\n }\n}\n\nfragment StoreModalPackButton_fontPack_4sncub on FontPack {\n name\n sku {\n ...SKUPrice_sku_4sncub\n id\n price(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n }\n featureStyle {\n ...FontStyle_fontStyle\n supportedLanguages\n id\n }\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n ...Price_price\n }\n}\n\nfragment StoreModalPack_fontPack_4sncub on FontPack {\n ...StoreModalPackButton_fontPack_4sncub\n members {\n __typename\n ... on FontStyle {\n id\n cssFamily\n cssWeight\n cssStretch\n cssStyle\n family {\n id\n name\n isVariableFont\n visibility\n }\n ...StoreModalStyleButton_fontStyle_4sncub\n }\n ... on FontCollection {\n id\n visibility\n ...StoreModalFamily_collection_4sncub\n children(collectionTypes: [FAMILY]) {\n id\n visibility\n ...StoreModalFamily_collection_4sncub\n }\n }\n ... on Node {\n __isNode: __typename\n id\n }\n }\n}\n\nfragment StoreModalProductContent_collection_4sncub on Node {\n __isNode: __typename\n __typename\n ... on FontCollection {\n id\n visibility\n ...StoreModalFamily_collection_4sncub\n ...StoreModalProductLicenseSelection_licenseable\n children(collectionTypes: [FAMILY]) {\n id\n visibility\n ...StoreModalFamily_collection_4sncub\n }\n }\n ... on FontPack {\n id\n ...StoreModalPack_fontPack_4sncub\n ...StoreModalProductLicenseSelection_licenseable\n }\n id\n}\n\nfragment StoreModalProductLicenseSelection_licenseable on Licenseable {\n __isLicenseable: __typename\n id\n licenses {\n id\n ...StoreModalProductLicense_license\n }\n}\n\nfragment StoreModalProductLicense_license on License {\n id\n url\n name\n description(format: HTML)\n defaultSelected\n excludedLicenses {\n id\n }\n variables: licenseVariables {\n id\n name\n variableType\n ...VariableTableAmounts_variable\n options: licenseOptions {\n id\n name\n amount\n ...VariableTableAmounts_option\n }\n }\n}\n\nfragment StoreModalProductSummary_viewer_4sncub on Viewer {\n settings {\n taxSystem\n stripeTaxSettings {\n taxBehavior\n }\n }\n taxCollections {\n taxName\n inclusive\n }\n orderVariables {\n id\n variableType\n name\n }\n precart(skuIds: [], licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n skus {\n price(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n product {\n __typename\n ... on FontCollection {\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n }\n ... on Bundle {\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n }\n ... on CollectionBundle {\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n }\n ... on FontPack {\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n }\n ... on Node {\n __isNode: __typename\n id\n }\n }\n id\n }\n subtotal {\n ...Price_price\n amount\n currency\n }\n }\n}\n\nfragment StoreModalProductViewer_4sncub on Viewer {\n endpoint\n stripeAccountId\n ...OrderVariableSelectionRedux_viewer_2ZguDv\n ...StoreModalProductSummary_viewer_4sncub\n orderVariables {\n id\n variableType\n name\n }\n settings {\n storeModalSelectLicenseeLabel(format: HTML)\n storeModalLicenseeSelfLabel(format: HTML)\n storeModalLicenseeSelfDescription(format: HTML)\n storeModalLicenseeClientLabel(format: HTML)\n storeModalLicenseeClientDescription(format: HTML)\n storeModalSelectOrderVariablesLabel(format: HTML)\n storeModalSelectLicensesLabel(format: HTML)\n storeModalSelectFontsLabel(format: HTML)\n }\n}\n\nfragment StoreModalStyleButton_fontStyle_4sncub on FontStyle {\n id\n name\n supportedLanguages\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n sku {\n ...SKUPrice_sku_4sncub\n id\n }\n ...FontStyle_fontStyle\n}\n\nfragment VariableTableAmounts_option on LicenseOption {\n amounts\n}\n\nfragment VariableTableAmounts_variable on LicenseVariable {\n units\n}\n\nfragment useFontStyle_fontStyle on FontStyle {\n cssFamily\n name\n webfontSources {\n url\n format\n tech\n }\n verticalMetrics {\n unitsPerEm\n ascender\n descender\n lineGap\n avgCharWidth\n }\n}\n\nfragment useTotalStyles_fontCollection on FontCollection {\n isVariableFont\n totalStyles\n children(collectionTypes: [FAMILY]) {\n isVariableFont\n totalStyles\n id\n }\n}\n"
|
|
786
|
+
"text": "query StoreModalProductQuery(\n $productId: ID!\n $licenseOptions: [LicenseOptionsSpec]!\n $orderVariables: [OrderVariableSelectionInput!]\n) {\n collection: node(id: $productId) {\n __typename\n id\n ...StoreModalProductContent_collection_4sncub\n }\n viewer {\n ...StoreModalProductViewer_4sncub\n id\n }\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n ...useFontStyle_fontStyle\n}\n\nfragment OrderVariableSelectionRedux_viewer_2ZguDv on Viewer {\n ...OrderVariableSelection_variables_2ZguDv\n detectedCountry\n orderVariables {\n id\n variableType\n }\n}\n\nfragment OrderVariableSelection_variables_2ZguDv on Viewer {\n orderVariables {\n id\n name\n variableType\n description(format: HTML, orderVariables: $orderVariables)\n orderVariableOptions {\n id\n amount\n }\n }\n countries {\n code\n name\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 StoreModalBundleButton_bundle_4sncub on Bundle {\n id\n name\n sku {\n ...SKUPrice_sku_4sncub\n id\n }\n fontStyles {\n id\n ...FontStyle_fontStyle\n }\n}\n\nfragment StoreModalFamilyButton_collection_4sncub on FontCollection {\n isVariableFont\n collectionType\n name\n sku {\n ...SKUPrice_sku_4sncub\n id\n }\n parent {\n id\n }\n featureStyle {\n ...FontStyle_fontStyle\n supportedLanguages\n id\n }\n totalStyles\n totalStylesPrice {\n ...Price_price\n }\n ...useTotalStyles_fontCollection\n}\n\nfragment StoreModalFamily_collection_4sncub on FontCollection {\n ...StoreModalFamilyButton_collection_4sncub\n collectionType\n sku {\n id\n }\n isVariableFont\n bundles(acrossFamilies: true) {\n id\n name\n visibility\n fontStyles {\n id\n cssFamily\n cssWeight\n cssStretch\n ...StoreModalStyleButton_fontStyle_4sncub\n }\n ...StoreModalBundleButton_bundle_4sncub\n }\n fontStyles {\n id\n cssFamily\n cssWeight\n cssStretch\n cssStyle\n ...StoreModalStyleButton_fontStyle_4sncub\n }\n}\n\nfragment StoreModalPackButton_fontPack_4sncub on FontPack {\n name\n sku {\n ...SKUPrice_sku_4sncub\n id\n price(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n }\n featureStyle {\n ...FontStyle_fontStyle\n supportedLanguages\n id\n }\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n ...Price_price\n }\n}\n\nfragment StoreModalPack_fontPack_4sncub on FontPack {\n ...StoreModalPackButton_fontPack_4sncub\n members {\n __typename\n ... on FontStyle {\n id\n cssFamily\n cssWeight\n cssStretch\n cssStyle\n family {\n id\n name\n isVariableFont\n visibility\n }\n ...StoreModalStyleButton_fontStyle_4sncub\n }\n ... on FontCollection {\n id\n visibility\n ...StoreModalFamily_collection_4sncub\n children(collectionTypes: [FAMILY]) {\n id\n visibility\n ...StoreModalFamily_collection_4sncub\n }\n }\n ... on Node {\n __isNode: __typename\n id\n }\n }\n}\n\nfragment StoreModalProductContent_collection_4sncub on Node {\n __isNode: __typename\n __typename\n ... on FontCollection {\n id\n visibility\n ...StoreModalFamily_collection_4sncub\n ...StoreModalProductLicenseSelection_licenseable\n children(collectionTypes: [FAMILY]) {\n id\n visibility\n ...StoreModalFamily_collection_4sncub\n }\n }\n ... on FontPack {\n id\n ...StoreModalPack_fontPack_4sncub\n ...StoreModalProductLicenseSelection_licenseable\n }\n id\n}\n\nfragment StoreModalProductLicenseSelection_licenseable on Licenseable {\n __isLicenseable: __typename\n id\n licenses {\n id\n ...StoreModalProductLicense_license\n }\n}\n\nfragment StoreModalProductLicense_license on License {\n id\n url\n name\n description(format: HTML)\n defaultSelected\n excludedLicenses {\n id\n }\n variables: licenseVariables {\n id\n name\n variableType\n ...VariableTableAmounts_variable\n options: licenseOptions {\n id\n name\n amount\n ...VariableTableAmounts_option\n }\n }\n}\n\nfragment StoreModalProductSummary_viewer_4sncub on Viewer {\n settings {\n taxSystem\n stripeTaxSettings {\n taxBehavior\n }\n }\n taxCollections {\n taxName\n inclusive\n }\n orderVariables {\n id\n variableType\n name\n }\n precart(skuIds: [], licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n skus {\n price(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n product {\n __typename\n ... on FontCollection {\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n }\n ... on Bundle {\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n }\n ... on CollectionBundle {\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n }\n ... on FontPack {\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n }\n ... on Node {\n __isNode: __typename\n id\n }\n }\n id\n }\n subtotal {\n ...Price_price\n amount\n currency\n }\n }\n}\n\nfragment StoreModalProductViewer_4sncub on Viewer {\n endpoint\n stripeAccountId\n ...OrderVariableSelectionRedux_viewer_2ZguDv\n ...StoreModalProductSummary_viewer_4sncub\n orderVariables {\n id\n variableType\n name\n }\n settings {\n storeModalSelectLicenseeLabel(format: HTML)\n storeModalLicenseeSelfLabel(format: HTML)\n storeModalLicenseeSelfDescription(format: HTML)\n storeModalLicenseeClientLabel(format: HTML)\n storeModalLicenseeClientDescription(format: HTML)\n storeModalSelectOrderVariablesLabel(format: HTML)\n storeModalSelectLicensesLabel(format: HTML)\n storeModalSelectFontsLabel(format: HTML)\n }\n}\n\nfragment StoreModalStyleButton_fontStyle_4sncub on FontStyle {\n id\n name\n supportedLanguages\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n sku {\n ...SKUPrice_sku_4sncub\n id\n }\n ...FontStyle_fontStyle\n}\n\nfragment VariableTableAmounts_option on LicenseOption {\n amounts\n}\n\nfragment VariableTableAmounts_variable on LicenseVariable {\n units\n}\n\nfragment useFontStyle_fontStyle on FontStyle {\n cssFamily\n name\n webfontSources {\n url\n format\n tech\n }\n verticalMetrics {\n unitsPerEm\n ascender\n descender\n lineGap\n avgCharWidth\n }\n}\n\nfragment useTotalStyles_fontCollection on FontCollection {\n isVariableFont\n totalStyles\n children(collectionTypes: [FAMILY]) {\n isVariableFont\n totalStyles\n id\n }\n}\n"
|
|
787
787
|
}
|
|
788
788
|
};
|
|
789
789
|
}();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @generated SignedSource<<
|
|
2
|
+
* @generated SignedSource<<c1876446c499f74a29e20ada076f17f7>>
|
|
3
3
|
* @lightSyntaxTransform
|
|
4
4
|
* @nogrep
|
|
5
5
|
*/
|
|
@@ -295,7 +295,7 @@ const node = function () {
|
|
|
295
295
|
"kind": "LinkedField",
|
|
296
296
|
"name": "bundles",
|
|
297
297
|
"plural": true,
|
|
298
|
-
"selections": [v6 /*: any*/, v7 /*: any*/, {
|
|
298
|
+
"selections": [v6 /*: any*/, v10 /*: any*/, v7 /*: any*/, {
|
|
299
299
|
"alias": null,
|
|
300
300
|
"args": null,
|
|
301
301
|
"concreteType": "FontStyle",
|
|
@@ -304,7 +304,7 @@ const node = function () {
|
|
|
304
304
|
"plural": true,
|
|
305
305
|
"selections": [v6 /*: any*/, v16 /*: any*/, v25 /*: any*/, v26 /*: any*/, v10 /*: any*/, v20 /*: any*/, v27 /*: any*/, v13 /*: any*/, v18 /*: any*/, v19 /*: any*/],
|
|
306
306
|
"storageKey": null
|
|
307
|
-
},
|
|
307
|
+
}, v13 /*: any*/],
|
|
308
308
|
"storageKey": "bundles(acrossFamilies:true)"
|
|
309
309
|
},
|
|
310
310
|
v29 = {
|
|
@@ -514,12 +514,12 @@ const node = function () {
|
|
|
514
514
|
}]
|
|
515
515
|
},
|
|
516
516
|
"params": {
|
|
517
|
-
"cacheID": "
|
|
517
|
+
"cacheID": "5877ecb283c40b094b063a3e3b88b8ae",
|
|
518
518
|
"id": null,
|
|
519
519
|
"metadata": {},
|
|
520
520
|
"name": "StoreModalProductRefetchQuery",
|
|
521
521
|
"operationKind": "query",
|
|
522
|
-
"text": "query StoreModalProductRefetchQuery(\n $licenseOptions: [LicenseOptionsSpec]!\n $orderVariables: [OrderVariableSelectionInput!]\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...StoreModalProductContent_collection_4sncub\n id\n }\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n ...useFontStyle_fontStyle\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 StoreModalBundleButton_bundle_4sncub on Bundle {\n id\n name\n sku {\n ...SKUPrice_sku_4sncub\n id\n }\n fontStyles {\n id\n ...FontStyle_fontStyle\n }\n}\n\nfragment StoreModalFamilyButton_collection_4sncub on FontCollection {\n isVariableFont\n collectionType\n name\n sku {\n ...SKUPrice_sku_4sncub\n id\n }\n parent {\n id\n }\n featureStyle {\n ...FontStyle_fontStyle\n supportedLanguages\n id\n }\n totalStyles\n totalStylesPrice {\n ...Price_price\n }\n ...useTotalStyles_fontCollection\n}\n\nfragment StoreModalFamily_collection_4sncub on FontCollection {\n ...StoreModalFamilyButton_collection_4sncub\n collectionType\n sku {\n id\n }\n isVariableFont\n bundles(acrossFamilies: true) {\n id\n visibility\n fontStyles {\n id\n cssFamily\n cssWeight\n cssStretch\n ...StoreModalStyleButton_fontStyle_4sncub\n }\n ...StoreModalBundleButton_bundle_4sncub\n }\n fontStyles {\n id\n cssFamily\n cssWeight\n cssStretch\n cssStyle\n ...StoreModalStyleButton_fontStyle_4sncub\n }\n}\n\nfragment StoreModalPackButton_fontPack_4sncub on FontPack {\n name\n sku {\n ...SKUPrice_sku_4sncub\n id\n price(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n }\n featureStyle {\n ...FontStyle_fontStyle\n supportedLanguages\n id\n }\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n ...Price_price\n }\n}\n\nfragment StoreModalPack_fontPack_4sncub on FontPack {\n ...StoreModalPackButton_fontPack_4sncub\n members {\n __typename\n ... on FontStyle {\n id\n cssFamily\n cssWeight\n cssStretch\n cssStyle\n family {\n id\n name\n isVariableFont\n visibility\n }\n ...StoreModalStyleButton_fontStyle_4sncub\n }\n ... on FontCollection {\n id\n visibility\n ...StoreModalFamily_collection_4sncub\n children(collectionTypes: [FAMILY]) {\n id\n visibility\n ...StoreModalFamily_collection_4sncub\n }\n }\n ... on Node {\n __isNode: __typename\n id\n }\n }\n}\n\nfragment StoreModalProductContent_collection_4sncub on Node {\n __isNode: __typename\n __typename\n ... on FontCollection {\n id\n visibility\n ...StoreModalFamily_collection_4sncub\n ...StoreModalProductLicenseSelection_licenseable\n children(collectionTypes: [FAMILY]) {\n id\n visibility\n ...StoreModalFamily_collection_4sncub\n }\n }\n ... on FontPack {\n id\n ...StoreModalPack_fontPack_4sncub\n ...StoreModalProductLicenseSelection_licenseable\n }\n id\n}\n\nfragment StoreModalProductLicenseSelection_licenseable on Licenseable {\n __isLicenseable: __typename\n id\n licenses {\n id\n ...StoreModalProductLicense_license\n }\n}\n\nfragment StoreModalProductLicense_license on License {\n id\n url\n name\n description(format: HTML)\n defaultSelected\n excludedLicenses {\n id\n }\n variables: licenseVariables {\n id\n name\n variableType\n ...VariableTableAmounts_variable\n options: licenseOptions {\n id\n name\n amount\n ...VariableTableAmounts_option\n }\n }\n}\n\nfragment StoreModalStyleButton_fontStyle_4sncub on FontStyle {\n id\n name\n supportedLanguages\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n sku {\n ...SKUPrice_sku_4sncub\n id\n }\n ...FontStyle_fontStyle\n}\n\nfragment VariableTableAmounts_option on LicenseOption {\n amounts\n}\n\nfragment VariableTableAmounts_variable on LicenseVariable {\n units\n}\n\nfragment useFontStyle_fontStyle on FontStyle {\n cssFamily\n name\n webfontSources {\n url\n format\n tech\n }\n verticalMetrics {\n unitsPerEm\n ascender\n descender\n lineGap\n avgCharWidth\n }\n}\n\nfragment useTotalStyles_fontCollection on FontCollection {\n isVariableFont\n totalStyles\n children(collectionTypes: [FAMILY]) {\n isVariableFont\n totalStyles\n id\n }\n}\n"
|
|
522
|
+
"text": "query StoreModalProductRefetchQuery(\n $licenseOptions: [LicenseOptionsSpec]!\n $orderVariables: [OrderVariableSelectionInput!]\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...StoreModalProductContent_collection_4sncub\n id\n }\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n ...useFontStyle_fontStyle\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 StoreModalBundleButton_bundle_4sncub on Bundle {\n id\n name\n sku {\n ...SKUPrice_sku_4sncub\n id\n }\n fontStyles {\n id\n ...FontStyle_fontStyle\n }\n}\n\nfragment StoreModalFamilyButton_collection_4sncub on FontCollection {\n isVariableFont\n collectionType\n name\n sku {\n ...SKUPrice_sku_4sncub\n id\n }\n parent {\n id\n }\n featureStyle {\n ...FontStyle_fontStyle\n supportedLanguages\n id\n }\n totalStyles\n totalStylesPrice {\n ...Price_price\n }\n ...useTotalStyles_fontCollection\n}\n\nfragment StoreModalFamily_collection_4sncub on FontCollection {\n ...StoreModalFamilyButton_collection_4sncub\n collectionType\n sku {\n id\n }\n isVariableFont\n bundles(acrossFamilies: true) {\n id\n name\n visibility\n fontStyles {\n id\n cssFamily\n cssWeight\n cssStretch\n ...StoreModalStyleButton_fontStyle_4sncub\n }\n ...StoreModalBundleButton_bundle_4sncub\n }\n fontStyles {\n id\n cssFamily\n cssWeight\n cssStretch\n cssStyle\n ...StoreModalStyleButton_fontStyle_4sncub\n }\n}\n\nfragment StoreModalPackButton_fontPack_4sncub on FontPack {\n name\n sku {\n ...SKUPrice_sku_4sncub\n id\n price(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n }\n featureStyle {\n ...FontStyle_fontStyle\n supportedLanguages\n id\n }\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n ...Price_price\n }\n}\n\nfragment StoreModalPack_fontPack_4sncub on FontPack {\n ...StoreModalPackButton_fontPack_4sncub\n members {\n __typename\n ... on FontStyle {\n id\n cssFamily\n cssWeight\n cssStretch\n cssStyle\n family {\n id\n name\n isVariableFont\n visibility\n }\n ...StoreModalStyleButton_fontStyle_4sncub\n }\n ... on FontCollection {\n id\n visibility\n ...StoreModalFamily_collection_4sncub\n children(collectionTypes: [FAMILY]) {\n id\n visibility\n ...StoreModalFamily_collection_4sncub\n }\n }\n ... on Node {\n __isNode: __typename\n id\n }\n }\n}\n\nfragment StoreModalProductContent_collection_4sncub on Node {\n __isNode: __typename\n __typename\n ... on FontCollection {\n id\n visibility\n ...StoreModalFamily_collection_4sncub\n ...StoreModalProductLicenseSelection_licenseable\n children(collectionTypes: [FAMILY]) {\n id\n visibility\n ...StoreModalFamily_collection_4sncub\n }\n }\n ... on FontPack {\n id\n ...StoreModalPack_fontPack_4sncub\n ...StoreModalProductLicenseSelection_licenseable\n }\n id\n}\n\nfragment StoreModalProductLicenseSelection_licenseable on Licenseable {\n __isLicenseable: __typename\n id\n licenses {\n id\n ...StoreModalProductLicense_license\n }\n}\n\nfragment StoreModalProductLicense_license on License {\n id\n url\n name\n description(format: HTML)\n defaultSelected\n excludedLicenses {\n id\n }\n variables: licenseVariables {\n id\n name\n variableType\n ...VariableTableAmounts_variable\n options: licenseOptions {\n id\n name\n amount\n ...VariableTableAmounts_option\n }\n }\n}\n\nfragment StoreModalStyleButton_fontStyle_4sncub on FontStyle {\n id\n name\n supportedLanguages\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n sku {\n ...SKUPrice_sku_4sncub\n id\n }\n ...FontStyle_fontStyle\n}\n\nfragment VariableTableAmounts_option on LicenseOption {\n amounts\n}\n\nfragment VariableTableAmounts_variable on LicenseVariable {\n units\n}\n\nfragment useFontStyle_fontStyle on FontStyle {\n cssFamily\n name\n webfontSources {\n url\n format\n tech\n }\n verticalMetrics {\n unitsPerEm\n ascender\n descender\n lineGap\n avgCharWidth\n }\n}\n\nfragment useTotalStyles_fontCollection on FontCollection {\n isVariableFont\n totalStyles\n children(collectionTypes: [FAMILY]) {\n isVariableFont\n totalStyles\n id\n }\n}\n"
|
|
523
523
|
}
|
|
524
524
|
};
|
|
525
525
|
}();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @generated SignedSource<<
|
|
2
|
+
* @generated SignedSource<<f862417337955b7f7262fcc822d87026>>
|
|
3
3
|
* @lightSyntaxTransform
|
|
4
4
|
* @nogrep
|
|
5
5
|
*/
|
|
@@ -302,7 +302,7 @@ const node = function () {
|
|
|
302
302
|
"kind": "LinkedField",
|
|
303
303
|
"name": "bundles",
|
|
304
304
|
"plural": true,
|
|
305
|
-
"selections": [v4 /*: any*/, v10 /*: any*/, {
|
|
305
|
+
"selections": [v4 /*: any*/, v13 /*: any*/, v10 /*: any*/, {
|
|
306
306
|
"alias": null,
|
|
307
307
|
"args": null,
|
|
308
308
|
"concreteType": "FontStyle",
|
|
@@ -311,7 +311,7 @@ const node = function () {
|
|
|
311
311
|
"plural": true,
|
|
312
312
|
"selections": [v4 /*: any*/, v19 /*: any*/, v28 /*: any*/, v29 /*: any*/, v13 /*: any*/, v23 /*: any*/, v30 /*: any*/, v16 /*: any*/, v21 /*: any*/, v22 /*: any*/],
|
|
313
313
|
"storageKey": null
|
|
314
|
-
},
|
|
314
|
+
}, v16 /*: any*/],
|
|
315
315
|
"storageKey": "bundles(acrossFamilies:true)"
|
|
316
316
|
},
|
|
317
317
|
v32 = {
|
|
@@ -818,12 +818,12 @@ const node = function () {
|
|
|
818
818
|
}]
|
|
819
819
|
},
|
|
820
820
|
"params": {
|
|
821
|
-
"cacheID": "
|
|
821
|
+
"cacheID": "0b08bcd167621cb4ece4d513e0b7d8fb",
|
|
822
822
|
"id": null,
|
|
823
823
|
"metadata": {},
|
|
824
824
|
"name": "StoreModalProductSlugQuery",
|
|
825
825
|
"operationKind": "query",
|
|
826
|
-
"text": "query StoreModalProductSlugQuery(\n $productSlug: String!\n $licenseOptions: [LicenseOptionsSpec]!\n $orderVariables: [OrderVariableSelectionInput!]\n) {\n viewer {\n slug(name: $productSlug) {\n collection: fontCollection {\n id\n ...StoreModalProductContent_collection_4sncub\n }\n pack: fontPack {\n id\n ...StoreModalProductContent_collection_4sncub\n }\n id\n }\n ...StoreModalProductViewer_4sncub\n id\n }\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n ...useFontStyle_fontStyle\n}\n\nfragment OrderVariableSelectionRedux_viewer_2ZguDv on Viewer {\n ...OrderVariableSelection_variables_2ZguDv\n detectedCountry\n orderVariables {\n id\n variableType\n }\n}\n\nfragment OrderVariableSelection_variables_2ZguDv on Viewer {\n orderVariables {\n id\n name\n variableType\n description(format: HTML, orderVariables: $orderVariables)\n orderVariableOptions {\n id\n amount\n }\n }\n countries {\n code\n name\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 StoreModalBundleButton_bundle_4sncub on Bundle {\n id\n name\n sku {\n ...SKUPrice_sku_4sncub\n id\n }\n fontStyles {\n id\n ...FontStyle_fontStyle\n }\n}\n\nfragment StoreModalFamilyButton_collection_4sncub on FontCollection {\n isVariableFont\n collectionType\n name\n sku {\n ...SKUPrice_sku_4sncub\n id\n }\n parent {\n id\n }\n featureStyle {\n ...FontStyle_fontStyle\n supportedLanguages\n id\n }\n totalStyles\n totalStylesPrice {\n ...Price_price\n }\n ...useTotalStyles_fontCollection\n}\n\nfragment StoreModalFamily_collection_4sncub on FontCollection {\n ...StoreModalFamilyButton_collection_4sncub\n collectionType\n sku {\n id\n }\n isVariableFont\n bundles(acrossFamilies: true) {\n id\n visibility\n fontStyles {\n id\n cssFamily\n cssWeight\n cssStretch\n ...StoreModalStyleButton_fontStyle_4sncub\n }\n ...StoreModalBundleButton_bundle_4sncub\n }\n fontStyles {\n id\n cssFamily\n cssWeight\n cssStretch\n cssStyle\n ...StoreModalStyleButton_fontStyle_4sncub\n }\n}\n\nfragment StoreModalPackButton_fontPack_4sncub on FontPack {\n name\n sku {\n ...SKUPrice_sku_4sncub\n id\n price(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n }\n featureStyle {\n ...FontStyle_fontStyle\n supportedLanguages\n id\n }\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n ...Price_price\n }\n}\n\nfragment StoreModalPack_fontPack_4sncub on FontPack {\n ...StoreModalPackButton_fontPack_4sncub\n members {\n __typename\n ... on FontStyle {\n id\n cssFamily\n cssWeight\n cssStretch\n cssStyle\n family {\n id\n name\n isVariableFont\n visibility\n }\n ...StoreModalStyleButton_fontStyle_4sncub\n }\n ... on FontCollection {\n id\n visibility\n ...StoreModalFamily_collection_4sncub\n children(collectionTypes: [FAMILY]) {\n id\n visibility\n ...StoreModalFamily_collection_4sncub\n }\n }\n ... on Node {\n __isNode: __typename\n id\n }\n }\n}\n\nfragment StoreModalProductContent_collection_4sncub on Node {\n __isNode: __typename\n __typename\n ... on FontCollection {\n id\n visibility\n ...StoreModalFamily_collection_4sncub\n ...StoreModalProductLicenseSelection_licenseable\n children(collectionTypes: [FAMILY]) {\n id\n visibility\n ...StoreModalFamily_collection_4sncub\n }\n }\n ... on FontPack {\n id\n ...StoreModalPack_fontPack_4sncub\n ...StoreModalProductLicenseSelection_licenseable\n }\n id\n}\n\nfragment StoreModalProductLicenseSelection_licenseable on Licenseable {\n __isLicenseable: __typename\n id\n licenses {\n id\n ...StoreModalProductLicense_license\n }\n}\n\nfragment StoreModalProductLicense_license on License {\n id\n url\n name\n description(format: HTML)\n defaultSelected\n excludedLicenses {\n id\n }\n variables: licenseVariables {\n id\n name\n variableType\n ...VariableTableAmounts_variable\n options: licenseOptions {\n id\n name\n amount\n ...VariableTableAmounts_option\n }\n }\n}\n\nfragment StoreModalProductSummary_viewer_4sncub on Viewer {\n settings {\n taxSystem\n stripeTaxSettings {\n taxBehavior\n }\n }\n taxCollections {\n taxName\n inclusive\n }\n orderVariables {\n id\n variableType\n name\n }\n precart(skuIds: [], licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n skus {\n price(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n product {\n __typename\n ... on FontCollection {\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n }\n ... on Bundle {\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n }\n ... on CollectionBundle {\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n }\n ... on FontPack {\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n }\n ... on Node {\n __isNode: __typename\n id\n }\n }\n id\n }\n subtotal {\n ...Price_price\n amount\n currency\n }\n }\n}\n\nfragment StoreModalProductViewer_4sncub on Viewer {\n endpoint\n stripeAccountId\n ...OrderVariableSelectionRedux_viewer_2ZguDv\n ...StoreModalProductSummary_viewer_4sncub\n orderVariables {\n id\n variableType\n name\n }\n settings {\n storeModalSelectLicenseeLabel(format: HTML)\n storeModalLicenseeSelfLabel(format: HTML)\n storeModalLicenseeSelfDescription(format: HTML)\n storeModalLicenseeClientLabel(format: HTML)\n storeModalLicenseeClientDescription(format: HTML)\n storeModalSelectOrderVariablesLabel(format: HTML)\n storeModalSelectLicensesLabel(format: HTML)\n storeModalSelectFontsLabel(format: HTML)\n }\n}\n\nfragment StoreModalStyleButton_fontStyle_4sncub on FontStyle {\n id\n name\n supportedLanguages\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n sku {\n ...SKUPrice_sku_4sncub\n id\n }\n ...FontStyle_fontStyle\n}\n\nfragment VariableTableAmounts_option on LicenseOption {\n amounts\n}\n\nfragment VariableTableAmounts_variable on LicenseVariable {\n units\n}\n\nfragment useFontStyle_fontStyle on FontStyle {\n cssFamily\n name\n webfontSources {\n url\n format\n tech\n }\n verticalMetrics {\n unitsPerEm\n ascender\n descender\n lineGap\n avgCharWidth\n }\n}\n\nfragment useTotalStyles_fontCollection on FontCollection {\n isVariableFont\n totalStyles\n children(collectionTypes: [FAMILY]) {\n isVariableFont\n totalStyles\n id\n }\n}\n"
|
|
826
|
+
"text": "query StoreModalProductSlugQuery(\n $productSlug: String!\n $licenseOptions: [LicenseOptionsSpec]!\n $orderVariables: [OrderVariableSelectionInput!]\n) {\n viewer {\n slug(name: $productSlug) {\n collection: fontCollection {\n id\n ...StoreModalProductContent_collection_4sncub\n }\n pack: fontPack {\n id\n ...StoreModalProductContent_collection_4sncub\n }\n id\n }\n ...StoreModalProductViewer_4sncub\n id\n }\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n ...useFontStyle_fontStyle\n}\n\nfragment OrderVariableSelectionRedux_viewer_2ZguDv on Viewer {\n ...OrderVariableSelection_variables_2ZguDv\n detectedCountry\n orderVariables {\n id\n variableType\n }\n}\n\nfragment OrderVariableSelection_variables_2ZguDv on Viewer {\n orderVariables {\n id\n name\n variableType\n description(format: HTML, orderVariables: $orderVariables)\n orderVariableOptions {\n id\n amount\n }\n }\n countries {\n code\n name\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 StoreModalBundleButton_bundle_4sncub on Bundle {\n id\n name\n sku {\n ...SKUPrice_sku_4sncub\n id\n }\n fontStyles {\n id\n ...FontStyle_fontStyle\n }\n}\n\nfragment StoreModalFamilyButton_collection_4sncub on FontCollection {\n isVariableFont\n collectionType\n name\n sku {\n ...SKUPrice_sku_4sncub\n id\n }\n parent {\n id\n }\n featureStyle {\n ...FontStyle_fontStyle\n supportedLanguages\n id\n }\n totalStyles\n totalStylesPrice {\n ...Price_price\n }\n ...useTotalStyles_fontCollection\n}\n\nfragment StoreModalFamily_collection_4sncub on FontCollection {\n ...StoreModalFamilyButton_collection_4sncub\n collectionType\n sku {\n id\n }\n isVariableFont\n bundles(acrossFamilies: true) {\n id\n name\n visibility\n fontStyles {\n id\n cssFamily\n cssWeight\n cssStretch\n ...StoreModalStyleButton_fontStyle_4sncub\n }\n ...StoreModalBundleButton_bundle_4sncub\n }\n fontStyles {\n id\n cssFamily\n cssWeight\n cssStretch\n cssStyle\n ...StoreModalStyleButton_fontStyle_4sncub\n }\n}\n\nfragment StoreModalPackButton_fontPack_4sncub on FontPack {\n name\n sku {\n ...SKUPrice_sku_4sncub\n id\n price(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n }\n featureStyle {\n ...FontStyle_fontStyle\n supportedLanguages\n id\n }\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n ...Price_price\n }\n}\n\nfragment StoreModalPack_fontPack_4sncub on FontPack {\n ...StoreModalPackButton_fontPack_4sncub\n members {\n __typename\n ... on FontStyle {\n id\n cssFamily\n cssWeight\n cssStretch\n cssStyle\n family {\n id\n name\n isVariableFont\n visibility\n }\n ...StoreModalStyleButton_fontStyle_4sncub\n }\n ... on FontCollection {\n id\n visibility\n ...StoreModalFamily_collection_4sncub\n children(collectionTypes: [FAMILY]) {\n id\n visibility\n ...StoreModalFamily_collection_4sncub\n }\n }\n ... on Node {\n __isNode: __typename\n id\n }\n }\n}\n\nfragment StoreModalProductContent_collection_4sncub on Node {\n __isNode: __typename\n __typename\n ... on FontCollection {\n id\n visibility\n ...StoreModalFamily_collection_4sncub\n ...StoreModalProductLicenseSelection_licenseable\n children(collectionTypes: [FAMILY]) {\n id\n visibility\n ...StoreModalFamily_collection_4sncub\n }\n }\n ... on FontPack {\n id\n ...StoreModalPack_fontPack_4sncub\n ...StoreModalProductLicenseSelection_licenseable\n }\n id\n}\n\nfragment StoreModalProductLicenseSelection_licenseable on Licenseable {\n __isLicenseable: __typename\n id\n licenses {\n id\n ...StoreModalProductLicense_license\n }\n}\n\nfragment StoreModalProductLicense_license on License {\n id\n url\n name\n description(format: HTML)\n defaultSelected\n excludedLicenses {\n id\n }\n variables: licenseVariables {\n id\n name\n variableType\n ...VariableTableAmounts_variable\n options: licenseOptions {\n id\n name\n amount\n ...VariableTableAmounts_option\n }\n }\n}\n\nfragment StoreModalProductSummary_viewer_4sncub on Viewer {\n settings {\n taxSystem\n stripeTaxSettings {\n taxBehavior\n }\n }\n taxCollections {\n taxName\n inclusive\n }\n orderVariables {\n id\n variableType\n name\n }\n precart(skuIds: [], licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n skus {\n price(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n product {\n __typename\n ... on FontCollection {\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n }\n ... on Bundle {\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n }\n ... on CollectionBundle {\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n }\n ... on FontPack {\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n }\n }\n ... on Node {\n __isNode: __typename\n id\n }\n }\n id\n }\n subtotal {\n ...Price_price\n amount\n currency\n }\n }\n}\n\nfragment StoreModalProductViewer_4sncub on Viewer {\n endpoint\n stripeAccountId\n ...OrderVariableSelectionRedux_viewer_2ZguDv\n ...StoreModalProductSummary_viewer_4sncub\n orderVariables {\n id\n variableType\n name\n }\n settings {\n storeModalSelectLicenseeLabel(format: HTML)\n storeModalLicenseeSelfLabel(format: HTML)\n storeModalLicenseeSelfDescription(format: HTML)\n storeModalLicenseeClientLabel(format: HTML)\n storeModalLicenseeClientDescription(format: HTML)\n storeModalSelectOrderVariablesLabel(format: HTML)\n storeModalSelectLicensesLabel(format: HTML)\n storeModalSelectFontsLabel(format: HTML)\n }\n}\n\nfragment StoreModalStyleButton_fontStyle_4sncub on FontStyle {\n id\n name\n supportedLanguages\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n sku {\n ...SKUPrice_sku_4sncub\n id\n }\n ...FontStyle_fontStyle\n}\n\nfragment VariableTableAmounts_option on LicenseOption {\n amounts\n}\n\nfragment VariableTableAmounts_variable on LicenseVariable {\n units\n}\n\nfragment useFontStyle_fontStyle on FontStyle {\n cssFamily\n name\n webfontSources {\n url\n format\n tech\n }\n verticalMetrics {\n unitsPerEm\n ascender\n descender\n lineGap\n avgCharWidth\n }\n}\n\nfragment useTotalStyles_fontCollection on FontCollection {\n isVariableFont\n totalStyles\n children(collectionTypes: [FAMILY]) {\n isVariableFont\n totalStyles\n id\n }\n}\n"
|
|
827
827
|
}
|
|
828
828
|
};
|
|
829
829
|
}();
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
// @vitest-environment happy-dom
|
|
2
|
+
|
|
3
|
+
// Bundles sit side by side when their names make a pair ("Thin" directly
|
|
4
|
+
// followed by "Thin Italic"), the way a style sits beside its italic.
|
|
5
|
+
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import { renderToStaticMarkup } from 'react-dom/server';
|
|
8
|
+
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
9
|
+
const {
|
|
10
|
+
stateRef
|
|
11
|
+
} = vi.hoisted(() => ({
|
|
12
|
+
stateRef: {
|
|
13
|
+
current: null
|
|
14
|
+
}
|
|
15
|
+
}));
|
|
16
|
+
|
|
17
|
+
// The fragment reader hands back the data it was given; the redux selector
|
|
18
|
+
// runs against a default store's state.
|
|
19
|
+
vi.mock('react-relay', () => ({
|
|
20
|
+
graphql: () => null,
|
|
21
|
+
fetchQuery: vi.fn(),
|
|
22
|
+
useFragment: (_fragment, key) => key
|
|
23
|
+
}));
|
|
24
|
+
vi.mock('react-redux', async importOriginal => ({
|
|
25
|
+
...(await importOriginal()),
|
|
26
|
+
useSelector: selector => selector(stateRef.current)
|
|
27
|
+
}));
|
|
28
|
+
import StoreModalFamily, { bundlesGrouped } from '../components/StoreModal/StoreModalFamily.js';
|
|
29
|
+
import { createDefaultStore } from '../reducer.js';
|
|
30
|
+
const grouped = function () {
|
|
31
|
+
for (var _len = arguments.length, names = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
32
|
+
names[_key] = arguments[_key];
|
|
33
|
+
}
|
|
34
|
+
return bundlesGrouped(names.map(name => ({
|
|
35
|
+
name
|
|
36
|
+
}))).map(group => group.map(_ref => {
|
|
37
|
+
let {
|
|
38
|
+
name
|
|
39
|
+
} = _ref;
|
|
40
|
+
return name;
|
|
41
|
+
}));
|
|
42
|
+
};
|
|
43
|
+
describe('bundlesGrouped', () => {
|
|
44
|
+
it('pairs a bundle with a direct successor that repeats its name plus a suffix', () => {
|
|
45
|
+
expect(grouped('Thin', 'Thin Italic', 'Light', 'Light Oblique')).toEqual([['Thin', 'Thin Italic'], ['Light', 'Light Oblique']]);
|
|
46
|
+
});
|
|
47
|
+
it('accepts any suffix, not only italics', () => {
|
|
48
|
+
expect(grouped('Text', 'Text Alternates')).toEqual([['Text', 'Text Alternates']]);
|
|
49
|
+
});
|
|
50
|
+
it('only looks at the direct successor', () => {
|
|
51
|
+
expect(grouped('Thin', 'Light', 'Thin Italic')).toEqual([['Thin'], ['Light'], ['Thin Italic']]);
|
|
52
|
+
});
|
|
53
|
+
it('keeps exactly two: a third bundle with the same name splits them all', () => {
|
|
54
|
+
expect(grouped('Text', 'Text Italic', 'Text Oblique')).toEqual([['Text'], ['Text Italic'], ['Text Oblique']]);
|
|
55
|
+
});
|
|
56
|
+
it('wants a whole word, so a longer word is not a suffix', () => {
|
|
57
|
+
expect(grouped('Thin', 'Thinner')).toEqual([['Thin'], ['Thinner']]);
|
|
58
|
+
});
|
|
59
|
+
it('does not pair by order alone: the italic has to come second', () => {
|
|
60
|
+
expect(grouped('Thin Italic', 'Thin')).toEqual([['Thin Italic'], ['Thin']]);
|
|
61
|
+
});
|
|
62
|
+
it('ignores stray spaces around a name', () => {
|
|
63
|
+
expect(grouped('Semibold ', 'Semibold Italic')).toEqual([['Semibold ', 'Semibold Italic']]);
|
|
64
|
+
});
|
|
65
|
+
it('never pairs on an empty name', () => {
|
|
66
|
+
expect(grouped('', 'Thin')).toEqual([[''], ['Thin']]);
|
|
67
|
+
});
|
|
68
|
+
it('handles a missing list', () => {
|
|
69
|
+
expect(bundlesGrouped(null)).toEqual([]);
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
const money = amount => ({
|
|
73
|
+
amount,
|
|
74
|
+
currency: 'EUR'
|
|
75
|
+
});
|
|
76
|
+
const style = name => ({
|
|
77
|
+
id: `style:${name}`,
|
|
78
|
+
name,
|
|
79
|
+
supportedLanguages: ['en'],
|
|
80
|
+
variableInstances: [],
|
|
81
|
+
sku: {
|
|
82
|
+
id: `sku:style:${name}`,
|
|
83
|
+
price: money(4000)
|
|
84
|
+
},
|
|
85
|
+
cssFamily: 'Matex',
|
|
86
|
+
cssWeight: '400',
|
|
87
|
+
cssStretch: 'normal',
|
|
88
|
+
cssStyle: 'normal'
|
|
89
|
+
});
|
|
90
|
+
const bundle = function (name) {
|
|
91
|
+
let visibility = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'VISIBLE';
|
|
92
|
+
return {
|
|
93
|
+
id: `bundle:${name}`,
|
|
94
|
+
name,
|
|
95
|
+
visibility,
|
|
96
|
+
sku: {
|
|
97
|
+
id: `sku:bundle:${name}`,
|
|
98
|
+
price: money(26000)
|
|
99
|
+
},
|
|
100
|
+
fontStyles: [style(name)]
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
const collection = bundles => ({
|
|
104
|
+
__typename: 'FontCollection',
|
|
105
|
+
id: 'collection:matex',
|
|
106
|
+
name: 'HAL Matex',
|
|
107
|
+
collectionType: 'superfamily',
|
|
108
|
+
isVariableFont: false,
|
|
109
|
+
sku: {
|
|
110
|
+
id: 'sku:matex',
|
|
111
|
+
price: money(138667)
|
|
112
|
+
},
|
|
113
|
+
totalStyles: 60,
|
|
114
|
+
totalStylesPrice: money(138667),
|
|
115
|
+
featureStyle: null,
|
|
116
|
+
fontStyles: [],
|
|
117
|
+
bundles
|
|
118
|
+
});
|
|
119
|
+
describe('StoreModalFamily bundle rows', () => {
|
|
120
|
+
beforeEach(() => {
|
|
121
|
+
stateRef.current = createDefaultStore(undefined).getState();
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
// Bundle names, row by row.
|
|
125
|
+
const rows = bundles => {
|
|
126
|
+
const container = document.createElement('div');
|
|
127
|
+
container.innerHTML = renderToStaticMarkup( /*#__PURE__*/React.createElement(StoreModalFamily, {
|
|
128
|
+
collection: collection(bundles),
|
|
129
|
+
onSelect: () => {}
|
|
130
|
+
}));
|
|
131
|
+
return Array.from(container.querySelectorAll('.store-modal__family__group')).map(group => Array.from(group.querySelectorAll('.store-modal__family__bundle-button')).map(button => {
|
|
132
|
+
var _button$querySelector;
|
|
133
|
+
return (_button$querySelector = button.querySelector('.store-modal__style-button__style-name')) === null || _button$querySelector === void 0 ? void 0 : _button$querySelector.textContent;
|
|
134
|
+
}));
|
|
135
|
+
};
|
|
136
|
+
it('puts a pair on one row and leaves every other bundle on its own', () => {
|
|
137
|
+
expect(rows([bundle('Thin'), bundle('Thin Italic'), bundle('Complete')])).toEqual([['Thin', 'Thin Italic'], ['Complete']]);
|
|
138
|
+
});
|
|
139
|
+
it('pairs what is listed: an unlisted bundle between two names has no button', () => {
|
|
140
|
+
expect(rows([bundle('Thin'), bundle('Secret', 'UNLISTED'), bundle('Thin Italic')])).toEqual([['Thin', 'Thin Italic']]);
|
|
141
|
+
});
|
|
142
|
+
});
|
|
@@ -12,5 +12,8 @@ interface GroupableStyle {
|
|
|
12
12
|
cssStyle: string | null;
|
|
13
13
|
}
|
|
14
14
|
export declare function stylesGrouped<T extends GroupableStyle>(fontStyles: ReadonlyArray<T> | null | undefined): ReadonlyArray<ReadonlyArray<T>>;
|
|
15
|
+
export declare function bundlesGrouped<T extends {
|
|
16
|
+
name: string;
|
|
17
|
+
}>(bundles: ReadonlyArray<T> | null | undefined): ReadonlyArray<ReadonlyArray<T>>;
|
|
15
18
|
export default function StoreModalFamily({ collection: collectionKey, onSelect, title, }: StoreModalFamilyProps): React.JSX.Element | null;
|
|
16
19
|
export {};
|
|
@@ -33,6 +33,16 @@ export function stylesGrouped(fontStyles) {
|
|
|
33
33
|
return slantedCount === 1 ? [chunk] : chunk.map(style => [style]);
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
// Pairs a bundle with its direct successor when that one's name repeats it plus
|
|
38
|
+
// a suffix ("Thin" then "Thin Italic"), so the two render side by side like a
|
|
39
|
+
// style beside its italic. Names are all there is to go on: a bundle's styles
|
|
40
|
+
// can come from several families. As with styles, only exactly two stay paired.
|
|
41
|
+
export function bundlesGrouped(bundles) {
|
|
42
|
+
if (!bundles) return [];
|
|
43
|
+
const chunks = chunkConsecutiveBy(bundles, (left, right) => right.name.trim().startsWith(`${left.name.trim()} `));
|
|
44
|
+
return chunks.flatMap(chunk => chunk.length === 2 ? [chunk] : chunk.map(b => [b]));
|
|
45
|
+
}
|
|
36
46
|
export default function StoreModalFamily(_ref) {
|
|
37
47
|
var _collection$bundles;
|
|
38
48
|
let {
|
|
@@ -40,7 +50,7 @@ export default function StoreModalFamily(_ref) {
|
|
|
40
50
|
onSelect,
|
|
41
51
|
title
|
|
42
52
|
} = _ref;
|
|
43
|
-
const collection = useFragment((_StoreModalFamily_collection.hash && _StoreModalFamily_collection.hash !== "
|
|
53
|
+
const collection = useFragment((_StoreModalFamily_collection.hash && _StoreModalFamily_collection.hash !== "ed59465ca68bf3d3278773a671ddefb3" && console.error("The definition of 'StoreModalFamily_collection' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _StoreModalFamily_collection), collectionKey);
|
|
44
54
|
const fontStyles = useMemo(() => stylesGrouped(collection.fontStyles), [collection]);
|
|
45
55
|
// An unlisted bundle gets no button, but its price still applies as an
|
|
46
56
|
// upgrade: the product state reads every bundle.
|
|
@@ -55,11 +65,11 @@ export default function StoreModalFamily(_ref) {
|
|
|
55
65
|
collection: collection,
|
|
56
66
|
onSelectSku: onSelect
|
|
57
67
|
}),
|
|
58
|
-
|
|
68
|
+
bundleGroups: bundlesGrouped(listedBundles).map(group => group.map(bundle => /*#__PURE__*/React.createElement(StoreModalBundleButton, {
|
|
59
69
|
key: bundle.id,
|
|
60
70
|
bundle: bundle,
|
|
61
71
|
onSelectSku: onSelect
|
|
62
|
-
})),
|
|
72
|
+
}))),
|
|
63
73
|
styleGroups: fontStyles.map(group => group.map(fontStyle => /*#__PURE__*/React.createElement(StyleButton, {
|
|
64
74
|
key: fontStyle.id,
|
|
65
75
|
fontStyle: fontStyle,
|
|
@@ -3,7 +3,7 @@ interface StoreModalFamilyProps {
|
|
|
3
3
|
children: {
|
|
4
4
|
title: React.ReactNode;
|
|
5
5
|
familyButton?: React.ReactElement<any> | null;
|
|
6
|
-
|
|
6
|
+
bundleGroups?: React.ReactElement<any>[][] | null;
|
|
7
7
|
styleGroups?: React.ReactElement<any>[][] | null;
|
|
8
8
|
};
|
|
9
9
|
}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
const StoreModalFamily = _ref => {
|
|
3
3
|
let {
|
|
4
4
|
children: {
|
|
5
|
-
|
|
5
|
+
bundleGroups,
|
|
6
6
|
familyButton,
|
|
7
7
|
styleGroups,
|
|
8
8
|
title
|
|
@@ -14,9 +14,12 @@ const StoreModalFamily = _ref => {
|
|
|
14
14
|
className: "store-modal__family__title"
|
|
15
15
|
}, title), familyButton && /*#__PURE__*/React.cloneElement(familyButton, {
|
|
16
16
|
className: 'store-modal__family__family-button'
|
|
17
|
-
}),
|
|
17
|
+
}), bundleGroups === null || bundleGroups === void 0 ? void 0 : bundleGroups.map((group, i) => /*#__PURE__*/React.createElement("div", {
|
|
18
|
+
className: "store-modal__family__group",
|
|
19
|
+
key: i
|
|
20
|
+
}, group.map(bundleButton => /*#__PURE__*/React.cloneElement(bundleButton, {
|
|
18
21
|
className: 'store-modal__family__bundle-button'
|
|
19
|
-
})), styleGroups === null || styleGroups === void 0 ? void 0 : styleGroups.map((group, i) => /*#__PURE__*/React.createElement("div", {
|
|
22
|
+
})))), styleGroups === null || styleGroups === void 0 ? void 0 : styleGroups.map((group, i) => /*#__PURE__*/React.createElement("div", {
|
|
20
23
|
className: "store-modal__family__group",
|
|
21
24
|
key: i
|
|
22
25
|
}, group.map(styleButton => /*#__PURE__*/React.cloneElement(styleButton, {
|
package/dist/fontdue.css
CHANGED
|
@@ -127,6 +127,7 @@
|
|
|
127
127
|
display: block;
|
|
128
128
|
width: 1em;
|
|
129
129
|
height: 1em;
|
|
130
|
+
max-width: none;
|
|
130
131
|
fill: currentColor;
|
|
131
132
|
}
|
|
132
133
|
|
|
@@ -1784,6 +1785,7 @@ input:checked + .checkbox__icon {
|
|
|
1784
1785
|
|
|
1785
1786
|
.store-modal__container__buttons {
|
|
1786
1787
|
text-align: right;
|
|
1788
|
+
white-space: nowrap;
|
|
1787
1789
|
}
|
|
1788
1790
|
|
|
1789
1791
|
.store-modal__container__back-button {
|
|
@@ -2701,6 +2703,31 @@ input:checked + .checkbox__icon {
|
|
|
2701
2703
|
.store-modal__family__bundle-button .store-modal__style-button__price {
|
|
2702
2704
|
align-self: flex-end;
|
|
2703
2705
|
}
|
|
2706
|
+
.store-modal__family__bundle-button .store-modal__style-button__checked {
|
|
2707
|
+
height: 1lh;
|
|
2708
|
+
}
|
|
2709
|
+
}
|
|
2710
|
+
.store-modal__family__bundle-button {
|
|
2711
|
+
container-type: inline-size;
|
|
2712
|
+
}
|
|
2713
|
+
|
|
2714
|
+
@container (max-width: 480px) {
|
|
2715
|
+
.store-modal__family__bundle-button .store-modal__style-button__container {
|
|
2716
|
+
flex-wrap: wrap;
|
|
2717
|
+
}
|
|
2718
|
+
.store-modal__family__bundle-button .store-modal__style-button__feature-glyphs {
|
|
2719
|
+
flex: 0 0 100%;
|
|
2720
|
+
}
|
|
2721
|
+
.store-modal__family__bundle-button .store-modal__style-button__style-name {
|
|
2722
|
+
flex: 1 1 0;
|
|
2723
|
+
min-width: 0;
|
|
2724
|
+
}
|
|
2725
|
+
.store-modal__family__bundle-button .store-modal__style-button__price {
|
|
2726
|
+
align-self: flex-end;
|
|
2727
|
+
}
|
|
2728
|
+
.store-modal__family__bundle-button .store-modal__style-button__checked {
|
|
2729
|
+
height: 1lh;
|
|
2730
|
+
}
|
|
2704
2731
|
}
|
|
2705
2732
|
body[data-fontdue-store-modal=open] {
|
|
2706
2733
|
overflow: hidden;
|
package/dist/version.js
CHANGED
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
// (Fontage.ClientVersions) to spot sites that need to upgrade before a
|
|
9
9
|
// feature that depends on a newer client can work for them.
|
|
10
10
|
export const CLIENT_VERSION_HEADER = 'fontdue-client-version';
|
|
11
|
-
export const version = "3.
|
|
11
|
+
export const version = "3.14.0";
|