dn-react-router-toolkit 0.7.7 → 0.7.8

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 (91) 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 +74 -72
  22. package/dist/crud/crud_form.mjs +79 -62
  23. package/dist/crud/crud_form_provider.d.mts +9 -7
  24. package/dist/crud/crud_form_provider.d.ts +9 -7
  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_page.d.mts +10 -6
  28. package/dist/crud/crud_page.d.ts +10 -6
  29. package/dist/crud/crud_page.js +272 -409
  30. package/dist/crud/crud_page.mjs +277 -399
  31. package/dist/crud/generate_pages.d.mts +10 -2
  32. package/dist/crud/generate_pages.d.ts +10 -2
  33. package/dist/crud/generate_pages.js +17 -14
  34. package/dist/crud/generate_pages.mjs +17 -4
  35. package/dist/crud/index.d.mts +2 -1
  36. package/dist/crud/index.d.ts +2 -1
  37. package/dist/crud/index.js +290 -404
  38. package/dist/crud/index.mjs +295 -404
  39. package/dist/form/create_form_component.d.mts +3 -2
  40. package/dist/form/create_form_component.d.ts +3 -2
  41. package/dist/form/create_form_component.js +3 -12
  42. package/dist/form/create_form_component.mjs +3 -2
  43. package/dist/form/form_components.d.mts +5 -4
  44. package/dist/form/form_components.d.ts +5 -4
  45. package/dist/form/form_components.js +3 -12
  46. package/dist/form/form_components.mjs +3 -2
  47. package/dist/form/index.d.mts +1 -0
  48. package/dist/form/index.d.ts +1 -0
  49. package/dist/form/index.js +3 -12
  50. package/dist/form/index.mjs +3 -2
  51. package/dist/post/editor_toolbar.d.mts +4 -3
  52. package/dist/post/editor_toolbar.d.ts +4 -3
  53. package/dist/post/editor_toolbar.js +116 -273
  54. package/dist/post/editor_toolbar.mjs +123 -263
  55. package/dist/post/index.d.mts +1 -0
  56. package/dist/post/index.d.ts +1 -0
  57. package/dist/post/index.js +329 -411
  58. package/dist/post/index.mjs +337 -409
  59. package/dist/post/post_form_page.d.mts +5 -4
  60. package/dist/post/post_form_page.d.ts +5 -4
  61. package/dist/post/post_form_page.js +331 -413
  62. package/dist/post/post_form_page.mjs +337 -409
  63. package/dist/post/thumbnail_picker.d.mts +3 -2
  64. package/dist/post/thumbnail_picker.d.ts +3 -2
  65. package/dist/post/thumbnail_picker.js +14 -23
  66. package/dist/post/thumbnail_picker.mjs +14 -13
  67. package/dist/seo/index.d.mts +1 -1
  68. package/dist/seo/index.d.ts +1 -1
  69. package/dist/seo/index.js +2 -2
  70. package/dist/seo/index.mjs +2 -2
  71. package/dist/seo/seo.d.mts +2 -2
  72. package/dist/seo/seo.d.ts +2 -2
  73. package/dist/seo/seo.js +2 -2
  74. package/dist/seo/seo.mjs +2 -2
  75. package/dist/table/buttons.d.mts +2 -2
  76. package/dist/table/buttons.d.ts +2 -2
  77. package/dist/table/buttons.js +42 -57
  78. package/dist/table/buttons.mjs +42 -47
  79. package/dist/table/index.d.mts +1 -0
  80. package/dist/table/index.d.ts +1 -0
  81. package/dist/table/index.js +185 -338
  82. package/dist/table/index.mjs +185 -328
  83. package/dist/table/page.d.mts +5 -4
  84. package/dist/table/page.d.ts +5 -4
  85. package/dist/table/page.js +185 -338
  86. package/dist/table/page.mjs +185 -328
  87. package/dist/table/table.d.mts +5 -4
  88. package/dist/table/table.d.ts +5 -4
  89. package/dist/table/table.js +77 -237
  90. package/dist/table/table.mjs +77 -227
  91. package/package.json +7 -5
@@ -1,4 +1,4 @@
1
- import { Table, InferInsertModel, SQLWrapper } from 'drizzle-orm';
1
+ import { Table, InferSelectModel, SQLWrapper } from 'drizzle-orm';
2
2
  import { ActionFunctionArgs, LoaderFunctionArgs } from 'react-router';
3
3
  import { TableRepository } from '../table/repository.mjs';
4
4
  import { WithAuthHandler } from '../auth/with_auth.mjs';
@@ -10,13 +10,13 @@ type APIHandlerOptions<T extends Table, TSelect> = {
10
10
  withAuthAction: WithAuthHandler<ActionFunctionArgs>;
11
11
  repository: TableRepository<T, TSelect>;
12
12
  validators?: {
13
- [K in keyof InferInsertModel<T>]?: {
14
- validate?: (value?: InferInsertModel<T>[K]) => boolean;
15
- message?: (value?: InferInsertModel<T>[K]) => string;
13
+ [K in keyof InferSelectModel<T>]?: {
14
+ validate?: (value?: InferSelectModel<T>[K]) => boolean;
15
+ message?: (value?: InferSelectModel<T>[K]) => string;
16
16
  };
17
17
  };
18
18
  existingConditions?: {
19
- [K in keyof InferInsertModel<T>]?: (value: InferInsertModel<T>[K]) => SQLWrapper;
19
+ [K in keyof InferSelectModel<T>]?: (value: InferSelectModel<T>[K]) => SQLWrapper;
20
20
  };
21
21
  injectUserId?: boolean;
22
22
  roles?: string[];
@@ -1,4 +1,4 @@
1
- import { Table, InferInsertModel, SQLWrapper } from 'drizzle-orm';
1
+ import { Table, InferSelectModel, SQLWrapper } from 'drizzle-orm';
2
2
  import { ActionFunctionArgs, LoaderFunctionArgs } from 'react-router';
3
3
  import { TableRepository } from '../table/repository.js';
4
4
  import { WithAuthHandler } from '../auth/with_auth.js';
@@ -10,13 +10,13 @@ type APIHandlerOptions<T extends Table, TSelect> = {
10
10
  withAuthAction: WithAuthHandler<ActionFunctionArgs>;
11
11
  repository: TableRepository<T, TSelect>;
12
12
  validators?: {
13
- [K in keyof InferInsertModel<T>]?: {
14
- validate?: (value?: InferInsertModel<T>[K]) => boolean;
15
- message?: (value?: InferInsertModel<T>[K]) => string;
13
+ [K in keyof InferSelectModel<T>]?: {
14
+ validate?: (value?: InferSelectModel<T>[K]) => boolean;
15
+ message?: (value?: InferSelectModel<T>[K]) => string;
16
16
  };
17
17
  };
18
18
  existingConditions?: {
19
- [K in keyof InferInsertModel<T>]?: (value: InferInsertModel<T>[K]) => SQLWrapper;
19
+ [K in keyof InferSelectModel<T>]?: (value: InferSelectModel<T>[K]) => SQLWrapper;
20
20
  };
21
21
  injectUserId?: boolean;
22
22
  roles?: string[];
@@ -1,7 +1,7 @@
1
- import React__default from 'react';
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
 
3
3
  declare function EnvLoader({ dataKey }: {
4
4
  dataKey?: string;
5
- }): React__default.JSX.Element | undefined;
5
+ }): react_jsx_runtime.JSX.Element | undefined;
6
6
 
7
7
  export { EnvLoader };
@@ -1,7 +1,7 @@
1
- import React__default from 'react';
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
 
3
3
  declare function EnvLoader({ dataKey }: {
4
4
  dataKey?: string;
5
- }): React__default.JSX.Element | undefined;
5
+ }): react_jsx_runtime.JSX.Element | undefined;
6
6
 
7
7
  export { EnvLoader };
@@ -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/client/env_loader.tsx
@@ -33,14 +23,14 @@ __export(env_loader_exports, {
33
23
  EnvLoader: () => EnvLoader
34
24
  });
35
25
  module.exports = __toCommonJS(env_loader_exports);
36
- var import_react = __toESM(require("react"));
37
26
  var import_react_router = require("react-router");
27
+ var import_jsx_runtime = require("react/jsx-runtime");
38
28
  function EnvLoader({ dataKey = "ENV" }) {
39
29
  const data = (0, import_react_router.useRouteLoaderData)("root");
40
30
  if (!data) {
41
31
  return;
42
32
  }
43
- return /* @__PURE__ */ import_react.default.createElement(
33
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
44
34
  "script",
45
35
  {
46
36
  dangerouslySetInnerHTML: {
@@ -1,12 +1,12 @@
1
1
  // src/client/env_loader.tsx
2
- import React from "react";
3
2
  import { useRouteLoaderData } from "react-router";
3
+ import { jsx } from "react/jsx-runtime";
4
4
  function EnvLoader({ dataKey = "ENV" }) {
5
5
  const data = useRouteLoaderData("root");
6
6
  if (!data) {
7
7
  return;
8
8
  }
9
- return /* @__PURE__ */ React.createElement(
9
+ return /* @__PURE__ */ jsx(
10
10
  "script",
11
11
  {
12
12
  dangerouslySetInnerHTML: {
@@ -1,10 +1,11 @@
1
- import React__default, { DetailedHTMLProps, InputHTMLAttributes, Ref, ChangeEvent } from 'react';
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { DetailedHTMLProps, InputHTMLAttributes, Ref, ChangeEvent } from 'react';
2
3
 
3
4
  type Props = Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "onChange"> & {
4
5
  buttonRef?: Ref<HTMLButtonElement>;
5
6
  } & {
6
7
  onChange?: (event: ChangeEvent<HTMLInputElement>) => void | Promise<void>;
7
8
  };
8
- declare function FileInput({ buttonRef, className, ref, children, onClick, onChange, ...props }: Props): React__default.JSX.Element;
9
+ declare function FileInput({ buttonRef, className, ref, children, onClick, onChange, ...props }: Props): react_jsx_runtime.JSX.Element;
9
10
 
10
11
  export { FileInput };
@@ -1,10 +1,11 @@
1
- import React__default, { DetailedHTMLProps, InputHTMLAttributes, Ref, ChangeEvent } from 'react';
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { DetailedHTMLProps, InputHTMLAttributes, Ref, ChangeEvent } from 'react';
2
3
 
3
4
  type Props = Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "onChange"> & {
4
5
  buttonRef?: Ref<HTMLButtonElement>;
5
6
  } & {
6
7
  onChange?: (event: ChangeEvent<HTMLInputElement>) => void | Promise<void>;
7
8
  };
8
- declare function FileInput({ buttonRef, className, ref, children, onClick, onChange, ...props }: Props): React__default.JSX.Element;
9
+ declare function FileInput({ buttonRef, className, ref, children, onClick, onChange, ...props }: Props): react_jsx_runtime.JSX.Element;
9
10
 
10
11
  export { FileInput };
@@ -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/client/file_input.tsx
@@ -34,7 +24,7 @@ __export(file_input_exports, {
34
24
  });
35
25
  module.exports = __toCommonJS(file_input_exports);
36
26
  var import_react = require("react");
37
- var import_react2 = __toESM(require("react"));
27
+ var import_jsx_runtime = require("react/jsx-runtime");
38
28
  function FileInput({
39
29
  buttonRef,
40
30
  className,
@@ -44,35 +34,38 @@ function FileInput({
44
34
  onChange,
45
35
  ...props
46
36
  }) {
47
- const inputRef = import_react2.default.useRef(null);
48
- return /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement(
49
- "button",
50
- {
51
- ref: buttonRef,
52
- className,
53
- type: "button",
54
- onClick: () => {
55
- inputRef.current?.click();
37
+ const inputRef = (0, import_react.useRef)(null);
38
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
39
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
40
+ "button",
41
+ {
42
+ ref: buttonRef,
43
+ className,
44
+ type: "button",
45
+ onClick: () => {
46
+ inputRef.current?.click();
47
+ },
48
+ children
56
49
  }
57
- },
58
- children
59
- ), /* @__PURE__ */ import_react2.default.createElement(
60
- "input",
61
- {
62
- ...props,
63
- type: "file",
64
- ref: inputRef,
65
- style: {
66
- display: "none"
67
- },
68
- onChange: async (e) => {
69
- await onChange?.(e);
70
- if (inputRef.current) {
71
- inputRef.current.value = "";
50
+ ),
51
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
52
+ "input",
53
+ {
54
+ ...props,
55
+ type: "file",
56
+ ref: inputRef,
57
+ style: {
58
+ display: "none"
59
+ },
60
+ onChange: async (e) => {
61
+ await onChange?.(e);
62
+ if (inputRef.current) {
63
+ inputRef.current.value = "";
64
+ }
72
65
  }
73
66
  }
74
- }
75
- ));
67
+ )
68
+ ] });
76
69
  }
77
70
  // Annotate the CommonJS export names for ESM import in node:
78
71
  0 && (module.exports = {
@@ -1,6 +1,8 @@
1
1
  // src/client/file_input.tsx
2
- import "react";
3
- import React from "react";
2
+ import {
3
+ useRef
4
+ } from "react";
5
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
6
  function FileInput({
5
7
  buttonRef,
6
8
  className,
@@ -10,35 +12,38 @@ function FileInput({
10
12
  onChange,
11
13
  ...props
12
14
  }) {
13
- const inputRef = React.useRef(null);
14
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
15
- "button",
16
- {
17
- ref: buttonRef,
18
- className,
19
- type: "button",
20
- onClick: () => {
21
- inputRef.current?.click();
15
+ const inputRef = useRef(null);
16
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
17
+ /* @__PURE__ */ jsx(
18
+ "button",
19
+ {
20
+ ref: buttonRef,
21
+ className,
22
+ type: "button",
23
+ onClick: () => {
24
+ inputRef.current?.click();
25
+ },
26
+ children
22
27
  }
23
- },
24
- children
25
- ), /* @__PURE__ */ React.createElement(
26
- "input",
27
- {
28
- ...props,
29
- type: "file",
30
- ref: inputRef,
31
- style: {
32
- display: "none"
33
- },
34
- onChange: async (e) => {
35
- await onChange?.(e);
36
- if (inputRef.current) {
37
- inputRef.current.value = "";
28
+ ),
29
+ /* @__PURE__ */ jsx(
30
+ "input",
31
+ {
32
+ ...props,
33
+ type: "file",
34
+ ref: inputRef,
35
+ style: {
36
+ display: "none"
37
+ },
38
+ onChange: async (e) => {
39
+ await onChange?.(e);
40
+ if (inputRef.current) {
41
+ inputRef.current.value = "";
42
+ }
38
43
  }
39
44
  }
40
- }
41
- ));
45
+ )
46
+ ] });
42
47
  }
43
48
  export {
44
49
  FileInput
@@ -4,6 +4,7 @@ export { FileInput } from './file_input.mjs';
4
4
  export { useUserAgent } from './use_user_agent.mjs';
5
5
  export { StoreTextEditor } from './store_text_editor.mjs';
6
6
  export { createAttachFileOptions } from './editor.mjs';
7
+ import 'react/jsx-runtime';
7
8
  import 'react';
8
9
  import 'dn-react-text-editor';
9
10
  import 'react-store-input';
@@ -4,6 +4,7 @@ export { FileInput } from './file_input.js';
4
4
  export { useUserAgent } from './use_user_agent.js';
5
5
  export { StoreTextEditor } from './store_text_editor.js';
6
6
  export { createAttachFileOptions } from './editor.js';
7
+ import 'react/jsx-runtime';
7
8
  import 'react';
8
9
  import 'dn-react-text-editor';
9
10
  import 'react-store-input';
@@ -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/client/index.ts
@@ -48,14 +38,14 @@ function env(key) {
48
38
  }
49
39
 
50
40
  // src/client/env_loader.tsx
51
- var import_react = __toESM(require("react"));
52
41
  var import_react_router = require("react-router");
42
+ var import_jsx_runtime = require("react/jsx-runtime");
53
43
  function EnvLoader({ dataKey = "ENV" }) {
54
44
  const data = (0, import_react_router.useRouteLoaderData)("root");
55
45
  if (!data) {
56
46
  return;
57
47
  }
58
- return /* @__PURE__ */ import_react.default.createElement(
48
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
59
49
  "script",
60
50
  {
61
51
  dangerouslySetInnerHTML: {
@@ -66,8 +56,8 @@ function EnvLoader({ dataKey = "ENV" }) {
66
56
  }
67
57
 
68
58
  // src/client/file_input.tsx
69
- var import_react2 = require("react");
70
- var import_react3 = __toESM(require("react"));
59
+ var import_react = require("react");
60
+ var import_jsx_runtime2 = require("react/jsx-runtime");
71
61
  function FileInput({
72
62
  buttonRef,
73
63
  className,
@@ -77,35 +67,38 @@ function FileInput({
77
67
  onChange,
78
68
  ...props
79
69
  }) {
80
- const inputRef = import_react3.default.useRef(null);
81
- return /* @__PURE__ */ import_react3.default.createElement(import_react3.default.Fragment, null, /* @__PURE__ */ import_react3.default.createElement(
82
- "button",
83
- {
84
- ref: buttonRef,
85
- className,
86
- type: "button",
87
- onClick: () => {
88
- inputRef.current?.click();
70
+ const inputRef = (0, import_react.useRef)(null);
71
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
72
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
73
+ "button",
74
+ {
75
+ ref: buttonRef,
76
+ className,
77
+ type: "button",
78
+ onClick: () => {
79
+ inputRef.current?.click();
80
+ },
81
+ children
89
82
  }
90
- },
91
- children
92
- ), /* @__PURE__ */ import_react3.default.createElement(
93
- "input",
94
- {
95
- ...props,
96
- type: "file",
97
- ref: inputRef,
98
- style: {
99
- display: "none"
100
- },
101
- onChange: async (e) => {
102
- await onChange?.(e);
103
- if (inputRef.current) {
104
- inputRef.current.value = "";
83
+ ),
84
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
85
+ "input",
86
+ {
87
+ ...props,
88
+ type: "file",
89
+ ref: inputRef,
90
+ style: {
91
+ display: "none"
92
+ },
93
+ onChange: async (e) => {
94
+ await onChange?.(e);
95
+ if (inputRef.current) {
96
+ inputRef.current.value = "";
97
+ }
105
98
  }
106
99
  }
107
- }
108
- ));
100
+ )
101
+ ] });
109
102
  }
110
103
 
111
104
  // src/client/use_user_agent.tsx
@@ -122,7 +115,8 @@ function useUserAgent() {
122
115
  // src/client/store_text_editor.tsx
123
116
  var import_dn_react_text_editor = require("dn-react-text-editor");
124
117
  var import_react_store_input = require("react-store-input");
125
- var import_react4 = __toESM(require("react"));
118
+ var import_react2 = require("react");
119
+ var import_jsx_runtime3 = require("react/jsx-runtime");
126
120
  function StoreTextEditor({
127
121
  store,
128
122
  name,
@@ -132,8 +126,8 @@ function StoreTextEditor({
132
126
  ref,
133
127
  ...props
134
128
  }) {
135
- const controllerRef = (0, import_react4.useRef)(null);
136
- (0, import_react4.useImperativeHandle)(
129
+ const controllerRef = (0, import_react2.useRef)(null);
130
+ (0, import_react2.useImperativeHandle)(
137
131
  ref,
138
132
  () => controllerRef.current,
139
133
  []
@@ -181,7 +175,7 @@ function StoreTextEditor({
181
175
  }
182
176
  return void 0;
183
177
  };
184
- return /* @__PURE__ */ import_react4.default.createElement(
178
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
185
179
  import_dn_react_text_editor.TextEditor,
186
180
  {
187
181
  ...props,
@@ -7,14 +7,14 @@ function env(key) {
7
7
  }
8
8
 
9
9
  // src/client/env_loader.tsx
10
- import React from "react";
11
10
  import { useRouteLoaderData } from "react-router";
11
+ import { jsx } from "react/jsx-runtime";
12
12
  function EnvLoader({ dataKey = "ENV" }) {
13
13
  const data = useRouteLoaderData("root");
14
14
  if (!data) {
15
15
  return;
16
16
  }
17
- return /* @__PURE__ */ React.createElement(
17
+ return /* @__PURE__ */ jsx(
18
18
  "script",
19
19
  {
20
20
  dangerouslySetInnerHTML: {
@@ -25,8 +25,10 @@ function EnvLoader({ dataKey = "ENV" }) {
25
25
  }
26
26
 
27
27
  // src/client/file_input.tsx
28
- import "react";
29
- import React2 from "react";
28
+ import {
29
+ useRef
30
+ } from "react";
31
+ import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
30
32
  function FileInput({
31
33
  buttonRef,
32
34
  className,
@@ -36,35 +38,38 @@ function FileInput({
36
38
  onChange,
37
39
  ...props
38
40
  }) {
39
- const inputRef = React2.useRef(null);
40
- return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(
41
- "button",
42
- {
43
- ref: buttonRef,
44
- className,
45
- type: "button",
46
- onClick: () => {
47
- inputRef.current?.click();
41
+ const inputRef = useRef(null);
42
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
43
+ /* @__PURE__ */ jsx2(
44
+ "button",
45
+ {
46
+ ref: buttonRef,
47
+ className,
48
+ type: "button",
49
+ onClick: () => {
50
+ inputRef.current?.click();
51
+ },
52
+ children
48
53
  }
49
- },
50
- children
51
- ), /* @__PURE__ */ React2.createElement(
52
- "input",
53
- {
54
- ...props,
55
- type: "file",
56
- ref: inputRef,
57
- style: {
58
- display: "none"
59
- },
60
- onChange: async (e) => {
61
- await onChange?.(e);
62
- if (inputRef.current) {
63
- inputRef.current.value = "";
54
+ ),
55
+ /* @__PURE__ */ jsx2(
56
+ "input",
57
+ {
58
+ ...props,
59
+ type: "file",
60
+ ref: inputRef,
61
+ style: {
62
+ display: "none"
63
+ },
64
+ onChange: async (e) => {
65
+ await onChange?.(e);
66
+ if (inputRef.current) {
67
+ inputRef.current.value = "";
68
+ }
64
69
  }
65
70
  }
66
- }
67
- ));
71
+ )
72
+ ] });
68
73
  }
69
74
 
70
75
  // src/client/use_user_agent.tsx
@@ -83,7 +88,8 @@ import {
83
88
  TextEditor
84
89
  } from "dn-react-text-editor";
85
90
  import { useStoreController } from "react-store-input";
86
- import React3, { useImperativeHandle, useRef } from "react";
91
+ import { useImperativeHandle, useRef as useRef2 } from "react";
92
+ import { jsx as jsx3 } from "react/jsx-runtime";
87
93
  function StoreTextEditor({
88
94
  store,
89
95
  name,
@@ -93,7 +99,7 @@ function StoreTextEditor({
93
99
  ref,
94
100
  ...props
95
101
  }) {
96
- const controllerRef = useRef(null);
102
+ const controllerRef = useRef2(null);
97
103
  useImperativeHandle(
98
104
  ref,
99
105
  () => controllerRef.current,
@@ -142,7 +148,7 @@ function StoreTextEditor({
142
148
  }
143
149
  return void 0;
144
150
  };
145
- return /* @__PURE__ */ React3.createElement(
151
+ return /* @__PURE__ */ jsx3(
146
152
  TextEditor,
147
153
  {
148
154
  ...props,
@@ -1,6 +1,6 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
1
2
  import { TextEditorProps } from 'dn-react-text-editor';
2
3
  import { Store } from 'react-store-input';
3
- import React__default from 'react';
4
4
 
5
5
  type Props<TState> = {
6
6
  store: Store<TState>;
@@ -8,6 +8,6 @@ type Props<TState> = {
8
8
  getter?: (state: TState) => string;
9
9
  setter?: (state: TState, value: string) => void;
10
10
  } & TextEditorProps;
11
- declare function StoreTextEditor<TState>({ store, name, getter, setter, defaultValue, ref, ...props }: Props<TState>): React__default.JSX.Element;
11
+ declare function StoreTextEditor<TState>({ store, name, getter, setter, defaultValue, ref, ...props }: Props<TState>): react_jsx_runtime.JSX.Element;
12
12
 
13
13
  export { StoreTextEditor };
@@ -1,6 +1,6 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
1
2
  import { TextEditorProps } from 'dn-react-text-editor';
2
3
  import { Store } from 'react-store-input';
3
- import React__default from 'react';
4
4
 
5
5
  type Props<TState> = {
6
6
  store: Store<TState>;
@@ -8,6 +8,6 @@ type Props<TState> = {
8
8
  getter?: (state: TState) => string;
9
9
  setter?: (state: TState, value: string) => void;
10
10
  } & TextEditorProps;
11
- declare function StoreTextEditor<TState>({ store, name, getter, setter, defaultValue, ref, ...props }: Props<TState>): React__default.JSX.Element;
11
+ declare function StoreTextEditor<TState>({ store, name, getter, setter, defaultValue, ref, ...props }: Props<TState>): react_jsx_runtime.JSX.Element;
12
12
 
13
13
  export { StoreTextEditor };