@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,46 @@
1
+ import React from "react";
2
+ type Listener = () => boolean;
3
+ export declare const Platform: {
4
+ OS: string;
5
+ };
6
+ export declare const BackHandler: {
7
+ addEventListener: (_eventName: "hardwareBackPress", listener: Listener) => {
8
+ remove: () => void;
9
+ };
10
+ removeEventListener: (_eventName: "hardwareBackPress", listener: Listener) => void;
11
+ __triggerHardwareBackPress: () => boolean;
12
+ };
13
+ type PrimitiveProps = Record<string, any> & {
14
+ children?: React.ReactNode;
15
+ };
16
+ export declare const View: {
17
+ ({ children, ...props }: PrimitiveProps): React.ReactElement<{
18
+ "data-rn": string;
19
+ }, string | React.JSXElementConstructor<any>>;
20
+ displayName: string;
21
+ };
22
+ export declare const Text: {
23
+ ({ children, ...props }: PrimitiveProps): React.ReactElement<{
24
+ "data-rn": string;
25
+ }, string | React.JSXElementConstructor<any>>;
26
+ displayName: string;
27
+ };
28
+ export declare const Pressable: {
29
+ ({ children, ...props }: PrimitiveProps): React.ReactElement<{
30
+ "data-rn": string;
31
+ }, string | React.JSXElementConstructor<any>>;
32
+ displayName: string;
33
+ };
34
+ export declare const Switch: {
35
+ ({ children, ...props }: PrimitiveProps): React.ReactElement<{
36
+ "data-rn": string;
37
+ }, string | React.JSXElementConstructor<any>>;
38
+ displayName: string;
39
+ };
40
+ export declare const TextInput: {
41
+ ({ children, ...props }: PrimitiveProps): React.ReactElement<{
42
+ "data-rn": string;
43
+ }, string | React.JSXElementConstructor<any>>;
44
+ displayName: string;
45
+ };
46
+ export {};
@@ -0,0 +1,88 @@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * Native EasyLayout computes absolute coordinates from a template + container size.
5
+ *
6
+ * Differences from web:
7
+ * - Native does not use CSS Grid.
8
+ * - Coordinates are computed from explicit container width/height.
9
+ * - Recompute whenever container size changes.
10
+ * - `auto` track sizing is not supported.
11
+ */
12
+ import type { ComponentType, ReactNode } from "react";
13
+ import type { AreaBounds, EasyLayoutParsed, EasyLayoutTemplate } from "../../app/utils/easy-layout/types";
14
+ /**
15
+ * Native EasyLayout options.
16
+ */
17
+ export type NativeEasyLayoutOptions = {
18
+ /**
19
+ * Uniform container padding in pixels.
20
+ */
21
+ padding?: number;
22
+ /**
23
+ * Uniform gap between row/column tracks in pixels.
24
+ */
25
+ gap?: number;
26
+ /**
27
+ * Coordinate rounding precision. Defaults to 3 decimals.
28
+ */
29
+ roundToDecimals?: number;
30
+ };
31
+ /**
32
+ * Absolute coordinates for each named area.
33
+ */
34
+ export type NativeEasyLayoutCoords = Record<string, {
35
+ left: number;
36
+ top: number;
37
+ width: number;
38
+ height: number;
39
+ }>;
40
+ /**
41
+ * Input for native coordinate computation.
42
+ */
43
+ export type NativeEasyLayoutComputeInput = NativeEasyLayoutOptions & {
44
+ width: number;
45
+ height: number;
46
+ };
47
+ /**
48
+ * Native EasyLayout instance created from a template.
49
+ */
50
+ export type NativeEasyLayout = {
51
+ template: EasyLayoutTemplate;
52
+ parsed: EasyLayoutParsed;
53
+ bounds: Record<string, AreaBounds>;
54
+ areaNames: string[];
55
+ /**
56
+ * Compute area coordinates for a measured container.
57
+ */
58
+ computeNativeCoords: (input: NativeEasyLayoutComputeInput) => NativeEasyLayoutCoords;
59
+ };
60
+ /**
61
+ * Optional rendering helper props for coordinate-based layout.
62
+ *
63
+ * Pass a native `View` component via `ViewComponent` in React Native apps.
64
+ */
65
+ export type NativeEasyLayoutViewProps = NativeEasyLayoutComputeInput & {
66
+ layout: NativeEasyLayout;
67
+ areaChildren?: Record<string, ReactNode>;
68
+ ViewComponent?: ComponentType<any>;
69
+ containerStyle?: Record<string, any>;
70
+ areaStyle?: Record<string, any>;
71
+ onLayout?: (...args: any[]) => void;
72
+ };
73
+ /**
74
+ * Create a native EasyLayout instance from a template.
75
+ *
76
+ * @category EasyLayout
77
+ */
78
+ export declare const makeNativeEasyLayout: (template: EasyLayoutTemplate) => NativeEasyLayout;
79
+ /**
80
+ * Hook wrapper for native coordinate computation.
81
+ *
82
+ * Recomputes when size/options change.
83
+ */
84
+ export declare const useNativeEasyLayout: (layout: NativeEasyLayout, input: NativeEasyLayoutComputeInput) => NativeEasyLayoutCoords;
85
+ /**
86
+ * Optional render helper that maps named areas to absolutely positioned children.
87
+ */
88
+ export declare const NativeEasyLayoutView: ({ layout, areaChildren, ViewComponent, containerStyle, areaStyle, onLayout, ...input }: NativeEasyLayoutViewProps) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
@@ -0,0 +1,124 @@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * Native history helpers that provide the mobile equivalent of browser
5
+ * location/history behavior for shared app Route matching.
6
+ */
7
+ import type { HistoryController } from "../../app/utils/History";
8
+ /**
9
+ * Adapter contract for React Native deep-link APIs.
10
+ *
11
+ * Intended for RN `Linking` wrappers so native URL opens behave like browser
12
+ * navigations entering the shared Voltra history model.
13
+ */
14
+ export type NativeLinkAdapter = {
15
+ /**
16
+ * Get the initial URL that opened the app.
17
+ */
18
+ getInitialURL: () => Promise<string | null>;
19
+ /**
20
+ * Subscribe to incoming URL events.
21
+ */
22
+ subscribe: (listener: (url: string) => void) => () => void;
23
+ };
24
+ /**
25
+ * Mode for incoming URL handling.
26
+ */
27
+ export type NativeIncomingURLMode = "push" | "replace";
28
+ /**
29
+ * BackHandler-like contract for native platform back actions.
30
+ */
31
+ export type NativeBackHandlerLike = {
32
+ addEventListener: (eventName: "hardwareBackPress", listener: () => boolean) => {
33
+ remove?: () => void;
34
+ } | void;
35
+ removeEventListener?: (eventName: "hardwareBackPress", listener: () => boolean) => void;
36
+ };
37
+ /**
38
+ * Native history controller with explicit lifecycle hooks.
39
+ *
40
+ * This is the native/mobile analogue to browser-backed history in web apps.
41
+ */
42
+ export type NativeHistoryController = HistoryController & {
43
+ /**
44
+ * Start listening for incoming deep links.
45
+ */
46
+ start: () => Promise<void>;
47
+ /**
48
+ * Stop listening for incoming deep links.
49
+ */
50
+ stop: () => void;
51
+ };
52
+ /**
53
+ * Create-native-history options.
54
+ */
55
+ export type CreateNativeHistoryOptions = {
56
+ /**
57
+ * Deep-link adapter implementation.
58
+ */
59
+ adapter?: NativeLinkAdapter;
60
+ /**
61
+ * Initial fallback path when there is no incoming URL.
62
+ *
63
+ * Default: `"/"`.
64
+ */
65
+ initialPath?: string;
66
+ /**
67
+ * How to apply incoming URL events to history.
68
+ *
69
+ * Default: `"replace"`.
70
+ */
71
+ onIncomingURL?: NativeIncomingURLMode;
72
+ /**
73
+ * Mapper for converting a URL into a path string.
74
+ *
75
+ * Default: {@link mapNativeURLToPath}.
76
+ */
77
+ mapURLToPath?: (url: string) => string;
78
+ /**
79
+ * Optional native platform back handler wired into this history runtime.
80
+ */
81
+ backHandler?: NativeBackHandlerLike;
82
+ };
83
+ /**
84
+ * Default native URL -> path mapping.
85
+ *
86
+ * Strips scheme and host, preserves path + query + hash so incoming native URLs
87
+ * become the same route paths used on web.
88
+ */
89
+ export declare const mapNativeURLToPath: (url: string) => string;
90
+ /**
91
+ * Create a native history controller backed by in-memory history.
92
+ *
93
+ * This is the primary native routing primitive when the environment does not
94
+ * provide browser history. It gives shared Route matching a stable path/history
95
+ * source and applies incoming deep links as navigations in that same model.
96
+ *
97
+ * Lifecycle behavior:
98
+ * - `start()` is idempotent.
99
+ * - `stop()` is idempotent.
100
+ * - `start()` applies `getInitialURL()` once per start cycle only if
101
+ * navigation state has not changed since startup began.
102
+ * - This prevents late `getInitialURL()` resolution from overriding
103
+ * user navigation that happened during startup.
104
+ *
105
+ * Incoming URL behavior:
106
+ * - `"replace"` updates current entry (default).
107
+ * - `"push"` appends a new entry.
108
+ *
109
+ * Example:
110
+ * ```ts
111
+ * const history = createNativeHistory({
112
+ * adapter: linkingAdapter,
113
+ * onIncomingURL: "replace",
114
+ * });
115
+ * await history.start();
116
+ * ```
117
+ */
118
+ export declare const createNativeHistory: (options?: CreateNativeHistoryOptions) => NativeHistoryController;
119
+ /**
120
+ * @deprecated Use {@link createHistoryBackHandler} from `app/utils/History`.
121
+ */
122
+ export declare const createNativeBackHandler: (history: HistoryController) => {
123
+ handle: () => boolean;
124
+ };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * Native intra-application navigation button.
5
+ */
6
+ import type { FC } from "react";
7
+ import { type PressableProps } from "react-native";
8
+ /**
9
+ * Props for {@link NavButton}.
10
+ */
11
+ export type NavButtonProps = PressableProps & {
12
+ /** Relative or absolute Voltra route path. */
13
+ path: string;
14
+ /** Use adapter `replace` instead of `push` when true. */
15
+ replace?: boolean;
16
+ };
17
+ /**
18
+ * Render a pressable control that navigates within the current Voltra app.
19
+ *
20
+ * Relative paths resolve from the route context where this component renders.
21
+ *
22
+ * @param props - Pressable props plus the destination route path.
23
+ * @returns Pressable element wired to the current route adapter.
24
+ */
25
+ export declare const NavButton: FC<NavButtonProps>;
@@ -0,0 +1,41 @@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * Native routing helpers that keep shared app Route semantics intact on mobile.
5
+ *
6
+ * The primary native model is still Voltra path/history routing. These helpers
7
+ * supply the runtime selection needed by the `native` barrel:
8
+ * - React Native mobile uses native history + deep-link + platform back
9
+ * - React Native web uses the browser adapter
10
+ *
11
+ * This separation keeps `app` free of native-platform code.
12
+ */
13
+ import { type PropsWithChildren } from "react";
14
+ import type { RouteProps, RouteRuntimeIntegration } from "../../app/utils/Route";
15
+ import type { RouteAdapter } from "../../app/utils/Route";
16
+ import { type NativeBackHandlerLike } from "./History";
17
+ /**
18
+ * Create a hardware-back listener from a route adapter.
19
+ */
20
+ export declare const createNativeHardwareBackHandler: (adapter: RouteAdapter) => () => boolean;
21
+ /**
22
+ * Register hardware-back handling against a BackHandler-like runtime.
23
+ */
24
+ export declare const registerNativeHardwareBackHandler: (adapter: RouteAdapter, backHandler: NativeBackHandlerLike) => () => void;
25
+ /**
26
+ * Low-level helper to build a Route runtime integration from a BackHandler.
27
+ *
28
+ * Native Route no longer uses this for the default path because platform back
29
+ * ownership now lives with the native adapter/history layer. This remains
30
+ * available for manual integrations.
31
+ */
32
+ export declare const createNativeRouteBackIntegration: (backHandler: NativeBackHandlerLike) => RouteRuntimeIntegration;
33
+ /**
34
+ * Native Route wrapper for root/provider mode.
35
+ *
36
+ * Behavior:
37
+ * - On React Native mobile runtimes, auto-injects a native-history-backed
38
+ * adapter so native history owns platform back actions.
39
+ * - On React Native web runtimes, auto-injects the browser adapter.
40
+ */
41
+ export declare const Route: <ParamsType extends Record<string, any>>(props: PropsWithChildren<RouteProps<ParamsType>>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * Native layout/navigation utilities.
5
+ */
6
+ /**
7
+ * @category native
8
+ * @group Layout and Navigation
9
+ */
10
+ export * from "./EasyLayout";
11
+ /**
12
+ * @category native
13
+ * @group Layout and Navigation
14
+ */
15
+ export * from "./History";
16
+ /**
17
+ * @category native
18
+ * @group Layout and Navigation
19
+ */
20
+ export * from "./NavButton";
21
+ /**
22
+ * @category native
23
+ * @group Layout and Navigation
24
+ */
25
+ export * from "./Route";
package/package.json CHANGED
@@ -1,22 +1,16 @@
1
1
  {
2
2
  "name": "@resistdesign/voltra",
3
- "version": "3.0.0-alpha.5",
3
+ "version": "3.0.0-alpha.51",
4
4
  "description": "With our powers combined!",
5
5
  "homepage": "https://voltra.app",
6
6
  "repository": "git@github.com:resistdesign/voltra.git",
7
7
  "author": "Resist Design",
8
8
  "license": "MIT",
9
9
  "type": "module",
10
- "main": "./index.js",
11
- "types": "./index.d.ts",
12
10
  "bin": {
13
11
  "vest": "common/Testing/CLI.js"
14
12
  },
15
13
  "exports": {
16
- ".": {
17
- "types": "./index.d.ts",
18
- "import": "./index.js"
19
- },
20
14
  "./api": {
21
15
  "types": "./api/index.d.ts",
22
16
  "import": "./api/index.js"
@@ -25,6 +19,18 @@
25
19
  "types": "./app/index.d.ts",
26
20
  "import": "./app/index.js"
27
21
  },
22
+ "./web": {
23
+ "types": "./web/index.d.ts",
24
+ "import": "./web/index.js"
25
+ },
26
+ "./native": {
27
+ "types": "./native/index.d.ts",
28
+ "import": "./native/index.js"
29
+ },
30
+ "./build": {
31
+ "types": "./build/index.d.ts",
32
+ "import": "./build/index.js"
33
+ },
28
34
  "./common": {
29
35
  "types": "./common/index.d.ts",
30
36
  "import": "./common/index.js"
@@ -38,34 +44,61 @@
38
44
  "import": "./iac/packs/index.js"
39
45
  }
40
46
  },
41
- "files": [
42
- "*.d.ts",
43
- "*.d.ts.map",
44
- "index.js",
45
- "api/**",
46
- "app/**",
47
- "common/**",
48
- "iac/**",
49
- "README.md",
50
- "package.json"
51
- ],
47
+ "typesVersions": {
48
+ "*": {
49
+ "api": [
50
+ "api/index.d.ts"
51
+ ],
52
+ "app": [
53
+ "app/index.d.ts"
54
+ ],
55
+ "web": [
56
+ "web/index.d.ts"
57
+ ],
58
+ "native": [
59
+ "native/index.d.ts"
60
+ ],
61
+ "common": [
62
+ "common/index.d.ts"
63
+ ],
64
+ "iac": [
65
+ "iac/index.d.ts"
66
+ ],
67
+ "iac/packs": [
68
+ "iac/packs/index.d.ts"
69
+ ],
70
+ "build": [
71
+ "build/index.d.ts"
72
+ ]
73
+ }
74
+ },
52
75
  "dependencies": {
53
76
  "@aws-sdk/client-dynamodb": "^3.490.0",
54
77
  "@aws-sdk/client-s3": "^3.490.0",
55
78
  "@aws-sdk/s3-request-presigner": "^3.490.0",
56
79
  "@aws-sdk/util-dynamodb": "^3.490.0",
57
80
  "@fontsource/montserrat-subrayada": "^5.2.5",
58
- "@noble/hashes": "^2.0.1",
59
81
  "@picocss/pico": "^2.1.1",
60
82
  "ace-builds": "^1.32.3",
61
83
  "fast-glob": "^3.3.3",
62
84
  "picocolors": "^1.1.1",
63
- "react": "^18.2.0",
64
85
  "react-ace": "^10.1.0",
65
- "react-dom": "^18.3.1",
66
86
  "styled-components": "^6.1.8",
67
87
  "typescript": "^5.3.3",
68
88
  "uuid": "^11.0.3",
69
89
  "yaml": "^2.3.4"
90
+ },
91
+ "peerDependencies": {
92
+ "react": ">=18",
93
+ "react-dom": ">=18",
94
+ "react-native": ">=0.7"
95
+ },
96
+ "peerDependenciesMeta": {
97
+ "react-dom": {
98
+ "optional": true
99
+ },
100
+ "react-native": {
101
+ "optional": true
102
+ }
70
103
  }
71
104
  }
@@ -0,0 +1,74 @@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * Web AutoForm wrappers backed by the default web renderer.
5
+ */
6
+ import { type FC } from "react";
7
+ import type { AutoFieldProps, CustomValidatorMap, CustomTypeActionPayload, FormValues, RelationActionPayload, TranslateValidationErrorCode } from "../../app/forms/types";
8
+ import type { TypeInfo, TypeOperation } from "../../common/TypeParsing/TypeInfo";
9
+ import type { FormController } from "../../app/forms/types";
10
+ /**
11
+ * Render a form field based on TypeInfo metadata.
12
+ *
13
+ * @category Forms
14
+ *
15
+ * @param props - AutoField props describing the field and handlers.
16
+ * @returns Rendered field UI.
17
+ */
18
+ export declare const AutoField: FC<AutoFieldProps>;
19
+ /**
20
+ * Props for the AutoFormView component.
21
+ */
22
+ export interface AutoFormViewProps {
23
+ /** Prepared controller that supplies field state. */
24
+ controller: FormController;
25
+ /** Submit handler invoked with validated form values. */
26
+ onSubmit: (values: FormValues) => void;
27
+ /** Disable the submit button when true. */
28
+ submitDisabled?: boolean;
29
+ /** Optional relation action handler for reference fields. */
30
+ onRelationAction?: (payload: RelationActionPayload) => void;
31
+ /** Optional custom type action handler. */
32
+ onCustomTypeAction?: (payload: CustomTypeActionPayload) => void;
33
+ /** Optional translator for validation error descriptors. */
34
+ translateValidationErrorCode?: TranslateValidationErrorCode;
35
+ }
36
+ /**
37
+ * Render a web form UI from a prepared form controller.
38
+ *
39
+ * @param props - View props including controller and callbacks.
40
+ * @returns Rendered form view.
41
+ */
42
+ export declare const AutoFormView: FC<AutoFormViewProps>;
43
+ /**
44
+ * Props for the AutoForm component.
45
+ */
46
+ export interface AutoFormProps {
47
+ /** Type metadata used to build the form. */
48
+ typeInfo: TypeInfo;
49
+ /** Submit handler invoked with validated form values. */
50
+ onSubmit: (values: FormValues) => void;
51
+ /** Optional initial values applied before defaults. */
52
+ initialValues?: FormValues;
53
+ /** Optional change handler invoked when values update. */
54
+ onValuesChange?: (values: FormValues) => void;
55
+ /** Optional relation action handler for reference fields. */
56
+ onRelationAction?: (payload: RelationActionPayload) => void;
57
+ /** Optional custom type action handler. */
58
+ onCustomTypeAction?: (payload: CustomTypeActionPayload) => void;
59
+ /** Optional operation override for field state. */
60
+ operation?: TypeOperation;
61
+ /** Disable the submit button when true. */
62
+ submitDisabled?: boolean;
63
+ /** Optional translator for validation error descriptors. */
64
+ translateValidationErrorCode?: TranslateValidationErrorCode;
65
+ /** Optional custom validators keyed by field name. */
66
+ customValidatorMap?: CustomValidatorMap;
67
+ }
68
+ /**
69
+ * Build a controller from type metadata and render a web auto form.
70
+ *
71
+ * @param props - Auto form props including type info and callbacks.
72
+ * @returns Rendered web form.
73
+ */
74
+ export declare const AutoForm: FC<AutoFormProps>;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * Convenience factory for web form renderers.
5
+ */
6
+ import type { ReactElement } from "react";
7
+ import type { ComponentSuite } from "../../app/forms/core/types";
8
+ /**
9
+ * Create a web form renderer using the default web suite.
10
+ *
11
+ * @category Forms
12
+ *
13
+ * @param options - Optional suite overrides.
14
+ * @returns Web form renderers.
15
+ */
16
+ export declare const createWebFormRenderer: (options?: {
17
+ suite?: ComponentSuite<ReactElement>;
18
+ }) => {
19
+ AutoField: import("react").FC<import("../../app").AutoFieldInput>;
20
+ suite: import("../../app").ResolvedSuite<ReactElement<any, string | import("react").JSXElementConstructor<any>>>;
21
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * Web form rendering exports.
5
+ */
6
+ export * from "./suite";
7
+ export * from "./UI";
8
+ export * from "./primitives";
9
+ export * from "./createWebFormRenderer";
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * Web primitives for the form generation system.
5
+ */
6
+ /**
7
+ * Wrapper for grouped field content.
8
+ */
9
+ export declare const FieldWrapper: any;
10
+ /**
11
+ * Inline error message styling.
12
+ */
13
+ export declare const ErrorMessage: any;
14
+ /**
15
+ * Container for array field items.
16
+ */
17
+ export declare const ArrayContainer: any;
18
+ /**
19
+ * Wrapper for an individual array item row.
20
+ */
21
+ export declare const ArrayItemWrapper: any;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * Default web component suite for form rendering.
5
+ */
6
+ import type { ReactElement } from "react";
7
+ import type { ComponentSuite } from "../../app/forms/core";
8
+ /**
9
+ * Default web suite for form rendering.
10
+ */
11
+ export declare const webSuite: ComponentSuite<ReactElement>;
12
+ /**
13
+ * AutoField renderer backed by the default web suite.
14
+ */
15
+ export declare const webAutoField: import("react").FC<import("../../app").AutoFieldInput>;
package/web/index.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * Web (DOM) entrypoint exports.
5
+ */
6
+ /**
7
+ * @category web
8
+ * @group Forms
9
+ */
10
+ export * from "./forms";
11
+ /**
12
+ * @category web
13
+ * @group Layout and Navigation
14
+ */
15
+ export * from "./utils";