dn-react-router-toolkit 0.9.0 → 0.9.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.
Files changed (93) hide show
  1. package/dist/api/create_api_handler.d.mts +2 -2
  2. package/dist/api/create_api_handler.d.ts +2 -2
  3. package/dist/api/create_api_handler.js +55 -52
  4. package/dist/api/create_api_handler.mjs +61 -59
  5. package/dist/api/create_handler.d.mts +5 -5
  6. package/dist/api/create_handler.d.ts +5 -5
  7. package/dist/api/create_handler.js +41 -44
  8. package/dist/api/create_handler.mjs +41 -44
  9. package/dist/api/index.d.mts +4 -3
  10. package/dist/api/index.d.ts +4 -3
  11. package/dist/api/index.js +118 -102
  12. package/dist/api/index.mjs +130 -109
  13. package/dist/api/item_api_handler.d.mts +4 -3
  14. package/dist/api/item_api_handler.d.ts +4 -3
  15. package/dist/api/item_api_handler.js +22 -6
  16. package/dist/api/item_api_handler.mjs +28 -6
  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 +6 -2
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/utils/cn.ts
21
+ var cn_exports = {};
22
+ __export(cn_exports, {
23
+ cn: () => cn
24
+ });
25
+ module.exports = __toCommonJS(cn_exports);
26
+ function cn(...classes) {
27
+ return classes.filter(Boolean).join(" ").trim();
28
+ }
29
+ // Annotate the CommonJS export names for ESM import in node:
30
+ 0 && (module.exports = {
31
+ cn
32
+ });
@@ -0,0 +1,7 @@
1
+ // src/utils/cn.ts
2
+ function cn(...classes) {
3
+ return classes.filter(Boolean).join(" ").trim();
4
+ }
5
+ export {
6
+ cn
7
+ };
@@ -0,0 +1,5 @@
1
+ export { default as moment } from 'moment-timezone';
2
+
3
+ declare const formatHumanDateTime: (value: string | Date) => string;
4
+
5
+ export { formatHumanDateTime };
@@ -0,0 +1,5 @@
1
+ export { default as moment } from 'moment-timezone';
2
+
3
+ declare const formatHumanDateTime: (value: string | Date) => string;
4
+
5
+ export { formatHumanDateTime };
@@ -0,0 +1,65 @@
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/utils/date.ts
31
+ var date_exports = {};
32
+ __export(date_exports, {
33
+ formatHumanDateTime: () => formatHumanDateTime,
34
+ moment: () => import_moment_timezone.default
35
+ });
36
+ module.exports = __toCommonJS(date_exports);
37
+ var import_moment_timezone = __toESM(require("moment-timezone"));
38
+ var formatHumanDateTime = (value) => {
39
+ const date = (0, import_moment_timezone.default)(value).tz("Asia/Seoul");
40
+ const now = (0, import_moment_timezone.default)().tz("Asia/Seoul");
41
+ if (date.isAfter(now.clone().subtract(1, "minute"))) {
42
+ return "\uBC29\uAE08 \uC804";
43
+ }
44
+ if (date.isAfter(now.clone().subtract(1, "hour"))) {
45
+ const diff = now.diff(date, "minute");
46
+ return `${diff}\uBD84 \uC804`;
47
+ }
48
+ if (date.isAfter(now.clone().subtract(6, "hours"))) {
49
+ const diff = now.diff(date, "hour");
50
+ return `${diff}\uC2DC\uAC04 \uC804`;
51
+ }
52
+ if (date.isAfter(now.clone().subtract(1, "week"))) {
53
+ const diff = now.diff(date, "day");
54
+ return `${diff}\uC77C \uC804`;
55
+ }
56
+ if (date.isSame(now, "year")) {
57
+ return date.format("M\uC6D4 D\uC77C");
58
+ }
59
+ return date.format("YYYY\uB144 M\uC6D4 D\uC77C");
60
+ };
61
+ // Annotate the CommonJS export names for ESM import in node:
62
+ 0 && (module.exports = {
63
+ formatHumanDateTime,
64
+ moment
65
+ });
@@ -0,0 +1,29 @@
1
+ // src/utils/date.ts
2
+ import moment from "moment-timezone";
3
+ var formatHumanDateTime = (value) => {
4
+ const date = moment(value).tz("Asia/Seoul");
5
+ const now = moment().tz("Asia/Seoul");
6
+ if (date.isAfter(now.clone().subtract(1, "minute"))) {
7
+ return "\uBC29\uAE08 \uC804";
8
+ }
9
+ if (date.isAfter(now.clone().subtract(1, "hour"))) {
10
+ const diff = now.diff(date, "minute");
11
+ return `${diff}\uBD84 \uC804`;
12
+ }
13
+ if (date.isAfter(now.clone().subtract(6, "hours"))) {
14
+ const diff = now.diff(date, "hour");
15
+ return `${diff}\uC2DC\uAC04 \uC804`;
16
+ }
17
+ if (date.isAfter(now.clone().subtract(1, "week"))) {
18
+ const diff = now.diff(date, "day");
19
+ return `${diff}\uC77C \uC804`;
20
+ }
21
+ if (date.isSame(now, "year")) {
22
+ return date.format("M\uC6D4 D\uC77C");
23
+ }
24
+ return date.format("YYYY\uB144 M\uC6D4 D\uC77C");
25
+ };
26
+ export {
27
+ formatHumanDateTime,
28
+ moment
29
+ };
@@ -0,0 +1,7 @@
1
+ export { cn } from './cn.mjs';
2
+ export { formatHumanDateTime } from './date.mjs';
3
+ export { singleton } from './singleton.mjs';
4
+ export { toSlug } from './slug.mjs';
5
+ export { sleep } from './sleep.mjs';
6
+ export { Korean } from './korean.mjs';
7
+ export { default as moment } from 'moment-timezone';
@@ -0,0 +1,7 @@
1
+ export { cn } from './cn.js';
2
+ export { formatHumanDateTime } from './date.js';
3
+ export { singleton } from './singleton.js';
4
+ export { toSlug } from './slug.js';
5
+ export { sleep } from './sleep.js';
6
+ export { Korean } from './korean.js';
7
+ export { default as moment } from 'moment-timezone';
@@ -0,0 +1,116 @@
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/utils/index.ts
31
+ var utils_exports = {};
32
+ __export(utils_exports, {
33
+ Korean: () => Korean,
34
+ cn: () => cn,
35
+ formatHumanDateTime: () => formatHumanDateTime,
36
+ moment: () => import_moment_timezone.default,
37
+ singleton: () => singleton,
38
+ sleep: () => sleep,
39
+ toSlug: () => toSlug
40
+ });
41
+ module.exports = __toCommonJS(utils_exports);
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
+ var formatHumanDateTime = (value) => {
51
+ const date = (0, import_moment_timezone.default)(value).tz("Asia/Seoul");
52
+ const now = (0, import_moment_timezone.default)().tz("Asia/Seoul");
53
+ if (date.isAfter(now.clone().subtract(1, "minute"))) {
54
+ return "\uBC29\uAE08 \uC804";
55
+ }
56
+ if (date.isAfter(now.clone().subtract(1, "hour"))) {
57
+ const diff = now.diff(date, "minute");
58
+ return `${diff}\uBD84 \uC804`;
59
+ }
60
+ if (date.isAfter(now.clone().subtract(6, "hours"))) {
61
+ const diff = now.diff(date, "hour");
62
+ return `${diff}\uC2DC\uAC04 \uC804`;
63
+ }
64
+ if (date.isAfter(now.clone().subtract(1, "week"))) {
65
+ const diff = now.diff(date, "day");
66
+ return `${diff}\uC77C \uC804`;
67
+ }
68
+ if (date.isSame(now, "year")) {
69
+ return date.format("M\uC6D4 D\uC77C");
70
+ }
71
+ return date.format("YYYY\uB144 M\uC6D4 D\uC77C");
72
+ };
73
+
74
+ // src/utils/singleton.ts
75
+ function singleton(name, fn) {
76
+ const globalAny = globalThis;
77
+ globalAny.__singletons = globalAny.__singletons || {};
78
+ if (!globalAny.__singletons[name]) {
79
+ globalAny.__singletons[name] = fn();
80
+ }
81
+ return globalAny.__singletons[name];
82
+ }
83
+
84
+ // src/utils/slug.ts
85
+ var toSlug = (str) => {
86
+ return str.toLowerCase().replace(/[^a-zA-Z0-9가-힣ㄱ-ㅎㅏ-ㅣ]+/g, "-").replace(/^-|-$/g, "");
87
+ };
88
+
89
+ // src/utils/sleep.ts
90
+ var sleep = (ms) => {
91
+ return new Promise((resolve) => setTimeout(resolve, ms));
92
+ };
93
+
94
+ // src/utils/korean.ts
95
+ var Korean = class _Korean {
96
+ static hasFinalConsonant(word) {
97
+ if (!word) return false;
98
+ const lastChar = word[word.length - 1];
99
+ const code = lastChar.charCodeAt(0);
100
+ if (code < 44032 || code > 55203) return false;
101
+ return (code - 44032) % 28 !== 0;
102
+ }
103
+ static with(word, [withFinal, withoutFinal]) {
104
+ return word + (_Korean.hasFinalConsonant(word) ? withFinal : withoutFinal);
105
+ }
106
+ };
107
+ // Annotate the CommonJS export names for ESM import in node:
108
+ 0 && (module.exports = {
109
+ Korean,
110
+ cn,
111
+ formatHumanDateTime,
112
+ moment,
113
+ singleton,
114
+ sleep,
115
+ toSlug
116
+ });
@@ -0,0 +1,73 @@
1
+ // src/utils/cn.ts
2
+ function cn(...classes) {
3
+ return classes.filter(Boolean).join(" ").trim();
4
+ }
5
+
6
+ // src/utils/date.ts
7
+ import moment from "moment-timezone";
8
+ var formatHumanDateTime = (value) => {
9
+ const date = moment(value).tz("Asia/Seoul");
10
+ const now = moment().tz("Asia/Seoul");
11
+ if (date.isAfter(now.clone().subtract(1, "minute"))) {
12
+ return "\uBC29\uAE08 \uC804";
13
+ }
14
+ if (date.isAfter(now.clone().subtract(1, "hour"))) {
15
+ const diff = now.diff(date, "minute");
16
+ return `${diff}\uBD84 \uC804`;
17
+ }
18
+ if (date.isAfter(now.clone().subtract(6, "hours"))) {
19
+ const diff = now.diff(date, "hour");
20
+ return `${diff}\uC2DC\uAC04 \uC804`;
21
+ }
22
+ if (date.isAfter(now.clone().subtract(1, "week"))) {
23
+ const diff = now.diff(date, "day");
24
+ return `${diff}\uC77C \uC804`;
25
+ }
26
+ if (date.isSame(now, "year")) {
27
+ return date.format("M\uC6D4 D\uC77C");
28
+ }
29
+ return date.format("YYYY\uB144 M\uC6D4 D\uC77C");
30
+ };
31
+
32
+ // src/utils/singleton.ts
33
+ function singleton(name, fn) {
34
+ const globalAny = globalThis;
35
+ globalAny.__singletons = globalAny.__singletons || {};
36
+ if (!globalAny.__singletons[name]) {
37
+ globalAny.__singletons[name] = fn();
38
+ }
39
+ return globalAny.__singletons[name];
40
+ }
41
+
42
+ // src/utils/slug.ts
43
+ var toSlug = (str) => {
44
+ return str.toLowerCase().replace(/[^a-zA-Z0-9가-힣ㄱ-ㅎㅏ-ㅣ]+/g, "-").replace(/^-|-$/g, "");
45
+ };
46
+
47
+ // src/utils/sleep.ts
48
+ var sleep = (ms) => {
49
+ return new Promise((resolve) => setTimeout(resolve, ms));
50
+ };
51
+
52
+ // src/utils/korean.ts
53
+ var Korean = class _Korean {
54
+ static hasFinalConsonant(word) {
55
+ if (!word) return false;
56
+ const lastChar = word[word.length - 1];
57
+ const code = lastChar.charCodeAt(0);
58
+ if (code < 44032 || code > 55203) return false;
59
+ return (code - 44032) % 28 !== 0;
60
+ }
61
+ static with(word, [withFinal, withoutFinal]) {
62
+ return word + (_Korean.hasFinalConsonant(word) ? withFinal : withoutFinal);
63
+ }
64
+ };
65
+ export {
66
+ Korean,
67
+ cn,
68
+ formatHumanDateTime,
69
+ moment,
70
+ singleton,
71
+ sleep,
72
+ toSlug
73
+ };
@@ -0,0 +1,6 @@
1
+ declare class Korean {
2
+ static hasFinalConsonant(word: string): boolean;
3
+ static with(word: string, [withFinal, withoutFinal]: [string, string]): string;
4
+ }
5
+
6
+ export { Korean };
@@ -0,0 +1,6 @@
1
+ declare class Korean {
2
+ static hasFinalConsonant(word: string): boolean;
3
+ static with(word: string, [withFinal, withoutFinal]: [string, string]): string;
4
+ }
5
+
6
+ export { Korean };
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/utils/korean.ts
21
+ var korean_exports = {};
22
+ __export(korean_exports, {
23
+ Korean: () => Korean
24
+ });
25
+ module.exports = __toCommonJS(korean_exports);
26
+ var Korean = class _Korean {
27
+ static hasFinalConsonant(word) {
28
+ if (!word) return false;
29
+ const lastChar = word[word.length - 1];
30
+ const code = lastChar.charCodeAt(0);
31
+ if (code < 44032 || code > 55203) return false;
32
+ return (code - 44032) % 28 !== 0;
33
+ }
34
+ static with(word, [withFinal, withoutFinal]) {
35
+ return word + (_Korean.hasFinalConsonant(word) ? withFinal : withoutFinal);
36
+ }
37
+ };
38
+ // Annotate the CommonJS export names for ESM import in node:
39
+ 0 && (module.exports = {
40
+ Korean
41
+ });
@@ -0,0 +1,16 @@
1
+ // src/utils/korean.ts
2
+ var Korean = class _Korean {
3
+ static hasFinalConsonant(word) {
4
+ if (!word) return false;
5
+ const lastChar = word[word.length - 1];
6
+ const code = lastChar.charCodeAt(0);
7
+ if (code < 44032 || code > 55203) return false;
8
+ return (code - 44032) % 28 !== 0;
9
+ }
10
+ static with(word, [withFinal, withoutFinal]) {
11
+ return word + (_Korean.hasFinalConsonant(word) ? withFinal : withoutFinal);
12
+ }
13
+ };
14
+ export {
15
+ Korean
16
+ };
@@ -0,0 +1,3 @@
1
+ declare function singleton<T>(name: string, fn: () => T): T;
2
+
3
+ export { singleton };
@@ -0,0 +1,3 @@
1
+ declare function singleton<T>(name: string, fn: () => T): T;
2
+
3
+ export { singleton };
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/utils/singleton.ts
21
+ var singleton_exports = {};
22
+ __export(singleton_exports, {
23
+ singleton: () => singleton
24
+ });
25
+ module.exports = __toCommonJS(singleton_exports);
26
+ function singleton(name, fn) {
27
+ const globalAny = globalThis;
28
+ globalAny.__singletons = globalAny.__singletons || {};
29
+ if (!globalAny.__singletons[name]) {
30
+ globalAny.__singletons[name] = fn();
31
+ }
32
+ return globalAny.__singletons[name];
33
+ }
34
+ // Annotate the CommonJS export names for ESM import in node:
35
+ 0 && (module.exports = {
36
+ singleton
37
+ });
@@ -0,0 +1,12 @@
1
+ // src/utils/singleton.ts
2
+ function singleton(name, fn) {
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
+ }
10
+ export {
11
+ singleton
12
+ };
@@ -0,0 +1,3 @@
1
+ declare const sleep: (ms: number) => Promise<unknown>;
2
+
3
+ export { sleep };
@@ -0,0 +1,3 @@
1
+ declare const sleep: (ms: number) => Promise<unknown>;
2
+
3
+ export { sleep };
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/utils/sleep.ts
21
+ var sleep_exports = {};
22
+ __export(sleep_exports, {
23
+ sleep: () => sleep
24
+ });
25
+ module.exports = __toCommonJS(sleep_exports);
26
+ var sleep = (ms) => {
27
+ return new Promise((resolve) => setTimeout(resolve, ms));
28
+ };
29
+ // Annotate the CommonJS export names for ESM import in node:
30
+ 0 && (module.exports = {
31
+ sleep
32
+ });
@@ -0,0 +1,7 @@
1
+ // src/utils/sleep.ts
2
+ var sleep = (ms) => {
3
+ return new Promise((resolve) => setTimeout(resolve, ms));
4
+ };
5
+ export {
6
+ sleep
7
+ };
@@ -0,0 +1,3 @@
1
+ declare const toSlug: (str: string) => string;
2
+
3
+ export { toSlug };
@@ -0,0 +1,3 @@
1
+ declare const toSlug: (str: string) => string;
2
+
3
+ export { toSlug };
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/utils/slug.ts
21
+ var slug_exports = {};
22
+ __export(slug_exports, {
23
+ toSlug: () => toSlug
24
+ });
25
+ module.exports = __toCommonJS(slug_exports);
26
+ var toSlug = (str) => {
27
+ return str.toLowerCase().replace(/[^a-zA-Z0-9가-힣ㄱ-ㅎㅏ-ㅣ]+/g, "-").replace(/^-|-$/g, "");
28
+ };
29
+ // Annotate the CommonJS export names for ESM import in node:
30
+ 0 && (module.exports = {
31
+ toSlug
32
+ });
@@ -0,0 +1,7 @@
1
+ // src/utils/slug.ts
2
+ var toSlug = (str) => {
3
+ return str.toLowerCase().replace(/[^a-zA-Z0-9가-힣ㄱ-ㅎㅏ-ㅣ]+/g, "-").replace(/^-|-$/g, "");
4
+ };
5
+ export {
6
+ toSlug
7
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dn-react-router-toolkit",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "types": "./dist/index.d.ts",
5
5
  "main": "./dist/index.mjs",
6
6
  "module": "./dist/index.js",
@@ -88,7 +88,11 @@
88
88
  "dependencies": {
89
89
  "cookie": "^1.1.1",
90
90
  "dn-react-text-editor": "^0.3.9",
91
- "dn-react-toolkit": "^0.2.59",
91
+ "gw-auth": "^0.1.1",
92
+ "gw-file": "^0.1.1",
93
+ "gw-response": "^0.1.7",
94
+ "gw-result": "^0.1.7",
95
+ "moment-timezone": "^0.6.1",
92
96
  "pg": "^8.19.0",
93
97
  "react-icons": "^5.5.0",
94
98
  "react-store-input": "^0.2.1",