dn-react-router-toolkit 0.1.6 → 0.1.8

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,321 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // src/seo-kit/index.ts
31
- var seo_kit_exports = {};
32
- __export(seo_kit_exports, {
33
- configSEO: () => configSEO,
34
- createLoader: () => createLoader,
35
- createSEOLoader: () => createSEOLoader
36
- });
37
- module.exports = __toCommonJS(seo_kit_exports);
38
-
39
- // src/seo-kit/loader.ts
40
- function createLoader(fn = () => ({})) {
41
- let loadedData;
42
- return {
43
- getData() {
44
- return loadedData;
45
- },
46
- wrap(mapper) {
47
- return async function Thing(props) {
48
- loadedData = await fn(props);
49
- return mapper(loadedData);
50
- };
51
- }
52
- };
53
- }
54
-
55
- // src/seo-kit/seo_loader.tsx
56
- var import_react = __toESM(require("react"));
57
- function createSEOLoader(fn = () => ({})) {
58
- const loader = createLoader(fn);
59
- return {
60
- ...loader,
61
- meta: loader.wrap((data) => data.seo.meta),
62
- Page(Fc) {
63
- return loader.wrap((data) => /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, data.seo?.generateJSONLD(), /* @__PURE__ */ import_react.default.createElement(Fc, { ...data })));
64
- }
65
- };
66
- }
67
-
68
- // src/seo-kit/seo.tsx
69
- var import_react2 = __toESM(require("react"));
70
- function configSEO(config) {
71
- return {
72
- config,
73
- async init(props = {}) {
74
- const canonicalPath = props.canonicalPath;
75
- const url = canonicalPath ? `${config.origin}${canonicalPath}` : `${config.origin}${props.path || ""}`;
76
- const pageTitle = props.title ? `${props.title} | ${config.siteName}` : config.siteName;
77
- const description = props.description || config.description;
78
- const keywords = props.keywords || config.keywords;
79
- const websiteSchemaId = `${config.origin}/#website`;
80
- const websiteSchema = {
81
- "@type": "WebSite",
82
- "@id": websiteSchemaId,
83
- url: config.origin,
84
- name: config.siteName,
85
- alternateName: config.siteName,
86
- description: config.description,
87
- inLanguage: "ko"
88
- };
89
- const thumbnailSchemaId = `${url}/#thumbnail`;
90
- const thumbnail = props.thumbnail || (typeof config.thumbnail === "function" ? await config.thumbnail() : config.thumbnail);
91
- const thumbnailUrl = thumbnail?.url;
92
- const socialImage = thumbnail ? [
93
- typeof thumbnail === "string" ? {
94
- url: thumbnail,
95
- alt: `${props.title} \uB300\uD45C \uC774\uBBF8\uC9C0`
96
- } : thumbnail
97
- ] : [];
98
- const images = [
99
- ...thumbnailUrl ? [
100
- {
101
- id: thumbnailSchemaId,
102
- url: thumbnailUrl,
103
- alt: `${props.title} \uB300\uD45C \uC774\uBBF8\uC9C0`
104
- }
105
- ] : [],
106
- ...props.images || [],
107
- ...props.collection?.map((portfolio) => portfolio.thumbnail) || []
108
- ].filter(Boolean);
109
- const image = images.filter((file) => file.id).map((file) => ({
110
- "@type": "ImageObject",
111
- "@id": `${url}/#${file.id}`
112
- }));
113
- const breadcrumbSchemaId = `${url}#breadcrumb`;
114
- const updatedAt = props.updatedAt;
115
- const createdAt = props.createdAt;
116
- const meta = () => {
117
- return [
118
- { title: pageTitle },
119
- { name: "description", content: description },
120
- { name: "keywords", content: keywords?.join(", ") || "" },
121
- {
122
- tagName: "link",
123
- rel: "canonical",
124
- href: url
125
- },
126
- { property: "og:type", content: props.type || "website" },
127
- { property: "og:title", content: pageTitle },
128
- { property: "og:description", content: description },
129
- { property: "og:url", content: url },
130
- { property: "og:site_name", content: config.siteName },
131
- ...socialImage.map((file) => ({
132
- property: "og:image",
133
- content: file.url
134
- })),
135
- {
136
- property: "twitter:card",
137
- content: socialImage.length > 0 ? "summary_large_image" : "summary"
138
- },
139
- { property: "twitter:title", content: pageTitle },
140
- { property: "twitter:description", content: description },
141
- ...socialImage.map((file) => ({
142
- property: "twitter:image",
143
- content: file.url
144
- }))
145
- ];
146
- };
147
- const additionalStructedData = [
148
- ...typeof props.structedData === "function" ? await props.structedData() : props.structedData || [],
149
- ...typeof config.structedData === "function" ? await config.structedData() : config.structedData || []
150
- ];
151
- function getStructedData() {
152
- const collectionMainEntity = props.collection ? {
153
- "@type": "ItemList",
154
- numberOfItems: props.collection.length,
155
- itemListElement: props.collection.map((item, index) => ({
156
- "@type": "ListItem",
157
- position: index + 1,
158
- url: item.url,
159
- item: {
160
- "@type": "WebPage",
161
- "@id": `${item.url}#webpage`,
162
- url: item.url,
163
- name: item.title,
164
- thumbnailUrl: item.thumbnail?.url,
165
- dateModified: item.updatedAt?.toISOString(),
166
- dateCreated: item.createdAt?.toISOString(),
167
- datePublished: item.createdAt?.toISOString()
168
- }
169
- }))
170
- } : void 0;
171
- return {
172
- "@context": "https://schema.org",
173
- "@graph": [
174
- {
175
- "@type": "WebPage",
176
- "@id": `${url}#webpage`,
177
- url,
178
- name: pageTitle,
179
- description,
180
- keywords,
181
- dateModified: updatedAt?.toISOString(),
182
- datePublished: createdAt?.toISOString(),
183
- dateCreated: createdAt?.toISOString(),
184
- primaryImageOfPage: thumbnail ? {
185
- "@id": thumbnailSchemaId
186
- } : void 0,
187
- isPartOf: {
188
- "@id": websiteSchemaId
189
- },
190
- inLanguage: "ko",
191
- breadcrumb: props.breadcrumbs && props.breadcrumbs.length > 0 ? {
192
- "@id": breadcrumbSchemaId
193
- } : void 0,
194
- image,
195
- mainEntity: collectionMainEntity
196
- },
197
- props.article && {
198
- "@type": "Article",
199
- "@id": `${url}#article`,
200
- url,
201
- name: pageTitle,
202
- description,
203
- keywords,
204
- headline: pageTitle,
205
- dateModified: updatedAt?.toISOString(),
206
- datePublished: createdAt?.toISOString(),
207
- dateCreated: createdAt?.toISOString(),
208
- isPartOf: {
209
- "@id": websiteSchemaId
210
- },
211
- inLanguage: "ko",
212
- image
213
- },
214
- props.blogPosting && {
215
- "@type": "BlogPosting",
216
- "@id": `${url}/#blogposting`,
217
- url,
218
- headline: pageTitle,
219
- description,
220
- thumbnailUrl,
221
- datePublished: createdAt?.toISOString(),
222
- dateModified: updatedAt?.toISOString(),
223
- isPartOf: { "@id": websiteSchemaId },
224
- image
225
- },
226
- props.creativeWork && {
227
- "@type": "CreativeWork",
228
- "@id": `${url}/#creativework`,
229
- url,
230
- name: pageTitle,
231
- description,
232
- datePublished: createdAt?.toISOString(),
233
- dateModified: updatedAt?.toISOString(),
234
- isPartOf: { "@id": websiteSchemaId },
235
- thumbnailUrl,
236
- image
237
- },
238
- props.visualArtwork && {
239
- "@type": "VisualArtwork",
240
- "@id": `${url}/#visualartwork`,
241
- url,
242
- name: pageTitle,
243
- description,
244
- datePublished: createdAt?.toISOString(),
245
- dateModified: updatedAt?.toISOString(),
246
- isPartOf: { "@id": websiteSchemaId },
247
- thumbnailUrl,
248
- image
249
- },
250
- props.collection && {
251
- "@type": "CollectionPage",
252
- "@id": `${url}/#collectionpage`,
253
- url,
254
- name: pageTitle,
255
- description,
256
- isPartOf: { "@id": websiteSchemaId },
257
- image,
258
- inLanguage: "ko-KR",
259
- breadcrumb: props.breadcrumbs && props.breadcrumbs.length > 0 ? {
260
- "@id": `${url}/#breadcrumb`
261
- } : void 0,
262
- mainEntity: collectionMainEntity
263
- },
264
- websiteSchema,
265
- props.breadcrumbs && props.breadcrumbs.length > 0 && {
266
- "@id": breadcrumbSchemaId,
267
- "@type": "BreadcrumbList",
268
- itemListElement: props.breadcrumbs.map((breadcrumb, index) => ({
269
- "@type": "ListItem",
270
- position: index + 1,
271
- name: breadcrumb.label,
272
- item: `${config.origin}${breadcrumb.href}`
273
- }))
274
- },
275
- ...additionalStructedData,
276
- ...images.map((file) => {
277
- return {
278
- "@type": "ImageObject",
279
- "@id": `${url}/#${file.id}`,
280
- url: file.url,
281
- contentUrl: file.url,
282
- name: file.alt,
283
- description: file.alt,
284
- width: file?.width?.toString(),
285
- height: file?.height?.toString(),
286
- creditText: config.copyright,
287
- license: `${config.origin}/terms`,
288
- copyrightNotice: config.copyright,
289
- acquireLicensePage: `${config.origin}/terms`
290
- };
291
- })
292
- ].filter(Boolean)
293
- };
294
- }
295
- function generateJSONLD() {
296
- const structedData = getStructedData();
297
- return /* @__PURE__ */ import_react2.default.createElement(
298
- "script",
299
- {
300
- type: "application/ld+json",
301
- dangerouslySetInnerHTML: {
302
- __html: JSON.stringify(structedData).replace(/</g, "\\u003c")
303
- }
304
- }
305
- );
306
- }
307
- return {
308
- config,
309
- props,
310
- meta,
311
- generateJSONLD
312
- };
313
- }
314
- };
315
- }
316
- // Annotate the CommonJS export names for ESM import in node:
317
- 0 && (module.exports = {
318
- configSEO,
319
- createLoader,
320
- createSEOLoader
321
- });
@@ -1,282 +0,0 @@
1
- // src/seo-kit/loader.ts
2
- function createLoader(fn = () => ({})) {
3
- let loadedData;
4
- return {
5
- getData() {
6
- return loadedData;
7
- },
8
- wrap(mapper) {
9
- return async function Thing(props) {
10
- loadedData = await fn(props);
11
- return mapper(loadedData);
12
- };
13
- }
14
- };
15
- }
16
-
17
- // src/seo-kit/seo_loader.tsx
18
- import React from "react";
19
- function createSEOLoader(fn = () => ({})) {
20
- const loader = createLoader(fn);
21
- return {
22
- ...loader,
23
- meta: loader.wrap((data) => data.seo.meta),
24
- Page(Fc) {
25
- return loader.wrap((data) => /* @__PURE__ */ React.createElement(React.Fragment, null, data.seo?.generateJSONLD(), /* @__PURE__ */ React.createElement(Fc, { ...data })));
26
- }
27
- };
28
- }
29
-
30
- // src/seo-kit/seo.tsx
31
- import React2 from "react";
32
- function configSEO(config) {
33
- return {
34
- config,
35
- async init(props = {}) {
36
- const canonicalPath = props.canonicalPath;
37
- const url = canonicalPath ? `${config.origin}${canonicalPath}` : `${config.origin}${props.path || ""}`;
38
- const pageTitle = props.title ? `${props.title} | ${config.siteName}` : config.siteName;
39
- const description = props.description || config.description;
40
- const keywords = props.keywords || config.keywords;
41
- const websiteSchemaId = `${config.origin}/#website`;
42
- const websiteSchema = {
43
- "@type": "WebSite",
44
- "@id": websiteSchemaId,
45
- url: config.origin,
46
- name: config.siteName,
47
- alternateName: config.siteName,
48
- description: config.description,
49
- inLanguage: "ko"
50
- };
51
- const thumbnailSchemaId = `${url}/#thumbnail`;
52
- const thumbnail = props.thumbnail || (typeof config.thumbnail === "function" ? await config.thumbnail() : config.thumbnail);
53
- const thumbnailUrl = thumbnail?.url;
54
- const socialImage = thumbnail ? [
55
- typeof thumbnail === "string" ? {
56
- url: thumbnail,
57
- alt: `${props.title} \uB300\uD45C \uC774\uBBF8\uC9C0`
58
- } : thumbnail
59
- ] : [];
60
- const images = [
61
- ...thumbnailUrl ? [
62
- {
63
- id: thumbnailSchemaId,
64
- url: thumbnailUrl,
65
- alt: `${props.title} \uB300\uD45C \uC774\uBBF8\uC9C0`
66
- }
67
- ] : [],
68
- ...props.images || [],
69
- ...props.collection?.map((portfolio) => portfolio.thumbnail) || []
70
- ].filter(Boolean);
71
- const image = images.filter((file) => file.id).map((file) => ({
72
- "@type": "ImageObject",
73
- "@id": `${url}/#${file.id}`
74
- }));
75
- const breadcrumbSchemaId = `${url}#breadcrumb`;
76
- const updatedAt = props.updatedAt;
77
- const createdAt = props.createdAt;
78
- const meta = () => {
79
- return [
80
- { title: pageTitle },
81
- { name: "description", content: description },
82
- { name: "keywords", content: keywords?.join(", ") || "" },
83
- {
84
- tagName: "link",
85
- rel: "canonical",
86
- href: url
87
- },
88
- { property: "og:type", content: props.type || "website" },
89
- { property: "og:title", content: pageTitle },
90
- { property: "og:description", content: description },
91
- { property: "og:url", content: url },
92
- { property: "og:site_name", content: config.siteName },
93
- ...socialImage.map((file) => ({
94
- property: "og:image",
95
- content: file.url
96
- })),
97
- {
98
- property: "twitter:card",
99
- content: socialImage.length > 0 ? "summary_large_image" : "summary"
100
- },
101
- { property: "twitter:title", content: pageTitle },
102
- { property: "twitter:description", content: description },
103
- ...socialImage.map((file) => ({
104
- property: "twitter:image",
105
- content: file.url
106
- }))
107
- ];
108
- };
109
- const additionalStructedData = [
110
- ...typeof props.structedData === "function" ? await props.structedData() : props.structedData || [],
111
- ...typeof config.structedData === "function" ? await config.structedData() : config.structedData || []
112
- ];
113
- function getStructedData() {
114
- const collectionMainEntity = props.collection ? {
115
- "@type": "ItemList",
116
- numberOfItems: props.collection.length,
117
- itemListElement: props.collection.map((item, index) => ({
118
- "@type": "ListItem",
119
- position: index + 1,
120
- url: item.url,
121
- item: {
122
- "@type": "WebPage",
123
- "@id": `${item.url}#webpage`,
124
- url: item.url,
125
- name: item.title,
126
- thumbnailUrl: item.thumbnail?.url,
127
- dateModified: item.updatedAt?.toISOString(),
128
- dateCreated: item.createdAt?.toISOString(),
129
- datePublished: item.createdAt?.toISOString()
130
- }
131
- }))
132
- } : void 0;
133
- return {
134
- "@context": "https://schema.org",
135
- "@graph": [
136
- {
137
- "@type": "WebPage",
138
- "@id": `${url}#webpage`,
139
- url,
140
- name: pageTitle,
141
- description,
142
- keywords,
143
- dateModified: updatedAt?.toISOString(),
144
- datePublished: createdAt?.toISOString(),
145
- dateCreated: createdAt?.toISOString(),
146
- primaryImageOfPage: thumbnail ? {
147
- "@id": thumbnailSchemaId
148
- } : void 0,
149
- isPartOf: {
150
- "@id": websiteSchemaId
151
- },
152
- inLanguage: "ko",
153
- breadcrumb: props.breadcrumbs && props.breadcrumbs.length > 0 ? {
154
- "@id": breadcrumbSchemaId
155
- } : void 0,
156
- image,
157
- mainEntity: collectionMainEntity
158
- },
159
- props.article && {
160
- "@type": "Article",
161
- "@id": `${url}#article`,
162
- url,
163
- name: pageTitle,
164
- description,
165
- keywords,
166
- headline: pageTitle,
167
- dateModified: updatedAt?.toISOString(),
168
- datePublished: createdAt?.toISOString(),
169
- dateCreated: createdAt?.toISOString(),
170
- isPartOf: {
171
- "@id": websiteSchemaId
172
- },
173
- inLanguage: "ko",
174
- image
175
- },
176
- props.blogPosting && {
177
- "@type": "BlogPosting",
178
- "@id": `${url}/#blogposting`,
179
- url,
180
- headline: pageTitle,
181
- description,
182
- thumbnailUrl,
183
- datePublished: createdAt?.toISOString(),
184
- dateModified: updatedAt?.toISOString(),
185
- isPartOf: { "@id": websiteSchemaId },
186
- image
187
- },
188
- props.creativeWork && {
189
- "@type": "CreativeWork",
190
- "@id": `${url}/#creativework`,
191
- url,
192
- name: pageTitle,
193
- description,
194
- datePublished: createdAt?.toISOString(),
195
- dateModified: updatedAt?.toISOString(),
196
- isPartOf: { "@id": websiteSchemaId },
197
- thumbnailUrl,
198
- image
199
- },
200
- props.visualArtwork && {
201
- "@type": "VisualArtwork",
202
- "@id": `${url}/#visualartwork`,
203
- url,
204
- name: pageTitle,
205
- description,
206
- datePublished: createdAt?.toISOString(),
207
- dateModified: updatedAt?.toISOString(),
208
- isPartOf: { "@id": websiteSchemaId },
209
- thumbnailUrl,
210
- image
211
- },
212
- props.collection && {
213
- "@type": "CollectionPage",
214
- "@id": `${url}/#collectionpage`,
215
- url,
216
- name: pageTitle,
217
- description,
218
- isPartOf: { "@id": websiteSchemaId },
219
- image,
220
- inLanguage: "ko-KR",
221
- breadcrumb: props.breadcrumbs && props.breadcrumbs.length > 0 ? {
222
- "@id": `${url}/#breadcrumb`
223
- } : void 0,
224
- mainEntity: collectionMainEntity
225
- },
226
- websiteSchema,
227
- props.breadcrumbs && props.breadcrumbs.length > 0 && {
228
- "@id": breadcrumbSchemaId,
229
- "@type": "BreadcrumbList",
230
- itemListElement: props.breadcrumbs.map((breadcrumb, index) => ({
231
- "@type": "ListItem",
232
- position: index + 1,
233
- name: breadcrumb.label,
234
- item: `${config.origin}${breadcrumb.href}`
235
- }))
236
- },
237
- ...additionalStructedData,
238
- ...images.map((file) => {
239
- return {
240
- "@type": "ImageObject",
241
- "@id": `${url}/#${file.id}`,
242
- url: file.url,
243
- contentUrl: file.url,
244
- name: file.alt,
245
- description: file.alt,
246
- width: file?.width?.toString(),
247
- height: file?.height?.toString(),
248
- creditText: config.copyright,
249
- license: `${config.origin}/terms`,
250
- copyrightNotice: config.copyright,
251
- acquireLicensePage: `${config.origin}/terms`
252
- };
253
- })
254
- ].filter(Boolean)
255
- };
256
- }
257
- function generateJSONLD() {
258
- const structedData = getStructedData();
259
- return /* @__PURE__ */ React2.createElement(
260
- "script",
261
- {
262
- type: "application/ld+json",
263
- dangerouslySetInnerHTML: {
264
- __html: JSON.stringify(structedData).replace(/</g, "\\u003c")
265
- }
266
- }
267
- );
268
- }
269
- return {
270
- config,
271
- props,
272
- meta,
273
- generateJSONLD
274
- };
275
- }
276
- };
277
- }
278
- export {
279
- configSEO,
280
- createLoader,
281
- createSEOLoader
282
- };
@@ -1,7 +0,0 @@
1
- type LoaderFn<T, U> = (props: T) => U | Promise<U>;
2
- declare function createLoader<T, U = void>(fn?: LoaderFn<T, U>): {
3
- getData(): U;
4
- wrap<V>(mapper: (props: U) => V | Promise<V>): (props: T) => Promise<V>;
5
- };
6
-
7
- export { type LoaderFn, createLoader };
@@ -1,7 +0,0 @@
1
- type LoaderFn<T, U> = (props: T) => U | Promise<U>;
2
- declare function createLoader<T, U = void>(fn?: LoaderFn<T, U>): {
3
- getData(): U;
4
- wrap<V>(mapper: (props: U) => V | Promise<V>): (props: T) => Promise<V>;
5
- };
6
-
7
- export { type LoaderFn, createLoader };
@@ -1,43 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/seo-kit/loader.ts
21
- var loader_exports = {};
22
- __export(loader_exports, {
23
- createLoader: () => createLoader
24
- });
25
- module.exports = __toCommonJS(loader_exports);
26
- function createLoader(fn = () => ({})) {
27
- let loadedData;
28
- return {
29
- getData() {
30
- return loadedData;
31
- },
32
- wrap(mapper) {
33
- return async function Thing(props) {
34
- loadedData = await fn(props);
35
- return mapper(loadedData);
36
- };
37
- }
38
- };
39
- }
40
- // Annotate the CommonJS export names for ESM import in node:
41
- 0 && (module.exports = {
42
- createLoader
43
- });
@@ -1,18 +0,0 @@
1
- // src/seo-kit/loader.ts
2
- function createLoader(fn = () => ({})) {
3
- let loadedData;
4
- return {
5
- getData() {
6
- return loadedData;
7
- },
8
- wrap(mapper) {
9
- return async function Thing(props) {
10
- loadedData = await fn(props);
11
- return mapper(loadedData);
12
- };
13
- }
14
- };
15
- }
16
- export {
17
- createLoader
18
- };
@@ -1,16 +0,0 @@
1
- import { LoaderFn } from './loader.mjs';
2
- import * as react_router from 'react-router';
3
- import React, { JSX } from 'react';
4
- import { SEO } from './seo.mjs';
5
- import 'schema-dts';
6
-
7
- declare function createSEOLoader<T, U extends JSX.IntrinsicAttributes & {
8
- seo: SEO;
9
- }>(fn?: LoaderFn<T, U>): {
10
- meta: (props: T) => Promise<react_router.MetaFunction<unknown, Record<string, unknown>>>;
11
- Page(Fc: React.FC<U>): (props: T) => Promise<JSX.Element>;
12
- getData(): U;
13
- wrap<V>(mapper: (props: U) => V | Promise<V>): (props: T) => Promise<V>;
14
- };
15
-
16
- export { createSEOLoader };