dn-react-router-toolkit 0.9.0 → 0.9.2

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.
Files changed (103) hide show
  1. package/dist/api/default_api_handler.d.mts +13 -0
  2. package/dist/api/default_api_handler.d.ts +13 -0
  3. package/dist/api/{create_handler.js → default_api_handler.js} +49 -52
  4. package/dist/api/{create_handler.mjs → default_api_handler.mjs} +45 -48
  5. package/dist/api/index.d.mts +8 -7
  6. package/dist/api/index.d.ts +8 -7
  7. package/dist/api/index.js +233 -147
  8. package/dist/api/index.mjs +238 -151
  9. package/dist/api/put_resource_handler.d.mts +25 -0
  10. package/dist/api/put_resource_handler.d.ts +25 -0
  11. package/dist/api/put_resource_handler.js +214 -0
  12. package/dist/api/put_resource_handler.mjs +194 -0
  13. package/dist/api/resource_handler.d.mts +26 -0
  14. package/dist/api/resource_handler.d.ts +26 -0
  15. package/dist/api/resource_handler.js +280 -0
  16. package/dist/api/resource_handler.mjs +265 -0
  17. package/dist/auth/cookie_manager.d.mts +1 -1
  18. package/dist/auth/cookie_manager.d.ts +1 -1
  19. package/dist/auth/index.d.mts +2 -2
  20. package/dist/auth/index.d.ts +2 -2
  21. package/dist/auth/index.js +18 -18
  22. package/dist/auth/index.mjs +18 -18
  23. package/dist/auth/with_auth.d.mts +2 -2
  24. package/dist/auth/with_auth.d.ts +2 -2
  25. package/dist/auth/with_auth.js +18 -18
  26. package/dist/auth/with_auth.mjs +18 -18
  27. package/dist/client/editor.d.mts +2 -2
  28. package/dist/client/editor.d.ts +2 -2
  29. package/dist/client/editor.js +9 -3
  30. package/dist/client/editor.mjs +9 -3
  31. package/dist/client/index.d.mts +2 -2
  32. package/dist/client/index.d.ts +2 -2
  33. package/dist/client/index.js +9 -3
  34. package/dist/client/index.mjs +9 -3
  35. package/dist/crud/crud_form.js +22 -4
  36. package/dist/crud/crud_form.mjs +11 -3
  37. package/dist/crud/crud_form_provider.js +16 -3
  38. package/dist/crud/crud_form_provider.mjs +14 -1
  39. package/dist/crud/index.js +22 -4
  40. package/dist/crud/index.mjs +11 -3
  41. package/dist/db/backup/index.d.mts +1 -1
  42. package/dist/db/backup/index.d.ts +1 -1
  43. package/dist/form/create_form_component.js +21 -2
  44. package/dist/form/create_form_component.mjs +10 -1
  45. package/dist/form/form_components.js +21 -2
  46. package/dist/form/form_components.mjs +10 -1
  47. package/dist/form/index.js +21 -2
  48. package/dist/form/index.mjs +10 -1
  49. package/dist/post/editor_toolbar.js +20 -3
  50. package/dist/post/editor_toolbar.mjs +9 -2
  51. package/dist/post/index.js +31 -11
  52. package/dist/post/index.mjs +19 -9
  53. package/dist/post/post_form_page.js +29 -11
  54. package/dist/post/post_form_page.mjs +17 -9
  55. package/dist/post/thumbnail_picker.js +21 -2
  56. package/dist/post/thumbnail_picker.mjs +10 -1
  57. package/dist/table/buttons.js +11 -14
  58. package/dist/table/buttons.mjs +10 -13
  59. package/dist/table/index.js +14 -18
  60. package/dist/table/index.mjs +13 -17
  61. package/dist/table/table.js +10 -4
  62. package/dist/table/table.mjs +5 -1
  63. package/dist/table/table_form.js +12 -18
  64. package/dist/table/table_form.mjs +9 -15
  65. package/dist/utils/cn.d.mts +3 -0
  66. package/dist/utils/cn.d.ts +3 -0
  67. package/dist/utils/cn.js +32 -0
  68. package/dist/utils/cn.mjs +7 -0
  69. package/dist/utils/date.d.mts +5 -0
  70. package/dist/utils/date.d.ts +5 -0
  71. package/dist/utils/date.js +65 -0
  72. package/dist/utils/date.mjs +29 -0
  73. package/dist/utils/index.d.mts +7 -0
  74. package/dist/utils/index.d.ts +7 -0
  75. package/dist/utils/index.js +116 -0
  76. package/dist/utils/index.mjs +73 -0
  77. package/dist/utils/korean.d.mts +6 -0
  78. package/dist/utils/korean.d.ts +6 -0
  79. package/dist/utils/korean.js +41 -0
  80. package/dist/utils/korean.mjs +16 -0
  81. package/dist/utils/singleton.d.mts +3 -0
  82. package/dist/utils/singleton.d.ts +3 -0
  83. package/dist/utils/singleton.js +37 -0
  84. package/dist/utils/singleton.mjs +12 -0
  85. package/dist/utils/sleep.d.mts +3 -0
  86. package/dist/utils/sleep.d.ts +3 -0
  87. package/dist/utils/sleep.js +32 -0
  88. package/dist/utils/sleep.mjs +7 -0
  89. package/dist/utils/slug.d.mts +3 -0
  90. package/dist/utils/slug.d.ts +3 -0
  91. package/dist/utils/slug.js +32 -0
  92. package/dist/utils/slug.mjs +7 -0
  93. package/package.json +8 -4
  94. package/dist/api/create_api_handler.d.mts +0 -30
  95. package/dist/api/create_api_handler.d.ts +0 -30
  96. package/dist/api/create_api_handler.js +0 -155
  97. package/dist/api/create_api_handler.mjs +0 -139
  98. package/dist/api/create_handler.d.mts +0 -13
  99. package/dist/api/create_handler.d.ts +0 -13
  100. package/dist/api/item_api_handler.d.mts +0 -21
  101. package/dist/api/item_api_handler.d.ts +0 -21
  102. package/dist/api/item_api_handler.js +0 -63
  103. package/dist/api/item_api_handler.mjs +0 -38
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
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
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // src/form/form_components.tsx
@@ -27,13 +37,22 @@ __export(form_components_exports, {
27
37
  module.exports = __toCommonJS(form_components_exports);
28
38
 
29
39
  // src/form/create_form_component.tsx
30
- var import_utils = require("dn-react-toolkit/utils");
31
40
  var import_react = require("react");
41
+
42
+ // src/utils/cn.ts
43
+ function cn(...classes) {
44
+ return classes.filter(Boolean).join(" ").trim();
45
+ }
46
+
47
+ // src/utils/date.ts
48
+ var import_moment_timezone = __toESM(require("moment-timezone"));
49
+
50
+ // src/form/create_form_component.tsx
32
51
  var import_jsx_runtime = require("react/jsx-runtime");
33
52
  function createComponent(tag, options) {
34
53
  return function FormComponent({ className, ...props }) {
35
54
  const Tag = tag;
36
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tag, { ...props, className: (0, import_utils.cn)(options.className, className) });
55
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tag, { ...props, className: cn(options.className, className) });
37
56
  };
38
57
  }
39
58
 
@@ -1,6 +1,15 @@
1
1
  // src/form/create_form_component.tsx
2
- import { cn } from "dn-react-toolkit/utils";
3
2
  import "react";
3
+
4
+ // src/utils/cn.ts
5
+ function cn(...classes) {
6
+ return classes.filter(Boolean).join(" ").trim();
7
+ }
8
+
9
+ // src/utils/date.ts
10
+ import moment from "moment-timezone";
11
+
12
+ // src/form/create_form_component.tsx
4
13
  import { jsx } from "react/jsx-runtime";
5
14
  function createComponent(tag, options) {
6
15
  return function FormComponent({ className, ...props }) {
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
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
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // src/form/index.ts
@@ -28,13 +38,22 @@ __export(form_exports, {
28
38
  module.exports = __toCommonJS(form_exports);
29
39
 
30
40
  // src/form/create_form_component.tsx
31
- var import_utils = require("dn-react-toolkit/utils");
32
41
  var import_react = require("react");
42
+
43
+ // src/utils/cn.ts
44
+ function cn(...classes) {
45
+ return classes.filter(Boolean).join(" ").trim();
46
+ }
47
+
48
+ // src/utils/date.ts
49
+ var import_moment_timezone = __toESM(require("moment-timezone"));
50
+
51
+ // src/form/create_form_component.tsx
33
52
  var import_jsx_runtime = require("react/jsx-runtime");
34
53
  function createComponent(tag, options) {
35
54
  return function FormComponent({ className, ...props }) {
36
55
  const Tag = tag;
37
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tag, { ...props, className: (0, import_utils.cn)(options.className, className) });
56
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tag, { ...props, className: cn(options.className, className) });
38
57
  };
39
58
  }
40
59
 
@@ -1,6 +1,15 @@
1
1
  // src/form/create_form_component.tsx
2
- import { cn } from "dn-react-toolkit/utils";
3
2
  import "react";
3
+
4
+ // src/utils/cn.ts
5
+ function cn(...classes) {
6
+ return classes.filter(Boolean).join(" ").trim();
7
+ }
8
+
9
+ // src/utils/date.ts
10
+ import moment from "moment-timezone";
11
+
12
+ // src/form/create_form_component.tsx
4
13
  import { jsx } from "react/jsx-runtime";
5
14
  function createComponent(tag, options) {
6
15
  return function FormComponent({ className, ...props }) {
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
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
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // src/post/editor_toolbar.tsx
@@ -23,7 +33,6 @@ __export(editor_toolbar_exports, {
23
33
  EditorToolbar: () => EditorToolbar
24
34
  });
25
35
  module.exports = __toCommonJS(editor_toolbar_exports);
26
- var import_utils = require("dn-react-toolkit/utils");
27
36
  var import_go = require("react-icons/go");
28
37
 
29
38
  // src/client/env_loader.tsx
@@ -86,7 +95,15 @@ var import_react2 = require("react");
86
95
  var import_jsx_runtime3 = require("react/jsx-runtime");
87
96
 
88
97
  // src/client/editor.tsx
89
- var import_client = require("dn-react-toolkit/file/client");
98
+ var import_client = require("gw-file/client");
99
+
100
+ // src/utils/cn.ts
101
+ function cn(...classes) {
102
+ return classes.filter(Boolean).join(" ").trim();
103
+ }
104
+
105
+ // src/utils/date.ts
106
+ var import_moment_timezone = __toESM(require("moment-timezone"));
90
107
 
91
108
  // src/post/editor_toolbar.tsx
92
109
  var import_jsx_runtime4 = require("react/jsx-runtime");
@@ -97,7 +114,7 @@ function EditorToolbar({
97
114
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
98
115
  "div",
99
116
  {
100
- className: (0, import_utils.cn)("w-full h-12 flex items-center gap-0.5 px-1", className),
117
+ className: cn("w-full h-12 flex items-center gap-0.5 px-1", className),
101
118
  children: [
102
119
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
103
120
  FileInput,
@@ -1,5 +1,4 @@
1
1
  // src/post/editor_toolbar.tsx
2
- import { cn } from "dn-react-toolkit/utils";
3
2
  import {
4
3
  GoFileMedia,
5
4
  GoLink,
@@ -71,7 +70,15 @@ import { useImperativeHandle, useRef as useRef2 } from "react";
71
70
  import { jsx as jsx3 } from "react/jsx-runtime";
72
71
 
73
72
  // src/client/editor.tsx
74
- import { generateMetadata } from "dn-react-toolkit/file/client";
73
+ import { generateMetadata } from "gw-file/client";
74
+
75
+ // src/utils/cn.ts
76
+ function cn(...classes) {
77
+ return classes.filter(Boolean).join(" ").trim();
78
+ }
79
+
80
+ // src/utils/date.ts
81
+ import moment from "moment-timezone";
75
82
 
76
83
  // src/post/editor_toolbar.tsx
77
84
  import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
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
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // src/post/index.ts
@@ -28,8 +38,22 @@ module.exports = __toCommonJS(post_exports);
28
38
 
29
39
  // src/post/thumbnail_picker.tsx
30
40
  var import_react_store_input = require("react-store-input");
31
- var import_utils = require("dn-react-toolkit/utils");
32
41
  var import_react = require("react");
42
+
43
+ // src/utils/cn.ts
44
+ function cn(...classes) {
45
+ return classes.filter(Boolean).join(" ").trim();
46
+ }
47
+
48
+ // src/utils/date.ts
49
+ var import_moment_timezone = __toESM(require("moment-timezone"));
50
+
51
+ // src/utils/slug.ts
52
+ var toSlug = (str) => {
53
+ return str.toLowerCase().replace(/[^a-zA-Z0-9가-힣ㄱ-ㅎㅏ-ㅣ]+/g, "-").replace(/^-|-$/g, "");
54
+ };
55
+
56
+ // src/post/thumbnail_picker.tsx
33
57
  var import_jsx_runtime = require("react/jsx-runtime");
34
58
  function PostThumbnailPicker({
35
59
  store,
@@ -72,7 +96,7 @@ function PostThumbnailPicker({
72
96
  "button",
73
97
  {
74
98
  type: "button",
75
- className: (0, import_utils.cn)(
99
+ className: cn(
76
100
  "border border-neutral-200 rounded-lg overflow-hidden aspect-4/3",
77
101
  thumbnail === url && "border-transparent ring-2 ring-primary"
78
102
  ),
@@ -95,7 +119,6 @@ function PostThumbnailPicker({
95
119
  }
96
120
 
97
121
  // src/post/editor_toolbar.tsx
98
- var import_utils2 = require("dn-react-toolkit/utils");
99
122
  var import_go = require("react-icons/go");
100
123
 
101
124
  // src/client/env_loader.tsx
@@ -229,7 +252,7 @@ function StoreTextEditor({
229
252
  }
230
253
 
231
254
  // src/client/editor.tsx
232
- var import_client = require("dn-react-toolkit/file/client");
255
+ var import_client = require("gw-file/client");
233
256
 
234
257
  // src/post/editor_toolbar.tsx
235
258
  var import_jsx_runtime5 = require("react/jsx-runtime");
@@ -240,7 +263,7 @@ function EditorToolbar({
240
263
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
241
264
  "div",
242
265
  {
243
- className: (0, import_utils2.cn)("w-full h-12 flex items-center gap-0.5 px-1", className),
266
+ className: cn("w-full h-12 flex items-center gap-0.5 px-1", className),
244
267
  children: [
245
268
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
246
269
  FileInput,
@@ -326,7 +349,6 @@ function EditorToolbar({
326
349
 
327
350
  // src/post/post_form_page.tsx
328
351
  var import_react_router4 = require("react-router");
329
- var import_utils5 = require("dn-react-toolkit/utils");
330
352
  var import_react_store_input5 = require("react-store-input");
331
353
  var import_react6 = require("react");
332
354
  var import_dn_react_text_editor2 = require("dn-react-text-editor");
@@ -335,18 +357,16 @@ var import_dn_react_text_editor2 = require("dn-react-text-editor");
335
357
  var import_react_router3 = require("react-router");
336
358
  var import_react_store_input3 = require("react-store-input");
337
359
  var import_react4 = require("react");
338
- var import_utils3 = require("dn-react-toolkit/utils");
339
360
  var import_jsx_runtime6 = require("react/jsx-runtime");
340
361
  var FormContext = (0, import_react4.createContext)({});
341
362
 
342
363
  // src/form/create_form_component.tsx
343
- var import_utils4 = require("dn-react-toolkit/utils");
344
364
  var import_react5 = require("react");
345
365
  var import_jsx_runtime7 = require("react/jsx-runtime");
346
366
  function createComponent(tag, options) {
347
367
  return function FormComponent({ className, ...props }) {
348
368
  const Tag = tag;
349
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Tag, { ...props, className: (0, import_utils4.cn)(options.className, className) });
369
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Tag, { ...props, className: cn(options.className, className) });
350
370
  };
351
371
  }
352
372
 
@@ -469,7 +489,7 @@ var createPostFormPage = ({
469
489
  onChange: (e) => {
470
490
  const title = e.target.value;
471
491
  form.store.dispatch((state) => {
472
- state.slug = (0, import_utils5.toSlug)(title);
492
+ state.slug = toSlug(title);
473
493
  });
474
494
  }
475
495
  }
@@ -552,7 +572,7 @@ var createPostFormPage = ({
552
572
  updateDelay: 500,
553
573
  editor: {
554
574
  attributes: {
555
- class: (0, import_utils5.cn)(textEditorClassName, "pb-[50vh]")
575
+ class: cn(textEditorClassName, "pb-[50vh]")
556
576
  }
557
577
  },
558
578
  attachFile
@@ -1,7 +1,21 @@
1
1
  // src/post/thumbnail_picker.tsx
2
2
  import { useSelector } from "react-store-input";
3
- import { cn } from "dn-react-toolkit/utils";
4
3
  import { useEffect, useState } from "react";
4
+
5
+ // src/utils/cn.ts
6
+ function cn(...classes) {
7
+ return classes.filter(Boolean).join(" ").trim();
8
+ }
9
+
10
+ // src/utils/date.ts
11
+ import moment from "moment-timezone";
12
+
13
+ // src/utils/slug.ts
14
+ var toSlug = (str) => {
15
+ return str.toLowerCase().replace(/[^a-zA-Z0-9가-힣ㄱ-ㅎㅏ-ㅣ]+/g, "-").replace(/^-|-$/g, "");
16
+ };
17
+
18
+ // src/post/thumbnail_picker.tsx
5
19
  import { jsx } from "react/jsx-runtime";
6
20
  function PostThumbnailPicker({
7
21
  store,
@@ -67,7 +81,6 @@ function PostThumbnailPicker({
67
81
  }
68
82
 
69
83
  // src/post/editor_toolbar.tsx
70
- import { cn as cn2 } from "dn-react-toolkit/utils";
71
84
  import {
72
85
  GoFileMedia,
73
86
  GoLink,
@@ -210,7 +223,7 @@ function StoreTextEditor({
210
223
  }
211
224
 
212
225
  // src/client/editor.tsx
213
- import { generateMetadata } from "dn-react-toolkit/file/client";
226
+ import { generateMetadata } from "gw-file/client";
214
227
 
215
228
  // src/post/editor_toolbar.tsx
216
229
  import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
@@ -221,7 +234,7 @@ function EditorToolbar({
221
234
  return /* @__PURE__ */ jsxs2(
222
235
  "div",
223
236
  {
224
- className: cn2("w-full h-12 flex items-center gap-0.5 px-1", className),
237
+ className: cn("w-full h-12 flex items-center gap-0.5 px-1", className),
225
238
  children: [
226
239
  /* @__PURE__ */ jsx5(
227
240
  FileInput,
@@ -307,7 +320,6 @@ function EditorToolbar({
307
320
 
308
321
  // src/post/post_form_page.tsx
309
322
  import { useLoaderData } from "react-router";
310
- import { cn as cn4, toSlug } from "dn-react-toolkit/utils";
311
323
  import { useStoreComponent as useStoreComponent2 } from "react-store-input";
312
324
  import { useRef as useRef3 } from "react";
313
325
  import "dn-react-text-editor";
@@ -319,18 +331,16 @@ import {
319
331
  createContext,
320
332
  useContext
321
333
  } from "react";
322
- import { Korean } from "dn-react-toolkit/utils";
323
334
  import { jsx as jsx6 } from "react/jsx-runtime";
324
335
  var FormContext = createContext({});
325
336
 
326
337
  // src/form/create_form_component.tsx
327
- import { cn as cn3 } from "dn-react-toolkit/utils";
328
338
  import "react";
329
339
  import { jsx as jsx7 } from "react/jsx-runtime";
330
340
  function createComponent(tag, options) {
331
341
  return function FormComponent({ className, ...props }) {
332
342
  const Tag = tag;
333
- return /* @__PURE__ */ jsx7(Tag, { ...props, className: cn3(options.className, className) });
343
+ return /* @__PURE__ */ jsx7(Tag, { ...props, className: cn(options.className, className) });
334
344
  };
335
345
  }
336
346
 
@@ -536,7 +546,7 @@ var createPostFormPage = ({
536
546
  updateDelay: 500,
537
547
  editor: {
538
548
  attributes: {
539
- class: cn4(textEditorClassName, "pb-[50vh]")
549
+ class: cn(textEditorClassName, "pb-[50vh]")
540
550
  }
541
551
  },
542
552
  attachFile
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
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
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // src/post/post_form_page.tsx
@@ -24,11 +34,9 @@ __export(post_form_page_exports, {
24
34
  });
25
35
  module.exports = __toCommonJS(post_form_page_exports);
26
36
  var import_react_router4 = require("react-router");
27
- var import_utils5 = require("dn-react-toolkit/utils");
28
37
  var import_react_store_input5 = require("react-store-input");
29
38
 
30
39
  // src/post/editor_toolbar.tsx
31
- var import_utils = require("dn-react-toolkit/utils");
32
40
  var import_go = require("react-icons/go");
33
41
 
34
42
  // src/client/env_loader.tsx
@@ -162,7 +170,20 @@ function StoreTextEditor({
162
170
  }
163
171
 
164
172
  // src/client/editor.tsx
165
- var import_client = require("dn-react-toolkit/file/client");
173
+ var import_client = require("gw-file/client");
174
+
175
+ // src/utils/cn.ts
176
+ function cn(...classes) {
177
+ return classes.filter(Boolean).join(" ").trim();
178
+ }
179
+
180
+ // src/utils/date.ts
181
+ var import_moment_timezone = __toESM(require("moment-timezone"));
182
+
183
+ // src/utils/slug.ts
184
+ var toSlug = (str) => {
185
+ return str.toLowerCase().replace(/[^a-zA-Z0-9가-힣ㄱ-ㅎㅏ-ㅣ]+/g, "-").replace(/^-|-$/g, "");
186
+ };
166
187
 
167
188
  // src/post/editor_toolbar.tsx
168
189
  var import_jsx_runtime4 = require("react/jsx-runtime");
@@ -173,7 +194,7 @@ function EditorToolbar({
173
194
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
174
195
  "div",
175
196
  {
176
- className: (0, import_utils.cn)("w-full h-12 flex items-center gap-0.5 px-1", className),
197
+ className: cn("w-full h-12 flex items-center gap-0.5 px-1", className),
177
198
  children: [
178
199
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
179
200
  FileInput,
@@ -263,7 +284,6 @@ var import_dn_react_text_editor2 = require("dn-react-text-editor");
263
284
 
264
285
  // src/post/thumbnail_picker.tsx
265
286
  var import_react_store_input2 = require("react-store-input");
266
- var import_utils2 = require("dn-react-toolkit/utils");
267
287
  var import_react3 = require("react");
268
288
  var import_jsx_runtime5 = require("react/jsx-runtime");
269
289
  function PostThumbnailPicker({
@@ -307,7 +327,7 @@ function PostThumbnailPicker({
307
327
  "button",
308
328
  {
309
329
  type: "button",
310
- className: (0, import_utils2.cn)(
330
+ className: cn(
311
331
  "border border-neutral-200 rounded-lg overflow-hidden aspect-4/3",
312
332
  thumbnail === url && "border-transparent ring-2 ring-primary"
313
333
  ),
@@ -333,18 +353,16 @@ function PostThumbnailPicker({
333
353
  var import_react_router3 = require("react-router");
334
354
  var import_react_store_input3 = require("react-store-input");
335
355
  var import_react4 = require("react");
336
- var import_utils3 = require("dn-react-toolkit/utils");
337
356
  var import_jsx_runtime6 = require("react/jsx-runtime");
338
357
  var FormContext = (0, import_react4.createContext)({});
339
358
 
340
359
  // src/form/create_form_component.tsx
341
- var import_utils4 = require("dn-react-toolkit/utils");
342
360
  var import_react5 = require("react");
343
361
  var import_jsx_runtime7 = require("react/jsx-runtime");
344
362
  function createComponent(tag, options) {
345
363
  return function FormComponent({ className, ...props }) {
346
364
  const Tag = tag;
347
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Tag, { ...props, className: (0, import_utils4.cn)(options.className, className) });
365
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Tag, { ...props, className: cn(options.className, className) });
348
366
  };
349
367
  }
350
368
 
@@ -467,7 +485,7 @@ var createPostFormPage = ({
467
485
  onChange: (e) => {
468
486
  const title = e.target.value;
469
487
  form.store.dispatch((state) => {
470
- state.slug = (0, import_utils5.toSlug)(title);
488
+ state.slug = toSlug(title);
471
489
  });
472
490
  }
473
491
  }
@@ -550,7 +568,7 @@ var createPostFormPage = ({
550
568
  updateDelay: 500,
551
569
  editor: {
552
570
  attributes: {
553
- class: (0, import_utils5.cn)(textEditorClassName, "pb-[50vh]")
571
+ class: cn(textEditorClassName, "pb-[50vh]")
554
572
  }
555
573
  },
556
574
  attachFile
@@ -1,10 +1,8 @@
1
1
  // src/post/post_form_page.tsx
2
2
  import { useLoaderData } from "react-router";
3
- import { cn as cn4, toSlug } from "dn-react-toolkit/utils";
4
3
  import { useStoreComponent as useStoreComponent2 } from "react-store-input";
5
4
 
6
5
  // src/post/editor_toolbar.tsx
7
- import { cn } from "dn-react-toolkit/utils";
8
6
  import {
9
7
  GoFileMedia,
10
8
  GoLink,
@@ -147,7 +145,20 @@ function StoreTextEditor({
147
145
  }
148
146
 
149
147
  // src/client/editor.tsx
150
- import { generateMetadata } from "dn-react-toolkit/file/client";
148
+ import { generateMetadata } from "gw-file/client";
149
+
150
+ // src/utils/cn.ts
151
+ function cn(...classes) {
152
+ return classes.filter(Boolean).join(" ").trim();
153
+ }
154
+
155
+ // src/utils/date.ts
156
+ import moment from "moment-timezone";
157
+
158
+ // src/utils/slug.ts
159
+ var toSlug = (str) => {
160
+ return str.toLowerCase().replace(/[^a-zA-Z0-9가-힣ㄱ-ㅎㅏ-ㅣ]+/g, "-").replace(/^-|-$/g, "");
161
+ };
151
162
 
152
163
  // src/post/editor_toolbar.tsx
153
164
  import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
@@ -248,7 +259,6 @@ import "dn-react-text-editor";
248
259
 
249
260
  // src/post/thumbnail_picker.tsx
250
261
  import { useSelector } from "react-store-input";
251
- import { cn as cn2 } from "dn-react-toolkit/utils";
252
262
  import { useEffect, useState } from "react";
253
263
  import { jsx as jsx5 } from "react/jsx-runtime";
254
264
  function PostThumbnailPicker({
@@ -292,7 +302,7 @@ function PostThumbnailPicker({
292
302
  "button",
293
303
  {
294
304
  type: "button",
295
- className: cn2(
305
+ className: cn(
296
306
  "border border-neutral-200 rounded-lg overflow-hidden aspect-4/3",
297
307
  thumbnail === url && "border-transparent ring-2 ring-primary"
298
308
  ),
@@ -321,18 +331,16 @@ import {
321
331
  createContext,
322
332
  useContext
323
333
  } from "react";
324
- import { Korean } from "dn-react-toolkit/utils";
325
334
  import { jsx as jsx6 } from "react/jsx-runtime";
326
335
  var FormContext = createContext({});
327
336
 
328
337
  // src/form/create_form_component.tsx
329
- import { cn as cn3 } from "dn-react-toolkit/utils";
330
338
  import "react";
331
339
  import { jsx as jsx7 } from "react/jsx-runtime";
332
340
  function createComponent(tag, options) {
333
341
  return function FormComponent({ className, ...props }) {
334
342
  const Tag = tag;
335
- return /* @__PURE__ */ jsx7(Tag, { ...props, className: cn3(options.className, className) });
343
+ return /* @__PURE__ */ jsx7(Tag, { ...props, className: cn(options.className, className) });
336
344
  };
337
345
  }
338
346
 
@@ -538,7 +546,7 @@ var createPostFormPage = ({
538
546
  updateDelay: 500,
539
547
  editor: {
540
548
  attributes: {
541
- class: cn4(textEditorClassName, "pb-[50vh]")
549
+ class: cn(textEditorClassName, "pb-[50vh]")
542
550
  }
543
551
  },
544
552
  attachFile
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
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
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // src/post/thumbnail_picker.tsx
@@ -24,8 +34,17 @@ __export(thumbnail_picker_exports, {
24
34
  });
25
35
  module.exports = __toCommonJS(thumbnail_picker_exports);
26
36
  var import_react_store_input = require("react-store-input");
27
- var import_utils = require("dn-react-toolkit/utils");
28
37
  var import_react = require("react");
38
+
39
+ // src/utils/cn.ts
40
+ function cn(...classes) {
41
+ return classes.filter(Boolean).join(" ").trim();
42
+ }
43
+
44
+ // src/utils/date.ts
45
+ var import_moment_timezone = __toESM(require("moment-timezone"));
46
+
47
+ // src/post/thumbnail_picker.tsx
29
48
  var import_jsx_runtime = require("react/jsx-runtime");
30
49
  function PostThumbnailPicker({
31
50
  store,
@@ -68,7 +87,7 @@ function PostThumbnailPicker({
68
87
  "button",
69
88
  {
70
89
  type: "button",
71
- className: (0, import_utils.cn)(
90
+ className: cn(
72
91
  "border border-neutral-200 rounded-lg overflow-hidden aspect-4/3",
73
92
  thumbnail === url && "border-transparent ring-2 ring-primary"
74
93
  ),