fontdue-js 2.25.1 → 2.26.1
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 +8 -0
- package/dist/__generated__/CartOrderCompleteOrderMutation.graphql.d.ts +1 -1
- package/dist/__generated__/CartOrderCompleteOrderMutation.graphql.js +9 -3
- package/dist/__generated__/CartOrderRemoveDiscountMutation.graphql.d.ts +1 -1
- package/dist/__generated__/CartOrderRemoveDiscountMutation.graphql.js +9 -3
- package/dist/__generated__/CartOrderUpdateMutation.graphql.d.ts +1 -1
- package/dist/__generated__/CartOrderUpdateMutation.graphql.js +9 -3
- package/dist/__generated__/CartQuery.graphql.d.ts +1 -1
- package/dist/__generated__/CartQuery.graphql.js +10 -4
- package/dist/__generated__/CartStateUpdateMutation.graphql.d.ts +1 -1
- package/dist/__generated__/CartStateUpdateMutation.graphql.js +9 -3
- package/dist/__generated__/CharacterViewerIDQuery.graphql.d.ts +1 -1
- package/dist/__generated__/CharacterViewerIDQuery.graphql.js +9 -3
- package/dist/__generated__/CharacterViewerSlugQuery.graphql.d.ts +1 -1
- package/dist/__generated__/CharacterViewerSlugQuery.graphql.js +9 -3
- package/dist/__generated__/CharacterViewerStyleRefetchQuery.graphql.d.ts +1 -1
- package/dist/__generated__/CharacterViewerStyleRefetchQuery.graphql.js +9 -3
- package/dist/__generated__/CheckoutUpdateCustomerMutation.graphql.d.ts +1 -1
- package/dist/__generated__/CheckoutUpdateCustomerMutation.graphql.js +9 -3
- package/dist/__generated__/CheckoutUpdateOrderMutation.graphql.d.ts +1 -1
- package/dist/__generated__/CheckoutUpdateOrderMutation.graphql.js +9 -3
- package/dist/__generated__/CollectionAa_Query.graphql.d.ts +1 -1
- package/dist/__generated__/CollectionAa_Query.graphql.js +9 -3
- package/dist/__generated__/FontFamiliesQuery.graphql.d.ts +1 -1
- package/dist/__generated__/FontFamiliesQuery.graphql.js +9 -3
- package/dist/__generated__/PrecartAddToCartMutation.graphql.d.ts +1 -1
- package/dist/__generated__/PrecartAddToCartMutation.graphql.js +9 -3
- package/dist/__generated__/StoreModalCartQuery.graphql.d.ts +1 -1
- package/dist/__generated__/StoreModalCartQuery.graphql.js +10 -4
- package/dist/__generated__/StoreModalContainerQuery.graphql.d.ts +1 -1
- package/dist/__generated__/StoreModalContainerQuery.graphql.js +9 -3
- package/dist/__generated__/StoreModalIndexQuery.graphql.d.ts +1 -1
- package/dist/__generated__/StoreModalIndexQuery.graphql.js +9 -3
- package/dist/__generated__/StoreModalProductQuery.graphql.d.ts +1 -1
- package/dist/__generated__/StoreModalProductQuery.graphql.js +9 -3
- package/dist/__generated__/StoreModalProductRefetchQuery.graphql.d.ts +1 -1
- package/dist/__generated__/StoreModalProductRefetchQuery.graphql.js +9 -3
- package/dist/__generated__/TestFontsFormUpdateCustomerMutation.graphql.d.ts +1 -1
- package/dist/__generated__/TestFontsFormUpdateCustomerMutation.graphql.js +9 -3
- package/dist/__generated__/TypeTesterStandaloneChangedStylesQuery.graphql.d.ts +1 -1
- package/dist/__generated__/TypeTesterStandaloneChangedStylesQuery.graphql.js +9 -3
- package/dist/__generated__/TypeTesterStandaloneQuery.graphql.d.ts +1 -1
- package/dist/__generated__/TypeTesterStandaloneQuery.graphql.js +9 -3
- package/dist/__generated__/TypeTestersChangedStylesQuery.graphql.d.ts +1 -1
- package/dist/__generated__/TypeTestersChangedStylesQuery.graphql.js +9 -3
- package/dist/__generated__/TypeTestersIDQuery.graphql.d.ts +1 -1
- package/dist/__generated__/TypeTestersIDQuery.graphql.js +9 -3
- package/dist/__generated__/TypeTestersRefetchQuery.graphql.d.ts +1 -1
- package/dist/__generated__/TypeTestersRefetchQuery.graphql.js +9 -3
- package/dist/__generated__/TypeTestersSlugQuery.graphql.d.ts +1 -1
- package/dist/__generated__/TypeTestersSlugQuery.graphql.js +9 -3
- package/dist/__generated__/useFontStyle_fontStyle.graphql.d.ts +2 -1
- package/dist/__generated__/useFontStyle_fontStyle.graphql.js +8 -2
- package/dist/__tests__/fontLoader.test.js +108 -0
- package/dist/components/TypeTester/TypeTesterVariableAxes.js +17 -4
- package/dist/components/TypeTester/index.js +8 -1
- package/dist/components/useFont.d.ts +1 -4
- package/dist/components/useFontStyle.js +1 -1
- package/dist/fontLoader.d.ts +21 -1
- package/dist/fontLoader.js +37 -2
- package/dist/fontdue.css +1 -0
- package/dist/hooks.d.ts +1 -0
- package/dist/hooks.js +14 -0
- package/fontdue.css +2 -1
- 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<<
|
|
8
|
+
* @generated SignedSource<<8935c600423d035424287f49d5825f9e>>
|
|
9
9
|
* @lightSyntaxTransform
|
|
10
10
|
* @nogrep
|
|
11
11
|
*/
|
|
@@ -257,6 +257,12 @@ const node = function () {
|
|
|
257
257
|
"kind": "ScalarField",
|
|
258
258
|
"name": "format",
|
|
259
259
|
"storageKey": null
|
|
260
|
+
}, {
|
|
261
|
+
"alias": null,
|
|
262
|
+
"args": null,
|
|
263
|
+
"kind": "ScalarField",
|
|
264
|
+
"name": "tech",
|
|
265
|
+
"storageKey": null
|
|
260
266
|
}],
|
|
261
267
|
"storageKey": null
|
|
262
268
|
}, {
|
|
@@ -333,12 +339,12 @@ const node = function () {
|
|
|
333
339
|
}]
|
|
334
340
|
},
|
|
335
341
|
"params": {
|
|
336
|
-
"cacheID": "
|
|
342
|
+
"cacheID": "8794481ddef259744fdb4f928f309df9",
|
|
337
343
|
"id": null,
|
|
338
344
|
"metadata": {},
|
|
339
345
|
"name": "TypeTesterStandaloneChangedStylesQuery",
|
|
340
346
|
"operationKind": "query",
|
|
341
|
-
"text": "query TypeTesterStandaloneChangedStylesQuery(\n $id: ID!\n $licenseOptions: [LicenseOptionsSpec]!\n $orderVariables: [OrderVariableSelectionInput!]\n) {\n node(id: $id) {\n __typename\n ... on FontStyle {\n id\n ...TypeTester_fontStyle_4sncub\n }\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 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 TypeTesterStyleSelectData_fontStyle on FontStyle {\n id\n name\n supportedLanguages\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 sku {\n ...SelectButton_sku_4sncub\n ...SKUPrice_sku_4sncub\n id\n basePrice: price {\n amount\n }\n }\n}\n\nfragment useFeaturesData_fontStyle on FontStyle {\n fontFeatures {\n supportedFeatures\n stylisticSetNames {\n featureName\n humanName\n }\n }\n}\n\nfragment useFontStyle_fontStyle on FontStyle {\n cssFamily\n name\n webfontSources {\n url\n format\n }\n verticalMetrics {\n unitsPerEm\n ascender\n descender\n lineGap\n }\n}\n"
|
|
347
|
+
"text": "query TypeTesterStandaloneChangedStylesQuery(\n $id: ID!\n $licenseOptions: [LicenseOptionsSpec]!\n $orderVariables: [OrderVariableSelectionInput!]\n) {\n node(id: $id) {\n __typename\n ... on FontStyle {\n id\n ...TypeTester_fontStyle_4sncub\n }\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 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 TypeTesterStyleSelectData_fontStyle on FontStyle {\n id\n name\n supportedLanguages\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 sku {\n ...SelectButton_sku_4sncub\n ...SKUPrice_sku_4sncub\n id\n basePrice: price {\n amount\n }\n }\n}\n\nfragment useFeaturesData_fontStyle on FontStyle {\n fontFeatures {\n supportedFeatures\n stylisticSetNames {\n featureName\n humanName\n }\n }\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 }\n}\n"
|
|
342
348
|
}
|
|
343
349
|
};
|
|
344
350
|
}();
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
/**
|
|
8
|
-
* @generated SignedSource<<
|
|
8
|
+
* @generated SignedSource<<067adfa64bd17d8eb7ec529b8d06265b>>
|
|
9
9
|
* @lightSyntaxTransform
|
|
10
10
|
* @nogrep
|
|
11
11
|
*/
|
|
@@ -353,6 +353,12 @@ const node = function () {
|
|
|
353
353
|
"kind": "ScalarField",
|
|
354
354
|
"name": "format",
|
|
355
355
|
"storageKey": null
|
|
356
|
+
}, {
|
|
357
|
+
"alias": null,
|
|
358
|
+
"args": null,
|
|
359
|
+
"kind": "ScalarField",
|
|
360
|
+
"name": "tech",
|
|
361
|
+
"storageKey": null
|
|
356
362
|
}],
|
|
357
363
|
"storageKey": null
|
|
358
364
|
}, {
|
|
@@ -436,12 +442,12 @@ const node = function () {
|
|
|
436
442
|
}]
|
|
437
443
|
},
|
|
438
444
|
"params": {
|
|
439
|
-
"cacheID": "
|
|
445
|
+
"cacheID": "b414b46c064a60e77152b6cab601f765",
|
|
440
446
|
"id": null,
|
|
441
447
|
"metadata": {},
|
|
442
448
|
"name": "TypeTesterStandaloneQuery",
|
|
443
449
|
"operationKind": "query",
|
|
444
|
-
"text": "query TypeTesterStandaloneQuery(\n $familyName: String!\n $styleName: String!\n $selectable: Boolean!\n) {\n viewer {\n ...TypeTester_viewer_4g9a6U\n fontStyle(familyName: $familyName, styleName: $styleName) {\n ...TypeTester_fontStyle\n id\n family {\n id\n parent {\n id\n }\n }\n }\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_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 TypeTesterStyleSelectData_fontStyle on FontStyle {\n id\n name\n supportedLanguages\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 featureStyle {\n supportedLanguages\n id\n }\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 on FontStyle {\n id\n ...TypeTesterFeatures_fontStyle\n ...TypeTesterStyleSelectData_fontStyle\n ...FontStyle_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterToolbar_fontStyle\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 useFeaturesData_fontStyle on FontStyle {\n fontFeatures {\n supportedFeatures\n stylisticSetNames {\n featureName\n humanName\n }\n }\n}\n\nfragment useFontStyle_fontStyle on FontStyle {\n cssFamily\n name\n webfontSources {\n url\n format\n }\n verticalMetrics {\n unitsPerEm\n ascender\n descender\n lineGap\n }\n}\n"
|
|
450
|
+
"text": "query TypeTesterStandaloneQuery(\n $familyName: String!\n $styleName: String!\n $selectable: Boolean!\n) {\n viewer {\n ...TypeTester_viewer_4g9a6U\n fontStyle(familyName: $familyName, styleName: $styleName) {\n ...TypeTester_fontStyle\n id\n family {\n id\n parent {\n id\n }\n }\n }\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_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 TypeTesterStyleSelectData_fontStyle on FontStyle {\n id\n name\n supportedLanguages\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 featureStyle {\n supportedLanguages\n id\n }\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 on FontStyle {\n id\n ...TypeTesterFeatures_fontStyle\n ...TypeTesterStyleSelectData_fontStyle\n ...FontStyle_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterToolbar_fontStyle\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 useFeaturesData_fontStyle on FontStyle {\n fontFeatures {\n supportedFeatures\n stylisticSetNames {\n featureName\n humanName\n }\n }\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 }\n}\n"
|
|
445
451
|
}
|
|
446
452
|
};
|
|
447
453
|
}();
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
/**
|
|
8
|
-
* @generated SignedSource<<
|
|
8
|
+
* @generated SignedSource<<8a8956f178157e7e72fcb923a11d320b>>
|
|
9
9
|
* @lightSyntaxTransform
|
|
10
10
|
* @nogrep
|
|
11
11
|
*/
|
|
@@ -257,6 +257,12 @@ const node = function () {
|
|
|
257
257
|
"kind": "ScalarField",
|
|
258
258
|
"name": "format",
|
|
259
259
|
"storageKey": null
|
|
260
|
+
}, {
|
|
261
|
+
"alias": null,
|
|
262
|
+
"args": null,
|
|
263
|
+
"kind": "ScalarField",
|
|
264
|
+
"name": "tech",
|
|
265
|
+
"storageKey": null
|
|
260
266
|
}],
|
|
261
267
|
"storageKey": null
|
|
262
268
|
}, {
|
|
@@ -333,12 +339,12 @@ const node = function () {
|
|
|
333
339
|
}]
|
|
334
340
|
},
|
|
335
341
|
"params": {
|
|
336
|
-
"cacheID": "
|
|
342
|
+
"cacheID": "8e08d3083180ca80bbd994625e2fc4cd",
|
|
337
343
|
"id": null,
|
|
338
344
|
"metadata": {},
|
|
339
345
|
"name": "TypeTestersChangedStylesQuery",
|
|
340
346
|
"operationKind": "query",
|
|
341
|
-
"text": "query TypeTestersChangedStylesQuery(\n $ids: [ID!]!\n $licenseOptions: [LicenseOptionsSpec]!\n $orderVariables: [OrderVariableSelectionInput!]\n) {\n nodes(ids: $ids) {\n __typename\n ... on FontStyle {\n id\n ...TypeTester_fontStyle_4sncub\n }\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 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 TypeTesterStyleSelectData_fontStyle on FontStyle {\n id\n name\n supportedLanguages\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 sku {\n ...SelectButton_sku_4sncub\n ...SKUPrice_sku_4sncub\n id\n basePrice: price {\n amount\n }\n }\n}\n\nfragment useFeaturesData_fontStyle on FontStyle {\n fontFeatures {\n supportedFeatures\n stylisticSetNames {\n featureName\n humanName\n }\n }\n}\n\nfragment useFontStyle_fontStyle on FontStyle {\n cssFamily\n name\n webfontSources {\n url\n format\n }\n verticalMetrics {\n unitsPerEm\n ascender\n descender\n lineGap\n }\n}\n"
|
|
347
|
+
"text": "query TypeTestersChangedStylesQuery(\n $ids: [ID!]!\n $licenseOptions: [LicenseOptionsSpec]!\n $orderVariables: [OrderVariableSelectionInput!]\n) {\n nodes(ids: $ids) {\n __typename\n ... on FontStyle {\n id\n ...TypeTester_fontStyle_4sncub\n }\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 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 TypeTesterStyleSelectData_fontStyle on FontStyle {\n id\n name\n supportedLanguages\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 sku {\n ...SelectButton_sku_4sncub\n ...SKUPrice_sku_4sncub\n id\n basePrice: price {\n amount\n }\n }\n}\n\nfragment useFeaturesData_fontStyle on FontStyle {\n fontFeatures {\n supportedFeatures\n stylisticSetNames {\n featureName\n humanName\n }\n }\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 }\n}\n"
|
|
342
348
|
}
|
|
343
349
|
};
|
|
344
350
|
}();
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
/**
|
|
8
|
-
* @generated SignedSource<<
|
|
8
|
+
* @generated SignedSource<<e3769d4805d8ca2e4ad55c63c58f43dd>>
|
|
9
9
|
* @lightSyntaxTransform
|
|
10
10
|
* @nogrep
|
|
11
11
|
*/
|
|
@@ -503,6 +503,12 @@ const node = function () {
|
|
|
503
503
|
"kind": "ScalarField",
|
|
504
504
|
"name": "format",
|
|
505
505
|
"storageKey": null
|
|
506
|
+
}, {
|
|
507
|
+
"alias": null,
|
|
508
|
+
"args": null,
|
|
509
|
+
"kind": "ScalarField",
|
|
510
|
+
"name": "tech",
|
|
511
|
+
"storageKey": null
|
|
506
512
|
}],
|
|
507
513
|
"storageKey": null
|
|
508
514
|
}, {
|
|
@@ -623,12 +629,12 @@ const node = function () {
|
|
|
623
629
|
}]
|
|
624
630
|
},
|
|
625
631
|
"params": {
|
|
626
|
-
"cacheID": "
|
|
632
|
+
"cacheID": "00df98236ce2201aee73fb4379eb40e3",
|
|
627
633
|
"id": null,
|
|
628
634
|
"metadata": {},
|
|
629
635
|
"name": "TypeTestersIDQuery",
|
|
630
636
|
"operationKind": "query",
|
|
631
|
-
"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 ...useFontStyle_fontStyle\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 supportedLanguages\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 featureStyle {\n supportedLanguages\n id\n }\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 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 tags\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\nfragment useFontStyle_fontStyle on FontStyle {\n cssFamily\n name\n webfontSources {\n url\n format\n }\n verticalMetrics {\n unitsPerEm\n ascender\n descender\n lineGap\n }\n}\n"
|
|
637
|
+
"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 ...useFontStyle_fontStyle\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 supportedLanguages\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 featureStyle {\n supportedLanguages\n id\n }\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 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 tags\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\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 }\n}\n"
|
|
632
638
|
}
|
|
633
639
|
};
|
|
634
640
|
}();
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
/**
|
|
8
|
-
* @generated SignedSource<<
|
|
8
|
+
* @generated SignedSource<<1a9a7abbd762e51c8f58ac24fd671bbf>>
|
|
9
9
|
* @lightSyntaxTransform
|
|
10
10
|
* @nogrep
|
|
11
11
|
*/
|
|
@@ -416,6 +416,12 @@ const node = function () {
|
|
|
416
416
|
"kind": "ScalarField",
|
|
417
417
|
"name": "format",
|
|
418
418
|
"storageKey": null
|
|
419
|
+
}, {
|
|
420
|
+
"alias": null,
|
|
421
|
+
"args": null,
|
|
422
|
+
"kind": "ScalarField",
|
|
423
|
+
"name": "tech",
|
|
424
|
+
"storageKey": null
|
|
419
425
|
}],
|
|
420
426
|
"storageKey": null
|
|
421
427
|
}, {
|
|
@@ -540,12 +546,12 @@ const node = function () {
|
|
|
540
546
|
}]
|
|
541
547
|
},
|
|
542
548
|
"params": {
|
|
543
|
-
"cacheID": "
|
|
549
|
+
"cacheID": "3915d777f55b52cdde20c78befeae237",
|
|
544
550
|
"id": null,
|
|
545
551
|
"metadata": {},
|
|
546
552
|
"name": "TypeTestersRefetchQuery",
|
|
547
553
|
"operationKind": "query",
|
|
548
|
-
"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 ...useFontStyle_fontStyle\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 supportedLanguages\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 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 tags\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\nfragment useFontStyle_fontStyle on FontStyle {\n cssFamily\n name\n webfontSources {\n url\n format\n }\n verticalMetrics {\n unitsPerEm\n ascender\n descender\n lineGap\n }\n}\n"
|
|
554
|
+
"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 ...useFontStyle_fontStyle\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 supportedLanguages\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 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 tags\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\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 }\n}\n"
|
|
549
555
|
}
|
|
550
556
|
};
|
|
551
557
|
}();
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
/**
|
|
8
|
-
* @generated SignedSource<<
|
|
8
|
+
* @generated SignedSource<<76d660736254b306591b98221a792fe8>>
|
|
9
9
|
* @lightSyntaxTransform
|
|
10
10
|
* @nogrep
|
|
11
11
|
*/
|
|
@@ -509,6 +509,12 @@ const node = function () {
|
|
|
509
509
|
"kind": "ScalarField",
|
|
510
510
|
"name": "format",
|
|
511
511
|
"storageKey": null
|
|
512
|
+
}, {
|
|
513
|
+
"alias": null,
|
|
514
|
+
"args": null,
|
|
515
|
+
"kind": "ScalarField",
|
|
516
|
+
"name": "tech",
|
|
517
|
+
"storageKey": null
|
|
512
518
|
}],
|
|
513
519
|
"storageKey": null
|
|
514
520
|
}, {
|
|
@@ -630,12 +636,12 @@ const node = function () {
|
|
|
630
636
|
}]
|
|
631
637
|
},
|
|
632
638
|
"params": {
|
|
633
|
-
"cacheID": "
|
|
639
|
+
"cacheID": "c2bf0382975e3c868e6943cd5c90875e",
|
|
634
640
|
"id": null,
|
|
635
641
|
"metadata": {},
|
|
636
642
|
"name": "TypeTestersSlugQuery",
|
|
637
643
|
"operationKind": "query",
|
|
638
|
-
"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 ...useFontStyle_fontStyle\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 supportedLanguages\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 featureStyle {\n supportedLanguages\n id\n }\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 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 tags\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\nfragment useFontStyle_fontStyle on FontStyle {\n cssFamily\n name\n webfontSources {\n url\n format\n }\n verticalMetrics {\n unitsPerEm\n ascender\n descender\n lineGap\n }\n}\n"
|
|
644
|
+
"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 ...useFontStyle_fontStyle\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 supportedLanguages\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 featureStyle {\n supportedLanguages\n id\n }\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 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 tags\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\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 }\n}\n"
|
|
639
645
|
}
|
|
640
646
|
};
|
|
641
647
|
}();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @generated SignedSource<<
|
|
2
|
+
* @generated SignedSource<<83fdf14f0519371d109651e3e11c221b>>
|
|
3
3
|
* @lightSyntaxTransform
|
|
4
4
|
* @nogrep
|
|
5
5
|
*/
|
|
@@ -16,6 +16,7 @@ export type useFontStyle_fontStyle$data = {
|
|
|
16
16
|
};
|
|
17
17
|
readonly webfontSources: ReadonlyArray<{
|
|
18
18
|
readonly format: string | null;
|
|
19
|
+
readonly tech: string | null;
|
|
19
20
|
readonly url: string | null;
|
|
20
21
|
} | null> | null;
|
|
21
22
|
readonly " $fragmentType": "useFontStyle_fontStyle";
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
/**
|
|
8
|
-
* @generated SignedSource<<
|
|
8
|
+
* @generated SignedSource<<83fdf14f0519371d109651e3e11c221b>>
|
|
9
9
|
* @lightSyntaxTransform
|
|
10
10
|
* @nogrep
|
|
11
11
|
*/
|
|
@@ -50,6 +50,12 @@ const node = {
|
|
|
50
50
|
"kind": "ScalarField",
|
|
51
51
|
"name": "format",
|
|
52
52
|
"storageKey": null
|
|
53
|
+
}, {
|
|
54
|
+
"alias": null,
|
|
55
|
+
"args": null,
|
|
56
|
+
"kind": "ScalarField",
|
|
57
|
+
"name": "tech",
|
|
58
|
+
"storageKey": null
|
|
53
59
|
}],
|
|
54
60
|
"storageKey": null
|
|
55
61
|
}, {
|
|
@@ -89,6 +95,6 @@ const node = {
|
|
|
89
95
|
"type": "FontStyle",
|
|
90
96
|
"abstractKey": null
|
|
91
97
|
};
|
|
92
|
-
node.hash = "
|
|
98
|
+
node.hash = "df4c7160c29373e86bea8b6082d19994";
|
|
93
99
|
var _default = node;
|
|
94
100
|
exports.default = _default;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _vitest = require("vitest");
|
|
4
|
+
var _fontLoader = require("../fontLoader");
|
|
5
|
+
(0, _vitest.describe)('selectFontSource', () => {
|
|
6
|
+
const woff2 = function () {
|
|
7
|
+
let extra = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
8
|
+
return {
|
|
9
|
+
url: 'https://example.test/font.woff2',
|
|
10
|
+
format: 'woff2',
|
|
11
|
+
...extra
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
const woff = function () {
|
|
15
|
+
let extra = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16
|
+
return {
|
|
17
|
+
url: 'https://example.test/font.woff',
|
|
18
|
+
format: 'woff',
|
|
19
|
+
...extra
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
// Helper: a browser that supports the listed techs.
|
|
24
|
+
const supports = function () {
|
|
25
|
+
for (var _len = arguments.length, techs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26
|
+
techs[_key] = arguments[_key];
|
|
27
|
+
}
|
|
28
|
+
return tech => techs.includes(tech);
|
|
29
|
+
};
|
|
30
|
+
(0, _vitest.it)('prefers woff2 over woff for outline fonts (legacy behavior)', () => {
|
|
31
|
+
const picked = (0, _fontLoader.selectFontSource)([woff(), woff2()]);
|
|
32
|
+
(0, _vitest.expect)(picked === null || picked === void 0 ? void 0 : picked.format).toBe('woff2');
|
|
33
|
+
});
|
|
34
|
+
(0, _vitest.it)('returns null when no sources have URLs', () => {
|
|
35
|
+
const picked = (0, _fontLoader.selectFontSource)([null, {
|
|
36
|
+
url: null,
|
|
37
|
+
format: 'woff2'
|
|
38
|
+
}]);
|
|
39
|
+
(0, _vitest.expect)(picked).toBeNull();
|
|
40
|
+
});
|
|
41
|
+
(0, _vitest.it)('skips sources whose tech the browser does not support', () => {
|
|
42
|
+
// Chrome-shaped: supports COLR but not SVG-in-OpenType.
|
|
43
|
+
const sources = [woff2({
|
|
44
|
+
url: 'svg.woff2',
|
|
45
|
+
tech: 'SVG'
|
|
46
|
+
}), woff2({
|
|
47
|
+
url: 'colr.woff2',
|
|
48
|
+
tech: 'COLRv1'
|
|
49
|
+
})];
|
|
50
|
+
const picked = (0, _fontLoader.selectFontSource)(sources, supports('COLRv1', 'COLRv0'));
|
|
51
|
+
(0, _vitest.expect)(picked === null || picked === void 0 ? void 0 : picked.url).toBe('colr.woff2');
|
|
52
|
+
});
|
|
53
|
+
(0, _vitest.it)('keeps a tech-less source unconditionally (universal fallback)', () => {
|
|
54
|
+
// Even when the browser supports nothing, a no-tech outline source
|
|
55
|
+
// is always considered renderable.
|
|
56
|
+
const sources = [woff2({
|
|
57
|
+
url: 'svg.woff2',
|
|
58
|
+
tech: 'SVG'
|
|
59
|
+
}), woff2({
|
|
60
|
+
url: 'outline.woff2',
|
|
61
|
+
tech: null
|
|
62
|
+
})];
|
|
63
|
+
const picked = (0, _fontLoader.selectFontSource)(sources, supports());
|
|
64
|
+
(0, _vitest.expect)(picked === null || picked === void 0 ? void 0 : picked.url).toBe('outline.woff2');
|
|
65
|
+
});
|
|
66
|
+
(0, _vitest.it)('respects backend src-list order within the supported subset', () => {
|
|
67
|
+
// Backend put COLRv1 first, COLRv0 second — picker shouldn't reshuffle
|
|
68
|
+
// among supported sources.
|
|
69
|
+
const sources = [woff2({
|
|
70
|
+
url: 'colrv1.woff2',
|
|
71
|
+
tech: 'COLRv1'
|
|
72
|
+
}), woff2({
|
|
73
|
+
url: 'colrv0.woff2',
|
|
74
|
+
tech: 'COLRv0'
|
|
75
|
+
})];
|
|
76
|
+
const picked = (0, _fontLoader.selectFontSource)(sources, supports('COLRv1', 'COLRv0'));
|
|
77
|
+
(0, _vitest.expect)(picked === null || picked === void 0 ? void 0 : picked.url).toBe('colrv1.woff2');
|
|
78
|
+
});
|
|
79
|
+
(0, _vitest.it)('falls back to the unfiltered list when every tech-tagged source is unsupported', () => {
|
|
80
|
+
// Pathological: nothing is supported AND there is no tech-less fallback.
|
|
81
|
+
// Still try to render something rather than not load at all.
|
|
82
|
+
const sources = [woff2({
|
|
83
|
+
url: 'svg.woff2',
|
|
84
|
+
tech: 'SVG'
|
|
85
|
+
}), woff2({
|
|
86
|
+
url: 'sbix.woff2',
|
|
87
|
+
tech: 'sbix'
|
|
88
|
+
})];
|
|
89
|
+
const picked = (0, _fontLoader.selectFontSource)(sources, supports());
|
|
90
|
+
// Picks the first woff2 in the unfiltered list.
|
|
91
|
+
(0, _vitest.expect)(picked === null || picked === void 0 ? void 0 : picked.url).toBe('svg.woff2');
|
|
92
|
+
});
|
|
93
|
+
(0, _vitest.it)('Yolker-as-served-post-merge: Chrome picks COLRv1 over the SVG variant', () => {
|
|
94
|
+
// Mirrors the FD-661 served shape for a merged Yolker FontStyle:
|
|
95
|
+
// dedicated COLRv1 file first, bundled COLRv1+SVG file deduped down to
|
|
96
|
+
// its SVG entry. Chrome supports COLRv1 — picker should select it
|
|
97
|
+
// rather than pinning the SVG file (the bug we're fixing).
|
|
98
|
+
const sources = [woff2({
|
|
99
|
+
url: 'yolker-colrv1.woff2',
|
|
100
|
+
tech: 'COLRv1'
|
|
101
|
+
}), woff2({
|
|
102
|
+
url: 'yolker-bundle.woff2',
|
|
103
|
+
tech: 'SVG'
|
|
104
|
+
})];
|
|
105
|
+
const picked = (0, _fontLoader.selectFontSource)(sources, supports('COLRv1', 'COLRv0', 'SVG'));
|
|
106
|
+
(0, _vitest.expect)(picked === null || picked === void 0 ? void 0 : picked.url).toBe('yolker-colrv1.woff2');
|
|
107
|
+
});
|
|
108
|
+
});
|
|
@@ -27,8 +27,10 @@ const TypeTesterVariableAxes = _ref => {
|
|
|
27
27
|
if (!variableSettings) return null;
|
|
28
28
|
if (!axes) return null;
|
|
29
29
|
const handleChange = (axis, value) => {
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
setVariableSettings({
|
|
31
|
+
...variableSettings,
|
|
32
|
+
[axis]: value
|
|
33
|
+
});
|
|
32
34
|
};
|
|
33
35
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
34
36
|
className: "type-tester__variable-axes"
|
|
@@ -50,14 +52,25 @@ const TypeTesterVariableAxes = _ref => {
|
|
|
50
52
|
} = _ref3;
|
|
51
53
|
const isSmall = Math.abs(maxValue - minValue) <= 1;
|
|
52
54
|
const value = variableSettings[axis];
|
|
55
|
+
const format = v => isSmall ? v.toFixed(2) : v.toFixed(0);
|
|
56
|
+
|
|
57
|
+
// Reserve enough room for the widest value the axis can show so the
|
|
58
|
+
// number changing (e.g. 99 → 100, or a decimal flipping sign) never
|
|
59
|
+
// reflows the slider beside it. The widest string is always at one of
|
|
60
|
+
// the endpoints — most digits plus any minus sign. With tabular
|
|
61
|
+
// figures (tnum, set in CSS) each character is a stable 1ch wide.
|
|
62
|
+
const valueWidth = Math.max(format(minValue).length, format(maxValue).length);
|
|
53
63
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
54
64
|
key: axis,
|
|
55
65
|
className: "type-tester__variable-axes__axis"
|
|
56
66
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
57
67
|
className: "type-tester__variable-axes__name"
|
|
58
68
|
}, name), /*#__PURE__*/_react.default.createElement("span", {
|
|
59
|
-
className: "type-tester__variable-axes__value"
|
|
60
|
-
|
|
69
|
+
className: "type-tester__variable-axes__value",
|
|
70
|
+
style: {
|
|
71
|
+
width: `${valueWidth}ch`
|
|
72
|
+
}
|
|
73
|
+
}, format(value)), /*#__PURE__*/_react.default.createElement("div", {
|
|
61
74
|
className: "type-tester__variable-axes__slider"
|
|
62
75
|
}, /*#__PURE__*/_react.default.createElement(_TypeTesterSlider.default, {
|
|
63
76
|
value: value,
|
|
@@ -20,6 +20,7 @@ var _TypeTesterContent = _interopRequireDefault(require("./TypeTesterContent"));
|
|
|
20
20
|
var _TypeTesterState = _interopRequireDefault(require("./TypeTesterState"));
|
|
21
21
|
var _TypeTesterToolbar = _interopRequireDefault(require("./TypeTesterToolbar"));
|
|
22
22
|
var _TypeTesterVariableAxes = _interopRequireDefault(require("./TypeTesterVariableAxes"));
|
|
23
|
+
var _hooks = require("../../hooks");
|
|
23
24
|
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); }
|
|
24
25
|
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; }
|
|
25
26
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -51,6 +52,12 @@ const TypeTester = _ref => {
|
|
|
51
52
|
const props = (0, _TypeTesterState.default)({
|
|
52
53
|
id
|
|
53
54
|
});
|
|
55
|
+
|
|
56
|
+
// The instance name (e.g. "Regular" → "Custom") is a flex sibling of the
|
|
57
|
+
// inline axis slider, so updating it mid-drag changes its width and shifts
|
|
58
|
+
// the slider. Debounce the value used purely for the name display — the font
|
|
59
|
+
// preview and sliders keep reading the live `props.variableSettings`.
|
|
60
|
+
const nameVariableSettings = (0, _hooks.useDebouncedValue)(props.variableSettings, 200);
|
|
54
61
|
(0, _react.useEffect)(() => {
|
|
55
62
|
if (onFocus && props.focused) onFocus();
|
|
56
63
|
if (onBlur && !props.focused) onBlur();
|
|
@@ -86,7 +93,7 @@ const TypeTester = _ref => {
|
|
|
86
93
|
className: "type-tester__toolbar"
|
|
87
94
|
}, /*#__PURE__*/_react.default.createElement(_TypeTesterStyleSelectData.default, {
|
|
88
95
|
fontStyle: fontStyle,
|
|
89
|
-
variableSettings:
|
|
96
|
+
variableSettings: nameVariableSettings,
|
|
90
97
|
viewer: viewer,
|
|
91
98
|
onSelectFontStyleValue: _ref2 => {
|
|
92
99
|
let {
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
readonly url: string | null;
|
|
4
|
-
readonly format: string | null;
|
|
5
|
-
}
|
|
2
|
+
import { FontSource } from '../fontLoader';
|
|
6
3
|
interface UseFontProps {
|
|
7
4
|
fontFamily: string;
|
|
8
5
|
webfontSources?: ReadonlyArray<FontSource | null> | null;
|
|
@@ -14,7 +14,7 @@ const useFontStyle = _ref => {
|
|
|
14
14
|
let {
|
|
15
15
|
fontStyle: fontStyleKey
|
|
16
16
|
} = _ref;
|
|
17
|
-
const fontStyle = (0, _reactRelay.useFragment)((_useFontStyle_fontStyle2.default.hash && _useFontStyle_fontStyle2.default.hash !== "
|
|
17
|
+
const fontStyle = (0, _reactRelay.useFragment)((_useFontStyle_fontStyle2.default.hash && _useFontStyle_fontStyle2.default.hash !== "df4c7160c29373e86bea8b6082d19994" && console.error("The definition of 'useFontStyle_fontStyle' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _useFontStyle_fontStyle2.default), fontStyleKey ?? null);
|
|
18
18
|
const fontFamily = fontStyle ? `${fontStyle.cssFamily} ${fontStyle.name}` : null;
|
|
19
19
|
const sources = fontStyle === null || fontStyle === void 0 ? void 0 : fontStyle.webfontSources;
|
|
20
20
|
const verticalMetrics = fontStyle === null || fontStyle === void 0 ? void 0 : fontStyle.verticalMetrics;
|
package/dist/fontLoader.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
interface FontSource {
|
|
1
|
+
export interface FontSource {
|
|
2
2
|
readonly url: string | null;
|
|
3
3
|
readonly format: string | null;
|
|
4
|
+
readonly tech?: string | null;
|
|
4
5
|
}
|
|
5
6
|
interface VerticalMetrics {
|
|
6
7
|
readonly unitsPerEm: number;
|
|
@@ -10,4 +11,23 @@ interface VerticalMetrics {
|
|
|
10
11
|
}
|
|
11
12
|
export declare function isFontLoaded(fontFamily: string): boolean;
|
|
12
13
|
export declare function loadFont(fontFamily: string, sources: ReadonlyArray<FontSource | null>, verticalMetrics?: VerticalMetrics | null): Promise<FontFace | null>;
|
|
14
|
+
/**
|
|
15
|
+
* Pick the best `FontSource` for the current browser from a list emitted by
|
|
16
|
+
* the backend's `webfontSources` field.
|
|
17
|
+
*
|
|
18
|
+
* The backend already returns sources in CSS `src:` priority order
|
|
19
|
+
* (dedicated COLRv1 → COLRv0 → SVG → sbix → bundled → outline-fallback,
|
|
20
|
+
* within format). The job here is to drop entries whose color tech the
|
|
21
|
+
* browser can't render — without this, fetching e.g. an SVG-in-OpenType
|
|
22
|
+
* file in Chrome pins a face Chrome can only render as outline.
|
|
23
|
+
*
|
|
24
|
+
* Sources with no `tech` tag are kept unconditionally (outline / universal).
|
|
25
|
+
* If every tech-tagged source is filtered out, falls back to the unfiltered
|
|
26
|
+
* list — the browser will at least try to render something rather than the
|
|
27
|
+
* fallback font.
|
|
28
|
+
*
|
|
29
|
+
* `techSupportCheck` is injectable for tests; defaults to
|
|
30
|
+
* `CSS.supports("font-tech(color-<tech>)")`.
|
|
31
|
+
*/
|
|
32
|
+
export declare function selectFontSource(sources: ReadonlyArray<FontSource | null>, techSupportCheck?: (tech: string) => boolean): FontSource | null;
|
|
13
33
|
export {};
|