fontdue-js 2.15.0 → 2.16.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 CHANGED
@@ -1,3 +1,15 @@
1
+ ## 2.16.0
2
+
3
+ - Adds data-tags attribute to the `TypeTesters`
4
+
5
+ ## 2.15.1
6
+
7
+ - Fixes SSR hydration issues
8
+
9
+ ## 2.15.0
10
+
11
+ - Compatibility with React 19
12
+
1
13
  ## 2.14.0
2
14
 
3
15
  - Adds stripe.appearance to the config
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @generated SignedSource<<f0d878bad3783039c7a23d6aac28d635>>
2
+ * @generated SignedSource<<94b5d191e2d009e3c429a070604ade9a>>
3
3
  * @lightSyntaxTransform
4
4
  * @nogrep
5
5
  */
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  /**
8
- * @generated SignedSource<<f0d878bad3783039c7a23d6aac28d635>>
8
+ * @generated SignedSource<<94b5d191e2d009e3c429a070604ade9a>>
9
9
  * @lightSyntaxTransform
10
10
  * @nogrep
11
11
  */
@@ -518,6 +518,12 @@ const node = function () {
518
518
  "storageKey": null
519
519
  }, v15 /*: any*/],
520
520
  "storageKey": null
521
+ }, {
522
+ "alias": null,
523
+ "args": null,
524
+ "kind": "ScalarField",
525
+ "name": "tags",
526
+ "storageKey": null
521
527
  }],
522
528
  "storageKey": null
523
529
  }],
@@ -553,12 +559,12 @@ const node = function () {
553
559
  }]
554
560
  },
555
561
  "params": {
556
- "cacheID": "1bd04fcecc86c7434859a534427568e7",
562
+ "cacheID": "b76d1b4332733cb59fa65c1a8fe4987b",
557
563
  "id": null,
558
564
  "metadata": {},
559
565
  "name": "TypeTestersIDQuery",
560
566
  "operationKind": "query",
561
- "text": "query TypeTestersIDQuery(\n $collectionId: ID!\n $tags: [String!]\n $excludeTags: [String!]\n $selectable: Boolean!\n) {\n viewer {\n ...TypeTesters_viewer_4g9a6U\n id\n }\n collection: node(id: $collectionId) {\n __typename\n ...TypeTesters_collection_4Goyz5\n id\n }\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n cssFamily\n name\n}\n\nfragment PriceBarSection_node_3BtHDv on FontCollection {\n id\n name\n collectionType\n sku {\n ...SelectButton_sku_3BtHDv\n id\n priceWithLicenseOptions: price(licenseOptions: [], orderVariables: []) {\n ...Price_price\n }\n }\n totalStyles\n totalStylesPrice(licenseOptions: []) {\n ...Price_price\n }\n}\n\nfragment PriceBar_node_3BtHDv on FontCollection {\n ...PriceBarSection_node_3BtHDv\n parent {\n ...PriceBarSection_node_3BtHDv\n id\n }\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment SKUPrice_sku_3BtHDv on Sku {\n id\n price(licenseOptions: [], orderVariables: []) {\n amount\n ...Price_price\n }\n}\n\nfragment SelectButton_sku_3BtHDv on Sku {\n id\n ...SKUPrice_sku_3BtHDv\n}\n\nfragment TypeTesterFeaturesButton_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n}\n\nfragment TypeTesterFeatures_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n}\n\nfragment TypeTesterFloatingToolbar_testers on TypeTester {\n id\n fontStyle {\n ...TypeTesterToolbar_fontStyle\n ...TypeTesterFeatures_fontStyle\n id\n }\n}\n\nfragment TypeTesterStyleSelectData_fontStyle on FontStyle {\n id\n name\n cssWeight\n cssStyle\n cssStretch\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n family {\n name\n id\n }\n}\n\nfragment TypeTesterStyleSelectData_viewer_4g9a6U on Viewer {\n families: fontCollections(collectionTypes: [FAMILY], first: 999) @include(if: $selectable) {\n edges {\n node {\n id\n name\n isVariableFont\n fontStyles {\n id\n name\n cssWeight\n cssStyle\n cssStretch\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n }\n }\n }\n }\n}\n\nfragment TypeTesterToolbar_fontStyle on FontStyle {\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterFeaturesButton_fontStyle\n}\n\nfragment TypeTesterVariableAxes_fontStyle on FontStyle {\n variableAxes {\n axis\n name\n minValue\n maxValue\n }\n}\n\nfragment TypeTester_fontStyle_3BtHDv on FontStyle {\n id\n ...TypeTesterFeatures_fontStyle\n ...TypeTesterStyleSelectData_fontStyle\n ...FontStyle_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterToolbar_fontStyle\n family {\n cssUrl\n id\n }\n sku {\n ...SelectButton_sku_3BtHDv\n ...SKUPrice_sku_3BtHDv\n id\n basePrice: price {\n amount\n }\n }\n}\n\nfragment TypeTester_viewer_4g9a6U on Viewer {\n ...TypeTesterStyleSelectData_viewer_4g9a6U\n}\n\nfragment TypeTesters_collection_4Goyz5 on FontCollection {\n typeTesters(first: 999, tags: $tags, excludeTags: $excludeTags) {\n edges {\n node {\n id\n content\n size\n lineHeight\n letterSpacing\n autofit\n direction\n fontStyle {\n ...TypeTester_fontStyle_3BtHDv\n id\n family {\n id\n }\n }\n variableSettings {\n axis\n value\n }\n featureSettings {\n feature\n value\n }\n ...TypeTesterFloatingToolbar_testers\n }\n }\n }\n typeTesterFeatures\n typeTesterAxes\n id\n ...PriceBar_node_3BtHDv\n families: children(collectionTypes: [FAMILY]) {\n id\n ...PriceBar_node_3BtHDv\n }\n parent {\n id\n }\n}\n\nfragment TypeTesters_viewer_4g9a6U on Viewer {\n ...TypeTester_viewer_4g9a6U\n}\n\nfragment useFeaturesData_fontStyle on FontStyle {\n fontFeatures {\n supportedFeatures\n stylisticSetNames {\n featureName\n humanName\n }\n }\n}\n"
567
+ "text": "query TypeTestersIDQuery(\n $collectionId: ID!\n $tags: [String!]\n $excludeTags: [String!]\n $selectable: Boolean!\n) {\n viewer {\n ...TypeTesters_viewer_4g9a6U\n id\n }\n collection: node(id: $collectionId) {\n __typename\n ...TypeTesters_collection_4Goyz5\n id\n }\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n cssFamily\n name\n}\n\nfragment PriceBarSection_node_3BtHDv on FontCollection {\n id\n name\n collectionType\n sku {\n ...SelectButton_sku_3BtHDv\n id\n priceWithLicenseOptions: price(licenseOptions: [], orderVariables: []) {\n ...Price_price\n }\n }\n totalStyles\n totalStylesPrice(licenseOptions: []) {\n ...Price_price\n }\n}\n\nfragment PriceBar_node_3BtHDv on FontCollection {\n ...PriceBarSection_node_3BtHDv\n parent {\n ...PriceBarSection_node_3BtHDv\n id\n }\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment SKUPrice_sku_3BtHDv on Sku {\n id\n price(licenseOptions: [], orderVariables: []) {\n amount\n ...Price_price\n }\n}\n\nfragment SelectButton_sku_3BtHDv on Sku {\n id\n ...SKUPrice_sku_3BtHDv\n}\n\nfragment TypeTesterFeaturesButton_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n}\n\nfragment TypeTesterFeatures_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n}\n\nfragment TypeTesterFloatingToolbar_testers on TypeTester {\n id\n fontStyle {\n ...TypeTesterToolbar_fontStyle\n ...TypeTesterFeatures_fontStyle\n id\n }\n}\n\nfragment TypeTesterStyleSelectData_fontStyle on FontStyle {\n id\n name\n cssWeight\n cssStyle\n cssStretch\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n family {\n name\n id\n }\n}\n\nfragment TypeTesterStyleSelectData_viewer_4g9a6U on Viewer {\n families: fontCollections(collectionTypes: [FAMILY], first: 999) @include(if: $selectable) {\n edges {\n node {\n id\n name\n isVariableFont\n fontStyles {\n id\n name\n cssWeight\n cssStyle\n cssStretch\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n }\n }\n }\n }\n}\n\nfragment TypeTesterToolbar_fontStyle on FontStyle {\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterFeaturesButton_fontStyle\n}\n\nfragment TypeTesterVariableAxes_fontStyle on FontStyle {\n variableAxes {\n axis\n name\n minValue\n maxValue\n }\n}\n\nfragment TypeTester_fontStyle_3BtHDv on FontStyle {\n id\n ...TypeTesterFeatures_fontStyle\n ...TypeTesterStyleSelectData_fontStyle\n ...FontStyle_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterToolbar_fontStyle\n family {\n cssUrl\n id\n }\n sku {\n ...SelectButton_sku_3BtHDv\n ...SKUPrice_sku_3BtHDv\n id\n basePrice: price {\n amount\n }\n }\n}\n\nfragment TypeTester_viewer_4g9a6U on Viewer {\n ...TypeTesterStyleSelectData_viewer_4g9a6U\n}\n\nfragment TypeTesters_collection_4Goyz5 on FontCollection {\n typeTesters(first: 999, tags: $tags, excludeTags: $excludeTags) {\n edges {\n node {\n id\n content\n size\n lineHeight\n letterSpacing\n autofit\n direction\n fontStyle {\n ...TypeTester_fontStyle_3BtHDv\n id\n family {\n id\n }\n }\n variableSettings {\n axis\n value\n }\n featureSettings {\n feature\n value\n }\n 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"
562
568
  }
563
569
  };
564
570
  }();
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @generated SignedSource<<d7dfeb9b63f530f7188702c279aa090e>>
2
+ * @generated SignedSource<<20a5cba73c3c7720810ea0fe15e6b4f2>>
3
3
  * @lightSyntaxTransform
4
4
  * @nogrep
5
5
  */
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  /**
8
- * @generated SignedSource<<d7dfeb9b63f530f7188702c279aa090e>>
8
+ * @generated SignedSource<<20a5cba73c3c7720810ea0fe15e6b4f2>>
9
9
  * @lightSyntaxTransform
10
10
  * @nogrep
11
11
  */
@@ -441,6 +441,12 @@ const node = function () {
441
441
  "storageKey": null
442
442
  }, v13 /*: any*/],
443
443
  "storageKey": null
444
+ }, {
445
+ "alias": null,
446
+ "args": null,
447
+ "kind": "ScalarField",
448
+ "name": "tags",
449
+ "storageKey": null
444
450
  }],
445
451
  "storageKey": null
446
452
  }],
@@ -480,15 +486,15 @@ const node = function () {
480
486
  }]
481
487
  },
482
488
  "params": {
483
- "cacheID": "7707201442bb1c24b64bf1714d8a385e",
489
+ "cacheID": "af929eba890f273bb737138085843f46",
484
490
  "id": null,
485
491
  "metadata": {},
486
492
  "name": "TypeTestersRefetchQuery",
487
493
  "operationKind": "query",
488
- "text": "query TypeTestersRefetchQuery(\n $excludeTags: [String!] = null\n $licenseOptions: [LicenseOptionsSpec] = []\n $orderVariables: [OrderVariableSelectionInput!] = []\n $tags: [String!] = null\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...TypeTesters_collection_32it0Z\n id\n }\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n cssFamily\n name\n}\n\nfragment PriceBarSection_node_4sncub on FontCollection {\n id\n name\n collectionType\n sku {\n ...SelectButton_sku_4sncub\n id\n priceWithLicenseOptions: price(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n ...Price_price\n }\n }\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions) {\n ...Price_price\n }\n}\n\nfragment PriceBar_node_4sncub on FontCollection {\n ...PriceBarSection_node_4sncub\n parent {\n ...PriceBarSection_node_4sncub\n id\n }\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment SKUPrice_sku_4sncub on Sku {\n id\n price(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n ...Price_price\n }\n}\n\nfragment SelectButton_sku_4sncub on Sku {\n id\n ...SKUPrice_sku_4sncub\n}\n\nfragment TypeTesterFeaturesButton_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n}\n\nfragment TypeTesterFeatures_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n}\n\nfragment TypeTesterFloatingToolbar_testers on TypeTester {\n id\n fontStyle {\n ...TypeTesterToolbar_fontStyle\n ...TypeTesterFeatures_fontStyle\n id\n }\n}\n\nfragment TypeTesterStyleSelectData_fontStyle on FontStyle {\n id\n name\n cssWeight\n cssStyle\n cssStretch\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n family {\n name\n id\n }\n}\n\nfragment TypeTesterToolbar_fontStyle on FontStyle {\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterFeaturesButton_fontStyle\n}\n\nfragment TypeTesterVariableAxes_fontStyle on FontStyle {\n variableAxes {\n axis\n name\n minValue\n maxValue\n }\n}\n\nfragment TypeTester_fontStyle_4sncub on FontStyle {\n id\n ...TypeTesterFeatures_fontStyle\n ...TypeTesterStyleSelectData_fontStyle\n ...FontStyle_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterToolbar_fontStyle\n family {\n cssUrl\n id\n }\n sku {\n ...SelectButton_sku_4sncub\n ...SKUPrice_sku_4sncub\n id\n basePrice: price {\n amount\n }\n }\n}\n\nfragment TypeTesters_collection_32it0Z on FontCollection {\n typeTesters(first: 999, tags: $tags, excludeTags: $excludeTags) {\n edges {\n node {\n id\n content\n size\n lineHeight\n letterSpacing\n autofit\n direction\n fontStyle {\n ...TypeTester_fontStyle_4sncub\n id\n family {\n id\n }\n }\n variableSettings {\n axis\n value\n }\n featureSettings {\n feature\n value\n }\n ...TypeTesterFloatingToolbar_testers\n }\n }\n }\n typeTesterFeatures\n typeTesterAxes\n id\n ...PriceBar_node_4sncub\n families: children(collectionTypes: [FAMILY]) {\n id\n ...PriceBar_node_4sncub\n }\n parent {\n id\n }\n}\n\nfragment useFeaturesData_fontStyle on FontStyle {\n fontFeatures {\n supportedFeatures\n stylisticSetNames {\n featureName\n humanName\n }\n }\n}\n"
494
+ "text": "query TypeTestersRefetchQuery(\n $excludeTags: [String!] = null\n $licenseOptions: [LicenseOptionsSpec] = []\n $orderVariables: [OrderVariableSelectionInput!] = []\n $tags: [String!] = null\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...TypeTesters_collection_32it0Z\n id\n }\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n cssFamily\n name\n}\n\nfragment PriceBarSection_node_4sncub on FontCollection {\n id\n name\n collectionType\n sku {\n ...SelectButton_sku_4sncub\n id\n priceWithLicenseOptions: price(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n ...Price_price\n }\n }\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions) {\n ...Price_price\n }\n}\n\nfragment PriceBar_node_4sncub on FontCollection {\n ...PriceBarSection_node_4sncub\n parent {\n ...PriceBarSection_node_4sncub\n id\n }\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment SKUPrice_sku_4sncub on Sku {\n id\n price(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n ...Price_price\n }\n}\n\nfragment SelectButton_sku_4sncub on Sku {\n id\n ...SKUPrice_sku_4sncub\n}\n\nfragment TypeTesterFeaturesButton_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n}\n\nfragment TypeTesterFeatures_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n}\n\nfragment TypeTesterFloatingToolbar_testers on TypeTester {\n id\n fontStyle {\n ...TypeTesterToolbar_fontStyle\n ...TypeTesterFeatures_fontStyle\n id\n }\n}\n\nfragment TypeTesterStyleSelectData_fontStyle on FontStyle {\n id\n name\n cssWeight\n cssStyle\n cssStretch\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n family {\n name\n id\n }\n}\n\nfragment TypeTesterToolbar_fontStyle on FontStyle {\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterFeaturesButton_fontStyle\n}\n\nfragment TypeTesterVariableAxes_fontStyle on FontStyle {\n variableAxes {\n axis\n name\n minValue\n maxValue\n }\n}\n\nfragment TypeTester_fontStyle_4sncub on FontStyle {\n id\n ...TypeTesterFeatures_fontStyle\n ...TypeTesterStyleSelectData_fontStyle\n ...FontStyle_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterToolbar_fontStyle\n family {\n cssUrl\n id\n }\n sku {\n ...SelectButton_sku_4sncub\n ...SKUPrice_sku_4sncub\n id\n basePrice: price {\n amount\n }\n }\n}\n\nfragment TypeTesters_collection_32it0Z on FontCollection {\n typeTesters(first: 999, tags: $tags, excludeTags: $excludeTags) {\n edges {\n node {\n id\n content\n size\n lineHeight\n letterSpacing\n autofit\n direction\n fontStyle {\n ...TypeTester_fontStyle_4sncub\n id\n family {\n id\n }\n }\n variableSettings {\n axis\n value\n }\n featureSettings {\n feature\n value\n }\n 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"
489
495
  }
490
496
  };
491
497
  }();
492
- node.hash = "6f88c9b86f2c60ecc35f1be282b3ee50";
498
+ node.hash = "0f8422550dd500368594bfedc5f58bf4";
493
499
  var _default = node;
494
500
  exports.default = _default;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @generated SignedSource<<e592966b3436eb5abe53b64294ed9796>>
2
+ * @generated SignedSource<<336fbf3445bf08b7ba432f258245a31f>>
3
3
  * @lightSyntaxTransform
4
4
  * @nogrep
5
5
  */
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  /**
8
- * @generated SignedSource<<e592966b3436eb5abe53b64294ed9796>>
8
+ * @generated SignedSource<<336fbf3445bf08b7ba432f258245a31f>>
9
9
  * @lightSyntaxTransform
10
10
  * @nogrep
11
11
  */
@@ -524,6 +524,12 @@ const node = function () {
524
524
  "storageKey": null
525
525
  }, v15 /*: any*/],
526
526
  "storageKey": null
527
+ }, {
528
+ "alias": null,
529
+ "args": null,
530
+ "kind": "ScalarField",
531
+ "name": "tags",
532
+ "storageKey": null
527
533
  }],
528
534
  "storageKey": null
529
535
  }],
@@ -560,12 +566,12 @@ const node = function () {
560
566
  }]
561
567
  },
562
568
  "params": {
563
- "cacheID": "6642607e781f3a02be23b132955cb71d",
569
+ "cacheID": "51eebc5e6173227dc8993607cbb18eed",
564
570
  "id": null,
565
571
  "metadata": {},
566
572
  "name": "TypeTestersSlugQuery",
567
573
  "operationKind": "query",
568
- "text": "query TypeTestersSlugQuery(\n $collectionSlug: String!\n $tags: [String!]\n $excludeTags: [String!]\n $selectable: Boolean!\n) {\n viewer {\n ...TypeTesters_viewer_4g9a6U\n slug(name: $collectionSlug) {\n collection: fontCollection {\n ...TypeTesters_collection_4Goyz5\n id\n }\n id\n }\n id\n }\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n cssFamily\n name\n}\n\nfragment PriceBarSection_node_3BtHDv on FontCollection {\n id\n name\n collectionType\n sku {\n ...SelectButton_sku_3BtHDv\n id\n priceWithLicenseOptions: price(licenseOptions: [], orderVariables: []) {\n ...Price_price\n }\n }\n totalStyles\n totalStylesPrice(licenseOptions: []) {\n ...Price_price\n }\n}\n\nfragment PriceBar_node_3BtHDv on FontCollection {\n ...PriceBarSection_node_3BtHDv\n parent {\n ...PriceBarSection_node_3BtHDv\n id\n }\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment SKUPrice_sku_3BtHDv on Sku {\n id\n price(licenseOptions: [], orderVariables: []) {\n amount\n ...Price_price\n }\n}\n\nfragment SelectButton_sku_3BtHDv on Sku {\n id\n ...SKUPrice_sku_3BtHDv\n}\n\nfragment TypeTesterFeaturesButton_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n}\n\nfragment TypeTesterFeatures_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n}\n\nfragment TypeTesterFloatingToolbar_testers on TypeTester {\n id\n fontStyle {\n ...TypeTesterToolbar_fontStyle\n ...TypeTesterFeatures_fontStyle\n id\n }\n}\n\nfragment TypeTesterStyleSelectData_fontStyle on FontStyle {\n id\n name\n cssWeight\n cssStyle\n cssStretch\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n family {\n name\n id\n }\n}\n\nfragment TypeTesterStyleSelectData_viewer_4g9a6U on Viewer {\n families: fontCollections(collectionTypes: [FAMILY], first: 999) @include(if: $selectable) {\n edges {\n node {\n id\n name\n isVariableFont\n fontStyles {\n id\n name\n cssWeight\n cssStyle\n cssStretch\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n }\n }\n }\n }\n}\n\nfragment TypeTesterToolbar_fontStyle on FontStyle {\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterFeaturesButton_fontStyle\n}\n\nfragment TypeTesterVariableAxes_fontStyle on FontStyle {\n variableAxes {\n axis\n name\n minValue\n maxValue\n }\n}\n\nfragment TypeTester_fontStyle_3BtHDv on FontStyle {\n id\n ...TypeTesterFeatures_fontStyle\n ...TypeTesterStyleSelectData_fontStyle\n ...FontStyle_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterToolbar_fontStyle\n family {\n cssUrl\n id\n }\n sku {\n ...SelectButton_sku_3BtHDv\n ...SKUPrice_sku_3BtHDv\n id\n basePrice: price {\n amount\n }\n }\n}\n\nfragment TypeTester_viewer_4g9a6U on Viewer {\n ...TypeTesterStyleSelectData_viewer_4g9a6U\n}\n\nfragment TypeTesters_collection_4Goyz5 on FontCollection {\n typeTesters(first: 999, tags: $tags, excludeTags: $excludeTags) {\n edges {\n node {\n id\n content\n size\n lineHeight\n letterSpacing\n autofit\n direction\n fontStyle {\n ...TypeTester_fontStyle_3BtHDv\n id\n family {\n id\n }\n }\n variableSettings {\n axis\n value\n }\n featureSettings {\n feature\n value\n }\n ...TypeTesterFloatingToolbar_testers\n }\n }\n }\n typeTesterFeatures\n typeTesterAxes\n id\n ...PriceBar_node_3BtHDv\n families: children(collectionTypes: [FAMILY]) {\n id\n ...PriceBar_node_3BtHDv\n }\n parent {\n id\n }\n}\n\nfragment TypeTesters_viewer_4g9a6U on Viewer {\n ...TypeTester_viewer_4g9a6U\n}\n\nfragment useFeaturesData_fontStyle on FontStyle {\n fontFeatures {\n supportedFeatures\n stylisticSetNames {\n featureName\n humanName\n }\n }\n}\n"
574
+ "text": "query TypeTestersSlugQuery(\n $collectionSlug: String!\n $tags: [String!]\n $excludeTags: [String!]\n $selectable: Boolean!\n) {\n viewer {\n ...TypeTesters_viewer_4g9a6U\n slug(name: $collectionSlug) {\n collection: fontCollection {\n ...TypeTesters_collection_4Goyz5\n id\n }\n id\n }\n id\n }\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n cssFamily\n name\n}\n\nfragment PriceBarSection_node_3BtHDv on FontCollection {\n id\n name\n collectionType\n sku {\n ...SelectButton_sku_3BtHDv\n id\n priceWithLicenseOptions: price(licenseOptions: [], orderVariables: []) {\n ...Price_price\n }\n }\n totalStyles\n totalStylesPrice(licenseOptions: []) {\n ...Price_price\n }\n}\n\nfragment PriceBar_node_3BtHDv on FontCollection {\n ...PriceBarSection_node_3BtHDv\n parent {\n ...PriceBarSection_node_3BtHDv\n id\n }\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment SKUPrice_sku_3BtHDv on Sku {\n id\n price(licenseOptions: [], orderVariables: []) {\n amount\n ...Price_price\n }\n}\n\nfragment SelectButton_sku_3BtHDv on Sku {\n id\n ...SKUPrice_sku_3BtHDv\n}\n\nfragment TypeTesterFeaturesButton_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n}\n\nfragment TypeTesterFeatures_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n}\n\nfragment TypeTesterFloatingToolbar_testers on TypeTester {\n id\n fontStyle {\n ...TypeTesterToolbar_fontStyle\n ...TypeTesterFeatures_fontStyle\n id\n }\n}\n\nfragment TypeTesterStyleSelectData_fontStyle on FontStyle {\n id\n name\n cssWeight\n cssStyle\n cssStretch\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n family {\n name\n id\n }\n}\n\nfragment TypeTesterStyleSelectData_viewer_4g9a6U on Viewer {\n families: fontCollections(collectionTypes: [FAMILY], first: 999) @include(if: $selectable) {\n edges {\n node {\n id\n name\n isVariableFont\n fontStyles {\n id\n name\n cssWeight\n cssStyle\n cssStretch\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n }\n }\n }\n }\n}\n\nfragment TypeTesterToolbar_fontStyle on FontStyle {\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterFeaturesButton_fontStyle\n}\n\nfragment TypeTesterVariableAxes_fontStyle on FontStyle {\n variableAxes {\n axis\n name\n minValue\n maxValue\n }\n}\n\nfragment TypeTester_fontStyle_3BtHDv on FontStyle {\n id\n ...TypeTesterFeatures_fontStyle\n ...TypeTesterStyleSelectData_fontStyle\n ...FontStyle_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterToolbar_fontStyle\n family {\n cssUrl\n id\n }\n sku {\n ...SelectButton_sku_3BtHDv\n ...SKUPrice_sku_3BtHDv\n id\n basePrice: price {\n amount\n }\n }\n}\n\nfragment TypeTester_viewer_4g9a6U on Viewer {\n ...TypeTesterStyleSelectData_viewer_4g9a6U\n}\n\nfragment TypeTesters_collection_4Goyz5 on FontCollection {\n typeTesters(first: 999, tags: $tags, excludeTags: $excludeTags) {\n edges {\n node {\n id\n content\n size\n lineHeight\n letterSpacing\n autofit\n direction\n fontStyle {\n ...TypeTester_fontStyle_3BtHDv\n id\n family {\n id\n }\n }\n variableSettings {\n axis\n value\n }\n featureSettings {\n feature\n value\n }\n 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"
569
575
  }
570
576
  };
571
577
  }();
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @generated SignedSource<<842ed9fbeaf4b40cce7e057fedf65418>>
2
+ * @generated SignedSource<<75efdd64f4cf6c5d2378da307264aa2c>>
3
3
  * @lightSyntaxTransform
4
4
  * @nogrep
5
5
  */
@@ -37,6 +37,7 @@ export type TypeTesters_collection$data = {
37
37
  readonly letterSpacing: string | null;
38
38
  readonly lineHeight: string | null;
39
39
  readonly size: string | null;
40
+ readonly tags: ReadonlyArray<string> | null;
40
41
  readonly variableSettings: ReadonlyArray<{
41
42
  readonly axis: string;
42
43
  readonly value: number;
@@ -7,7 +7,7 @@ exports.default = void 0;
7
7
  var _TypeTestersRefetchQuery = _interopRequireDefault(require("./TypeTestersRefetchQuery.graphql"));
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
9
  /**
10
- * @generated SignedSource<<842ed9fbeaf4b40cce7e057fedf65418>>
10
+ * @generated SignedSource<<75efdd64f4cf6c5d2378da307264aa2c>>
11
11
  * @lightSyntaxTransform
12
12
  * @nogrep
13
13
  */
@@ -198,6 +198,12 @@ const node = function () {
198
198
  "storageKey": null
199
199
  }, v3 /*: any*/],
200
200
  "storageKey": null
201
+ }, {
202
+ "alias": null,
203
+ "args": null,
204
+ "kind": "ScalarField",
205
+ "name": "tags",
206
+ "storageKey": null
201
207
  }, {
202
208
  "args": null,
203
209
  "kind": "FragmentSpread",
@@ -247,6 +253,6 @@ const node = function () {
247
253
  "abstractKey": null
248
254
  };
249
255
  }();
250
- node.hash = "6f88c9b86f2c60ecc35f1be282b3ee50";
256
+ node.hash = "0f8422550dd500368594bfedc5f58bf4";
251
257
  var _default = node;
252
258
  exports.default = _default;
@@ -33,13 +33,20 @@ function useSize() {
33
33
  if (!ref.current) return;
34
34
  setSize(ref.current.getBoundingClientRect());
35
35
  }, [ref]);
36
- (0, _resizeObserver.default)(ref, entry => setSize(entry.contentRect));
36
+ (0, _resizeObserver.default)(ref, entry => setSize(entry.contentRect), {
37
+ polyfill: typeof window === 'undefined' ? ServerSideResizeObserverPolyfill : null
38
+ });
37
39
  return {
38
40
  ref,
39
41
  width: size === null || size === void 0 ? void 0 : size.width,
40
42
  height: size === null || size === void 0 ? void 0 : size.height
41
43
  };
42
44
  }
45
+ class ServerSideResizeObserverPolyfill {
46
+ constructor(_callback) {}
47
+ observe(_target, _options) {}
48
+ unobserve(_target) {}
49
+ }
43
50
  function Character(props) {
44
51
  const ref = (0, _react.useRef)(null);
45
52
  const [size, setSize] = (0, _react.useState)(1);
@@ -47,6 +54,8 @@ function Character(props) {
47
54
  if (entry.target.scrollWidth > entry.target.clientWidth) {
48
55
  setSize(size + 1);
49
56
  }
57
+ }, {
58
+ polyfill: typeof window === 'undefined' ? ServerSideResizeObserverPolyfill : null
50
59
  });
51
60
  return /*#__PURE__*/_react.default.createElement("div", _extends({
52
61
  ref: ref
@@ -64,6 +64,7 @@ interface TypeTesterProps extends TypeTesterBaseProps {
64
64
  fontStyle: TypeTester_fontStyle$key | null;
65
65
  viewer: TypeTester_viewer$key;
66
66
  onStyleSelect: (fontStyleId: string) => void;
67
+ tags?: readonly string[] | null;
67
68
  isLoading?: boolean;
68
69
  }
69
70
  declare const TypeTester: React.FunctionComponent<TypeTesterProps>;
@@ -31,6 +31,7 @@ const TypeTester = _ref => {
31
31
  productId,
32
32
  fontStyle: fontStyleKey,
33
33
  viewer: viewerKey,
34
+ tags,
34
35
  onFocus,
35
36
  onBlur,
36
37
  features,
@@ -78,7 +79,8 @@ const TypeTester = _ref => {
78
79
  "data-shy": config.shy,
79
80
  "data-select-button-style": config.selectButtonStyle,
80
81
  "data-alignment": props.alignment,
81
- "data-loading": isLoading
82
+ "data-loading": isLoading,
83
+ "data-tags": tags === null || tags === void 0 ? void 0 : tags.join(' ')
82
84
  }, axesPosition === 'above' ? /*#__PURE__*/_react.default.createElement(_TypeTesterVariableAxes.default, {
83
85
  id: id,
84
86
  axes: axes,
@@ -7,8 +7,8 @@ export interface TypeTesters_props {
7
7
  collectionSlug?: string;
8
8
  defaultMode?: 'group' | 'local';
9
9
  autofit?: boolean;
10
- tags?: string[];
11
- excludeTags?: string[];
10
+ tags?: string[] | null;
11
+ excludeTags?: string[] | null;
12
12
  onFocus?: () => void;
13
13
  onBlur?: () => void;
14
14
  onToolbarOpenClose?: (open: boolean) => void;
@@ -80,7 +80,7 @@ function TypeTestersComponent(_ref) {
80
80
  licenseOptionsSpecs,
81
81
  orderVariableSelections
82
82
  } = (0, _useLicenseAndOrderVariables.useLicenseAndOrderVariables)();
83
- const [collection, refetch] = (0, _reactRelay.useRefetchableFragment)((_TypeTesters_collection2.default.hash && _TypeTesters_collection2.default.hash !== "6f88c9b86f2c60ecc35f1be282b3ee50" && console.error("The definition of 'TypeTesters_collection' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _TypeTesters_collection2.default), collectionKey);
83
+ const [collection, refetch] = (0, _reactRelay.useRefetchableFragment)((_TypeTesters_collection2.default.hash && _TypeTesters_collection2.default.hash !== "0f8422550dd500368594bfedc5f58bf4" && console.error("The definition of 'TypeTesters_collection' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _TypeTesters_collection2.default), collectionKey);
84
84
  const handleStyleSelect = (0, _react.useCallback)((testerId, fontStyleId) => {
85
85
  const newChangedStyles = {
86
86
  ...changedStyles,
@@ -181,7 +181,8 @@ function TypeTestersComponent(_ref) {
181
181
  productId: productId,
182
182
  features: collection.typeTesterFeatures,
183
183
  axes: collection.typeTesterAxes,
184
- viewer: viewer
184
+ viewer: viewer,
185
+ tags: node.tags
185
186
  }));
186
187
  }));
187
188
  }));
@@ -15,8 +15,8 @@ async function TypeTesters(_ref) {
15
15
  let {
16
16
  collectionId,
17
17
  collectionSlug,
18
- tags,
19
- excludeTags,
18
+ tags = null,
19
+ excludeTags = null,
20
20
  ...rest
21
21
  } = _ref;
22
22
  if (collectionId) {
@@ -30,7 +30,11 @@ function createNetworkFetch(options) {
30
30
  body: JSON.stringify({
31
31
  query: request.text,
32
32
  variables
33
- })
33
+ }),
34
+ // @ts-ignore
35
+ next: {
36
+ tags: ['graphql', `operation:${request.name}`]
37
+ }
34
38
  });
35
39
  const json = await resp.json();
36
40
 
@@ -4,4 +4,44 @@ export interface SerializablePreloadedQuery<TQuery extends OperationType> {
4
4
  variables: VariablesOf<TQuery>;
5
5
  response: GraphQLResponse;
6
6
  }
7
- export default function loadSerializableQuery<TQuery extends OperationType>(query: GraphQLTaggedNode, variables: VariablesOf<TQuery>): Promise<SerializablePreloadedQuery<TQuery>>;
7
+ /**
8
+ * RELAY CACHE KEY NORMALIZATION
9
+ *
10
+ * This type transformation is required to fix a cache key inconsistency issue in Relay.
11
+ *
12
+ * THE PROBLEM:
13
+ * Relay's `getOperationVariables()` function always includes ALL argumentDefinitions
14
+ * from the GraphQL operation, even optional ones, setting them to their defaultValue
15
+ * (typically null). This means when Relay generates cache keys, it creates entries like:
16
+ *
17
+ * Cache Key A: { collectionId: "123", tags: null, excludeTags: null, selectable: true }
18
+ * Cache Key B: { collectionId: "123", selectable: true } // when optional vars omitted
19
+ *
20
+ * Even though these represent the same logical query, they produce different cache keys
21
+ * because `JSON.stringify(stableCopy(variables))` serializes them differently.
22
+ *
23
+ * (This is possibly caused by NextJS RSC data serialization and hydration)
24
+ *
25
+ * THE ROOT CAUSE:
26
+ * - GraphQL schema defines: `$tags: [String!], $excludeTags: [String!]` (optional)
27
+ * - TypeScript generates: `tags?: ReadonlyArray<string> | null`
28
+ * - Relay's argumentDefinitions include: `{ name: "tags", defaultValue: null }`
29
+ * - getOperationVariables() always sets: `operationVariables[def.name] = def.defaultValue`
30
+ *
31
+ * THE SOLUTION:
32
+ * RequireAllWithNull<T> transforms optional properties to required properties with
33
+ * explicit null values, forcing callers to be consistent. This ensures server-side
34
+ * preloaded queries and client-side cache lookups use identical variable structures.
35
+ *
36
+ * USAGE:
37
+ * Instead of: { tags, excludeTags } // undefined values
38
+ * Use: { tags: tags ?? null, excludeTags: excludeTags ?? null } // explicit nulls
39
+ *
40
+ * This eliminates cache misses caused by variable structure inconsistencies between
41
+ * server-side rendering and client-side Relay operations.
42
+ */
43
+ type RequireAllWithNull<T> = {
44
+ [K in keyof T]-?: T[K] | null;
45
+ };
46
+ export default function loadSerializableQuery<TQuery extends OperationType>(query: GraphQLTaggedNode, variables: RequireAllWithNull<VariablesOf<TQuery>>): Promise<SerializablePreloadedQuery<TQuery>>;
47
+ export {};
@@ -5,6 +5,43 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = loadSerializableQuery;
7
7
  var _environment = require("./environment");
8
+ /**
9
+ * RELAY CACHE KEY NORMALIZATION
10
+ *
11
+ * This type transformation is required to fix a cache key inconsistency issue in Relay.
12
+ *
13
+ * THE PROBLEM:
14
+ * Relay's `getOperationVariables()` function always includes ALL argumentDefinitions
15
+ * from the GraphQL operation, even optional ones, setting them to their defaultValue
16
+ * (typically null). This means when Relay generates cache keys, it creates entries like:
17
+ *
18
+ * Cache Key A: { collectionId: "123", tags: null, excludeTags: null, selectable: true }
19
+ * Cache Key B: { collectionId: "123", selectable: true } // when optional vars omitted
20
+ *
21
+ * Even though these represent the same logical query, they produce different cache keys
22
+ * because `JSON.stringify(stableCopy(variables))` serializes them differently.
23
+ *
24
+ * (This is possibly caused by NextJS RSC data serialization and hydration)
25
+ *
26
+ * THE ROOT CAUSE:
27
+ * - GraphQL schema defines: `$tags: [String!], $excludeTags: [String!]` (optional)
28
+ * - TypeScript generates: `tags?: ReadonlyArray<string> | null`
29
+ * - Relay's argumentDefinitions include: `{ name: "tags", defaultValue: null }`
30
+ * - getOperationVariables() always sets: `operationVariables[def.name] = def.defaultValue`
31
+ *
32
+ * THE SOLUTION:
33
+ * RequireAllWithNull<T> transforms optional properties to required properties with
34
+ * explicit null values, forcing callers to be consistent. This ensures server-side
35
+ * preloaded queries and client-side cache lookups use identical variable structures.
36
+ *
37
+ * USAGE:
38
+ * Instead of: { tags, excludeTags } // undefined values
39
+ * Use: { tags: tags ?? null, excludeTags: excludeTags ?? null } // explicit nulls
40
+ *
41
+ * This eliminates cache misses caused by variable structure inconsistencies between
42
+ * server-side rendering and client-side Relay operations.
43
+ */
44
+
8
45
  // Call into raw network fetch to get serializable GraphQL query response
9
46
  // This response will be sent to the client to "warm" the QueryResponseCache
10
47
  // to avoid the client fetches.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fontdue-js",
3
- "version": "2.15.0",
3
+ "version": "2.16.0",
4
4
  "scripts": {
5
5
  "build": "npm run relay && run-p build-js build-css build-ts",
6
6
  "build-js": "babel src --out-dir dist --extensions .ts,.tsx,.js,.jsx",
@@ -30,9 +30,9 @@
30
30
  "react-device-detect": "^2.2.3",
31
31
  "react-error-boundary": "^4.1.2",
32
32
  "react-redux": "^9",
33
- "react-relay": "^19.0.0",
33
+ "react-relay": "^20.0.0",
34
34
  "redux": "^5.0.0",
35
- "relay-runtime": "^19.0.0",
35
+ "relay-runtime": "^20.0.0",
36
36
  "store": "^2.0.12",
37
37
  "uuid": "^8.3.2"
38
38
  },
@@ -44,10 +44,11 @@
44
44
  "@babel/preset-typescript": "^7.18.0",
45
45
  "@types/draft-js": "^0.10.44",
46
46
  "@types/fontfaceobserver": "^2.1.0",
47
+ "@types/node": "^24.1.0",
47
48
  "@types/react": "19.0.0",
48
49
  "@types/react-dom": "19.0.0",
49
- "@types/react-relay": "^16.0.0",
50
- "@types/relay-runtime": "^17.0.0",
50
+ "@types/react-relay": "^18.0.0",
51
+ "@types/relay-runtime": "^19.0.0",
51
52
  "@types/uuid": "^8.3.3",
52
53
  "babel-plugin-relay": "^18.0.0",
53
54
  "npm-run-all": "^4.1.5",