libmodulor 0.16.0 → 0.18.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 (170) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +1 -1
  3. package/dist/esm/app/workers/AppSrcFilePathBuilder.js +1 -1
  4. package/dist/esm/apps/Helper/src/lib/project.js +6 -6
  5. package/dist/esm/apps/Helper/src/ucds/CreateProjectUCD.js +1 -1
  6. package/dist/esm/dt/DataType.d.ts +9 -9
  7. package/dist/esm/dt/base/TBase.d.ts +1 -1
  8. package/dist/esm/dt/base/TBoolean.d.ts +1 -1
  9. package/dist/esm/dt/base/TInt.d.ts +1 -1
  10. package/dist/esm/dt/base/TNumber.d.ts +1 -1
  11. package/dist/esm/dt/final/TDateISO8601.d.ts +1 -1
  12. package/dist/esm/dt/final/TEmail.js +1 -1
  13. package/dist/esm/dt/final/TFile.d.ts +1 -1
  14. package/dist/esm/dt/final/TGeolocation.d.ts +1 -1
  15. package/dist/esm/dt/final/TJSONString.d.ts +1 -1
  16. package/dist/esm/dt/final/TJSONString.js +1 -1
  17. package/dist/esm/dt/final/TJWT.d.ts +1 -1
  18. package/dist/esm/dt/final/TJWT.js +1 -1
  19. package/dist/esm/dt/final/TURL.d.ts +1 -1
  20. package/dist/esm/dt/final/TURL.js +1 -1
  21. package/dist/esm/dt/index.d.ts +16 -16
  22. package/dist/esm/dt/index.js +8 -8
  23. package/dist/esm/i18n/locales/en.js +2 -2
  24. package/dist/esm/i18n/locales/fr.js +3 -3
  25. package/dist/esm/index.d.ts +2 -2
  26. package/dist/esm/index.js +2 -2
  27. package/dist/esm/index.react.d.ts +4 -3
  28. package/dist/esm/index.react.js +2 -1
  29. package/dist/esm/index.rn.d.ts +1 -0
  30. package/dist/esm/index.rn.js +1 -0
  31. package/dist/esm/index.web.d.ts +1 -1
  32. package/dist/esm/index.web.js +1 -1
  33. package/dist/esm/std/HTTPAPICallExecutor.d.ts +2 -5
  34. package/dist/esm/std/HTTPAPICaller.d.ts +6 -0
  35. package/dist/esm/std/consts.d.ts +1 -1
  36. package/dist/esm/std/impl/JoseJWTManager.js +1 -1
  37. package/dist/esm/std/impl/MistralAILLMManager.js +2 -2
  38. package/dist/esm/std/impl/NodeCryptoManager.d.ts +1 -1
  39. package/dist/esm/std/impl/NodeEnvironmentManager.js +1 -1
  40. package/dist/esm/std/impl/NodeFSManager.js +1 -1
  41. package/dist/esm/std/impl/OllamaLLMManager.js +1 -1
  42. package/dist/esm/std/impl/OpenAILLMManager.js +2 -2
  43. package/dist/esm/std/impl/SimpleHTTPAPICaller.js +2 -2
  44. package/dist/esm/std/impl/WebCryptoManager.d.ts +1 -1
  45. package/dist/esm/std/index.d.ts +3 -3
  46. package/dist/esm/std/index.js +3 -3
  47. package/dist/esm/target/lib/cli/CommandExecutor.js +2 -2
  48. package/dist/esm/target/lib/react/DIContextProvider.d.ts +3 -5
  49. package/dist/esm/target/lib/react/DIContextProvider.js +4 -3
  50. package/dist/esm/target/lib/react/StyleContextProvider.d.ts +32 -0
  51. package/dist/esm/target/lib/react/StyleContextProvider.js +17 -0
  52. package/dist/esm/target/lib/react/UCContainer.js +4 -3
  53. package/dist/esm/target/lib/react/UCEntrypoint.d.ts +2 -2
  54. package/dist/esm/target/lib/react/UCEntrypoint.js +3 -3
  55. package/dist/esm/target/lib/react/UCOutputFieldValueFragment.d.ts +5 -6
  56. package/dist/esm/target/lib/react/UCOutputFieldValueFragment.js +4 -4
  57. package/dist/esm/target/lib/react/UCPanel.js +15 -21
  58. package/dist/esm/target/lib/react/entrypoint.d.ts +1 -1
  59. package/dist/esm/target/lib/react/form.d.ts +10 -11
  60. package/dist/esm/target/lib/react/form.js +4 -0
  61. package/dist/esm/target/lib/react/touchable.d.ts +2 -3
  62. package/dist/esm/target/lib/react/useAction.d.ts +1 -1
  63. package/dist/esm/target/lib/react/useAction.js +11 -13
  64. package/dist/esm/target/lib/rn/input.d.ts +2 -2
  65. package/dist/esm/target/lib/rn/input.js +3 -3
  66. package/dist/esm/target/lib/server/RequestChecker.js +1 -1
  67. package/dist/esm/target/lib/server/ServerRequestHandler.js +3 -3
  68. package/dist/esm/target/lib/web/input.d.ts +2 -3
  69. package/dist/esm/target/lib/web/input.js +3 -4
  70. package/dist/esm/target/node-core-cli/NodeCoreCLIManager.js +1 -1
  71. package/dist/esm/target/node-core-cli/commands.js +1 -1
  72. package/dist/esm/target/node-express-server/NodeExpressServerManager.js +1 -1
  73. package/dist/esm/target/node-hono-server/NodeHonoServerManager.js +1 -1
  74. package/dist/esm/target/node-mcp-server/NodeLocalStdioMCPServerManager.js +2 -2
  75. package/dist/esm/target/node-mcp-server/funcs.js +1 -1
  76. package/dist/esm/target/react-native-pure/UCAutoExecLoader.d.ts +1 -1
  77. package/dist/esm/target/react-native-pure/UCAutoExecLoader.js +4 -2
  78. package/dist/esm/target/react-native-pure/UCEntrypointTouchable.d.ts +1 -1
  79. package/dist/esm/target/react-native-pure/UCEntrypointTouchable.js +4 -3
  80. package/dist/esm/target/react-native-pure/UCExecTouchable.d.ts +1 -1
  81. package/dist/esm/target/react-native-pure/UCExecTouchable.js +4 -3
  82. package/dist/esm/target/react-native-pure/UCForm.d.ts +1 -1
  83. package/dist/esm/target/react-native-pure/UCForm.js +4 -5
  84. package/dist/esm/target/react-native-pure/UCFormField.js +6 -6
  85. package/dist/esm/target/react-native-pure/UCFormFieldControl.d.ts +2 -2
  86. package/dist/esm/target/react-native-pure/UCFormFieldControl.js +63 -6
  87. package/dist/esm/target/react-native-pure/UCFormFieldDesc.d.ts +1 -1
  88. package/dist/esm/target/react-native-pure/UCFormFieldDesc.js +4 -2
  89. package/dist/esm/target/react-native-pure/UCFormFieldErr.d.ts +1 -1
  90. package/dist/esm/target/react-native-pure/UCFormFieldErr.js +4 -2
  91. package/dist/esm/target/react-native-pure/UCFormFieldLabel.d.ts +1 -1
  92. package/dist/esm/target/react-native-pure/UCFormFieldLabel.js +6 -2
  93. package/dist/esm/target/react-native-pure/UCFormSubmitControl.d.ts +1 -1
  94. package/dist/esm/target/react-native-pure/UCFormSubmitControl.js +4 -3
  95. package/dist/esm/target/react-native-pure/UCOutputFieldValue.d.ts +1 -1
  96. package/dist/esm/target/react-native-pure/UCOutputFieldValue.js +4 -3
  97. package/dist/esm/target/react-web-pure/UCAutoExecLoader.d.ts +1 -1
  98. package/dist/esm/target/react-web-pure/UCAutoExecLoader.js +4 -2
  99. package/dist/esm/target/react-web-pure/UCEntrypointTouchable.d.ts +2 -2
  100. package/dist/esm/target/react-web-pure/UCEntrypointTouchable.js +5 -3
  101. package/dist/esm/target/react-web-pure/UCExecTouchable.d.ts +2 -2
  102. package/dist/esm/target/react-web-pure/UCExecTouchable.js +5 -3
  103. package/dist/esm/target/react-web-pure/UCForm.d.ts +1 -1
  104. package/dist/esm/target/react-web-pure/UCForm.js +6 -5
  105. package/dist/esm/target/react-web-pure/UCFormField.d.ts +1 -1
  106. package/dist/esm/target/react-web-pure/UCFormField.js +6 -7
  107. package/dist/esm/target/react-web-pure/UCFormFieldControl.d.ts +3 -3
  108. package/dist/esm/target/react-web-pure/UCFormFieldControl.js +27 -8
  109. package/dist/esm/target/react-web-pure/UCFormFieldDesc.d.ts +2 -2
  110. package/dist/esm/target/react-web-pure/UCFormFieldDesc.js +5 -3
  111. package/dist/esm/target/react-web-pure/UCFormFieldErr.d.ts +2 -2
  112. package/dist/esm/target/react-web-pure/UCFormFieldErr.js +5 -3
  113. package/dist/esm/target/react-web-pure/UCFormFieldLabel.d.ts +2 -2
  114. package/dist/esm/target/react-web-pure/UCFormFieldLabel.js +7 -4
  115. package/dist/esm/target/react-web-pure/UCFormSubmitControl.d.ts +2 -2
  116. package/dist/esm/target/react-web-pure/UCFormSubmitControl.js +5 -3
  117. package/dist/esm/target/react-web-pure/UCOutputFieldValue.d.ts +2 -2
  118. package/dist/esm/target/react-web-pure/UCOutputFieldValue.js +5 -4
  119. package/dist/esm/testing/AppTester.d.ts +2 -2
  120. package/dist/esm/testing/AppTester.js +2 -2
  121. package/dist/esm/testing/UCDefASTParser.js +1 -1
  122. package/dist/esm/testing/impl/SimpleAppDocsEmitter.js +1 -1
  123. package/dist/esm/testing/impl/TypeScriptLibUCDefASTParser.d.ts +1 -1
  124. package/dist/esm/testing/impl/TypeScriptLibUCDefASTParser.js +2 -3
  125. package/dist/esm/testing/index.d.ts +6 -6
  126. package/dist/esm/testing/index.js +2 -2
  127. package/dist/esm/testing/uc-auth.js +1 -1
  128. package/dist/esm/testing/workers/AppTesterCtxInitializer.js +1 -1
  129. package/dist/esm/testing/workers/UCExecutor.js +1 -1
  130. package/dist/esm/testing/workers/checkers/UCDefSourcesChecker.d.ts +1 -1
  131. package/dist/esm/testing/workers/checkers/UCDefSourcesChecker.js +3 -3
  132. package/dist/esm/uc/UC.d.ts +2 -2
  133. package/dist/esm/uc/UC.js +2 -2
  134. package/dist/esm/uc/UCInputField.d.ts +1 -1
  135. package/dist/esm/uc/helpers/UCOutputReader.d.ts +3 -3
  136. package/dist/esm/uc/impl/HTTPUCTransporter.d.ts +1 -1
  137. package/dist/esm/uc/impl/HTTPUCTransporter.js +3 -4
  138. package/dist/esm/uc/impl/InMemoryUCDataStore.d.ts +1 -1
  139. package/dist/esm/uc/impl/KnexUCDataStore.d.ts +1 -1
  140. package/dist/esm/uc/impl/RNUCClientConfirmManager.d.ts +10 -0
  141. package/dist/esm/uc/impl/RNUCClientConfirmManager.js +44 -0
  142. package/dist/esm/uc/impl/SimpleUCManager.d.ts +2 -2
  143. package/dist/esm/uc/index.d.ts +30 -30
  144. package/dist/esm/uc/index.js +30 -30
  145. package/dist/esm/uc/io/input/AggregateInput.d.ts +1 -1
  146. package/dist/esm/uc/io/input/ListInput.d.ts +1 -1
  147. package/dist/esm/uc/main.d.ts +1 -1
  148. package/dist/esm/uc/manager.d.ts +2 -2
  149. package/dist/esm/uc/output-part.d.ts +1 -1
  150. package/dist/esm/uc/policy.d.ts +1 -1
  151. package/dist/esm/uc/transporter.d.ts +1 -1
  152. package/dist/esm/uc/utils/appendUCInputToURL.d.ts +1 -1
  153. package/dist/esm/uc/utils/fmtVal.d.ts +1 -1
  154. package/dist/esm/uc/utils/rInput.d.ts +1 -1
  155. package/dist/esm/uc/utils/recIs.d.ts +1 -1
  156. package/dist/esm/uc/utils/ucHTTPContract.d.ts +1 -1
  157. package/dist/esm/uc/utils/ucMountingPoint.d.ts +1 -1
  158. package/dist/esm/uc/workers/SimpleAggregateFinder.d.ts +1 -1
  159. package/dist/esm/uc/workers/SimpleAggregateOwnershipChecker.d.ts +2 -2
  160. package/dist/esm/uc/workers/UCBuilder.d.ts +1 -1
  161. package/dist/esm/uc/workers/UCExecChecker.d.ts +1 -1
  162. package/dist/esm/uc/workers/UCInputFilesProcessor.d.ts +1 -1
  163. package/dist/esm/uc/workers/UCInputValidator.d.ts +1 -1
  164. package/dist/esm/utils/index.d.ts +1 -1
  165. package/dist/esm/utils/ioc/bindNodeCore.js +1 -1
  166. package/dist/esm/utils/ioc/bindRN.js +5 -0
  167. package/dist/esm/utils/numbers/fmt.js +1 -1
  168. package/package.json +8 -8
  169. package/pnpm-workspace.yaml +5 -4
  170. package/tsconfig.json +36 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v0.18.0 (2025-06-11)
4
+
5
+ **Misc**
6
+
7
+ - Switch to `react-jsx` (instead of `react`) : the targets relying on React now use `react/jsx-runtime` instead of the legacy `React.createElement`
8
+ - Upgrade to `biome` `2.0.0`
9
+ - Reduce usage of `useLiteralKeys`
10
+
11
+ ## v0.17.0 (2025-06-02)
12
+
13
+ **BREAKING**
14
+
15
+ - Make `target/react-native-pure` and `target/react-web-pure` components stylable : by using the new `<StyleContextProvider style={...style} />` you can customize how the elements render inside `<UCPanel />`. You can even use `renderFormFieldControl` to customize the form controls rendered according to the field (e.g. name, type, etc.)
16
+
3
17
  ## v0.16.0 (2025-05-27)
4
18
 
5
19
  **BREAKING**
package/README.md CHANGED
@@ -17,4 +17,4 @@ If you think you can help in any way, feel free to contact me (cf. `author` in `
17
17
 
18
18
  ## ⚖️ License
19
19
 
20
- [LGPL-3.0](https://github.com/c100k/libmodulor/blob/v0.16.0/LICENSE)
20
+ [LGPL-3.0](https://github.com/c100k/libmodulor/blob/v0.18.0/LICENSE)
@@ -11,7 +11,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
11
  return function (target, key) { decorator(target, key, paramIndex); }
12
12
  };
13
13
  import { inject, injectable } from 'inversify';
14
- import { APPS_ROOT_ALIAS, APPS_ROOT_DIR_NAME, APP_SRC_DIR_NAME, } from '../../convention.js';
14
+ import { APP_SRC_DIR_NAME, APPS_ROOT_ALIAS, APPS_ROOT_DIR_NAME, } from '../../convention.js';
15
15
  let AppSrcFilePathBuilder = class AppSrcFilePathBuilder {
16
16
  fsManager;
17
17
  logger;
@@ -36,14 +36,14 @@ export const PACKAGE_JSON = (name) => `{
36
36
  "test": "tsc && vitest run --passWithNoTests"
37
37
  },
38
38
  "dependencies": {
39
- "inversify": "^7.5.1",
39
+ "inversify": "^7.5.2",
40
40
  "libmodulor": "latest",
41
41
  "reflect-metadata": "^0.2.2"
42
42
  },
43
43
  "devDependencies": {
44
- "@biomejs/biome": "^1.9.4",
45
- "@types/node": "^22.15.21",
46
- "@vitest/coverage-v8": "^3.1.4",
44
+ "@biomejs/biome": "^2.0.0-beta.6",
45
+ "@types/node": "^22.15.29",
46
+ "@vitest/coverage-v8": "^3.2.0",
47
47
  "buffer": "^6.0.3",
48
48
  "cookie-parser": "^1.4.7",
49
49
  "express": "^5.1.0",
@@ -53,7 +53,7 @@ export const PACKAGE_JSON = (name) => `{
53
53
  "jose": "^6.0.11",
54
54
  "typescript": "^5.8.3",
55
55
  "vite": "^6.3.5",
56
- "vitest": "^3.1.4"
56
+ "vitest": "^3.2.0"
57
57
  }
58
58
  }
59
59
  `;
@@ -90,7 +90,7 @@ const TSCONFIG_JSON = `{
90
90
  "emitDecoratorMetadata": true,
91
91
  "experimentalDecorators": true,
92
92
 
93
- "jsx": "react"
93
+ "jsx": "react-jsx"
94
94
  }
95
95
  }
96
96
  `;
@@ -52,7 +52,7 @@ let CreateProjectClientMain = class CreateProjectClientMain {
52
52
  opts: { args: ['--version'] },
53
53
  });
54
54
  }
55
- catch (err) {
55
+ catch (_err) {
56
56
  throw new IllegalArgumentError(`'${bin}' seems missing. Is it installed on your machine ?`);
57
57
  }
58
58
  }
@@ -2,11 +2,11 @@ import type { Address } from './final/TAddress.js';
2
2
  import type { Amount } from './final/TAmount.js';
3
3
  import type { ApiKey } from './final/TApiKey.js';
4
4
  import type { BarCode } from './final/TBarCode.js';
5
- import type { CSS } from './final/TCSS.js';
6
5
  import type { Color } from './final/TColor.js';
7
6
  import type { ColorRGBA } from './final/TColorRGBA.js';
8
7
  import type { CompanyName } from './final/TCompanyName.js';
9
8
  import type { CountryISO3166Alpha2 } from './final/TCountryISO3166Alpha2.js';
9
+ import type { CSS } from './final/TCSS.js';
10
10
  import type { CurrencyISO4217 } from './final/TCurrencyISO4217.js';
11
11
  import type { DateISO8601 } from './final/TDateISO8601.js';
12
12
  import type { DateTimeFormat } from './final/TDateTimeFormat.js';
@@ -27,18 +27,18 @@ import type { FreeTextLong } from './final/TFreeTextLong.js';
27
27
  import type { FreeTextShort } from './final/TFreeTextShort.js';
28
28
  import type { Geolocation } from './final/TGeolocation.js';
29
29
  import type { GitSSHURL } from './final/TGitSSHURL.js';
30
+ import type { HostAddress } from './final/THostAddress.js';
31
+ import type { HostPort } from './final/THostPort.js';
30
32
  import type { HTML } from './final/THTML.js';
31
33
  import type { HTTPContentType } from './final/THTTPContentType.js';
32
34
  import type { HTTPMethod } from './final/THTTPMethod.js';
33
35
  import type { HTTPStatusNumber } from './final/THTTPStatusNumber.js';
34
- import type { HostAddress } from './final/THostAddress.js';
35
- import type { HostPort } from './final/THostPort.js';
36
36
  import type { IPv4 } from './final/TIPv4.js';
37
37
  import type { IPv6 } from './final/TIPv6.js';
38
- import type { JSONString } from './final/TJSONString.js';
39
- import type { JWT } from './final/TJWT.js';
40
38
  import type { JavaScript } from './final/TJavaScript.js';
41
39
  import type { JobTitle } from './final/TJobTitle.js';
40
+ import type { JSONString } from './final/TJSONString.js';
41
+ import type { JWT } from './final/TJWT.js';
42
42
  import type { Markdown } from './final/TMarkdown.js';
43
43
  import type { NumIndex } from './final/TNumIndex.js';
44
44
  import type { Password } from './final/TPassword.js';
@@ -48,21 +48,21 @@ import type { PersonFullname } from './final/TPersonFullname.js';
48
48
  import type { PersonInitials } from './final/TPersonInitials.js';
49
49
  import type { PersonLastname } from './final/TPersonLastname.js';
50
50
  import type { QRCode } from './final/TQRCode.js';
51
- import type { SQLQuery } from './final/TSQLQuery.js';
52
- import type { SSHPrivateKey } from './final/TSSHPrivateKey.js';
53
- import type { SSHPublicKey } from './final/TSSHPublicKey.js';
54
51
  import type { SearchQuery } from './final/TSearchQuery.js';
55
52
  import type { SemVerVersion } from './final/TSemVerVersion.js';
56
53
  import type { ShellCommand } from './final/TShellCommand.js';
57
54
  import type { Slug } from './final/TSlug.js';
55
+ import type { SQLQuery } from './final/TSQLQuery.js';
56
+ import type { SSHPrivateKey } from './final/TSSHPrivateKey.js';
57
+ import type { SSHPublicKey } from './final/TSSHPublicKey.js';
58
58
  import type { Time } from './final/TTime.js';
59
59
  import type { Timestamp } from './final/TTimestamp.js';
60
60
  import type { UIntDuration } from './final/TUIntDuration.js';
61
61
  import type { UIntQuantity } from './final/TUIntQuantity.js';
62
62
  import type { URL } from './final/TURL.js';
63
63
  import type { URLPath } from './final/TURLPath.js';
64
- import type { UUID } from './final/TUUID.js';
65
64
  import type { Username } from './final/TUsername.js';
65
+ import type { UUID } from './final/TUUID.js';
66
66
  import type { Year } from './final/TYear.js';
67
67
  import type { YesNo } from './final/TYesNo.js';
68
68
  type Primitive = string | number | boolean;
@@ -1,9 +1,9 @@
1
1
  import type { IconCode } from '../../icon/index.js';
2
2
  import type { DataType } from '../DataType.js';
3
- import { Validation } from '../Validation.js';
4
3
  import type { Color } from '../final/TColor.js';
5
4
  import type { RNInputMode } from '../targets/rn.js';
6
5
  import type { HTMLInputType } from '../targets/web.js';
6
+ import { Validation } from '../Validation.js';
7
7
  type AutoCapitalizeBehavior = 'characters' | 'sentences' | 'words';
8
8
  export type OptionLabel = string;
9
9
  type Option<T> = {
@@ -1,5 +1,5 @@
1
- import type { Validation } from '../Validation.js';
2
1
  import type { HTMLInputType } from '../targets/web.js';
2
+ import type { Validation } from '../Validation.js';
3
3
  import { TBase, type TName } from './TBase.js';
4
4
  export declare class TBoolean extends TBase<boolean> {
5
5
  tName(): TName;
@@ -1,6 +1,6 @@
1
1
  import type { Unit } from '../../utils/index.js';
2
- import type { Validation } from '../Validation.js';
3
2
  import type { RNInputMode } from '../targets/rn.js';
3
+ import type { Validation } from '../Validation.js';
4
4
  import type { TName } from './TBase.js';
5
5
  import { TNumber, type TNumberConstraints } from './TNumber.js';
6
6
  export type Int = number;
@@ -1,8 +1,8 @@
1
1
  import { type Unit } from '../../utils/index.js';
2
- import type { Validation } from '../Validation.js';
3
2
  import type { UIntQuantity } from '../final/TUIntQuantity.js';
4
3
  import type { RNInputMode } from '../targets/rn.js';
5
4
  import type { HTMLInputType } from '../targets/web.js';
5
+ import type { Validation } from '../Validation.js';
6
6
  import { TBase, type TName } from './TBase.js';
7
7
  export interface TNumberConstraints<T extends number> {
8
8
  max?: T;
@@ -1,7 +1,7 @@
1
- import type { Validation } from '../Validation.js';
2
1
  import type { TName } from '../base/TBase.js';
3
2
  import { TString } from '../base/TString.js';
4
3
  import type { HTMLInputType } from '../targets/web.js';
4
+ import type { Validation } from '../Validation.js';
5
5
  export type DateISO8601 = string;
6
6
  export declare class TDateISO8601 extends TString<DateISO8601> {
7
7
  tName(): TName;
@@ -2,7 +2,7 @@ import { TString } from '../base/TString.js';
2
2
  export class TEmail extends TString {
3
3
  // Inspired by https://github.com/jquense/yup/blob/master/src/string.ts#L19
4
4
  // Which is inspired by https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address
5
- static FORMAT = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
5
+ static FORMAT = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
6
6
  constructor(constraints) {
7
7
  super({
8
8
  ...constraints,
@@ -1,7 +1,7 @@
1
- import type { Validation } from '../Validation.js';
2
1
  import type { TName } from '../base/TBase.js';
3
2
  import { TObject } from '../base/TObject.js';
4
3
  import type { HTMLInputType } from '../targets/web.js';
4
+ import type { Validation } from '../Validation.js';
5
5
  import { type FileMimeType, type TFileMimeTypeConstraints } from './TFileMimeType.js';
6
6
  import { type FileName } from './TFileName.js';
7
7
  import { type FilePath } from './TFilePath.js';
@@ -1,6 +1,6 @@
1
- import type { Validation } from '../Validation.js';
2
1
  import type { TName } from '../base/TBase.js';
3
2
  import { TObject } from '../base/TObject.js';
3
+ import type { Validation } from '../Validation.js';
4
4
  export type Geolocation = {
5
5
  lat: number;
6
6
  lng: number;
@@ -1,6 +1,6 @@
1
- import type { Validation } from '../Validation.js';
2
1
  import type { TName } from '../base/TBase.js';
3
2
  import { TString } from '../base/TString.js';
3
+ import type { Validation } from '../Validation.js';
4
4
  export type JSONString = string;
5
5
  export declare class TJSONString extends TString<JSONString> {
6
6
  tName(): TName;
@@ -17,7 +17,7 @@ export class TJSONString extends TString {
17
17
  try {
18
18
  JSON.parse(this.raw);
19
19
  }
20
- catch (err) {
20
+ catch (_err) {
21
21
  validation.add({
22
22
  constraint: 'format',
23
23
  expected: 'JSON',
@@ -1,7 +1,7 @@
1
- import type { Validation } from '../Validation.js';
2
1
  import type { TName } from '../base/TBase.js';
3
2
  import { TString } from '../base/TString.js';
4
3
  import type { HTMLInputType } from '../targets/web.js';
4
+ import type { Validation } from '../Validation.js';
5
5
  export type JWT = string;
6
6
  export declare class TJWT extends TString<JWT> {
7
7
  tName(): TName;
@@ -41,7 +41,7 @@ export class TJWT extends TString {
41
41
  }
42
42
  // signature is ignored for now
43
43
  }
44
- catch (err) {
44
+ catch (_err) {
45
45
  validation.add({
46
46
  constraint: 'format',
47
47
  expected: 'JWT',
@@ -1,8 +1,8 @@
1
- import type { Validation } from '../Validation.js';
2
1
  import type { TName } from '../base/TBase.js';
3
2
  import { TString, type TStringConstraints } from '../base/TString.js';
4
3
  import type { RNInputMode } from '../targets/rn.js';
5
4
  import type { HTMLInputType } from '../targets/web.js';
5
+ import type { Validation } from '../Validation.js';
6
6
  export type URL = `http://${string}` | `https://${string}` | `ftp://${string}`;
7
7
  export declare class TURL extends TString<URL> {
8
8
  static readonly FORMAT: RegExp;
@@ -1,7 +1,7 @@
1
1
  import { TString } from '../base/TString.js';
2
2
  export class TURL extends TString {
3
3
  // Inspired by https://github.com/jquense/yup/blob/master/src/string.ts#L24
4
- static FORMAT = /^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i;
4
+ static FORMAT = /^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!$&'()*+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!$&'()*+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!$&'()*+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!$&'()*+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!$&'()*+,;=]|:|@)|\/|\?)*)?$/i;
5
5
  constructor(constraints) {
6
6
  super({
7
7
  ...constraints,
@@ -5,6 +5,8 @@ export { TNumber, type TNumberConstraints } from './base/TNumber.js';
5
5
  export { TObject, type TObjectConstraints, TObjectShapeValidationStrategy, } from './base/TObject.js';
6
6
  export { TString, type TStringConstraints } from './base/TString.js';
7
7
  export { TUInt, type TUIntConstraints, type UInt } from './base/TUInt.js';
8
+ export type { DataType } from './DataType.js';
9
+ export { DataTypes } from './DataTypes.js';
8
10
  export { type Address, TAddress } from './final/TAddress.js';
9
11
  export { type Amount, TAmount } from './final/TAmount.js';
10
12
  export { type ApiKey, TApiKey } from './final/TApiKey.js';
@@ -13,8 +15,8 @@ export { type Color, TColor } from './final/TColor.js';
13
15
  export { type ColorRGBA, TColorRGBA } from './final/TColorRGBA.js';
14
16
  export { type CompanyName, TCompanyName } from './final/TCompanyName.js';
15
17
  export { type CountryISO3166Alpha2, TCountryISO3166Alpha2, } from './final/TCountryISO3166Alpha2.js';
16
- export { type CurrencyISO4217, TCurrencyISO4217, } from './final/TCurrencyISO4217.js';
17
18
  export { type CSS, TCSS } from './final/TCSS.js';
19
+ export { type CurrencyISO4217, TCurrencyISO4217, } from './final/TCurrencyISO4217.js';
18
20
  export { type DateISO8601, TDateISO8601 } from './final/TDateISO8601.js';
19
21
  export { type DateTimeFormat, TDateTimeFormat, } from './final/TDateTimeFormat.js';
20
22
  export { type DirPath, TDirPath } from './final/TDirPath.js';
@@ -34,12 +36,12 @@ export { type FreeTextLong, TFreeTextLong } from './final/TFreeTextLong.js';
34
36
  export { type FreeTextShort, TFreeTextShort } from './final/TFreeTextShort.js';
35
37
  export { type Geolocation, TGeolocation } from './final/TGeolocation.js';
36
38
  export { type GitSSHURL, TGitSSHURL } from './final/TGitSSHURL.js';
39
+ export { type HostAddress, THostAddress } from './final/THostAddress.js';
40
+ export { type HostPort, THostPort } from './final/THostPort.js';
37
41
  export { type HTML, THTML } from './final/THTML.js';
38
42
  export { type HTTPContentType, THTTPContentType, } from './final/THTTPContentType.js';
39
43
  export { type HTTPMethod, THTTPMethod } from './final/THTTPMethod.js';
40
44
  export { type HTTPStatusNumber, THTTPStatusNumber, } from './final/THTTPStatusNumber.js';
41
- export { type HostAddress, THostAddress } from './final/THostAddress.js';
42
- export { type HostPort, THostPort } from './final/THostPort.js';
43
45
  export { type IPv4, TIPv4 } from './final/TIPv4.js';
44
46
  export { type IPv6, TIPv6 } from './final/TIPv6.js';
45
47
  export { type JavaScript, TJavaScript } from './final/TJavaScript.js';
@@ -55,25 +57,23 @@ export { type PersonFullname, TPersonFullname, } from './final/TPersonFullname.j
55
57
  export { type PersonInitials, TPersonInitials, } from './final/TPersonInitials.js';
56
58
  export { type PersonLastname, TPersonLastname, } from './final/TPersonLastname.js';
57
59
  export { type QRCode, TQRCode } from './final/TQRCode.js';
58
- export { type SQLQuery, TSQLQuery } from './final/TSQLQuery.js';
59
- export { type SSHPrivateKey, TSSHPrivateKey } from './final/TSSHPrivateKey.js';
60
- export { type SSHPublicKey, TSSHPublicKey } from './final/TSSHPublicKey.js';
61
60
  export { type SearchQuery, TSearchQuery } from './final/TSearchQuery.js';
62
61
  export { type SemVerVersion, TSemVerVersion } from './final/TSemVerVersion.js';
63
62
  export { type ShellCommand, TShellCommand } from './final/TShellCommand.js';
64
63
  export { type Slug, TSlug } from './final/TSlug.js';
64
+ export { type SQLQuery, TSQLQuery } from './final/TSQLQuery.js';
65
+ export { type SSHPrivateKey, TSSHPrivateKey } from './final/TSSHPrivateKey.js';
66
+ export { type SSHPublicKey, TSSHPublicKey } from './final/TSSHPublicKey.js';
65
67
  export { type Time, TTime } from './final/TTime.js';
66
68
  export { type Timestamp, TTimestamp } from './final/TTimestamp.js';
67
- export { type UIntDuration, TUIntDuration } from './final/TUIntDuration.js';
68
- export { type UIntQuantity, TUIntQuantity } from './final/TUIntQuantity.js';
69
- export { type Username, TUsername } from './final/TUsername.js';
70
- export { type URL, TURL } from './final/TURL.js';
71
- export { type URLPath, TURLPath } from './final/TURLPath.js';
72
- export { type UUID, TUUID } from './final/TUUID.js';
73
- export { type Year, TYear } from './final/TYear.js';
74
- export { type YesNo, TYesNo } from './final/TYesNo.js';
69
+ export { TUIntDuration, type UIntDuration } from './final/TUIntDuration.js';
70
+ export { TUIntQuantity, type UIntQuantity } from './final/TUIntQuantity.js';
71
+ export { TURL, type URL } from './final/TURL.js';
72
+ export { TURLPath, type URLPath } from './final/TURLPath.js';
73
+ export { TUsername, type Username } from './final/TUsername.js';
74
+ export { TUUID, type UUID } from './final/TUUID.js';
75
+ export { TYear, type Year } from './final/TYear.js';
76
+ export { TYesNo, type YesNo } from './final/TYesNo.js';
75
77
  export type { RNInputMode } from './targets/rn.js';
76
78
  export type { HTMLInputType } from './targets/web.js';
77
- export type { DataType } from './DataType.js';
78
- export { DataTypes } from './DataTypes.js';
79
79
  export { Validation, type Violation, type ViolationFormat, type ViolationI18n, type ViolationI18nable, type ViolationType, } from './Validation.js';
@@ -5,6 +5,7 @@ export { TNumber } from './base/TNumber.js';
5
5
  export { TObject, TObjectShapeValidationStrategy, } from './base/TObject.js';
6
6
  export { TString } from './base/TString.js';
7
7
  export { TUInt } from './base/TUInt.js';
8
+ export { DataTypes } from './DataTypes.js';
8
9
  export { TAddress } from './final/TAddress.js';
9
10
  export { TAmount } from './final/TAmount.js';
10
11
  export { TApiKey } from './final/TApiKey.js';
@@ -13,8 +14,8 @@ export { TColor } from './final/TColor.js';
13
14
  export { TColorRGBA } from './final/TColorRGBA.js';
14
15
  export { TCompanyName } from './final/TCompanyName.js';
15
16
  export { TCountryISO3166Alpha2, } from './final/TCountryISO3166Alpha2.js';
16
- export { TCurrencyISO4217, } from './final/TCurrencyISO4217.js';
17
17
  export { TCSS } from './final/TCSS.js';
18
+ export { TCurrencyISO4217, } from './final/TCurrencyISO4217.js';
18
19
  export { TDateISO8601 } from './final/TDateISO8601.js';
19
20
  export { TDateTimeFormat, } from './final/TDateTimeFormat.js';
20
21
  export { TDirPath } from './final/TDirPath.js';
@@ -34,12 +35,12 @@ export { TFreeTextLong } from './final/TFreeTextLong.js';
34
35
  export { TFreeTextShort } from './final/TFreeTextShort.js';
35
36
  export { TGeolocation } from './final/TGeolocation.js';
36
37
  export { TGitSSHURL } from './final/TGitSSHURL.js';
38
+ export { THostAddress } from './final/THostAddress.js';
39
+ export { THostPort } from './final/THostPort.js';
37
40
  export { THTML } from './final/THTML.js';
38
41
  export { THTTPContentType, } from './final/THTTPContentType.js';
39
42
  export { THTTPMethod } from './final/THTTPMethod.js';
40
43
  export { THTTPStatusNumber, } from './final/THTTPStatusNumber.js';
41
- export { THostAddress } from './final/THostAddress.js';
42
- export { THostPort } from './final/THostPort.js';
43
44
  export { TIPv4 } from './final/TIPv4.js';
44
45
  export { TIPv6 } from './final/TIPv6.js';
45
46
  export { TJavaScript } from './final/TJavaScript.js';
@@ -55,22 +56,21 @@ export { TPersonFullname, } from './final/TPersonFullname.js';
55
56
  export { TPersonInitials, } from './final/TPersonInitials.js';
56
57
  export { TPersonLastname, } from './final/TPersonLastname.js';
57
58
  export { TQRCode } from './final/TQRCode.js';
58
- export { TSQLQuery } from './final/TSQLQuery.js';
59
- export { TSSHPrivateKey } from './final/TSSHPrivateKey.js';
60
- export { TSSHPublicKey } from './final/TSSHPublicKey.js';
61
59
  export { TSearchQuery } from './final/TSearchQuery.js';
62
60
  export { TSemVerVersion } from './final/TSemVerVersion.js';
63
61
  export { TShellCommand } from './final/TShellCommand.js';
64
62
  export { TSlug } from './final/TSlug.js';
63
+ export { TSQLQuery } from './final/TSQLQuery.js';
64
+ export { TSSHPrivateKey } from './final/TSSHPrivateKey.js';
65
+ export { TSSHPublicKey } from './final/TSSHPublicKey.js';
65
66
  export { TTime } from './final/TTime.js';
66
67
  export { TTimestamp } from './final/TTimestamp.js';
67
68
  export { TUIntDuration } from './final/TUIntDuration.js';
68
69
  export { TUIntQuantity } from './final/TUIntQuantity.js';
69
- export { TUsername } from './final/TUsername.js';
70
70
  export { TURL } from './final/TURL.js';
71
71
  export { TURLPath } from './final/TURLPath.js';
72
+ export { TUsername } from './final/TUsername.js';
72
73
  export { TUUID } from './final/TUUID.js';
73
74
  export { TYear } from './final/TYear.js';
74
75
  export { TYesNo } from './final/TYesNo.js';
75
- export { DataTypes } from './DataTypes.js';
76
76
  export { Validation, } from './Validation.js';
@@ -28,10 +28,10 @@ export const I18nEN = {
28
28
  validation_format_PersonInitials: 'Must be valid initials composed of capital letters',
29
29
  validation_format_PersonLastname: 'Must be a valid lastname starting with a capital letter',
30
30
  validation_format_QRCode: 'Must be a valid QR code in base64 format',
31
- validation_format_SSHPrivateKey: 'Must be a valid SSH private key',
32
- validation_format_SSHPublicKey: 'Must be a valid SSH public key',
33
31
  validation_format_SemVerVersion: 'Must be a valid SemVer version (X.X.X)',
34
32
  validation_format_Slug: 'Must contain only lower case letters, digits and hyphens (-)',
33
+ validation_format_SSHPrivateKey: 'Must be a valid SSH private key',
34
+ validation_format_SSHPublicKey: 'Must be a valid SSH public key',
35
35
  validation_format_Time: 'Must be a valid time',
36
36
  validation_format_URL: 'Must be a valid URL',
37
37
  validation_format_UUID: 'Must be a valid UUID',
@@ -28,10 +28,10 @@ export const I18nFR = {
28
28
  validation_format_PersonInitials: 'Doit être des initiales valides composées de lettres majuscules',
29
29
  validation_format_PersonLastname: 'Doit être un nom commençant avec une lettre majuscule',
30
30
  validation_format_QRCode: 'Doit être un QR code valide au format base64',
31
- validation_format_SSHPrivateKey: 'Doit être une clé SSH privée valide',
32
- validation_format_SSHPublicKey: 'Doit être une clé SSH publique valide',
33
31
  validation_format_SemVerVersion: 'Doit être une version SemVer valide (X.X.X)',
34
32
  validation_format_Slug: 'Ne doit contenir seulement des lettres minuscules, des chiffres et des tirets (-)',
33
+ validation_format_SSHPrivateKey: 'Doit être une clé SSH privée valide',
34
+ validation_format_SSHPublicKey: 'Doit être une clé SSH publique valide',
35
35
  validation_format_Time: 'Doit être une heure valide',
36
36
  validation_format_URL: 'Doit être une URL valide',
37
37
  validation_format_UUID: 'Doit être un UUID valide',
@@ -49,6 +49,6 @@ export const I18nFR = {
49
49
  validation_type_int: 'Doit être un nombre entier',
50
50
  validation_type_number: 'Doit être un nombre',
51
51
  validation_type_object: 'Doit être un objet',
52
- validation_type_string: 'Doit être une chaîne de caractères',
53
52
  validation_type_scalar: 'Doît être un scalaire',
53
+ validation_type_string: 'Doit être une chaîne de caractères',
54
54
  };
@@ -1,4 +1,5 @@
1
1
  export * from './app/index.js';
2
+ export * from './convention.js';
2
3
  export * from './dt/index.js';
3
4
  export * from './error/index.js';
4
5
  export * from './i18n/index.js';
@@ -40,7 +41,6 @@ export * from './uc/impl/PromptUCClientConfirmManager.js';
40
41
  export * from './uc/impl/SimpleUCManager.js';
41
42
  export * from './uc/impl/StaticUCClientConfirmManager.js';
42
43
  export * from './uc/index.js';
44
+ export * from './utils/index.js';
43
45
  export * from './utils/ioc/bindCommon.js';
44
46
  export * from './utils/ioc/bindProduct.js';
45
- export * from './utils/index.js';
46
- export * from './convention.js';
package/dist/esm/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  // Export only the implementations that have no external dependencies (Otherwise, export them in index.x.ts)
2
2
  export * from './app/index.js';
3
+ export * from './convention.js';
3
4
  export * from './dt/index.js';
4
5
  export * from './error/index.js';
5
6
  export * from './i18n/index.js';
@@ -41,7 +42,6 @@ export * from './uc/impl/PromptUCClientConfirmManager.js';
41
42
  export * from './uc/impl/SimpleUCManager.js';
42
43
  export * from './uc/impl/StaticUCClientConfirmManager.js';
43
44
  export * from './uc/index.js';
45
+ export * from './utils/index.js';
44
46
  export * from './utils/ioc/bindCommon.js';
45
47
  export * from './utils/ioc/bindProduct.js';
46
- export * from './utils/index.js';
47
- export * from './convention.js';
@@ -1,7 +1,8 @@
1
- export { DIContext, useDIContext, DIContextProvider, type DIContextT, } from './target/lib/react/DIContextProvider.js';
2
- export type { UCFormFieldControlOnChange, UCFormFieldControlProps, UCFormFieldDescProps, UCFormFieldElement, UCFormFieldErrProps, UCFormFieldLabelProps, UCFormFieldProps, UCFormProps, UCFormSubmitControlProps, UC_FORM_FIELD_ELEMENTS, RenderUCForm, validateFormField, } from './target/lib/react/form.js';
1
+ export { DIContext, DIContextProvider, type DIContextT, useDIContext, } from './target/lib/react/DIContextProvider.js';
2
+ export type { RenderUCForm, UC_FORM_FIELD_ELEMENTS, UCFormFieldControlOnChange, UCFormFieldControlProps, UCFormFieldDescProps, UCFormFieldElement, UCFormFieldErrProps, UCFormFieldLabelProps, UCFormFieldProps, UCFormProps, UCFormSubmitControlProps, validateFormField, } from './target/lib/react/form.js';
3
3
  export type { UCPanelCtx, UCPanelOnDone, UCPanelOnError, UCPanelOnInit, UCPanelOnStartSubmitting, UCPanelOnSubmit, UCPanelState, } from './target/lib/react/panel.js';
4
- export type { UCEntrypointTouchableProps, RenderUCEntrypointTouchable, RenderUCExecTouchable, UCExecTouchableProps, } from './target/lib/react/touchable.js';
4
+ export { StyleContext, StyleContextProvider, type StyleContextT, styleDef, useStyleContext, } from './target/lib/react/StyleContextProvider.js';
5
+ export type { RenderUCEntrypointTouchable, RenderUCExecTouchable, UCEntrypointTouchableProps, UCExecTouchableProps, } from './target/lib/react/touchable.js';
5
6
  export { UCContainer } from './target/lib/react/UCContainer.js';
6
7
  export { UCEntrypoint } from './target/lib/react/UCEntrypoint.js';
7
8
  export { type Props as UCOutputFieldValueFragmentProps, UCOutputFieldValueFragment, } from './target/lib/react/UCOutputFieldValueFragment.js';
@@ -1,4 +1,5 @@
1
- export { DIContext, useDIContext, DIContextProvider, } from './target/lib/react/DIContextProvider.js';
1
+ export { DIContext, DIContextProvider, useDIContext, } from './target/lib/react/DIContextProvider.js';
2
+ export { StyleContext, StyleContextProvider, styleDef, useStyleContext, } from './target/lib/react/StyleContextProvider.js';
2
3
  export { UCContainer } from './target/lib/react/UCContainer.js';
3
4
  export { UCEntrypoint } from './target/lib/react/UCEntrypoint.js';
4
5
  export { UCOutputFieldValueFragment, } from './target/lib/react/UCOutputFieldValueFragment.js';
@@ -1,2 +1,3 @@
1
1
  export { BufferLibBufferManager } from './std/impl/BufferLibBufferManager.js';
2
+ export { RNUCClientConfirmManager } from './uc/impl/RNUCClientConfirmManager.js';
2
3
  export { bindRN } from './utils/ioc/bindRN.js';
@@ -1,2 +1,3 @@
1
1
  export { BufferLibBufferManager } from './std/impl/BufferLibBufferManager.js';
2
+ export { RNUCClientConfirmManager } from './uc/impl/RNUCClientConfirmManager.js';
2
3
  export { bindRN } from './utils/ioc/bindRN.js';
@@ -1,5 +1,5 @@
1
- export { type HTMLInputDef, htmlInputDef } from './target/lib/web/input.js';
2
1
  export { BufferLibBufferManager } from './std/impl/BufferLibBufferManager.js';
3
2
  export { WebCryptoManager } from './std/impl/WebCryptoManager.js';
4
3
  export { WebFSManager } from './std/impl/WebFSManager.js';
4
+ export { type HTMLInputDef, htmlInputDef } from './target/lib/web/input.js';
5
5
  export { bindWeb } from './utils/ioc/bindWeb.js';
@@ -1,5 +1,5 @@
1
- export { htmlInputDef } from './target/lib/web/input.js';
2
1
  export { BufferLibBufferManager } from './std/impl/BufferLibBufferManager.js';
3
2
  export { WebCryptoManager } from './std/impl/WebCryptoManager.js';
4
3
  export { WebFSManager } from './std/impl/WebFSManager.js';
4
+ export { htmlInputDef } from './target/lib/web/input.js';
5
5
  export { bindWeb } from './utils/ioc/bindWeb.js';
@@ -1,6 +1,6 @@
1
1
  import type { FreeTextLong, HTML, HTTPContentType, HTTPMethod, HTTPStatusNumber, JSONString, URL as URLString } from '../dt/index.js';
2
2
  import type { HTTPRequestBuilder } from '../utils/index.js';
3
- import type { BufferManagerBase64String } from './BufferManager.js';
3
+ import type { HTTPAPICallerHeaders } from './HTTPAPICaller.js';
4
4
  import type { Worker } from './Worker.js';
5
5
  export type HTTPAPICallExecutorAgent = {
6
6
  destroy(): void;
@@ -14,10 +14,7 @@ export interface HTTPAPICallExecutorAgentBuilder extends Worker<HTTPAPICallExecu
14
14
  export type HTTPAPICallExecutorFunc<Res> = (url: URL | URLString, info?: {
15
15
  agent?: HTTPAPICallExecutorAgent | undefined;
16
16
  body?: Awaited<ReturnType<HTTPRequestBuilder['exec']>>['body'];
17
- headers?: {
18
- Authorization?: BufferManagerBase64String;
19
- 'Content-Type'?: HTTPContentType;
20
- };
17
+ headers?: HTTPAPICallerHeaders;
21
18
  method?: HTTPMethod;
22
19
  }) => Promise<HTTPAPICallExecutorResponse<Res>>;
23
20
  export interface HTTPAPICallExecutorResponse<Res> {
@@ -6,6 +6,12 @@ type ErrBuilder<ResBad> = (response: ResBad) => Promise<ErrorMessage>;
6
6
  type OutputBuilder<ResGood, O> = (response: ResGood) => Promise<O>;
7
7
  type ReqBuilder<Req extends object> = () => Promise<Req>;
8
8
  type URLBuilder = () => Promise<URL>;
9
+ export interface HTTPAPICallerHeaders {
10
+ [key: string]: string | undefined;
11
+ Authorization?: HTTPAPICallerAuthorizationHeader['value'];
12
+ 'Content-Type'?: HTTPContentType;
13
+ Cookie?: string;
14
+ }
9
15
  export interface HTTPAPICallerAuthorizationHeader {
10
16
  prefix?: 'AWS4-HMAC-SHA256' | 'Basic' | 'Bearer' | 'JWT' | 'OAuth';
11
17
  value: ApiKey | JWT | Password;
@@ -1,6 +1,6 @@
1
1
  import type { EmailManagerSettings } from './EmailManager.js';
2
- import type { JWTManagerSettings } from './JWTManager.js';
3
2
  import type { JobManagerSettings } from './JobManager.js';
3
+ import type { JWTManagerSettings } from './JWTManager.js';
4
4
  import type { LoggerSettings } from './Logger.js';
5
5
  export declare const STD_DEFAULT_EMAIL_MANAGER_SETTINGS: EmailManagerSettings;
6
6
  export declare const STD_DEFAULT_JOB_MANAGER_SETTINGS: JobManagerSettings;
@@ -11,7 +11,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
11
  return function (target, key) { decorator(target, key, paramIndex); }
12
12
  };
13
13
  import { inject, injectable } from 'inversify';
14
- import { SignJWT, decodeJwt, decodeProtectedHeader, importPKCS8, importSPKI, jwtVerify, } from 'jose';
14
+ import { decodeJwt, decodeProtectedHeader, importPKCS8, importSPKI, jwtVerify, SignJWT, } from 'jose';
15
15
  import { JWSSignatureVerificationFailed } from 'jose/errors';
16
16
  import { UnauthorizedError } from '../../error/index.js';
17
17
  import { assertIsDefined } from '../../utils/index.js';
@@ -29,8 +29,8 @@ let MistralAILLMManager = class MistralAILLMManager {
29
29
  async send(req, opts) {
30
30
  return await this.httpAPICaller.exec({
31
31
  authorizationHeader: {
32
- value: opts?.auth?.apiKey ?? this.s().mai_api_key,
33
32
  prefix: 'Bearer',
33
+ value: opts?.auth?.apiKey ?? this.s().mai_api_key,
34
34
  },
35
35
  errBuilder: async (error) => {
36
36
  if ('message' in error) {
@@ -40,8 +40,8 @@ let MistralAILLMManager = class MistralAILLMManager {
40
40
  },
41
41
  method: 'POST',
42
42
  req: {
43
- envelope: 'json',
44
43
  builder: async () => req,
44
+ envelope: 'json',
45
45
  },
46
46
  urlBuilder: async () => `${MistralAILLMManager_1.BASE_URL}/chat/completions`,
47
47
  });