dn-react-router-toolkit 0.2.7 → 0.3.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/dist/api/create_handler.d.mts +13 -0
- package/dist/api/create_handler.d.ts +13 -0
- package/dist/api/create_handler.js +276 -0
- package/dist/api/create_handler.mjs +282 -0
- package/dist/api/index.d.mts +4 -0
- package/dist/api/index.d.ts +4 -0
- package/dist/api/index.js +276 -0
- package/dist/api/index.mjs +282 -0
- package/dist/auth/client/index.d.mts +3 -0
- package/dist/auth/client/index.d.ts +3 -0
- package/dist/{date.js → auth/client/index.js} +25 -32
- package/dist/auth/client/index.mjs +21 -0
- package/dist/auth/client/redirect_page.d.mts +1 -0
- package/dist/auth/client/redirect_page.d.ts +1 -0
- package/dist/auth/index.d.mts +4 -0
- package/dist/auth/index.d.ts +4 -0
- package/dist/auth/index.js +116 -0
- package/dist/auth/index.mjs +89 -0
- package/dist/auth/server/index.d.mts +1 -0
- package/dist/auth/server/index.d.ts +1 -0
- package/dist/{slug.js → auth/server/index.js} +6 -14
- package/dist/auth/server/index.mjs +2 -0
- package/dist/auth/with_auth.d.mts +2 -6
- package/dist/auth/with_auth.d.ts +2 -6
- package/dist/auth/with_auth.js +3 -0
- package/dist/auth/with_auth.mjs +3 -0
- package/dist/{components → client}/client_env.d.mts +1 -1
- package/dist/{components → client}/client_env.d.ts +1 -1
- package/dist/{components → client}/client_env.js +6 -2
- package/dist/{components → client}/client_env.mjs +2 -2
- package/dist/client/index.d.mts +3 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/{auth/client/google_login_button.js → client/index.js} +30 -33
- package/dist/client/index.mjs +31 -0
- package/dist/client/use_user_agent.d.mts +8 -0
- package/dist/client/use_user_agent.d.ts +8 -0
- package/dist/{file/client/format_size.js → client/use_user_agent.js} +14 -14
- package/dist/client/use_user_agent.mjs +13 -0
- package/dist/file/client/index.d.mts +1 -0
- package/dist/file/client/index.d.ts +1 -0
- package/dist/file/{cdn.js → client/index.js} +6 -16
- package/dist/file/client/index.mjs +2 -0
- package/dist/file/index.d.mts +1 -0
- package/dist/file/index.d.ts +1 -0
- package/dist/{cn.js → file/index.js} +6 -14
- package/dist/file/index.mjs +2 -0
- package/dist/file/server/index.d.mts +1 -0
- package/dist/file/server/index.d.ts +1 -0
- package/dist/file/server/index.js +24 -0
- package/dist/file/server/index.mjs +2 -0
- package/dist/http/index.d.mts +1 -1
- package/dist/http/index.d.ts +1 -1
- package/dist/http/index.js +3 -90
- package/dist/http/index.mjs +2 -68
- package/dist/index.d.mts +8 -6
- package/dist/index.d.ts +8 -6
- package/dist/index.js +3 -79
- package/dist/index.mjs +2 -58
- package/dist/modal/index.d.mts +1 -0
- package/dist/modal/index.d.ts +1 -0
- package/dist/{sleep.js → modal/index.js} +6 -14
- package/dist/modal/index.mjs +2 -0
- package/dist/seo/index.d.mts +4 -0
- package/dist/seo/index.d.ts +4 -0
- package/dist/seo/index.js +304 -0
- package/dist/seo/index.mjs +267 -0
- package/dist/text_editor/index.d.mts +1 -0
- package/dist/text_editor/index.d.ts +1 -0
- package/dist/text_editor/index.js +24 -0
- package/dist/text_editor/index.mjs +2 -0
- package/package.json +58 -32
- package/dist/auth/apple_auth.d.mts +0 -38
- package/dist/auth/apple_auth.d.ts +0 -38
- package/dist/auth/apple_auth.js +0 -88
- package/dist/auth/apple_auth.mjs +0 -63
- package/dist/auth/auth_repository.d.mts +0 -41
- package/dist/auth/auth_repository.d.ts +0 -41
- package/dist/auth/auth_repository.js +0 -18
- package/dist/auth/auth_repository.mjs +0 -0
- package/dist/auth/auth_service.d.mts +0 -63
- package/dist/auth/auth_service.d.ts +0 -63
- package/dist/auth/auth_service.js +0 -210
- package/dist/auth/auth_service.mjs +0 -171
- package/dist/auth/client/google_login_button.d.mts +0 -7
- package/dist/auth/client/google_login_button.d.ts +0 -7
- package/dist/auth/client/google_login_button.mjs +0 -37
- package/dist/auth/client/provider.d.mts +0 -24
- package/dist/auth/client/provider.d.ts +0 -24
- package/dist/auth/client/provider.js +0 -154
- package/dist/auth/client/provider.mjs +0 -118
- package/dist/auth/google_auth.d.mts +0 -33
- package/dist/auth/google_auth.d.ts +0 -33
- package/dist/auth/google_auth.js +0 -135
- package/dist/auth/google_auth.mjs +0 -108
- package/dist/auth/handlers/find_auth.d.mts +0 -13
- package/dist/auth/handlers/find_auth.d.ts +0 -13
- package/dist/auth/handlers/find_auth.js +0 -82
- package/dist/auth/handlers/find_auth.mjs +0 -55
- package/dist/auth/handlers/login.d.mts +0 -13
- package/dist/auth/handlers/login.d.ts +0 -13
- package/dist/auth/handlers/login.js +0 -107
- package/dist/auth/handlers/login.mjs +0 -80
- package/dist/auth/handlers/login_with_thirdparty.d.mts +0 -15
- package/dist/auth/handlers/login_with_thirdparty.d.ts +0 -15
- package/dist/auth/handlers/login_with_thirdparty.js +0 -98
- package/dist/auth/handlers/login_with_thirdparty.mjs +0 -71
- package/dist/auth/handlers/logout.d.mts +0 -13
- package/dist/auth/handlers/logout.d.ts +0 -13
- package/dist/auth/handlers/logout.js +0 -102
- package/dist/auth/handlers/logout.mjs +0 -75
- package/dist/auth/handlers/refresh.d.mts +0 -13
- package/dist/auth/handlers/refresh.d.ts +0 -13
- package/dist/auth/handlers/refresh.js +0 -92
- package/dist/auth/handlers/refresh.mjs +0 -65
- package/dist/auth/handlers/request_password_reset.d.mts +0 -10
- package/dist/auth/handlers/request_password_reset.d.ts +0 -10
- package/dist/auth/handlers/request_password_reset.js +0 -87
- package/dist/auth/handlers/request_password_reset.mjs +0 -60
- package/dist/auth/handlers/reset_password.d.mts +0 -10
- package/dist/auth/handlers/reset_password.d.ts +0 -10
- package/dist/auth/handlers/reset_password.js +0 -88
- package/dist/auth/handlers/reset_password.mjs +0 -61
- package/dist/auth/handlers/signup.d.mts +0 -15
- package/dist/auth/handlers/signup.d.ts +0 -15
- package/dist/auth/handlers/signup.js +0 -147
- package/dist/auth/handlers/signup.mjs +0 -112
- package/dist/auth/handlers/signup_with_thirdparty.d.mts +0 -17
- package/dist/auth/handlers/signup_with_thirdparty.d.ts +0 -17
- package/dist/auth/handlers/signup_with_thirdparty.js +0 -123
- package/dist/auth/handlers/signup_with_thirdparty.mjs +0 -98
- package/dist/auth/handlers/thirdparty_auth_callback.d.mts +0 -16
- package/dist/auth/handlers/thirdparty_auth_callback.d.ts +0 -16
- package/dist/auth/handlers/thirdparty_auth_callback.js +0 -129
- package/dist/auth/handlers/thirdparty_auth_callback.mjs +0 -102
- package/dist/auth/jwt_manager.d.mts +0 -38
- package/dist/auth/jwt_manager.d.ts +0 -38
- package/dist/auth/jwt_manager.js +0 -90
- package/dist/auth/jwt_manager.mjs +0 -65
- package/dist/auth/kakao_auth.d.mts +0 -27
- package/dist/auth/kakao_auth.d.ts +0 -27
- package/dist/auth/kakao_auth.js +0 -56
- package/dist/auth/kakao_auth.mjs +0 -31
- package/dist/auth/password_recovery.d.mts +0 -34
- package/dist/auth/password_recovery.d.ts +0 -34
- package/dist/auth/password_recovery.js +0 -169
- package/dist/auth/password_recovery.mjs +0 -134
- package/dist/auth/thirdparty_auth.d.mts +0 -41
- package/dist/auth/thirdparty_auth.d.ts +0 -41
- package/dist/auth/thirdparty_auth.js +0 -113
- package/dist/auth/thirdparty_auth.mjs +0 -86
- package/dist/cn.d.mts +0 -3
- package/dist/cn.d.ts +0 -3
- package/dist/cn.mjs +0 -7
- package/dist/components/index.d.mts +0 -5
- package/dist/components/index.d.ts +0 -5
- package/dist/components/index.js +0 -261
- package/dist/components/index.mjs +0 -219
- package/dist/components/modal/fullscreen_container.d.mts +0 -7
- package/dist/components/modal/fullscreen_container.d.ts +0 -7
- package/dist/components/modal/fullscreen_container.js +0 -102
- package/dist/components/modal/fullscreen_container.mjs +0 -68
- package/dist/components/modal/hooks.d.mts +0 -18
- package/dist/components/modal/hooks.d.ts +0 -18
- package/dist/components/modal/hooks.js +0 -236
- package/dist/components/modal/hooks.mjs +0 -204
- package/dist/components/modal/index.d.mts +0 -4
- package/dist/components/modal/index.d.ts +0 -4
- package/dist/components/modal/index.js +0 -238
- package/dist/components/modal/index.mjs +0 -203
- package/dist/components/modal/modal.d.mts +0 -13
- package/dist/components/modal/modal.d.ts +0 -13
- package/dist/components/modal/modal.js +0 -155
- package/dist/components/modal/modal.mjs +0 -130
- package/dist/components/styles.d.mts +0 -9
- package/dist/components/styles.d.ts +0 -9
- package/dist/components/styles.js +0 -48
- package/dist/components/styles.mjs +0 -17
- package/dist/date.d.mts +0 -5
- package/dist/date.d.ts +0 -5
- package/dist/date.mjs +0 -29
- package/dist/file/cdn.d.mts +0 -6
- package/dist/file/cdn.d.ts +0 -6
- package/dist/file/cdn.mjs +0 -9
- package/dist/file/client/drop_file_input.d.mts +0 -36
- package/dist/file/client/drop_file_input.d.ts +0 -36
- package/dist/file/client/drop_file_input.js +0 -323
- package/dist/file/client/drop_file_input.mjs +0 -294
- package/dist/file/client/file_upload_button.d.mts +0 -10
- package/dist/file/client/file_upload_button.d.ts +0 -10
- package/dist/file/client/file_upload_button.js +0 -89
- package/dist/file/client/file_upload_button.mjs +0 -58
- package/dist/file/client/file_uploader.d.mts +0 -13
- package/dist/file/client/file_uploader.d.ts +0 -13
- package/dist/file/client/file_uploader.js +0 -163
- package/dist/file/client/file_uploader.mjs +0 -136
- package/dist/file/client/format_size.d.mts +0 -3
- package/dist/file/client/format_size.d.ts +0 -3
- package/dist/file/client/format_size.mjs +0 -13
- package/dist/file/client/metadata.d.mts +0 -7
- package/dist/file/client/metadata.d.ts +0 -7
- package/dist/file/client/metadata.js +0 -85
- package/dist/file/client/metadata.mjs +0 -60
- package/dist/file/file_repository.d.mts +0 -16
- package/dist/file/file_repository.d.ts +0 -16
- package/dist/file/file_repository.js +0 -18
- package/dist/file/file_repository.mjs +0 -0
- package/dist/file/file_service.d.mts +0 -32
- package/dist/file/file_service.d.ts +0 -32
- package/dist/file/file_service.js +0 -66
- package/dist/file/file_service.mjs +0 -41
- package/dist/file/handlers/delete_file.d.mts +0 -17
- package/dist/file/handlers/delete_file.d.ts +0 -17
- package/dist/file/handlers/delete_file.js +0 -99
- package/dist/file/handlers/delete_file.mjs +0 -72
- package/dist/file/handlers/upload_file.d.mts +0 -16
- package/dist/file/handlers/upload_file.d.ts +0 -16
- package/dist/file/handlers/upload_file.js +0 -106
- package/dist/file/handlers/upload_file.mjs +0 -79
- package/dist/file/object_storage.d.mts +0 -20
- package/dist/file/object_storage.d.ts +0 -20
- package/dist/file/object_storage.js +0 -90
- package/dist/file/object_storage.mjs +0 -70
- package/dist/file/responsive_image.d.mts +0 -20
- package/dist/file/responsive_image.d.ts +0 -20
- package/dist/file/responsive_image.js +0 -132
- package/dist/file/responsive_image.mjs +0 -96
- package/dist/http/response.d.mts +0 -19
- package/dist/http/response.d.ts +0 -19
- package/dist/http/response.js +0 -109
- package/dist/http/response.mjs +0 -68
- package/dist/route/api.d.mts +0 -21
- package/dist/route/api.d.ts +0 -21
- package/dist/route/api.js +0 -584
- package/dist/route/api.mjs +0 -547
- package/dist/singleton.d.mts +0 -3
- package/dist/singleton.d.ts +0 -3
- package/dist/singleton.js +0 -37
- package/dist/singleton.mjs +0 -12
- package/dist/sleep.d.mts +0 -3
- package/dist/sleep.d.ts +0 -3
- package/dist/sleep.mjs +0 -7
- package/dist/slug.d.mts +0 -3
- package/dist/slug.d.ts +0 -3
- package/dist/slug.mjs +0 -7
- package/dist/text_editor/attach_media.d.mts +0 -16
- package/dist/text_editor/attach_media.d.ts +0 -16
- package/dist/text_editor/attach_media.js +0 -237
- package/dist/text_editor/attach_media.mjs +0 -210
- package/dist/text_editor/plugins/drag_and_drop.d.mts +0 -13
- package/dist/text_editor/plugins/drag_and_drop.d.ts +0 -13
- package/dist/text_editor/plugins/drag_and_drop.js +0 -59
- package/dist/text_editor/plugins/drag_and_drop.mjs +0 -34
- package/dist/text_editor/plugins/keymap.d.mts +0 -5
- package/dist/text_editor/plugins/keymap.d.ts +0 -5
- package/dist/text_editor/plugins/keymap.js +0 -40
- package/dist/text_editor/plugins/keymap.mjs +0 -15
- package/dist/text_editor/plugins/placehoder.d.mts +0 -5
- package/dist/text_editor/plugins/placehoder.d.ts +0 -5
- package/dist/text_editor/plugins/placehoder.js +0 -112
- package/dist/text_editor/plugins/placehoder.mjs +0 -87
- package/dist/text_editor/plugins/trailing_paragraph.d.mts +0 -5
- package/dist/text_editor/plugins/trailing_paragraph.d.ts +0 -5
- package/dist/text_editor/plugins/trailing_paragraph.js +0 -46
- package/dist/text_editor/plugins/trailing_paragraph.mjs +0 -21
- package/dist/text_editor/plugins/upload_placeholder.d.mts +0 -7
- package/dist/text_editor/plugins/upload_placeholder.d.ts +0 -7
- package/dist/text_editor/plugins/upload_placeholder.js +0 -94
- package/dist/text_editor/plugins/upload_placeholder.mjs +0 -68
- package/dist/text_editor/schema.d.mts +0 -9
- package/dist/text_editor/schema.d.ts +0 -9
- package/dist/text_editor/schema.js +0 -354
- package/dist/text_editor/schema.mjs +0 -319
- package/dist/text_editor/text_editor.d.mts +0 -45
- package/dist/text_editor/text_editor.d.ts +0 -45
- package/dist/text_editor/text_editor.js +0 -834
- package/dist/text_editor/text_editor.mjs +0 -806
|
@@ -0,0 +1,304 @@
|
|
|
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/index.ts
|
|
31
|
+
var seo_exports = {};
|
|
32
|
+
__export(seo_exports, {
|
|
33
|
+
configSEO: () => configSEO
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(seo_exports);
|
|
36
|
+
|
|
37
|
+
// src/seo/seo.tsx
|
|
38
|
+
var import_react = __toESM(require("react"));
|
|
39
|
+
var import_react_router = require("react-router");
|
|
40
|
+
function configSEO(config) {
|
|
41
|
+
function init(props) {
|
|
42
|
+
const canonicalPath = props.canonicalPath;
|
|
43
|
+
const url = canonicalPath ? `${config.origin}${canonicalPath === "/" ? "" : canonicalPath}` : `${config.origin}${props.path || ""}`;
|
|
44
|
+
const pageTitle = props.title ? `${props.title} | ${config.siteName}` : config.siteName;
|
|
45
|
+
const description = props.description || config.description;
|
|
46
|
+
const keywords = props.keywords || config.keywords;
|
|
47
|
+
const thumbnail = props.thumbnail || (typeof config.thumbnail === "function" ? config.thumbnail() : config.thumbnail);
|
|
48
|
+
return {
|
|
49
|
+
pageTitle,
|
|
50
|
+
type: props.type,
|
|
51
|
+
description,
|
|
52
|
+
keywords,
|
|
53
|
+
url,
|
|
54
|
+
thumbnail
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
const meta = ({ loaderData }) => {
|
|
58
|
+
const props = loaderData?.seo || {};
|
|
59
|
+
const { pageTitle, type, description, keywords, url, thumbnail } = props;
|
|
60
|
+
const socialImage = thumbnail ? [
|
|
61
|
+
typeof thumbnail === "string" ? {
|
|
62
|
+
url: thumbnail,
|
|
63
|
+
alt: `${props.title} \uB300\uD45C \uC774\uBBF8\uC9C0`
|
|
64
|
+
} : thumbnail
|
|
65
|
+
] : [];
|
|
66
|
+
return [
|
|
67
|
+
pageTitle && { title: pageTitle },
|
|
68
|
+
description && { name: "description", content: description },
|
|
69
|
+
keywords && { name: "keywords", content: keywords.join(", ") },
|
|
70
|
+
url && {
|
|
71
|
+
tagName: "link",
|
|
72
|
+
rel: "canonical",
|
|
73
|
+
href: url
|
|
74
|
+
},
|
|
75
|
+
{ property: "og:type", content: type || "website" },
|
|
76
|
+
pageTitle && { property: "og:title", content: pageTitle },
|
|
77
|
+
description && { property: "og:description", content: description },
|
|
78
|
+
url && { property: "og:url", content: url },
|
|
79
|
+
{ property: "og:site_name", content: config.siteName },
|
|
80
|
+
...socialImage?.map((file) => ({
|
|
81
|
+
property: "og:image",
|
|
82
|
+
content: file.url
|
|
83
|
+
})),
|
|
84
|
+
{
|
|
85
|
+
property: "twitter:card",
|
|
86
|
+
content: socialImage.length > 0 ? "summary_large_image" : "summary"
|
|
87
|
+
},
|
|
88
|
+
pageTitle && { property: "twitter:title", content: pageTitle },
|
|
89
|
+
description && { property: "twitter:description", content: description },
|
|
90
|
+
...socialImage?.map((file) => ({
|
|
91
|
+
property: "twitter:image",
|
|
92
|
+
content: file.url
|
|
93
|
+
}))
|
|
94
|
+
];
|
|
95
|
+
};
|
|
96
|
+
function StructedData() {
|
|
97
|
+
const matches = (0, import_react_router.useMatches)();
|
|
98
|
+
const data = matches.reduce((acc, match) => {
|
|
99
|
+
return {
|
|
100
|
+
...acc,
|
|
101
|
+
...match.loaderData?.seo || {}
|
|
102
|
+
};
|
|
103
|
+
}, {});
|
|
104
|
+
const { pageTitle, description, keywords, url, thumbnail } = data;
|
|
105
|
+
const thumbnailUrl = thumbnail?.url;
|
|
106
|
+
const props = data?.seo || {};
|
|
107
|
+
const websiteSchemaId = `${config.origin}/#website`;
|
|
108
|
+
const websiteSchema = {
|
|
109
|
+
"@type": "WebSite",
|
|
110
|
+
"@id": websiteSchemaId,
|
|
111
|
+
url: config.origin,
|
|
112
|
+
name: config.siteName,
|
|
113
|
+
alternateName: config.siteName,
|
|
114
|
+
description: config.description,
|
|
115
|
+
inLanguage: "ko"
|
|
116
|
+
};
|
|
117
|
+
const thumbnailSchemaId = `${url}/#thumbnail`;
|
|
118
|
+
const images = [
|
|
119
|
+
...thumbnailUrl ? [
|
|
120
|
+
{
|
|
121
|
+
id: thumbnailSchemaId,
|
|
122
|
+
url: thumbnailUrl,
|
|
123
|
+
alt: `${props.title} \uB300\uD45C \uC774\uBBF8\uC9C0`
|
|
124
|
+
}
|
|
125
|
+
] : [],
|
|
126
|
+
...props.images || [],
|
|
127
|
+
...props.collection?.map((portfolio) => portfolio.thumbnail) || []
|
|
128
|
+
].filter(Boolean);
|
|
129
|
+
const image = images.filter((file) => file.id).map((file) => ({
|
|
130
|
+
"@type": "ImageObject",
|
|
131
|
+
"@id": `${url}/#${file.id}`
|
|
132
|
+
}));
|
|
133
|
+
const breadcrumbSchemaId = `${url}#breadcrumb`;
|
|
134
|
+
const updatedAt = props.updatedAt;
|
|
135
|
+
const createdAt = props.createdAt;
|
|
136
|
+
const additionalStructedData = [
|
|
137
|
+
...typeof props.structedData === "function" ? props.structedData() : props.structedData || [],
|
|
138
|
+
...typeof config.structedData === "function" ? config.structedData() : config.structedData || []
|
|
139
|
+
];
|
|
140
|
+
const collectionMainEntity = props.collection ? {
|
|
141
|
+
"@type": "ItemList",
|
|
142
|
+
numberOfItems: props.collection.length,
|
|
143
|
+
itemListElement: props.collection.map((item, index) => ({
|
|
144
|
+
"@type": "ListItem",
|
|
145
|
+
position: index + 1,
|
|
146
|
+
url: item.url,
|
|
147
|
+
item: {
|
|
148
|
+
"@type": "WebPage",
|
|
149
|
+
"@id": `${item.url}#webpage`,
|
|
150
|
+
url: item.url,
|
|
151
|
+
name: item.title,
|
|
152
|
+
thumbnailUrl: item.thumbnail?.url,
|
|
153
|
+
dateModified: item.updatedAt?.toISOString(),
|
|
154
|
+
dateCreated: item.createdAt?.toISOString(),
|
|
155
|
+
datePublished: item.createdAt?.toISOString()
|
|
156
|
+
}
|
|
157
|
+
}))
|
|
158
|
+
} : void 0;
|
|
159
|
+
const structuredData = {
|
|
160
|
+
"@context": "https://schema.org",
|
|
161
|
+
"@graph": [
|
|
162
|
+
{
|
|
163
|
+
"@type": "WebPage",
|
|
164
|
+
"@id": `${url}#webpage`,
|
|
165
|
+
url,
|
|
166
|
+
name: pageTitle,
|
|
167
|
+
description,
|
|
168
|
+
keywords,
|
|
169
|
+
dateModified: updatedAt?.toISOString(),
|
|
170
|
+
datePublished: createdAt?.toISOString(),
|
|
171
|
+
dateCreated: createdAt?.toISOString(),
|
|
172
|
+
primaryImageOfPage: thumbnail ? {
|
|
173
|
+
"@id": thumbnailSchemaId
|
|
174
|
+
} : void 0,
|
|
175
|
+
isPartOf: {
|
|
176
|
+
"@id": websiteSchemaId
|
|
177
|
+
},
|
|
178
|
+
inLanguage: "ko",
|
|
179
|
+
breadcrumb: props.breadcrumbs && props.breadcrumbs.length > 0 ? {
|
|
180
|
+
"@id": breadcrumbSchemaId
|
|
181
|
+
} : void 0,
|
|
182
|
+
image,
|
|
183
|
+
mainEntity: collectionMainEntity
|
|
184
|
+
},
|
|
185
|
+
props.article && {
|
|
186
|
+
"@type": "Article",
|
|
187
|
+
"@id": `${url}#article`,
|
|
188
|
+
url,
|
|
189
|
+
name: pageTitle,
|
|
190
|
+
description,
|
|
191
|
+
keywords,
|
|
192
|
+
headline: pageTitle,
|
|
193
|
+
dateModified: updatedAt?.toISOString(),
|
|
194
|
+
datePublished: createdAt?.toISOString(),
|
|
195
|
+
dateCreated: createdAt?.toISOString(),
|
|
196
|
+
isPartOf: {
|
|
197
|
+
"@id": websiteSchemaId
|
|
198
|
+
},
|
|
199
|
+
inLanguage: "ko",
|
|
200
|
+
image
|
|
201
|
+
},
|
|
202
|
+
props.blogPosting && {
|
|
203
|
+
"@type": "BlogPosting",
|
|
204
|
+
"@id": `${url}/#blogposting`,
|
|
205
|
+
url,
|
|
206
|
+
headline: pageTitle,
|
|
207
|
+
description,
|
|
208
|
+
thumbnailUrl,
|
|
209
|
+
datePublished: createdAt?.toISOString(),
|
|
210
|
+
dateModified: updatedAt?.toISOString(),
|
|
211
|
+
isPartOf: { "@id": websiteSchemaId },
|
|
212
|
+
image
|
|
213
|
+
},
|
|
214
|
+
props.creativeWork && {
|
|
215
|
+
"@type": "CreativeWork",
|
|
216
|
+
"@id": `${url}/#creativework`,
|
|
217
|
+
url,
|
|
218
|
+
name: pageTitle,
|
|
219
|
+
description,
|
|
220
|
+
datePublished: createdAt?.toISOString(),
|
|
221
|
+
dateModified: updatedAt?.toISOString(),
|
|
222
|
+
isPartOf: { "@id": websiteSchemaId },
|
|
223
|
+
thumbnailUrl,
|
|
224
|
+
image
|
|
225
|
+
},
|
|
226
|
+
props.visualArtwork && {
|
|
227
|
+
"@type": "VisualArtwork",
|
|
228
|
+
"@id": `${url}/#visualartwork`,
|
|
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.collection && {
|
|
239
|
+
"@type": "CollectionPage",
|
|
240
|
+
"@id": `${url}/#collectionpage`,
|
|
241
|
+
url,
|
|
242
|
+
name: pageTitle,
|
|
243
|
+
description,
|
|
244
|
+
isPartOf: { "@id": websiteSchemaId },
|
|
245
|
+
image,
|
|
246
|
+
inLanguage: "ko-KR",
|
|
247
|
+
breadcrumb: props.breadcrumbs && props.breadcrumbs.length > 0 ? {
|
|
248
|
+
"@id": `${url}/#breadcrumb`
|
|
249
|
+
} : void 0,
|
|
250
|
+
mainEntity: collectionMainEntity
|
|
251
|
+
},
|
|
252
|
+
websiteSchema,
|
|
253
|
+
props.breadcrumbs && props.breadcrumbs.length > 0 && {
|
|
254
|
+
"@id": breadcrumbSchemaId,
|
|
255
|
+
"@type": "BreadcrumbList",
|
|
256
|
+
itemListElement: props.breadcrumbs.map(
|
|
257
|
+
(breadcrumb, index) => ({
|
|
258
|
+
"@type": "ListItem",
|
|
259
|
+
position: index + 1,
|
|
260
|
+
name: breadcrumb.title,
|
|
261
|
+
item: `${config.origin}${breadcrumb.href}`
|
|
262
|
+
})
|
|
263
|
+
)
|
|
264
|
+
},
|
|
265
|
+
...additionalStructedData,
|
|
266
|
+
...images.map((file) => {
|
|
267
|
+
return {
|
|
268
|
+
"@type": "ImageObject",
|
|
269
|
+
"@id": `${url}/#${file.id}`,
|
|
270
|
+
url: file.url,
|
|
271
|
+
contentUrl: file.url,
|
|
272
|
+
name: file.alt,
|
|
273
|
+
description: file.alt,
|
|
274
|
+
width: file?.width?.toString(),
|
|
275
|
+
height: file?.height?.toString(),
|
|
276
|
+
creditText: config.copyright,
|
|
277
|
+
license: `${config.origin}/terms`,
|
|
278
|
+
copyrightNotice: config.copyright,
|
|
279
|
+
acquireLicensePage: `${config.origin}/terms`
|
|
280
|
+
};
|
|
281
|
+
})
|
|
282
|
+
].filter(Boolean)
|
|
283
|
+
};
|
|
284
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
285
|
+
"script",
|
|
286
|
+
{
|
|
287
|
+
type: "application/ld+json",
|
|
288
|
+
dangerouslySetInnerHTML: {
|
|
289
|
+
__html: JSON.stringify(structuredData)
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
return {
|
|
295
|
+
config,
|
|
296
|
+
init,
|
|
297
|
+
meta,
|
|
298
|
+
StructedData
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
302
|
+
0 && (module.exports = {
|
|
303
|
+
configSEO
|
|
304
|
+
});
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
// src/seo/seo.tsx
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { useMatches } from "react-router";
|
|
4
|
+
function configSEO(config) {
|
|
5
|
+
function init(props) {
|
|
6
|
+
const canonicalPath = props.canonicalPath;
|
|
7
|
+
const url = canonicalPath ? `${config.origin}${canonicalPath === "/" ? "" : canonicalPath}` : `${config.origin}${props.path || ""}`;
|
|
8
|
+
const pageTitle = props.title ? `${props.title} | ${config.siteName}` : config.siteName;
|
|
9
|
+
const description = props.description || config.description;
|
|
10
|
+
const keywords = props.keywords || config.keywords;
|
|
11
|
+
const thumbnail = props.thumbnail || (typeof config.thumbnail === "function" ? config.thumbnail() : config.thumbnail);
|
|
12
|
+
return {
|
|
13
|
+
pageTitle,
|
|
14
|
+
type: props.type,
|
|
15
|
+
description,
|
|
16
|
+
keywords,
|
|
17
|
+
url,
|
|
18
|
+
thumbnail
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const meta = ({ loaderData }) => {
|
|
22
|
+
const props = loaderData?.seo || {};
|
|
23
|
+
const { pageTitle, type, description, keywords, url, thumbnail } = props;
|
|
24
|
+
const socialImage = thumbnail ? [
|
|
25
|
+
typeof thumbnail === "string" ? {
|
|
26
|
+
url: thumbnail,
|
|
27
|
+
alt: `${props.title} \uB300\uD45C \uC774\uBBF8\uC9C0`
|
|
28
|
+
} : thumbnail
|
|
29
|
+
] : [];
|
|
30
|
+
return [
|
|
31
|
+
pageTitle && { title: pageTitle },
|
|
32
|
+
description && { name: "description", content: description },
|
|
33
|
+
keywords && { name: "keywords", content: keywords.join(", ") },
|
|
34
|
+
url && {
|
|
35
|
+
tagName: "link",
|
|
36
|
+
rel: "canonical",
|
|
37
|
+
href: url
|
|
38
|
+
},
|
|
39
|
+
{ property: "og:type", content: type || "website" },
|
|
40
|
+
pageTitle && { property: "og:title", content: pageTitle },
|
|
41
|
+
description && { property: "og:description", content: description },
|
|
42
|
+
url && { property: "og:url", content: url },
|
|
43
|
+
{ property: "og:site_name", content: config.siteName },
|
|
44
|
+
...socialImage?.map((file) => ({
|
|
45
|
+
property: "og:image",
|
|
46
|
+
content: file.url
|
|
47
|
+
})),
|
|
48
|
+
{
|
|
49
|
+
property: "twitter:card",
|
|
50
|
+
content: socialImage.length > 0 ? "summary_large_image" : "summary"
|
|
51
|
+
},
|
|
52
|
+
pageTitle && { property: "twitter:title", content: pageTitle },
|
|
53
|
+
description && { property: "twitter:description", content: description },
|
|
54
|
+
...socialImage?.map((file) => ({
|
|
55
|
+
property: "twitter:image",
|
|
56
|
+
content: file.url
|
|
57
|
+
}))
|
|
58
|
+
];
|
|
59
|
+
};
|
|
60
|
+
function StructedData() {
|
|
61
|
+
const matches = useMatches();
|
|
62
|
+
const data = matches.reduce((acc, match) => {
|
|
63
|
+
return {
|
|
64
|
+
...acc,
|
|
65
|
+
...match.loaderData?.seo || {}
|
|
66
|
+
};
|
|
67
|
+
}, {});
|
|
68
|
+
const { pageTitle, description, keywords, url, thumbnail } = data;
|
|
69
|
+
const thumbnailUrl = thumbnail?.url;
|
|
70
|
+
const props = data?.seo || {};
|
|
71
|
+
const websiteSchemaId = `${config.origin}/#website`;
|
|
72
|
+
const websiteSchema = {
|
|
73
|
+
"@type": "WebSite",
|
|
74
|
+
"@id": websiteSchemaId,
|
|
75
|
+
url: config.origin,
|
|
76
|
+
name: config.siteName,
|
|
77
|
+
alternateName: config.siteName,
|
|
78
|
+
description: config.description,
|
|
79
|
+
inLanguage: "ko"
|
|
80
|
+
};
|
|
81
|
+
const thumbnailSchemaId = `${url}/#thumbnail`;
|
|
82
|
+
const images = [
|
|
83
|
+
...thumbnailUrl ? [
|
|
84
|
+
{
|
|
85
|
+
id: thumbnailSchemaId,
|
|
86
|
+
url: thumbnailUrl,
|
|
87
|
+
alt: `${props.title} \uB300\uD45C \uC774\uBBF8\uC9C0`
|
|
88
|
+
}
|
|
89
|
+
] : [],
|
|
90
|
+
...props.images || [],
|
|
91
|
+
...props.collection?.map((portfolio) => portfolio.thumbnail) || []
|
|
92
|
+
].filter(Boolean);
|
|
93
|
+
const image = images.filter((file) => file.id).map((file) => ({
|
|
94
|
+
"@type": "ImageObject",
|
|
95
|
+
"@id": `${url}/#${file.id}`
|
|
96
|
+
}));
|
|
97
|
+
const breadcrumbSchemaId = `${url}#breadcrumb`;
|
|
98
|
+
const updatedAt = props.updatedAt;
|
|
99
|
+
const createdAt = props.createdAt;
|
|
100
|
+
const additionalStructedData = [
|
|
101
|
+
...typeof props.structedData === "function" ? props.structedData() : props.structedData || [],
|
|
102
|
+
...typeof config.structedData === "function" ? config.structedData() : config.structedData || []
|
|
103
|
+
];
|
|
104
|
+
const collectionMainEntity = props.collection ? {
|
|
105
|
+
"@type": "ItemList",
|
|
106
|
+
numberOfItems: props.collection.length,
|
|
107
|
+
itemListElement: props.collection.map((item, index) => ({
|
|
108
|
+
"@type": "ListItem",
|
|
109
|
+
position: index + 1,
|
|
110
|
+
url: item.url,
|
|
111
|
+
item: {
|
|
112
|
+
"@type": "WebPage",
|
|
113
|
+
"@id": `${item.url}#webpage`,
|
|
114
|
+
url: item.url,
|
|
115
|
+
name: item.title,
|
|
116
|
+
thumbnailUrl: item.thumbnail?.url,
|
|
117
|
+
dateModified: item.updatedAt?.toISOString(),
|
|
118
|
+
dateCreated: item.createdAt?.toISOString(),
|
|
119
|
+
datePublished: item.createdAt?.toISOString()
|
|
120
|
+
}
|
|
121
|
+
}))
|
|
122
|
+
} : void 0;
|
|
123
|
+
const structuredData = {
|
|
124
|
+
"@context": "https://schema.org",
|
|
125
|
+
"@graph": [
|
|
126
|
+
{
|
|
127
|
+
"@type": "WebPage",
|
|
128
|
+
"@id": `${url}#webpage`,
|
|
129
|
+
url,
|
|
130
|
+
name: pageTitle,
|
|
131
|
+
description,
|
|
132
|
+
keywords,
|
|
133
|
+
dateModified: updatedAt?.toISOString(),
|
|
134
|
+
datePublished: createdAt?.toISOString(),
|
|
135
|
+
dateCreated: createdAt?.toISOString(),
|
|
136
|
+
primaryImageOfPage: thumbnail ? {
|
|
137
|
+
"@id": thumbnailSchemaId
|
|
138
|
+
} : void 0,
|
|
139
|
+
isPartOf: {
|
|
140
|
+
"@id": websiteSchemaId
|
|
141
|
+
},
|
|
142
|
+
inLanguage: "ko",
|
|
143
|
+
breadcrumb: props.breadcrumbs && props.breadcrumbs.length > 0 ? {
|
|
144
|
+
"@id": breadcrumbSchemaId
|
|
145
|
+
} : void 0,
|
|
146
|
+
image,
|
|
147
|
+
mainEntity: collectionMainEntity
|
|
148
|
+
},
|
|
149
|
+
props.article && {
|
|
150
|
+
"@type": "Article",
|
|
151
|
+
"@id": `${url}#article`,
|
|
152
|
+
url,
|
|
153
|
+
name: pageTitle,
|
|
154
|
+
description,
|
|
155
|
+
keywords,
|
|
156
|
+
headline: pageTitle,
|
|
157
|
+
dateModified: updatedAt?.toISOString(),
|
|
158
|
+
datePublished: createdAt?.toISOString(),
|
|
159
|
+
dateCreated: createdAt?.toISOString(),
|
|
160
|
+
isPartOf: {
|
|
161
|
+
"@id": websiteSchemaId
|
|
162
|
+
},
|
|
163
|
+
inLanguage: "ko",
|
|
164
|
+
image
|
|
165
|
+
},
|
|
166
|
+
props.blogPosting && {
|
|
167
|
+
"@type": "BlogPosting",
|
|
168
|
+
"@id": `${url}/#blogposting`,
|
|
169
|
+
url,
|
|
170
|
+
headline: pageTitle,
|
|
171
|
+
description,
|
|
172
|
+
thumbnailUrl,
|
|
173
|
+
datePublished: createdAt?.toISOString(),
|
|
174
|
+
dateModified: updatedAt?.toISOString(),
|
|
175
|
+
isPartOf: { "@id": websiteSchemaId },
|
|
176
|
+
image
|
|
177
|
+
},
|
|
178
|
+
props.creativeWork && {
|
|
179
|
+
"@type": "CreativeWork",
|
|
180
|
+
"@id": `${url}/#creativework`,
|
|
181
|
+
url,
|
|
182
|
+
name: pageTitle,
|
|
183
|
+
description,
|
|
184
|
+
datePublished: createdAt?.toISOString(),
|
|
185
|
+
dateModified: updatedAt?.toISOString(),
|
|
186
|
+
isPartOf: { "@id": websiteSchemaId },
|
|
187
|
+
thumbnailUrl,
|
|
188
|
+
image
|
|
189
|
+
},
|
|
190
|
+
props.visualArtwork && {
|
|
191
|
+
"@type": "VisualArtwork",
|
|
192
|
+
"@id": `${url}/#visualartwork`,
|
|
193
|
+
url,
|
|
194
|
+
name: pageTitle,
|
|
195
|
+
description,
|
|
196
|
+
datePublished: createdAt?.toISOString(),
|
|
197
|
+
dateModified: updatedAt?.toISOString(),
|
|
198
|
+
isPartOf: { "@id": websiteSchemaId },
|
|
199
|
+
thumbnailUrl,
|
|
200
|
+
image
|
|
201
|
+
},
|
|
202
|
+
props.collection && {
|
|
203
|
+
"@type": "CollectionPage",
|
|
204
|
+
"@id": `${url}/#collectionpage`,
|
|
205
|
+
url,
|
|
206
|
+
name: pageTitle,
|
|
207
|
+
description,
|
|
208
|
+
isPartOf: { "@id": websiteSchemaId },
|
|
209
|
+
image,
|
|
210
|
+
inLanguage: "ko-KR",
|
|
211
|
+
breadcrumb: props.breadcrumbs && props.breadcrumbs.length > 0 ? {
|
|
212
|
+
"@id": `${url}/#breadcrumb`
|
|
213
|
+
} : void 0,
|
|
214
|
+
mainEntity: collectionMainEntity
|
|
215
|
+
},
|
|
216
|
+
websiteSchema,
|
|
217
|
+
props.breadcrumbs && props.breadcrumbs.length > 0 && {
|
|
218
|
+
"@id": breadcrumbSchemaId,
|
|
219
|
+
"@type": "BreadcrumbList",
|
|
220
|
+
itemListElement: props.breadcrumbs.map(
|
|
221
|
+
(breadcrumb, index) => ({
|
|
222
|
+
"@type": "ListItem",
|
|
223
|
+
position: index + 1,
|
|
224
|
+
name: breadcrumb.title,
|
|
225
|
+
item: `${config.origin}${breadcrumb.href}`
|
|
226
|
+
})
|
|
227
|
+
)
|
|
228
|
+
},
|
|
229
|
+
...additionalStructedData,
|
|
230
|
+
...images.map((file) => {
|
|
231
|
+
return {
|
|
232
|
+
"@type": "ImageObject",
|
|
233
|
+
"@id": `${url}/#${file.id}`,
|
|
234
|
+
url: file.url,
|
|
235
|
+
contentUrl: file.url,
|
|
236
|
+
name: file.alt,
|
|
237
|
+
description: file.alt,
|
|
238
|
+
width: file?.width?.toString(),
|
|
239
|
+
height: file?.height?.toString(),
|
|
240
|
+
creditText: config.copyright,
|
|
241
|
+
license: `${config.origin}/terms`,
|
|
242
|
+
copyrightNotice: config.copyright,
|
|
243
|
+
acquireLicensePage: `${config.origin}/terms`
|
|
244
|
+
};
|
|
245
|
+
})
|
|
246
|
+
].filter(Boolean)
|
|
247
|
+
};
|
|
248
|
+
return /* @__PURE__ */ React.createElement(
|
|
249
|
+
"script",
|
|
250
|
+
{
|
|
251
|
+
type: "application/ld+json",
|
|
252
|
+
dangerouslySetInnerHTML: {
|
|
253
|
+
__html: JSON.stringify(structuredData)
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
return {
|
|
259
|
+
config,
|
|
260
|
+
init,
|
|
261
|
+
meta,
|
|
262
|
+
StructedData
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
export {
|
|
266
|
+
configSEO
|
|
267
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'dn-react-toolkit/text_editor';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'dn-react-toolkit/text_editor';
|
|
@@ -0,0 +1,24 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
|
|
17
|
+
// src/text_editor/index.tsx
|
|
18
|
+
var text_editor_exports = {};
|
|
19
|
+
module.exports = __toCommonJS(text_editor_exports);
|
|
20
|
+
__reExport(text_editor_exports, require("dn-react-toolkit/text_editor"), module.exports);
|
|
21
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
22
|
+
0 && (module.exports = {
|
|
23
|
+
...require("dn-react-toolkit/text_editor")
|
|
24
|
+
});
|