fontdue-js 2.8.3 → 2.9.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 (28) hide show
  1. package/dist/__generated__/CharacterViewerIDQuery.graphql.d.ts +1 -1
  2. package/dist/__generated__/CharacterViewerIDQuery.graphql.js +153 -115
  3. package/dist/__generated__/CharacterViewerSlugQuery.graphql.d.ts +1 -1
  4. package/dist/__generated__/CharacterViewerSlugQuery.graphql.js +157 -114
  5. package/dist/__generated__/CharacterViewerStyleRefetchQuery.graphql.d.ts +21 -0
  6. package/dist/__generated__/CharacterViewerStyleRefetchQuery.graphql.js +205 -0
  7. package/dist/__generated__/CharacterViewer_collection.graphql.d.ts +18 -53
  8. package/dist/__generated__/CharacterViewer_collection.graphql.js +95 -111
  9. package/dist/__generated__/CharacterViewer_family.graphql.d.ts +1 -23
  10. package/dist/__generated__/CharacterViewer_family.graphql.js +3 -89
  11. package/dist/__generated__/CharacterViewer_style.graphql.d.ts +39 -0
  12. package/dist/__generated__/CharacterViewer_style.graphql.js +157 -0
  13. package/dist/__generated__/StoreModalIndexQuery.graphql.d.ts +1 -1
  14. package/dist/__generated__/StoreModalIndexQuery.graphql.js +8 -8
  15. package/dist/__generated__/StoreModalProductQuery.graphql.d.ts +1 -1
  16. package/dist/__generated__/StoreModalProductQuery.graphql.js +3 -3
  17. package/dist/__generated__/useTotalStyles_fontCollection.graphql.d.ts +2 -1
  18. package/dist/__generated__/useTotalStyles_fontCollection.graphql.js +17 -16
  19. package/dist/components/CharacterViewer/StyleSelect.d.ts +1 -1
  20. package/dist/components/CharacterViewer/index.js +175 -250
  21. package/dist/components/StoreModal/StoreModalFamilyButton.js +7 -9
  22. package/dist/components/StoreModal/StoreModalIndexItem.js +7 -9
  23. package/dist/components/useTotalStyles.d.ts +1 -1
  24. package/dist/components/useTotalStyles.js +9 -8
  25. package/dist/fontdue.css +41 -56
  26. package/dist/utils.d.ts +1 -0
  27. package/dist/utils.js +7 -2
  28. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @generated SignedSource<<4af8619bf409ed02494daa6b60330223>>
2
+ * @generated SignedSource<<d9389d37fbbccea58c750b31f123df50>>
3
3
  * @lightSyntaxTransform
4
4
  * @nogrep
5
5
  */
@@ -10,21 +10,7 @@ export type CharacterViewer_collection$data = {
10
10
  readonly collectionType: string;
11
11
  readonly cssUrl: string | null;
12
12
  readonly fontStyles: ReadonlyArray<{
13
- readonly characterBlocks: ReadonlyArray<{
14
- readonly characters: ReadonlyArray<string>;
15
- readonly name: string;
16
- }> | null;
17
13
  readonly cssFamily: string | null;
18
- readonly featureCharacters: ReadonlyArray<{
19
- readonly characters: ReadonlyArray<string>;
20
- readonly feature: string;
21
- readonly name: string;
22
- }> | null;
23
- readonly glyphNames: ReadonlyArray<{
24
- readonly characters: string;
25
- readonly feature: string | null;
26
- readonly name: string;
27
- }> | null;
28
14
  readonly id: string;
29
15
  readonly name: string;
30
16
  readonly variableInstances: ReadonlyArray<{
@@ -34,14 +20,6 @@ export type CharacterViewer_collection$data = {
34
20
  }>;
35
21
  readonly name: string;
36
22
  }> | null;
37
- readonly verticalMetrics: {
38
- readonly ascender: number;
39
- readonly capHeight: number | null;
40
- readonly descender: number;
41
- readonly lineGap: number | null;
42
- readonly unitsPerEm: number;
43
- readonly xHeight: number | null;
44
- };
45
23
  }> | null;
46
24
  readonly id: string;
47
25
  readonly isVariableFont: boolean;
@@ -50,31 +28,10 @@ export type CharacterViewer_collection$data = {
50
28
  readonly collectionType: string;
51
29
  readonly cssUrl: string | null;
52
30
  readonly featureStyle: {
53
- readonly id: string;
54
- readonly variableInstances: ReadonlyArray<{
55
- readonly coordinates: ReadonlyArray<{
56
- readonly axis: string;
57
- readonly value: number;
58
- }>;
59
- readonly name: string;
60
- }> | null;
31
+ readonly " $fragmentSpreads": FragmentRefs<"CharacterViewer_style">;
61
32
  } | null;
62
33
  readonly fontStyles: ReadonlyArray<{
63
- readonly characterBlocks: ReadonlyArray<{
64
- readonly characters: ReadonlyArray<string>;
65
- readonly name: string;
66
- }> | null;
67
34
  readonly cssFamily: string | null;
68
- readonly featureCharacters: ReadonlyArray<{
69
- readonly characters: ReadonlyArray<string>;
70
- readonly feature: string;
71
- readonly name: string;
72
- }> | null;
73
- readonly glyphNames: ReadonlyArray<{
74
- readonly characters: string;
75
- readonly feature: string | null;
76
- readonly name: string;
77
- }> | null;
78
35
  readonly id: string;
79
36
  readonly name: string;
80
37
  readonly variableInstances: ReadonlyArray<{
@@ -84,14 +41,22 @@ export type CharacterViewer_collection$data = {
84
41
  }>;
85
42
  readonly name: string;
86
43
  }> | null;
87
- readonly verticalMetrics: {
88
- readonly ascender: number;
89
- readonly capHeight: number | null;
90
- readonly descender: number;
91
- readonly lineGap: number | null;
92
- readonly unitsPerEm: number;
93
- readonly xHeight: number | null;
94
- };
44
+ }> | null;
45
+ readonly glyphGroups: ReadonlyArray<{
46
+ readonly characterSets: ReadonlyArray<{
47
+ readonly characters: ReadonlyArray<{
48
+ readonly __typename: "CharacterRange";
49
+ readonly first: string;
50
+ readonly last: string;
51
+ } | {
52
+ readonly __typename: "CharacterString";
53
+ readonly string: string;
54
+ } | {
55
+ readonly __typename: "%other";
56
+ }>;
57
+ readonly features: ReadonlyArray<string> | null;
58
+ }>;
59
+ readonly name: string;
95
60
  }> | null;
96
61
  readonly id: string;
97
62
  readonly isVariableFont: boolean;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  /**
8
- * @generated SignedSource<<4af8619bf409ed02494daa6b60330223>>
8
+ * @generated SignedSource<<d9389d37fbbccea58c750b31f123df50>>
9
9
  * @lightSyntaxTransform
10
10
  * @nogrep
11
11
  */
@@ -30,72 +30,27 @@ const node = function () {
30
30
  "storageKey": null
31
31
  },
32
32
  v2 = {
33
- "alias": null,
34
- "args": null,
35
- "concreteType": "VariableInstance",
36
- "kind": "LinkedField",
37
- "name": "variableInstances",
38
- "plural": true,
39
- "selections": [v1 /*: any*/, {
40
- "alias": null,
41
- "args": null,
42
- "concreteType": "VariableSetting",
43
- "kind": "LinkedField",
44
- "name": "coordinates",
45
- "plural": true,
46
- "selections": [{
47
- "alias": null,
48
- "args": null,
49
- "kind": "ScalarField",
50
- "name": "axis",
51
- "storageKey": null
52
- }, {
53
- "alias": null,
54
- "args": null,
55
- "kind": "ScalarField",
56
- "name": "value",
57
- "storageKey": null
58
- }],
59
- "storageKey": null
60
- }],
61
- "storageKey": null
62
- },
63
- v3 = {
64
33
  "alias": null,
65
34
  "args": null,
66
35
  "kind": "ScalarField",
67
36
  "name": "isVariableFont",
68
37
  "storageKey": null
69
38
  },
70
- v4 = {
39
+ v3 = {
71
40
  "alias": null,
72
41
  "args": null,
73
42
  "kind": "ScalarField",
74
43
  "name": "cssUrl",
75
44
  "storageKey": null
76
45
  },
77
- v5 = {
46
+ v4 = {
78
47
  "alias": null,
79
48
  "args": null,
80
49
  "kind": "ScalarField",
81
50
  "name": "collectionType",
82
51
  "storageKey": null
83
52
  },
84
- v6 = {
85
- "alias": null,
86
- "args": null,
87
- "kind": "ScalarField",
88
- "name": "characters",
89
- "storageKey": null
90
- },
91
- v7 = [v6 /*: any*/, {
92
- "alias": null,
93
- "args": null,
94
- "kind": "ScalarField",
95
- "name": "feature",
96
- "storageKey": null
97
- }, v1 /*: any*/],
98
- v8 = {
53
+ v5 = {
99
54
  "alias": null,
100
55
  "args": null,
101
56
  "concreteType": "FontStyle",
@@ -111,93 +66,122 @@ const node = function () {
111
66
  }, v1 /*: any*/, {
112
67
  "alias": null,
113
68
  "args": null,
114
- "concreteType": "CharacterBlock",
69
+ "concreteType": "VariableInstance",
115
70
  "kind": "LinkedField",
116
- "name": "characterBlocks",
71
+ "name": "variableInstances",
117
72
  "plural": true,
118
- "selections": [v6 /*: any*/, v1 /*: any*/],
119
- "storageKey": null
120
- }, {
121
- "alias": null,
122
- "args": null,
123
- "concreteType": "FeatureCharacters",
124
- "kind": "LinkedField",
125
- "name": "featureCharacters",
126
- "plural": true,
127
- "selections": v7 /*: any*/,
73
+ "selections": [v1 /*: any*/, {
74
+ "alias": null,
75
+ "args": null,
76
+ "concreteType": "VariableSetting",
77
+ "kind": "LinkedField",
78
+ "name": "coordinates",
79
+ "plural": true,
80
+ "selections": [{
81
+ "alias": null,
82
+ "args": null,
83
+ "kind": "ScalarField",
84
+ "name": "axis",
85
+ "storageKey": null
86
+ }, {
87
+ "alias": null,
88
+ "args": null,
89
+ "kind": "ScalarField",
90
+ "name": "value",
91
+ "storageKey": null
92
+ }],
93
+ "storageKey": null
94
+ }],
128
95
  "storageKey": null
129
- }, {
96
+ }],
97
+ "storageKey": null
98
+ };
99
+ return {
100
+ "argumentDefinitions": [],
101
+ "kind": "Fragment",
102
+ "metadata": null,
103
+ "name": "CharacterViewer_collection",
104
+ "selections": [v0 /*: any*/, v1 /*: any*/, v2 /*: any*/, v3 /*: any*/, v4 /*: any*/, {
105
+ "alias": null,
106
+ "args": null,
107
+ "concreteType": "GlyphGroup",
108
+ "kind": "LinkedField",
109
+ "name": "glyphGroups",
110
+ "plural": true,
111
+ "selections": [v1 /*: any*/, {
130
112
  "alias": null,
131
113
  "args": null,
132
- "concreteType": "GlyphName",
114
+ "concreteType": "CharacterSet",
133
115
  "kind": "LinkedField",
134
- "name": "glyphNames",
116
+ "name": "characterSets",
135
117
  "plural": true,
136
- "selections": v7 /*: any*/,
137
- "storageKey": null
138
- }, v2 /*: any*/, {
139
- "alias": null,
140
- "args": null,
141
- "concreteType": "VerticalMetrics",
142
- "kind": "LinkedField",
143
- "name": "verticalMetrics",
144
- "plural": false,
145
118
  "selections": [{
146
119
  "alias": null,
147
120
  "args": null,
148
121
  "kind": "ScalarField",
149
- "name": "unitsPerEm",
122
+ "name": "features",
150
123
  "storageKey": null
151
124
  }, {
152
125
  "alias": null,
153
126
  "args": null,
154
- "kind": "ScalarField",
155
- "name": "ascender",
156
- "storageKey": null
157
- }, {
158
- "alias": null,
159
- "args": null,
160
- "kind": "ScalarField",
161
- "name": "descender",
162
- "storageKey": null
163
- }, {
164
- "alias": null,
165
- "args": null,
166
- "kind": "ScalarField",
167
- "name": "xHeight",
168
- "storageKey": null
169
- }, {
170
- "alias": null,
171
- "args": null,
172
- "kind": "ScalarField",
173
- "name": "capHeight",
174
- "storageKey": null
175
- }, {
176
- "alias": null,
177
- "args": null,
178
- "kind": "ScalarField",
179
- "name": "lineGap",
127
+ "concreteType": null,
128
+ "kind": "LinkedField",
129
+ "name": "characters",
130
+ "plural": true,
131
+ "selections": [{
132
+ "alias": null,
133
+ "args": null,
134
+ "kind": "ScalarField",
135
+ "name": "__typename",
136
+ "storageKey": null
137
+ }, {
138
+ "kind": "InlineFragment",
139
+ "selections": [{
140
+ "alias": null,
141
+ "args": null,
142
+ "kind": "ScalarField",
143
+ "name": "string",
144
+ "storageKey": null
145
+ }],
146
+ "type": "CharacterString",
147
+ "abstractKey": null
148
+ }, {
149
+ "kind": "InlineFragment",
150
+ "selections": [{
151
+ "alias": null,
152
+ "args": null,
153
+ "kind": "ScalarField",
154
+ "name": "first",
155
+ "storageKey": null
156
+ }, {
157
+ "alias": null,
158
+ "args": null,
159
+ "kind": "ScalarField",
160
+ "name": "last",
161
+ "storageKey": null
162
+ }],
163
+ "type": "CharacterRange",
164
+ "abstractKey": null
165
+ }],
180
166
  "storageKey": null
181
167
  }],
182
168
  "storageKey": null
183
169
  }],
184
170
  "storageKey": null
185
- };
186
- return {
187
- "argumentDefinitions": [],
188
- "kind": "Fragment",
189
- "metadata": null,
190
- "name": "CharacterViewer_collection",
191
- "selections": [{
171
+ }, {
192
172
  "alias": null,
193
173
  "args": null,
194
174
  "concreteType": "FontStyle",
195
175
  "kind": "LinkedField",
196
176
  "name": "featureStyle",
197
177
  "plural": false,
198
- "selections": [v0 /*: any*/, v2 /*: any*/],
178
+ "selections": [{
179
+ "args": null,
180
+ "kind": "FragmentSpread",
181
+ "name": "CharacterViewer_style"
182
+ }],
199
183
  "storageKey": null
200
- }, v0 /*: any*/, v1 /*: any*/, v3 /*: any*/, v4 /*: any*/, v5 /*: any*/, v8 /*: any*/, {
184
+ }, v5 /*: any*/, {
201
185
  "alias": null,
202
186
  "args": [{
203
187
  "kind": "Literal",
@@ -208,13 +192,13 @@ const node = function () {
208
192
  "kind": "LinkedField",
209
193
  "name": "children",
210
194
  "plural": true,
211
- "selections": [v0 /*: any*/, v1 /*: any*/, v3 /*: any*/, v4 /*: any*/, v5 /*: any*/, v8 /*: any*/],
195
+ "selections": [v0 /*: any*/, v1 /*: any*/, v2 /*: any*/, v3 /*: any*/, v4 /*: any*/, v5 /*: any*/],
212
196
  "storageKey": "children(collectionTypes:[\"FAMILY\"])"
213
197
  }],
214
198
  "type": "FontCollection",
215
199
  "abstractKey": null
216
200
  };
217
201
  }();
218
- node.hash = "2f49d241268129a888942889cad0bebb";
202
+ node.hash = "806e33bb73206ac443c6880d2941131d";
219
203
  var _default = node;
220
204
  exports.default = _default;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @generated SignedSource<<b714a758f0271d0962cc3a22d7657c64>>
2
+ * @generated SignedSource<<6148340fec73d6869d7d10bc4148316d>>
3
3
  * @lightSyntaxTransform
4
4
  * @nogrep
5
5
  */
@@ -9,21 +9,7 @@ export type CharacterViewer_family$data = {
9
9
  readonly collectionType: string;
10
10
  readonly cssUrl: string | null;
11
11
  readonly fontStyles: ReadonlyArray<{
12
- readonly characterBlocks: ReadonlyArray<{
13
- readonly characters: ReadonlyArray<string>;
14
- readonly name: string;
15
- }> | null;
16
12
  readonly cssFamily: string | null;
17
- readonly featureCharacters: ReadonlyArray<{
18
- readonly characters: ReadonlyArray<string>;
19
- readonly feature: string;
20
- readonly name: string;
21
- }> | null;
22
- readonly glyphNames: ReadonlyArray<{
23
- readonly characters: string;
24
- readonly feature: string | null;
25
- readonly name: string;
26
- }> | null;
27
13
  readonly id: string;
28
14
  readonly name: string;
29
15
  readonly variableInstances: ReadonlyArray<{
@@ -33,14 +19,6 @@ export type CharacterViewer_family$data = {
33
19
  }>;
34
20
  readonly name: string;
35
21
  }> | null;
36
- readonly verticalMetrics: {
37
- readonly ascender: number;
38
- readonly capHeight: number | null;
39
- readonly descender: number;
40
- readonly lineGap: number | null;
41
- readonly unitsPerEm: number;
42
- readonly xHeight: number | null;
43
- };
44
22
  }> | null;
45
23
  readonly id: string;
46
24
  readonly isVariableFont: boolean;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  /**
8
- * @generated SignedSource<<b714a758f0271d0962cc3a22d7657c64>>
8
+ * @generated SignedSource<<6148340fec73d6869d7d10bc4148316d>>
9
9
  * @lightSyntaxTransform
10
10
  * @nogrep
11
11
  */
@@ -28,21 +28,7 @@ const node = function () {
28
28
  "kind": "ScalarField",
29
29
  "name": "name",
30
30
  "storageKey": null
31
- },
32
- v2 = {
33
- "alias": null,
34
- "args": null,
35
- "kind": "ScalarField",
36
- "name": "characters",
37
- "storageKey": null
38
- },
39
- v3 = [v2 /*: any*/, {
40
- "alias": null,
41
- "args": null,
42
- "kind": "ScalarField",
43
- "name": "feature",
44
- "storageKey": null
45
- }, v1 /*: any*/];
31
+ };
46
32
  return {
47
33
  "argumentDefinitions": [],
48
34
  "kind": "Fragment",
@@ -80,33 +66,6 @@ const node = function () {
80
66
  "name": "cssFamily",
81
67
  "storageKey": null
82
68
  }, v1 /*: any*/, {
83
- "alias": null,
84
- "args": null,
85
- "concreteType": "CharacterBlock",
86
- "kind": "LinkedField",
87
- "name": "characterBlocks",
88
- "plural": true,
89
- "selections": [v2 /*: any*/, v1 /*: any*/],
90
- "storageKey": null
91
- }, {
92
- "alias": null,
93
- "args": null,
94
- "concreteType": "FeatureCharacters",
95
- "kind": "LinkedField",
96
- "name": "featureCharacters",
97
- "plural": true,
98
- "selections": v3 /*: any*/,
99
- "storageKey": null
100
- }, {
101
- "alias": null,
102
- "args": null,
103
- "concreteType": "GlyphName",
104
- "kind": "LinkedField",
105
- "name": "glyphNames",
106
- "plural": true,
107
- "selections": v3 /*: any*/,
108
- "storageKey": null
109
- }, {
110
69
  "alias": null,
111
70
  "args": null,
112
71
  "concreteType": "VariableInstance",
@@ -136,51 +95,6 @@ const node = function () {
136
95
  "storageKey": null
137
96
  }],
138
97
  "storageKey": null
139
- }, {
140
- "alias": null,
141
- "args": null,
142
- "concreteType": "VerticalMetrics",
143
- "kind": "LinkedField",
144
- "name": "verticalMetrics",
145
- "plural": false,
146
- "selections": [{
147
- "alias": null,
148
- "args": null,
149
- "kind": "ScalarField",
150
- "name": "unitsPerEm",
151
- "storageKey": null
152
- }, {
153
- "alias": null,
154
- "args": null,
155
- "kind": "ScalarField",
156
- "name": "ascender",
157
- "storageKey": null
158
- }, {
159
- "alias": null,
160
- "args": null,
161
- "kind": "ScalarField",
162
- "name": "descender",
163
- "storageKey": null
164
- }, {
165
- "alias": null,
166
- "args": null,
167
- "kind": "ScalarField",
168
- "name": "xHeight",
169
- "storageKey": null
170
- }, {
171
- "alias": null,
172
- "args": null,
173
- "kind": "ScalarField",
174
- "name": "capHeight",
175
- "storageKey": null
176
- }, {
177
- "alias": null,
178
- "args": null,
179
- "kind": "ScalarField",
180
- "name": "lineGap",
181
- "storageKey": null
182
- }],
183
- "storageKey": null
184
98
  }],
185
99
  "storageKey": null
186
100
  }],
@@ -188,6 +102,6 @@ const node = function () {
188
102
  "abstractKey": null
189
103
  };
190
104
  }();
191
- node.hash = "d940cabe9ed658d5cbed547287f2de0e";
105
+ node.hash = "02c42505dc4e330bb7c9034ba54e12f6";
192
106
  var _default = node;
193
107
  exports.default = _default;
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @generated SignedSource<<c333540d19651b5dbe6ef1a05e7c5e37>>
3
+ * @lightSyntaxTransform
4
+ * @nogrep
5
+ */
6
+ import { ReaderFragment } from 'relay-runtime';
7
+ import { FragmentRefs } from "relay-runtime";
8
+ export type CharacterViewer_style$data = {
9
+ readonly cssFamily: string | null;
10
+ readonly glyphNames: ReadonlyArray<{
11
+ readonly characters: string;
12
+ readonly features: ReadonlyArray<string> | null;
13
+ readonly name: string;
14
+ }> | null;
15
+ readonly id: string;
16
+ readonly name: string;
17
+ readonly variableInstances: ReadonlyArray<{
18
+ readonly coordinates: ReadonlyArray<{
19
+ readonly axis: string;
20
+ readonly value: number;
21
+ }>;
22
+ readonly name: string;
23
+ }> | null;
24
+ readonly verticalMetrics: {
25
+ readonly ascender: number;
26
+ readonly capHeight: number | null;
27
+ readonly descender: number;
28
+ readonly lineGap: number | null;
29
+ readonly unitsPerEm: number;
30
+ readonly xHeight: number | null;
31
+ };
32
+ readonly " $fragmentType": "CharacterViewer_style";
33
+ };
34
+ export type CharacterViewer_style$key = {
35
+ readonly " $data"?: CharacterViewer_style$data;
36
+ readonly " $fragmentSpreads": FragmentRefs<"CharacterViewer_style">;
37
+ };
38
+ declare const node: ReaderFragment;
39
+ export default node;