react-datocms 4.0.4 → 4.0.5

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/useQuerySubscription/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EACL,gBAAgB,GAKjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,2BAA2B,IAAI,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAyB9F,MAAM,UAAU,oBAAoB,CAGlC,OAA0D;IAClD,IAAA,OAAO,GAA4B,OAAO,QAAnC,EAAE,WAAW,GAAe,OAAO,YAAtB,EAAK,KAAK,UAAK,OAAO,EAA5C,0BAAkC,CAAF,CAAa;IAE7C,IAAA,KAAoB,QAAQ,CAA0B,IAAI,CAAC,EAA1D,KAAK,QAAA,EAAE,QAAQ,QAA2C,CAAC;IAC5D,IAAA,KAAkB,QAAQ,CAAqB,IAAI,CAAC,EAAnD,IAAI,QAAA,EAAE,OAAO,QAAsC,CAAC;IACrD,IAAA,KAAsB,QAAQ,CAClC,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAClC,EAFM,MAAM,QAAA,EAAE,SAAS,QAEvB,CAAC;IAEF,IAAM,uBAAuB,GAAG,KAG/B,CAAC;IAEF,oBAAoB,CAAC;QACnB,IAAI,OAAO,KAAK,KAAK,EAAE;YACrB,SAAS,CAAC,QAAQ,CAAC,CAAC;YAEpB,OAAO;gBACL,yCAAyC;YAC3C,CAAC,CAAC;SACH;QAED,IAAI,WAAiC,CAAC;QAEtC,SAAe,SAAS;;;;gCACR,qBAAM,gBAAgB,uBAC/B,uBAAuB,KAC1B,cAAc,EAAE,UAAC,MAAM;oCACrB,SAAS,CAAC,MAAM,CAAC,CAAC;gCACpB,CAAC,EACD,QAAQ,EAAE,UAAC,UAAU;oCACnB,QAAQ,CAAC,IAAI,CAAC,CAAC;oCACf,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;gCACpC,CAAC,EACD,cAAc,EAAE,UAAC,SAAS;oCACxB,OAAO,CAAC,IAAI,CAAC,CAAC;oCACd,QAAQ,CAAC,SAAS,CAAC,CAAC;gCACtB,CAAC,IACD,EAAA;;4BAbF,WAAW,GAAG,SAaZ,CAAC;;;;;SACJ;QAED,SAAS,EAAE,CAAC;QAEZ,OAAO;YACL,IAAI,WAAW,EAAE;gBACf,WAAW,EAAE,CAAC;aACf;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,uBAAuB,CAAC,CAAC,CAAC;IAE9B,OAAO,EAAE,KAAK,OAAA,EAAE,MAAM,QAAA,EAAE,IAAI,EAAE,IAAI,IAAI,WAAW,EAAE,CAAC;AACtD,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/useQuerySubscription/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EACL,gBAAgB,GAKjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,2BAA2B,IAAI,oBAAoB,GACpD,MAAM,yBAAyB,CAAC;AAyBjC,MAAM,UAAU,oBAAoB,CAGlC,OAA0D;IAClD,IAAA,OAAO,GAA4B,OAAO,QAAnC,EAAE,WAAW,GAAe,OAAO,YAAtB,EAAK,KAAK,UAAK,OAAO,EAA5C,0BAAkC,CAAF,CAAa;IAE7C,IAAA,KAAoB,QAAQ,CAA0B,IAAI,CAAC,EAA1D,KAAK,QAAA,EAAE,QAAQ,QAA2C,CAAC;IAC5D,IAAA,KAAkB,QAAQ,CAAqB,IAAI,CAAC,EAAnD,IAAI,QAAA,EAAE,OAAO,QAAsC,CAAC;IACrD,IAAA,KAAsB,QAAQ,CAClC,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAClC,EAFM,MAAM,QAAA,EAAE,SAAS,QAEvB,CAAC;IAEF,IAAM,uBAAuB,GAAG,KAG/B,CAAC;IAEF,oBAAoB,CAAC;QACnB,IAAI,OAAO,KAAK,KAAK,EAAE;YACrB,SAAS,CAAC,QAAQ,CAAC,CAAC;YAEpB,OAAO;gBACL,yCAAyC;YAC3C,CAAC,CAAC;SACH;QAED,IAAI,WAAiC,CAAC;QAEtC,SAAe,SAAS;;;;gCACR,qBAAM,gBAAgB,uBAC/B,uBAAuB,KAC1B,cAAc,EAAE,UAAC,MAAM;oCACrB,SAAS,CAAC,MAAM,CAAC,CAAC;gCACpB,CAAC,EACD,QAAQ,EAAE,UAAC,UAAU;oCACnB,QAAQ,CAAC,IAAI,CAAC,CAAC;oCACf,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;gCACpC,CAAC,EACD,cAAc,EAAE,UAAC,SAAS;oCACxB,OAAO,CAAC,IAAI,CAAC,CAAC;oCACd,QAAQ,CAAC,SAAS,CAAC,CAAC;gCACtB,CAAC,IACD,EAAA;;4BAbF,WAAW,GAAG,SAaZ,CAAC;;;;;SACJ;QAED,SAAS,EAAE,CAAC;QAEZ,OAAO;YACL,IAAI,WAAW,EAAE;gBACf,WAAW,EAAE,CAAC;aACf;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,uBAAuB,CAAC,CAAC,CAAC;IAE9B,OAAO,EAAE,KAAK,OAAA,EAAE,MAAM,QAAA,EAAE,IAAI,EAAE,IAAI,IAAI,WAAW,EAAE,CAAC;AACtD,CAAC"}
@@ -31,6 +31,8 @@ export declare type ImagePropTypes = {
31
31
  className?: string;
32
32
  /** Additional CSS class for the image inside the `<picture />` tag */
33
33
  pictureClassName?: string;
34
+ /** Additional CSS class for the placeholder image */
35
+ placeholderClassName?: string;
34
36
  /** Duration (in ms) of the fade-in transition effect upoad image loading */
35
37
  fadeInDuration?: number;
36
38
  /** @deprecated Use the intersectionThreshold prop */
@@ -45,6 +47,8 @@ export declare type ImagePropTypes = {
45
47
  style?: React.CSSProperties;
46
48
  /** Additional CSS rules to add to the image inside the `<picture />` tag */
47
49
  pictureStyle?: React.CSSProperties;
50
+ /** Additional CSS rules to add to the placeholder image */
51
+ placeholderStyle?: React.CSSProperties;
48
52
  /**
49
53
  * The layout behavior of the image as the viewport changes size
50
54
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-datocms",
3
- "version": "4.0.4",
3
+ "version": "4.0.5",
4
4
  "types": "dist/types/index.d.ts",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -35,11 +35,13 @@
35
35
  "react": "^17.0.2",
36
36
  "react-dom": "^17.0.2",
37
37
  "rimraf": "^3.0.2",
38
+ "rome": "^10.0.1",
38
39
  "ts-jest": "^26.5.5",
39
40
  "typescript": "^4.5.5"
40
41
  },
41
42
  "scripts": {
42
43
  "build": "rimraf dist && tsc && tsc --project ./tsconfig.esnext.json",
44
+ "format": "rome format --write src",
43
45
  "watch": "rimraf dist && tsc --watch",
44
46
  "prepare": "npm run test && npm run build",
45
47
  "test": "jest --coverage",
@@ -49,6 +49,8 @@ export type ImagePropTypes = {
49
49
  className?: string;
50
50
  /** Additional CSS class for the image inside the `<picture />` tag */
51
51
  pictureClassName?: string;
52
+ /** Additional CSS class for the placeholder image */
53
+ placeholderClassName?: string;
52
54
  /** Duration (in ms) of the fade-in transition effect upoad image loading */
53
55
  fadeInDuration?: number;
54
56
  /** @deprecated Use the intersectionThreshold prop */
@@ -63,6 +65,8 @@ export type ImagePropTypes = {
63
65
  style?: React.CSSProperties;
64
66
  /** Additional CSS rules to add to the image inside the `<picture />` tag */
65
67
  pictureStyle?: React.CSSProperties;
68
+ /** Additional CSS rules to add to the placeholder image */
69
+ placeholderStyle?: React.CSSProperties;
66
70
  /**
67
71
  * The layout behavior of the image as the viewport changes size
68
72
  *
@@ -147,7 +151,7 @@ const buildSrcSet = (
147
151
  width: number | undefined,
148
152
  candidateMultipliers: number[],
149
153
  ) => {
150
- if (!src || !width) {
154
+ if (!(src && width)) {
151
155
  return undefined;
152
156
  }
153
157
 
@@ -206,6 +210,8 @@ export const Image = forwardRef<HTMLDivElement, ImagePropTypes>(
206
210
  priority = false,
207
211
  sizes,
208
212
  srcSetCandidates = [0.25, 0.5, 0.75, 1, 1.5, 2, 3, 4],
213
+ placeholderClassName,
214
+ placeholderStyle,
209
215
  },
210
216
  ref,
211
217
  ) => {
@@ -241,7 +247,9 @@ export const Image = forwardRef<HTMLDivElement, ImagePropTypes>(
241
247
  const callbackRef = useCallback(
242
248
  (_ref: HTMLDivElement) => {
243
249
  viewRef(_ref);
244
- if (ref) (ref as React.MutableRefObject<HTMLDivElement>).current = _ref;
250
+ if (ref) {
251
+ (ref as React.MutableRefObject<HTMLDivElement>).current = _ref;
252
+ }
245
253
  },
246
254
  [viewRef],
247
255
  );
@@ -292,6 +300,7 @@ export const Image = forwardRef<HTMLDivElement, ImagePropTypes>(
292
300
  aria-hidden="true"
293
301
  alt=""
294
302
  src={data.base64 ?? undefined}
303
+ className={placeholderClassName}
295
304
  style={{
296
305
  backgroundColor: data.bgColor ?? undefined,
297
306
  objectFit,
@@ -307,6 +316,7 @@ export const Image = forwardRef<HTMLDivElement, ImagePropTypes>(
307
316
  top: '-5%',
308
317
  width: '110%',
309
318
  height: '110%',
319
+ ...placeholderStyle,
310
320
  }}
311
321
  />
312
322
  ) : null;
@@ -1,309 +1,314 @@
1
- import * as React from "react";
2
- import { shallow } from "enzyme";
3
- import { renderMetaTags, renderMetaTagsToString, toRemixMeta } from "..";
4
- import { TitleMetaLinkTag } from "../types";
1
+ import * as React from 'react';
2
+ import { shallow } from 'enzyme';
3
+ import { renderMetaTags, renderMetaTagsToString, toRemixMeta } from '..';
4
+ import { TitleMetaLinkTag } from '../types';
5
5
 
6
6
  const metaTags: TitleMetaLinkTag[] = [
7
7
  {
8
- "content": "Remix CMS - The easiest way to manage content with Remix",
9
- "attributes": null,
10
- "tag": "title"
8
+ content: 'Remix CMS - The easiest way to manage content with Remix',
9
+ attributes: null,
10
+ tag: 'title',
11
11
  },
12
12
  {
13
- "content": null,
14
- "attributes": {
15
- "property": "og:title",
16
- "content": "Remix CMS - The easiest way to manage content with Remix"
13
+ content: null,
14
+ attributes: {
15
+ property: 'og:title',
16
+ content: 'Remix CMS - The easiest way to manage content with Remix',
17
17
  },
18
- "tag": "meta"
18
+ tag: 'meta',
19
19
  },
20
20
  {
21
- "content": null,
22
- "attributes": {
23
- "name": "twitter:title",
24
- "content": "Remix CMS - The easiest way to manage content with Remix"
21
+ content: null,
22
+ attributes: {
23
+ name: 'twitter:title',
24
+ content: 'Remix CMS - The easiest way to manage content with Remix',
25
25
  },
26
- "tag": "meta"
26
+ tag: 'meta',
27
27
  },
28
28
  {
29
- "content": null,
30
- "attributes": {
31
- "name": "description",
32
- "content": "Remix makes building scalable and fast React apps simple, pair it with a CMS that shares the same intuitiveness. Start a new Remix + Dato project now."
29
+ content: null,
30
+ attributes: {
31
+ name: 'description',
32
+ content:
33
+ 'Remix makes building scalable and fast React apps simple, pair it with a CMS that shares the same intuitiveness. Start a new Remix + Dato project now.',
33
34
  },
34
- "tag": "meta"
35
+ tag: 'meta',
35
36
  },
36
37
  {
37
- "content": null,
38
- "attributes": {
39
- "property": "og:description",
40
- "content": "Remix makes building scalable and fast React apps simple, pair it with a CMS that shares the same intuitiveness. Start a new Remix + Dato project now."
38
+ content: null,
39
+ attributes: {
40
+ property: 'og:description',
41
+ content:
42
+ 'Remix makes building scalable and fast React apps simple, pair it with a CMS that shares the same intuitiveness. Start a new Remix + Dato project now.',
41
43
  },
42
- "tag": "meta"
44
+ tag: 'meta',
43
45
  },
44
46
  {
45
- "content": null,
46
- "attributes": {
47
- "name": "twitter:description",
48
- "content": "Remix makes building scalable and fast React apps simple, pair it with a CMS that shares the same intuitiveness. Start a new Remix + Dato project now."
47
+ content: null,
48
+ attributes: {
49
+ name: 'twitter:description',
50
+ content:
51
+ 'Remix makes building scalable and fast React apps simple, pair it with a CMS that shares the same intuitiveness. Start a new Remix + Dato project now.',
49
52
  },
50
- "tag": "meta"
53
+ tag: 'meta',
51
54
  },
52
55
  {
53
- "content": null,
54
- "attributes": {
55
- "property": "og:image",
56
- "content": "https://www.datocms-assets.com/205/1642515293-full-logo.svg?fit=max&fm=jpg&w=1000"
56
+ content: null,
57
+ attributes: {
58
+ property: 'og:image',
59
+ content:
60
+ 'https://www.datocms-assets.com/205/1642515293-full-logo.svg?fit=max&fm=jpg&w=1000',
57
61
  },
58
- "tag": "meta"
62
+ tag: 'meta',
59
63
  },
60
64
  {
61
- "content": null,
62
- "attributes": {
63
- "property": "og:image:width",
64
- "content": "746"
65
+ content: null,
66
+ attributes: {
67
+ property: 'og:image:width',
68
+ content: '746',
65
69
  },
66
- "tag": "meta"
70
+ tag: 'meta',
67
71
  },
68
72
  {
69
- "content": null,
70
- "attributes": {
71
- "property": "og:image:height",
72
- "content": "186"
73
+ content: null,
74
+ attributes: {
75
+ property: 'og:image:height',
76
+ content: '186',
73
77
  },
74
- "tag": "meta"
78
+ tag: 'meta',
75
79
  },
76
80
  {
77
- "content": null,
78
- "attributes": {
79
- "name": "twitter:image",
80
- "content": "https://www.datocms-assets.com/205/1642515293-full-logo.svg?fit=max&fm=jpg&w=1000"
81
+ content: null,
82
+ attributes: {
83
+ name: 'twitter:image',
84
+ content:
85
+ 'https://www.datocms-assets.com/205/1642515293-full-logo.svg?fit=max&fm=jpg&w=1000',
81
86
  },
82
- "tag": "meta"
87
+ tag: 'meta',
83
88
  },
84
89
  {
85
- "content": null,
86
- "attributes": {
87
- "property": "og:locale",
88
- "content": "en"
90
+ content: null,
91
+ attributes: {
92
+ property: 'og:locale',
93
+ content: 'en',
89
94
  },
90
- "tag": "meta"
95
+ tag: 'meta',
91
96
  },
92
97
  {
93
- "content": null,
94
- "attributes": {
95
- "property": "og:type",
96
- "content": "article"
98
+ content: null,
99
+ attributes: {
100
+ property: 'og:type',
101
+ content: 'article',
97
102
  },
98
- "tag": "meta"
103
+ tag: 'meta',
99
104
  },
100
105
  {
101
- "content": null,
102
- "attributes": {
103
- "property": "og:site_name",
104
- "content": "DatoCMS"
106
+ content: null,
107
+ attributes: {
108
+ property: 'og:site_name',
109
+ content: 'DatoCMS',
105
110
  },
106
- "tag": "meta"
111
+ tag: 'meta',
107
112
  },
108
113
  {
109
- "content": null,
110
- "attributes": {
111
- "property": "article:modified_time",
112
- "content": "2022-01-18T14:02:47Z"
114
+ content: null,
115
+ attributes: {
116
+ property: 'article:modified_time',
117
+ content: '2022-01-18T14:02:47Z',
113
118
  },
114
- "tag": "meta"
119
+ tag: 'meta',
115
120
  },
116
121
  {
117
- "content": null,
118
- "attributes": {
119
- "name": "twitter:card",
120
- "content": "summary_large_image"
122
+ content: null,
123
+ attributes: {
124
+ name: 'twitter:card',
125
+ content: 'summary_large_image',
121
126
  },
122
- "tag": "meta"
127
+ tag: 'meta',
123
128
  },
124
129
  {
125
- "content": null,
126
- "attributes": {
127
- "name": "twitter:site",
128
- "content": "@datocms"
130
+ content: null,
131
+ attributes: {
132
+ name: 'twitter:site',
133
+ content: '@datocms',
129
134
  },
130
- "tag": "meta"
135
+ tag: 'meta',
131
136
  },
132
137
  {
133
- "attributes": {
134
- "sizes": "16x16",
135
- "type": "image/png",
136
- "rel": "icon",
137
- "href": "https://www.datocms-assets.com/205/1525789775-dato.png?h=16&w=16"
138
+ attributes: {
139
+ sizes: '16x16',
140
+ type: 'image/png',
141
+ rel: 'icon',
142
+ href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=16&w=16',
138
143
  },
139
- "content": null,
140
- "tag": "link"
144
+ content: null,
145
+ tag: 'link',
141
146
  },
142
147
  {
143
- "attributes": {
144
- "sizes": "32x32",
145
- "type": "image/png",
146
- "rel": "icon",
147
- "href": "https://www.datocms-assets.com/205/1525789775-dato.png?h=32&w=32"
148
+ attributes: {
149
+ sizes: '32x32',
150
+ type: 'image/png',
151
+ rel: 'icon',
152
+ href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=32&w=32',
148
153
  },
149
- "content": null,
150
- "tag": "link"
154
+ content: null,
155
+ tag: 'link',
151
156
  },
152
157
  {
153
- "attributes": {
154
- "sizes": "96x96",
155
- "type": "image/png",
156
- "rel": "icon",
157
- "href": "https://www.datocms-assets.com/205/1525789775-dato.png?h=96&w=96"
158
+ attributes: {
159
+ sizes: '96x96',
160
+ type: 'image/png',
161
+ rel: 'icon',
162
+ href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=96&w=96',
158
163
  },
159
- "content": null,
160
- "tag": "link"
164
+ content: null,
165
+ tag: 'link',
161
166
  },
162
167
  {
163
- "attributes": {
164
- "sizes": "192x192",
165
- "type": "image/png",
166
- "rel": "icon",
167
- "href": "https://www.datocms-assets.com/205/1525789775-dato.png?h=192&w=192"
168
+ attributes: {
169
+ sizes: '192x192',
170
+ type: 'image/png',
171
+ rel: 'icon',
172
+ href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=192&w=192',
168
173
  },
169
- "content": null,
170
- "tag": "link"
174
+ content: null,
175
+ tag: 'link',
171
176
  },
172
177
  {
173
- "attributes": {
174
- "sizes": "57x57",
175
- "rel": "apple-touch-icon",
176
- "href": "https://www.datocms-assets.com/205/1525789775-dato.png?h=57&w=57"
178
+ attributes: {
179
+ sizes: '57x57',
180
+ rel: 'apple-touch-icon',
181
+ href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=57&w=57',
177
182
  },
178
- "content": null,
179
- "tag": "link"
183
+ content: null,
184
+ tag: 'link',
180
185
  },
181
186
  {
182
- "attributes": {
183
- "sizes": "60x60",
184
- "rel": "apple-touch-icon",
185
- "href": "https://www.datocms-assets.com/205/1525789775-dato.png?h=60&w=60"
187
+ attributes: {
188
+ sizes: '60x60',
189
+ rel: 'apple-touch-icon',
190
+ href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=60&w=60',
186
191
  },
187
- "content": null,
188
- "tag": "link"
192
+ content: null,
193
+ tag: 'link',
189
194
  },
190
195
  {
191
- "attributes": {
192
- "sizes": "72x72",
193
- "rel": "apple-touch-icon",
194
- "href": "https://www.datocms-assets.com/205/1525789775-dato.png?h=72&w=72"
196
+ attributes: {
197
+ sizes: '72x72',
198
+ rel: 'apple-touch-icon',
199
+ href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=72&w=72',
195
200
  },
196
- "content": null,
197
- "tag": "link"
201
+ content: null,
202
+ tag: 'link',
198
203
  },
199
204
  {
200
- "attributes": {
201
- "sizes": "76x76",
202
- "rel": "apple-touch-icon",
203
- "href": "https://www.datocms-assets.com/205/1525789775-dato.png?h=76&w=76"
205
+ attributes: {
206
+ sizes: '76x76',
207
+ rel: 'apple-touch-icon',
208
+ href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=76&w=76',
204
209
  },
205
- "content": null,
206
- "tag": "link"
210
+ content: null,
211
+ tag: 'link',
207
212
  },
208
213
  {
209
- "attributes": {
210
- "sizes": "114x114",
211
- "rel": "apple-touch-icon",
212
- "href": "https://www.datocms-assets.com/205/1525789775-dato.png?h=114&w=114"
214
+ attributes: {
215
+ sizes: '114x114',
216
+ rel: 'apple-touch-icon',
217
+ href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=114&w=114',
213
218
  },
214
- "content": null,
215
- "tag": "link"
219
+ content: null,
220
+ tag: 'link',
216
221
  },
217
222
  {
218
- "attributes": {
219
- "sizes": "120x120",
220
- "rel": "apple-touch-icon",
221
- "href": "https://www.datocms-assets.com/205/1525789775-dato.png?h=120&w=120"
223
+ attributes: {
224
+ sizes: '120x120',
225
+ rel: 'apple-touch-icon',
226
+ href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=120&w=120',
222
227
  },
223
- "content": null,
224
- "tag": "link"
228
+ content: null,
229
+ tag: 'link',
225
230
  },
226
231
  {
227
- "attributes": {
228
- "sizes": "144x144",
229
- "rel": "apple-touch-icon",
230
- "href": "https://www.datocms-assets.com/205/1525789775-dato.png?h=144&w=144"
232
+ attributes: {
233
+ sizes: '144x144',
234
+ rel: 'apple-touch-icon',
235
+ href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=144&w=144',
231
236
  },
232
- "content": null,
233
- "tag": "link"
237
+ content: null,
238
+ tag: 'link',
234
239
  },
235
240
  {
236
- "attributes": {
237
- "sizes": "152x152",
238
- "rel": "apple-touch-icon",
239
- "href": "https://www.datocms-assets.com/205/1525789775-dato.png?h=152&w=152"
241
+ attributes: {
242
+ sizes: '152x152',
243
+ rel: 'apple-touch-icon',
244
+ href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=152&w=152',
240
245
  },
241
- "content": null,
242
- "tag": "link"
246
+ content: null,
247
+ tag: 'link',
243
248
  },
244
249
  {
245
- "attributes": {
246
- "sizes": "180x180",
247
- "rel": "apple-touch-icon",
248
- "href": "https://www.datocms-assets.com/205/1525789775-dato.png?h=180&w=180"
250
+ attributes: {
251
+ sizes: '180x180',
252
+ rel: 'apple-touch-icon',
253
+ href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=180&w=180',
249
254
  },
250
- "content": null,
251
- "tag": "link"
255
+ content: null,
256
+ tag: 'link',
252
257
  },
253
258
  {
254
- "attributes": {
255
- "name": "msapplication-square70x70logo",
256
- "content": "https://www.datocms-assets.com/205/1525789775-dato.png?h=70&w=70"
259
+ attributes: {
260
+ name: 'msapplication-square70x70logo',
261
+ content:
262
+ 'https://www.datocms-assets.com/205/1525789775-dato.png?h=70&w=70',
257
263
  },
258
- "content": null,
259
- "tag": "meta"
264
+ content: null,
265
+ tag: 'meta',
260
266
  },
261
267
  {
262
- "attributes": {
263
- "name": "msapplication-square150x150logo",
264
- "content": "https://www.datocms-assets.com/205/1525789775-dato.png?h=150&w=150"
268
+ attributes: {
269
+ name: 'msapplication-square150x150logo',
270
+ content:
271
+ 'https://www.datocms-assets.com/205/1525789775-dato.png?h=150&w=150',
265
272
  },
266
- "content": null,
267
- "tag": "meta"
273
+ content: null,
274
+ tag: 'meta',
268
275
  },
269
276
  {
270
- "attributes": {
271
- "name": "msapplication-square310x310logo",
272
- "content": "https://www.datocms-assets.com/205/1525789775-dato.png?h=310&w=310"
277
+ attributes: {
278
+ name: 'msapplication-square310x310logo',
279
+ content:
280
+ 'https://www.datocms-assets.com/205/1525789775-dato.png?h=310&w=310',
273
281
  },
274
- "content": null,
275
- "tag": "meta"
282
+ content: null,
283
+ tag: 'meta',
276
284
  },
277
285
  {
278
- "attributes": {
279
- "name": "msapplication-square310x150logo",
280
- "content": "https://www.datocms-assets.com/205/1525789775-dato.png?h=150&w=310"
286
+ attributes: {
287
+ name: 'msapplication-square310x150logo',
288
+ content:
289
+ 'https://www.datocms-assets.com/205/1525789775-dato.png?h=150&w=310',
281
290
  },
282
- "content": null,
283
- "tag": "meta"
284
- }
291
+ content: null,
292
+ tag: 'meta',
293
+ },
285
294
  ];
286
295
 
287
- describe("renderMetaTags", () => {
288
- it("generates an array of meta tags", () => {
289
- const wrapper = shallow(
290
- <head>
291
- {renderMetaTags(metaTags)}
292
- </head>
293
- );
296
+ describe('renderMetaTags', () => {
297
+ it('generates an array of meta tags', () => {
298
+ const wrapper = shallow(<head>{renderMetaTags(metaTags)}</head>);
294
299
 
295
300
  expect(wrapper).toMatchSnapshot();
296
301
  });
297
302
  });
298
303
 
299
- describe("renderMetaTagsToString", () => {
300
- it("generates an array of meta tags", () => {
304
+ describe('renderMetaTagsToString', () => {
305
+ it('generates an array of meta tags', () => {
301
306
  expect(renderMetaTagsToString(metaTags)).toMatchSnapshot();
302
307
  });
303
308
  });
304
309
 
305
- describe("toRemixMeta", () => {
306
- it("generates a meta descriptor", () => {
310
+ describe('toRemixMeta', () => {
311
+ it('generates a meta descriptor', () => {
307
312
  expect(toRemixMeta(metaTags)).toMatchSnapshot();
308
313
  });
309
- });
314
+ });
package/src/Seo/index.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export * from './types';
2
2
  export * from './remixUtils';
3
3
  export * from './renderMetaTags';
4
- export * from './renderMetaTagsToString';
4
+ export * from './renderMetaTagsToString';
@@ -144,7 +144,8 @@ describe('StructuredText', () => {
144
144
  };
145
145
 
146
146
  const structuredText: StructuredTextGraphQlResponse<
147
- QuoteRecord, DocPageRecord
147
+ QuoteRecord,
148
+ DocPageRecord
148
149
  > = {
149
150
  value: {
150
151
  schema: 'dast',