dn-react-router-toolkit 0.1.0
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 +1 -0
- package/dist/cjs/auth-kit/apple_auth.js +60 -0
- package/dist/cjs/auth-kit/auth_service.js +204 -0
- package/dist/cjs/auth-kit/client/google_login_button.js +25 -0
- package/dist/cjs/auth-kit/client/redirect_page.js +21 -0
- package/dist/cjs/auth-kit/google_auth.js +65 -0
- package/dist/cjs/auth-kit/jwt.js +53 -0
- package/dist/cjs/auth-kit/kakao_auth.js +38 -0
- package/dist/cjs/auth-kit/repository.js +2 -0
- package/dist/cjs/auth-kit/with_auth.js +46 -0
- package/dist/cjs/cn.js +6 -0
- package/dist/cjs/components/index.js +18 -0
- package/dist/cjs/components/modal/fullscreen_container.js +64 -0
- package/dist/cjs/components/modal/hooks.js +78 -0
- package/dist/cjs/components/modal/index.js +19 -0
- package/dist/cjs/components/modal/modal.js +91 -0
- package/dist/cjs/components/styles.js +10 -0
- package/dist/cjs/date.js +31 -0
- package/dist/cjs/file-kit/cdn.js +9 -0
- package/dist/cjs/file-kit/client/drop_file_input.js +195 -0
- package/dist/cjs/file-kit/client/file_uploader.js +78 -0
- package/dist/cjs/file-kit/file_service.js +29 -0
- package/dist/cjs/file-kit/object_storage.js +50 -0
- package/dist/cjs/file-kit/repository.js +2 -0
- package/dist/cjs/file-kit/responsive_image.js +78 -0
- package/dist/cjs/http-kit/index.js +17 -0
- package/dist/cjs/http-kit/response.js +34 -0
- package/dist/cjs/index.js +20 -0
- package/dist/cjs/route/api/auth/login/[provider]/route.js +36 -0
- package/dist/cjs/route/api/auth/login/route.js +35 -0
- package/dist/cjs/route/api/auth/logout/route.js +22 -0
- package/dist/cjs/route/api/auth/refresh/route.js +23 -0
- package/dist/cjs/route/api/auth/route.js +12 -0
- package/dist/cjs/route/api/files/[fileId]/route.js +20 -0
- package/dist/cjs/route/api/files/route.js +34 -0
- package/dist/cjs/route/auth/callback/[provider]/route.js +35 -0
- package/dist/cjs/route/index.js +80 -0
- package/dist/cjs/seo-kit/index.js +19 -0
- package/dist/cjs/seo-kit/loader.js +17 -0
- package/dist/cjs/seo-kit/seo.js +286 -0
- package/dist/cjs/seo-kit/seo_loader.js +19 -0
- package/dist/cjs/singleton.js +12 -0
- package/dist/cjs/slug.js +10 -0
- package/dist/esm/auth-kit/apple_auth.d.ts +15 -0
- package/dist/esm/auth-kit/apple_auth.js +56 -0
- package/dist/esm/auth-kit/auth_service.d.ts +67 -0
- package/dist/esm/auth-kit/auth_service.js +197 -0
- package/dist/esm/auth-kit/client/google_login_button.d.ts +6 -0
- package/dist/esm/auth-kit/client/google_login_button.js +19 -0
- package/dist/esm/auth-kit/client/redirect_page.d.ts +2 -0
- package/dist/esm/auth-kit/client/redirect_page.js +15 -0
- package/dist/esm/auth-kit/google_auth.d.ts +18 -0
- package/dist/esm/auth-kit/google_auth.js +61 -0
- package/dist/esm/auth-kit/jwt.d.ts +15 -0
- package/dist/esm/auth-kit/jwt.js +49 -0
- package/dist/esm/auth-kit/kakao_auth.d.ts +15 -0
- package/dist/esm/auth-kit/kakao_auth.js +34 -0
- package/dist/esm/auth-kit/repository.d.ts +40 -0
- package/dist/esm/auth-kit/repository.js +1 -0
- package/dist/esm/auth-kit/with_auth.d.ts +12 -0
- package/dist/esm/auth-kit/with_auth.js +43 -0
- package/dist/esm/cn.d.ts +1 -0
- package/dist/esm/cn.js +3 -0
- package/dist/esm/components/index.d.ts +2 -0
- package/dist/esm/components/index.js +2 -0
- package/dist/esm/components/modal/fullscreen_container.d.ts +5 -0
- package/dist/esm/components/modal/fullscreen_container.js +57 -0
- package/dist/esm/components/modal/hooks.d.ts +15 -0
- package/dist/esm/components/modal/hooks.js +69 -0
- package/dist/esm/components/modal/index.d.ts +3 -0
- package/dist/esm/components/modal/index.js +3 -0
- package/dist/esm/components/modal/modal.d.ts +10 -0
- package/dist/esm/components/modal/modal.js +55 -0
- package/dist/esm/components/styles.d.ts +7 -0
- package/dist/esm/components/styles.js +7 -0
- package/dist/esm/date.d.ts +1 -0
- package/dist/esm/date.js +24 -0
- package/dist/esm/file-kit/cdn.d.ts +3 -0
- package/dist/esm/file-kit/cdn.js +5 -0
- package/dist/esm/file-kit/client/drop_file_input.d.ts +31 -0
- package/dist/esm/file-kit/client/drop_file_input.js +158 -0
- package/dist/esm/file-kit/client/file_uploader.d.ts +11 -0
- package/dist/esm/file-kit/client/file_uploader.js +74 -0
- package/dist/esm/file-kit/file_service.d.ts +23 -0
- package/dist/esm/file-kit/file_service.js +25 -0
- package/dist/esm/file-kit/object_storage.d.ts +13 -0
- package/dist/esm/file-kit/object_storage.js +46 -0
- package/dist/esm/file-kit/repository.d.ts +14 -0
- package/dist/esm/file-kit/repository.js +1 -0
- package/dist/esm/file-kit/responsive_image.d.ts +17 -0
- package/dist/esm/file-kit/responsive_image.js +70 -0
- package/dist/esm/http-kit/index.d.ts +1 -0
- package/dist/esm/http-kit/index.js +1 -0
- package/dist/esm/http-kit/response.d.ts +17 -0
- package/dist/esm/http-kit/response.js +28 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/route/api/auth/login/[provider]/route.d.ts +10 -0
- package/dist/esm/route/api/auth/login/[provider]/route.js +32 -0
- package/dist/esm/route/api/auth/login/route.d.ts +6 -0
- package/dist/esm/route/api/auth/login/route.js +31 -0
- package/dist/esm/route/api/auth/logout/route.d.ts +6 -0
- package/dist/esm/route/api/auth/logout/route.js +18 -0
- package/dist/esm/route/api/auth/refresh/route.d.ts +4 -0
- package/dist/esm/route/api/auth/refresh/route.js +19 -0
- package/dist/esm/route/api/auth/route.d.ts +4 -0
- package/dist/esm/route/api/auth/route.js +8 -0
- package/dist/esm/route/api/files/[fileId]/route.d.ts +8 -0
- package/dist/esm/route/api/files/[fileId]/route.js +16 -0
- package/dist/esm/route/api/files/route.d.ts +6 -0
- package/dist/esm/route/api/files/route.js +30 -0
- package/dist/esm/route/auth/callback/[provider]/route.d.ts +11 -0
- package/dist/esm/route/auth/callback/[provider]/route.js +31 -0
- package/dist/esm/route/index.d.ts +22 -0
- package/dist/esm/route/index.js +76 -0
- package/dist/esm/seo-kit/index.d.ts +3 -0
- package/dist/esm/seo-kit/index.js +3 -0
- package/dist/esm/seo-kit/loader.d.ts +5 -0
- package/dist/esm/seo-kit/loader.js +14 -0
- package/dist/esm/seo-kit/seo.d.ts +100 -0
- package/dist/esm/seo-kit/seo.js +280 -0
- package/dist/esm/seo-kit/seo_loader.d.ts +12 -0
- package/dist/esm/seo-kit/seo_loader.js +13 -0
- package/dist/esm/singleton.d.ts +1 -0
- package/dist/esm/singleton.js +9 -0
- package/dist/esm/slug.d.ts +1 -0
- package/dist/esm/slug.js +6 -0
- package/package.json +81 -0
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export function configSEO(config) {
|
|
3
|
+
return {
|
|
4
|
+
config,
|
|
5
|
+
async init(props = {}) {
|
|
6
|
+
var _a;
|
|
7
|
+
const canonicalPath = props.canonicalPath;
|
|
8
|
+
const url = canonicalPath
|
|
9
|
+
? `${config.origin}${canonicalPath}`
|
|
10
|
+
: `${config.origin}${props.path || ""}`;
|
|
11
|
+
const pageTitle = props.title
|
|
12
|
+
? `${props.title} | ${config.siteName}`
|
|
13
|
+
: config.siteName;
|
|
14
|
+
const description = props.description || config.description;
|
|
15
|
+
const keywords = props.keywords || config.keywords;
|
|
16
|
+
const websiteSchemaId = `${config.origin}/#website`;
|
|
17
|
+
const websiteSchema = {
|
|
18
|
+
"@type": "WebSite",
|
|
19
|
+
"@id": websiteSchemaId,
|
|
20
|
+
url: config.origin,
|
|
21
|
+
name: config.siteName,
|
|
22
|
+
alternateName: config.siteName,
|
|
23
|
+
description: config.description,
|
|
24
|
+
inLanguage: "ko",
|
|
25
|
+
};
|
|
26
|
+
const thumbnailSchemaId = `${url}/#thumbnail`;
|
|
27
|
+
const thumbnail = props.thumbnail ||
|
|
28
|
+
(typeof config.thumbnail === "function"
|
|
29
|
+
? await config.thumbnail()
|
|
30
|
+
: config.thumbnail);
|
|
31
|
+
const thumbnailUrl = thumbnail === null || thumbnail === void 0 ? void 0 : thumbnail.url;
|
|
32
|
+
const socialImage = thumbnail
|
|
33
|
+
? [
|
|
34
|
+
typeof thumbnail === "string"
|
|
35
|
+
? {
|
|
36
|
+
url: thumbnail,
|
|
37
|
+
alt: `${props.title} 대표 이미지`,
|
|
38
|
+
}
|
|
39
|
+
: thumbnail,
|
|
40
|
+
]
|
|
41
|
+
: [];
|
|
42
|
+
const images = [
|
|
43
|
+
...(thumbnailUrl
|
|
44
|
+
? [
|
|
45
|
+
{
|
|
46
|
+
id: thumbnailSchemaId,
|
|
47
|
+
url: thumbnailUrl,
|
|
48
|
+
alt: `${props.title} 대표 이미지`,
|
|
49
|
+
},
|
|
50
|
+
]
|
|
51
|
+
: []),
|
|
52
|
+
...(props.images || []),
|
|
53
|
+
...(((_a = props.collection) === null || _a === void 0 ? void 0 : _a.map((portfolio) => portfolio.thumbnail)) || []),
|
|
54
|
+
].filter(Boolean);
|
|
55
|
+
const image = images
|
|
56
|
+
.filter((file) => file.id)
|
|
57
|
+
.map((file) => ({
|
|
58
|
+
"@type": "ImageObject",
|
|
59
|
+
"@id": `${url}/#${file.id}`,
|
|
60
|
+
}));
|
|
61
|
+
const breadcrumbSchemaId = `${url}#breadcrumb`;
|
|
62
|
+
const updatedAt = props.updatedAt;
|
|
63
|
+
const createdAt = props.createdAt;
|
|
64
|
+
const meta = () => {
|
|
65
|
+
return [
|
|
66
|
+
{ title: pageTitle },
|
|
67
|
+
{ name: "description", content: description },
|
|
68
|
+
{ name: "keywords", content: (keywords === null || keywords === void 0 ? void 0 : keywords.join(", ")) || "" },
|
|
69
|
+
{
|
|
70
|
+
tagName: "link",
|
|
71
|
+
rel: "canonical",
|
|
72
|
+
href: url,
|
|
73
|
+
},
|
|
74
|
+
{ property: "og:type", content: props.type || "website" },
|
|
75
|
+
{ property: "og:title", content: pageTitle },
|
|
76
|
+
{ property: "og:description", content: description },
|
|
77
|
+
{ property: "og:url", content: url },
|
|
78
|
+
{ property: "og:site_name", content: config.siteName },
|
|
79
|
+
...socialImage.map((file) => ({
|
|
80
|
+
property: "og:image",
|
|
81
|
+
content: file.url,
|
|
82
|
+
})),
|
|
83
|
+
{
|
|
84
|
+
property: "twitter:card",
|
|
85
|
+
content: socialImage.length > 0 ? "summary_large_image" : "summary",
|
|
86
|
+
},
|
|
87
|
+
{ property: "twitter:title", content: pageTitle },
|
|
88
|
+
{ property: "twitter:description", content: description },
|
|
89
|
+
...socialImage.map((file) => ({
|
|
90
|
+
property: "twitter:image",
|
|
91
|
+
content: file.url,
|
|
92
|
+
})),
|
|
93
|
+
];
|
|
94
|
+
};
|
|
95
|
+
const additionalStructedData = [
|
|
96
|
+
...(typeof props.structedData === "function"
|
|
97
|
+
? await props.structedData()
|
|
98
|
+
: props.structedData || []),
|
|
99
|
+
...(typeof config.structedData === "function"
|
|
100
|
+
? await config.structedData()
|
|
101
|
+
: config.structedData || []),
|
|
102
|
+
];
|
|
103
|
+
function getStructedData() {
|
|
104
|
+
const collectionMainEntity = props.collection
|
|
105
|
+
? {
|
|
106
|
+
"@type": "ItemList",
|
|
107
|
+
numberOfItems: props.collection.length,
|
|
108
|
+
itemListElement: props.collection.map((item, index) => {
|
|
109
|
+
var _a, _b, _c, _d;
|
|
110
|
+
return ({
|
|
111
|
+
"@type": "ListItem",
|
|
112
|
+
position: index + 1,
|
|
113
|
+
url: item.url,
|
|
114
|
+
item: {
|
|
115
|
+
"@type": "WebPage",
|
|
116
|
+
"@id": `${item.url}#webpage`,
|
|
117
|
+
url: item.url,
|
|
118
|
+
name: item.title,
|
|
119
|
+
thumbnailUrl: (_a = item.thumbnail) === null || _a === void 0 ? void 0 : _a.url,
|
|
120
|
+
dateModified: (_b = item.updatedAt) === null || _b === void 0 ? void 0 : _b.toISOString(),
|
|
121
|
+
dateCreated: (_c = item.createdAt) === null || _c === void 0 ? void 0 : _c.toISOString(),
|
|
122
|
+
datePublished: (_d = item.createdAt) === null || _d === void 0 ? void 0 : _d.toISOString(),
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
}),
|
|
126
|
+
}
|
|
127
|
+
: undefined;
|
|
128
|
+
return {
|
|
129
|
+
"@context": "https://schema.org",
|
|
130
|
+
"@graph": [
|
|
131
|
+
{
|
|
132
|
+
"@type": "WebPage",
|
|
133
|
+
"@id": `${url}#webpage`,
|
|
134
|
+
url,
|
|
135
|
+
name: pageTitle,
|
|
136
|
+
description,
|
|
137
|
+
keywords: keywords,
|
|
138
|
+
dateModified: updatedAt === null || updatedAt === void 0 ? void 0 : updatedAt.toISOString(),
|
|
139
|
+
datePublished: createdAt === null || createdAt === void 0 ? void 0 : createdAt.toISOString(),
|
|
140
|
+
dateCreated: createdAt === null || createdAt === void 0 ? void 0 : createdAt.toISOString(),
|
|
141
|
+
primaryImageOfPage: thumbnail
|
|
142
|
+
? {
|
|
143
|
+
"@id": thumbnailSchemaId,
|
|
144
|
+
}
|
|
145
|
+
: undefined,
|
|
146
|
+
isPartOf: {
|
|
147
|
+
"@id": websiteSchemaId,
|
|
148
|
+
},
|
|
149
|
+
inLanguage: "ko",
|
|
150
|
+
breadcrumb: props.breadcrumbs && props.breadcrumbs.length > 0
|
|
151
|
+
? {
|
|
152
|
+
"@id": breadcrumbSchemaId,
|
|
153
|
+
}
|
|
154
|
+
: undefined,
|
|
155
|
+
image,
|
|
156
|
+
mainEntity: collectionMainEntity,
|
|
157
|
+
},
|
|
158
|
+
props.article &&
|
|
159
|
+
{
|
|
160
|
+
"@type": "Article",
|
|
161
|
+
"@id": `${url}#article`,
|
|
162
|
+
url,
|
|
163
|
+
name: pageTitle,
|
|
164
|
+
description,
|
|
165
|
+
keywords: keywords,
|
|
166
|
+
headline: pageTitle,
|
|
167
|
+
dateModified: updatedAt === null || updatedAt === void 0 ? void 0 : updatedAt.toISOString(),
|
|
168
|
+
datePublished: createdAt === null || createdAt === void 0 ? void 0 : createdAt.toISOString(),
|
|
169
|
+
dateCreated: createdAt === null || createdAt === void 0 ? void 0 : createdAt.toISOString(),
|
|
170
|
+
isPartOf: {
|
|
171
|
+
"@id": websiteSchemaId,
|
|
172
|
+
},
|
|
173
|
+
inLanguage: "ko",
|
|
174
|
+
image,
|
|
175
|
+
},
|
|
176
|
+
props.blogPosting &&
|
|
177
|
+
{
|
|
178
|
+
"@type": "BlogPosting",
|
|
179
|
+
"@id": `${url}/#blogposting`,
|
|
180
|
+
url,
|
|
181
|
+
headline: pageTitle,
|
|
182
|
+
description: description,
|
|
183
|
+
thumbnailUrl,
|
|
184
|
+
datePublished: createdAt === null || createdAt === void 0 ? void 0 : createdAt.toISOString(),
|
|
185
|
+
dateModified: updatedAt === null || updatedAt === void 0 ? void 0 : updatedAt.toISOString(),
|
|
186
|
+
isPartOf: { "@id": websiteSchemaId },
|
|
187
|
+
image,
|
|
188
|
+
},
|
|
189
|
+
props.creativeWork &&
|
|
190
|
+
{
|
|
191
|
+
"@type": "CreativeWork",
|
|
192
|
+
"@id": `${url}/#creativework`,
|
|
193
|
+
url,
|
|
194
|
+
name: pageTitle,
|
|
195
|
+
description: description,
|
|
196
|
+
datePublished: createdAt === null || createdAt === void 0 ? void 0 : createdAt.toISOString(),
|
|
197
|
+
dateModified: updatedAt === null || updatedAt === void 0 ? void 0 : updatedAt.toISOString(),
|
|
198
|
+
isPartOf: { "@id": websiteSchemaId },
|
|
199
|
+
thumbnailUrl,
|
|
200
|
+
image,
|
|
201
|
+
},
|
|
202
|
+
props.visualArtwork &&
|
|
203
|
+
{
|
|
204
|
+
"@type": "VisualArtwork",
|
|
205
|
+
"@id": `${url}/#visualartwork`,
|
|
206
|
+
url,
|
|
207
|
+
name: pageTitle,
|
|
208
|
+
description: description,
|
|
209
|
+
datePublished: createdAt === null || createdAt === void 0 ? void 0 : createdAt.toISOString(),
|
|
210
|
+
dateModified: updatedAt === null || updatedAt === void 0 ? void 0 : updatedAt.toISOString(),
|
|
211
|
+
isPartOf: { "@id": websiteSchemaId },
|
|
212
|
+
thumbnailUrl,
|
|
213
|
+
image,
|
|
214
|
+
},
|
|
215
|
+
props.collection &&
|
|
216
|
+
{
|
|
217
|
+
"@type": "CollectionPage",
|
|
218
|
+
"@id": `${url}/#collectionpage`,
|
|
219
|
+
url: url,
|
|
220
|
+
name: pageTitle,
|
|
221
|
+
description: description,
|
|
222
|
+
isPartOf: { "@id": websiteSchemaId },
|
|
223
|
+
image,
|
|
224
|
+
inLanguage: "ko-KR",
|
|
225
|
+
breadcrumb: props.breadcrumbs && props.breadcrumbs.length > 0
|
|
226
|
+
? {
|
|
227
|
+
"@id": `${url}/#breadcrumb`,
|
|
228
|
+
}
|
|
229
|
+
: undefined,
|
|
230
|
+
mainEntity: collectionMainEntity,
|
|
231
|
+
},
|
|
232
|
+
websiteSchema,
|
|
233
|
+
props.breadcrumbs &&
|
|
234
|
+
props.breadcrumbs.length > 0 &&
|
|
235
|
+
{
|
|
236
|
+
"@id": breadcrumbSchemaId,
|
|
237
|
+
"@type": "BreadcrumbList",
|
|
238
|
+
itemListElement: props.breadcrumbs.map((breadcrumb, index) => ({
|
|
239
|
+
"@type": "ListItem",
|
|
240
|
+
position: index + 1,
|
|
241
|
+
name: breadcrumb.label,
|
|
242
|
+
item: `${config.origin}${breadcrumb.href}`,
|
|
243
|
+
})),
|
|
244
|
+
},
|
|
245
|
+
...additionalStructedData,
|
|
246
|
+
...images.map((file) => {
|
|
247
|
+
var _a, _b;
|
|
248
|
+
return {
|
|
249
|
+
"@type": "ImageObject",
|
|
250
|
+
"@id": `${url}/#${file.id}`,
|
|
251
|
+
url: file.url,
|
|
252
|
+
contentUrl: file.url,
|
|
253
|
+
name: file.alt,
|
|
254
|
+
description: file.alt,
|
|
255
|
+
width: (_a = file === null || file === void 0 ? void 0 : file.width) === null || _a === void 0 ? void 0 : _a.toString(),
|
|
256
|
+
height: (_b = file === null || file === void 0 ? void 0 : file.height) === null || _b === void 0 ? void 0 : _b.toString(),
|
|
257
|
+
creditText: config.copyright,
|
|
258
|
+
license: `${config.origin}/terms`,
|
|
259
|
+
copyrightNotice: config.copyright,
|
|
260
|
+
acquireLicensePage: `${config.origin}/terms`,
|
|
261
|
+
};
|
|
262
|
+
}),
|
|
263
|
+
].filter(Boolean),
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
function generateJSONLD() {
|
|
267
|
+
const structedData = getStructedData();
|
|
268
|
+
return (React.createElement("script", { type: "application/ld+json", dangerouslySetInnerHTML: {
|
|
269
|
+
__html: JSON.stringify(structedData).replace(/</g, "\\u003c"),
|
|
270
|
+
} }));
|
|
271
|
+
}
|
|
272
|
+
return {
|
|
273
|
+
config,
|
|
274
|
+
props,
|
|
275
|
+
meta,
|
|
276
|
+
generateJSONLD,
|
|
277
|
+
};
|
|
278
|
+
},
|
|
279
|
+
};
|
|
280
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type LoaderFn } from "./loader";
|
|
2
|
+
import { type JSX } from "react";
|
|
3
|
+
import { type SEO } from "./seo";
|
|
4
|
+
import React from "react";
|
|
5
|
+
export declare function createSEOLoader<T, U extends JSX.IntrinsicAttributes & {
|
|
6
|
+
seo: SEO;
|
|
7
|
+
}>(fn?: LoaderFn<T, U>): {
|
|
8
|
+
meta: (props: T) => Promise<import("react-router").MetaFunction<unknown, Record<string, unknown>>>;
|
|
9
|
+
Page(Fc: React.FC<U>): (props: T) => Promise<JSX.Element>;
|
|
10
|
+
getData(): U;
|
|
11
|
+
wrap<V>(mapper: (props: U) => V | Promise<V>): (props: T) => Promise<V>;
|
|
12
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createLoader } from "./loader";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export function createSEOLoader(fn = () => ({})) {
|
|
4
|
+
const loader = createLoader(fn);
|
|
5
|
+
return Object.assign(Object.assign({}, loader), { meta: loader.wrap((data) => data.seo.meta), Page(Fc) {
|
|
6
|
+
return loader.wrap((data) => {
|
|
7
|
+
var _a;
|
|
8
|
+
return (React.createElement(React.Fragment, null, (_a = data.seo) === null || _a === void 0 ? void 0 :
|
|
9
|
+
_a.generateJSONLD(),
|
|
10
|
+
React.createElement(Fc, Object.assign({}, data))));
|
|
11
|
+
});
|
|
12
|
+
} });
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function singleton<T>(name: string, fn: () => T): T;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export function singleton(name, fn) {
|
|
2
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3
|
+
const globalAny = globalThis;
|
|
4
|
+
globalAny.__singletons = globalAny.__singletons || {};
|
|
5
|
+
if (!globalAny.__singletons[name]) {
|
|
6
|
+
globalAny.__singletons[name] = fn();
|
|
7
|
+
}
|
|
8
|
+
return globalAny.__singletons[name];
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const toSlug: (str: string) => string;
|
package/dist/esm/slug.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dn-react-router-toolkit",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"types": "./dist/esm/index.d.ts",
|
|
5
|
+
"main": "./dist/cjs/index.js",
|
|
6
|
+
"module": "./dist/esm/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/esm/index.d.ts",
|
|
10
|
+
"import": "./dist/esm/index.js",
|
|
11
|
+
"require": "./dist/cjs/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./route": {
|
|
14
|
+
"types": "./dist/esm/route/index.d.ts",
|
|
15
|
+
"import": "./dist/esm/route/index.js",
|
|
16
|
+
"require": "./dist/cjs/route/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./auth-kit/*": {
|
|
19
|
+
"types": "./dist/esm/auth-kit/*.d.ts",
|
|
20
|
+
"import": "./dist/esm/auth-kit/*.js",
|
|
21
|
+
"require": "./dist/cjs/auth-kit/*.js"
|
|
22
|
+
},
|
|
23
|
+
"./components": {
|
|
24
|
+
"types": "./dist/esm/components/index.d.ts",
|
|
25
|
+
"import": "./dist/esm/components/index.js",
|
|
26
|
+
"require": "./dist/cjs/components/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./http-kit": {
|
|
29
|
+
"types": "./dist/esm/http-kit/index.d.ts",
|
|
30
|
+
"import": "./dist/esm/http-kit/index.js",
|
|
31
|
+
"require": "./dist/cjs/http-kit/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./file-kit/*": {
|
|
34
|
+
"types": "./dist/esm/file-kit/*.d.ts",
|
|
35
|
+
"import": "./dist/esm/file-kit/*.js",
|
|
36
|
+
"require": "./dist/cjs/file-kit/*.js"
|
|
37
|
+
},
|
|
38
|
+
"./seo-kit": {
|
|
39
|
+
"types": "./dist/esm/seo-kit/index.d.ts",
|
|
40
|
+
"import": "./dist/esm/seo-kit/index.js",
|
|
41
|
+
"require": "./dist/cjs/seo-kit/index.js"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "rimraf dist && tsc -p tsconfig.cjs.json && tsc -p tsconfig.json"
|
|
46
|
+
},
|
|
47
|
+
"repository": {
|
|
48
|
+
"type": "git",
|
|
49
|
+
"url": "git+https://github.com/dndnsoft/dn-react-router-toolkit.git"
|
|
50
|
+
},
|
|
51
|
+
"author": "",
|
|
52
|
+
"license": "MIT",
|
|
53
|
+
"bugs": {
|
|
54
|
+
"url": "https://github.com/dndnsoft/dn-react-router-toolkit/issues"
|
|
55
|
+
},
|
|
56
|
+
"homepage": "https://github.com/dndnsoft/dn-react-router-toolkit#readme",
|
|
57
|
+
"description": "",
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@types/node": "^24.5.2",
|
|
60
|
+
"@types/react": "^19",
|
|
61
|
+
"@types/react-dom": "^19",
|
|
62
|
+
"rimraf": "^6.0.1",
|
|
63
|
+
"schema-dts": "^1.1.5",
|
|
64
|
+
"typescript": "^5.7.3"
|
|
65
|
+
},
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"@aws-sdk/client-s3": "^3.940.0",
|
|
68
|
+
"@aws-sdk/s3-request-presigner": "^3.940.0",
|
|
69
|
+
"bcryptjs": "^3.0.3",
|
|
70
|
+
"jose": "^6.1.2",
|
|
71
|
+
"moment-timezone": "^0.6.0",
|
|
72
|
+
"react-icons": "^5.5.0",
|
|
73
|
+
"uuid": "^13.0.0"
|
|
74
|
+
},
|
|
75
|
+
"peerDependencies": {
|
|
76
|
+
"drizzle-orm": "^0.44",
|
|
77
|
+
"react-router": "^7",
|
|
78
|
+
"react": "^19",
|
|
79
|
+
"react-dom": "^19"
|
|
80
|
+
}
|
|
81
|
+
}
|