@resistdesign/voltra 3.0.0-alpha.5 → 3.0.0-alpha.51

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 (222) hide show
  1. package/README.md +392 -14
  2. package/api/DBX/DBXAsserts.d.ts +95 -0
  3. package/api/DBX/DBXRequest.d.ts +5 -0
  4. package/api/DBX/DBXRuntime.d.ts +5 -0
  5. package/api/DBX/DBXScenarioConfig.d.ts +9 -0
  6. package/api/DBX/DBXSeed.d.ts +124 -0
  7. package/api/DBX/DBXTypes.d.ts +176 -0
  8. package/api/DBX/index.d.ts +8 -0
  9. package/api/DataAccessControl.d.ts +220 -0
  10. package/api/Indexing/API.d.ts +224 -0
  11. package/api/Indexing/Cursor.d.ts +101 -0
  12. package/api/Indexing/Handler/Config.d.ts +39 -0
  13. package/api/Indexing/Handler.d.ts +166 -0
  14. package/api/Indexing/Trace.d.ts +54 -0
  15. package/api/Indexing/Types.d.ts +204 -0
  16. package/api/Indexing/ddb/AwsSdkV3Adapter.d.ts +8 -0
  17. package/api/Indexing/ddb/Types.d.ts +209 -0
  18. package/api/Indexing/docId.d.ts +27 -0
  19. package/api/Indexing/exact/ExactDdb.d.ts +58 -0
  20. package/api/Indexing/exact/ExactIndex.d.ts +90 -0
  21. package/api/Indexing/exact/ExactS3.d.ts +41 -0
  22. package/api/Indexing/fieldQualification.d.ts +12 -0
  23. package/api/Indexing/fulltext/FullTextDdbBackend.d.ts +212 -0
  24. package/api/Indexing/fulltext/FullTextMemoryBackend.d.ts +93 -0
  25. package/api/Indexing/fulltext/Schema.d.ts +164 -0
  26. package/api/Indexing/hashUniversal.d.ts +13 -0
  27. package/api/Indexing/index.d.ts +45 -0
  28. package/api/Indexing/lossy/LossyDdb.d.ts +43 -0
  29. package/api/Indexing/lossy/LossyIndex.d.ts +72 -0
  30. package/api/Indexing/lossy/LossyS3.d.ts +40 -0
  31. package/api/Indexing/rel/Cursor.d.ts +25 -0
  32. package/api/Indexing/rel/Handlers.d.ts +144 -0
  33. package/api/Indexing/rel/RelationalDdb.d.ts +169 -0
  34. package/api/Indexing/rel/RelationalInMemoryBackend.d.ts +38 -0
  35. package/api/Indexing/rel/Types.d.ts +69 -0
  36. package/api/Indexing/structured/Cursor.d.ts +26 -0
  37. package/api/Indexing/structured/Handlers.d.ts +128 -0
  38. package/api/Indexing/structured/SearchStructured.d.ts +44 -0
  39. package/api/Indexing/structured/StructuredDdb.d.ts +184 -0
  40. package/api/Indexing/structured/StructuredDdbBackend.d.ts +112 -0
  41. package/api/Indexing/structured/StructuredInMemoryBackend.d.ts +40 -0
  42. package/api/Indexing/structured/StructuredInMemoryIndex.d.ts +61 -0
  43. package/api/Indexing/structured/StructuredStringLike.d.ts +54 -0
  44. package/api/Indexing/structured/StructuredWriter.d.ts +74 -0
  45. package/api/Indexing/structured/Types.d.ts +126 -0
  46. package/api/Indexing/structured/index.d.ts +9 -0
  47. package/api/Indexing/tokenize.d.ts +31 -0
  48. package/api/ORM/DACUtils.d.ts +270 -0
  49. package/api/ORM/ListItemUtils.d.ts +40 -0
  50. package/api/ORM/ORMRouteMap.d.ts +70 -0
  51. package/api/ORM/TypeInfoORMService.d.ts +879 -0
  52. package/api/ORM/drivers/DynamoDBDataItemDBDriver/ConfigTypes.d.ts +229 -0
  53. package/api/ORM/drivers/DynamoDBDataItemDBDriver.d.ts +90 -0
  54. package/api/ORM/drivers/InMemoryDataItemDBDriver/ConfigTypes.d.ts +4 -0
  55. package/api/ORM/drivers/InMemoryDataItemDBDriver.d.ts +56 -0
  56. package/api/ORM/drivers/InMemoryFileItemDBDriver/ConfigTypes.d.ts +13 -0
  57. package/api/ORM/drivers/InMemoryFileItemDBDriver.d.ts +98 -0
  58. package/api/ORM/drivers/InMemoryItemRelationshipDBDriver.d.ts +16 -0
  59. package/api/ORM/drivers/IndexingRelationshipDriver.d.ts +123 -0
  60. package/api/ORM/drivers/S3FileItemDBDriver/ConfigTypes.d.ts +322 -0
  61. package/api/ORM/drivers/S3FileItemDBDriver/S3FileDriver.d.ts +118 -0
  62. package/api/ORM/drivers/S3FileItemDBDriver.d.ts +71 -0
  63. package/api/ORM/drivers/common/SupportedTypeInfoORMDBDrivers.d.ts +36 -0
  64. package/api/ORM/drivers/common/Types.d.ts +202 -0
  65. package/api/ORM/drivers/common/index.d.ts +2 -0
  66. package/api/ORM/drivers/index.d.ts +8 -0
  67. package/api/ORM/getTypeInfoORMIndexingConfigFromTypeInfoMap.d.ts +31 -0
  68. package/api/ORM/index.d.ts +10 -0
  69. package/api/ORM/indexing/criteriaToStructuredWhere.d.ts +22 -0
  70. package/api/Router/AWS.d.ts +80 -0
  71. package/api/Router/Auth.d.ts +14 -0
  72. package/api/Router/CORS.d.ts +66 -0
  73. package/api/Router/Types.d.ts +138 -0
  74. package/api/Router/index.d.ts +89 -0
  75. package/api/index.d.ts +72 -6
  76. package/api/index.js +3553 -1948
  77. package/app/forms/Engine.d.ts +23 -0
  78. package/app/forms/UI.d.ts +83 -0
  79. package/app/forms/core/createAutoField.d.ts +43 -0
  80. package/app/forms/core/createFormRenderer.d.ts +25 -0
  81. package/app/forms/core/getFieldKind.d.ts +14 -0
  82. package/app/forms/core/index.d.ts +11 -0
  83. package/app/forms/core/mergeSuites.d.ts +23 -0
  84. package/app/forms/core/resolveSuite.d.ts +15 -0
  85. package/app/forms/core/types.d.ts +180 -0
  86. package/app/forms/index.d.ts +9 -0
  87. package/app/forms/types.d.ts +137 -0
  88. package/app/helpers/styled.d.ts +3 -0
  89. package/app/index.d.ts +116 -5
  90. package/app/index.js +120 -382
  91. package/app/utils/ApplicationState.d.ts +161 -0
  92. package/app/utils/ApplicationStateLoader.d.ts +91 -0
  93. package/app/utils/Controller.d.ts +10 -0
  94. package/app/utils/Debug.d.ts +14 -0
  95. package/app/utils/EasyLayout.d.ts +89 -0
  96. package/app/utils/History.d.ts +165 -0
  97. package/app/utils/Route.d.ts +207 -0
  98. package/app/utils/RouteHistory.d.ts +27 -0
  99. package/app/utils/Service.d.ts +45 -0
  100. package/app/utils/TypeInfoORMAPIUtils.d.ts +94 -0
  101. package/app/utils/TypeInfoORMClient.d.ts +104 -0
  102. package/app/utils/UniversalRouteAdapter.d.ts +73 -0
  103. package/app/utils/easy-layout/computeAreaBounds.d.ts +5 -0
  104. package/app/utils/easy-layout/computeTracks.d.ts +16 -0
  105. package/app/utils/easy-layout/index.d.ts +5 -0
  106. package/app/utils/easy-layout/parseTemplate.d.ts +12 -0
  107. package/app/utils/easy-layout/types.d.ts +52 -0
  108. package/app/utils/easy-layout/validateAreas.d.ts +5 -0
  109. package/app/utils/index.d.ts +24 -0
  110. package/build/TypeMapping.d.ts +17 -0
  111. package/build/TypeParsing.d.ts +10 -0
  112. package/build/index.d.ts +15 -0
  113. package/build/index.js +569 -0
  114. package/chunk-2JDOM6PB.js +138 -0
  115. package/chunk-3HVYVX3S.js +546 -0
  116. package/chunk-ATO2455Q.js +258 -0
  117. package/chunk-BSHQIRBV.js +71 -0
  118. package/chunk-I2KLQ2HA.js +19 -0
  119. package/chunk-K4R2PFNG.js +1258 -0
  120. package/chunk-TJFTWPXQ.js +39 -0
  121. package/chunk-XHOMAXLR.js +84 -0
  122. package/common/CommandLine/collectRequiredEnvironmentVariables.d.ts +9 -0
  123. package/common/CommandLine/index.d.ts +6 -0
  124. package/common/HelperTypes.d.ts +9 -0
  125. package/common/IdGeneration/getSimpleId.d.ts +8 -0
  126. package/common/IdGeneration/index.d.ts +1 -0
  127. package/common/ItemRelationshipInfoTypes.d.ts +64 -0
  128. package/common/ItemRelationships/ItemRelationshipValidation.d.ts +21 -0
  129. package/common/ItemRelationships/index.d.ts +2 -0
  130. package/common/Logging/Utils.d.ts +10 -0
  131. package/common/Logging/index.d.ts +1 -0
  132. package/common/Routing.d.ts +81 -0
  133. package/common/SearchTypes.d.ts +227 -0
  134. package/common/SearchUtils.d.ts +55 -0
  135. package/common/SearchValidation.d.ts +27 -0
  136. package/common/StringTransformers.d.ts +28 -0
  137. package/common/Testing/CLI.d.ts +6 -0
  138. package/common/Testing/Types.d.ts +216 -0
  139. package/common/Testing/Utils.d.ts +112 -0
  140. package/common/Testing/index.d.ts +8 -0
  141. package/common/TypeInfoDataItemUtils.d.ts +39 -0
  142. package/{Types-C7XjUjoF.d.ts → common/TypeInfoORM/Types.d.ts} +150 -20
  143. package/common/TypeInfoORM/index.d.ts +3 -0
  144. package/common/TypeParsing/Constants.d.ts +4 -0
  145. package/common/TypeParsing/ParsingUtils/Constants.d.ts +8 -0
  146. package/common/TypeParsing/ParsingUtils/checkType.d.ts +14 -0
  147. package/common/TypeParsing/ParsingUtils/checkUnionType.d.ts +12 -0
  148. package/common/TypeParsing/ParsingUtils/extractCommentTags.d.ts +8 -0
  149. package/common/TypeParsing/ParsingUtils/extractLiteralValues.d.ts +12 -0
  150. package/common/TypeParsing/ParsingUtils/extractTypeDetails.d.ts +14 -0
  151. package/common/TypeParsing/ParsingUtils/getPrimaryFieldForTypeInfo.d.ts +18 -0
  152. package/common/TypeParsing/ParsingUtils/getTypeInfo.d.ts +9 -0
  153. package/common/TypeParsing/ParsingUtils/getTypeInfoField.d.ts +9 -0
  154. package/common/TypeParsing/ParsingUtils/getTypeInfoFromAliasType.d.ts +11 -0
  155. package/common/TypeParsing/ParsingUtils/getTypeInfoFromFieldFilter.d.ts +12 -0
  156. package/common/TypeParsing/ParsingUtils/getTypeInfoFromTypeAlias.d.ts +11 -0
  157. package/common/TypeParsing/ParsingUtils/getTypeKeyword.d.ts +9 -0
  158. package/common/TypeParsing/ParsingUtils/getUnionOrIntersectionTypeInfo.d.ts +11 -0
  159. package/common/TypeParsing/ParsingUtils/getUnionOrLiteralStringValues.d.ts +8 -0
  160. package/common/TypeParsing/TypeInfo.d.ts +235 -0
  161. package/common/TypeParsing/Utils.d.ts +47 -0
  162. package/common/TypeParsing/Validation.d.ts +327 -0
  163. package/common/TypeParsing/index.d.ts +8 -0
  164. package/common/index.d.ts +47 -4
  165. package/common/index.js +25 -1737
  166. package/{index-BkFZlfit.d.ts → iac/SimpleCFT.d.ts} +5 -25
  167. package/iac/index.d.ts +40 -2
  168. package/iac/index.js +2 -1661
  169. package/iac/packs/auth.d.ts +131 -0
  170. package/iac/packs/build/utils.d.ts +289 -0
  171. package/iac/packs/build.d.ts +92 -0
  172. package/iac/packs/cdn.d.ts +33 -0
  173. package/iac/packs/cloud-function.d.ts +67 -0
  174. package/iac/packs/database.d.ts +32 -0
  175. package/iac/packs/dns.d.ts +34 -0
  176. package/iac/packs/file-storage.d.ts +46 -0
  177. package/iac/packs/gateway.d.ts +82 -0
  178. package/iac/packs/index.d.ts +60 -1
  179. package/iac/packs/index.js +391 -594
  180. package/iac/packs/repo.d.ts +28 -0
  181. package/iac/packs/ssl-certificate.d.ts +28 -0
  182. package/iac/types/Constants.d.ts +24 -0
  183. package/{index-DcvJOZ_c.d.ts → iac/types/IaCTypes.d.ts} +23 -1018
  184. package/iac/types/Renderers.d.ts +96 -0
  185. package/iac/types/Types.d.ts +131 -0
  186. package/iac/types/Utils.d.ts +9 -0
  187. package/iac/types/generate.d.ts +1 -0
  188. package/iac/utils/index.d.ts +87 -0
  189. package/iac/utils/patch-utils.d.ts +66 -0
  190. package/iac-packs/index.d.ts +6 -0
  191. package/native/forms/UI.d.ts +73 -0
  192. package/native/forms/createNativeFormRenderer.d.ts +21 -0
  193. package/native/forms/index.d.ts +25 -0
  194. package/native/forms/primitives/index.d.ts +38 -0
  195. package/native/forms/suite.d.ts +15 -0
  196. package/native/index.d.ts +19 -0
  197. package/native/index.js +792 -0
  198. package/native/testing/react-native.d.ts +46 -0
  199. package/native/utils/EasyLayout.d.ts +88 -0
  200. package/native/utils/History.d.ts +124 -0
  201. package/native/utils/NavButton.d.ts +25 -0
  202. package/native/utils/Route.d.ts +41 -0
  203. package/native/utils/index.d.ts +25 -0
  204. package/package.json +54 -21
  205. package/web/forms/UI.d.ts +74 -0
  206. package/web/forms/createWebFormRenderer.d.ts +21 -0
  207. package/web/forms/index.d.ts +9 -0
  208. package/web/forms/primitives/index.d.ts +21 -0
  209. package/web/forms/suite.d.ts +15 -0
  210. package/web/index.d.ts +15 -0
  211. package/web/index.js +701 -0
  212. package/web/utils/EasyLayout.d.ts +47 -0
  213. package/web/utils/NavLink.d.ts +24 -0
  214. package/web/utils/Route.d.ts +16 -0
  215. package/web/utils/index.d.ts +8 -0
  216. package/SearchTypes-DjN6YQzE.d.ts +0 -577
  217. package/Validation-CFP59oIP.d.ts +0 -226
  218. package/index-C3-iD9Mh.d.ts +0 -690
  219. package/index-CK5Qwvfb.d.ts +0 -5378
  220. package/index-IokxSNxm.d.ts +0 -745
  221. package/index.d.ts +0 -13
  222. package/index.js +0 -11005
@@ -0,0 +1,207 @@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * Render-agnostic routing helpers with nested Route contexts.
5
+ * Supply a RouteAdapter via RouteProvider or use root Route provider mode.
6
+ */
7
+ import { PropsWithChildren } from "react";
8
+ import { type UniversalRouteIngress } from "./UniversalRouteAdapter";
9
+ /**
10
+ * Platform adapter that supplies the current path and change notifications.
11
+ */
12
+ export type RouteAdapter = {
13
+ /** Read the current path. */
14
+ getPath: () => string;
15
+ /** Subscribe to path changes. */
16
+ subscribe: (listener: (path: string) => void) => () => void;
17
+ /**
18
+ * Optional navigation helper for adapters that can push state.
19
+ *
20
+ * `push`/`replace` paths are normalized through shared routing utils:
21
+ * absolute (`/x`), relative (`x`, `./x`, `../x`), and empty (`""` => `/`).
22
+ */
23
+ push?: (path: string, title?: string) => void;
24
+ /** Optional navigation helper for adapters that can replace state. */
25
+ replace?: (path: string, title?: string) => void;
26
+ /** Optional navigation helper for adapters that can go backward. */
27
+ back?: () => void;
28
+ /** Optional capability check for backward navigation. */
29
+ canGoBack?: () => boolean;
30
+ };
31
+ /**
32
+ * Optional runtime integration for root Route provider mode.
33
+ *
34
+ * Use this to layer platform-specific side effects (for example, native
35
+ * hardware back wiring) without coupling core app routing to a platform API.
36
+ */
37
+ export type RouteRuntimeIntegration = {
38
+ /**
39
+ * Start integration against the active adapter.
40
+ *
41
+ * Return a cleanup function when teardown is required.
42
+ */
43
+ setup: (adapter: RouteAdapter) => void | (() => void);
44
+ };
45
+ /**
46
+ * Supported query value types for route serialization.
47
+ */
48
+ export type RouteQueryValue = string | number | boolean | null | undefined | Array<string | number | boolean | null | undefined>;
49
+ /**
50
+ * Query string map for route serialization.
51
+ */
52
+ export type RouteQuery = Record<string, RouteQueryValue>;
53
+ /**
54
+ * Route path matcher config.
55
+ */
56
+ export type RoutePathConfig = {
57
+ /** Path pattern, using `:` for params. */
58
+ path: string;
59
+ /** Optional exact-match override for this path entry. */
60
+ exact?: boolean;
61
+ };
62
+ /**
63
+ * Create a manual adapter for non-DOM runtimes (e.g., React Native).
64
+ *
65
+ * Call `updatePath` when navigation changes.
66
+ */
67
+ export declare const createManualRouteAdapter: (initialPath?: string) => {
68
+ adapter: RouteAdapter;
69
+ updatePath: (nextPath: string) => void;
70
+ };
71
+ /**
72
+ * Build a query string from a query object.
73
+ *
74
+ * @param query - Query string map.
75
+ * @returns Encoded query string without the leading `?`.
76
+ */
77
+ export declare const buildQueryString: (query?: RouteQuery) => string;
78
+ /**
79
+ * Build a path string from segments and optional query params.
80
+ *
81
+ * @param segments - Ordered route segments.
82
+ * @param query - Optional query parameters.
83
+ * @returns Path string with optional query string.
84
+ */
85
+ export declare const buildRoutePath: (segments: Array<string | number>, query?: RouteQuery) => string;
86
+ /**
87
+ * Access values for the current `Route`.
88
+ *
89
+ * `parentPath` is the consumer-facing route pattern for the currently matched
90
+ * parent route chain, expressed as plain slash-delimited segments such as
91
+ * `app/books/:id`.
92
+ *
93
+ * `parentPathInternal` carries the same logical route pattern in the
94
+ * JSON-serialized segment format used by the shared routing internals. Most
95
+ * consumers should prefer `parentPath`.
96
+ */
97
+ export type RouteContextType = {
98
+ /**
99
+ * Current window pathname (top-level) or inherited path (nested).
100
+ */
101
+ currentWindowPath: string;
102
+ /**
103
+ * Consumer-facing parent route pattern for this route level.
104
+ *
105
+ * Example: `app/books/:id`
106
+ */
107
+ parentPath: string;
108
+ /**
109
+ * Internal parent route pattern used by routing utilities and matcher logic.
110
+ *
111
+ * Example: `"app"/"books"/":id"`
112
+ */
113
+ parentPathInternal: string;
114
+ /**
115
+ * Aggregated route params from parent and current routes.
116
+ */
117
+ params: Record<string, any>;
118
+ /**
119
+ * Whether this route is the top-level router.
120
+ */
121
+ isTopLevel: boolean;
122
+ /**
123
+ * Absolute matched path used as the base for relative navigation at this
124
+ * route level.
125
+ */
126
+ adapterBasePath: string;
127
+ /**
128
+ * Adapter driving route updates.
129
+ */
130
+ adapter?: RouteAdapter;
131
+ };
132
+ /**
133
+ * React context for route state and parameters.
134
+ */
135
+ export declare const RouteContext: import("react").Context<RouteContextType>;
136
+ export declare const RouteContextProvider: import("react").Provider<RouteContextType>, RouteContextConsumer: import("react").Consumer<RouteContextType>;
137
+ /**
138
+ * Access Route path and parameter information.
139
+ *
140
+ * Use `parentPath` for app-facing route logic. `parentPathInternal` is exposed
141
+ * so advanced integrations can align with the internal routing helpers when
142
+ * needed.
143
+ *
144
+ * @returns The current route context.
145
+ */
146
+ export declare const useRouteContext: () => RouteContextType;
147
+ /**
148
+ * Wrap a RouteAdapter so `push` and `replace` resolve relative paths.
149
+ *
150
+ * This preserves existing adapter behavior for subscriptions/back navigation,
151
+ * while normalizing path syntax consistently across web/native/app wrappers.
152
+ *
153
+ * @param adapter - RouteAdapter to normalize.
154
+ * @returns Adapter with relative-aware `push` and `replace`.
155
+ */
156
+ export declare const wrapRouteAdapterWithPathResolver: (adapter: RouteAdapter, getBasePath?: () => string) => RouteAdapter;
157
+ /**
158
+ * RouteProvider props.
159
+ */
160
+ export type RouteProviderProps = PropsWithChildren<{
161
+ /** Adapter that supplies path updates. */
162
+ adapter: RouteAdapter;
163
+ /** Optional initial path override. */
164
+ initialPath?: string;
165
+ }>;
166
+ /**
167
+ * Provide a RouteAdapter to the routing context.
168
+ *
169
+ * @param props - Provider props with adapter and children.
170
+ */
171
+ export declare const RouteProvider: ({ adapter, initialPath, children, }: RouteProviderProps) => import("react/jsx-runtime").JSX.Element;
172
+ /**
173
+ * Configure the Route.
174
+ */
175
+ export type RouteProps<ParamsType extends Record<string, any>> = {
176
+ /**
177
+ * Route path pattern(s), using `:` for params.
178
+ */
179
+ path?: string | (string | RoutePathConfig)[];
180
+ /**
181
+ * Callback when params update for this route.
182
+ *
183
+ * @param params - Resolved params for this route.
184
+ */
185
+ onParamsChange?: (params: ParamsType) => void;
186
+ /**
187
+ * Require an exact match for the route path.
188
+ */
189
+ exact?: boolean;
190
+ /**
191
+ * Optional initial path override for root provider mode only.
192
+ */
193
+ initialPath?: string;
194
+ /**
195
+ * Optional adapter override for root provider mode only.
196
+ */
197
+ adapter?: RouteAdapter;
198
+ /**
199
+ * Optional external URL ingress for root provider mode only.
200
+ */
201
+ ingress?: UniversalRouteIngress;
202
+ /**
203
+ * Optional runtime integration hook for root provider mode only.
204
+ */
205
+ runtimeIntegration?: RouteRuntimeIntegration;
206
+ };
207
+ export declare const Route: <ParamsType extends Record<string, any>>(props: PropsWithChildren<RouteProps<ParamsType>>) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * Bridge helpers between HistoryController and RouteAdapter.
5
+ */
6
+ import type { HistoryController } from "./History";
7
+ import type { RouteAdapter } from "./Route";
8
+ /**
9
+ * Create a RouteAdapter from a shared history controller.
10
+ *
11
+ * Route matching is path-based, so this adapter surfaces `location.path`
12
+ * (query/hash are intentionally omitted from Route context matching).
13
+ *
14
+ * Adapter navigation methods call history with `replaceSearch: true` so a
15
+ * path-only navigation does not accidentally retain a previous query string.
16
+ * Relative navigation input is resolved against the current history path.
17
+ *
18
+ * Example:
19
+ * ```ts
20
+ * const history = createMemoryHistory("/app/books/42?tab=summary");
21
+ * const adapter = createRouteAdapterFromHistory(history);
22
+ * adapter.push?.("/app/books/99");
23
+ * // history.location.path === "/app/books/99"
24
+ * // history.location.search === undefined
25
+ * ```
26
+ */
27
+ export declare const createRouteAdapterFromHistory: (history: HistoryController) => RouteAdapter;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * The HTTP service configuration, including authorization, to be used for a service call.
3
+ * */
4
+ export type ServiceConfig = {
5
+ /**
6
+ * URL protocol (http or https).
7
+ * */
8
+ protocol: string;
9
+ /**
10
+ * Service domain or host.
11
+ * */
12
+ domain: string;
13
+ /**
14
+ * Optional port override.
15
+ * */
16
+ port?: number;
17
+ /**
18
+ * Base path to prefix all request paths.
19
+ * */
20
+ basePath?: string;
21
+ /**
22
+ * Bearer token for authorization.
23
+ * */
24
+ authorization?: string;
25
+ };
26
+ /**
27
+ * Build the full URL for a service call from config pieces.
28
+ *
29
+ * @param protocol - URL protocol (http or https).
30
+ * @param domain - Service domain or host.
31
+ * @param basePath - Base path to prefix all requests.
32
+ * @param path - Endpoint path to append.
33
+ * @param port - Optional port override.
34
+ * @returns Fully qualified URL string.
35
+ */
36
+ export declare const getFullUrl: (protocol: string, domain: string, basePath?: string, path?: string, port?: number) => string;
37
+ /**
38
+ * Send a POST request to a service endpoint with JSON arguments.
39
+ *
40
+ * @param config - Service configuration for the request.
41
+ * @param path - Endpoint path to call.
42
+ * @param args - JSON-serializable arguments to send.
43
+ * @returns Parsed JSON response.
44
+ */
45
+ export declare const sendServiceRequest: (config: ServiceConfig, path?: string, args?: any[]) => Promise<any>;
@@ -0,0 +1,94 @@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * Hook utilities that wrap a {@link TypeInfoORMClientAPI} with request state
5
+ * tracking.
6
+ * Each method returns a request id and updates loading/data/error state per method.
7
+ */
8
+ import { TypeInfoORMClientAPI, TypeInfoORMServiceError } from "../../common/TypeInfoORM";
9
+ import type { ExpandComplexType } from "../../common/HelperTypes";
10
+ /**
11
+ * Sync request handler that returns a request id.
12
+ *
13
+ * @param args - Arguments for the API method.
14
+ * @returns Request id for tracking.
15
+ * */
16
+ export type SyncRequestHandler<ArgsType extends any[]> = (...args: ArgsType) => string;
17
+ /**
18
+ * Synchronous wrapper API that returns a request id for each method.
19
+ * */
20
+ export type TypeInfoORMServiceAPI = ExpandComplexType<{
21
+ [K in keyof TypeInfoORMClientAPI]: TypeInfoORMClientAPI[K] extends (...args: infer A) => Promise<any> ? SyncRequestHandler<A> : TypeInfoORMClientAPI[K];
22
+ }>;
23
+ /**
24
+ * Request state for a single TypeInfoORM API method.
25
+ * */
26
+ export type BaseTypeInfoORMAPIRequestState = {
27
+ /**
28
+ * Whether the request is currently loading.
29
+ * */
30
+ loading?: boolean;
31
+ /**
32
+ * Latest successful response data.
33
+ * */
34
+ data?: any;
35
+ /**
36
+ * Latest request error.
37
+ * */
38
+ error?: TypeInfoORMServiceError;
39
+ };
40
+ /**
41
+ * Request state plus tracking of active request ids.
42
+ * */
43
+ export type TypeInfoORMAPIRequestState = ExpandComplexType<BaseTypeInfoORMAPIRequestState & {
44
+ /**
45
+ * Active request ids for this method.
46
+ * */
47
+ activeRequests?: string[];
48
+ }>;
49
+ type RequestStateChangeHandler = (methodName: keyof TypeInfoORMClientAPI, requestId: string, requestState: BaseTypeInfoORMAPIRequestState) => void;
50
+ /**
51
+ * Request state keyed by TypeInfoORM API method.
52
+ */
53
+ export type TypeInfoORMAPIState = Partial<Record<keyof TypeInfoORMClientAPI, TypeInfoORMAPIRequestState>>;
54
+ /**
55
+ * Hook return shape for request state and wrapped API.
56
+ * */
57
+ export type TypeInfoORMAPIController = {
58
+ /**
59
+ * Request state keyed by method name.
60
+ * */
61
+ state: TypeInfoORMAPIState;
62
+ /**
63
+ * Wrapped API that returns request ids.
64
+ * */
65
+ api: TypeInfoORMServiceAPI;
66
+ };
67
+ /**
68
+ * Execute a request and emit request state changes.
69
+ *
70
+ * @param requestId - Unique id for this request.
71
+ * @param args - Arguments to pass to the API method.
72
+ * @param typeInfoORMAPI - API instance to call.
73
+ * @param methodName - Method name to invoke.
74
+ * @param onRequestStateChange - Handler for request state updates.
75
+ * @returns Promise resolved when request state is updated.
76
+ * */
77
+ export declare const handleRequest: (requestId: string, args: any[], typeInfoORMAPI: TypeInfoORMClientAPI, methodName: keyof TypeInfoORMClientAPI, onRequestStateChange: RequestStateChangeHandler) => Promise<void>;
78
+ /**
79
+ * Create a sync handler that dispatches async requests.
80
+ *
81
+ * @param typeInfoORMAPI - API instance to call.
82
+ * @param methodName - Method name to invoke.
83
+ * @param onRequestStateChange - Handler for request state updates.
84
+ * @returns Sync handler that returns a request id.
85
+ * */
86
+ export declare const requestHandlerFactory: (typeInfoORMAPI: TypeInfoORMClientAPI, methodName: keyof TypeInfoORMClientAPI, onRequestStateChange: RequestStateChangeHandler) => SyncRequestHandler<any>;
87
+ /**
88
+ * Wrap a TypeInfoORM API instance with request tracking state.
89
+ *
90
+ * @param typeInfoORMAPI - API instance to wrap.
91
+ * @returns Controller with request state and wrapped API methods.
92
+ * */
93
+ export declare const useTypeInfoORMAPI: (typeInfoORMAPI: TypeInfoORMClientAPI) => TypeInfoORMAPIController;
94
+ export {};
@@ -0,0 +1,104 @@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * Client wrapper around the TypeInfoORM API RouteMap. Uses ServiceConfig to
5
+ * route requests to the server-side TypeInfoORM routes.
6
+ */
7
+ import { DeleteRelationshipResults, TypeInfoORMClientAPI, TypeInfoORMAPIRoutePaths, TypeInfoORMUpdateConfig } from "../../common/TypeInfoORM";
8
+ import { ServiceConfig } from "./Service";
9
+ import { TypeInfoDataItem } from "../../common/TypeParsing/TypeInfo";
10
+ import { ListItemsConfig, ListItemsResults, ListRelationshipsConfig } from "../../common/SearchTypes";
11
+ import { BaseItemRelationshipInfo, ItemRelationshipInfo } from "../../common/ItemRelationshipInfoTypes";
12
+ /**
13
+ * Client implementation of the client-safe TypeInfoORMClientAPI contract.
14
+ *
15
+ * @param config - The configuration pointing to the Type Info ORM `RouteMap`.
16
+ * */
17
+ export declare class TypeInfoORMClient implements TypeInfoORMClientAPI {
18
+ private config;
19
+ /**
20
+ * Create a client for TypeInfoORM routes.
21
+ *
22
+ * @param config - Service configuration for the API routes.
23
+ */
24
+ constructor(config: ServiceConfig);
25
+ /**
26
+ * Dispatch a request to the configured service.
27
+ *
28
+ * @param path - Route path for the ORM method.
29
+ * @param args - Arguments to send in the request body.
30
+ * @returns Parsed response payload.
31
+ */
32
+ protected makeRequest: (path: TypeInfoORMAPIRoutePaths, args: any[]) => Promise<any>;
33
+ /**
34
+ * Create an item of the provided type.
35
+ *
36
+ * @param typeName - TypeInfo type name.
37
+ * @param item - Item payload to persist.
38
+ * @returns The created item result.
39
+ */
40
+ create: (typeName: string, item: TypeInfoDataItem) => Promise<any>;
41
+ /**
42
+ * Read an item by its primary field value.
43
+ *
44
+ * @param typeName - TypeInfo type name.
45
+ * @param primaryFieldValue - Primary field value to lookup.
46
+ * @returns The retrieved item, if found.
47
+ */
48
+ read: (typeName: string, primaryFieldValue: any, selectedFields?: (keyof TypeInfoDataItem)[]) => Promise<TypeInfoDataItem>;
49
+ /**
50
+ * Update an item by replacing it with the provided payload.
51
+ *
52
+ * @param typeName - TypeInfo type name.
53
+ * @param item - Updated item payload.
54
+ * @param updateConfig - Optional per-field operator config.
55
+ * @returns Whether the update succeeded.
56
+ */
57
+ update: (typeName: string, item: TypeInfoDataItem, updateConfig?: TypeInfoORMUpdateConfig) => Promise<boolean>;
58
+ /**
59
+ * Delete an item by its primary field value.
60
+ *
61
+ * @param typeName - TypeInfo type name.
62
+ * @param primaryFieldValue - Primary field value to delete.
63
+ * @returns Whether the delete succeeded.
64
+ */
65
+ delete: (typeName: string, primaryFieldValue: any) => Promise<boolean>;
66
+ /**
67
+ * List items for a given type.
68
+ *
69
+ * @param typeName - TypeInfo type name.
70
+ * @param config - List configuration including filters and paging.
71
+ * @param selectedFields - Optional fields to project.
72
+ * @returns List results for the query.
73
+ */
74
+ list: (typeName: string, config: ListItemsConfig, selectedFields?: (keyof TypeInfoDataItem)[]) => Promise<ListItemsResults<TypeInfoDataItem>>;
75
+ /**
76
+ * Create a relationship between items.
77
+ *
78
+ * @param relationshipItem - Relationship payload.
79
+ * @returns Whether the relationship was created.
80
+ */
81
+ createRelationship: (relationshipItem: BaseItemRelationshipInfo) => Promise<boolean>;
82
+ /**
83
+ * Delete a relationship between items.
84
+ *
85
+ * @param relationshipItem - Relationship payload.
86
+ * @returns Results describing the deletion.
87
+ */
88
+ deleteRelationship: (relationshipItem: BaseItemRelationshipInfo) => Promise<DeleteRelationshipResults>;
89
+ /**
90
+ * List relationship records matching the query.
91
+ *
92
+ * @param config - Relationship list query configuration.
93
+ * @returns Relationship list results.
94
+ */
95
+ listRelationships: (config: ListRelationshipsConfig) => Promise<ListItemsResults<ItemRelationshipInfo>>;
96
+ /**
97
+ * List related items for a relationship query.
98
+ *
99
+ * @param config - Relationship list query configuration.
100
+ * @param selectedFields - Optional fields to project on related items.
101
+ * @returns Related item list results.
102
+ */
103
+ listRelatedItems: (config: ListRelationshipsConfig, selectedFields?: (keyof TypeInfoDataItem)[]) => Promise<ListItemsResults<Partial<TypeInfoDataItem>>>;
104
+ }
@@ -0,0 +1,73 @@
1
+ import type { RouteAdapter } from "./Route";
2
+ /**
3
+ * Runtime strategy for universal route adapters.
4
+ */
5
+ export type UniversalRouteStrategy = "auto" | "web" | "native";
6
+ /**
7
+ * Options for {@link createUniversalAdapter}.
8
+ */
9
+ export type CreateUniversalAdapterOptions = {
10
+ /**
11
+ * Runtime strategy selection.
12
+ *
13
+ * - `"auto"`: use web when DOM + History API exist, else native.
14
+ * - `"web"`: force browser history.
15
+ * - `"native"`: force in-memory history.
16
+ *
17
+ * Default: `"auto"`.
18
+ */
19
+ strategy?: UniversalRouteStrategy;
20
+ /**
21
+ * Initial path used by native strategy memory history.
22
+ *
23
+ * Default: `"/"`.
24
+ */
25
+ initialPath?: string;
26
+ /**
27
+ * Optional ingress hook for native strategy.
28
+ *
29
+ * Use this to bridge deep-link systems into the adapter.
30
+ */
31
+ ingress?: UniversalRouteIngress;
32
+ };
33
+ /**
34
+ * Ingress hook for applying external URLs/paths to native strategy.
35
+ */
36
+ export type UniversalRouteIngress = {
37
+ /**
38
+ * Optional initial URL/path provider.
39
+ */
40
+ getInitialURL?: () => Promise<string | null | undefined> | string | null | undefined;
41
+ /**
42
+ * Optional URL/path event subscription.
43
+ */
44
+ subscribe?: (listener: (url: string) => void) => () => void;
45
+ /**
46
+ * Incoming event application mode.
47
+ *
48
+ * Default: `"replace"`.
49
+ */
50
+ onIncomingURL?: "push" | "replace";
51
+ /**
52
+ * Optional mapper converting URL -> route path.
53
+ *
54
+ * Default maps using shared history path parsing.
55
+ */
56
+ mapURLToPath?: (url: string) => string;
57
+ };
58
+ /**
59
+ * Detect whether browser history is available at runtime.
60
+ */
61
+ export declare const canUseBrowserHistory: () => boolean;
62
+ /**
63
+ * Create a browser RouteAdapter backed by the History API.
64
+ */
65
+ export declare const createBrowserRouteAdapter: () => RouteAdapter;
66
+ /**
67
+ * Create an in-memory RouteAdapter for non-DOM runtimes.
68
+ */
69
+ export declare const createNativeRouteAdapter: (initialPath?: string, ingress?: UniversalRouteIngress) => RouteAdapter;
70
+ /**
71
+ * Create a runtime-selected RouteAdapter for web/native environments.
72
+ */
73
+ export declare const createUniversalAdapter: (options?: CreateUniversalAdapterOptions) => RouteAdapter;
@@ -0,0 +1,5 @@
1
+ import type { AreaBounds, EasyLayoutParsed } from "./types";
2
+ /**
3
+ * Compute 1-based row/column bounds for each area name.
4
+ */
5
+ export declare const computeAreaBounds: (parsed: EasyLayoutParsed) => Record<string, AreaBounds>;
@@ -0,0 +1,16 @@
1
+ import type { TrackSpec } from "./types";
2
+ /**
3
+ * Input for converting track specifications into pixels.
4
+ */
5
+ export type ComputeTrackPixelsInput = {
6
+ tracks: TrackSpec[];
7
+ totalPx: number;
8
+ gapPx?: number;
9
+ paddingPx?: number;
10
+ };
11
+ /**
12
+ * Compute pixel sizes for track specs.
13
+ *
14
+ * @category EasyLayout
15
+ */
16
+ export declare const computeTrackPixels: ({ tracks, totalPx, gapPx, paddingPx, }: ComputeTrackPixelsInput) => number[];
@@ -0,0 +1,5 @@
1
+ export * from "./computeAreaBounds";
2
+ export * from "./computeTracks";
3
+ export * from "./parseTemplate";
4
+ export * from "./types";
5
+ export * from "./validateAreas";
@@ -0,0 +1,12 @@
1
+ import type { EasyLayoutParsed, EasyLayoutTemplate } from "./types";
2
+ /**
3
+ * Parse an EasyLayout template into rows, tracks, and area names.
4
+ *
5
+ * @category EasyLayout
6
+ *
7
+ * Supported syntax:
8
+ * - row lines: `<area area ...>, <row-track>`
9
+ * - column line: `\\ <col-track> <col-track> ...`
10
+ * - row track is optional for parity with current behavior.
11
+ */
12
+ export declare const parseTemplate: (template?: EasyLayoutTemplate) => EasyLayoutParsed;
@@ -0,0 +1,52 @@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * Shared EasyLayout core types.
5
+ */
6
+ /**
7
+ * Raw layout template input.
8
+ */
9
+ export type EasyLayoutTemplate = string;
10
+ /**
11
+ * Supported track units.
12
+ */
13
+ export type TrackUnit = {
14
+ kind: "fr";
15
+ value: number;
16
+ } | {
17
+ kind: "px";
18
+ value: number;
19
+ } | {
20
+ kind: "pct";
21
+ value: number;
22
+ };
23
+ /**
24
+ * Track specification for rows/columns.
25
+ */
26
+ export type TrackSpec = TrackUnit;
27
+ /**
28
+ * Parsed layout representation shared by web/native implementations.
29
+ */
30
+ export type EasyLayoutParsed = {
31
+ areaGrid: string[][];
32
+ rowTracks: TrackSpec[];
33
+ colTracks: TrackSpec[];
34
+ areaNames: string[];
35
+ };
36
+ /**
37
+ * 1-based area bounds in row/column space.
38
+ */
39
+ export type AreaBounds = {
40
+ name: string;
41
+ rowStart: number;
42
+ rowEnd: number;
43
+ colStart: number;
44
+ colEnd: number;
45
+ };
46
+ /**
47
+ * Shared core payload for parsed template + computed bounds.
48
+ */
49
+ export type EasyLayoutCore = {
50
+ parsed: EasyLayoutParsed;
51
+ bounds: Record<string, AreaBounds>;
52
+ };
@@ -0,0 +1,5 @@
1
+ import type { EasyLayoutParsed } from "./types";
2
+ /**
3
+ * Validate that each named area in the parsed grid is a rectangle.
4
+ */
5
+ export declare const validateAreas: (parsed: EasyLayoutParsed) => void;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * Utility exports for app helpers. Import directly or via `app/Utils`:
5
+ * ```ts
6
+ * import { useRouteContext } from "./utils";
7
+ * // or
8
+ * import { Utils } from "../app";
9
+ * const { useRouteContext } = Utils;
10
+ * ```
11
+ */
12
+ export * from "./ApplicationState";
13
+ export * from "./ApplicationStateLoader";
14
+ export * from "./Controller";
15
+ export * from "./Debug";
16
+ export * from "./EasyLayout";
17
+ export * from "./easy-layout";
18
+ export * from "./History";
19
+ export * from "./Route";
20
+ export * from "./RouteHistory";
21
+ export * from "./UniversalRouteAdapter";
22
+ export * from "./Service";
23
+ export * from "./TypeInfoORMAPIUtils";
24
+ export * from "./TypeInfoORMClient";