ru.Bee 1.3.3 → 1.4.0

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 (180) hide show
  1. checksums.yaml +4 -4
  2. data/bin/rubee +36 -4
  3. data/lib/app/views/app.tsx +27 -0
  4. data/lib/app/views/index.html +47 -0
  5. data/lib/app/views/layout.erb +3 -3
  6. data/lib/app/views/utils/redirectToBackend.tsx +9 -0
  7. data/lib/app/views/welcome_show.erb +1 -1
  8. data/lib/config/base_configuration.rb +9 -0
  9. data/lib/config/routes.rb +1 -0
  10. data/lib/esbuild.config.js +33 -0
  11. data/lib/js/app.js +13 -0
  12. data/lib/js/app.js.map +7 -0
  13. data/lib/js/bundle.js +26157 -0
  14. data/lib/js/bundle.js.map +7 -0
  15. data/lib/node_modules/@types/cookie/LICENSE +21 -0
  16. data/lib/node_modules/@types/cookie/README.md +15 -0
  17. data/lib/node_modules/@types/cookie/index.d.ts +154 -0
  18. data/lib/node_modules/@types/cookie/package.json +30 -0
  19. data/lib/node_modules/cookie/LICENSE +24 -0
  20. data/lib/node_modules/cookie/README.md +248 -0
  21. data/lib/node_modules/cookie/dist/index.d.ts +114 -0
  22. data/lib/node_modules/cookie/dist/index.js +239 -0
  23. data/lib/node_modules/cookie/dist/index.js.map +1 -0
  24. data/lib/node_modules/cookie/package.json +42 -0
  25. data/lib/node_modules/js-tokens/CHANGELOG.md +151 -0
  26. data/lib/node_modules/js-tokens/LICENSE +21 -0
  27. data/lib/node_modules/js-tokens/README.md +240 -0
  28. data/lib/node_modules/js-tokens/index.js +23 -0
  29. data/lib/node_modules/js-tokens/package.json +30 -0
  30. data/lib/node_modules/loose-envify/LICENSE +21 -0
  31. data/lib/node_modules/loose-envify/README.md +45 -0
  32. data/lib/node_modules/loose-envify/cli.js +16 -0
  33. data/lib/node_modules/loose-envify/custom.js +4 -0
  34. data/lib/node_modules/loose-envify/index.js +3 -0
  35. data/lib/node_modules/loose-envify/loose-envify.js +36 -0
  36. data/lib/node_modules/loose-envify/package.json +36 -0
  37. data/lib/node_modules/loose-envify/replace.js +65 -0
  38. data/lib/node_modules/react/LICENSE +21 -0
  39. data/lib/node_modules/react/README.md +37 -0
  40. data/lib/node_modules/react/cjs/react-jsx-dev-runtime.development.js +1315 -0
  41. data/lib/node_modules/react/cjs/react-jsx-dev-runtime.production.min.js +10 -0
  42. data/lib/node_modules/react/cjs/react-jsx-dev-runtime.profiling.min.js +10 -0
  43. data/lib/node_modules/react/cjs/react-jsx-runtime.development.js +1333 -0
  44. data/lib/node_modules/react/cjs/react-jsx-runtime.production.min.js +11 -0
  45. data/lib/node_modules/react/cjs/react-jsx-runtime.profiling.min.js +11 -0
  46. data/lib/node_modules/react/cjs/react.development.js +2740 -0
  47. data/lib/node_modules/react/cjs/react.production.min.js +26 -0
  48. data/lib/node_modules/react/cjs/react.shared-subset.development.js +20 -0
  49. data/lib/node_modules/react/cjs/react.shared-subset.production.min.js +10 -0
  50. data/lib/node_modules/react/index.js +7 -0
  51. data/lib/node_modules/react/jsx-dev-runtime.js +7 -0
  52. data/lib/node_modules/react/jsx-runtime.js +7 -0
  53. data/lib/node_modules/react/package.json +47 -0
  54. data/lib/node_modules/react/react.shared-subset.js +7 -0
  55. data/lib/node_modules/react/umd/react.development.js +3343 -0
  56. data/lib/node_modules/react/umd/react.production.min.js +31 -0
  57. data/lib/node_modules/react/umd/react.profiling.min.js +31 -0
  58. data/lib/node_modules/react-dom/LICENSE +21 -0
  59. data/lib/node_modules/react-dom/README.md +60 -0
  60. data/lib/node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js +7029 -0
  61. data/lib/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js +93 -0
  62. data/lib/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js +7093 -0
  63. data/lib/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js +101 -0
  64. data/lib/node_modules/react-dom/cjs/react-dom-server.browser.development.js +7014 -0
  65. data/lib/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js +96 -0
  66. data/lib/node_modules/react-dom/cjs/react-dom-server.node.development.js +7070 -0
  67. data/lib/node_modules/react-dom/cjs/react-dom-server.node.production.min.js +102 -0
  68. data/lib/node_modules/react-dom/cjs/react-dom-test-utils.development.js +1763 -0
  69. data/lib/node_modules/react-dom/cjs/react-dom-test-utils.production.min.js +40 -0
  70. data/lib/node_modules/react-dom/cjs/react-dom.development.js +29923 -0
  71. data/lib/node_modules/react-dom/cjs/react-dom.production.min.js +322 -0
  72. data/lib/node_modules/react-dom/cjs/react-dom.profiling.min.js +366 -0
  73. data/lib/node_modules/react-dom/client.js +25 -0
  74. data/lib/node_modules/react-dom/index.js +38 -0
  75. data/lib/node_modules/react-dom/package.json +62 -0
  76. data/lib/node_modules/react-dom/profiling.js +38 -0
  77. data/lib/node_modules/react-dom/server.browser.js +17 -0
  78. data/lib/node_modules/react-dom/server.js +3 -0
  79. data/lib/node_modules/react-dom/server.node.js +17 -0
  80. data/lib/node_modules/react-dom/test-utils.js +7 -0
  81. data/lib/node_modules/react-dom/umd/react-dom-server-legacy.browser.development.js +7026 -0
  82. data/lib/node_modules/react-dom/umd/react-dom-server-legacy.browser.production.min.js +75 -0
  83. data/lib/node_modules/react-dom/umd/react-dom-server.browser.development.js +7011 -0
  84. data/lib/node_modules/react-dom/umd/react-dom-server.browser.production.min.js +76 -0
  85. data/lib/node_modules/react-dom/umd/react-dom-test-utils.development.js +1759 -0
  86. data/lib/node_modules/react-dom/umd/react-dom-test-utils.production.min.js +33 -0
  87. data/lib/node_modules/react-dom/umd/react-dom.development.js +29924 -0
  88. data/lib/node_modules/react-dom/umd/react-dom.production.min.js +267 -0
  89. data/lib/node_modules/react-dom/umd/react-dom.profiling.min.js +285 -0
  90. data/lib/node_modules/react-router/CHANGELOG.md +1526 -0
  91. data/lib/node_modules/react-router/LICENSE.md +23 -0
  92. data/lib/node_modules/react-router/README.md +7 -0
  93. data/lib/node_modules/react-router/dist/development/chunk-KNED5TY2.mjs +10476 -0
  94. data/lib/node_modules/react-router/dist/development/dom-export.d.mts +23 -0
  95. data/lib/node_modules/react-router/dist/development/dom-export.d.ts +23 -0
  96. data/lib/node_modules/react-router/dist/development/dom-export.js +6111 -0
  97. data/lib/node_modules/react-router/dist/development/dom-export.mjs +234 -0
  98. data/lib/node_modules/react-router/dist/development/fog-of-war-1hWhK5ey.d.mts +1690 -0
  99. data/lib/node_modules/react-router/dist/development/fog-of-war-oa9CGk10.d.ts +1690 -0
  100. data/lib/node_modules/react-router/dist/development/future-ldDp5FKH.d.mts +21 -0
  101. data/lib/node_modules/react-router/dist/development/future-ldDp5FKH.d.ts +21 -0
  102. data/lib/node_modules/react-router/dist/development/index.d.mts +841 -0
  103. data/lib/node_modules/react-router/dist/development/index.d.ts +841 -0
  104. data/lib/node_modules/react-router/dist/development/index.js +10624 -0
  105. data/lib/node_modules/react-router/dist/development/index.mjs +242 -0
  106. data/lib/node_modules/react-router/dist/development/lib/types/route-module.d.mts +209 -0
  107. data/lib/node_modules/react-router/dist/development/lib/types/route-module.d.ts +209 -0
  108. data/lib/node_modules/react-router/dist/development/lib/types/route-module.js +28 -0
  109. data/lib/node_modules/react-router/dist/development/lib/types/route-module.mjs +10 -0
  110. data/lib/node_modules/react-router/dist/development/route-data-5OzAzQtT.d.mts +1716 -0
  111. data/lib/node_modules/react-router/dist/development/route-data-5OzAzQtT.d.ts +1716 -0
  112. data/lib/node_modules/react-router/dist/production/chunk-ZIM7OIE3.mjs +10476 -0
  113. data/lib/node_modules/react-router/dist/production/dom-export.d.mts +23 -0
  114. data/lib/node_modules/react-router/dist/production/dom-export.d.ts +23 -0
  115. data/lib/node_modules/react-router/dist/production/dom-export.js +6111 -0
  116. data/lib/node_modules/react-router/dist/production/dom-export.mjs +234 -0
  117. data/lib/node_modules/react-router/dist/production/fog-of-war-1hWhK5ey.d.mts +1690 -0
  118. data/lib/node_modules/react-router/dist/production/fog-of-war-oa9CGk10.d.ts +1690 -0
  119. data/lib/node_modules/react-router/dist/production/future-ldDp5FKH.d.mts +21 -0
  120. data/lib/node_modules/react-router/dist/production/future-ldDp5FKH.d.ts +21 -0
  121. data/lib/node_modules/react-router/dist/production/index.d.mts +841 -0
  122. data/lib/node_modules/react-router/dist/production/index.d.ts +841 -0
  123. data/lib/node_modules/react-router/dist/production/index.js +10624 -0
  124. data/lib/node_modules/react-router/dist/production/index.mjs +242 -0
  125. data/lib/node_modules/react-router/dist/production/lib/types/route-module.d.mts +209 -0
  126. data/lib/node_modules/react-router/dist/production/lib/types/route-module.d.ts +209 -0
  127. data/lib/node_modules/react-router/dist/production/lib/types/route-module.js +28 -0
  128. data/lib/node_modules/react-router/dist/production/lib/types/route-module.mjs +10 -0
  129. data/lib/node_modules/react-router/dist/production/route-data-5OzAzQtT.d.mts +1716 -0
  130. data/lib/node_modules/react-router/dist/production/route-data-5OzAzQtT.d.ts +1716 -0
  131. data/lib/node_modules/react-router/package.json +116 -0
  132. data/lib/node_modules/react-router-dom/LICENSE.md +23 -0
  133. data/lib/node_modules/react-router-dom/README.md +6 -0
  134. data/lib/node_modules/react-router-dom/dist/index.d.mts +2 -0
  135. data/lib/node_modules/react-router-dom/dist/index.d.ts +2 -0
  136. data/lib/node_modules/react-router-dom/dist/index.js +45 -0
  137. data/lib/node_modules/react-router-dom/dist/index.mjs +18 -0
  138. data/lib/node_modules/react-router-dom/package.json +82 -0
  139. data/lib/node_modules/scheduler/LICENSE +21 -0
  140. data/lib/node_modules/scheduler/README.md +9 -0
  141. data/lib/node_modules/scheduler/cjs/scheduler-unstable_mock.development.js +700 -0
  142. data/lib/node_modules/scheduler/cjs/scheduler-unstable_mock.production.min.js +20 -0
  143. data/lib/node_modules/scheduler/cjs/scheduler-unstable_post_task.development.js +207 -0
  144. data/lib/node_modules/scheduler/cjs/scheduler-unstable_post_task.production.min.js +14 -0
  145. data/lib/node_modules/scheduler/cjs/scheduler.development.js +634 -0
  146. data/lib/node_modules/scheduler/cjs/scheduler.production.min.js +19 -0
  147. data/lib/node_modules/scheduler/index.js +7 -0
  148. data/lib/node_modules/scheduler/package.json +36 -0
  149. data/lib/node_modules/scheduler/umd/scheduler-unstable_mock.development.js +699 -0
  150. data/lib/node_modules/scheduler/umd/scheduler-unstable_mock.production.min.js +19 -0
  151. data/lib/node_modules/scheduler/umd/scheduler.development.js +152 -0
  152. data/lib/node_modules/scheduler/umd/scheduler.production.min.js +146 -0
  153. data/lib/node_modules/scheduler/umd/scheduler.profiling.min.js +146 -0
  154. data/lib/node_modules/scheduler/unstable_mock.js +7 -0
  155. data/lib/node_modules/scheduler/unstable_post_task.js +7 -0
  156. data/lib/node_modules/set-cookie-parser/LICENSE +21 -0
  157. data/lib/node_modules/set-cookie-parser/README.md +202 -0
  158. data/lib/node_modules/set-cookie-parser/lib/set-cookie.js +224 -0
  159. data/lib/node_modules/set-cookie-parser/package.json +45 -0
  160. data/lib/node_modules/turbo-stream/LICENSE +7 -0
  161. data/lib/node_modules/turbo-stream/README.md +31 -0
  162. data/lib/node_modules/turbo-stream/dist/flatten.d.ts +2 -0
  163. data/lib/node_modules/turbo-stream/dist/flatten.js +203 -0
  164. data/lib/node_modules/turbo-stream/dist/turbo-stream.d.ts +13 -0
  165. data/lib/node_modules/turbo-stream/dist/turbo-stream.js +207 -0
  166. data/lib/node_modules/turbo-stream/dist/turbo-stream.mjs +673 -0
  167. data/lib/node_modules/turbo-stream/dist/unflatten.d.ts +2 -0
  168. data/lib/node_modules/turbo-stream/dist/unflatten.js +243 -0
  169. data/lib/node_modules/turbo-stream/dist/utils.d.ts +44 -0
  170. data/lib/node_modules/turbo-stream/dist/utils.js +55 -0
  171. data/lib/node_modules/turbo-stream/package.json +50 -0
  172. data/lib/package-lock.json +133 -0
  173. data/lib/package.json +12 -0
  174. data/lib/rubee/controllers/base_controller.rb +14 -0
  175. data/lib/rubee.rb +58 -19
  176. data/lib/tests/rubeeapp_test.rb +17 -0
  177. data/lib/tests/test.db +0 -0
  178. data/lib/tests/user_model_test.rb +1 -0
  179. data/readme.md +104 -2
  180. metadata +170 -3
@@ -0,0 +1,242 @@
1
+ /**
2
+ * react-router v7.5.0
3
+ *
4
+ * Copyright (c) Remix Software Inc.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE.md file in the root directory of this source tree.
8
+ *
9
+ * @license MIT
10
+ */
11
+ import {
12
+ Action,
13
+ Await,
14
+ BrowserRouter,
15
+ DataRouterContext,
16
+ DataRouterStateContext,
17
+ ErrorResponseImpl,
18
+ FetchersContext,
19
+ Form,
20
+ FrameworkContext,
21
+ HashRouter,
22
+ HistoryRouter,
23
+ IDLE_BLOCKER,
24
+ IDLE_FETCHER,
25
+ IDLE_NAVIGATION,
26
+ Link,
27
+ Links,
28
+ LocationContext,
29
+ MemoryRouter,
30
+ Meta,
31
+ NavLink,
32
+ Navigate,
33
+ NavigationContext,
34
+ Outlet,
35
+ PrefetchPageLinks,
36
+ RemixErrorBoundary,
37
+ Route,
38
+ RouteContext,
39
+ Router,
40
+ RouterProvider,
41
+ Routes,
42
+ Scripts,
43
+ ScrollRestoration,
44
+ ServerMode,
45
+ ServerRouter,
46
+ SingleFetchRedirectSymbol,
47
+ StaticRouter,
48
+ StaticRouterProvider,
49
+ ViewTransitionContext,
50
+ createBrowserHistory,
51
+ createBrowserRouter,
52
+ createClientRoutes,
53
+ createClientRoutesWithHMRRevalidationOptOut,
54
+ createCookie,
55
+ createCookieSessionStorage,
56
+ createHashRouter,
57
+ createMemoryRouter,
58
+ createMemorySessionStorage,
59
+ createPath,
60
+ createRequestHandler,
61
+ createRouter,
62
+ createRoutesFromChildren,
63
+ createRoutesFromElements,
64
+ createRoutesStub,
65
+ createSearchParams,
66
+ createSession,
67
+ createSessionStorage,
68
+ createStaticHandler,
69
+ createStaticRouter,
70
+ data,
71
+ decodeViaTurboStream,
72
+ deserializeErrors,
73
+ generatePath,
74
+ getPatchRoutesOnNavigationFunction,
75
+ getSingleFetchDataStrategy,
76
+ href,
77
+ invariant,
78
+ isCookie,
79
+ isRouteErrorResponse,
80
+ isSession,
81
+ mapRouteProperties,
82
+ matchPath,
83
+ matchRoutes,
84
+ parsePath,
85
+ redirect,
86
+ redirectDocument,
87
+ renderMatches,
88
+ replace,
89
+ resolvePath,
90
+ setDevServerHooks,
91
+ shouldHydrateRouteLoader,
92
+ unstable_RouterContextProvider,
93
+ unstable_createContext,
94
+ useActionData,
95
+ useAsyncError,
96
+ useAsyncValue,
97
+ useBeforeUnload,
98
+ useBlocker,
99
+ useFetcher,
100
+ useFetchers,
101
+ useFogOFWarDiscovery,
102
+ useFormAction,
103
+ useHref,
104
+ useInRouterContext,
105
+ useLinkClickHandler,
106
+ useLoaderData,
107
+ useLocation,
108
+ useMatch,
109
+ useMatches,
110
+ useNavigate,
111
+ useNavigation,
112
+ useNavigationType,
113
+ useOutlet,
114
+ useOutletContext,
115
+ useParams,
116
+ usePrompt,
117
+ useResolvedPath,
118
+ useRevalidator,
119
+ useRouteError,
120
+ useRouteLoaderData,
121
+ useRoutes,
122
+ useScrollRestoration,
123
+ useSearchParams,
124
+ useSubmit,
125
+ useViewTransitionState
126
+ } from "./chunk-ZIM7OIE3.mjs";
127
+ export {
128
+ Await,
129
+ BrowserRouter,
130
+ Form,
131
+ HashRouter,
132
+ IDLE_BLOCKER,
133
+ IDLE_FETCHER,
134
+ IDLE_NAVIGATION,
135
+ Link,
136
+ Links,
137
+ MemoryRouter,
138
+ Meta,
139
+ NavLink,
140
+ Navigate,
141
+ Action as NavigationType,
142
+ Outlet,
143
+ PrefetchPageLinks,
144
+ Route,
145
+ Router,
146
+ RouterProvider,
147
+ Routes,
148
+ Scripts,
149
+ ScrollRestoration,
150
+ ServerRouter,
151
+ StaticRouter,
152
+ StaticRouterProvider,
153
+ DataRouterContext as UNSAFE_DataRouterContext,
154
+ DataRouterStateContext as UNSAFE_DataRouterStateContext,
155
+ ErrorResponseImpl as UNSAFE_ErrorResponseImpl,
156
+ FetchersContext as UNSAFE_FetchersContext,
157
+ FrameworkContext as UNSAFE_FrameworkContext,
158
+ LocationContext as UNSAFE_LocationContext,
159
+ NavigationContext as UNSAFE_NavigationContext,
160
+ RemixErrorBoundary as UNSAFE_RemixErrorBoundary,
161
+ RouteContext as UNSAFE_RouteContext,
162
+ ServerMode as UNSAFE_ServerMode,
163
+ SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol,
164
+ ViewTransitionContext as UNSAFE_ViewTransitionContext,
165
+ createBrowserHistory as UNSAFE_createBrowserHistory,
166
+ createClientRoutes as UNSAFE_createClientRoutes,
167
+ createClientRoutesWithHMRRevalidationOptOut as UNSAFE_createClientRoutesWithHMRRevalidationOptOut,
168
+ createRouter as UNSAFE_createRouter,
169
+ decodeViaTurboStream as UNSAFE_decodeViaTurboStream,
170
+ deserializeErrors as UNSAFE_deserializeErrors,
171
+ getPatchRoutesOnNavigationFunction as UNSAFE_getPatchRoutesOnNavigationFunction,
172
+ getSingleFetchDataStrategy as UNSAFE_getSingleFetchDataStrategy,
173
+ invariant as UNSAFE_invariant,
174
+ mapRouteProperties as UNSAFE_mapRouteProperties,
175
+ shouldHydrateRouteLoader as UNSAFE_shouldHydrateRouteLoader,
176
+ useFogOFWarDiscovery as UNSAFE_useFogOFWarDiscovery,
177
+ useScrollRestoration as UNSAFE_useScrollRestoration,
178
+ createBrowserRouter,
179
+ createCookie,
180
+ createCookieSessionStorage,
181
+ createHashRouter,
182
+ createMemoryRouter,
183
+ createMemorySessionStorage,
184
+ createPath,
185
+ createRequestHandler,
186
+ createRoutesFromChildren,
187
+ createRoutesFromElements,
188
+ createRoutesStub,
189
+ createSearchParams,
190
+ createSession,
191
+ createSessionStorage,
192
+ createStaticHandler,
193
+ createStaticRouter,
194
+ data,
195
+ generatePath,
196
+ href,
197
+ isCookie,
198
+ isRouteErrorResponse,
199
+ isSession,
200
+ matchPath,
201
+ matchRoutes,
202
+ parsePath,
203
+ redirect,
204
+ redirectDocument,
205
+ renderMatches,
206
+ replace,
207
+ resolvePath,
208
+ HistoryRouter as unstable_HistoryRouter,
209
+ unstable_RouterContextProvider,
210
+ unstable_createContext,
211
+ setDevServerHooks as unstable_setDevServerHooks,
212
+ usePrompt as unstable_usePrompt,
213
+ useActionData,
214
+ useAsyncError,
215
+ useAsyncValue,
216
+ useBeforeUnload,
217
+ useBlocker,
218
+ useFetcher,
219
+ useFetchers,
220
+ useFormAction,
221
+ useHref,
222
+ useInRouterContext,
223
+ useLinkClickHandler,
224
+ useLoaderData,
225
+ useLocation,
226
+ useMatch,
227
+ useMatches,
228
+ useNavigate,
229
+ useNavigation,
230
+ useNavigationType,
231
+ useOutlet,
232
+ useOutletContext,
233
+ useParams,
234
+ useResolvedPath,
235
+ useRevalidator,
236
+ useRouteError,
237
+ useRouteLoaderData,
238
+ useRoutes,
239
+ useSearchParams,
240
+ useSubmit,
241
+ useViewTransitionState
242
+ };
@@ -0,0 +1,209 @@
1
+ import { aE as LinkDescriptor, aB as MetaDescriptor, aT as ServerDataFrom, aU as ClientDataFrom, aV as Func, aW as unstable_MiddlewareNextFunction, E as Equal, u as unstable_RouterContextProvider, aX as Pretty } from '../../route-data-5OzAzQtT.mjs';
2
+ import { M as MiddlewareEnabled, A as AppLoadContext } from '../../future-ldDp5FKH.mjs';
3
+ import 'react';
4
+
5
+ type IsDefined<T> = Equal<T, undefined> extends true ? false : true;
6
+ type MaybePromise<T> = T | Promise<T>;
7
+ type RouteModule = {
8
+ meta?: Func;
9
+ links?: Func;
10
+ headers?: Func;
11
+ loader?: Func;
12
+ clientLoader?: Func;
13
+ action?: Func;
14
+ clientAction?: Func;
15
+ HydrateFallback?: unknown;
16
+ default?: unknown;
17
+ ErrorBoundary?: unknown;
18
+ [key: string]: unknown;
19
+ };
20
+ type LinkDescriptors = LinkDescriptor[];
21
+ type RouteInfo = {
22
+ parents: RouteInfo[];
23
+ module: RouteModule;
24
+ id: unknown;
25
+ file: string;
26
+ path: string;
27
+ params: unknown;
28
+ loaderData: unknown;
29
+ actionData: unknown;
30
+ };
31
+ type MetaMatch<T extends RouteInfo> = Pretty<Pick<T, "id" | "params"> & {
32
+ pathname: string;
33
+ meta: MetaDescriptor[];
34
+ data: T["loaderData"];
35
+ handle?: unknown;
36
+ error?: unknown;
37
+ }>;
38
+ type MetaMatches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<RouteInfo> | undefined>;
39
+ type CreateMetaArgs<T extends RouteInfo> = {
40
+ /** This is the current router `Location` object. This is useful for generating tags for routes at specific paths or query parameters. */
41
+ location: Location;
42
+ /** {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route. */
43
+ params: T["params"];
44
+ /** The return value for this route's server loader function */
45
+ data: T["loaderData"];
46
+ /** Thrown errors that trigger error boundaries will be passed to the meta function. This is useful for generating metadata for error pages. */
47
+ error?: unknown;
48
+ /** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
49
+ matches: MetaMatches<[...T["parents"], T]>;
50
+ };
51
+ type MetaDescriptors = MetaDescriptor[];
52
+ type HeadersArgs = {
53
+ loaderHeaders: Headers;
54
+ parentHeaders: Headers;
55
+ actionHeaders: Headers;
56
+ errorHeaders: Headers | undefined;
57
+ };
58
+ type IsHydrate<ClientLoader> = ClientLoader extends {
59
+ hydrate: true;
60
+ } ? true : ClientLoader extends {
61
+ hydrate: false;
62
+ } ? false : false;
63
+ type CreateLoaderData<T extends RouteModule> = _CreateLoaderData<ServerDataFrom<T["loader"]>, ClientDataFrom<T["clientLoader"]>, IsHydrate<T["clientLoader"]>, T extends {
64
+ HydrateFallback: Func;
65
+ } ? true : false>;
66
+ type _CreateLoaderData<ServerLoaderData, ClientLoaderData, ClientLoaderHydrate extends boolean, HasHydrateFallback> = [
67
+ HasHydrateFallback,
68
+ ClientLoaderHydrate
69
+ ] extends [true, true] ? IsDefined<ClientLoaderData> extends true ? ClientLoaderData : undefined : [
70
+ IsDefined<ClientLoaderData>,
71
+ IsDefined<ServerLoaderData>
72
+ ] extends [true, true] ? ServerLoaderData | ClientLoaderData : IsDefined<ClientLoaderData> extends true ? ClientLoaderData : IsDefined<ServerLoaderData> extends true ? ServerLoaderData : undefined;
73
+ type CreateActionData<T extends RouteModule> = _CreateActionData<ServerDataFrom<T["action"]>, ClientDataFrom<T["clientAction"]>>;
74
+ type _CreateActionData<ServerActionData, ClientActionData> = Awaited<[
75
+ IsDefined<ServerActionData>,
76
+ IsDefined<ClientActionData>
77
+ ] extends [true, true] ? ServerActionData | ClientActionData : IsDefined<ClientActionData> extends true ? ClientActionData : IsDefined<ServerActionData> extends true ? ServerActionData : undefined>;
78
+ type ClientDataFunctionArgs<T extends RouteInfo> = {
79
+ /**
80
+ * A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read the URL, the method, the "content-type" header, and the request body from the request.
81
+ *
82
+ * @note Because client data functions are called before a network request is made, the Request object does not include the headers which the browser automatically adds. React Router infers the "content-type" header from the enc-type of the form that performed the submission.
83
+ **/
84
+ request: Request;
85
+ /**
86
+ * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
87
+ * @example
88
+ * // app/routes.ts
89
+ * route("teams/:teamId", "./team.tsx"),
90
+ *
91
+ * // app/team.tsx
92
+ * export function clientLoader({
93
+ * params,
94
+ * }: Route.ClientLoaderArgs) {
95
+ * params.teamId;
96
+ * // ^ string
97
+ * }
98
+ **/
99
+ params: T["params"];
100
+ /**
101
+ * When `future.unstable_middleware` is not enabled, this is undefined.
102
+ *
103
+ * When `future.unstable_middleware` is enabled, this is an instance of
104
+ * `unstable_RouterContextProvider` and can be used to access context values
105
+ * from your route middlewares. You may pass in initial context values in your
106
+ * `<HydratedRouter unstable_getContext>` prop
107
+ */
108
+ context: unstable_RouterContextProvider;
109
+ };
110
+ type ServerDataFunctionArgs<T extends RouteInfo> = {
111
+ /** A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read the url, method, headers (such as cookies), and request body from the request. */
112
+ request: Request;
113
+ /**
114
+ * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
115
+ * @example
116
+ * // app/routes.ts
117
+ * route("teams/:teamId", "./team.tsx"),
118
+ *
119
+ * // app/team.tsx
120
+ * export function loader({
121
+ * params,
122
+ * }: Route.LoaderArgs) {
123
+ * params.teamId;
124
+ * // ^ string
125
+ * }
126
+ **/
127
+ params: T["params"];
128
+ /**
129
+ * Without `future.unstable_middleware` enabled, this is the context passed in
130
+ * to your server adapter's `getLoadContext` function. It's a way to bridge the
131
+ * gap between the adapter's request/response API with your React Router app.
132
+ * It is only applicable if you are using a custom server adapter.
133
+ *
134
+ * With `future.unstable_middleware` enabled, this is an instance of
135
+ * `unstable_RouterContextProvider` and can be used for type-safe access to
136
+ * context value set in your route middlewares. If you are using a custom
137
+ * server adapter, you may provide an initial set of context values from your
138
+ * `getLoadContext` function.
139
+ */
140
+ context: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext;
141
+ };
142
+ type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
143
+ type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<undefined>) => MaybePromise<void>;
144
+ type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
145
+ type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
146
+ /** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
147
+ serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
148
+ };
149
+ type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
150
+ type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
151
+ /** This is an asynchronous function that makes the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server action for this route. */
152
+ serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
153
+ };
154
+ type CreateHydrateFallbackProps<T extends RouteInfo> = {
155
+ params: T["params"];
156
+ loaderData?: T["loaderData"];
157
+ actionData?: T["actionData"];
158
+ };
159
+ type Match<T extends RouteInfo> = Pretty<Pick<T, "id" | "params"> & {
160
+ pathname: string;
161
+ data: T["loaderData"];
162
+ handle: unknown;
163
+ }>;
164
+ type Matches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [Match<F>, ...Matches<R>] : Array<Match<RouteInfo> | undefined>;
165
+ type CreateComponentProps<T extends RouteInfo> = {
166
+ /**
167
+ * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
168
+ * @example
169
+ * // app/routes.ts
170
+ * route("teams/:teamId", "./team.tsx"),
171
+ *
172
+ * // app/team.tsx
173
+ * export default function Component({
174
+ * params,
175
+ * }: Route.ComponentProps) {
176
+ * params.teamId;
177
+ * // ^ string
178
+ * }
179
+ **/
180
+ params: T["params"];
181
+ /** The data returned from the `loader` or `clientLoader` */
182
+ loaderData: T["loaderData"];
183
+ /** The data returned from the `action` or `clientAction` following an action submission. */
184
+ actionData?: T["actionData"];
185
+ /** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
186
+ matches: Matches<[...T["parents"], T]>;
187
+ };
188
+ type CreateErrorBoundaryProps<T extends RouteInfo> = {
189
+ /**
190
+ * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
191
+ * @example
192
+ * // app/routes.ts
193
+ * route("teams/:teamId", "./team.tsx"),
194
+ *
195
+ * // app/team.tsx
196
+ * export function ErrorBoundary({
197
+ * params,
198
+ * }: Route.ErrorBoundaryProps) {
199
+ * params.teamId;
200
+ * // ^ string
201
+ * }
202
+ **/
203
+ params: T["params"];
204
+ error: unknown;
205
+ loaderData?: T["loaderData"];
206
+ actionData?: T["actionData"];
207
+ };
208
+
209
+ export type { CreateActionData, CreateClientActionArgs, CreateClientLoaderArgs, CreateClientMiddlewareFunction, CreateComponentProps, CreateErrorBoundaryProps, CreateHydrateFallbackProps, CreateLoaderData, CreateMetaArgs, CreateServerActionArgs, CreateServerLoaderArgs, CreateServerMiddlewareFunction, HeadersArgs, LinkDescriptors, MetaDescriptors };
@@ -0,0 +1,209 @@
1
+ import { aE as LinkDescriptor, aB as MetaDescriptor, aT as ServerDataFrom, aU as ClientDataFrom, aV as Func, aW as unstable_MiddlewareNextFunction, E as Equal, u as unstable_RouterContextProvider, aX as Pretty } from '../../route-data-5OzAzQtT.js';
2
+ import { M as MiddlewareEnabled, A as AppLoadContext } from '../../future-ldDp5FKH.js';
3
+ import 'react';
4
+
5
+ type IsDefined<T> = Equal<T, undefined> extends true ? false : true;
6
+ type MaybePromise<T> = T | Promise<T>;
7
+ type RouteModule = {
8
+ meta?: Func;
9
+ links?: Func;
10
+ headers?: Func;
11
+ loader?: Func;
12
+ clientLoader?: Func;
13
+ action?: Func;
14
+ clientAction?: Func;
15
+ HydrateFallback?: unknown;
16
+ default?: unknown;
17
+ ErrorBoundary?: unknown;
18
+ [key: string]: unknown;
19
+ };
20
+ type LinkDescriptors = LinkDescriptor[];
21
+ type RouteInfo = {
22
+ parents: RouteInfo[];
23
+ module: RouteModule;
24
+ id: unknown;
25
+ file: string;
26
+ path: string;
27
+ params: unknown;
28
+ loaderData: unknown;
29
+ actionData: unknown;
30
+ };
31
+ type MetaMatch<T extends RouteInfo> = Pretty<Pick<T, "id" | "params"> & {
32
+ pathname: string;
33
+ meta: MetaDescriptor[];
34
+ data: T["loaderData"];
35
+ handle?: unknown;
36
+ error?: unknown;
37
+ }>;
38
+ type MetaMatches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<RouteInfo> | undefined>;
39
+ type CreateMetaArgs<T extends RouteInfo> = {
40
+ /** This is the current router `Location` object. This is useful for generating tags for routes at specific paths or query parameters. */
41
+ location: Location;
42
+ /** {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route. */
43
+ params: T["params"];
44
+ /** The return value for this route's server loader function */
45
+ data: T["loaderData"];
46
+ /** Thrown errors that trigger error boundaries will be passed to the meta function. This is useful for generating metadata for error pages. */
47
+ error?: unknown;
48
+ /** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
49
+ matches: MetaMatches<[...T["parents"], T]>;
50
+ };
51
+ type MetaDescriptors = MetaDescriptor[];
52
+ type HeadersArgs = {
53
+ loaderHeaders: Headers;
54
+ parentHeaders: Headers;
55
+ actionHeaders: Headers;
56
+ errorHeaders: Headers | undefined;
57
+ };
58
+ type IsHydrate<ClientLoader> = ClientLoader extends {
59
+ hydrate: true;
60
+ } ? true : ClientLoader extends {
61
+ hydrate: false;
62
+ } ? false : false;
63
+ type CreateLoaderData<T extends RouteModule> = _CreateLoaderData<ServerDataFrom<T["loader"]>, ClientDataFrom<T["clientLoader"]>, IsHydrate<T["clientLoader"]>, T extends {
64
+ HydrateFallback: Func;
65
+ } ? true : false>;
66
+ type _CreateLoaderData<ServerLoaderData, ClientLoaderData, ClientLoaderHydrate extends boolean, HasHydrateFallback> = [
67
+ HasHydrateFallback,
68
+ ClientLoaderHydrate
69
+ ] extends [true, true] ? IsDefined<ClientLoaderData> extends true ? ClientLoaderData : undefined : [
70
+ IsDefined<ClientLoaderData>,
71
+ IsDefined<ServerLoaderData>
72
+ ] extends [true, true] ? ServerLoaderData | ClientLoaderData : IsDefined<ClientLoaderData> extends true ? ClientLoaderData : IsDefined<ServerLoaderData> extends true ? ServerLoaderData : undefined;
73
+ type CreateActionData<T extends RouteModule> = _CreateActionData<ServerDataFrom<T["action"]>, ClientDataFrom<T["clientAction"]>>;
74
+ type _CreateActionData<ServerActionData, ClientActionData> = Awaited<[
75
+ IsDefined<ServerActionData>,
76
+ IsDefined<ClientActionData>
77
+ ] extends [true, true] ? ServerActionData | ClientActionData : IsDefined<ClientActionData> extends true ? ClientActionData : IsDefined<ServerActionData> extends true ? ServerActionData : undefined>;
78
+ type ClientDataFunctionArgs<T extends RouteInfo> = {
79
+ /**
80
+ * A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read the URL, the method, the "content-type" header, and the request body from the request.
81
+ *
82
+ * @note Because client data functions are called before a network request is made, the Request object does not include the headers which the browser automatically adds. React Router infers the "content-type" header from the enc-type of the form that performed the submission.
83
+ **/
84
+ request: Request;
85
+ /**
86
+ * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
87
+ * @example
88
+ * // app/routes.ts
89
+ * route("teams/:teamId", "./team.tsx"),
90
+ *
91
+ * // app/team.tsx
92
+ * export function clientLoader({
93
+ * params,
94
+ * }: Route.ClientLoaderArgs) {
95
+ * params.teamId;
96
+ * // ^ string
97
+ * }
98
+ **/
99
+ params: T["params"];
100
+ /**
101
+ * When `future.unstable_middleware` is not enabled, this is undefined.
102
+ *
103
+ * When `future.unstable_middleware` is enabled, this is an instance of
104
+ * `unstable_RouterContextProvider` and can be used to access context values
105
+ * from your route middlewares. You may pass in initial context values in your
106
+ * `<HydratedRouter unstable_getContext>` prop
107
+ */
108
+ context: unstable_RouterContextProvider;
109
+ };
110
+ type ServerDataFunctionArgs<T extends RouteInfo> = {
111
+ /** A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read the url, method, headers (such as cookies), and request body from the request. */
112
+ request: Request;
113
+ /**
114
+ * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
115
+ * @example
116
+ * // app/routes.ts
117
+ * route("teams/:teamId", "./team.tsx"),
118
+ *
119
+ * // app/team.tsx
120
+ * export function loader({
121
+ * params,
122
+ * }: Route.LoaderArgs) {
123
+ * params.teamId;
124
+ * // ^ string
125
+ * }
126
+ **/
127
+ params: T["params"];
128
+ /**
129
+ * Without `future.unstable_middleware` enabled, this is the context passed in
130
+ * to your server adapter's `getLoadContext` function. It's a way to bridge the
131
+ * gap between the adapter's request/response API with your React Router app.
132
+ * It is only applicable if you are using a custom server adapter.
133
+ *
134
+ * With `future.unstable_middleware` enabled, this is an instance of
135
+ * `unstable_RouterContextProvider` and can be used for type-safe access to
136
+ * context value set in your route middlewares. If you are using a custom
137
+ * server adapter, you may provide an initial set of context values from your
138
+ * `getLoadContext` function.
139
+ */
140
+ context: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext;
141
+ };
142
+ type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
143
+ type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<undefined>) => MaybePromise<void>;
144
+ type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
145
+ type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
146
+ /** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
147
+ serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
148
+ };
149
+ type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
150
+ type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
151
+ /** This is an asynchronous function that makes the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server action for this route. */
152
+ serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
153
+ };
154
+ type CreateHydrateFallbackProps<T extends RouteInfo> = {
155
+ params: T["params"];
156
+ loaderData?: T["loaderData"];
157
+ actionData?: T["actionData"];
158
+ };
159
+ type Match<T extends RouteInfo> = Pretty<Pick<T, "id" | "params"> & {
160
+ pathname: string;
161
+ data: T["loaderData"];
162
+ handle: unknown;
163
+ }>;
164
+ type Matches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [Match<F>, ...Matches<R>] : Array<Match<RouteInfo> | undefined>;
165
+ type CreateComponentProps<T extends RouteInfo> = {
166
+ /**
167
+ * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
168
+ * @example
169
+ * // app/routes.ts
170
+ * route("teams/:teamId", "./team.tsx"),
171
+ *
172
+ * // app/team.tsx
173
+ * export default function Component({
174
+ * params,
175
+ * }: Route.ComponentProps) {
176
+ * params.teamId;
177
+ * // ^ string
178
+ * }
179
+ **/
180
+ params: T["params"];
181
+ /** The data returned from the `loader` or `clientLoader` */
182
+ loaderData: T["loaderData"];
183
+ /** The data returned from the `action` or `clientAction` following an action submission. */
184
+ actionData?: T["actionData"];
185
+ /** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
186
+ matches: Matches<[...T["parents"], T]>;
187
+ };
188
+ type CreateErrorBoundaryProps<T extends RouteInfo> = {
189
+ /**
190
+ * {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
191
+ * @example
192
+ * // app/routes.ts
193
+ * route("teams/:teamId", "./team.tsx"),
194
+ *
195
+ * // app/team.tsx
196
+ * export function ErrorBoundary({
197
+ * params,
198
+ * }: Route.ErrorBoundaryProps) {
199
+ * params.teamId;
200
+ * // ^ string
201
+ * }
202
+ **/
203
+ params: T["params"];
204
+ error: unknown;
205
+ loaderData?: T["loaderData"];
206
+ actionData?: T["actionData"];
207
+ };
208
+
209
+ export type { CreateActionData, CreateClientActionArgs, CreateClientLoaderArgs, CreateClientMiddlewareFunction, CreateComponentProps, CreateErrorBoundaryProps, CreateHydrateFallbackProps, CreateLoaderData, CreateMetaArgs, CreateServerActionArgs, CreateServerLoaderArgs, CreateServerMiddlewareFunction, HeadersArgs, LinkDescriptors, MetaDescriptors };
@@ -0,0 +1,28 @@
1
+ /**
2
+ * react-router v7.5.0
3
+ *
4
+ * Copyright (c) Remix Software Inc.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE.md file in the root directory of this source tree.
8
+ *
9
+ * @license MIT
10
+ */
11
+ "use strict";
12
+ var __defProp = Object.defineProperty;
13
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
14
+ var __getOwnPropNames = Object.getOwnPropertyNames;
15
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
16
+ var __copyProps = (to, from, except, desc) => {
17
+ if (from && typeof from === "object" || typeof from === "function") {
18
+ for (let key of __getOwnPropNames(from))
19
+ if (!__hasOwnProp.call(to, key) && key !== except)
20
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
21
+ }
22
+ return to;
23
+ };
24
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
+
26
+ // lib/types/route-module.ts
27
+ var route_module_exports = {};
28
+ module.exports = __toCommonJS(route_module_exports);