@masters-ws/react-seo 1.2.1 → 1.4.1
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/README.md +1354 -97
- package/dist/chunk-6RBCF5I5.mjs +567 -0
- package/dist/chunk-FFE2ZOOC.mjs +945 -0
- package/dist/chunk-L6YRMB7H.mjs +988 -0
- package/dist/chunk-UBBPNSEV.mjs +1016 -0
- package/dist/core/index.d.mts +2 -1
- package/dist/core/index.d.ts +2 -1
- package/dist/core/index.js +684 -40
- package/dist/core/index.mjs +29 -3
- package/dist/index-CkB-Wt4c.d.mts +1272 -0
- package/dist/index-CkB-Wt4c.d.ts +1272 -0
- package/dist/index-DEE7ZyDx.d.mts +1193 -0
- package/dist/index-DEE7ZyDx.d.ts +1193 -0
- package/dist/index-Wu9j5oCk.d.mts +721 -0
- package/dist/index-Wu9j5oCk.d.ts +721 -0
- package/dist/index.d.mts +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.js +1771 -144
- package/dist/index.mjs +1030 -32
- package/package.json +2 -8
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
|
+
JsonLd,
|
|
3
|
+
__commonJS,
|
|
4
|
+
__toESM,
|
|
5
|
+
cleanSchema,
|
|
6
|
+
generateArticleMetadata,
|
|
2
7
|
generateArticleSchema,
|
|
3
8
|
generateBookSchema,
|
|
4
9
|
generateBreadcrumbSchema,
|
|
10
|
+
generateCategoryMetadata,
|
|
11
|
+
generateCollectionPageSchema,
|
|
5
12
|
generateEventSchema,
|
|
6
13
|
generateFAQSchema,
|
|
14
|
+
generateHomepageMetadata,
|
|
15
|
+
generateHowToSchema,
|
|
16
|
+
generateItemListSchema,
|
|
17
|
+
generateJobPostingSchema,
|
|
7
18
|
generateLocalBusinessSchema,
|
|
8
19
|
generateMovieSchema,
|
|
9
20
|
generateOrganizationSchema,
|
|
@@ -11,16 +22,980 @@ import {
|
|
|
11
22
|
generatePaginationLinks,
|
|
12
23
|
generatePodcastEpisodeSchema,
|
|
13
24
|
generatePodcastSchema,
|
|
25
|
+
generateProductMetadata,
|
|
14
26
|
generateProductSchema,
|
|
27
|
+
generateRecipeSchema,
|
|
15
28
|
generateSoftwareSchema,
|
|
16
29
|
generateVideoSchema,
|
|
30
|
+
generateWebPageSchema,
|
|
17
31
|
generateWebSiteSchema,
|
|
18
|
-
toNextMetadata
|
|
19
|
-
|
|
32
|
+
toNextMetadata,
|
|
33
|
+
validateSEO
|
|
34
|
+
} from "./chunk-UBBPNSEV.mjs";
|
|
35
|
+
|
|
36
|
+
// node_modules/react-fast-compare/index.js
|
|
37
|
+
var require_react_fast_compare = __commonJS({
|
|
38
|
+
"node_modules/react-fast-compare/index.js"(exports, module) {
|
|
39
|
+
"use strict";
|
|
40
|
+
var hasElementType = typeof Element !== "undefined";
|
|
41
|
+
var hasMap = typeof Map === "function";
|
|
42
|
+
var hasSet = typeof Set === "function";
|
|
43
|
+
var hasArrayBuffer = typeof ArrayBuffer === "function" && !!ArrayBuffer.isView;
|
|
44
|
+
function equal(a, b) {
|
|
45
|
+
if (a === b) return true;
|
|
46
|
+
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
47
|
+
if (a.constructor !== b.constructor) return false;
|
|
48
|
+
var length, i, keys;
|
|
49
|
+
if (Array.isArray(a)) {
|
|
50
|
+
length = a.length;
|
|
51
|
+
if (length != b.length) return false;
|
|
52
|
+
for (i = length; i-- !== 0; )
|
|
53
|
+
if (!equal(a[i], b[i])) return false;
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
var it;
|
|
57
|
+
if (hasMap && a instanceof Map && b instanceof Map) {
|
|
58
|
+
if (a.size !== b.size) return false;
|
|
59
|
+
it = a.entries();
|
|
60
|
+
while (!(i = it.next()).done)
|
|
61
|
+
if (!b.has(i.value[0])) return false;
|
|
62
|
+
it = a.entries();
|
|
63
|
+
while (!(i = it.next()).done)
|
|
64
|
+
if (!equal(i.value[1], b.get(i.value[0]))) return false;
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
if (hasSet && a instanceof Set && b instanceof Set) {
|
|
68
|
+
if (a.size !== b.size) return false;
|
|
69
|
+
it = a.entries();
|
|
70
|
+
while (!(i = it.next()).done)
|
|
71
|
+
if (!b.has(i.value[0])) return false;
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
|
|
75
|
+
length = a.length;
|
|
76
|
+
if (length != b.length) return false;
|
|
77
|
+
for (i = length; i-- !== 0; )
|
|
78
|
+
if (a[i] !== b[i]) return false;
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
82
|
+
if (a.valueOf !== Object.prototype.valueOf && typeof a.valueOf === "function" && typeof b.valueOf === "function") return a.valueOf() === b.valueOf();
|
|
83
|
+
if (a.toString !== Object.prototype.toString && typeof a.toString === "function" && typeof b.toString === "function") return a.toString() === b.toString();
|
|
84
|
+
keys = Object.keys(a);
|
|
85
|
+
length = keys.length;
|
|
86
|
+
if (length !== Object.keys(b).length) return false;
|
|
87
|
+
for (i = length; i-- !== 0; )
|
|
88
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
89
|
+
if (hasElementType && a instanceof Element) return false;
|
|
90
|
+
for (i = length; i-- !== 0; ) {
|
|
91
|
+
if ((keys[i] === "_owner" || keys[i] === "__v" || keys[i] === "__o") && a.$$typeof) {
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
if (!equal(a[keys[i]], b[keys[i]])) return false;
|
|
95
|
+
}
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
return a !== a && b !== b;
|
|
99
|
+
}
|
|
100
|
+
module.exports = function isEqual(a, b) {
|
|
101
|
+
try {
|
|
102
|
+
return equal(a, b);
|
|
103
|
+
} catch (error) {
|
|
104
|
+
if ((error.message || "").match(/stack|recursion/i)) {
|
|
105
|
+
console.warn("react-fast-compare cannot handle circular refs");
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
throw error;
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
// node_modules/invariant/invariant.js
|
|
115
|
+
var require_invariant = __commonJS({
|
|
116
|
+
"node_modules/invariant/invariant.js"(exports, module) {
|
|
117
|
+
"use strict";
|
|
118
|
+
var NODE_ENV = process.env.NODE_ENV;
|
|
119
|
+
var invariant2 = function(condition, format, a, b, c, d, e, f) {
|
|
120
|
+
if (NODE_ENV !== "production") {
|
|
121
|
+
if (format === void 0) {
|
|
122
|
+
throw new Error("invariant requires an error message argument");
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
if (!condition) {
|
|
126
|
+
var error;
|
|
127
|
+
if (format === void 0) {
|
|
128
|
+
error = new Error(
|
|
129
|
+
"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
|
|
130
|
+
);
|
|
131
|
+
} else {
|
|
132
|
+
var args = [a, b, c, d, e, f];
|
|
133
|
+
var argIndex = 0;
|
|
134
|
+
error = new Error(
|
|
135
|
+
format.replace(/%s/g, function() {
|
|
136
|
+
return args[argIndex++];
|
|
137
|
+
})
|
|
138
|
+
);
|
|
139
|
+
error.name = "Invariant Violation";
|
|
140
|
+
}
|
|
141
|
+
error.framesToPop = 1;
|
|
142
|
+
throw error;
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
module.exports = invariant2;
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
// node_modules/shallowequal/index.js
|
|
150
|
+
var require_shallowequal = __commonJS({
|
|
151
|
+
"node_modules/shallowequal/index.js"(exports, module) {
|
|
152
|
+
"use strict";
|
|
153
|
+
module.exports = function shallowEqual2(objA, objB, compare, compareContext) {
|
|
154
|
+
var ret = compare ? compare.call(compareContext, objA, objB) : void 0;
|
|
155
|
+
if (ret !== void 0) {
|
|
156
|
+
return !!ret;
|
|
157
|
+
}
|
|
158
|
+
if (objA === objB) {
|
|
159
|
+
return true;
|
|
160
|
+
}
|
|
161
|
+
if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) {
|
|
162
|
+
return false;
|
|
163
|
+
}
|
|
164
|
+
var keysA = Object.keys(objA);
|
|
165
|
+
var keysB = Object.keys(objB);
|
|
166
|
+
if (keysA.length !== keysB.length) {
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);
|
|
170
|
+
for (var idx = 0; idx < keysA.length; idx++) {
|
|
171
|
+
var key = keysA[idx];
|
|
172
|
+
if (!bHasOwnProperty(key)) {
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
var valueA = objA[key];
|
|
176
|
+
var valueB = objB[key];
|
|
177
|
+
ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;
|
|
178
|
+
if (ret === false || ret === void 0 && valueA !== valueB) {
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return true;
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
});
|
|
20
186
|
|
|
21
187
|
// src/components/SEOProvider.tsx
|
|
22
188
|
import { createContext, useContext } from "react";
|
|
23
|
-
|
|
189
|
+
|
|
190
|
+
// node_modules/react-helmet-async/lib/index.esm.js
|
|
191
|
+
var import_react_fast_compare = __toESM(require_react_fast_compare());
|
|
192
|
+
var import_invariant = __toESM(require_invariant());
|
|
193
|
+
var import_shallowequal = __toESM(require_shallowequal());
|
|
194
|
+
import React3, { Component as Component3 } from "react";
|
|
195
|
+
import React2, { Component } from "react";
|
|
196
|
+
import React from "react";
|
|
197
|
+
import { Component as Component2 } from "react";
|
|
198
|
+
var TAG_NAMES = /* @__PURE__ */ ((TAG_NAMES2) => {
|
|
199
|
+
TAG_NAMES2["BASE"] = "base";
|
|
200
|
+
TAG_NAMES2["BODY"] = "body";
|
|
201
|
+
TAG_NAMES2["HEAD"] = "head";
|
|
202
|
+
TAG_NAMES2["HTML"] = "html";
|
|
203
|
+
TAG_NAMES2["LINK"] = "link";
|
|
204
|
+
TAG_NAMES2["META"] = "meta";
|
|
205
|
+
TAG_NAMES2["NOSCRIPT"] = "noscript";
|
|
206
|
+
TAG_NAMES2["SCRIPT"] = "script";
|
|
207
|
+
TAG_NAMES2["STYLE"] = "style";
|
|
208
|
+
TAG_NAMES2["TITLE"] = "title";
|
|
209
|
+
TAG_NAMES2["FRAGMENT"] = "Symbol(react.fragment)";
|
|
210
|
+
return TAG_NAMES2;
|
|
211
|
+
})(TAG_NAMES || {});
|
|
212
|
+
var SEO_PRIORITY_TAGS = {
|
|
213
|
+
link: { rel: ["amphtml", "canonical", "alternate"] },
|
|
214
|
+
script: { type: ["application/ld+json"] },
|
|
215
|
+
meta: {
|
|
216
|
+
charset: "",
|
|
217
|
+
name: ["generator", "robots", "description"],
|
|
218
|
+
property: [
|
|
219
|
+
"og:type",
|
|
220
|
+
"og:title",
|
|
221
|
+
"og:url",
|
|
222
|
+
"og:image",
|
|
223
|
+
"og:image:alt",
|
|
224
|
+
"og:description",
|
|
225
|
+
"twitter:url",
|
|
226
|
+
"twitter:title",
|
|
227
|
+
"twitter:description",
|
|
228
|
+
"twitter:image",
|
|
229
|
+
"twitter:image:alt",
|
|
230
|
+
"twitter:card",
|
|
231
|
+
"twitter:site"
|
|
232
|
+
]
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
var VALID_TAG_NAMES = Object.values(TAG_NAMES);
|
|
236
|
+
var REACT_TAG_MAP = {
|
|
237
|
+
accesskey: "accessKey",
|
|
238
|
+
charset: "charSet",
|
|
239
|
+
class: "className",
|
|
240
|
+
contenteditable: "contentEditable",
|
|
241
|
+
contextmenu: "contextMenu",
|
|
242
|
+
"http-equiv": "httpEquiv",
|
|
243
|
+
itemprop: "itemProp",
|
|
244
|
+
tabindex: "tabIndex"
|
|
245
|
+
};
|
|
246
|
+
var HTML_TAG_MAP = Object.entries(REACT_TAG_MAP).reduce(
|
|
247
|
+
(carry, [key, value]) => {
|
|
248
|
+
carry[value] = key;
|
|
249
|
+
return carry;
|
|
250
|
+
},
|
|
251
|
+
{}
|
|
252
|
+
);
|
|
253
|
+
var HELMET_ATTRIBUTE = "data-rh";
|
|
254
|
+
var HELMET_PROPS = {
|
|
255
|
+
DEFAULT_TITLE: "defaultTitle",
|
|
256
|
+
DEFER: "defer",
|
|
257
|
+
ENCODE_SPECIAL_CHARACTERS: "encodeSpecialCharacters",
|
|
258
|
+
ON_CHANGE_CLIENT_STATE: "onChangeClientState",
|
|
259
|
+
TITLE_TEMPLATE: "titleTemplate",
|
|
260
|
+
PRIORITIZE_SEO_TAGS: "prioritizeSeoTags"
|
|
261
|
+
};
|
|
262
|
+
var getInnermostProperty = (propsList, property) => {
|
|
263
|
+
for (let i = propsList.length - 1; i >= 0; i -= 1) {
|
|
264
|
+
const props = propsList[i];
|
|
265
|
+
if (Object.prototype.hasOwnProperty.call(props, property)) {
|
|
266
|
+
return props[property];
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
return null;
|
|
270
|
+
};
|
|
271
|
+
var getTitleFromPropsList = (propsList) => {
|
|
272
|
+
let innermostTitle = getInnermostProperty(
|
|
273
|
+
propsList,
|
|
274
|
+
"title"
|
|
275
|
+
/* TITLE */
|
|
276
|
+
);
|
|
277
|
+
const innermostTemplate = getInnermostProperty(propsList, HELMET_PROPS.TITLE_TEMPLATE);
|
|
278
|
+
if (Array.isArray(innermostTitle)) {
|
|
279
|
+
innermostTitle = innermostTitle.join("");
|
|
280
|
+
}
|
|
281
|
+
if (innermostTemplate && innermostTitle) {
|
|
282
|
+
return innermostTemplate.replace(/%s/g, () => innermostTitle);
|
|
283
|
+
}
|
|
284
|
+
const innermostDefaultTitle = getInnermostProperty(propsList, HELMET_PROPS.DEFAULT_TITLE);
|
|
285
|
+
return innermostTitle || innermostDefaultTitle || void 0;
|
|
286
|
+
};
|
|
287
|
+
var getOnChangeClientState = (propsList) => getInnermostProperty(propsList, HELMET_PROPS.ON_CHANGE_CLIENT_STATE) || (() => {
|
|
288
|
+
});
|
|
289
|
+
var getAttributesFromPropsList = (tagType, propsList) => propsList.filter((props) => typeof props[tagType] !== "undefined").map((props) => props[tagType]).reduce((tagAttrs, current) => ({ ...tagAttrs, ...current }), {});
|
|
290
|
+
var getBaseTagFromPropsList = (primaryAttributes, propsList) => propsList.filter((props) => typeof props[
|
|
291
|
+
"base"
|
|
292
|
+
/* BASE */
|
|
293
|
+
] !== "undefined").map((props) => props[
|
|
294
|
+
"base"
|
|
295
|
+
/* BASE */
|
|
296
|
+
]).reverse().reduce((innermostBaseTag, tag) => {
|
|
297
|
+
if (!innermostBaseTag.length) {
|
|
298
|
+
const keys = Object.keys(tag);
|
|
299
|
+
for (let i = 0; i < keys.length; i += 1) {
|
|
300
|
+
const attributeKey = keys[i];
|
|
301
|
+
const lowerCaseAttributeKey = attributeKey.toLowerCase();
|
|
302
|
+
if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && tag[lowerCaseAttributeKey]) {
|
|
303
|
+
return innermostBaseTag.concat(tag);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
return innermostBaseTag;
|
|
308
|
+
}, []);
|
|
309
|
+
var warn = (msg) => console && typeof console.warn === "function" && console.warn(msg);
|
|
310
|
+
var getTagsFromPropsList = (tagName, primaryAttributes, propsList) => {
|
|
311
|
+
const approvedSeenTags = {};
|
|
312
|
+
return propsList.filter((props) => {
|
|
313
|
+
if (Array.isArray(props[tagName])) {
|
|
314
|
+
return true;
|
|
315
|
+
}
|
|
316
|
+
if (typeof props[tagName] !== "undefined") {
|
|
317
|
+
warn(
|
|
318
|
+
`Helmet: ${tagName} should be of type "Array". Instead found type "${typeof props[tagName]}"`
|
|
319
|
+
);
|
|
320
|
+
}
|
|
321
|
+
return false;
|
|
322
|
+
}).map((props) => props[tagName]).reverse().reduce((approvedTags, instanceTags) => {
|
|
323
|
+
const instanceSeenTags = {};
|
|
324
|
+
instanceTags.filter((tag) => {
|
|
325
|
+
let primaryAttributeKey;
|
|
326
|
+
const keys2 = Object.keys(tag);
|
|
327
|
+
for (let i = 0; i < keys2.length; i += 1) {
|
|
328
|
+
const attributeKey = keys2[i];
|
|
329
|
+
const lowerCaseAttributeKey = attributeKey.toLowerCase();
|
|
330
|
+
if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && !(primaryAttributeKey === "rel" && tag[primaryAttributeKey].toLowerCase() === "canonical") && !(lowerCaseAttributeKey === "rel" && tag[lowerCaseAttributeKey].toLowerCase() === "stylesheet")) {
|
|
331
|
+
primaryAttributeKey = lowerCaseAttributeKey;
|
|
332
|
+
}
|
|
333
|
+
if (primaryAttributes.indexOf(attributeKey) !== -1 && (attributeKey === "innerHTML" || attributeKey === "cssText" || attributeKey === "itemprop")) {
|
|
334
|
+
primaryAttributeKey = attributeKey;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
if (!primaryAttributeKey || !tag[primaryAttributeKey]) {
|
|
338
|
+
return false;
|
|
339
|
+
}
|
|
340
|
+
const value = tag[primaryAttributeKey].toLowerCase();
|
|
341
|
+
if (!approvedSeenTags[primaryAttributeKey]) {
|
|
342
|
+
approvedSeenTags[primaryAttributeKey] = {};
|
|
343
|
+
}
|
|
344
|
+
if (!instanceSeenTags[primaryAttributeKey]) {
|
|
345
|
+
instanceSeenTags[primaryAttributeKey] = {};
|
|
346
|
+
}
|
|
347
|
+
if (!approvedSeenTags[primaryAttributeKey][value]) {
|
|
348
|
+
instanceSeenTags[primaryAttributeKey][value] = true;
|
|
349
|
+
return true;
|
|
350
|
+
}
|
|
351
|
+
return false;
|
|
352
|
+
}).reverse().forEach((tag) => approvedTags.push(tag));
|
|
353
|
+
const keys = Object.keys(instanceSeenTags);
|
|
354
|
+
for (let i = 0; i < keys.length; i += 1) {
|
|
355
|
+
const attributeKey = keys[i];
|
|
356
|
+
const tagUnion = {
|
|
357
|
+
...approvedSeenTags[attributeKey],
|
|
358
|
+
...instanceSeenTags[attributeKey]
|
|
359
|
+
};
|
|
360
|
+
approvedSeenTags[attributeKey] = tagUnion;
|
|
361
|
+
}
|
|
362
|
+
return approvedTags;
|
|
363
|
+
}, []).reverse();
|
|
364
|
+
};
|
|
365
|
+
var getAnyTrueFromPropsList = (propsList, checkedTag) => {
|
|
366
|
+
if (Array.isArray(propsList) && propsList.length) {
|
|
367
|
+
for (let index = 0; index < propsList.length; index += 1) {
|
|
368
|
+
const prop = propsList[index];
|
|
369
|
+
if (prop[checkedTag]) {
|
|
370
|
+
return true;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
return false;
|
|
375
|
+
};
|
|
376
|
+
var reducePropsToState = (propsList) => ({
|
|
377
|
+
baseTag: getBaseTagFromPropsList([
|
|
378
|
+
"href"
|
|
379
|
+
/* HREF */
|
|
380
|
+
], propsList),
|
|
381
|
+
bodyAttributes: getAttributesFromPropsList("bodyAttributes", propsList),
|
|
382
|
+
defer: getInnermostProperty(propsList, HELMET_PROPS.DEFER),
|
|
383
|
+
encode: getInnermostProperty(propsList, HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS),
|
|
384
|
+
htmlAttributes: getAttributesFromPropsList("htmlAttributes", propsList),
|
|
385
|
+
linkTags: getTagsFromPropsList(
|
|
386
|
+
"link",
|
|
387
|
+
[
|
|
388
|
+
"rel",
|
|
389
|
+
"href"
|
|
390
|
+
/* HREF */
|
|
391
|
+
],
|
|
392
|
+
propsList
|
|
393
|
+
),
|
|
394
|
+
metaTags: getTagsFromPropsList(
|
|
395
|
+
"meta",
|
|
396
|
+
[
|
|
397
|
+
"name",
|
|
398
|
+
"charset",
|
|
399
|
+
"http-equiv",
|
|
400
|
+
"property",
|
|
401
|
+
"itemprop"
|
|
402
|
+
/* ITEM_PROP */
|
|
403
|
+
],
|
|
404
|
+
propsList
|
|
405
|
+
),
|
|
406
|
+
noscriptTags: getTagsFromPropsList("noscript", [
|
|
407
|
+
"innerHTML"
|
|
408
|
+
/* INNER_HTML */
|
|
409
|
+
], propsList),
|
|
410
|
+
onChangeClientState: getOnChangeClientState(propsList),
|
|
411
|
+
scriptTags: getTagsFromPropsList(
|
|
412
|
+
"script",
|
|
413
|
+
[
|
|
414
|
+
"src",
|
|
415
|
+
"innerHTML"
|
|
416
|
+
/* INNER_HTML */
|
|
417
|
+
],
|
|
418
|
+
propsList
|
|
419
|
+
),
|
|
420
|
+
styleTags: getTagsFromPropsList("style", [
|
|
421
|
+
"cssText"
|
|
422
|
+
/* CSS_TEXT */
|
|
423
|
+
], propsList),
|
|
424
|
+
title: getTitleFromPropsList(propsList),
|
|
425
|
+
titleAttributes: getAttributesFromPropsList("titleAttributes", propsList),
|
|
426
|
+
prioritizeSeoTags: getAnyTrueFromPropsList(propsList, HELMET_PROPS.PRIORITIZE_SEO_TAGS)
|
|
427
|
+
});
|
|
428
|
+
var flattenArray = (possibleArray) => Array.isArray(possibleArray) ? possibleArray.join("") : possibleArray;
|
|
429
|
+
var checkIfPropsMatch = (props, toMatch) => {
|
|
430
|
+
const keys = Object.keys(props);
|
|
431
|
+
for (let i = 0; i < keys.length; i += 1) {
|
|
432
|
+
if (toMatch[keys[i]] && toMatch[keys[i]].includes(props[keys[i]])) {
|
|
433
|
+
return true;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
return false;
|
|
437
|
+
};
|
|
438
|
+
var prioritizer = (elementsList, propsToMatch) => {
|
|
439
|
+
if (Array.isArray(elementsList)) {
|
|
440
|
+
return elementsList.reduce(
|
|
441
|
+
(acc, elementAttrs) => {
|
|
442
|
+
if (checkIfPropsMatch(elementAttrs, propsToMatch)) {
|
|
443
|
+
acc.priority.push(elementAttrs);
|
|
444
|
+
} else {
|
|
445
|
+
acc.default.push(elementAttrs);
|
|
446
|
+
}
|
|
447
|
+
return acc;
|
|
448
|
+
},
|
|
449
|
+
{ priority: [], default: [] }
|
|
450
|
+
);
|
|
451
|
+
}
|
|
452
|
+
return { default: elementsList, priority: [] };
|
|
453
|
+
};
|
|
454
|
+
var without = (obj, key) => {
|
|
455
|
+
return {
|
|
456
|
+
...obj,
|
|
457
|
+
[key]: void 0
|
|
458
|
+
};
|
|
459
|
+
};
|
|
460
|
+
var SELF_CLOSING_TAGS = [
|
|
461
|
+
"noscript",
|
|
462
|
+
"script",
|
|
463
|
+
"style"
|
|
464
|
+
/* STYLE */
|
|
465
|
+
];
|
|
466
|
+
var encodeSpecialCharacters = (str, encode = true) => {
|
|
467
|
+
if (encode === false) {
|
|
468
|
+
return String(str);
|
|
469
|
+
}
|
|
470
|
+
return String(str).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
471
|
+
};
|
|
472
|
+
var generateElementAttributesAsString = (attributes) => Object.keys(attributes).reduce((str, key) => {
|
|
473
|
+
const attr = typeof attributes[key] !== "undefined" ? `${key}="${attributes[key]}"` : `${key}`;
|
|
474
|
+
return str ? `${str} ${attr}` : attr;
|
|
475
|
+
}, "");
|
|
476
|
+
var generateTitleAsString = (type, title, attributes, encode) => {
|
|
477
|
+
const attributeString = generateElementAttributesAsString(attributes);
|
|
478
|
+
const flattenedTitle = flattenArray(title);
|
|
479
|
+
return attributeString ? `<${type} ${HELMET_ATTRIBUTE}="true" ${attributeString}>${encodeSpecialCharacters(
|
|
480
|
+
flattenedTitle,
|
|
481
|
+
encode
|
|
482
|
+
)}</${type}>` : `<${type} ${HELMET_ATTRIBUTE}="true">${encodeSpecialCharacters(
|
|
483
|
+
flattenedTitle,
|
|
484
|
+
encode
|
|
485
|
+
)}</${type}>`;
|
|
486
|
+
};
|
|
487
|
+
var generateTagsAsString = (type, tags, encode = true) => tags.reduce((str, t) => {
|
|
488
|
+
const tag = t;
|
|
489
|
+
const attributeHtml = Object.keys(tag).filter(
|
|
490
|
+
(attribute) => !(attribute === "innerHTML" || attribute === "cssText")
|
|
491
|
+
).reduce((string, attribute) => {
|
|
492
|
+
const attr = typeof tag[attribute] === "undefined" ? attribute : `${attribute}="${encodeSpecialCharacters(tag[attribute], encode)}"`;
|
|
493
|
+
return string ? `${string} ${attr}` : attr;
|
|
494
|
+
}, "");
|
|
495
|
+
const tagContent = tag.innerHTML || tag.cssText || "";
|
|
496
|
+
const isSelfClosing = SELF_CLOSING_TAGS.indexOf(type) === -1;
|
|
497
|
+
return `${str}<${type} ${HELMET_ATTRIBUTE}="true" ${attributeHtml}${isSelfClosing ? `/>` : `>${tagContent}</${type}>`}`;
|
|
498
|
+
}, "");
|
|
499
|
+
var convertElementAttributesToReactProps = (attributes, initProps = {}) => Object.keys(attributes).reduce((obj, key) => {
|
|
500
|
+
const mapped = REACT_TAG_MAP[key];
|
|
501
|
+
obj[mapped || key] = attributes[key];
|
|
502
|
+
return obj;
|
|
503
|
+
}, initProps);
|
|
504
|
+
var generateTitleAsReactComponent = (_type, title, attributes) => {
|
|
505
|
+
const initProps = {
|
|
506
|
+
key: title,
|
|
507
|
+
[HELMET_ATTRIBUTE]: true
|
|
508
|
+
};
|
|
509
|
+
const props = convertElementAttributesToReactProps(attributes, initProps);
|
|
510
|
+
return [React.createElement("title", props, title)];
|
|
511
|
+
};
|
|
512
|
+
var generateTagsAsReactComponent = (type, tags) => tags.map((tag, i) => {
|
|
513
|
+
const mappedTag = {
|
|
514
|
+
key: i,
|
|
515
|
+
[HELMET_ATTRIBUTE]: true
|
|
516
|
+
};
|
|
517
|
+
Object.keys(tag).forEach((attribute) => {
|
|
518
|
+
const mapped = REACT_TAG_MAP[attribute];
|
|
519
|
+
const mappedAttribute = mapped || attribute;
|
|
520
|
+
if (mappedAttribute === "innerHTML" || mappedAttribute === "cssText") {
|
|
521
|
+
const content = tag.innerHTML || tag.cssText;
|
|
522
|
+
mappedTag.dangerouslySetInnerHTML = { __html: content };
|
|
523
|
+
} else {
|
|
524
|
+
mappedTag[mappedAttribute] = tag[attribute];
|
|
525
|
+
}
|
|
526
|
+
});
|
|
527
|
+
return React.createElement(type, mappedTag);
|
|
528
|
+
});
|
|
529
|
+
var getMethodsForTag = (type, tags, encode = true) => {
|
|
530
|
+
switch (type) {
|
|
531
|
+
case "title":
|
|
532
|
+
return {
|
|
533
|
+
toComponent: () => generateTitleAsReactComponent(type, tags.title, tags.titleAttributes),
|
|
534
|
+
toString: () => generateTitleAsString(type, tags.title, tags.titleAttributes, encode)
|
|
535
|
+
};
|
|
536
|
+
case "bodyAttributes":
|
|
537
|
+
case "htmlAttributes":
|
|
538
|
+
return {
|
|
539
|
+
toComponent: () => convertElementAttributesToReactProps(tags),
|
|
540
|
+
toString: () => generateElementAttributesAsString(tags)
|
|
541
|
+
};
|
|
542
|
+
default:
|
|
543
|
+
return {
|
|
544
|
+
toComponent: () => generateTagsAsReactComponent(type, tags),
|
|
545
|
+
toString: () => generateTagsAsString(type, tags, encode)
|
|
546
|
+
};
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
var getPriorityMethods = ({ metaTags, linkTags, scriptTags, encode }) => {
|
|
550
|
+
const meta = prioritizer(metaTags, SEO_PRIORITY_TAGS.meta);
|
|
551
|
+
const link = prioritizer(linkTags, SEO_PRIORITY_TAGS.link);
|
|
552
|
+
const script = prioritizer(scriptTags, SEO_PRIORITY_TAGS.script);
|
|
553
|
+
const priorityMethods = {
|
|
554
|
+
toComponent: () => [
|
|
555
|
+
...generateTagsAsReactComponent("meta", meta.priority),
|
|
556
|
+
...generateTagsAsReactComponent("link", link.priority),
|
|
557
|
+
...generateTagsAsReactComponent("script", script.priority)
|
|
558
|
+
],
|
|
559
|
+
toString: () => (
|
|
560
|
+
// generate all the tags as strings and concatenate them
|
|
561
|
+
`${getMethodsForTag("meta", meta.priority, encode)} ${getMethodsForTag(
|
|
562
|
+
"link",
|
|
563
|
+
link.priority,
|
|
564
|
+
encode
|
|
565
|
+
)} ${getMethodsForTag("script", script.priority, encode)}`
|
|
566
|
+
)
|
|
567
|
+
};
|
|
568
|
+
return {
|
|
569
|
+
priorityMethods,
|
|
570
|
+
metaTags: meta.default,
|
|
571
|
+
linkTags: link.default,
|
|
572
|
+
scriptTags: script.default
|
|
573
|
+
};
|
|
574
|
+
};
|
|
575
|
+
var mapStateOnServer = (props) => {
|
|
576
|
+
const {
|
|
577
|
+
baseTag,
|
|
578
|
+
bodyAttributes,
|
|
579
|
+
encode = true,
|
|
580
|
+
htmlAttributes,
|
|
581
|
+
noscriptTags,
|
|
582
|
+
styleTags,
|
|
583
|
+
title = "",
|
|
584
|
+
titleAttributes,
|
|
585
|
+
prioritizeSeoTags
|
|
586
|
+
} = props;
|
|
587
|
+
let { linkTags, metaTags, scriptTags } = props;
|
|
588
|
+
let priorityMethods = {
|
|
589
|
+
toComponent: () => {
|
|
590
|
+
},
|
|
591
|
+
toString: () => ""
|
|
592
|
+
};
|
|
593
|
+
if (prioritizeSeoTags) {
|
|
594
|
+
({ priorityMethods, linkTags, metaTags, scriptTags } = getPriorityMethods(props));
|
|
595
|
+
}
|
|
596
|
+
return {
|
|
597
|
+
priority: priorityMethods,
|
|
598
|
+
base: getMethodsForTag("base", baseTag, encode),
|
|
599
|
+
bodyAttributes: getMethodsForTag("bodyAttributes", bodyAttributes, encode),
|
|
600
|
+
htmlAttributes: getMethodsForTag("htmlAttributes", htmlAttributes, encode),
|
|
601
|
+
link: getMethodsForTag("link", linkTags, encode),
|
|
602
|
+
meta: getMethodsForTag("meta", metaTags, encode),
|
|
603
|
+
noscript: getMethodsForTag("noscript", noscriptTags, encode),
|
|
604
|
+
script: getMethodsForTag("script", scriptTags, encode),
|
|
605
|
+
style: getMethodsForTag("style", styleTags, encode),
|
|
606
|
+
title: getMethodsForTag("title", { title, titleAttributes }, encode)
|
|
607
|
+
};
|
|
608
|
+
};
|
|
609
|
+
var server_default = mapStateOnServer;
|
|
610
|
+
var instances = [];
|
|
611
|
+
var isDocument = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
612
|
+
var HelmetData = class {
|
|
613
|
+
instances = [];
|
|
614
|
+
canUseDOM = isDocument;
|
|
615
|
+
context;
|
|
616
|
+
value = {
|
|
617
|
+
setHelmet: (serverState) => {
|
|
618
|
+
this.context.helmet = serverState;
|
|
619
|
+
},
|
|
620
|
+
helmetInstances: {
|
|
621
|
+
get: () => this.canUseDOM ? instances : this.instances,
|
|
622
|
+
add: (instance) => {
|
|
623
|
+
(this.canUseDOM ? instances : this.instances).push(instance);
|
|
624
|
+
},
|
|
625
|
+
remove: (instance) => {
|
|
626
|
+
const index = (this.canUseDOM ? instances : this.instances).indexOf(instance);
|
|
627
|
+
(this.canUseDOM ? instances : this.instances).splice(index, 1);
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
};
|
|
631
|
+
constructor(context, canUseDOM) {
|
|
632
|
+
this.context = context;
|
|
633
|
+
this.canUseDOM = canUseDOM || false;
|
|
634
|
+
if (!canUseDOM) {
|
|
635
|
+
context.helmet = server_default({
|
|
636
|
+
baseTag: [],
|
|
637
|
+
bodyAttributes: {},
|
|
638
|
+
encodeSpecialCharacters: true,
|
|
639
|
+
htmlAttributes: {},
|
|
640
|
+
linkTags: [],
|
|
641
|
+
metaTags: [],
|
|
642
|
+
noscriptTags: [],
|
|
643
|
+
scriptTags: [],
|
|
644
|
+
styleTags: [],
|
|
645
|
+
title: "",
|
|
646
|
+
titleAttributes: {}
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
};
|
|
651
|
+
var defaultValue = {};
|
|
652
|
+
var Context = React2.createContext(defaultValue);
|
|
653
|
+
var HelmetProvider = class _HelmetProvider extends Component {
|
|
654
|
+
static canUseDOM = isDocument;
|
|
655
|
+
helmetData;
|
|
656
|
+
constructor(props) {
|
|
657
|
+
super(props);
|
|
658
|
+
this.helmetData = new HelmetData(this.props.context || {}, _HelmetProvider.canUseDOM);
|
|
659
|
+
}
|
|
660
|
+
render() {
|
|
661
|
+
return /* @__PURE__ */ React2.createElement(Context.Provider, { value: this.helmetData.value }, this.props.children);
|
|
662
|
+
}
|
|
663
|
+
};
|
|
664
|
+
var updateTags = (type, tags) => {
|
|
665
|
+
const headElement = document.head || document.querySelector(
|
|
666
|
+
"head"
|
|
667
|
+
/* HEAD */
|
|
668
|
+
);
|
|
669
|
+
const tagNodes = headElement.querySelectorAll(`${type}[${HELMET_ATTRIBUTE}]`);
|
|
670
|
+
const oldTags = [].slice.call(tagNodes);
|
|
671
|
+
const newTags = [];
|
|
672
|
+
let indexToDelete;
|
|
673
|
+
if (tags && tags.length) {
|
|
674
|
+
tags.forEach((tag) => {
|
|
675
|
+
const newElement = document.createElement(type);
|
|
676
|
+
for (const attribute in tag) {
|
|
677
|
+
if (Object.prototype.hasOwnProperty.call(tag, attribute)) {
|
|
678
|
+
if (attribute === "innerHTML") {
|
|
679
|
+
newElement.innerHTML = tag.innerHTML;
|
|
680
|
+
} else if (attribute === "cssText") {
|
|
681
|
+
if (newElement.styleSheet) {
|
|
682
|
+
newElement.styleSheet.cssText = tag.cssText;
|
|
683
|
+
} else {
|
|
684
|
+
newElement.appendChild(document.createTextNode(tag.cssText));
|
|
685
|
+
}
|
|
686
|
+
} else {
|
|
687
|
+
const attr = attribute;
|
|
688
|
+
const value = typeof tag[attr] === "undefined" ? "" : tag[attr];
|
|
689
|
+
newElement.setAttribute(attribute, value);
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
newElement.setAttribute(HELMET_ATTRIBUTE, "true");
|
|
694
|
+
if (oldTags.some((existingTag, index) => {
|
|
695
|
+
indexToDelete = index;
|
|
696
|
+
return newElement.isEqualNode(existingTag);
|
|
697
|
+
})) {
|
|
698
|
+
oldTags.splice(indexToDelete, 1);
|
|
699
|
+
} else {
|
|
700
|
+
newTags.push(newElement);
|
|
701
|
+
}
|
|
702
|
+
});
|
|
703
|
+
}
|
|
704
|
+
oldTags.forEach((tag) => tag.parentNode?.removeChild(tag));
|
|
705
|
+
newTags.forEach((tag) => headElement.appendChild(tag));
|
|
706
|
+
return {
|
|
707
|
+
oldTags,
|
|
708
|
+
newTags
|
|
709
|
+
};
|
|
710
|
+
};
|
|
711
|
+
var updateAttributes = (tagName, attributes) => {
|
|
712
|
+
const elementTag = document.getElementsByTagName(tagName)[0];
|
|
713
|
+
if (!elementTag) {
|
|
714
|
+
return;
|
|
715
|
+
}
|
|
716
|
+
const helmetAttributeString = elementTag.getAttribute(HELMET_ATTRIBUTE);
|
|
717
|
+
const helmetAttributes = helmetAttributeString ? helmetAttributeString.split(",") : [];
|
|
718
|
+
const attributesToRemove = [...helmetAttributes];
|
|
719
|
+
const attributeKeys = Object.keys(attributes);
|
|
720
|
+
for (const attribute of attributeKeys) {
|
|
721
|
+
const value = attributes[attribute] || "";
|
|
722
|
+
if (elementTag.getAttribute(attribute) !== value) {
|
|
723
|
+
elementTag.setAttribute(attribute, value);
|
|
724
|
+
}
|
|
725
|
+
if (helmetAttributes.indexOf(attribute) === -1) {
|
|
726
|
+
helmetAttributes.push(attribute);
|
|
727
|
+
}
|
|
728
|
+
const indexToSave = attributesToRemove.indexOf(attribute);
|
|
729
|
+
if (indexToSave !== -1) {
|
|
730
|
+
attributesToRemove.splice(indexToSave, 1);
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
for (let i = attributesToRemove.length - 1; i >= 0; i -= 1) {
|
|
734
|
+
elementTag.removeAttribute(attributesToRemove[i]);
|
|
735
|
+
}
|
|
736
|
+
if (helmetAttributes.length === attributesToRemove.length) {
|
|
737
|
+
elementTag.removeAttribute(HELMET_ATTRIBUTE);
|
|
738
|
+
} else if (elementTag.getAttribute(HELMET_ATTRIBUTE) !== attributeKeys.join(",")) {
|
|
739
|
+
elementTag.setAttribute(HELMET_ATTRIBUTE, attributeKeys.join(","));
|
|
740
|
+
}
|
|
741
|
+
};
|
|
742
|
+
var updateTitle = (title, attributes) => {
|
|
743
|
+
if (typeof title !== "undefined" && document.title !== title) {
|
|
744
|
+
document.title = flattenArray(title);
|
|
745
|
+
}
|
|
746
|
+
updateAttributes("title", attributes);
|
|
747
|
+
};
|
|
748
|
+
var commitTagChanges = (newState, cb) => {
|
|
749
|
+
const {
|
|
750
|
+
baseTag,
|
|
751
|
+
bodyAttributes,
|
|
752
|
+
htmlAttributes,
|
|
753
|
+
linkTags,
|
|
754
|
+
metaTags,
|
|
755
|
+
noscriptTags,
|
|
756
|
+
onChangeClientState,
|
|
757
|
+
scriptTags,
|
|
758
|
+
styleTags,
|
|
759
|
+
title,
|
|
760
|
+
titleAttributes
|
|
761
|
+
} = newState;
|
|
762
|
+
updateAttributes("body", bodyAttributes);
|
|
763
|
+
updateAttributes("html", htmlAttributes);
|
|
764
|
+
updateTitle(title, titleAttributes);
|
|
765
|
+
const tagUpdates = {
|
|
766
|
+
baseTag: updateTags("base", baseTag),
|
|
767
|
+
linkTags: updateTags("link", linkTags),
|
|
768
|
+
metaTags: updateTags("meta", metaTags),
|
|
769
|
+
noscriptTags: updateTags("noscript", noscriptTags),
|
|
770
|
+
scriptTags: updateTags("script", scriptTags),
|
|
771
|
+
styleTags: updateTags("style", styleTags)
|
|
772
|
+
};
|
|
773
|
+
const addedTags = {};
|
|
774
|
+
const removedTags = {};
|
|
775
|
+
Object.keys(tagUpdates).forEach((tagType) => {
|
|
776
|
+
const { newTags, oldTags } = tagUpdates[tagType];
|
|
777
|
+
if (newTags.length) {
|
|
778
|
+
addedTags[tagType] = newTags;
|
|
779
|
+
}
|
|
780
|
+
if (oldTags.length) {
|
|
781
|
+
removedTags[tagType] = tagUpdates[tagType].oldTags;
|
|
782
|
+
}
|
|
783
|
+
});
|
|
784
|
+
if (cb) {
|
|
785
|
+
cb();
|
|
786
|
+
}
|
|
787
|
+
onChangeClientState(newState, addedTags, removedTags);
|
|
788
|
+
};
|
|
789
|
+
var _helmetCallback = null;
|
|
790
|
+
var handleStateChangeOnClient = (newState) => {
|
|
791
|
+
if (_helmetCallback) {
|
|
792
|
+
cancelAnimationFrame(_helmetCallback);
|
|
793
|
+
}
|
|
794
|
+
if (newState.defer) {
|
|
795
|
+
_helmetCallback = requestAnimationFrame(() => {
|
|
796
|
+
commitTagChanges(newState, () => {
|
|
797
|
+
_helmetCallback = null;
|
|
798
|
+
});
|
|
799
|
+
});
|
|
800
|
+
} else {
|
|
801
|
+
commitTagChanges(newState);
|
|
802
|
+
_helmetCallback = null;
|
|
803
|
+
}
|
|
804
|
+
};
|
|
805
|
+
var client_default = handleStateChangeOnClient;
|
|
806
|
+
var HelmetDispatcher = class extends Component2 {
|
|
807
|
+
rendered = false;
|
|
808
|
+
shouldComponentUpdate(nextProps) {
|
|
809
|
+
return !(0, import_shallowequal.default)(nextProps, this.props);
|
|
810
|
+
}
|
|
811
|
+
componentDidUpdate() {
|
|
812
|
+
this.emitChange();
|
|
813
|
+
}
|
|
814
|
+
componentWillUnmount() {
|
|
815
|
+
const { helmetInstances } = this.props.context;
|
|
816
|
+
helmetInstances.remove(this);
|
|
817
|
+
this.emitChange();
|
|
818
|
+
}
|
|
819
|
+
emitChange() {
|
|
820
|
+
const { helmetInstances, setHelmet } = this.props.context;
|
|
821
|
+
let serverState = null;
|
|
822
|
+
const state = reducePropsToState(
|
|
823
|
+
helmetInstances.get().map((instance) => {
|
|
824
|
+
const props = { ...instance.props };
|
|
825
|
+
delete props.context;
|
|
826
|
+
return props;
|
|
827
|
+
})
|
|
828
|
+
);
|
|
829
|
+
if (HelmetProvider.canUseDOM) {
|
|
830
|
+
client_default(state);
|
|
831
|
+
} else if (server_default) {
|
|
832
|
+
serverState = server_default(state);
|
|
833
|
+
}
|
|
834
|
+
setHelmet(serverState);
|
|
835
|
+
}
|
|
836
|
+
// componentWillMount will be deprecated
|
|
837
|
+
// for SSR, initialize on first render
|
|
838
|
+
// constructor is also unsafe in StrictMode
|
|
839
|
+
init() {
|
|
840
|
+
if (this.rendered) {
|
|
841
|
+
return;
|
|
842
|
+
}
|
|
843
|
+
this.rendered = true;
|
|
844
|
+
const { helmetInstances } = this.props.context;
|
|
845
|
+
helmetInstances.add(this);
|
|
846
|
+
this.emitChange();
|
|
847
|
+
}
|
|
848
|
+
render() {
|
|
849
|
+
this.init();
|
|
850
|
+
return null;
|
|
851
|
+
}
|
|
852
|
+
};
|
|
853
|
+
var Helmet = class extends Component3 {
|
|
854
|
+
static defaultProps = {
|
|
855
|
+
defer: true,
|
|
856
|
+
encodeSpecialCharacters: true,
|
|
857
|
+
prioritizeSeoTags: false
|
|
858
|
+
};
|
|
859
|
+
shouldComponentUpdate(nextProps) {
|
|
860
|
+
return !(0, import_react_fast_compare.default)(without(this.props, "helmetData"), without(nextProps, "helmetData"));
|
|
861
|
+
}
|
|
862
|
+
mapNestedChildrenToProps(child, nestedChildren) {
|
|
863
|
+
if (!nestedChildren) {
|
|
864
|
+
return null;
|
|
865
|
+
}
|
|
866
|
+
switch (child.type) {
|
|
867
|
+
case "script":
|
|
868
|
+
case "noscript":
|
|
869
|
+
return {
|
|
870
|
+
innerHTML: nestedChildren
|
|
871
|
+
};
|
|
872
|
+
case "style":
|
|
873
|
+
return {
|
|
874
|
+
cssText: nestedChildren
|
|
875
|
+
};
|
|
876
|
+
default:
|
|
877
|
+
throw new Error(
|
|
878
|
+
`<${child.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`
|
|
879
|
+
);
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
flattenArrayTypeChildren(child, arrayTypeChildren, newChildProps, nestedChildren) {
|
|
883
|
+
return {
|
|
884
|
+
...arrayTypeChildren,
|
|
885
|
+
[child.type]: [
|
|
886
|
+
...arrayTypeChildren[child.type] || [],
|
|
887
|
+
{
|
|
888
|
+
...newChildProps,
|
|
889
|
+
...this.mapNestedChildrenToProps(child, nestedChildren)
|
|
890
|
+
}
|
|
891
|
+
]
|
|
892
|
+
};
|
|
893
|
+
}
|
|
894
|
+
mapObjectTypeChildren(child, newProps, newChildProps, nestedChildren) {
|
|
895
|
+
switch (child.type) {
|
|
896
|
+
case "title":
|
|
897
|
+
return {
|
|
898
|
+
...newProps,
|
|
899
|
+
[child.type]: nestedChildren,
|
|
900
|
+
titleAttributes: { ...newChildProps }
|
|
901
|
+
};
|
|
902
|
+
case "body":
|
|
903
|
+
return {
|
|
904
|
+
...newProps,
|
|
905
|
+
bodyAttributes: { ...newChildProps }
|
|
906
|
+
};
|
|
907
|
+
case "html":
|
|
908
|
+
return {
|
|
909
|
+
...newProps,
|
|
910
|
+
htmlAttributes: { ...newChildProps }
|
|
911
|
+
};
|
|
912
|
+
default:
|
|
913
|
+
return {
|
|
914
|
+
...newProps,
|
|
915
|
+
[child.type]: { ...newChildProps }
|
|
916
|
+
};
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
mapArrayTypeChildrenToProps(arrayTypeChildren, newProps) {
|
|
920
|
+
let newFlattenedProps = { ...newProps };
|
|
921
|
+
Object.keys(arrayTypeChildren).forEach((arrayChildName) => {
|
|
922
|
+
newFlattenedProps = {
|
|
923
|
+
...newFlattenedProps,
|
|
924
|
+
[arrayChildName]: arrayTypeChildren[arrayChildName]
|
|
925
|
+
};
|
|
926
|
+
});
|
|
927
|
+
return newFlattenedProps;
|
|
928
|
+
}
|
|
929
|
+
warnOnInvalidChildren(child, nestedChildren) {
|
|
930
|
+
(0, import_invariant.default)(
|
|
931
|
+
VALID_TAG_NAMES.some((name) => child.type === name),
|
|
932
|
+
typeof child.type === "function" ? `You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.` : `Only elements types ${VALID_TAG_NAMES.join(
|
|
933
|
+
", "
|
|
934
|
+
)} are allowed. Helmet does not support rendering <${child.type}> elements. Refer to our API for more information.`
|
|
935
|
+
);
|
|
936
|
+
(0, import_invariant.default)(
|
|
937
|
+
!nestedChildren || typeof nestedChildren === "string" || Array.isArray(nestedChildren) && !nestedChildren.some((nestedChild) => typeof nestedChild !== "string"),
|
|
938
|
+
`Helmet expects a string as a child of <${child.type}>. Did you forget to wrap your children in braces? ( <${child.type}>{\`\`}</${child.type}> ) Refer to our API for more information.`
|
|
939
|
+
);
|
|
940
|
+
return true;
|
|
941
|
+
}
|
|
942
|
+
mapChildrenToProps(children, newProps) {
|
|
943
|
+
let arrayTypeChildren = {};
|
|
944
|
+
React3.Children.forEach(children, (child) => {
|
|
945
|
+
if (!child || !child.props) {
|
|
946
|
+
return;
|
|
947
|
+
}
|
|
948
|
+
const { children: nestedChildren, ...childProps } = child.props;
|
|
949
|
+
const newChildProps = Object.keys(childProps).reduce((obj, key) => {
|
|
950
|
+
obj[HTML_TAG_MAP[key] || key] = childProps[key];
|
|
951
|
+
return obj;
|
|
952
|
+
}, {});
|
|
953
|
+
let { type } = child;
|
|
954
|
+
if (typeof type === "symbol") {
|
|
955
|
+
type = type.toString();
|
|
956
|
+
} else {
|
|
957
|
+
this.warnOnInvalidChildren(child, nestedChildren);
|
|
958
|
+
}
|
|
959
|
+
switch (type) {
|
|
960
|
+
case "Symbol(react.fragment)":
|
|
961
|
+
newProps = this.mapChildrenToProps(nestedChildren, newProps);
|
|
962
|
+
break;
|
|
963
|
+
case "link":
|
|
964
|
+
case "meta":
|
|
965
|
+
case "noscript":
|
|
966
|
+
case "script":
|
|
967
|
+
case "style":
|
|
968
|
+
arrayTypeChildren = this.flattenArrayTypeChildren(
|
|
969
|
+
child,
|
|
970
|
+
arrayTypeChildren,
|
|
971
|
+
newChildProps,
|
|
972
|
+
nestedChildren
|
|
973
|
+
);
|
|
974
|
+
break;
|
|
975
|
+
default:
|
|
976
|
+
newProps = this.mapObjectTypeChildren(child, newProps, newChildProps, nestedChildren);
|
|
977
|
+
break;
|
|
978
|
+
}
|
|
979
|
+
});
|
|
980
|
+
return this.mapArrayTypeChildrenToProps(arrayTypeChildren, newProps);
|
|
981
|
+
}
|
|
982
|
+
render() {
|
|
983
|
+
const { children, ...props } = this.props;
|
|
984
|
+
let newProps = { ...props };
|
|
985
|
+
let { helmetData } = props;
|
|
986
|
+
if (children) {
|
|
987
|
+
newProps = this.mapChildrenToProps(children, newProps);
|
|
988
|
+
}
|
|
989
|
+
if (helmetData && !(helmetData instanceof HelmetData)) {
|
|
990
|
+
const data = helmetData;
|
|
991
|
+
helmetData = new HelmetData(data.context, true);
|
|
992
|
+
delete newProps.helmetData;
|
|
993
|
+
}
|
|
994
|
+
return helmetData ? /* @__PURE__ */ React3.createElement(HelmetDispatcher, { ...newProps, context: helmetData.value }) : /* @__PURE__ */ React3.createElement(Context.Consumer, null, (context) => /* @__PURE__ */ React3.createElement(HelmetDispatcher, { ...newProps, context }));
|
|
995
|
+
}
|
|
996
|
+
};
|
|
997
|
+
|
|
998
|
+
// src/components/SEOProvider.tsx
|
|
24
999
|
import { jsx } from "react/jsx-runtime";
|
|
25
1000
|
var SEOContext = createContext(void 0);
|
|
26
1001
|
var SEOProvider = ({ config, children, helmetContext }) => {
|
|
@@ -35,7 +1010,6 @@ var useSEOConfig = () => {
|
|
|
35
1010
|
};
|
|
36
1011
|
|
|
37
1012
|
// src/components/SEO.tsx
|
|
38
|
-
import { Helmet } from "react-helmet-async";
|
|
39
1013
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
40
1014
|
var SEO = (props) => {
|
|
41
1015
|
const config = useSEOConfig();
|
|
@@ -164,7 +1138,6 @@ var SEO = (props) => {
|
|
|
164
1138
|
};
|
|
165
1139
|
|
|
166
1140
|
// src/components/Breadcrumb.tsx
|
|
167
|
-
import { Helmet as Helmet2 } from "react-helmet-async";
|
|
168
1141
|
import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
169
1142
|
var Breadcrumb = ({
|
|
170
1143
|
items,
|
|
@@ -183,7 +1156,7 @@ var Breadcrumb = ({
|
|
|
183
1156
|
}))
|
|
184
1157
|
};
|
|
185
1158
|
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
186
|
-
/* @__PURE__ */ jsx3(
|
|
1159
|
+
/* @__PURE__ */ jsx3(Helmet, { children: /* @__PURE__ */ jsx3("script", { type: "application/ld+json", children: JSON.stringify(schema) }) }),
|
|
187
1160
|
/* @__PURE__ */ jsx3("nav", { className, "aria-label": "Breadcrumb", children: /* @__PURE__ */ jsx3("ol", { style: { display: "flex", listStyle: "none", padding: 0 }, children: items.map((item, index) => {
|
|
188
1161
|
const isLast = index === items.length - 1;
|
|
189
1162
|
return /* @__PURE__ */ jsxs2("li", { style: { display: "flex", alignItems: "center" }, children: [
|
|
@@ -239,7 +1212,6 @@ var SeoProduct = ({ item, ...rest }) => {
|
|
|
239
1212
|
};
|
|
240
1213
|
|
|
241
1214
|
// src/components/SeoFAQ.tsx
|
|
242
|
-
import { Helmet as Helmet3 } from "react-helmet-async";
|
|
243
1215
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
244
1216
|
var SeoFAQ = ({ items }) => {
|
|
245
1217
|
const schema = {
|
|
@@ -254,11 +1226,10 @@ var SeoFAQ = ({ items }) => {
|
|
|
254
1226
|
}
|
|
255
1227
|
}))
|
|
256
1228
|
};
|
|
257
|
-
return /* @__PURE__ */ jsx6(
|
|
1229
|
+
return /* @__PURE__ */ jsx6(Helmet, { children: /* @__PURE__ */ jsx6("script", { type: "application/ld+json", children: JSON.stringify(schema) }) });
|
|
258
1230
|
};
|
|
259
1231
|
|
|
260
1232
|
// src/components/SeoVideo.tsx
|
|
261
|
-
import { Helmet as Helmet4 } from "react-helmet-async";
|
|
262
1233
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
263
1234
|
var SeoVideo = ({ video }) => {
|
|
264
1235
|
const schema = {
|
|
@@ -277,11 +1248,10 @@ var SeoVideo = ({ video }) => {
|
|
|
277
1248
|
"userInteractionCount": video.interactionStatistic.viewCount
|
|
278
1249
|
} : void 0
|
|
279
1250
|
};
|
|
280
|
-
return /* @__PURE__ */ jsx7(
|
|
1251
|
+
return /* @__PURE__ */ jsx7(Helmet, { children: /* @__PURE__ */ jsx7("script", { type: "application/ld+json", children: JSON.stringify(schema) }) });
|
|
281
1252
|
};
|
|
282
1253
|
|
|
283
1254
|
// src/components/SeoEvent.tsx
|
|
284
|
-
import { Helmet as Helmet5 } from "react-helmet-async";
|
|
285
1255
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
286
1256
|
var SeoEvent = ({ event }) => {
|
|
287
1257
|
const schema = {
|
|
@@ -318,11 +1288,10 @@ var SeoEvent = ({ event }) => {
|
|
|
318
1288
|
"url": event.organizer.url
|
|
319
1289
|
} : void 0
|
|
320
1290
|
};
|
|
321
|
-
return /* @__PURE__ */ jsx8(
|
|
1291
|
+
return /* @__PURE__ */ jsx8(Helmet, { children: /* @__PURE__ */ jsx8("script", { type: "application/ld+json", children: JSON.stringify(schema) }) });
|
|
322
1292
|
};
|
|
323
1293
|
|
|
324
1294
|
// src/components/SeoLocalBusiness.tsx
|
|
325
|
-
import { Helmet as Helmet6 } from "react-helmet-async";
|
|
326
1295
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
327
1296
|
var SeoLocalBusiness = ({ business }) => {
|
|
328
1297
|
const schema = {
|
|
@@ -350,12 +1319,18 @@ var SeoLocalBusiness = ({ business }) => {
|
|
|
350
1319
|
} : void 0,
|
|
351
1320
|
"openingHours": business.openingHours
|
|
352
1321
|
};
|
|
353
|
-
return /* @__PURE__ */ jsx9(
|
|
1322
|
+
return /* @__PURE__ */ jsx9(Helmet, { children: /* @__PURE__ */ jsx9("script", { type: "application/ld+json", children: JSON.stringify(schema) }) });
|
|
354
1323
|
};
|
|
355
1324
|
|
|
356
1325
|
// src/components/SeoCategory.tsx
|
|
357
1326
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
358
|
-
var SeoCategory = ({
|
|
1327
|
+
var SeoCategory = ({
|
|
1328
|
+
category,
|
|
1329
|
+
page = 1,
|
|
1330
|
+
totalPage = 1,
|
|
1331
|
+
pageSuffix = "Page",
|
|
1332
|
+
...rest
|
|
1333
|
+
}) => {
|
|
359
1334
|
const hasNext = page < totalPage;
|
|
360
1335
|
const hasPrev = page > 1;
|
|
361
1336
|
const baseUrl = category.url.split("?")[0];
|
|
@@ -366,7 +1341,7 @@ var SeoCategory = ({ category, page = 1, totalPage = 1, ...rest }) => {
|
|
|
366
1341
|
SEO,
|
|
367
1342
|
{
|
|
368
1343
|
type: "website",
|
|
369
|
-
title: `${category.name}${page > 1 ? ` -
|
|
1344
|
+
title: `${category.name}${page > 1 ? ` - ${pageSuffix} ${page}` : ""}`,
|
|
370
1345
|
description: category.description,
|
|
371
1346
|
image: category.image,
|
|
372
1347
|
canonical,
|
|
@@ -386,19 +1361,28 @@ var SeoCategory = ({ category, page = 1, totalPage = 1, ...rest }) => {
|
|
|
386
1361
|
|
|
387
1362
|
// src/components/SeoTag.tsx
|
|
388
1363
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
389
|
-
var SeoTag = ({
|
|
1364
|
+
var SeoTag = ({
|
|
1365
|
+
tag,
|
|
1366
|
+
page = 1,
|
|
1367
|
+
totalPage = 1,
|
|
1368
|
+
titlePrefix = "Tag",
|
|
1369
|
+
pageSuffix = "Page",
|
|
1370
|
+
defaultDescription,
|
|
1371
|
+
...rest
|
|
1372
|
+
}) => {
|
|
390
1373
|
const hasNext = page < totalPage;
|
|
391
1374
|
const hasPrev = page > 1;
|
|
392
1375
|
const baseUrl = tag.url.split("?")[0];
|
|
393
1376
|
const nextUrl = hasNext ? `${baseUrl}?page=${page + 1}` : void 0;
|
|
394
1377
|
const prevUrl = hasPrev ? page === 2 ? baseUrl : `${baseUrl}?page=${page - 1}` : void 0;
|
|
395
1378
|
const canonical = page === 1 ? baseUrl : `${baseUrl}?page=${page}`;
|
|
1379
|
+
const desc = tag.description || (defaultDescription ? defaultDescription.replace("{name}", tag.name) : `All posts tagged with ${tag.name}`);
|
|
396
1380
|
return /* @__PURE__ */ jsx11(
|
|
397
1381
|
SEO,
|
|
398
1382
|
{
|
|
399
1383
|
type: "website",
|
|
400
|
-
title:
|
|
401
|
-
description:
|
|
1384
|
+
title: `${titlePrefix}: ${tag.name}${page > 1 ? ` - ${pageSuffix} ${page}` : ""}`,
|
|
1385
|
+
description: desc,
|
|
402
1386
|
canonical,
|
|
403
1387
|
next: nextUrl,
|
|
404
1388
|
prev: prevUrl,
|
|
@@ -409,7 +1393,13 @@ var SeoTag = ({ tag, page = 1, totalPage = 1, ...rest }) => {
|
|
|
409
1393
|
|
|
410
1394
|
// src/components/SeoAuthor.tsx
|
|
411
1395
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
412
|
-
var SeoAuthor = ({
|
|
1396
|
+
var SeoAuthor = ({
|
|
1397
|
+
author,
|
|
1398
|
+
page = 1,
|
|
1399
|
+
totalPage = 1,
|
|
1400
|
+
pageSuffix = "Page",
|
|
1401
|
+
...rest
|
|
1402
|
+
}) => {
|
|
413
1403
|
const hasNext = page < totalPage;
|
|
414
1404
|
const hasPrev = page > 1;
|
|
415
1405
|
const baseUrl = author.url.split("?")[0];
|
|
@@ -420,7 +1410,7 @@ var SeoAuthor = ({ author, page = 1, totalPage = 1, ...rest }) => {
|
|
|
420
1410
|
SEO,
|
|
421
1411
|
{
|
|
422
1412
|
type: "profile",
|
|
423
|
-
title: `${author.name}${page > 1 ? ` -
|
|
1413
|
+
title: `${author.name}${page > 1 ? ` - ${pageSuffix} ${page}` : ""}`,
|
|
424
1414
|
description: author.description,
|
|
425
1415
|
image: author.image,
|
|
426
1416
|
canonical,
|
|
@@ -441,7 +1431,6 @@ var SeoAuthor = ({ author, page = 1, totalPage = 1, ...rest }) => {
|
|
|
441
1431
|
};
|
|
442
1432
|
|
|
443
1433
|
// src/components/SeoHowTo.tsx
|
|
444
|
-
import { Helmet as Helmet7 } from "react-helmet-async";
|
|
445
1434
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
446
1435
|
var SeoHowTo = ({ name, description, image, steps }) => {
|
|
447
1436
|
const schema = {
|
|
@@ -468,11 +1457,10 @@ var SeoHowTo = ({ name, description, image, steps }) => {
|
|
|
468
1457
|
};
|
|
469
1458
|
})
|
|
470
1459
|
};
|
|
471
|
-
return /* @__PURE__ */ jsx13(
|
|
1460
|
+
return /* @__PURE__ */ jsx13(Helmet, { children: /* @__PURE__ */ jsx13("script", { type: "application/ld+json", children: JSON.stringify(schema) }) });
|
|
472
1461
|
};
|
|
473
1462
|
|
|
474
1463
|
// src/components/SeoReview.tsx
|
|
475
|
-
import { Helmet as Helmet8 } from "react-helmet-async";
|
|
476
1464
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
477
1465
|
var SeoReview = ({ itemReviewed, review }) => {
|
|
478
1466
|
const schema = {
|
|
@@ -496,11 +1484,10 @@ var SeoReview = ({ itemReviewed, review }) => {
|
|
|
496
1484
|
"worstRating": review.worstRating || 1
|
|
497
1485
|
}
|
|
498
1486
|
};
|
|
499
|
-
return /* @__PURE__ */ jsx14(
|
|
1487
|
+
return /* @__PURE__ */ jsx14(Helmet, { children: /* @__PURE__ */ jsx14("script", { type: "application/ld+json", children: JSON.stringify(schema) }) });
|
|
500
1488
|
};
|
|
501
1489
|
|
|
502
1490
|
// src/components/SeoCourse.tsx
|
|
503
|
-
import { Helmet as Helmet9 } from "react-helmet-async";
|
|
504
1491
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
505
1492
|
var SeoCourse = ({ course }) => {
|
|
506
1493
|
const schema = {
|
|
@@ -515,11 +1502,10 @@ var SeoCourse = ({ course }) => {
|
|
|
515
1502
|
},
|
|
516
1503
|
"image": course.image
|
|
517
1504
|
};
|
|
518
|
-
return /* @__PURE__ */ jsx15(
|
|
1505
|
+
return /* @__PURE__ */ jsx15(Helmet, { children: /* @__PURE__ */ jsx15("script", { type: "application/ld+json", children: JSON.stringify(schema) }) });
|
|
519
1506
|
};
|
|
520
1507
|
|
|
521
1508
|
// src/components/SeoRecipe.tsx
|
|
522
|
-
import { Helmet as Helmet10 } from "react-helmet-async";
|
|
523
1509
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
524
1510
|
var SeoRecipe = ({ recipe }) => {
|
|
525
1511
|
const schema = {
|
|
@@ -547,11 +1533,10 @@ var SeoRecipe = ({ recipe }) => {
|
|
|
547
1533
|
"image": step.image
|
|
548
1534
|
}))
|
|
549
1535
|
};
|
|
550
|
-
return /* @__PURE__ */ jsx16(
|
|
1536
|
+
return /* @__PURE__ */ jsx16(Helmet, { children: /* @__PURE__ */ jsx16("script", { type: "application/ld+json", children: JSON.stringify(schema) }) });
|
|
551
1537
|
};
|
|
552
1538
|
|
|
553
1539
|
// src/components/SeoJobPosting.tsx
|
|
554
|
-
import { Helmet as Helmet11 } from "react-helmet-async";
|
|
555
1540
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
556
1541
|
var SeoJobPosting = ({ job }) => {
|
|
557
1542
|
const schema = {
|
|
@@ -594,10 +1579,11 @@ var SeoJobPosting = ({ job }) => {
|
|
|
594
1579
|
}
|
|
595
1580
|
} : void 0
|
|
596
1581
|
};
|
|
597
|
-
return /* @__PURE__ */ jsx17(
|
|
1582
|
+
return /* @__PURE__ */ jsx17(Helmet, { children: /* @__PURE__ */ jsx17("script", { type: "application/ld+json", children: JSON.stringify(schema) }) });
|
|
598
1583
|
};
|
|
599
1584
|
export {
|
|
600
1585
|
Breadcrumb,
|
|
1586
|
+
JsonLd,
|
|
601
1587
|
SEO,
|
|
602
1588
|
SEOProvider,
|
|
603
1589
|
SeoArticle,
|
|
@@ -614,11 +1600,19 @@ export {
|
|
|
614
1600
|
SeoReview,
|
|
615
1601
|
SeoTag,
|
|
616
1602
|
SeoVideo,
|
|
1603
|
+
cleanSchema,
|
|
1604
|
+
generateArticleMetadata,
|
|
617
1605
|
generateArticleSchema,
|
|
618
1606
|
generateBookSchema,
|
|
619
1607
|
generateBreadcrumbSchema,
|
|
1608
|
+
generateCategoryMetadata,
|
|
1609
|
+
generateCollectionPageSchema,
|
|
620
1610
|
generateEventSchema,
|
|
621
1611
|
generateFAQSchema,
|
|
1612
|
+
generateHomepageMetadata,
|
|
1613
|
+
generateHowToSchema,
|
|
1614
|
+
generateItemListSchema,
|
|
1615
|
+
generateJobPostingSchema,
|
|
622
1616
|
generateLocalBusinessSchema,
|
|
623
1617
|
generateMovieSchema,
|
|
624
1618
|
generateOrganizationSchema,
|
|
@@ -626,10 +1620,14 @@ export {
|
|
|
626
1620
|
generatePaginationLinks,
|
|
627
1621
|
generatePodcastEpisodeSchema,
|
|
628
1622
|
generatePodcastSchema,
|
|
1623
|
+
generateProductMetadata,
|
|
629
1624
|
generateProductSchema,
|
|
1625
|
+
generateRecipeSchema,
|
|
630
1626
|
generateSoftwareSchema,
|
|
631
1627
|
generateVideoSchema,
|
|
1628
|
+
generateWebPageSchema,
|
|
632
1629
|
generateWebSiteSchema,
|
|
633
1630
|
toNextMetadata,
|
|
634
|
-
useSEOConfig
|
|
1631
|
+
useSEOConfig,
|
|
1632
|
+
validateSEO
|
|
635
1633
|
};
|