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.
- package/dist/cjs/Image/index.js +6 -15
- package/dist/cjs/Image/index.js.map +1 -1
- package/dist/cjs/Seo/__tests__/index.test.js +187 -187
- package/dist/cjs/Seo/__tests__/index.test.js.map +1 -1
- package/dist/cjs/StructuredText/__tests__/index.test.js.map +1 -1
- package/dist/cjs/StructuredText/index.js +3 -3
- package/dist/cjs/StructuredText/index.js.map +1 -1
- package/dist/cjs/setupTests.js.map +1 -1
- package/dist/cjs/useQuerySubscription/index.js.map +1 -1
- package/dist/esm/Image/index.d.ts +4 -0
- package/dist/esm/Image/index.js +6 -15
- package/dist/esm/Image/index.js.map +1 -1
- package/dist/esm/Seo/__tests__/index.test.js +190 -190
- package/dist/esm/Seo/__tests__/index.test.js.map +1 -1
- package/dist/esm/StructuredText/__tests__/index.test.js.map +1 -1
- package/dist/esm/StructuredText/index.js +3 -3
- package/dist/esm/StructuredText/index.js.map +1 -1
- package/dist/esm/setupTests.js.map +1 -1
- package/dist/esm/useQuerySubscription/index.js +1 -1
- package/dist/esm/useQuerySubscription/index.js.map +1 -1
- package/dist/types/Image/index.d.ts +4 -0
- package/package.json +3 -1
- package/src/Image/index.tsx +12 -2
- package/src/Seo/__tests__/index.test.tsx +202 -197
- package/src/Seo/index.ts +1 -1
- package/src/StructuredText/__tests__/index.test.tsx +2 -1
- package/src/StructuredText/index.tsx +3 -3
- package/src/setupTests.ts +2 -2
- package/src/useQuerySubscription/index.ts +3 -1
|
@@ -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,
|
|
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.
|
|
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",
|
package/src/Image/index.tsx
CHANGED
|
@@ -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
|
|
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)
|
|
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
|
|
2
|
-
import { shallow } from
|
|
3
|
-
import { renderMetaTags, renderMetaTagsToString, toRemixMeta } from
|
|
4
|
-
import { TitleMetaLinkTag } from
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
content: 'Remix CMS - The easiest way to manage content with Remix',
|
|
9
|
+
attributes: null,
|
|
10
|
+
tag: 'title',
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
content: null,
|
|
14
|
+
attributes: {
|
|
15
|
+
property: 'og:title',
|
|
16
|
+
content: 'Remix CMS - The easiest way to manage content with Remix',
|
|
17
17
|
},
|
|
18
|
-
|
|
18
|
+
tag: 'meta',
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
content: null,
|
|
22
|
+
attributes: {
|
|
23
|
+
name: 'twitter:title',
|
|
24
|
+
content: 'Remix CMS - The easiest way to manage content with Remix',
|
|
25
25
|
},
|
|
26
|
-
|
|
26
|
+
tag: 'meta',
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
35
|
+
tag: 'meta',
|
|
35
36
|
},
|
|
36
37
|
{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
|
|
44
|
+
tag: 'meta',
|
|
43
45
|
},
|
|
44
46
|
{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
|
|
53
|
+
tag: 'meta',
|
|
51
54
|
},
|
|
52
55
|
{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
|
|
62
|
+
tag: 'meta',
|
|
59
63
|
},
|
|
60
64
|
{
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
content: null,
|
|
66
|
+
attributes: {
|
|
67
|
+
property: 'og:image:width',
|
|
68
|
+
content: '746',
|
|
65
69
|
},
|
|
66
|
-
|
|
70
|
+
tag: 'meta',
|
|
67
71
|
},
|
|
68
72
|
{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
content: null,
|
|
74
|
+
attributes: {
|
|
75
|
+
property: 'og:image:height',
|
|
76
|
+
content: '186',
|
|
73
77
|
},
|
|
74
|
-
|
|
78
|
+
tag: 'meta',
|
|
75
79
|
},
|
|
76
80
|
{
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
-
|
|
87
|
+
tag: 'meta',
|
|
83
88
|
},
|
|
84
89
|
{
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
90
|
+
content: null,
|
|
91
|
+
attributes: {
|
|
92
|
+
property: 'og:locale',
|
|
93
|
+
content: 'en',
|
|
89
94
|
},
|
|
90
|
-
|
|
95
|
+
tag: 'meta',
|
|
91
96
|
},
|
|
92
97
|
{
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
98
|
+
content: null,
|
|
99
|
+
attributes: {
|
|
100
|
+
property: 'og:type',
|
|
101
|
+
content: 'article',
|
|
97
102
|
},
|
|
98
|
-
|
|
103
|
+
tag: 'meta',
|
|
99
104
|
},
|
|
100
105
|
{
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
106
|
+
content: null,
|
|
107
|
+
attributes: {
|
|
108
|
+
property: 'og:site_name',
|
|
109
|
+
content: 'DatoCMS',
|
|
105
110
|
},
|
|
106
|
-
|
|
111
|
+
tag: 'meta',
|
|
107
112
|
},
|
|
108
113
|
{
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
114
|
+
content: null,
|
|
115
|
+
attributes: {
|
|
116
|
+
property: 'article:modified_time',
|
|
117
|
+
content: '2022-01-18T14:02:47Z',
|
|
113
118
|
},
|
|
114
|
-
|
|
119
|
+
tag: 'meta',
|
|
115
120
|
},
|
|
116
121
|
{
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
122
|
+
content: null,
|
|
123
|
+
attributes: {
|
|
124
|
+
name: 'twitter:card',
|
|
125
|
+
content: 'summary_large_image',
|
|
121
126
|
},
|
|
122
|
-
|
|
127
|
+
tag: 'meta',
|
|
123
128
|
},
|
|
124
129
|
{
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
130
|
+
content: null,
|
|
131
|
+
attributes: {
|
|
132
|
+
name: 'twitter:site',
|
|
133
|
+
content: '@datocms',
|
|
129
134
|
},
|
|
130
|
-
|
|
135
|
+
tag: 'meta',
|
|
131
136
|
},
|
|
132
137
|
{
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
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
|
-
|
|
140
|
-
|
|
144
|
+
content: null,
|
|
145
|
+
tag: 'link',
|
|
141
146
|
},
|
|
142
147
|
{
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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
|
-
|
|
150
|
-
|
|
154
|
+
content: null,
|
|
155
|
+
tag: 'link',
|
|
151
156
|
},
|
|
152
157
|
{
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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
|
-
|
|
160
|
-
|
|
164
|
+
content: null,
|
|
165
|
+
tag: 'link',
|
|
161
166
|
},
|
|
162
167
|
{
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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
|
-
|
|
170
|
-
|
|
174
|
+
content: null,
|
|
175
|
+
tag: 'link',
|
|
171
176
|
},
|
|
172
177
|
{
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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
|
-
|
|
179
|
-
|
|
183
|
+
content: null,
|
|
184
|
+
tag: 'link',
|
|
180
185
|
},
|
|
181
186
|
{
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
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
|
-
|
|
188
|
-
|
|
192
|
+
content: null,
|
|
193
|
+
tag: 'link',
|
|
189
194
|
},
|
|
190
195
|
{
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
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
|
-
|
|
197
|
-
|
|
201
|
+
content: null,
|
|
202
|
+
tag: 'link',
|
|
198
203
|
},
|
|
199
204
|
{
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
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
|
-
|
|
206
|
-
|
|
210
|
+
content: null,
|
|
211
|
+
tag: 'link',
|
|
207
212
|
},
|
|
208
213
|
{
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
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
|
-
|
|
215
|
-
|
|
219
|
+
content: null,
|
|
220
|
+
tag: 'link',
|
|
216
221
|
},
|
|
217
222
|
{
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
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
|
-
|
|
224
|
-
|
|
228
|
+
content: null,
|
|
229
|
+
tag: 'link',
|
|
225
230
|
},
|
|
226
231
|
{
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
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
|
-
|
|
233
|
-
|
|
237
|
+
content: null,
|
|
238
|
+
tag: 'link',
|
|
234
239
|
},
|
|
235
240
|
{
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
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
|
-
|
|
242
|
-
|
|
246
|
+
content: null,
|
|
247
|
+
tag: 'link',
|
|
243
248
|
},
|
|
244
249
|
{
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
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
|
-
|
|
251
|
-
|
|
255
|
+
content: null,
|
|
256
|
+
tag: 'link',
|
|
252
257
|
},
|
|
253
258
|
{
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
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
|
-
|
|
259
|
-
|
|
264
|
+
content: null,
|
|
265
|
+
tag: 'meta',
|
|
260
266
|
},
|
|
261
267
|
{
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
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
|
-
|
|
267
|
-
|
|
273
|
+
content: null,
|
|
274
|
+
tag: 'meta',
|
|
268
275
|
},
|
|
269
276
|
{
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
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
|
-
|
|
275
|
-
|
|
282
|
+
content: null,
|
|
283
|
+
tag: 'meta',
|
|
276
284
|
},
|
|
277
285
|
{
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
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
|
-
|
|
283
|
-
|
|
284
|
-
}
|
|
291
|
+
content: null,
|
|
292
|
+
tag: 'meta',
|
|
293
|
+
},
|
|
285
294
|
];
|
|
286
295
|
|
|
287
|
-
describe(
|
|
288
|
-
it(
|
|
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(
|
|
300
|
-
it(
|
|
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(
|
|
306
|
-
it(
|
|
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