fontdue-js 0.1.0-alpha22 → 0.1.0-alpha23
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/dist/__generated__/TypeTesterData_typeTester.graphql.d.ts +1 -0
- package/dist/__generated__/TypeTesterData_typeTester.graphql.js +48 -40
- package/dist/__generated__/TypeTesterFloatingToolbar_testers.graphql.d.ts +16 -0
- package/dist/__generated__/TypeTesterFloatingToolbar_testers.graphql.js +44 -0
- package/dist/__generated__/TypeTestersIDQuery.graphql.js +62 -14
- package/dist/__generated__/TypeTestersSlugQuery.graphql.js +62 -14
- package/dist/__generated__/TypeTesters_collection.graphql.d.ts +7 -1
- package/dist/__generated__/TypeTesters_collection.graphql.js +32 -4
- package/dist/components/TypeTester/TypeTesterContext.d.ts +44 -6
- package/dist/components/TypeTester/TypeTesterContext.js +113 -9
- package/dist/components/TypeTester/TypeTesterFeatures.d.ts +1 -2
- package/dist/components/TypeTester/TypeTesterFeatures.js +68 -7
- package/dist/components/TypeTester/TypeTesterFloatingToolbar.d.ts +8 -0
- package/dist/components/TypeTester/TypeTesterFloatingToolbar.js +88 -0
- package/dist/components/TypeTester/TypeTesterStandalone.js +11 -5
- package/dist/components/TypeTester/TypeTesterState.d.ts +1 -4
- package/dist/components/TypeTester/TypeTesterState.js +56 -67
- package/dist/components/TypeTester/TypeTesterStyleSelectData.d.ts +1 -1
- package/dist/components/TypeTester/TypeTesterStyleSelectData.js +3 -1
- package/dist/components/TypeTester/TypeTesterToolbar.d.ts +9 -0
- package/dist/components/TypeTester/TypeTesterToolbar.js +55 -0
- package/dist/components/TypeTester/index.d.ts +2 -5
- package/dist/components/TypeTester/index.js +32 -101
- package/dist/components/TypeTesterData/index.js +2 -1
- package/dist/components/TypeTesters/index.d.ts +1 -0
- package/dist/components/TypeTesters/index.js +55 -20
- package/fontdue.css +2 -3
- package/fontdue.css.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReaderFragment } from "relay-runtime";
|
|
2
2
|
import { FragmentRefs } from "relay-runtime";
|
|
3
3
|
export declare type TypeTesterData_typeTester = {
|
|
4
|
+
readonly id: string;
|
|
4
5
|
readonly content: string | null;
|
|
5
6
|
readonly size: string | null;
|
|
6
7
|
readonly lineHeight: string | null;
|
|
@@ -9,54 +9,62 @@ exports.default = void 0;
|
|
|
9
9
|
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
// @ts-nocheck
|
|
12
|
-
const node = {
|
|
13
|
-
|
|
14
|
-
"kind": "Fragment",
|
|
15
|
-
"metadata": null,
|
|
16
|
-
"name": "TypeTesterData_typeTester",
|
|
17
|
-
"selections": [{
|
|
12
|
+
const node = function () {
|
|
13
|
+
var v0 = {
|
|
18
14
|
"alias": null,
|
|
19
15
|
"args": null,
|
|
20
16
|
"kind": "ScalarField",
|
|
21
|
-
"name": "
|
|
17
|
+
"name": "id",
|
|
22
18
|
"storageKey": null
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
"kind": "
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"kind": "ScalarField",
|
|
33
|
-
"name": "lineHeight",
|
|
34
|
-
"storageKey": null
|
|
35
|
-
}, {
|
|
36
|
-
"alias": null,
|
|
37
|
-
"args": null,
|
|
38
|
-
"kind": "ScalarField",
|
|
39
|
-
"name": "direction",
|
|
40
|
-
"storageKey": null
|
|
41
|
-
}, {
|
|
42
|
-
"alias": null,
|
|
43
|
-
"args": null,
|
|
44
|
-
"concreteType": "FontStyle",
|
|
45
|
-
"kind": "LinkedField",
|
|
46
|
-
"name": "fontStyle",
|
|
47
|
-
"plural": false,
|
|
48
|
-
"selections": [{
|
|
19
|
+
};
|
|
20
|
+
return {
|
|
21
|
+
"argumentDefinitions": [],
|
|
22
|
+
"kind": "Fragment",
|
|
23
|
+
"metadata": null,
|
|
24
|
+
"name": "TypeTesterData_typeTester",
|
|
25
|
+
"selections": [v0
|
|
26
|
+
/*: any*/
|
|
27
|
+
, {
|
|
49
28
|
"alias": null,
|
|
50
29
|
"args": null,
|
|
51
30
|
"kind": "ScalarField",
|
|
52
|
-
"name": "
|
|
31
|
+
"name": "content",
|
|
32
|
+
"storageKey": null
|
|
33
|
+
}, {
|
|
34
|
+
"alias": null,
|
|
35
|
+
"args": null,
|
|
36
|
+
"kind": "ScalarField",
|
|
37
|
+
"name": "size",
|
|
38
|
+
"storageKey": null
|
|
39
|
+
}, {
|
|
40
|
+
"alias": null,
|
|
41
|
+
"args": null,
|
|
42
|
+
"kind": "ScalarField",
|
|
43
|
+
"name": "lineHeight",
|
|
44
|
+
"storageKey": null
|
|
45
|
+
}, {
|
|
46
|
+
"alias": null,
|
|
47
|
+
"args": null,
|
|
48
|
+
"kind": "ScalarField",
|
|
49
|
+
"name": "direction",
|
|
50
|
+
"storageKey": null
|
|
51
|
+
}, {
|
|
52
|
+
"alias": null,
|
|
53
|
+
"args": null,
|
|
54
|
+
"concreteType": "FontStyle",
|
|
55
|
+
"kind": "LinkedField",
|
|
56
|
+
"name": "fontStyle",
|
|
57
|
+
"plural": false,
|
|
58
|
+
"selections": [v0
|
|
59
|
+
/*: any*/
|
|
60
|
+
],
|
|
53
61
|
"storageKey": null
|
|
54
62
|
}],
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
node.hash = '
|
|
63
|
+
"type": "TypeTester",
|
|
64
|
+
"abstractKey": null
|
|
65
|
+
};
|
|
66
|
+
}();
|
|
67
|
+
|
|
68
|
+
node.hash = 'b70c99fcfa0146529e7879c8704f8a35';
|
|
61
69
|
var _default = node;
|
|
62
70
|
exports.default = _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReaderFragment } from "relay-runtime";
|
|
2
|
+
import { FragmentRefs } from "relay-runtime";
|
|
3
|
+
export declare type TypeTesterFloatingToolbar_testers = ReadonlyArray<{
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly fontStyle: {
|
|
6
|
+
readonly " $fragmentRefs": FragmentRefs<"TypeTesterFeatures_fontStyle">;
|
|
7
|
+
} | null;
|
|
8
|
+
readonly " $refType": "TypeTesterFloatingToolbar_testers";
|
|
9
|
+
}>;
|
|
10
|
+
export declare type TypeTesterFloatingToolbar_testers$data = TypeTesterFloatingToolbar_testers;
|
|
11
|
+
export declare type TypeTesterFloatingToolbar_testers$key = ReadonlyArray<{
|
|
12
|
+
readonly " $data"?: TypeTesterFloatingToolbar_testers$data;
|
|
13
|
+
readonly " $fragmentRefs": FragmentRefs<"TypeTesterFloatingToolbar_testers">;
|
|
14
|
+
}>;
|
|
15
|
+
declare const node: ReaderFragment;
|
|
16
|
+
export default node;
|
|
@@ -0,0 +1,44 @@
|
|
|
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": {
|
|
16
|
+
"plural": true
|
|
17
|
+
},
|
|
18
|
+
"name": "TypeTesterFloatingToolbar_testers",
|
|
19
|
+
"selections": [{
|
|
20
|
+
"alias": null,
|
|
21
|
+
"args": null,
|
|
22
|
+
"kind": "ScalarField",
|
|
23
|
+
"name": "id",
|
|
24
|
+
"storageKey": null
|
|
25
|
+
}, {
|
|
26
|
+
"alias": null,
|
|
27
|
+
"args": null,
|
|
28
|
+
"concreteType": "FontStyle",
|
|
29
|
+
"kind": "LinkedField",
|
|
30
|
+
"name": "fontStyle",
|
|
31
|
+
"plural": false,
|
|
32
|
+
"selections": [{
|
|
33
|
+
"args": null,
|
|
34
|
+
"kind": "FragmentSpread",
|
|
35
|
+
"name": "TypeTesterFeatures_fontStyle"
|
|
36
|
+
}],
|
|
37
|
+
"storageKey": null
|
|
38
|
+
}],
|
|
39
|
+
"type": "TypeTester",
|
|
40
|
+
"abstractKey": null
|
|
41
|
+
};
|
|
42
|
+
node.hash = '5554933cac70854b361575a5ed0af8ac';
|
|
43
|
+
var _default = node;
|
|
44
|
+
exports.default = _default;
|
|
@@ -67,12 +67,20 @@ fragment SelectButton_sku_2AMk59 on Sku {
|
|
|
67
67
|
...SKUPrice_sku_2AMk59
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
fragment
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
fragment TypeTesterFeatures_fontStyle on FontStyle {
|
|
71
|
+
fontFeatures {
|
|
72
|
+
supportedFeatures
|
|
73
|
+
stylisticSetNames {
|
|
74
|
+
featureName
|
|
75
|
+
humanName
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
fragment TypeTesterFloatingToolbar_testers on TypeTester {
|
|
81
|
+
id
|
|
75
82
|
fontStyle {
|
|
83
|
+
...TypeTesterFeatures_fontStyle
|
|
76
84
|
id
|
|
77
85
|
}
|
|
78
86
|
}
|
|
@@ -81,14 +89,18 @@ fragment TypeTesters_collection_12wzh on FontCollection {
|
|
|
81
89
|
typeTesters(first: 999, tags: $tags, excludeTags: $excludeTags) {
|
|
82
90
|
edges {
|
|
83
91
|
node {
|
|
84
|
-
|
|
92
|
+
id
|
|
93
|
+
content
|
|
94
|
+
size
|
|
95
|
+
lineHeight
|
|
96
|
+
direction
|
|
85
97
|
fontStyle {
|
|
98
|
+
id
|
|
86
99
|
family {
|
|
87
100
|
id
|
|
88
101
|
}
|
|
89
|
-
id
|
|
90
102
|
}
|
|
91
|
-
|
|
103
|
+
...TypeTesterFloatingToolbar_testers
|
|
92
104
|
}
|
|
93
105
|
}
|
|
94
106
|
}
|
|
@@ -363,7 +375,9 @@ const node = function () {
|
|
|
363
375
|
"kind": "LinkedField",
|
|
364
376
|
"name": "node",
|
|
365
377
|
"plural": false,
|
|
366
|
-
"selections": [
|
|
378
|
+
"selections": [v7
|
|
379
|
+
/*: any*/
|
|
380
|
+
, {
|
|
367
381
|
"alias": null,
|
|
368
382
|
"args": null,
|
|
369
383
|
"kind": "ScalarField",
|
|
@@ -407,11 +421,45 @@ const node = function () {
|
|
|
407
421
|
/*: any*/
|
|
408
422
|
],
|
|
409
423
|
"storageKey": null
|
|
424
|
+
}, {
|
|
425
|
+
"alias": null,
|
|
426
|
+
"args": null,
|
|
427
|
+
"concreteType": "FontFeatures",
|
|
428
|
+
"kind": "LinkedField",
|
|
429
|
+
"name": "fontFeatures",
|
|
430
|
+
"plural": false,
|
|
431
|
+
"selections": [{
|
|
432
|
+
"alias": null,
|
|
433
|
+
"args": null,
|
|
434
|
+
"kind": "ScalarField",
|
|
435
|
+
"name": "supportedFeatures",
|
|
436
|
+
"storageKey": null
|
|
437
|
+
}, {
|
|
438
|
+
"alias": null,
|
|
439
|
+
"args": null,
|
|
440
|
+
"concreteType": "StylisticSetName",
|
|
441
|
+
"kind": "LinkedField",
|
|
442
|
+
"name": "stylisticSetNames",
|
|
443
|
+
"plural": true,
|
|
444
|
+
"selections": [{
|
|
445
|
+
"alias": null,
|
|
446
|
+
"args": null,
|
|
447
|
+
"kind": "ScalarField",
|
|
448
|
+
"name": "featureName",
|
|
449
|
+
"storageKey": null
|
|
450
|
+
}, {
|
|
451
|
+
"alias": null,
|
|
452
|
+
"args": null,
|
|
453
|
+
"kind": "ScalarField",
|
|
454
|
+
"name": "humanName",
|
|
455
|
+
"storageKey": null
|
|
456
|
+
}],
|
|
457
|
+
"storageKey": null
|
|
458
|
+
}],
|
|
459
|
+
"storageKey": null
|
|
410
460
|
}],
|
|
411
461
|
"storageKey": null
|
|
412
|
-
},
|
|
413
|
-
/*: any*/
|
|
414
|
-
],
|
|
462
|
+
}],
|
|
415
463
|
"storageKey": null
|
|
416
464
|
}],
|
|
417
465
|
"storageKey": null
|
|
@@ -450,12 +498,12 @@ const node = function () {
|
|
|
450
498
|
}]
|
|
451
499
|
},
|
|
452
500
|
"params": {
|
|
453
|
-
"cacheID": "
|
|
501
|
+
"cacheID": "b623cd3ca5cfeb1253c989086e1ad636",
|
|
454
502
|
"id": null,
|
|
455
503
|
"metadata": {},
|
|
456
504
|
"name": "TypeTestersIDQuery",
|
|
457
505
|
"operationKind": "query",
|
|
458
|
-
"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
|
|
506
|
+
"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}\n"
|
|
459
507
|
}
|
|
460
508
|
};
|
|
461
509
|
}();
|
|
@@ -72,12 +72,20 @@ fragment SelectButton_sku_2AMk59 on Sku {
|
|
|
72
72
|
...SKUPrice_sku_2AMk59
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
fragment
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
fragment TypeTesterFeatures_fontStyle on FontStyle {
|
|
76
|
+
fontFeatures {
|
|
77
|
+
supportedFeatures
|
|
78
|
+
stylisticSetNames {
|
|
79
|
+
featureName
|
|
80
|
+
humanName
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
fragment TypeTesterFloatingToolbar_testers on TypeTester {
|
|
86
|
+
id
|
|
80
87
|
fontStyle {
|
|
88
|
+
...TypeTesterFeatures_fontStyle
|
|
81
89
|
id
|
|
82
90
|
}
|
|
83
91
|
}
|
|
@@ -86,14 +94,18 @@ fragment TypeTesters_collection_12wzh on FontCollection {
|
|
|
86
94
|
typeTesters(first: 999, tags: $tags, excludeTags: $excludeTags) {
|
|
87
95
|
edges {
|
|
88
96
|
node {
|
|
89
|
-
|
|
97
|
+
id
|
|
98
|
+
content
|
|
99
|
+
size
|
|
100
|
+
lineHeight
|
|
101
|
+
direction
|
|
90
102
|
fontStyle {
|
|
103
|
+
id
|
|
91
104
|
family {
|
|
92
105
|
id
|
|
93
106
|
}
|
|
94
|
-
id
|
|
95
107
|
}
|
|
96
|
-
|
|
108
|
+
...TypeTesterFloatingToolbar_testers
|
|
97
109
|
}
|
|
98
110
|
}
|
|
99
111
|
}
|
|
@@ -390,7 +402,9 @@ const node = function () {
|
|
|
390
402
|
"kind": "LinkedField",
|
|
391
403
|
"name": "node",
|
|
392
404
|
"plural": false,
|
|
393
|
-
"selections": [
|
|
405
|
+
"selections": [v7
|
|
406
|
+
/*: any*/
|
|
407
|
+
, {
|
|
394
408
|
"alias": null,
|
|
395
409
|
"args": null,
|
|
396
410
|
"kind": "ScalarField",
|
|
@@ -434,11 +448,45 @@ const node = function () {
|
|
|
434
448
|
/*: any*/
|
|
435
449
|
],
|
|
436
450
|
"storageKey": null
|
|
451
|
+
}, {
|
|
452
|
+
"alias": null,
|
|
453
|
+
"args": null,
|
|
454
|
+
"concreteType": "FontFeatures",
|
|
455
|
+
"kind": "LinkedField",
|
|
456
|
+
"name": "fontFeatures",
|
|
457
|
+
"plural": false,
|
|
458
|
+
"selections": [{
|
|
459
|
+
"alias": null,
|
|
460
|
+
"args": null,
|
|
461
|
+
"kind": "ScalarField",
|
|
462
|
+
"name": "supportedFeatures",
|
|
463
|
+
"storageKey": null
|
|
464
|
+
}, {
|
|
465
|
+
"alias": null,
|
|
466
|
+
"args": null,
|
|
467
|
+
"concreteType": "StylisticSetName",
|
|
468
|
+
"kind": "LinkedField",
|
|
469
|
+
"name": "stylisticSetNames",
|
|
470
|
+
"plural": true,
|
|
471
|
+
"selections": [{
|
|
472
|
+
"alias": null,
|
|
473
|
+
"args": null,
|
|
474
|
+
"kind": "ScalarField",
|
|
475
|
+
"name": "featureName",
|
|
476
|
+
"storageKey": null
|
|
477
|
+
}, {
|
|
478
|
+
"alias": null,
|
|
479
|
+
"args": null,
|
|
480
|
+
"kind": "ScalarField",
|
|
481
|
+
"name": "humanName",
|
|
482
|
+
"storageKey": null
|
|
483
|
+
}],
|
|
484
|
+
"storageKey": null
|
|
485
|
+
}],
|
|
486
|
+
"storageKey": null
|
|
437
487
|
}],
|
|
438
488
|
"storageKey": null
|
|
439
|
-
},
|
|
440
|
-
/*: any*/
|
|
441
|
-
],
|
|
489
|
+
}],
|
|
442
490
|
"storageKey": null
|
|
443
491
|
}],
|
|
444
492
|
"storageKey": null
|
|
@@ -484,12 +532,12 @@ const node = function () {
|
|
|
484
532
|
}]
|
|
485
533
|
},
|
|
486
534
|
"params": {
|
|
487
|
-
"cacheID": "
|
|
535
|
+
"cacheID": "fa11071ff4d490f9477f204b58c7c368",
|
|
488
536
|
"id": null,
|
|
489
537
|
"metadata": {},
|
|
490
538
|
"name": "TypeTestersSlugQuery",
|
|
491
539
|
"operationKind": "query",
|
|
492
|
-
"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
|
|
540
|
+
"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}\n"
|
|
493
541
|
}
|
|
494
542
|
};
|
|
495
543
|
}();
|
|
@@ -4,12 +4,18 @@ export declare type TypeTesters_collection = {
|
|
|
4
4
|
readonly typeTesters: {
|
|
5
5
|
readonly edges: ReadonlyArray<{
|
|
6
6
|
readonly node: {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly content: string | null;
|
|
9
|
+
readonly size: string | null;
|
|
10
|
+
readonly lineHeight: string | null;
|
|
11
|
+
readonly direction: string | null;
|
|
7
12
|
readonly fontStyle: {
|
|
13
|
+
readonly id: string;
|
|
8
14
|
readonly family: {
|
|
9
15
|
readonly id: string;
|
|
10
16
|
} | null;
|
|
11
17
|
} | null;
|
|
12
|
-
readonly " $fragmentRefs": FragmentRefs<"
|
|
18
|
+
readonly " $fragmentRefs": FragmentRefs<"TypeTesterFloatingToolbar_testers">;
|
|
13
19
|
} | null;
|
|
14
20
|
} | null> | null;
|
|
15
21
|
} | null;
|
|
@@ -77,14 +77,42 @@ const node = function () {
|
|
|
77
77
|
"kind": "LinkedField",
|
|
78
78
|
"name": "node",
|
|
79
79
|
"plural": false,
|
|
80
|
-
"selections": [
|
|
80
|
+
"selections": [v0
|
|
81
|
+
/*: any*/
|
|
82
|
+
, {
|
|
83
|
+
"alias": null,
|
|
84
|
+
"args": null,
|
|
85
|
+
"kind": "ScalarField",
|
|
86
|
+
"name": "content",
|
|
87
|
+
"storageKey": null
|
|
88
|
+
}, {
|
|
89
|
+
"alias": null,
|
|
90
|
+
"args": null,
|
|
91
|
+
"kind": "ScalarField",
|
|
92
|
+
"name": "size",
|
|
93
|
+
"storageKey": null
|
|
94
|
+
}, {
|
|
95
|
+
"alias": null,
|
|
96
|
+
"args": null,
|
|
97
|
+
"kind": "ScalarField",
|
|
98
|
+
"name": "lineHeight",
|
|
99
|
+
"storageKey": null
|
|
100
|
+
}, {
|
|
101
|
+
"alias": null,
|
|
102
|
+
"args": null,
|
|
103
|
+
"kind": "ScalarField",
|
|
104
|
+
"name": "direction",
|
|
105
|
+
"storageKey": null
|
|
106
|
+
}, {
|
|
81
107
|
"alias": null,
|
|
82
108
|
"args": null,
|
|
83
109
|
"concreteType": "FontStyle",
|
|
84
110
|
"kind": "LinkedField",
|
|
85
111
|
"name": "fontStyle",
|
|
86
112
|
"plural": false,
|
|
87
|
-
"selections": [
|
|
113
|
+
"selections": [v0
|
|
114
|
+
/*: any*/
|
|
115
|
+
, {
|
|
88
116
|
"alias": null,
|
|
89
117
|
"args": null,
|
|
90
118
|
"concreteType": "FontCollection",
|
|
@@ -100,7 +128,7 @@ const node = function () {
|
|
|
100
128
|
}, {
|
|
101
129
|
"args": null,
|
|
102
130
|
"kind": "FragmentSpread",
|
|
103
|
-
"name": "
|
|
131
|
+
"name": "TypeTesterFloatingToolbar_testers"
|
|
104
132
|
}],
|
|
105
133
|
"storageKey": null
|
|
106
134
|
}],
|
|
@@ -140,6 +168,6 @@ const node = function () {
|
|
|
140
168
|
};
|
|
141
169
|
}();
|
|
142
170
|
|
|
143
|
-
node.hash = '
|
|
171
|
+
node.hash = '8d4ae7b44edf5638fd2cac112aa6a3af';
|
|
144
172
|
var _default = node;
|
|
145
173
|
exports.default = _default;
|
|
@@ -1,28 +1,66 @@
|
|
|
1
1
|
import React, { Dispatch } from 'react';
|
|
2
2
|
import { Content, Features, Size, TypeTesterMode } from './types';
|
|
3
|
+
interface TypeTesterState {
|
|
4
|
+
content: Content;
|
|
5
|
+
contentEdited: boolean;
|
|
6
|
+
features: Features;
|
|
7
|
+
size: Size;
|
|
8
|
+
lineHeight: number;
|
|
9
|
+
focused: boolean;
|
|
10
|
+
featuresOpen: boolean;
|
|
11
|
+
autofit: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface TypeTestersState {
|
|
14
|
+
[id: string]: TypeTesterState;
|
|
15
|
+
}
|
|
16
|
+
export interface TypeTestersInitialState {
|
|
17
|
+
[id: string]: {
|
|
18
|
+
content: string | null;
|
|
19
|
+
size: number | null;
|
|
20
|
+
lineHeight: number | null;
|
|
21
|
+
autofit: boolean;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
3
24
|
interface TypeTesterContextState {
|
|
4
25
|
mode: TypeTesterMode;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
size: Size | null;
|
|
26
|
+
globalFeaturesOpen: boolean;
|
|
27
|
+
testers: TypeTestersState;
|
|
8
28
|
}
|
|
9
29
|
declare type TypeTesterContextAction = {
|
|
10
30
|
type: 'TOGGLE_MODE';
|
|
31
|
+
} | {
|
|
32
|
+
type: 'TOGGLE_GLOBAL_FEATURES_OPEN';
|
|
11
33
|
} | {
|
|
12
34
|
type: 'SET_CONTENT';
|
|
13
|
-
|
|
35
|
+
id: string;
|
|
36
|
+
value: Content;
|
|
14
37
|
} | {
|
|
15
38
|
type: 'SET_SIZE';
|
|
16
|
-
|
|
39
|
+
id: string;
|
|
40
|
+
value: Size;
|
|
17
41
|
} | {
|
|
18
42
|
type: 'SET_FEATURES';
|
|
19
|
-
|
|
43
|
+
id: string;
|
|
44
|
+
value: Features;
|
|
45
|
+
} | {
|
|
46
|
+
type: 'SET_FEATURES_OPEN';
|
|
47
|
+
id: string;
|
|
48
|
+
value: boolean;
|
|
49
|
+
} | {
|
|
50
|
+
type: 'SET_FOCUSED';
|
|
51
|
+
id: string;
|
|
52
|
+
value: boolean;
|
|
53
|
+
} | {
|
|
54
|
+
type: 'SET_LINE_HEIGHT';
|
|
55
|
+
id: string;
|
|
56
|
+
value: number;
|
|
20
57
|
};
|
|
21
58
|
export declare const TypeTesterContext: React.Context<TypeTesterContextState & {
|
|
22
59
|
dispatch: Dispatch<TypeTesterContextAction>;
|
|
23
60
|
}>;
|
|
24
61
|
export interface TypeTesterContextProps {
|
|
25
62
|
defaultMode?: 'group' | 'local';
|
|
63
|
+
testers: TypeTestersInitialState;
|
|
26
64
|
}
|
|
27
65
|
declare const TypeTesterContextComponent: React.FunctionComponent<TypeTesterContextProps>;
|
|
28
66
|
export default TypeTesterContextComponent;
|