dn-react-router-toolkit 0.7.7 → 0.7.9

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 +5 -5
  2. package/dist/api/create_api_handler.d.ts +5 -5
  3. package/dist/client/env_loader.d.mts +2 -2
  4. package/dist/client/env_loader.d.ts +2 -2
  5. package/dist/client/env_loader.js +2 -12
  6. package/dist/client/env_loader.mjs +2 -2
  7. package/dist/client/file_input.d.mts +3 -2
  8. package/dist/client/file_input.d.ts +3 -2
  9. package/dist/client/file_input.js +30 -37
  10. package/dist/client/file_input.mjs +33 -28
  11. package/dist/client/index.d.mts +1 -0
  12. package/dist/client/index.d.ts +1 -0
  13. package/dist/client/index.js +38 -44
  14. package/dist/client/index.mjs +39 -33
  15. package/dist/client/store_text_editor.d.mts +2 -2
  16. package/dist/client/store_text_editor.d.ts +2 -2
  17. package/dist/client/store_text_editor.js +3 -12
  18. package/dist/client/store_text_editor.mjs +3 -2
  19. package/dist/crud/crud_form.d.mts +5 -4
  20. package/dist/crud/crud_form.d.ts +5 -4
  21. package/dist/crud/crud_form.js +83 -72
  22. package/dist/crud/crud_form.mjs +88 -62
  23. package/dist/crud/crud_form_provider.d.mts +10 -8
  24. package/dist/crud/crud_form_provider.d.ts +10 -8
  25. package/dist/crud/crud_form_provider.js +2 -12
  26. package/dist/crud/crud_form_provider.mjs +6 -3
  27. package/dist/crud/crud_loader.d.mts +1 -1
  28. package/dist/crud/crud_loader.d.ts +1 -1
  29. package/dist/crud/crud_page.d.mts +10 -6
  30. package/dist/crud/crud_page.d.ts +10 -6
  31. package/dist/crud/crud_page.js +281 -409
  32. package/dist/crud/crud_page.mjs +286 -399
  33. package/dist/crud/generate_pages.d.mts +10 -2
  34. package/dist/crud/generate_pages.d.ts +10 -2
  35. package/dist/crud/generate_pages.js +17 -14
  36. package/dist/crud/generate_pages.mjs +17 -4
  37. package/dist/crud/index.d.mts +2 -1
  38. package/dist/crud/index.d.ts +2 -1
  39. package/dist/crud/index.js +299 -404
  40. package/dist/crud/index.mjs +304 -404
  41. package/dist/form/create_form_component.d.mts +3 -2
  42. package/dist/form/create_form_component.d.ts +3 -2
  43. package/dist/form/create_form_component.js +3 -12
  44. package/dist/form/create_form_component.mjs +3 -2
  45. package/dist/form/form_components.d.mts +5 -4
  46. package/dist/form/form_components.d.ts +5 -4
  47. package/dist/form/form_components.js +3 -12
  48. package/dist/form/form_components.mjs +3 -2
  49. package/dist/form/index.d.mts +1 -0
  50. package/dist/form/index.d.ts +1 -0
  51. package/dist/form/index.js +3 -12
  52. package/dist/form/index.mjs +3 -2
  53. package/dist/post/editor_toolbar.d.mts +4 -3
  54. package/dist/post/editor_toolbar.d.ts +4 -3
  55. package/dist/post/editor_toolbar.js +116 -273
  56. package/dist/post/editor_toolbar.mjs +123 -263
  57. package/dist/post/index.d.mts +1 -0
  58. package/dist/post/index.d.ts +1 -0
  59. package/dist/post/index.js +329 -411
  60. package/dist/post/index.mjs +337 -409
  61. package/dist/post/post_form_page.d.mts +5 -4
  62. package/dist/post/post_form_page.d.ts +5 -4
  63. package/dist/post/post_form_page.js +331 -413
  64. package/dist/post/post_form_page.mjs +337 -409
  65. package/dist/post/thumbnail_picker.d.mts +3 -2
  66. package/dist/post/thumbnail_picker.d.ts +3 -2
  67. package/dist/post/thumbnail_picker.js +14 -23
  68. package/dist/post/thumbnail_picker.mjs +14 -13
  69. package/dist/seo/index.d.mts +1 -1
  70. package/dist/seo/index.d.ts +1 -1
  71. package/dist/seo/index.js +2 -2
  72. package/dist/seo/index.mjs +2 -2
  73. package/dist/seo/seo.d.mts +2 -2
  74. package/dist/seo/seo.d.ts +2 -2
  75. package/dist/seo/seo.js +2 -2
  76. package/dist/seo/seo.mjs +2 -2
  77. package/dist/table/buttons.d.mts +2 -2
  78. package/dist/table/buttons.d.ts +2 -2
  79. package/dist/table/buttons.js +42 -57
  80. package/dist/table/buttons.mjs +42 -47
  81. package/dist/table/index.d.mts +1 -0
  82. package/dist/table/index.d.ts +1 -0
  83. package/dist/table/index.js +185 -338
  84. package/dist/table/index.mjs +185 -328
  85. package/dist/table/page.d.mts +5 -4
  86. package/dist/table/page.d.ts +5 -4
  87. package/dist/table/page.js +185 -338
  88. package/dist/table/page.mjs +185 -328
  89. package/dist/table/table.d.mts +5 -4
  90. package/dist/table/table.d.ts +5 -4
  91. package/dist/table/table.js +77 -237
  92. package/dist/table/table.mjs +77 -227
  93. package/package.json +7 -5
@@ -1,5 +1,6 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
1
2
  import { Store } from 'react-store-input';
2
- import React__default, { RefObject } from 'react';
3
+ import { RefObject } from 'react';
3
4
  import { TextEditorController } from 'dn-react-text-editor';
4
5
 
5
6
  declare function PostThumbnailPicker<T extends {
@@ -7,6 +8,6 @@ declare function PostThumbnailPicker<T extends {
7
8
  }>({ store, textEditorRef, }: {
8
9
  store: Store<T>;
9
10
  textEditorRef: RefObject<TextEditorController | null>;
10
- }): React__default.JSX.Element;
11
+ }): react_jsx_runtime.JSX.Element;
11
12
 
12
13
  export { PostThumbnailPicker };
@@ -1,5 +1,6 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
1
2
  import { Store } from 'react-store-input';
2
- import React__default, { RefObject } from 'react';
3
+ import { RefObject } from 'react';
3
4
  import { TextEditorController } from 'dn-react-text-editor';
4
5
 
5
6
  declare function PostThumbnailPicker<T extends {
@@ -7,6 +8,6 @@ declare function PostThumbnailPicker<T extends {
7
8
  }>({ store, textEditorRef, }: {
8
9
  store: Store<T>;
9
10
  textEditorRef: RefObject<TextEditorController | null>;
10
- }): React__default.JSX.Element;
11
+ }): react_jsx_runtime.JSX.Element;
11
12
 
12
13
  export { PostThumbnailPicker };
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
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
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
 
30
20
  // src/post/thumbnail_picker.tsx
@@ -35,7 +25,8 @@ __export(thumbnail_picker_exports, {
35
25
  module.exports = __toCommonJS(thumbnail_picker_exports);
36
26
  var import_react_store_input = require("react-store-input");
37
27
  var import_utils = require("dn-react-toolkit/utils");
38
- var import_react = __toESM(require("react"));
28
+ var import_react = require("react");
29
+ var import_jsx_runtime = require("react/jsx-runtime");
39
30
  function PostThumbnailPicker({
40
31
  store,
41
32
  textEditorRef
@@ -73,10 +64,9 @@ function PostThumbnailPicker({
73
64
  unsubscribe();
74
65
  };
75
66
  }, []);
76
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "grid grid-cols-6 gap-1" }, thumbnails.map((url, index) => /* @__PURE__ */ import_react.default.createElement(
67
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid grid-cols-6 gap-1", children: thumbnails.map((url, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
77
68
  "button",
78
69
  {
79
- key: index,
80
70
  type: "button",
81
71
  className: (0, import_utils.cn)(
82
72
  "border border-neutral-200 rounded-lg overflow-hidden aspect-4/3",
@@ -86,17 +76,18 @@ function PostThumbnailPicker({
86
76
  store.dispatch((state) => {
87
77
  state.thumbnail = url;
88
78
  });
89
- }
79
+ },
80
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
81
+ "img",
82
+ {
83
+ src: url,
84
+ alt: `Thumbnail ${index + 1}`,
85
+ className: "w-full h-full object-cover"
86
+ }
87
+ )
90
88
  },
91
- /* @__PURE__ */ import_react.default.createElement(
92
- "img",
93
- {
94
- src: url,
95
- alt: `Thumbnail ${index + 1}`,
96
- className: "w-full h-full object-cover"
97
- }
98
- )
99
- )));
89
+ index
90
+ )) });
100
91
  }
101
92
  // Annotate the CommonJS export names for ESM import in node:
102
93
  0 && (module.exports = {
@@ -1,7 +1,8 @@
1
1
  // src/post/thumbnail_picker.tsx
2
2
  import { useSelector } from "react-store-input";
3
3
  import { cn } from "dn-react-toolkit/utils";
4
- import React, { useEffect, useState } from "react";
4
+ import { useEffect, useState } from "react";
5
+ import { jsx } from "react/jsx-runtime";
5
6
  function PostThumbnailPicker({
6
7
  store,
7
8
  textEditorRef
@@ -39,10 +40,9 @@ function PostThumbnailPicker({
39
40
  unsubscribe();
40
41
  };
41
42
  }, []);
42
- return /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-6 gap-1" }, thumbnails.map((url, index) => /* @__PURE__ */ React.createElement(
43
+ return /* @__PURE__ */ jsx("div", { className: "grid grid-cols-6 gap-1", children: thumbnails.map((url, index) => /* @__PURE__ */ jsx(
43
44
  "button",
44
45
  {
45
- key: index,
46
46
  type: "button",
47
47
  className: cn(
48
48
  "border border-neutral-200 rounded-lg overflow-hidden aspect-4/3",
@@ -52,17 +52,18 @@ function PostThumbnailPicker({
52
52
  store.dispatch((state) => {
53
53
  state.thumbnail = url;
54
54
  });
55
- }
55
+ },
56
+ children: /* @__PURE__ */ jsx(
57
+ "img",
58
+ {
59
+ src: url,
60
+ alt: `Thumbnail ${index + 1}`,
61
+ className: "w-full h-full object-cover"
62
+ }
63
+ )
56
64
  },
57
- /* @__PURE__ */ React.createElement(
58
- "img",
59
- {
60
- src: url,
61
- alt: `Thumbnail ${index + 1}`,
62
- className: "w-full h-full object-cover"
63
- }
64
- )
65
- )));
65
+ index
66
+ )) });
66
67
  }
67
68
  export {
68
69
  PostThumbnailPicker
@@ -1,4 +1,4 @@
1
1
  export { SEO, SEOImage, configSEO } from './seo.mjs';
2
- import 'react';
2
+ import 'react/jsx-runtime';
3
3
  import 'schema-dts';
4
4
  import 'react-router';
@@ -1,4 +1,4 @@
1
1
  export { SEO, SEOImage, configSEO } from './seo.js';
2
- import 'react';
2
+ import 'react/jsx-runtime';
3
3
  import 'schema-dts';
4
4
  import 'react-router';
package/dist/seo/index.js CHANGED
@@ -46,9 +46,9 @@ __export(seo_exports, {
46
46
  module.exports = __toCommonJS(seo_exports);
47
47
 
48
48
  // src/seo/seo.tsx
49
- var import_react = __toESM(require("react"));
50
49
  var Schema = __toESM(require_schema());
51
50
  var import_react_router = require("react-router");
51
+ var import_jsx_runtime = require("react/jsx-runtime");
52
52
  function configSEO(config) {
53
53
  function create(props) {
54
54
  const canonicalPath = props.canonicalPath;
@@ -290,7 +290,7 @@ function configSEO(config) {
290
290
  })
291
291
  ].filter(Boolean)
292
292
  };
293
- return /* @__PURE__ */ import_react.default.createElement(
293
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
294
294
  "script",
295
295
  {
296
296
  type: "application/ld+json",
@@ -34,8 +34,8 @@ var require_schema = __commonJS({
34
34
 
35
35
  // src/seo/seo.tsx
36
36
  var Schema = __toESM(require_schema());
37
- import React from "react";
38
37
  import { useLoaderData } from "react-router";
38
+ import { jsx } from "react/jsx-runtime";
39
39
  function configSEO(config) {
40
40
  function create(props) {
41
41
  const canonicalPath = props.canonicalPath;
@@ -277,7 +277,7 @@ function configSEO(config) {
277
277
  })
278
278
  ].filter(Boolean)
279
279
  };
280
- return /* @__PURE__ */ React.createElement(
280
+ return /* @__PURE__ */ jsx(
281
281
  "script",
282
282
  {
283
283
  type: "application/ld+json",
@@ -1,4 +1,4 @@
1
- import React__default from 'react';
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as Schema from 'schema-dts';
3
3
  import { MetaFunction } from 'react-router';
4
4
 
@@ -65,7 +65,7 @@ declare function configSEO(config: {
65
65
  thumbnail: SEOImage | null | undefined;
66
66
  };
67
67
  meta: MetaFunction<unknown, Record<string, unknown>>;
68
- StructedData: () => React__default.JSX.Element;
68
+ StructedData: () => react_jsx_runtime.JSX.Element;
69
69
  };
70
70
 
71
71
  export { type SEO, type SEOImage, configSEO };
package/dist/seo/seo.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React__default from 'react';
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as Schema from 'schema-dts';
3
3
  import { MetaFunction } from 'react-router';
4
4
 
@@ -65,7 +65,7 @@ declare function configSEO(config: {
65
65
  thumbnail: SEOImage | null | undefined;
66
66
  };
67
67
  meta: MetaFunction<unknown, Record<string, unknown>>;
68
- StructedData: () => React__default.JSX.Element;
68
+ StructedData: () => react_jsx_runtime.JSX.Element;
69
69
  };
70
70
 
71
71
  export { type SEO, type SEOImage, configSEO };
package/dist/seo/seo.js CHANGED
@@ -44,9 +44,9 @@ __export(seo_exports, {
44
44
  configSEO: () => configSEO
45
45
  });
46
46
  module.exports = __toCommonJS(seo_exports);
47
- var import_react = __toESM(require("react"));
48
47
  var Schema = __toESM(require_schema());
49
48
  var import_react_router = require("react-router");
49
+ var import_jsx_runtime = require("react/jsx-runtime");
50
50
  function configSEO(config) {
51
51
  function create(props) {
52
52
  const canonicalPath = props.canonicalPath;
@@ -288,7 +288,7 @@ function configSEO(config) {
288
288
  })
289
289
  ].filter(Boolean)
290
290
  };
291
- return /* @__PURE__ */ import_react.default.createElement(
291
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
292
292
  "script",
293
293
  {
294
294
  type: "application/ld+json",
package/dist/seo/seo.mjs CHANGED
@@ -34,8 +34,8 @@ var require_schema = __commonJS({
34
34
 
35
35
  // src/seo/seo.tsx
36
36
  var Schema = __toESM(require_schema());
37
- import React from "react";
38
37
  import { useLoaderData } from "react-router";
38
+ import { jsx } from "react/jsx-runtime";
39
39
  function configSEO(config) {
40
40
  function create(props) {
41
41
  const canonicalPath = props.canonicalPath;
@@ -277,7 +277,7 @@ function configSEO(config) {
277
277
  })
278
278
  ].filter(Boolean)
279
279
  };
280
- return /* @__PURE__ */ React.createElement(
280
+ return /* @__PURE__ */ jsx(
281
281
  "script",
282
282
  {
283
283
  type: "application/ld+json",
@@ -1,10 +1,10 @@
1
- import React__default from 'react';
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
 
3
3
  declare function TablePageButtons({ MAX_PAGES_TO_SHOW, total, limit, offset, }: {
4
4
  MAX_PAGES_TO_SHOW: number;
5
5
  total: number;
6
6
  limit: number;
7
7
  offset: number;
8
- }): React__default.JSX.Element;
8
+ }): react_jsx_runtime.JSX.Element;
9
9
 
10
10
  export { TablePageButtons as default };
@@ -1,10 +1,10 @@
1
- import React__default from 'react';
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
 
3
3
  declare function TablePageButtons({ MAX_PAGES_TO_SHOW, total, limit, offset, }: {
4
4
  MAX_PAGES_TO_SHOW: number;
5
5
  total: number;
6
6
  limit: number;
7
7
  offset: number;
8
- }): React__default.JSX.Element;
8
+ }): react_jsx_runtime.JSX.Element;
9
9
 
10
10
  export { TablePageButtons as default };
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
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
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
 
30
20
  // src/table/buttons.tsx
@@ -35,7 +25,7 @@ __export(buttons_exports, {
35
25
  module.exports = __toCommonJS(buttons_exports);
36
26
  var import_utils = require("dn-react-toolkit/utils");
37
27
  var import_react_router = require("react-router");
38
- var import_react = __toESM(require("react"));
28
+ var import_jsx_runtime = require("react/jsx-runtime");
39
29
  function TablePageButtons({
40
30
  MAX_PAGES_TO_SHOW,
41
31
  total,
@@ -48,55 +38,50 @@ function TablePageButtons({
48
38
  const currentPage = Math.floor(offset / limit) + 1;
49
39
  const startButton = (Math.ceil(currentPage / MAX_PAGES_TO_SHOW) - 1) * MAX_PAGES_TO_SHOW;
50
40
  const endButton = Math.min(startButton + MAX_PAGES_TO_SHOW - 1, pages);
51
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, pages > 1 && /* @__PURE__ */ import_react.default.createElement("div", { className: "flex justify-center items-center my-8 gap-4 text-neutral-400" }, startButton > 1 && /* @__PURE__ */ import_react.default.createElement(
52
- import_react_router.Link,
53
- {
54
- to: (() => {
55
- searchParams.set(
56
- "offset",
57
- String((startButton - 1) * limit)
58
- );
59
- return `${pathname}?${searchParams.toString()}`;
60
- })(),
61
- className: "w-10 block text-center transition-colors hover:text-primary"
62
- },
63
- "\uC774\uC804"
64
- ), Array.from({
65
- length: Math.min(
66
- MAX_PAGES_TO_SHOW,
67
- pages - startButton
68
- )
69
- }).map((_, index) => {
70
- return /* @__PURE__ */ import_react.default.createElement(
41
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: pages > 1 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex justify-center items-center my-8 gap-4 text-neutral-400", children: [
42
+ startButton > 1 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
71
43
  import_react_router.Link,
72
44
  {
73
- key: index,
74
45
  to: (() => {
75
- searchParams.set(
76
- "offset",
77
- String((startButton + index) * limit)
78
- );
46
+ searchParams.set("offset", String((startButton - 1) * limit));
79
47
  return `${pathname}?${searchParams.toString()}`;
80
48
  })(),
81
- className: (0, import_utils.cn)(
82
- "w-6 block text-center transition-colors",
83
- currentPage === startButton + index + 1 ? "font-bold text-primary" : "hover:text-primary"
84
- )
85
- },
86
- startButton + index + 1
87
- );
88
- }), endButton < pages && /* @__PURE__ */ import_react.default.createElement(
89
- import_react_router.Link,
90
- {
91
- to: (() => {
92
- searchParams.set(
93
- "offset",
94
- String((endButton + 1) * limit)
95
- );
96
- return `${pathname}?${searchParams.toString()}`;
97
- })(),
98
- className: "w-10 block text-center transition-colors hover:text-primary"
99
- },
100
- "\uB2E4\uC74C"
101
- )));
49
+ className: "w-10 block text-center transition-colors hover:text-primary",
50
+ children: "\uC774\uC804"
51
+ }
52
+ ),
53
+ Array.from({
54
+ length: Math.min(MAX_PAGES_TO_SHOW, pages - startButton)
55
+ }).map((_, index) => {
56
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
57
+ import_react_router.Link,
58
+ {
59
+ to: (() => {
60
+ searchParams.set(
61
+ "offset",
62
+ String((startButton + index) * limit)
63
+ );
64
+ return `${pathname}?${searchParams.toString()}`;
65
+ })(),
66
+ className: (0, import_utils.cn)(
67
+ "w-6 block text-center transition-colors",
68
+ currentPage === startButton + index + 1 ? "font-bold text-primary" : "hover:text-primary"
69
+ ),
70
+ children: startButton + index + 1
71
+ },
72
+ index
73
+ );
74
+ }),
75
+ endButton < pages && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
76
+ import_react_router.Link,
77
+ {
78
+ to: (() => {
79
+ searchParams.set("offset", String((endButton + 1) * limit));
80
+ return `${pathname}?${searchParams.toString()}`;
81
+ })(),
82
+ className: "w-10 block text-center transition-colors hover:text-primary",
83
+ children: "\uB2E4\uC74C"
84
+ }
85
+ )
86
+ ] }) });
102
87
  }
@@ -1,7 +1,7 @@
1
1
  // src/table/buttons.tsx
2
2
  import { cn } from "dn-react-toolkit/utils";
3
3
  import { Link, useLocation, useSearchParams } from "react-router";
4
- import React from "react";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
5
  function TablePageButtons({
6
6
  MAX_PAGES_TO_SHOW,
7
7
  total,
@@ -14,57 +14,52 @@ function TablePageButtons({
14
14
  const currentPage = Math.floor(offset / limit) + 1;
15
15
  const startButton = (Math.ceil(currentPage / MAX_PAGES_TO_SHOW) - 1) * MAX_PAGES_TO_SHOW;
16
16
  const endButton = Math.min(startButton + MAX_PAGES_TO_SHOW - 1, pages);
17
- return /* @__PURE__ */ React.createElement(React.Fragment, null, pages > 1 && /* @__PURE__ */ React.createElement("div", { className: "flex justify-center items-center my-8 gap-4 text-neutral-400" }, startButton > 1 && /* @__PURE__ */ React.createElement(
18
- Link,
19
- {
20
- to: (() => {
21
- searchParams.set(
22
- "offset",
23
- String((startButton - 1) * limit)
24
- );
25
- return `${pathname}?${searchParams.toString()}`;
26
- })(),
27
- className: "w-10 block text-center transition-colors hover:text-primary"
28
- },
29
- "\uC774\uC804"
30
- ), Array.from({
31
- length: Math.min(
32
- MAX_PAGES_TO_SHOW,
33
- pages - startButton
34
- )
35
- }).map((_, index) => {
36
- return /* @__PURE__ */ React.createElement(
17
+ return /* @__PURE__ */ jsx(Fragment, { children: pages > 1 && /* @__PURE__ */ jsxs("div", { className: "flex justify-center items-center my-8 gap-4 text-neutral-400", children: [
18
+ startButton > 1 && /* @__PURE__ */ jsx(
37
19
  Link,
38
20
  {
39
- key: index,
40
21
  to: (() => {
41
- searchParams.set(
42
- "offset",
43
- String((startButton + index) * limit)
44
- );
22
+ searchParams.set("offset", String((startButton - 1) * limit));
45
23
  return `${pathname}?${searchParams.toString()}`;
46
24
  })(),
47
- className: cn(
48
- "w-6 block text-center transition-colors",
49
- currentPage === startButton + index + 1 ? "font-bold text-primary" : "hover:text-primary"
50
- )
51
- },
52
- startButton + index + 1
53
- );
54
- }), endButton < pages && /* @__PURE__ */ React.createElement(
55
- Link,
56
- {
57
- to: (() => {
58
- searchParams.set(
59
- "offset",
60
- String((endButton + 1) * limit)
61
- );
62
- return `${pathname}?${searchParams.toString()}`;
63
- })(),
64
- className: "w-10 block text-center transition-colors hover:text-primary"
65
- },
66
- "\uB2E4\uC74C"
67
- )));
25
+ className: "w-10 block text-center transition-colors hover:text-primary",
26
+ children: "\uC774\uC804"
27
+ }
28
+ ),
29
+ Array.from({
30
+ length: Math.min(MAX_PAGES_TO_SHOW, pages - startButton)
31
+ }).map((_, index) => {
32
+ return /* @__PURE__ */ jsx(
33
+ Link,
34
+ {
35
+ to: (() => {
36
+ searchParams.set(
37
+ "offset",
38
+ String((startButton + index) * limit)
39
+ );
40
+ return `${pathname}?${searchParams.toString()}`;
41
+ })(),
42
+ className: cn(
43
+ "w-6 block text-center transition-colors",
44
+ currentPage === startButton + index + 1 ? "font-bold text-primary" : "hover:text-primary"
45
+ ),
46
+ children: startButton + index + 1
47
+ },
48
+ index
49
+ );
50
+ }),
51
+ endButton < pages && /* @__PURE__ */ jsx(
52
+ Link,
53
+ {
54
+ to: (() => {
55
+ searchParams.set("offset", String((endButton + 1) * limit));
56
+ return `${pathname}?${searchParams.toString()}`;
57
+ })(),
58
+ className: "w-10 block text-center transition-colors hover:text-primary",
59
+ children: "\uB2E4\uC74C"
60
+ }
61
+ )
62
+ ] }) });
68
63
  }
69
64
  export {
70
65
  TablePageButtons as default
@@ -6,4 +6,5 @@ export { OrderedTableProps, Table, TableColumnOptions, TableColumnProps } from '
6
6
  import 'drizzle-orm';
7
7
  import 'drizzle-orm/pg-core';
8
8
  import 'react-router';
9
+ import 'react/jsx-runtime';
9
10
  import 'react';
@@ -6,4 +6,5 @@ export { OrderedTableProps, Table, TableColumnOptions, TableColumnProps } from '
6
6
  import 'drizzle-orm';
7
7
  import 'drizzle-orm/pg-core';
8
8
  import 'react-router';
9
+ import 'react/jsx-runtime';
9
10
  import 'react';