fontdue-js 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/__generated__/TypeTesterFeatures_fontStyle.graphql.d.ts +1 -7
  3. package/dist/__generated__/TypeTesterFeatures_fontStyle.graphql.js +3 -35
  4. package/dist/__generated__/TypeTesterFloatingToolbar_testers.graphql.d.ts +1 -1
  5. package/dist/__generated__/TypeTesterFloatingToolbar_testers.graphql.js +5 -1
  6. package/dist/__generated__/TypeTester_StyleQuery.graphql.js +14 -9
  7. package/dist/__generated__/TypeTester_fontStyle.graphql.d.ts +1 -1
  8. package/dist/__generated__/TypeTester_fontStyle.graphql.js +5 -1
  9. package/dist/__generated__/TypeTestersIDQuery.graphql.js +14 -9
  10. package/dist/__generated__/TypeTestersSlugQuery.graphql.js +14 -9
  11. package/dist/__generated__/useFeaturesData_fontStyle.graphql.d.ts +19 -0
  12. package/dist/__generated__/useFeaturesData_fontStyle.graphql.js +59 -0
  13. package/dist/components/CharacterViewer/index.js +4 -4
  14. package/dist/components/ConfigContext.d.ts +22 -4
  15. package/dist/components/ConfigContext.js +15 -6
  16. package/dist/components/SKUPrice/index.js +6 -5
  17. package/dist/components/TypeTester/TypeTesterFeatures.d.ts +1 -1
  18. package/dist/components/TypeTester/TypeTesterFeatures.js +21 -36
  19. package/dist/components/TypeTester/TypeTesterFeaturesButton.d.ts +4 -3
  20. package/dist/components/TypeTester/TypeTesterFeaturesButton.js +71 -14
  21. package/dist/components/TypeTester/TypeTesterFloatingToolbar.js +5 -7
  22. package/dist/components/TypeTester/TypeTesterSlider.d.ts +1 -0
  23. package/dist/components/TypeTester/TypeTesterSlider.js +2 -1
  24. package/dist/components/TypeTester/TypeTesterStandalone.js +1 -4
  25. package/dist/components/TypeTester/TypeTesterState.d.ts +1 -0
  26. package/dist/components/TypeTester/TypeTesterState.js +7 -0
  27. package/dist/components/TypeTester/TypeTesterToolbar.d.ts +3 -0
  28. package/dist/components/TypeTester/TypeTesterToolbar.js +27 -8
  29. package/dist/components/TypeTester/index.d.ts +12 -1
  30. package/dist/components/TypeTester/index.js +26 -12
  31. package/dist/components/TypeTester/useFeaturesData.d.ts +19 -0
  32. package/dist/components/TypeTester/useFeaturesData.js +51 -0
  33. package/fontdue.css +31 -3
  34. package/fontdue.css.map +1 -1
  35. package/package.json +1 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,16 @@
1
+ ## 1.1.0
2
+
3
+ - Added `interactionStyle` config for type tester OT features with a new `select` option
4
+ - Added `lineHeight` config to type tester
5
+ - The size slider now has a "Size" label which can be customized or disabled
6
+ - Fixed an issue where some component updates were causing excessive graphql requests
7
+ - Fixed CharacterViewer component for fonts with no GSUB glyphs
8
+ - Adjusted default type tester styles for better spacing and mobile defaults
9
+
10
+ ## 1.0.1
11
+
12
+ - Fixed an issue with Select component spacing
13
+
14
+ ## 1.0.0
15
+
16
+ - Initial release
@@ -1,13 +1,7 @@
1
1
  import { ReaderFragment } from "relay-runtime";
2
2
  import { FragmentRefs } from "relay-runtime";
3
3
  export declare type TypeTesterFeatures_fontStyle = {
4
- readonly fontFeatures: {
5
- readonly supportedFeatures: ReadonlyArray<string>;
6
- readonly stylisticSetNames: ReadonlyArray<{
7
- readonly featureName: string;
8
- readonly humanName: string;
9
- }>;
10
- };
4
+ readonly " $fragmentRefs": FragmentRefs<"useFeaturesData_fontStyle">;
11
5
  readonly " $refType": "TypeTesterFeatures_fontStyle";
12
6
  };
13
7
  export declare type TypeTesterFeatures_fontStyle$data = TypeTesterFeatures_fontStyle;
@@ -15,45 +15,13 @@ const node = {
15
15
  "metadata": null,
16
16
  "name": "TypeTesterFeatures_fontStyle",
17
17
  "selections": [{
18
- "alias": null,
19
18
  "args": null,
20
- "concreteType": "FontFeatures",
21
- "kind": "LinkedField",
22
- "name": "fontFeatures",
23
- "plural": false,
24
- "selections": [{
25
- "alias": null,
26
- "args": null,
27
- "kind": "ScalarField",
28
- "name": "supportedFeatures",
29
- "storageKey": null
30
- }, {
31
- "alias": null,
32
- "args": null,
33
- "concreteType": "StylisticSetName",
34
- "kind": "LinkedField",
35
- "name": "stylisticSetNames",
36
- "plural": true,
37
- "selections": [{
38
- "alias": null,
39
- "args": null,
40
- "kind": "ScalarField",
41
- "name": "featureName",
42
- "storageKey": null
43
- }, {
44
- "alias": null,
45
- "args": null,
46
- "kind": "ScalarField",
47
- "name": "humanName",
48
- "storageKey": null
49
- }],
50
- "storageKey": null
51
- }],
52
- "storageKey": null
19
+ "kind": "FragmentSpread",
20
+ "name": "useFeaturesData_fontStyle"
53
21
  }],
54
22
  "type": "FontStyle",
55
23
  "abstractKey": null
56
24
  };
57
- node.hash = '838ddab02dcbca47c8368b219c302934';
25
+ node.hash = '25582c33916ebaadd2f674b1d0b6bf4b';
58
26
  var _default = node;
59
27
  exports.default = _default;
@@ -3,7 +3,7 @@ import { FragmentRefs } from "relay-runtime";
3
3
  export declare type TypeTesterFloatingToolbar_testers = ReadonlyArray<{
4
4
  readonly id: string;
5
5
  readonly fontStyle: {
6
- readonly " $fragmentRefs": FragmentRefs<"TypeTesterFeatures_fontStyle">;
6
+ readonly " $fragmentRefs": FragmentRefs<"useFeaturesData_fontStyle" | "TypeTesterFeatures_fontStyle">;
7
7
  } | null;
8
8
  readonly " $refType": "TypeTesterFloatingToolbar_testers";
9
9
  }>;
@@ -30,6 +30,10 @@ const node = {
30
30
  "name": "fontStyle",
31
31
  "plural": false,
32
32
  "selections": [{
33
+ "args": null,
34
+ "kind": "FragmentSpread",
35
+ "name": "useFeaturesData_fontStyle"
36
+ }, {
33
37
  "args": null,
34
38
  "kind": "FragmentSpread",
35
39
  "name": "TypeTesterFeatures_fontStyle"
@@ -39,6 +43,6 @@ const node = {
39
43
  "type": "TypeTester",
40
44
  "abstractKey": null
41
45
  };
42
- node.hash = '5554933cac70854b361575a5ed0af8ac';
46
+ node.hash = '3b87269ef35fe6c6cfabcc7a2e330a3c';
43
47
  var _default = node;
44
48
  exports.default = _default;
@@ -57,13 +57,7 @@ fragment SelectButton_sku on Sku {
57
57
  }
58
58
 
59
59
  fragment TypeTesterFeatures_fontStyle on FontStyle {
60
- fontFeatures {
61
- supportedFeatures
62
- stylisticSetNames {
63
- featureName
64
- humanName
65
- }
66
- }
60
+ ...useFeaturesData_fontStyle
67
61
  }
68
62
 
69
63
  fragment TypeTesterStyleSelectData_fontStyle on FontStyle {
@@ -100,6 +94,7 @@ fragment TypeTester_fontStyle on FontStyle {
100
94
  ...TypeTesterFeatures_fontStyle
101
95
  ...TypeTesterStyleSelectData_fontStyle
102
96
  ...FontStyle_fontStyle
97
+ ...useFeaturesData_fontStyle
103
98
  family {
104
99
  cssUrl
105
100
  id
@@ -128,6 +123,16 @@ fragment TypeTester_fontStyle on FontStyle {
128
123
  fragment TypeTester_viewer on Viewer {
129
124
  ...TypeTesterStyleSelectData_viewer
130
125
  }
126
+
127
+ fragment useFeaturesData_fontStyle on FontStyle {
128
+ fontFeatures {
129
+ supportedFeatures
130
+ stylisticSetNames {
131
+ featureName
132
+ humanName
133
+ }
134
+ }
135
+ }
131
136
  */
132
137
  const node = function () {
133
138
  var v0 = [{
@@ -455,12 +460,12 @@ const node = function () {
455
460
  }]
456
461
  },
457
462
  "params": {
458
- "cacheID": "80bf60fbcc8c99ccaff09a562f3d53ee",
463
+ "cacheID": "d729e19f7123d0dd27c4d856eff7b41c",
459
464
  "id": null,
460
465
  "metadata": {},
461
466
  "name": "TypeTester_StyleQuery",
462
467
  "operationKind": "query",
463
- "text": "query TypeTester_StyleQuery(\n $id: ID!\n) {\n fontStyle: node(id: $id) {\n __typename\n ...TypeTester_fontStyle\n id\n }\n viewer {\n ...TypeTester_viewer\n id\n }\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n cssFamily\n name\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment SKUPrice_sku on Sku {\n id\n price(licenseOptions: []) {\n amount\n ...Price_price\n }\n}\n\nfragment SKUPrice_sku_2AMk59 on Sku {\n id\n price(licenseOptions: []) {\n amount\n ...Price_price\n }\n}\n\nfragment SelectButton_sku on Sku {\n id\n ...SKUPrice_sku_2AMk59\n}\n\nfragment TypeTesterFeatures_fontStyle on FontStyle {\n fontFeatures {\n supportedFeatures\n stylisticSetNames {\n featureName\n humanName\n }\n }\n}\n\nfragment TypeTesterStyleSelectData_fontStyle on FontStyle {\n id\n name\n cssWeight\n cssStyle\n cssStretch\n family {\n name\n id\n }\n}\n\nfragment TypeTesterStyleSelectData_viewer on Viewer {\n families: fontCollections(collectionTypes: [FAMILY], first: 999) {\n edges {\n node {\n id\n name\n fontStyles {\n id\n name\n cssWeight\n cssStyle\n cssStretch\n }\n }\n }\n }\n}\n\nfragment TypeTester_fontStyle on FontStyle {\n ...TypeTesterFeatures_fontStyle\n ...TypeTesterStyleSelectData_fontStyle\n ...FontStyle_fontStyle\n family {\n cssUrl\n id\n }\n sku {\n ...SelectButton_sku\n ...SKUPrice_sku\n id\n basePrice: price {\n amount\n }\n }\n fontCollections {\n sku {\n ...SelectButton_sku\n ...SKUPrice_sku\n id\n basePrice: price {\n amount\n }\n }\n id\n }\n}\n\nfragment TypeTester_viewer on Viewer {\n ...TypeTesterStyleSelectData_viewer\n}\n"
468
+ "text": "query TypeTester_StyleQuery(\n $id: ID!\n) {\n fontStyle: node(id: $id) {\n __typename\n ...TypeTester_fontStyle\n id\n }\n viewer {\n ...TypeTester_viewer\n id\n }\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n cssFamily\n name\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment SKUPrice_sku on Sku {\n id\n price(licenseOptions: []) {\n amount\n ...Price_price\n }\n}\n\nfragment SKUPrice_sku_2AMk59 on Sku {\n id\n price(licenseOptions: []) {\n amount\n ...Price_price\n }\n}\n\nfragment SelectButton_sku on Sku {\n id\n ...SKUPrice_sku_2AMk59\n}\n\nfragment TypeTesterFeatures_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n}\n\nfragment TypeTesterStyleSelectData_fontStyle on FontStyle {\n id\n name\n cssWeight\n cssStyle\n cssStretch\n family {\n name\n id\n }\n}\n\nfragment TypeTesterStyleSelectData_viewer on Viewer {\n families: fontCollections(collectionTypes: [FAMILY], first: 999) {\n edges {\n node {\n id\n name\n fontStyles {\n id\n name\n cssWeight\n cssStyle\n cssStretch\n }\n }\n }\n }\n}\n\nfragment TypeTester_fontStyle on FontStyle {\n ...TypeTesterFeatures_fontStyle\n ...TypeTesterStyleSelectData_fontStyle\n ...FontStyle_fontStyle\n ...useFeaturesData_fontStyle\n family {\n cssUrl\n id\n }\n sku {\n ...SelectButton_sku\n ...SKUPrice_sku\n id\n basePrice: price {\n amount\n }\n }\n fontCollections {\n sku {\n ...SelectButton_sku\n ...SKUPrice_sku\n id\n basePrice: price {\n amount\n }\n }\n id\n }\n}\n\nfragment TypeTester_viewer on Viewer {\n ...TypeTesterStyleSelectData_viewer\n}\n\nfragment useFeaturesData_fontStyle on FontStyle {\n fontFeatures {\n supportedFeatures\n stylisticSetNames {\n featureName\n humanName\n }\n }\n}\n"
464
469
  }
465
470
  };
466
471
  }();
@@ -20,7 +20,7 @@ export declare type TypeTester_fontStyle = {
20
20
  readonly " $fragmentRefs": FragmentRefs<"SelectButton_sku" | "SKUPrice_sku">;
21
21
  } | null;
22
22
  } | null> | null;
23
- readonly " $fragmentRefs": FragmentRefs<"TypeTesterFeatures_fontStyle" | "TypeTesterStyleSelectData_fontStyle" | "FontStyle_fontStyle">;
23
+ readonly " $fragmentRefs": FragmentRefs<"TypeTesterFeatures_fontStyle" | "TypeTesterStyleSelectData_fontStyle" | "FontStyle_fontStyle" | "useFeaturesData_fontStyle">;
24
24
  readonly " $refType": "TypeTester_fontStyle";
25
25
  };
26
26
  export declare type TypeTester_fontStyle$data = TypeTester_fontStyle;
@@ -94,12 +94,16 @@ const node = function () {
94
94
  "args": null,
95
95
  "kind": "FragmentSpread",
96
96
  "name": "FontStyle_fontStyle"
97
+ }, {
98
+ "args": null,
99
+ "kind": "FragmentSpread",
100
+ "name": "useFeaturesData_fontStyle"
97
101
  }],
98
102
  "type": "FontStyle",
99
103
  "abstractKey": null
100
104
  };
101
105
  }();
102
106
 
103
- node.hash = '0d5783f65fd4bf6f0840996214179fca';
107
+ node.hash = 'e570d7809bdb60196f3190d2cf27ee0f';
104
108
  var _default = node;
105
109
  exports.default = _default;
@@ -68,18 +68,13 @@ fragment SelectButton_sku_2AMk59 on Sku {
68
68
  }
69
69
 
70
70
  fragment TypeTesterFeatures_fontStyle on FontStyle {
71
- fontFeatures {
72
- supportedFeatures
73
- stylisticSetNames {
74
- featureName
75
- humanName
76
- }
77
- }
71
+ ...useFeaturesData_fontStyle
78
72
  }
79
73
 
80
74
  fragment TypeTesterFloatingToolbar_testers on TypeTester {
81
75
  id
82
76
  fontStyle {
77
+ ...useFeaturesData_fontStyle
83
78
  ...TypeTesterFeatures_fontStyle
84
79
  id
85
80
  }
@@ -115,6 +110,16 @@ fragment TypeTesters_collection_12wzh on FontCollection {
115
110
  id
116
111
  }
117
112
  }
113
+
114
+ fragment useFeaturesData_fontStyle on FontStyle {
115
+ fontFeatures {
116
+ supportedFeatures
117
+ stylisticSetNames {
118
+ featureName
119
+ humanName
120
+ }
121
+ }
122
+ }
118
123
  */
119
124
  const node = function () {
120
125
  var v0 = {
@@ -544,12 +549,12 @@ const node = function () {
544
549
  }]
545
550
  },
546
551
  "params": {
547
- "cacheID": "d23e8efdfdb2d93ae2c1c86a41de378b",
552
+ "cacheID": "8469d5d52b3ecd33657647bd23a4e689",
548
553
  "id": null,
549
554
  "metadata": {},
550
555
  "name": "TypeTestersIDQuery",
551
556
  "operationKind": "query",
552
- "text": "query TypeTestersIDQuery(\n $collectionId: ID!\n $includePriceBar: Boolean!\n $tags: [String!]\n $excludeTags: [String!]\n) {\n collection: node(id: $collectionId) {\n __typename\n ...TypeTesters_collection_12wzh\n id\n }\n}\n\nfragment PriceBarSection_node on FontCollection {\n id\n name\n collectionType\n sku {\n ...SelectButton_sku_2AMk59\n id\n price(licenseOptions: []) {\n ...Price_price\n }\n }\n totalStyles\n totalStylesPrice(licenseOptions: []) {\n ...Price_price\n }\n}\n\nfragment PriceBar_node on FontCollection {\n ...PriceBarSection_node\n parent {\n ...PriceBarSection_node\n id\n }\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment SKUPrice_sku_2AMk59 on Sku {\n id\n price(licenseOptions: []) {\n amount\n ...Price_price\n }\n}\n\nfragment SelectButton_sku_2AMk59 on Sku {\n id\n ...SKUPrice_sku_2AMk59\n}\n\nfragment TypeTesterFeatures_fontStyle on FontStyle {\n fontFeatures {\n supportedFeatures\n stylisticSetNames {\n featureName\n humanName\n }\n }\n}\n\nfragment TypeTesterFloatingToolbar_testers on TypeTester {\n id\n fontStyle {\n ...TypeTesterFeatures_fontStyle\n id\n }\n}\n\nfragment TypeTesters_collection_12wzh on FontCollection {\n typeTesters(first: 999, tags: $tags, excludeTags: $excludeTags) {\n edges {\n node {\n id\n content\n size\n lineHeight\n direction\n fontStyle {\n id\n family {\n id\n }\n }\n ...TypeTesterFloatingToolbar_testers\n }\n }\n }\n typeTesterFeatures\n id\n ...PriceBar_node @include(if: $includePriceBar)\n families: children(collectionTypes: [FAMILY]) {\n id\n ...PriceBar_node @include(if: $includePriceBar)\n }\n parent {\n id\n }\n}\n"
557
+ "text": "query TypeTestersIDQuery(\n $collectionId: ID!\n $includePriceBar: Boolean!\n $tags: [String!]\n $excludeTags: [String!]\n) {\n collection: node(id: $collectionId) {\n __typename\n ...TypeTesters_collection_12wzh\n id\n }\n}\n\nfragment PriceBarSection_node on FontCollection {\n id\n name\n collectionType\n sku {\n ...SelectButton_sku_2AMk59\n id\n price(licenseOptions: []) {\n ...Price_price\n }\n }\n totalStyles\n totalStylesPrice(licenseOptions: []) {\n ...Price_price\n }\n}\n\nfragment PriceBar_node on FontCollection {\n ...PriceBarSection_node\n parent {\n ...PriceBarSection_node\n id\n }\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment SKUPrice_sku_2AMk59 on Sku {\n id\n price(licenseOptions: []) {\n amount\n ...Price_price\n }\n}\n\nfragment SelectButton_sku_2AMk59 on Sku {\n id\n ...SKUPrice_sku_2AMk59\n}\n\nfragment TypeTesterFeatures_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n}\n\nfragment TypeTesterFloatingToolbar_testers on TypeTester {\n id\n fontStyle {\n ...useFeaturesData_fontStyle\n ...TypeTesterFeatures_fontStyle\n id\n }\n}\n\nfragment TypeTesters_collection_12wzh on FontCollection {\n typeTesters(first: 999, tags: $tags, excludeTags: $excludeTags) {\n edges {\n node {\n id\n content\n size\n lineHeight\n direction\n fontStyle {\n id\n family {\n id\n }\n }\n ...TypeTesterFloatingToolbar_testers\n }\n }\n }\n typeTesterFeatures\n id\n ...PriceBar_node @include(if: $includePriceBar)\n families: children(collectionTypes: [FAMILY]) {\n id\n ...PriceBar_node @include(if: $includePriceBar)\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"
553
558
  }
554
559
  };
555
560
  }();
@@ -73,18 +73,13 @@ fragment SelectButton_sku_2AMk59 on Sku {
73
73
  }
74
74
 
75
75
  fragment TypeTesterFeatures_fontStyle on FontStyle {
76
- fontFeatures {
77
- supportedFeatures
78
- stylisticSetNames {
79
- featureName
80
- humanName
81
- }
82
- }
76
+ ...useFeaturesData_fontStyle
83
77
  }
84
78
 
85
79
  fragment TypeTesterFloatingToolbar_testers on TypeTester {
86
80
  id
87
81
  fontStyle {
82
+ ...useFeaturesData_fontStyle
88
83
  ...TypeTesterFeatures_fontStyle
89
84
  id
90
85
  }
@@ -120,6 +115,16 @@ fragment TypeTesters_collection_12wzh on FontCollection {
120
115
  id
121
116
  }
122
117
  }
118
+
119
+ fragment useFeaturesData_fontStyle on FontStyle {
120
+ fontFeatures {
121
+ supportedFeatures
122
+ stylisticSetNames {
123
+ featureName
124
+ humanName
125
+ }
126
+ }
127
+ }
123
128
  */
124
129
  const node = function () {
125
130
  var v0 = {
@@ -578,12 +583,12 @@ const node = function () {
578
583
  }]
579
584
  },
580
585
  "params": {
581
- "cacheID": "5328793dd1b6cba8d77d87463d3d2228",
586
+ "cacheID": "72038e3cbec9e6fd1b9673255d20d710",
582
587
  "id": null,
583
588
  "metadata": {},
584
589
  "name": "TypeTestersSlugQuery",
585
590
  "operationKind": "query",
586
- "text": "query TypeTestersSlugQuery(\n $collectionSlug: String!\n $includePriceBar: Boolean!\n $tags: [String!]\n $excludeTags: [String!]\n) {\n viewer {\n slug(name: $collectionSlug) {\n collection: fontCollection {\n ...TypeTesters_collection_12wzh\n id\n }\n id\n }\n id\n }\n}\n\nfragment PriceBarSection_node on FontCollection {\n id\n name\n collectionType\n sku {\n ...SelectButton_sku_2AMk59\n id\n price(licenseOptions: []) {\n ...Price_price\n }\n }\n totalStyles\n totalStylesPrice(licenseOptions: []) {\n ...Price_price\n }\n}\n\nfragment PriceBar_node on FontCollection {\n ...PriceBarSection_node\n parent {\n ...PriceBarSection_node\n id\n }\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment SKUPrice_sku_2AMk59 on Sku {\n id\n price(licenseOptions: []) {\n amount\n ...Price_price\n }\n}\n\nfragment SelectButton_sku_2AMk59 on Sku {\n id\n ...SKUPrice_sku_2AMk59\n}\n\nfragment TypeTesterFeatures_fontStyle on FontStyle {\n fontFeatures {\n supportedFeatures\n stylisticSetNames {\n featureName\n humanName\n }\n }\n}\n\nfragment TypeTesterFloatingToolbar_testers on TypeTester {\n id\n fontStyle {\n ...TypeTesterFeatures_fontStyle\n id\n }\n}\n\nfragment TypeTesters_collection_12wzh on FontCollection {\n typeTesters(first: 999, tags: $tags, excludeTags: $excludeTags) {\n edges {\n node {\n id\n content\n size\n lineHeight\n direction\n fontStyle {\n id\n family {\n id\n }\n }\n ...TypeTesterFloatingToolbar_testers\n }\n }\n }\n typeTesterFeatures\n id\n ...PriceBar_node @include(if: $includePriceBar)\n families: children(collectionTypes: [FAMILY]) {\n id\n ...PriceBar_node @include(if: $includePriceBar)\n }\n parent {\n id\n }\n}\n"
591
+ "text": "query TypeTestersSlugQuery(\n $collectionSlug: String!\n $includePriceBar: Boolean!\n $tags: [String!]\n $excludeTags: [String!]\n) {\n viewer {\n slug(name: $collectionSlug) {\n collection: fontCollection {\n ...TypeTesters_collection_12wzh\n id\n }\n id\n }\n id\n }\n}\n\nfragment PriceBarSection_node on FontCollection {\n id\n name\n collectionType\n sku {\n ...SelectButton_sku_2AMk59\n id\n price(licenseOptions: []) {\n ...Price_price\n }\n }\n totalStyles\n totalStylesPrice(licenseOptions: []) {\n ...Price_price\n }\n}\n\nfragment PriceBar_node on FontCollection {\n ...PriceBarSection_node\n parent {\n ...PriceBarSection_node\n id\n }\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment SKUPrice_sku_2AMk59 on Sku {\n id\n price(licenseOptions: []) {\n amount\n ...Price_price\n }\n}\n\nfragment SelectButton_sku_2AMk59 on Sku {\n id\n ...SKUPrice_sku_2AMk59\n}\n\nfragment TypeTesterFeatures_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n}\n\nfragment TypeTesterFloatingToolbar_testers on TypeTester {\n id\n fontStyle {\n ...useFeaturesData_fontStyle\n ...TypeTesterFeatures_fontStyle\n id\n }\n}\n\nfragment TypeTesters_collection_12wzh on FontCollection {\n typeTesters(first: 999, tags: $tags, excludeTags: $excludeTags) {\n edges {\n node {\n id\n content\n size\n lineHeight\n direction\n fontStyle {\n id\n family {\n id\n }\n }\n ...TypeTesterFloatingToolbar_testers\n }\n }\n }\n typeTesterFeatures\n id\n ...PriceBar_node @include(if: $includePriceBar)\n families: children(collectionTypes: [FAMILY]) {\n id\n ...PriceBar_node @include(if: $includePriceBar)\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"
587
592
  }
588
593
  };
589
594
  }();
@@ -0,0 +1,19 @@
1
+ import { ReaderFragment } from "relay-runtime";
2
+ import { FragmentRefs } from "relay-runtime";
3
+ export declare type useFeaturesData_fontStyle = {
4
+ readonly fontFeatures: {
5
+ readonly supportedFeatures: ReadonlyArray<string>;
6
+ readonly stylisticSetNames: ReadonlyArray<{
7
+ readonly featureName: string;
8
+ readonly humanName: string;
9
+ }>;
10
+ };
11
+ readonly " $refType": "useFeaturesData_fontStyle";
12
+ };
13
+ export declare type useFeaturesData_fontStyle$data = useFeaturesData_fontStyle;
14
+ export declare type useFeaturesData_fontStyle$key = {
15
+ readonly " $data"?: useFeaturesData_fontStyle$data;
16
+ readonly " $fragmentRefs": FragmentRefs<"useFeaturesData_fontStyle">;
17
+ };
18
+ declare const node: ReaderFragment;
19
+ export default node;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ /* tslint:disable */
9
+
10
+ /* eslint-disable */
11
+ // @ts-nocheck
12
+ const node = {
13
+ "argumentDefinitions": [],
14
+ "kind": "Fragment",
15
+ "metadata": null,
16
+ "name": "useFeaturesData_fontStyle",
17
+ "selections": [{
18
+ "alias": null,
19
+ "args": null,
20
+ "concreteType": "FontFeatures",
21
+ "kind": "LinkedField",
22
+ "name": "fontFeatures",
23
+ "plural": false,
24
+ "selections": [{
25
+ "alias": null,
26
+ "args": null,
27
+ "kind": "ScalarField",
28
+ "name": "supportedFeatures",
29
+ "storageKey": null
30
+ }, {
31
+ "alias": null,
32
+ "args": null,
33
+ "concreteType": "StylisticSetName",
34
+ "kind": "LinkedField",
35
+ "name": "stylisticSetNames",
36
+ "plural": true,
37
+ "selections": [{
38
+ "alias": null,
39
+ "args": null,
40
+ "kind": "ScalarField",
41
+ "name": "featureName",
42
+ "storageKey": null
43
+ }, {
44
+ "alias": null,
45
+ "args": null,
46
+ "kind": "ScalarField",
47
+ "name": "humanName",
48
+ "storageKey": null
49
+ }],
50
+ "storageKey": null
51
+ }],
52
+ "storageKey": null
53
+ }],
54
+ "type": "FontStyle",
55
+ "abstractKey": null
56
+ };
57
+ node.hash = '3c48a87b1b19f52e3dda10fc11f0030a';
58
+ var _default = node;
59
+ exports.default = _default;
@@ -49,7 +49,7 @@ const collectionInfo = collection => ({
49
49
  });
50
50
 
51
51
  const CharacterViewerComponent = _ref => {
52
- var _collection$children$, _collection$children, _ref2, _collection$featureSt, _collection$featureSt2, _collection$fontStyle, _collection$fontStyle2, _collection$children2, _collection$children3, _collection$children4, _collection$children5, _fontStyle$characterB, _fontStyle$characterB2, _fontStyle$featureCha, _fontStyle$featureCha2, _fontStyle$featureCha3, _fontStyle$featureCha4, _fontStyle$featureCha5, _fontStyle$characterB3, _fontStyle$featureCha6;
52
+ var _collection$children$, _collection$children, _ref2, _collection$featureSt, _collection$featureSt2, _collection$fontStyle, _collection$fontStyle2, _collection$children2, _collection$children3, _collection$children4, _collection$children5, _fontStyle$characterB, _fontStyle$characterB2, _fontStyle$featureCha, _fontStyle$featureCha2, _fontStyle$featureCha3, _fontStyle$featureCha4, _fontStyle$featureCha5, _fontStyle$characterB3, _fontStyle$featureCha6, _fontStyle$featureCha7;
53
53
 
54
54
  let {
55
55
  collection
@@ -147,7 +147,7 @@ const CharacterViewerComponent = _ref => {
147
147
  onMouseEnter: () => setActiveCharacter(chars),
148
148
  "data-selected": selectedCharacter === chars
149
149
  }, chars))));
150
- }))), /*#__PURE__*/_react.default.createElement("div", {
150
+ }))), (_fontStyle$featureCha6 = fontStyle.featureCharacters) !== null && _fontStyle$featureCha6 !== void 0 && _fontStyle$featureCha6.length ? /*#__PURE__*/_react.default.createElement("div", {
151
151
  className: "character-viewer__features-map"
152
152
  }, /*#__PURE__*/_react.default.createElement("div", {
153
153
  className: "character-viewer__feature-monitor"
@@ -195,7 +195,7 @@ const CharacterViewerComponent = _ref => {
195
195
  style: {
196
196
  '--width': blocksWidth
197
197
  }
198
- }, (_fontStyle$featureCha6 = fontStyle.featureCharacters) === null || _fontStyle$featureCha6 === void 0 ? void 0 : _fontStyle$featureCha6.map((_ref4, i) => {
198
+ }, (_fontStyle$featureCha7 = fontStyle.featureCharacters) === null || _fontStyle$featureCha7 === void 0 ? void 0 : _fontStyle$featureCha7.map((_ref4, i) => {
199
199
  let {
200
200
  name,
201
201
  feature,
@@ -218,7 +218,7 @@ const CharacterViewerComponent = _ref => {
218
218
  onMouseEnter: () => setActiveFeatureCharacter([chars, feature]),
219
219
  "data-selected": (selectedFeatureCharacter === null || selectedFeatureCharacter === void 0 ? void 0 : selectedFeatureCharacter[0]) === chars && (selectedFeatureCharacter === null || selectedFeatureCharacter === void 0 ? void 0 : selectedFeatureCharacter[1]) === feature
220
220
  }, chars))));
221
- }))));
221
+ }))) : null);
222
222
  };
223
223
 
224
224
  _CharacterViewer_family !== void 0 ? _CharacterViewer_family : (_CharacterViewer_family = require("../../__generated__/CharacterViewer_family.graphql"), _CharacterViewer_family.hash && _CharacterViewer_family.hash !== "2883e053de6bd4a34d802fe4af824991" && console.error("The definition of 'CharacterViewer_family' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _CharacterViewer_family);
@@ -11,8 +11,6 @@ export interface Config {
11
11
  }
12
12
  export declare const makeConfig: (config?: Config | undefined) => {
13
13
  typeTester: {
14
- min: number;
15
- max: number;
16
14
  autofitOnChange: boolean;
17
15
  truncate: boolean;
18
16
  priceText: boolean;
@@ -28,6 +26,7 @@ export declare const makeConfig: (config?: Config | undefined) => {
28
26
  groupEdit: boolean;
29
27
  bulletStyle: "square" | "round";
30
28
  openTypeFeatures: {
29
+ interactionStyle: "select" | "panel";
31
30
  columns: {
32
31
  features: (string | {
33
32
  code: string;
@@ -39,6 +38,16 @@ export declare const makeConfig: (config?: Config | undefined) => {
39
38
  };
40
39
  alignmentButtons: boolean;
41
40
  initialAlignment: import("./TypeTester/types").Alignment;
41
+ size: {
42
+ label: string | false;
43
+ min: number;
44
+ max: number;
45
+ };
46
+ lineHeight: {
47
+ label: string | false;
48
+ min: number;
49
+ max: number;
50
+ } | undefined;
42
51
  };
43
52
  form: {
44
53
  checkboxStyle: "cross" | "check";
@@ -50,8 +59,6 @@ export declare const makeConfig: (config?: Config | undefined) => {
50
59
  };
51
60
  declare const _default: React.Context<{
52
61
  typeTester: {
53
- min: number;
54
- max: number;
55
62
  autofitOnChange: boolean;
56
63
  truncate: boolean;
57
64
  priceText: boolean;
@@ -67,6 +74,7 @@ declare const _default: React.Context<{
67
74
  groupEdit: boolean;
68
75
  bulletStyle: "square" | "round";
69
76
  openTypeFeatures: {
77
+ interactionStyle: "select" | "panel";
70
78
  columns: {
71
79
  features: (string | {
72
80
  code: string;
@@ -78,6 +86,16 @@ declare const _default: React.Context<{
78
86
  };
79
87
  alignmentButtons: boolean;
80
88
  initialAlignment: import("./TypeTester/types").Alignment;
89
+ size: {
90
+ label: string | false;
91
+ min: number;
92
+ max: number;
93
+ };
94
+ lineHeight: {
95
+ label: string | false;
96
+ min: number;
97
+ max: number;
98
+ } | undefined;
81
99
  };
82
100
  form: {
83
101
  checkboxStyle: "cross" | "check";
@@ -10,15 +10,13 @@ var _react = _interopRequireDefault(require("react"));
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
12
12
  const makeTypeTesterConfig = config => {
13
- var _config$shy, _config$toolsPosition, _config$min, _config$max, _config$autofitOnChan, _config$truncate, _config$priceText, _config$selectButtonS, _config$selectButtonL, _ref, _config$selectButton, _config$selectable, _config$priceBar, _config$textInput, _config$initialMode, _config$groupEdit, _config$bulletStyle, _config$openTypeFeatu, _config$openTypeFeatu2, _config$openTypeFeatu3, _config$alignmentButt, _config$initialAlignm;
13
+ var _config$shy, _config$toolsPosition, _config$autofitOnChan, _config$truncate, _config$priceText, _config$selectButtonS, _config$selectButtonL, _ref, _config$selectButton, _config$selectable, _config$priceBar, _config$textInput, _config$initialMode, _config$groupEdit, _config$bulletStyle, _config$openTypeFeatu, _config$openTypeFeatu2, _config$openTypeFeatu3, _config$openTypeFeatu4, _config$openTypeFeatu5, _config$alignmentButt, _config$initialAlignm, _config$size$label, _config$size, _ref2, _config$size$min, _config$size2, _ref3, _config$size$max, _config$size3, _config$lineHeight$la, _config$lineHeight, _config$lineHeight$mi, _config$lineHeight2, _config$lineHeight$ma, _config$lineHeight3;
14
14
 
15
15
  let shy = (_config$shy = config === null || config === void 0 ? void 0 : config.shy) !== null && _config$shy !== void 0 ? _config$shy : false;
16
16
  if (shy === true) shy = 'hover';
17
17
  let toolsPosition = (_config$toolsPosition = config === null || config === void 0 ? void 0 : config.toolsPosition) !== null && _config$toolsPosition !== void 0 ? _config$toolsPosition : 'inline';
18
18
  if (shy !== 'focus') toolsPosition = 'inline';
19
19
  return {
20
- min: (_config$min = config === null || config === void 0 ? void 0 : config.min) !== null && _config$min !== void 0 ? _config$min : 10,
21
- max: (_config$max = config === null || config === void 0 ? void 0 : config.max) !== null && _config$max !== void 0 ? _config$max : 200,
22
20
  autofitOnChange: (_config$autofitOnChan = config === null || config === void 0 ? void 0 : config.autofitOnChange) !== null && _config$autofitOnChan !== void 0 ? _config$autofitOnChan : false,
23
21
  truncate: (_config$truncate = config === null || config === void 0 ? void 0 : config.truncate) !== null && _config$truncate !== void 0 ? _config$truncate : false,
24
22
  priceText: (_config$priceText = config === null || config === void 0 ? void 0 : config.priceText) !== null && _config$priceText !== void 0 ? _config$priceText : false,
@@ -34,11 +32,22 @@ const makeTypeTesterConfig = config => {
34
32
  groupEdit: (_config$groupEdit = config === null || config === void 0 ? void 0 : config.groupEdit) !== null && _config$groupEdit !== void 0 ? _config$groupEdit : false,
35
33
  bulletStyle: (_config$bulletStyle = config === null || config === void 0 ? void 0 : config.bulletStyle) !== null && _config$bulletStyle !== void 0 ? _config$bulletStyle : 'square',
36
34
  openTypeFeatures: {
37
- columns: config === null || config === void 0 ? void 0 : (_config$openTypeFeatu = config.openTypeFeatures) === null || _config$openTypeFeatu === void 0 ? void 0 : _config$openTypeFeatu.columns,
38
- selectionStyle: (_config$openTypeFeatu2 = config === null || config === void 0 ? void 0 : (_config$openTypeFeatu3 = config.openTypeFeatures) === null || _config$openTypeFeatu3 === void 0 ? void 0 : _config$openTypeFeatu3.selectionStyle) !== null && _config$openTypeFeatu2 !== void 0 ? _config$openTypeFeatu2 : 'bullet'
35
+ interactionStyle: (_config$openTypeFeatu = config === null || config === void 0 ? void 0 : (_config$openTypeFeatu2 = config.openTypeFeatures) === null || _config$openTypeFeatu2 === void 0 ? void 0 : _config$openTypeFeatu2.interactionStyle) !== null && _config$openTypeFeatu !== void 0 ? _config$openTypeFeatu : 'panel',
36
+ columns: config === null || config === void 0 ? void 0 : (_config$openTypeFeatu3 = config.openTypeFeatures) === null || _config$openTypeFeatu3 === void 0 ? void 0 : _config$openTypeFeatu3.columns,
37
+ selectionStyle: (_config$openTypeFeatu4 = config === null || config === void 0 ? void 0 : (_config$openTypeFeatu5 = config.openTypeFeatures) === null || _config$openTypeFeatu5 === void 0 ? void 0 : _config$openTypeFeatu5.selectionStyle) !== null && _config$openTypeFeatu4 !== void 0 ? _config$openTypeFeatu4 : 'bullet'
39
38
  },
40
39
  alignmentButtons: (_config$alignmentButt = config === null || config === void 0 ? void 0 : config.alignmentButtons) !== null && _config$alignmentButt !== void 0 ? _config$alignmentButt : false,
41
- initialAlignment: (_config$initialAlignm = config === null || config === void 0 ? void 0 : config.initialAlignment) !== null && _config$initialAlignm !== void 0 ? _config$initialAlignm : 'left'
40
+ initialAlignment: (_config$initialAlignm = config === null || config === void 0 ? void 0 : config.initialAlignment) !== null && _config$initialAlignm !== void 0 ? _config$initialAlignm : 'left',
41
+ size: {
42
+ label: (_config$size$label = config === null || config === void 0 ? void 0 : (_config$size = config.size) === null || _config$size === void 0 ? void 0 : _config$size.label) !== null && _config$size$label !== void 0 ? _config$size$label : 'Size',
43
+ min: (_ref2 = (_config$size$min = config === null || config === void 0 ? void 0 : (_config$size2 = config.size) === null || _config$size2 === void 0 ? void 0 : _config$size2.min) !== null && _config$size$min !== void 0 ? _config$size$min : config === null || config === void 0 ? void 0 : config.min) !== null && _ref2 !== void 0 ? _ref2 : 10,
44
+ max: (_ref3 = (_config$size$max = config === null || config === void 0 ? void 0 : (_config$size3 = config.size) === null || _config$size3 === void 0 ? void 0 : _config$size3.max) !== null && _config$size$max !== void 0 ? _config$size$max : config === null || config === void 0 ? void 0 : config.max) !== null && _ref3 !== void 0 ? _ref3 : 200
45
+ },
46
+ lineHeight: config !== null && config !== void 0 && config.lineHeight ? {
47
+ label: (_config$lineHeight$la = config === null || config === void 0 ? void 0 : (_config$lineHeight = config.lineHeight) === null || _config$lineHeight === void 0 ? void 0 : _config$lineHeight.label) !== null && _config$lineHeight$la !== void 0 ? _config$lineHeight$la : 'Line height',
48
+ min: (_config$lineHeight$mi = config === null || config === void 0 ? void 0 : (_config$lineHeight2 = config.lineHeight) === null || _config$lineHeight2 === void 0 ? void 0 : _config$lineHeight2.min) !== null && _config$lineHeight$mi !== void 0 ? _config$lineHeight$mi : 0.7,
49
+ max: (_config$lineHeight$ma = config === null || config === void 0 ? void 0 : (_config$lineHeight3 = config.lineHeight) === null || _config$lineHeight3 === void 0 ? void 0 : _config$lineHeight3.max) !== null && _config$lineHeight$ma !== void 0 ? _config$lineHeight$ma : 2
50
+ } : undefined
42
51
  };
43
52
  };
44
53
 
@@ -48,17 +48,18 @@ const SKUPrice = _ref => {
48
48
  showCollectionSavings,
49
49
  sku
50
50
  }));
51
- const licenseOptionsSpecs = (0, _reactRedux.useSelector)(state => state.licenseOptions.map(spec => ({
52
- licenseId: spec.licenseId,
53
- licenseOptionIds: Object.values(spec.licenseOptions).filter(Boolean)
54
- })));
51
+ const licenseOptions = (0, _reactRedux.useSelector)(state => state.licenseOptions);
55
52
  (0, _react.useEffect)(() => {
56
53
  if (!sku) return;
54
+ const licenseOptionsSpecs = licenseOptions.map(spec => ({
55
+ licenseId: spec.licenseId,
56
+ licenseOptionIds: Object.values(spec.licenseOptions).filter(Boolean)
57
+ }));
57
58
  relay.refetch({
58
59
  id: sku.id,
59
60
  licenseOptionsSpecs
60
61
  });
61
- }, [licenseOptionsSpecs]);
62
+ }, [licenseOptions]);
62
63
  if (!(sku !== null && sku !== void 0 && sku.price)) return null;
63
64
  return /*#__PURE__*/_react.default.createElement(_Price.default, _extends({}, rest, {
64
65
  price: sku.price,
@@ -1,4 +1,4 @@
1
- import { TypeTesterFeatures_fontStyle } from '../../__generated__/TypeTesterFeatures_fontStyle.graphql';
1
+ import { TypeTesterFeatures_fontStyle } from '__generated__/TypeTesterFeatures_fontStyle.graphql';
2
2
  interface TypeTesterFeatures_props {
3
3
  id: string;
4
4
  fontStyle: TypeTesterFeatures_fontStyle;