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,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/crud/crud_form_provider.tsx
@@ -38,7 +28,6 @@ module.exports = __toCommonJS(crud_form_provider_exports);
38
28
  var import_react_router = require("react-router");
39
29
  var import_react_store_input = require("react-store-input");
40
30
  var import_react = require("react");
41
- var import_react2 = __toESM(require("react"));
42
31
 
43
32
  // src/crud/serialize.ts
44
33
  function serialize(value) {
@@ -99,6 +88,7 @@ function serialize(value) {
99
88
  }
100
89
 
101
90
  // src/crud/crud_form_provider.tsx
91
+ var import_jsx_runtime = require("react/jsx-runtime");
102
92
  var FormContext = (0, import_react.createContext)({});
103
93
  function useFormContext() {
104
94
  return (0, import_react.useContext)(FormContext);
@@ -179,7 +169,7 @@ function CrudFormProvider({
179
169
  delete: deleteItem,
180
170
  columns
181
171
  };
182
- return /* @__PURE__ */ import_react2.default.createElement(FormContext.Provider, { value }, children);
172
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormContext.Provider, { value, children });
183
173
  }
184
174
  // Annotate the CommonJS export names for ESM import in node:
185
175
  0 && (module.exports = {
@@ -1,8 +1,10 @@
1
1
  // src/crud/crud_form_provider.tsx
2
2
  import { useNavigate } from "react-router";
3
3
  import { useStore } from "react-store-input";
4
- import { createContext, useContext } from "react";
5
- import React from "react";
4
+ import {
5
+ createContext,
6
+ useContext
7
+ } from "react";
6
8
 
7
9
  // src/crud/serialize.ts
8
10
  function serialize(value) {
@@ -63,6 +65,7 @@ function serialize(value) {
63
65
  }
64
66
 
65
67
  // src/crud/crud_form_provider.tsx
68
+ import { jsx } from "react/jsx-runtime";
66
69
  var FormContext = createContext({});
67
70
  function useFormContext() {
68
71
  return useContext(FormContext);
@@ -143,7 +146,7 @@ function CrudFormProvider({
143
146
  delete: deleteItem,
144
147
  columns
145
148
  };
146
- return /* @__PURE__ */ React.createElement(FormContext.Provider, { value }, children);
149
+ return /* @__PURE__ */ jsx(FormContext.Provider, { value, children });
147
150
  }
148
151
  export {
149
152
  FormContext,
@@ -1,4 +1,4 @@
1
- import { LoaderFunction, LoaderFunctionArgs } from 'react-router';
1
+ import { LoaderFunctionArgs, LoaderFunction } from 'react-router';
2
2
  import { TableLoaderOptions } from '../table/loader.mjs';
3
3
  import { TableItemLoaderOptions } from '../table/item_loader.mjs';
4
4
  import { Table } from 'drizzle-orm';
@@ -1,4 +1,4 @@
1
- import { LoaderFunction, LoaderFunctionArgs } from 'react-router';
1
+ import { LoaderFunctionArgs, LoaderFunction } from 'react-router';
2
2
  import { TableLoaderOptions } from '../table/loader.js';
3
3
  import { TableItemLoaderOptions } from '../table/item_loader.js';
4
4
  import { Table } from 'drizzle-orm';
@@ -1,6 +1,7 @@
1
1
  import { FormContextProps, CrudFormProps } from './crud_form_provider.mjs';
2
2
  import { TablePageOptions } from '../table/page.mjs';
3
- import React__default from 'react';
3
+ import { FC, ReactNode } from 'react';
4
+ import 'react/jsx-runtime';
4
5
  import 'react-store-input';
5
6
  import '../table/table.mjs';
6
7
 
@@ -9,19 +10,22 @@ type CrudPageOptions<TModel> = {
9
10
  primaryKey: keyof TModel;
10
11
  tablePageOptions: Omit<TablePageOptions<TModel>, "name">;
11
12
  formOptions: {
12
- form?: React__default.FC<{
13
+ form?: FC<{
13
14
  form: FormContextProps<TModel>;
14
15
  }>;
15
16
  columns?: CrudFormProps<TModel>["columns"];
16
17
  };
17
- header: React__default.FC<{
18
+ header: FC<{
18
19
  title: string;
19
- actions?: React__default.ReactNode;
20
+ actions?: ReactNode;
20
21
  className?: string;
21
- children?: React__default.ReactNode;
22
+ children?: ReactNode;
22
23
  }>;
23
24
  };
24
- type CrudPage = (prefix: string) => React__default.FC;
25
+ type CrudPage = {
26
+ name: string;
27
+ create: (prefix: string) => FC;
28
+ };
25
29
  declare function crudPage<TModel>({ name, primaryKey, tablePageOptions, formOptions, header: header, }: CrudPageOptions<TModel>): CrudPage;
26
30
 
27
31
  export { type CrudPage, type CrudPageOptions, crudPage };
@@ -1,6 +1,7 @@
1
1
  import { FormContextProps, CrudFormProps } from './crud_form_provider.js';
2
2
  import { TablePageOptions } from '../table/page.js';
3
- import React__default from 'react';
3
+ import { FC, ReactNode } from 'react';
4
+ import 'react/jsx-runtime';
4
5
  import 'react-store-input';
5
6
  import '../table/table.js';
6
7
 
@@ -9,19 +10,22 @@ type CrudPageOptions<TModel> = {
9
10
  primaryKey: keyof TModel;
10
11
  tablePageOptions: Omit<TablePageOptions<TModel>, "name">;
11
12
  formOptions: {
12
- form?: React__default.FC<{
13
+ form?: FC<{
13
14
  form: FormContextProps<TModel>;
14
15
  }>;
15
16
  columns?: CrudFormProps<TModel>["columns"];
16
17
  };
17
- header: React__default.FC<{
18
+ header: FC<{
18
19
  title: string;
19
- actions?: React__default.ReactNode;
20
+ actions?: ReactNode;
20
21
  className?: string;
21
- children?: React__default.ReactNode;
22
+ children?: ReactNode;
22
23
  }>;
23
24
  };
24
- type CrudPage = (prefix: string) => React__default.FC;
25
+ type CrudPage = {
26
+ name: string;
27
+ create: (prefix: string) => FC;
28
+ };
25
29
  declare function crudPage<TModel>({ name, primaryKey, tablePageOptions, formOptions, header: header, }: CrudPageOptions<TModel>): CrudPage;
26
30
 
27
31
  export { type CrudPage, type CrudPageOptions, crudPage };