fontdue-js 0.1.0-alpha28 → 0.1.0-alpha30

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/BuyButton.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import BuyButton from './dist/components/BuyButton';
2
+ export * from './dist/components/BuyButton';
3
+ export default BuyButton;
package/BuyButton.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/components/BuyButton');
@@ -0,0 +1,3 @@
1
+ import CartButton from './dist/components/CartButton';
2
+ export * from './dist/components/CartButton';
3
+ export default CartButton;
package/CartButton.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/components/CartButton');
@@ -0,0 +1,3 @@
1
+ import FontdueProvider from './dist/components/FontdueProvider';
2
+ export * from './dist/components/FontdueProvider';
3
+ export default FontdueProvider;
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/components/FontdueProvider');
@@ -0,0 +1,3 @@
1
+ import NewsletterSignup from './dist/components/NewsletterSignup';
2
+ export * from './dist/components/NewsletterSignup';
3
+ export default NewsletterSignup;
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/components/NewsletterSignup');
package/README.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # fontdue-js
2
2
 
3
- [Fontdue.js](https://docs.fontdue.com) components for use in React projects.
3
+ This package exports [Fontdue.js](https://docs.fontdue.com) componnets for React projects.
4
4
 
5
- This is currently alpha software.
5
+ ## Usage
6
+
7
+ 1. Wrap the root of your project with the [`FontdueProvider`](#fontdueprovider) component. For example in a Next.js app, add it to your `_app.tsx`.
8
+ 2. Replace the `url` property with your Fontdue store URL.
9
+ 3. Render the [`StoreModal`](#storemodal) component so that is it available on every page.
10
+ 4. Import the `fontdue-js/fontdue.css` CSS file. (This example uses Next.js)
11
+
12
+ ```tsx
13
+ import type { AppProps } from 'next/app';
14
+ import Head from 'next/head';
15
+ import React from 'react';
16
+ import FontdueProvider from 'fontdue-js/dist/components/FontdueProvider';
17
+ import StoreModal from 'fontdue-js/dist/components/StoreModal';
18
+ import 'fontdue-js/fontdue.css';
19
+
20
+ function MyApp({ Component, pageProps }: AppProps) {
21
+ return (
22
+ <React.Fragment>
23
+ <FontdueProvider url="https://example.fontdue.com" config={{}}>
24
+ <Component {...pageProps} />
25
+
26
+ <StoreModal />
27
+ </FontdueProvider>
28
+ </React.Fragment>
29
+ );
30
+ }
31
+
32
+ export default MyApp;
33
+ ```
@@ -0,0 +1,3 @@
1
+ import StoreModal from './dist/components/StoreModal';
2
+ export * from './dist/components/StoreModal';
3
+ export default StoreModal;
package/StoreModal.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/components/StoreModal');
@@ -0,0 +1,3 @@
1
+ import TestFontsForm from './dist/components/TestFontsForm';
2
+ export * from './dist/components/TestFontsForm';
3
+ export default TestFontsForm;
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/components/TestFontsForm');
@@ -0,0 +1,3 @@
1
+ import TypeTesterStandalone from './dist/components/TypeTester/TypeTesterStandalone';
2
+ export * from './dist/components/TypeTester/TypeTesterStandalone';
3
+ export default TypeTesterStandalone;
package/TypeTester.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/components/TypeTester/TypeTesterStandalone');
@@ -0,0 +1,3 @@
1
+ import TypeTesters from './dist/components/TypeTesters';
2
+ export * from './dist/components/TypeTesters';
3
+ export default TypeTesters;
package/TypeTesters.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/components/TypeTesters');
@@ -0,0 +1,16 @@
1
+ import { ConcreteRequest } from "relay-runtime";
2
+ import { FragmentRefs } from "relay-runtime";
3
+ export declare type CharacterViewer_QueryVariables = {
4
+ collectionId: string;
5
+ };
6
+ export declare type CharacterViewer_QueryResponse = {
7
+ readonly node: {
8
+ readonly " $fragmentRefs": FragmentRefs<"CharacterViewer_collection">;
9
+ } | null;
10
+ };
11
+ export declare type CharacterViewer_Query = {
12
+ readonly response: CharacterViewer_QueryResponse;
13
+ readonly variables: CharacterViewer_QueryVariables;
14
+ };
15
+ declare const node: ConcreteRequest;
16
+ export default node;
@@ -0,0 +1,255 @@
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
+
13
+ /*
14
+ query CharacterViewer_Query(
15
+ $collectionId: ID!
16
+ ) {
17
+ node(id: $collectionId) {
18
+ __typename
19
+ ...CharacterViewer_collection
20
+ id
21
+ }
22
+ }
23
+
24
+ fragment CharacterViewer_collection on FontCollection {
25
+ featureStyle {
26
+ id
27
+ }
28
+ id
29
+ name
30
+ fontStyles {
31
+ id
32
+ cssFamily
33
+ name
34
+ characterBlocks {
35
+ name
36
+ characters
37
+ }
38
+ featureCharacters {
39
+ feature
40
+ name
41
+ characters
42
+ }
43
+ }
44
+ children(collectionTypes: [FAMILY]) {
45
+ id
46
+ name
47
+ fontStyles {
48
+ id
49
+ cssFamily
50
+ name
51
+ characterBlocks {
52
+ name
53
+ characters
54
+ }
55
+ featureCharacters {
56
+ feature
57
+ name
58
+ characters
59
+ }
60
+ }
61
+ }
62
+ }
63
+ */
64
+ const node = function () {
65
+ var v0 = [{
66
+ "defaultValue": null,
67
+ "kind": "LocalArgument",
68
+ "name": "collectionId"
69
+ }],
70
+ v1 = [{
71
+ "kind": "Variable",
72
+ "name": "id",
73
+ "variableName": "collectionId"
74
+ }],
75
+ v2 = {
76
+ "alias": null,
77
+ "args": null,
78
+ "kind": "ScalarField",
79
+ "name": "id",
80
+ "storageKey": null
81
+ },
82
+ v3 = {
83
+ "alias": null,
84
+ "args": null,
85
+ "kind": "ScalarField",
86
+ "name": "name",
87
+ "storageKey": null
88
+ },
89
+ v4 = {
90
+ "alias": null,
91
+ "args": null,
92
+ "kind": "ScalarField",
93
+ "name": "characters",
94
+ "storageKey": null
95
+ },
96
+ v5 = {
97
+ "alias": null,
98
+ "args": null,
99
+ "concreteType": "FontStyle",
100
+ "kind": "LinkedField",
101
+ "name": "fontStyles",
102
+ "plural": true,
103
+ "selections": [v2
104
+ /*: any*/
105
+ , {
106
+ "alias": null,
107
+ "args": null,
108
+ "kind": "ScalarField",
109
+ "name": "cssFamily",
110
+ "storageKey": null
111
+ }, v3
112
+ /*: any*/
113
+ , {
114
+ "alias": null,
115
+ "args": null,
116
+ "concreteType": "CharacterBlock",
117
+ "kind": "LinkedField",
118
+ "name": "characterBlocks",
119
+ "plural": true,
120
+ "selections": [v3
121
+ /*: any*/
122
+ , v4
123
+ /*: any*/
124
+ ],
125
+ "storageKey": null
126
+ }, {
127
+ "alias": null,
128
+ "args": null,
129
+ "concreteType": "FeatureCharacters",
130
+ "kind": "LinkedField",
131
+ "name": "featureCharacters",
132
+ "plural": true,
133
+ "selections": [{
134
+ "alias": null,
135
+ "args": null,
136
+ "kind": "ScalarField",
137
+ "name": "feature",
138
+ "storageKey": null
139
+ }, v3
140
+ /*: any*/
141
+ , v4
142
+ /*: any*/
143
+ ],
144
+ "storageKey": null
145
+ }],
146
+ "storageKey": null
147
+ };
148
+ return {
149
+ "fragment": {
150
+ "argumentDefinitions": v0
151
+ /*: any*/
152
+ ,
153
+ "kind": "Fragment",
154
+ "metadata": null,
155
+ "name": "CharacterViewer_Query",
156
+ "selections": [{
157
+ "alias": null,
158
+ "args": v1
159
+ /*: any*/
160
+ ,
161
+ "concreteType": null,
162
+ "kind": "LinkedField",
163
+ "name": "node",
164
+ "plural": false,
165
+ "selections": [{
166
+ "args": null,
167
+ "kind": "FragmentSpread",
168
+ "name": "CharacterViewer_collection"
169
+ }],
170
+ "storageKey": null
171
+ }],
172
+ "type": "RootQueryType",
173
+ "abstractKey": null
174
+ },
175
+ "kind": "Request",
176
+ "operation": {
177
+ "argumentDefinitions": v0
178
+ /*: any*/
179
+ ,
180
+ "kind": "Operation",
181
+ "name": "CharacterViewer_Query",
182
+ "selections": [{
183
+ "alias": null,
184
+ "args": v1
185
+ /*: any*/
186
+ ,
187
+ "concreteType": null,
188
+ "kind": "LinkedField",
189
+ "name": "node",
190
+ "plural": false,
191
+ "selections": [{
192
+ "alias": null,
193
+ "args": null,
194
+ "kind": "ScalarField",
195
+ "name": "__typename",
196
+ "storageKey": null
197
+ }, v2
198
+ /*: any*/
199
+ , {
200
+ "kind": "InlineFragment",
201
+ "selections": [{
202
+ "alias": null,
203
+ "args": null,
204
+ "concreteType": "FontStyle",
205
+ "kind": "LinkedField",
206
+ "name": "featureStyle",
207
+ "plural": false,
208
+ "selections": [v2
209
+ /*: any*/
210
+ ],
211
+ "storageKey": null
212
+ }, v3
213
+ /*: any*/
214
+ , v5
215
+ /*: any*/
216
+ , {
217
+ "alias": null,
218
+ "args": [{
219
+ "kind": "Literal",
220
+ "name": "collectionTypes",
221
+ "value": ["FAMILY"]
222
+ }],
223
+ "concreteType": "FontCollection",
224
+ "kind": "LinkedField",
225
+ "name": "children",
226
+ "plural": true,
227
+ "selections": [v2
228
+ /*: any*/
229
+ , v3
230
+ /*: any*/
231
+ , v5
232
+ /*: any*/
233
+ ],
234
+ "storageKey": "children(collectionTypes:[\"FAMILY\"])"
235
+ }],
236
+ "type": "FontCollection",
237
+ "abstractKey": null
238
+ }],
239
+ "storageKey": null
240
+ }]
241
+ },
242
+ "params": {
243
+ "cacheID": "20623638a41f7530e73d456e039a0433",
244
+ "id": null,
245
+ "metadata": {},
246
+ "name": "CharacterViewer_Query",
247
+ "operationKind": "query",
248
+ "text": "query CharacterViewer_Query(\n $collectionId: ID!\n) {\n node(id: $collectionId) {\n __typename\n ...CharacterViewer_collection\n id\n }\n}\n\nfragment CharacterViewer_collection on FontCollection {\n featureStyle {\n id\n }\n id\n name\n fontStyles {\n id\n cssFamily\n name\n characterBlocks {\n name\n characters\n }\n featureCharacters {\n feature\n name\n characters\n }\n }\n children(collectionTypes: [FAMILY]) {\n id\n name\n fontStyles {\n id\n cssFamily\n name\n characterBlocks {\n name\n characters\n }\n featureCharacters {\n feature\n name\n characters\n }\n }\n }\n}\n"
249
+ }
250
+ };
251
+ }();
252
+
253
+ node.hash = '10b58f0e5e086adbcd2a0d4cd44c442c';
254
+ var _default = node;
255
+ exports.default = _default;
@@ -0,0 +1,49 @@
1
+ import { ReaderFragment } from "relay-runtime";
2
+ import { FragmentRefs } from "relay-runtime";
3
+ export declare type CharacterViewer_collection = {
4
+ readonly featureStyle: {
5
+ readonly id: string;
6
+ } | null;
7
+ readonly id: string;
8
+ readonly name: string;
9
+ readonly fontStyles: ReadonlyArray<{
10
+ readonly id: string;
11
+ readonly cssFamily: string | null;
12
+ readonly name: string;
13
+ readonly characterBlocks: ReadonlyArray<{
14
+ readonly name: string;
15
+ readonly characters: ReadonlyArray<string>;
16
+ }> | null;
17
+ readonly featureCharacters: ReadonlyArray<{
18
+ readonly feature: string;
19
+ readonly name: string;
20
+ readonly characters: ReadonlyArray<string>;
21
+ }> | null;
22
+ }> | null;
23
+ readonly children: ReadonlyArray<{
24
+ readonly id: string;
25
+ readonly name: string;
26
+ readonly fontStyles: ReadonlyArray<{
27
+ readonly id: string;
28
+ readonly cssFamily: string | null;
29
+ readonly name: string;
30
+ readonly characterBlocks: ReadonlyArray<{
31
+ readonly name: string;
32
+ readonly characters: ReadonlyArray<string>;
33
+ }> | null;
34
+ readonly featureCharacters: ReadonlyArray<{
35
+ readonly feature: string;
36
+ readonly name: string;
37
+ readonly characters: ReadonlyArray<string>;
38
+ }> | null;
39
+ }> | null;
40
+ }> | null;
41
+ readonly " $refType": "CharacterViewer_collection";
42
+ };
43
+ export declare type CharacterViewer_collection$data = CharacterViewer_collection;
44
+ export declare type CharacterViewer_collection$key = {
45
+ readonly " $data"?: CharacterViewer_collection$data;
46
+ readonly " $fragmentRefs": FragmentRefs<"CharacterViewer_collection">;
47
+ };
48
+ declare const node: ReaderFragment;
49
+ export default node;
@@ -0,0 +1,135 @@
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 = function () {
13
+ var v0 = {
14
+ "alias": null,
15
+ "args": null,
16
+ "kind": "ScalarField",
17
+ "name": "id",
18
+ "storageKey": null
19
+ },
20
+ v1 = {
21
+ "alias": null,
22
+ "args": null,
23
+ "kind": "ScalarField",
24
+ "name": "name",
25
+ "storageKey": null
26
+ },
27
+ v2 = {
28
+ "alias": null,
29
+ "args": null,
30
+ "kind": "ScalarField",
31
+ "name": "characters",
32
+ "storageKey": null
33
+ },
34
+ v3 = {
35
+ "alias": null,
36
+ "args": null,
37
+ "concreteType": "FontStyle",
38
+ "kind": "LinkedField",
39
+ "name": "fontStyles",
40
+ "plural": true,
41
+ "selections": [v0
42
+ /*: any*/
43
+ , {
44
+ "alias": null,
45
+ "args": null,
46
+ "kind": "ScalarField",
47
+ "name": "cssFamily",
48
+ "storageKey": null
49
+ }, v1
50
+ /*: any*/
51
+ , {
52
+ "alias": null,
53
+ "args": null,
54
+ "concreteType": "CharacterBlock",
55
+ "kind": "LinkedField",
56
+ "name": "characterBlocks",
57
+ "plural": true,
58
+ "selections": [v1
59
+ /*: any*/
60
+ , v2
61
+ /*: any*/
62
+ ],
63
+ "storageKey": null
64
+ }, {
65
+ "alias": null,
66
+ "args": null,
67
+ "concreteType": "FeatureCharacters",
68
+ "kind": "LinkedField",
69
+ "name": "featureCharacters",
70
+ "plural": true,
71
+ "selections": [{
72
+ "alias": null,
73
+ "args": null,
74
+ "kind": "ScalarField",
75
+ "name": "feature",
76
+ "storageKey": null
77
+ }, v1
78
+ /*: any*/
79
+ , v2
80
+ /*: any*/
81
+ ],
82
+ "storageKey": null
83
+ }],
84
+ "storageKey": null
85
+ };
86
+ return {
87
+ "argumentDefinitions": [],
88
+ "kind": "Fragment",
89
+ "metadata": null,
90
+ "name": "CharacterViewer_collection",
91
+ "selections": [{
92
+ "alias": null,
93
+ "args": null,
94
+ "concreteType": "FontStyle",
95
+ "kind": "LinkedField",
96
+ "name": "featureStyle",
97
+ "plural": false,
98
+ "selections": [v0
99
+ /*: any*/
100
+ ],
101
+ "storageKey": null
102
+ }, v0
103
+ /*: any*/
104
+ , v1
105
+ /*: any*/
106
+ , v3
107
+ /*: any*/
108
+ , {
109
+ "alias": null,
110
+ "args": [{
111
+ "kind": "Literal",
112
+ "name": "collectionTypes",
113
+ "value": ["FAMILY"]
114
+ }],
115
+ "concreteType": "FontCollection",
116
+ "kind": "LinkedField",
117
+ "name": "children",
118
+ "plural": true,
119
+ "selections": [v0
120
+ /*: any*/
121
+ , v1
122
+ /*: any*/
123
+ , v3
124
+ /*: any*/
125
+ ],
126
+ "storageKey": "children(collectionTypes:[\"FAMILY\"])"
127
+ }],
128
+ "type": "FontCollection",
129
+ "abstractKey": null
130
+ };
131
+ }();
132
+
133
+ node.hash = '6f5a8250fc907a798d7e83c8a9ce3f45';
134
+ var _default = node;
135
+ exports.default = _default;
@@ -0,0 +1,28 @@
1
+ import { ReaderFragment } from "relay-runtime";
2
+ import { FragmentRefs } from "relay-runtime";
3
+ export declare type CharacterViewer_family = {
4
+ readonly id: string;
5
+ readonly name: string;
6
+ readonly fontStyles: ReadonlyArray<{
7
+ readonly id: string;
8
+ readonly cssFamily: string | null;
9
+ readonly name: string;
10
+ readonly characterBlocks: ReadonlyArray<{
11
+ readonly name: string;
12
+ readonly characters: ReadonlyArray<string>;
13
+ }> | null;
14
+ readonly featureCharacters: ReadonlyArray<{
15
+ readonly feature: string;
16
+ readonly name: string;
17
+ readonly characters: ReadonlyArray<string>;
18
+ }> | null;
19
+ }> | null;
20
+ readonly " $refType": "CharacterViewer_family";
21
+ };
22
+ export declare type CharacterViewer_family$data = CharacterViewer_family;
23
+ export declare type CharacterViewer_family$key = {
24
+ readonly " $data"?: CharacterViewer_family$data;
25
+ readonly " $fragmentRefs": FragmentRefs<"CharacterViewer_family">;
26
+ };
27
+ declare const node: ReaderFragment;
28
+ export default node;
@@ -0,0 +1,102 @@
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 = function () {
13
+ var v0 = {
14
+ "alias": null,
15
+ "args": null,
16
+ "kind": "ScalarField",
17
+ "name": "id",
18
+ "storageKey": null
19
+ },
20
+ v1 = {
21
+ "alias": null,
22
+ "args": null,
23
+ "kind": "ScalarField",
24
+ "name": "name",
25
+ "storageKey": null
26
+ },
27
+ v2 = {
28
+ "alias": null,
29
+ "args": null,
30
+ "kind": "ScalarField",
31
+ "name": "characters",
32
+ "storageKey": null
33
+ };
34
+ return {
35
+ "argumentDefinitions": [],
36
+ "kind": "Fragment",
37
+ "metadata": null,
38
+ "name": "CharacterViewer_family",
39
+ "selections": [v0
40
+ /*: any*/
41
+ , v1
42
+ /*: any*/
43
+ , {
44
+ "alias": null,
45
+ "args": null,
46
+ "concreteType": "FontStyle",
47
+ "kind": "LinkedField",
48
+ "name": "fontStyles",
49
+ "plural": true,
50
+ "selections": [v0
51
+ /*: any*/
52
+ , {
53
+ "alias": null,
54
+ "args": null,
55
+ "kind": "ScalarField",
56
+ "name": "cssFamily",
57
+ "storageKey": null
58
+ }, v1
59
+ /*: any*/
60
+ , {
61
+ "alias": null,
62
+ "args": null,
63
+ "concreteType": "CharacterBlock",
64
+ "kind": "LinkedField",
65
+ "name": "characterBlocks",
66
+ "plural": true,
67
+ "selections": [v1
68
+ /*: any*/
69
+ , v2
70
+ /*: any*/
71
+ ],
72
+ "storageKey": null
73
+ }, {
74
+ "alias": null,
75
+ "args": null,
76
+ "concreteType": "FeatureCharacters",
77
+ "kind": "LinkedField",
78
+ "name": "featureCharacters",
79
+ "plural": true,
80
+ "selections": [{
81
+ "alias": null,
82
+ "args": null,
83
+ "kind": "ScalarField",
84
+ "name": "feature",
85
+ "storageKey": null
86
+ }, v1
87
+ /*: any*/
88
+ , v2
89
+ /*: any*/
90
+ ],
91
+ "storageKey": null
92
+ }],
93
+ "storageKey": null
94
+ }],
95
+ "type": "FontCollection",
96
+ "abstractKey": null
97
+ };
98
+ }();
99
+
100
+ node.hash = '2883e053de6bd4a34d802fe4af824991';
101
+ var _default = node;
102
+ exports.default = _default;