@fgv/ts-res 5.0.0-2 → 5.0.0-21

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 (557) hide show
  1. package/.vscode/4.json +3 -0
  2. package/.vscode/launch.json +16 -0
  3. package/.vscode/settings.json +3 -0
  4. package/config/api-extractor.json +343 -0
  5. package/config/rig.json +16 -0
  6. package/dist/ts-res.d.ts +1528 -161
  7. package/dist/tsdoc-metadata.json +1 -1
  8. package/lib/index.d.ts +11 -2
  9. package/lib/index.js +25 -2
  10. package/lib/packlets/bundle/bundleBuilder.d.ts +41 -0
  11. package/lib/packlets/bundle/bundleBuilder.js +134 -0
  12. package/lib/packlets/bundle/bundleLoader.d.ts +72 -0
  13. package/lib/packlets/bundle/bundleLoader.js +105 -0
  14. package/lib/packlets/bundle/bundleNormalizer.d.ts +73 -0
  15. package/lib/packlets/bundle/bundleNormalizer.js +142 -0
  16. package/lib/packlets/bundle/bundleUtils.d.ts +70 -0
  17. package/lib/packlets/bundle/bundleUtils.js +117 -0
  18. package/lib/packlets/bundle/convert.d.ts +33 -0
  19. package/lib/packlets/bundle/convert.js +78 -0
  20. package/lib/packlets/bundle/index.d.ts +21 -0
  21. package/lib/packlets/bundle/index.js +83 -0
  22. package/lib/packlets/bundle/model.d.ts +100 -0
  23. package/lib/packlets/bundle/model.js +24 -0
  24. package/lib/packlets/common/helpers/resources.d.ts +7 -0
  25. package/lib/packlets/common/helpers/resources.js +12 -0
  26. package/lib/packlets/common/resources.d.ts +8 -0
  27. package/lib/packlets/conditions/conditionSet.d.ts +9 -0
  28. package/lib/packlets/conditions/conditionSet.js +74 -1
  29. package/lib/packlets/config/configInitFactory.d.ts +78 -0
  30. package/lib/packlets/config/configInitFactory.js +147 -0
  31. package/lib/packlets/config/convert.d.ts +9 -0
  32. package/lib/packlets/config/convert.js +11 -0
  33. package/lib/packlets/config/index.d.ts +1 -0
  34. package/lib/packlets/config/index.js +1 -0
  35. package/lib/packlets/config/systemConfiguration.d.ts +16 -3
  36. package/lib/packlets/config/systemConfiguration.js +19 -40
  37. package/lib/packlets/import/fsItem.js +8 -13
  38. package/lib/packlets/import/importers/jsonImporter.js +1 -0
  39. package/lib/packlets/qualifier-types/config/json.d.ts +13 -0
  40. package/lib/packlets/qualifier-types/config/json.js +11 -0
  41. package/lib/packlets/qualifier-types/literalValueHierarchy.js +1 -1
  42. package/lib/packlets/qualifiers/qualifierCollector.js +1 -2
  43. package/lib/packlets/resource-types/jsonResourceType.d.ts +9 -4
  44. package/lib/packlets/resource-types/jsonResourceType.js +8 -1
  45. package/lib/packlets/resource-types/resourceType.d.ts +102 -13
  46. package/lib/packlets/resource-types/resourceType.js +34 -2
  47. package/lib/packlets/resources/common.d.ts +26 -0
  48. package/lib/packlets/resources/resource.d.ts +6 -6
  49. package/lib/packlets/resources/resource.js +3 -8
  50. package/lib/packlets/resources/resourceCandidate.d.ts +5 -1
  51. package/lib/packlets/resources/resourceCandidate.js +6 -0
  52. package/lib/packlets/resources/resourceManagerBuilder.d.ts +182 -11
  53. package/lib/packlets/resources/resourceManagerBuilder.js +469 -15
  54. package/lib/packlets/runtime/cacheListener.d.ts +9 -0
  55. package/lib/packlets/runtime/cacheListener.js +6 -0
  56. package/lib/packlets/runtime/cacheMetrics.d.ts +6 -0
  57. package/lib/packlets/runtime/cacheMetrics.js +11 -0
  58. package/lib/packlets/runtime/compiledResourceCollection.d.ts +3 -3
  59. package/lib/packlets/runtime/compiledResourceCollection.js +7 -0
  60. package/lib/packlets/runtime/iResourceManager.d.ts +13 -5
  61. package/lib/packlets/runtime/resource-tree/resourceTreeChildrenValidator.d.ts +7 -7
  62. package/lib/packlets/runtime/resource-tree/resourceTreeChildrenValidator.js +5 -5
  63. package/lib/packlets/runtime/resourceResolver.d.ts +21 -0
  64. package/lib/packlets/runtime/resourceResolver.js +39 -17
  65. package/lib/packlets/runtime/validate.js +1 -0
  66. package/lib/packlets/zip-archive/convert.d.ts +52 -0
  67. package/lib/packlets/zip-archive/convert.js +104 -0
  68. package/lib/packlets/zip-archive/index.d.ts +23 -0
  69. package/lib/packlets/zip-archive/index.js +95 -0
  70. package/lib/packlets/zip-archive/json.d.ts +64 -0
  71. package/lib/packlets/zip-archive/json.js +24 -0
  72. package/lib/packlets/zip-archive/types.d.ts +98 -0
  73. package/lib/packlets/zip-archive/types.js +39 -0
  74. package/lib/packlets/zip-archive/zipArchiveCreator.d.ts +35 -0
  75. package/lib/packlets/zip-archive/zipArchiveCreator.js +194 -0
  76. package/lib/packlets/zip-archive/zipArchiveFormat.d.ts +70 -0
  77. package/lib/packlets/zip-archive/zipArchiveFormat.js +184 -0
  78. package/lib/packlets/zip-archive/zipArchiveLoader.d.ts +70 -0
  79. package/lib/packlets/zip-archive/zipArchiveLoader.js +285 -0
  80. package/lib/test/data/sample.json +32 -0
  81. package/lib/test/unit/bundle/bundleBuilder.test.d.ts +2 -0
  82. package/lib/test/unit/bundle/bundleLoader.test.d.ts +2 -0
  83. package/lib/test/unit/bundle/bundleUtils.test.d.ts +2 -0
  84. package/lib/test/unit/bundle/convert.test.d.ts +2 -0
  85. package/lib/test/unit/bundle/integration.test.d.ts +2 -0
  86. package/lib/test/unit/bundle/model.test.d.ts +2 -0
  87. package/lib/test/unit/bundle/normalization.test.d.ts +2 -0
  88. package/lib/test/unit/common/conditions.test.d.ts +2 -0
  89. package/lib/test/unit/common/helpers/conditions.test.d.ts +2 -0
  90. package/lib/test/unit/common/helpers/contexts.test.d.ts +2 -0
  91. package/lib/test/unit/common/helpers/qualifierDefaultValues.test.d.ts +2 -0
  92. package/lib/test/unit/common/resources.test.d.ts +2 -0
  93. package/lib/test/unit/conditions/condition.test.d.ts +2 -0
  94. package/lib/test/unit/conditions/conditionCollector.test.d.ts +2 -0
  95. package/lib/test/unit/conditions/conditionScoreAsDefault.test.d.ts +2 -0
  96. package/lib/test/unit/conditions/conditionSet.test.d.ts +2 -0
  97. package/lib/test/unit/conditions/conditionSetCollector.test.d.ts +2 -0
  98. package/lib/test/unit/conditions/conditionToken.test.d.ts +2 -0
  99. package/lib/test/unit/conditions/convert.test.d.ts +2 -0
  100. package/lib/test/unit/config/common.test.d.ts +2 -0
  101. package/lib/test/unit/config/convert.test.d.ts +2 -0
  102. package/lib/test/unit/config/predefined/default.test.d.ts +2 -0
  103. package/lib/test/unit/config/predefined/extended.test.d.ts +2 -0
  104. package/lib/test/unit/config/systemConfiguration.test.d.ts +2 -0
  105. package/lib/test/unit/config/systemConfigurationInitParams.test.d.ts +2 -0
  106. package/lib/test/unit/context/contextToken.test.d.ts +2 -0
  107. package/lib/test/unit/context/convert.test.d.ts +2 -0
  108. package/lib/test/unit/decisions/abstractDecision.test.d.ts +2 -0
  109. package/lib/test/unit/decisions/abstractDecisionCollector.test.d.ts +2 -0
  110. package/lib/test/unit/decisions/candidate.test.d.ts +2 -0
  111. package/lib/test/unit/decisions/concreteDecision.test.d.ts +2 -0
  112. package/lib/test/unit/decisions/decision.test.d.ts +2 -0
  113. package/lib/test/unit/import/collectionImporter.test.d.ts +2 -0
  114. package/lib/test/unit/import/fsItem.test.d.ts +2 -0
  115. package/lib/test/unit/import/fsItemImporter.test.d.ts +2 -0
  116. package/lib/test/unit/import/importContext.test.d.ts +2 -0
  117. package/lib/test/unit/import/importManager.test.d.ts +2 -0
  118. package/lib/test/unit/import/jsonImporter.test.d.ts +2 -0
  119. package/lib/test/unit/import/pathImporter.test.d.ts +2 -0
  120. package/lib/test/unit/qualifier-types/convert.test.d.ts +2 -0
  121. package/lib/test/unit/qualifier-types/helpers.test.d.ts +2 -0
  122. package/lib/test/unit/qualifier-types/languageQualifierType.test.d.ts +2 -0
  123. package/lib/test/unit/qualifier-types/literalQualifierType.test.d.ts +2 -0
  124. package/lib/test/unit/qualifier-types/literalValueHierarchy.test.d.ts +2 -0
  125. package/lib/test/unit/qualifier-types/qualifierType.test.d.ts +2 -0
  126. package/lib/test/unit/qualifier-types/qualifierTypeCollector.test.d.ts +2 -0
  127. package/lib/test/unit/qualifier-types/territoryQualifierType.test.d.ts +2 -0
  128. package/lib/test/unit/qualifier-types/testQualifierType.d.ts +15 -0
  129. package/lib/test/unit/qualifier-types/testQualifierType.js +89 -0
  130. package/lib/test/unit/qualifiers/convert.test.d.ts +2 -0
  131. package/lib/test/unit/qualifiers/qualifierCollector.test.d.ts +2 -0
  132. package/lib/test/unit/qualifiers/qualifierDefaultValue.test.d.ts +2 -0
  133. package/lib/test/unit/qualifiers/qualifierDefaultValueToken.test.d.ts +2 -0
  134. package/lib/test/unit/resource-json/convert.test.d.ts +2 -0
  135. package/lib/test/unit/resource-json/nameInheritance.test.d.ts +2 -0
  136. package/lib/test/unit/resource-json/resourceDeclCollection.test.d.ts +2 -0
  137. package/lib/test/unit/resource-json/resourceDeclTree.test.d.ts +2 -0
  138. package/lib/test/unit/resource-types/jsonResourceType.test.d.ts +2 -0
  139. package/lib/test/unit/resource-types/resourceTypeCollector.test.d.ts +2 -0
  140. package/lib/test/unit/resources/candidateReducer.integration.test.d.ts +2 -0
  141. package/lib/test/unit/resources/candidateReducer.test.d.ts +2 -0
  142. package/lib/test/unit/resources/reduceCandidates.test.d.ts +2 -0
  143. package/lib/test/unit/resources/reduceQualifiers.comprehensive.test.d.ts +2 -0
  144. package/lib/test/unit/resources/reduceQualifiers.test.d.ts +2 -0
  145. package/lib/test/unit/resources/resource.test.d.ts +2 -0
  146. package/lib/test/unit/resources/resourceBuilder.test.d.ts +2 -0
  147. package/lib/test/unit/resources/resourceCandidate.test.d.ts +2 -0
  148. package/lib/test/unit/resources/resourceManagerBuilder.clone.test.d.ts +2 -0
  149. package/lib/test/unit/resources/resourceManagerBuilder.getBuiltResourceTree.test.d.ts +2 -0
  150. package/lib/test/unit/resources/resourceManagerBuilder.test.d.ts +2 -0
  151. package/lib/test/unit/runtime/cacheListener.test.d.ts +2 -0
  152. package/lib/test/unit/runtime/cacheMetrics.test.d.ts +2 -0
  153. package/lib/test/unit/runtime/compiledResourceCollection.test.d.ts +2 -0
  154. package/lib/test/unit/runtime/conditionSetResolutionResult.comprehensive.test.d.ts +2 -0
  155. package/lib/test/unit/runtime/conditionSetResolutionResult.test.d.ts +2 -0
  156. package/lib/test/unit/runtime/context/contextQualifierProvider.test.d.ts +2 -0
  157. package/lib/test/unit/runtime/context/contextQualifierProviderValidator.test.d.ts +2 -0
  158. package/lib/test/unit/runtime/context/simpleContextQualifierProvider.test.d.ts +2 -0
  159. package/lib/test/unit/runtime/context/validatingSimpleContextQualifierProvider.test.d.ts +2 -0
  160. package/lib/test/unit/runtime/resource-tree/readOnlyResourceTree.test.d.ts +2 -0
  161. package/lib/test/unit/runtime/resource-tree/resourceTreeChildren.test.d.ts +2 -0
  162. package/lib/test/unit/runtime/resource-tree/resourceTreeChildrenValidator.test.d.ts +2 -0
  163. package/lib/test/unit/runtime/resourceResolver.defaultResolution.test.d.ts +2 -0
  164. package/lib/test/unit/runtime/resourceResolver.test.d.ts +2 -0
  165. package/lib/test/unit/runtime/validate.test.d.ts +2 -0
  166. package/lib/test/unit/zip-archive/convert.test.d.ts +2 -0
  167. package/lib/test/unit/zip-archive/json.test.d.ts +2 -0
  168. package/lib/test/unit/zip-archive/zipArchiveCreator.test.d.ts +2 -0
  169. package/lib/test/unit/zip-archive/zipArchiveFormat.test.d.ts +2 -0
  170. package/lib/test/unit/zip-archive/zipArchiveIdempotency.test.d.ts +2 -0
  171. package/lib/test/unit/zip-archive/zipArchiveLoader.test.d.ts +2 -0
  172. package/package.json +19 -25
  173. package/src/index.ts +75 -0
  174. package/src/packlets/bundle/bundleBuilder.ts +159 -0
  175. package/src/packlets/bundle/bundleLoader.ts +157 -0
  176. package/src/packlets/bundle/bundleNormalizer.ts +173 -0
  177. package/src/packlets/bundle/bundleUtils.ts +142 -0
  178. package/src/packlets/bundle/convert.ts +87 -0
  179. package/src/packlets/bundle/index.ts +52 -0
  180. package/src/packlets/bundle/model.ts +138 -0
  181. package/src/packlets/common/conditions.ts +226 -0
  182. package/src/packlets/common/convert.ts +184 -0
  183. package/src/packlets/common/helpers/conditions.ts +84 -0
  184. package/src/packlets/common/helpers/context.ts +88 -0
  185. package/src/packlets/common/helpers/index.ts +26 -0
  186. package/src/packlets/common/helpers/qualifierDefaultValues.ts +91 -0
  187. package/src/packlets/common/helpers/resources.ts +96 -0
  188. package/src/packlets/common/index.ts +30 -0
  189. package/src/packlets/common/resources.ts +78 -0
  190. package/src/packlets/common/validate/conditions.ts +595 -0
  191. package/src/packlets/common/validate/index.ts +27 -0
  192. package/src/packlets/common/validate/regularExpressions.ts +92 -0
  193. package/src/packlets/common/validate/resources.ts +170 -0
  194. package/src/packlets/conditions/condition.ts +351 -0
  195. package/src/packlets/conditions/conditionCollector.ts +103 -0
  196. package/src/packlets/conditions/conditionDecls.ts +50 -0
  197. package/src/packlets/conditions/conditionSet.ts +318 -0
  198. package/src/packlets/conditions/conditionSetCollector.ts +127 -0
  199. package/src/packlets/conditions/conditionSetDecls.ts +41 -0
  200. package/src/packlets/conditions/conditionToken.ts +180 -0
  201. package/src/packlets/conditions/convert/conditionSetDecls.ts +72 -0
  202. package/src/packlets/conditions/convert/decls.ts +95 -0
  203. package/src/packlets/conditions/convert/index.ts +24 -0
  204. package/src/packlets/conditions/index.ts +33 -0
  205. package/src/packlets/config/common.ts +107 -0
  206. package/src/packlets/config/configInitFactory.ts +142 -0
  207. package/src/packlets/config/convert.ts +61 -0
  208. package/src/packlets/config/index.ts +30 -0
  209. package/src/packlets/config/json.ts +43 -0
  210. package/src/packlets/config/predefined/default.ts +150 -0
  211. package/src/packlets/config/predefined/extended.ts +198 -0
  212. package/src/packlets/config/predefined/index.ts +26 -0
  213. package/src/packlets/config/systemConfiguration.ts +217 -0
  214. package/src/packlets/context/contextDecls.ts +76 -0
  215. package/src/packlets/context/contextToken.ts +252 -0
  216. package/src/packlets/context/convert/decls.ts +126 -0
  217. package/src/packlets/context/convert/index.ts +23 -0
  218. package/src/packlets/context/index.ts +27 -0
  219. package/src/packlets/decisions/abstractDecision.ts +87 -0
  220. package/src/packlets/decisions/abstractDecisionCollector.ts +122 -0
  221. package/src/packlets/decisions/candidate.ts +101 -0
  222. package/src/packlets/decisions/common.ts +37 -0
  223. package/src/packlets/decisions/concreteDecision.ts +157 -0
  224. package/src/packlets/decisions/decision.ts +172 -0
  225. package/src/packlets/decisions/index.ts +28 -0
  226. package/src/packlets/import/fsItem.ts +212 -0
  227. package/src/packlets/import/importContext.ts +183 -0
  228. package/src/packlets/import/importManager.ts +187 -0
  229. package/src/packlets/import/importable.ts +107 -0
  230. package/src/packlets/import/importers/collectionImporter.ts +153 -0
  231. package/src/packlets/import/importers/fsItemImporter.ts +154 -0
  232. package/src/packlets/import/importers/importer.ts +58 -0
  233. package/src/packlets/import/importers/index.ts +27 -0
  234. package/src/packlets/import/importers/jsonImporter.ts +133 -0
  235. package/src/packlets/import/importers/pathImporter.ts +134 -0
  236. package/src/packlets/import/index.ts +29 -0
  237. package/src/packlets/qualifier-types/config/convert.ts +108 -0
  238. package/src/packlets/qualifier-types/config/index.ts +27 -0
  239. package/src/packlets/qualifier-types/config/json.ts +126 -0
  240. package/src/packlets/qualifier-types/convert.ts +77 -0
  241. package/src/packlets/qualifier-types/helpers.ts +94 -0
  242. package/src/packlets/qualifier-types/index.ts +34 -0
  243. package/src/packlets/qualifier-types/languageQualifierType.ts +143 -0
  244. package/src/packlets/qualifier-types/literalQualifierType.ts +244 -0
  245. package/src/packlets/qualifier-types/literalValueHierarchy.ts +332 -0
  246. package/src/packlets/qualifier-types/qualifierType.ts +360 -0
  247. package/src/packlets/qualifier-types/qualifierTypeCollector.ts +102 -0
  248. package/src/packlets/qualifier-types/territoryQualifierType.ts +255 -0
  249. package/src/packlets/qualifiers/convert/decls.ts +90 -0
  250. package/src/packlets/qualifiers/convert/index.ts +24 -0
  251. package/src/packlets/qualifiers/convert/qualifier.ts +55 -0
  252. package/src/packlets/qualifiers/index.ts +31 -0
  253. package/src/packlets/qualifiers/qualifier.ts +169 -0
  254. package/src/packlets/qualifiers/qualifierCollector.ts +194 -0
  255. package/src/packlets/qualifiers/qualifierDecl.ts +80 -0
  256. package/src/packlets/qualifiers/qualifierDefaultValueDecls.ts +57 -0
  257. package/src/packlets/qualifiers/qualifierDefaultValueToken.ts +230 -0
  258. package/src/packlets/resource-json/compiled/common.ts +35 -0
  259. package/src/packlets/resource-json/compiled/convert.ts +143 -0
  260. package/src/packlets/resource-json/compiled/index.ts +27 -0
  261. package/src/packlets/resource-json/compiled/json.ts +239 -0
  262. package/src/packlets/resource-json/convert.ts +236 -0
  263. package/src/packlets/resource-json/helpers.ts +284 -0
  264. package/src/packlets/resource-json/index.ts +33 -0
  265. package/src/packlets/resource-json/json.ts +295 -0
  266. package/src/packlets/resource-json/normalized.ts +211 -0
  267. package/src/packlets/resource-json/resourceDeclCollection.ts +117 -0
  268. package/src/packlets/resource-json/resourceDeclContainer.ts +48 -0
  269. package/src/packlets/resource-json/resourceDeclTree.ts +116 -0
  270. package/src/packlets/resource-types/config/convert.ts +36 -0
  271. package/src/packlets/resource-types/config/index.ts +27 -0
  272. package/src/packlets/resource-types/config/json.ts +30 -0
  273. package/src/packlets/resource-types/helpers.ts +44 -0
  274. package/src/packlets/resource-types/index.ts +30 -0
  275. package/src/packlets/resource-types/jsonResourceType.ts +104 -0
  276. package/src/packlets/resource-types/resourceType.ts +259 -0
  277. package/src/packlets/resource-types/resourceTypeCollector.ts +79 -0
  278. package/src/packlets/resources/candidateReducer.ts +331 -0
  279. package/src/packlets/resources/common.ts +114 -0
  280. package/src/packlets/resources/index.ts +28 -0
  281. package/src/packlets/resources/resource.ts +307 -0
  282. package/src/packlets/resources/resourceBuilder.ts +269 -0
  283. package/src/packlets/resources/resourceCandidate.ts +333 -0
  284. package/src/packlets/resources/resourceManagerBuilder.ts +1169 -0
  285. package/src/packlets/runtime/cacheListener.ts +113 -0
  286. package/src/packlets/runtime/cacheMetrics.ts +206 -0
  287. package/src/packlets/runtime/compiledResourceCollection.ts +607 -0
  288. package/src/packlets/runtime/conditionSetResolutionResult.ts +160 -0
  289. package/src/packlets/runtime/context/contextQualifierProvider.ts +117 -0
  290. package/src/packlets/runtime/context/contextQualifierProviderValidator.ts +281 -0
  291. package/src/packlets/runtime/context/index.ts +26 -0
  292. package/src/packlets/runtime/context/simpleContextQualifierProvider.ts +225 -0
  293. package/src/packlets/runtime/context/validatingSimpleContextQualifierProvider.ts +96 -0
  294. package/src/packlets/runtime/iResourceManager.ts +130 -0
  295. package/src/packlets/runtime/index.ts +35 -0
  296. package/src/packlets/runtime/resource-tree/common.ts +126 -0
  297. package/src/packlets/runtime/resource-tree/index.ts +26 -0
  298. package/src/packlets/runtime/resource-tree/readOnlyResourceTree.ts +342 -0
  299. package/src/packlets/runtime/resource-tree/resourceTreeChildren.ts +125 -0
  300. package/src/packlets/runtime/resource-tree/resourceTreeChildrenValidator.ts +187 -0
  301. package/src/packlets/runtime/resourceResolver.ts +626 -0
  302. package/src/packlets/runtime/validate.ts +63 -0
  303. package/src/packlets/zip-archive/convert.ts +121 -0
  304. package/src/packlets/zip-archive/index.ts +76 -0
  305. package/src/packlets/zip-archive/json.ts +91 -0
  306. package/src/packlets/zip-archive/types.ts +140 -0
  307. package/src/packlets/zip-archive/zipArchiveCreator.ts +229 -0
  308. package/src/packlets/zip-archive/zipArchiveFormat.ts +158 -0
  309. package/src/packlets/zip-archive/zipArchiveLoader.ts +370 -0
  310. package/CHANGELOG.md +0 -14
  311. package/CLAUDE.md +0 -186
  312. package/EXAMPLE_INIT_PARAMS.md +0 -88
  313. package/PROGRESS_SUMMARY.md +0 -48
  314. package/lib/index.d.ts.map +0 -1
  315. package/lib/index.js.map +0 -1
  316. package/lib/packlets/common/conditions.d.ts.map +0 -1
  317. package/lib/packlets/common/conditions.js.map +0 -1
  318. package/lib/packlets/common/convert.d.ts.map +0 -1
  319. package/lib/packlets/common/convert.js.map +0 -1
  320. package/lib/packlets/common/helpers/conditions.d.ts.map +0 -1
  321. package/lib/packlets/common/helpers/conditions.js.map +0 -1
  322. package/lib/packlets/common/helpers/context.d.ts.map +0 -1
  323. package/lib/packlets/common/helpers/context.js.map +0 -1
  324. package/lib/packlets/common/helpers/index.d.ts.map +0 -1
  325. package/lib/packlets/common/helpers/index.js.map +0 -1
  326. package/lib/packlets/common/helpers/qualifierDefaultValues.d.ts.map +0 -1
  327. package/lib/packlets/common/helpers/qualifierDefaultValues.js.map +0 -1
  328. package/lib/packlets/common/helpers/resources.d.ts.map +0 -1
  329. package/lib/packlets/common/helpers/resources.js.map +0 -1
  330. package/lib/packlets/common/index.d.ts.map +0 -1
  331. package/lib/packlets/common/index.js.map +0 -1
  332. package/lib/packlets/common/resources.d.ts.map +0 -1
  333. package/lib/packlets/common/resources.js.map +0 -1
  334. package/lib/packlets/common/validate/conditions.d.ts.map +0 -1
  335. package/lib/packlets/common/validate/conditions.js.map +0 -1
  336. package/lib/packlets/common/validate/index.d.ts.map +0 -1
  337. package/lib/packlets/common/validate/index.js.map +0 -1
  338. package/lib/packlets/common/validate/regularExpressions.d.ts.map +0 -1
  339. package/lib/packlets/common/validate/regularExpressions.js.map +0 -1
  340. package/lib/packlets/common/validate/resources.d.ts.map +0 -1
  341. package/lib/packlets/common/validate/resources.js.map +0 -1
  342. package/lib/packlets/conditions/condition.d.ts.map +0 -1
  343. package/lib/packlets/conditions/condition.js.map +0 -1
  344. package/lib/packlets/conditions/conditionCollector.d.ts.map +0 -1
  345. package/lib/packlets/conditions/conditionCollector.js.map +0 -1
  346. package/lib/packlets/conditions/conditionDecls.d.ts.map +0 -1
  347. package/lib/packlets/conditions/conditionDecls.js.map +0 -1
  348. package/lib/packlets/conditions/conditionSet.d.ts.map +0 -1
  349. package/lib/packlets/conditions/conditionSet.js.map +0 -1
  350. package/lib/packlets/conditions/conditionSetCollector.d.ts.map +0 -1
  351. package/lib/packlets/conditions/conditionSetCollector.js.map +0 -1
  352. package/lib/packlets/conditions/conditionSetDecls.d.ts.map +0 -1
  353. package/lib/packlets/conditions/conditionSetDecls.js.map +0 -1
  354. package/lib/packlets/conditions/conditionToken.d.ts.map +0 -1
  355. package/lib/packlets/conditions/conditionToken.js.map +0 -1
  356. package/lib/packlets/conditions/convert/conditionSetDecls.d.ts.map +0 -1
  357. package/lib/packlets/conditions/convert/conditionSetDecls.js.map +0 -1
  358. package/lib/packlets/conditions/convert/decls.d.ts.map +0 -1
  359. package/lib/packlets/conditions/convert/decls.js.map +0 -1
  360. package/lib/packlets/conditions/convert/index.d.ts.map +0 -1
  361. package/lib/packlets/conditions/convert/index.js.map +0 -1
  362. package/lib/packlets/conditions/index.d.ts.map +0 -1
  363. package/lib/packlets/conditions/index.js.map +0 -1
  364. package/lib/packlets/config/common.d.ts.map +0 -1
  365. package/lib/packlets/config/common.js.map +0 -1
  366. package/lib/packlets/config/convert.d.ts.map +0 -1
  367. package/lib/packlets/config/convert.js.map +0 -1
  368. package/lib/packlets/config/index.d.ts.map +0 -1
  369. package/lib/packlets/config/index.js.map +0 -1
  370. package/lib/packlets/config/json.d.ts.map +0 -1
  371. package/lib/packlets/config/json.js.map +0 -1
  372. package/lib/packlets/config/predefined/default.d.ts.map +0 -1
  373. package/lib/packlets/config/predefined/default.js.map +0 -1
  374. package/lib/packlets/config/predefined/extended.d.ts.map +0 -1
  375. package/lib/packlets/config/predefined/extended.js.map +0 -1
  376. package/lib/packlets/config/predefined/index.d.ts.map +0 -1
  377. package/lib/packlets/config/predefined/index.js.map +0 -1
  378. package/lib/packlets/config/systemConfiguration.d.ts.map +0 -1
  379. package/lib/packlets/config/systemConfiguration.js.map +0 -1
  380. package/lib/packlets/context/contextDecls.d.ts.map +0 -1
  381. package/lib/packlets/context/contextDecls.js.map +0 -1
  382. package/lib/packlets/context/contextToken.d.ts.map +0 -1
  383. package/lib/packlets/context/contextToken.js.map +0 -1
  384. package/lib/packlets/context/convert/decls.d.ts.map +0 -1
  385. package/lib/packlets/context/convert/decls.js.map +0 -1
  386. package/lib/packlets/context/convert/index.d.ts.map +0 -1
  387. package/lib/packlets/context/convert/index.js.map +0 -1
  388. package/lib/packlets/context/index.d.ts.map +0 -1
  389. package/lib/packlets/context/index.js.map +0 -1
  390. package/lib/packlets/decisions/abstractDecision.d.ts.map +0 -1
  391. package/lib/packlets/decisions/abstractDecision.js.map +0 -1
  392. package/lib/packlets/decisions/abstractDecisionCollector.d.ts.map +0 -1
  393. package/lib/packlets/decisions/abstractDecisionCollector.js.map +0 -1
  394. package/lib/packlets/decisions/candidate.d.ts.map +0 -1
  395. package/lib/packlets/decisions/candidate.js.map +0 -1
  396. package/lib/packlets/decisions/common.d.ts.map +0 -1
  397. package/lib/packlets/decisions/common.js.map +0 -1
  398. package/lib/packlets/decisions/concreteDecision.d.ts.map +0 -1
  399. package/lib/packlets/decisions/concreteDecision.js.map +0 -1
  400. package/lib/packlets/decisions/decision.d.ts.map +0 -1
  401. package/lib/packlets/decisions/decision.js.map +0 -1
  402. package/lib/packlets/decisions/index.d.ts.map +0 -1
  403. package/lib/packlets/decisions/index.js.map +0 -1
  404. package/lib/packlets/import/fsItem.d.ts.map +0 -1
  405. package/lib/packlets/import/fsItem.js.map +0 -1
  406. package/lib/packlets/import/importContext.d.ts.map +0 -1
  407. package/lib/packlets/import/importContext.js.map +0 -1
  408. package/lib/packlets/import/importManager.d.ts.map +0 -1
  409. package/lib/packlets/import/importManager.js.map +0 -1
  410. package/lib/packlets/import/importable.d.ts.map +0 -1
  411. package/lib/packlets/import/importable.js.map +0 -1
  412. package/lib/packlets/import/importers/collectionImporter.d.ts.map +0 -1
  413. package/lib/packlets/import/importers/collectionImporter.js.map +0 -1
  414. package/lib/packlets/import/importers/fsItemImporter.d.ts.map +0 -1
  415. package/lib/packlets/import/importers/fsItemImporter.js.map +0 -1
  416. package/lib/packlets/import/importers/importer.d.ts.map +0 -1
  417. package/lib/packlets/import/importers/importer.js.map +0 -1
  418. package/lib/packlets/import/importers/index.d.ts.map +0 -1
  419. package/lib/packlets/import/importers/index.js.map +0 -1
  420. package/lib/packlets/import/importers/jsonImporter.d.ts.map +0 -1
  421. package/lib/packlets/import/importers/jsonImporter.js.map +0 -1
  422. package/lib/packlets/import/importers/pathImporter.d.ts.map +0 -1
  423. package/lib/packlets/import/importers/pathImporter.js.map +0 -1
  424. package/lib/packlets/import/index.d.ts.map +0 -1
  425. package/lib/packlets/import/index.js.map +0 -1
  426. package/lib/packlets/qualifier-types/config/convert.d.ts.map +0 -1
  427. package/lib/packlets/qualifier-types/config/convert.js.map +0 -1
  428. package/lib/packlets/qualifier-types/config/index.d.ts.map +0 -1
  429. package/lib/packlets/qualifier-types/config/index.js.map +0 -1
  430. package/lib/packlets/qualifier-types/config/json.d.ts.map +0 -1
  431. package/lib/packlets/qualifier-types/config/json.js.map +0 -1
  432. package/lib/packlets/qualifier-types/convert.d.ts.map +0 -1
  433. package/lib/packlets/qualifier-types/convert.js.map +0 -1
  434. package/lib/packlets/qualifier-types/helpers.d.ts.map +0 -1
  435. package/lib/packlets/qualifier-types/helpers.js.map +0 -1
  436. package/lib/packlets/qualifier-types/index.d.ts.map +0 -1
  437. package/lib/packlets/qualifier-types/index.js.map +0 -1
  438. package/lib/packlets/qualifier-types/languageQualifierType.d.ts.map +0 -1
  439. package/lib/packlets/qualifier-types/languageQualifierType.js.map +0 -1
  440. package/lib/packlets/qualifier-types/literalQualifierType.d.ts.map +0 -1
  441. package/lib/packlets/qualifier-types/literalQualifierType.js.map +0 -1
  442. package/lib/packlets/qualifier-types/literalValueHierarchy.d.ts.map +0 -1
  443. package/lib/packlets/qualifier-types/literalValueHierarchy.js.map +0 -1
  444. package/lib/packlets/qualifier-types/qualifierType.d.ts.map +0 -1
  445. package/lib/packlets/qualifier-types/qualifierType.js.map +0 -1
  446. package/lib/packlets/qualifier-types/qualifierTypeCollector.d.ts.map +0 -1
  447. package/lib/packlets/qualifier-types/qualifierTypeCollector.js.map +0 -1
  448. package/lib/packlets/qualifier-types/territoryQualifierType.d.ts.map +0 -1
  449. package/lib/packlets/qualifier-types/territoryQualifierType.js.map +0 -1
  450. package/lib/packlets/qualifiers/convert/decls.d.ts.map +0 -1
  451. package/lib/packlets/qualifiers/convert/decls.js.map +0 -1
  452. package/lib/packlets/qualifiers/convert/index.d.ts.map +0 -1
  453. package/lib/packlets/qualifiers/convert/index.js.map +0 -1
  454. package/lib/packlets/qualifiers/convert/qualifier.d.ts.map +0 -1
  455. package/lib/packlets/qualifiers/convert/qualifier.js.map +0 -1
  456. package/lib/packlets/qualifiers/index.d.ts.map +0 -1
  457. package/lib/packlets/qualifiers/index.js.map +0 -1
  458. package/lib/packlets/qualifiers/qualifier.d.ts.map +0 -1
  459. package/lib/packlets/qualifiers/qualifier.js.map +0 -1
  460. package/lib/packlets/qualifiers/qualifierCollector.d.ts.map +0 -1
  461. package/lib/packlets/qualifiers/qualifierCollector.js.map +0 -1
  462. package/lib/packlets/qualifiers/qualifierDecl.d.ts.map +0 -1
  463. package/lib/packlets/qualifiers/qualifierDecl.js.map +0 -1
  464. package/lib/packlets/qualifiers/qualifierDefaultValueDecls.d.ts.map +0 -1
  465. package/lib/packlets/qualifiers/qualifierDefaultValueDecls.js.map +0 -1
  466. package/lib/packlets/qualifiers/qualifierDefaultValueToken.d.ts.map +0 -1
  467. package/lib/packlets/qualifiers/qualifierDefaultValueToken.js.map +0 -1
  468. package/lib/packlets/resource-json/compiled/common.d.ts.map +0 -1
  469. package/lib/packlets/resource-json/compiled/common.js.map +0 -1
  470. package/lib/packlets/resource-json/compiled/convert.d.ts.map +0 -1
  471. package/lib/packlets/resource-json/compiled/convert.js.map +0 -1
  472. package/lib/packlets/resource-json/compiled/index.d.ts.map +0 -1
  473. package/lib/packlets/resource-json/compiled/index.js.map +0 -1
  474. package/lib/packlets/resource-json/compiled/json.d.ts.map +0 -1
  475. package/lib/packlets/resource-json/compiled/json.js.map +0 -1
  476. package/lib/packlets/resource-json/convert.d.ts.map +0 -1
  477. package/lib/packlets/resource-json/convert.js.map +0 -1
  478. package/lib/packlets/resource-json/helpers.d.ts.map +0 -1
  479. package/lib/packlets/resource-json/helpers.js.map +0 -1
  480. package/lib/packlets/resource-json/index.d.ts.map +0 -1
  481. package/lib/packlets/resource-json/index.js.map +0 -1
  482. package/lib/packlets/resource-json/json.d.ts.map +0 -1
  483. package/lib/packlets/resource-json/json.js.map +0 -1
  484. package/lib/packlets/resource-json/normalized.d.ts.map +0 -1
  485. package/lib/packlets/resource-json/normalized.js.map +0 -1
  486. package/lib/packlets/resource-json/resourceDeclCollection.d.ts.map +0 -1
  487. package/lib/packlets/resource-json/resourceDeclCollection.js.map +0 -1
  488. package/lib/packlets/resource-json/resourceDeclContainer.d.ts.map +0 -1
  489. package/lib/packlets/resource-json/resourceDeclContainer.js.map +0 -1
  490. package/lib/packlets/resource-json/resourceDeclTree.d.ts.map +0 -1
  491. package/lib/packlets/resource-json/resourceDeclTree.js.map +0 -1
  492. package/lib/packlets/resource-types/config/convert.d.ts.map +0 -1
  493. package/lib/packlets/resource-types/config/convert.js.map +0 -1
  494. package/lib/packlets/resource-types/config/index.d.ts.map +0 -1
  495. package/lib/packlets/resource-types/config/index.js.map +0 -1
  496. package/lib/packlets/resource-types/config/json.d.ts.map +0 -1
  497. package/lib/packlets/resource-types/config/json.js.map +0 -1
  498. package/lib/packlets/resource-types/helpers.d.ts.map +0 -1
  499. package/lib/packlets/resource-types/helpers.js.map +0 -1
  500. package/lib/packlets/resource-types/index.d.ts.map +0 -1
  501. package/lib/packlets/resource-types/index.js.map +0 -1
  502. package/lib/packlets/resource-types/jsonResourceType.d.ts.map +0 -1
  503. package/lib/packlets/resource-types/jsonResourceType.js.map +0 -1
  504. package/lib/packlets/resource-types/resourceType.d.ts.map +0 -1
  505. package/lib/packlets/resource-types/resourceType.js.map +0 -1
  506. package/lib/packlets/resource-types/resourceTypeCollector.d.ts.map +0 -1
  507. package/lib/packlets/resource-types/resourceTypeCollector.js.map +0 -1
  508. package/lib/packlets/resources/candidateReducer.d.ts.map +0 -1
  509. package/lib/packlets/resources/candidateReducer.js.map +0 -1
  510. package/lib/packlets/resources/common.d.ts.map +0 -1
  511. package/lib/packlets/resources/common.js.map +0 -1
  512. package/lib/packlets/resources/index.d.ts.map +0 -1
  513. package/lib/packlets/resources/index.js.map +0 -1
  514. package/lib/packlets/resources/resource.d.ts.map +0 -1
  515. package/lib/packlets/resources/resource.js.map +0 -1
  516. package/lib/packlets/resources/resourceBuilder.d.ts.map +0 -1
  517. package/lib/packlets/resources/resourceBuilder.js.map +0 -1
  518. package/lib/packlets/resources/resourceCandidate.d.ts.map +0 -1
  519. package/lib/packlets/resources/resourceCandidate.js.map +0 -1
  520. package/lib/packlets/resources/resourceManagerBuilder.d.ts.map +0 -1
  521. package/lib/packlets/resources/resourceManagerBuilder.js.map +0 -1
  522. package/lib/packlets/runtime/cacheListener.d.ts.map +0 -1
  523. package/lib/packlets/runtime/cacheListener.js.map +0 -1
  524. package/lib/packlets/runtime/cacheMetrics.d.ts.map +0 -1
  525. package/lib/packlets/runtime/cacheMetrics.js.map +0 -1
  526. package/lib/packlets/runtime/compiledResourceCollection.d.ts.map +0 -1
  527. package/lib/packlets/runtime/compiledResourceCollection.js.map +0 -1
  528. package/lib/packlets/runtime/conditionSetResolutionResult.d.ts.map +0 -1
  529. package/lib/packlets/runtime/conditionSetResolutionResult.js.map +0 -1
  530. package/lib/packlets/runtime/context/contextQualifierProvider.d.ts.map +0 -1
  531. package/lib/packlets/runtime/context/contextQualifierProvider.js.map +0 -1
  532. package/lib/packlets/runtime/context/contextQualifierProviderValidator.d.ts.map +0 -1
  533. package/lib/packlets/runtime/context/contextQualifierProviderValidator.js.map +0 -1
  534. package/lib/packlets/runtime/context/index.d.ts.map +0 -1
  535. package/lib/packlets/runtime/context/index.js.map +0 -1
  536. package/lib/packlets/runtime/context/simpleContextQualifierProvider.d.ts.map +0 -1
  537. package/lib/packlets/runtime/context/simpleContextQualifierProvider.js.map +0 -1
  538. package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.d.ts.map +0 -1
  539. package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.js.map +0 -1
  540. package/lib/packlets/runtime/iResourceManager.d.ts.map +0 -1
  541. package/lib/packlets/runtime/iResourceManager.js.map +0 -1
  542. package/lib/packlets/runtime/index.d.ts.map +0 -1
  543. package/lib/packlets/runtime/index.js.map +0 -1
  544. package/lib/packlets/runtime/resource-tree/common.d.ts.map +0 -1
  545. package/lib/packlets/runtime/resource-tree/common.js.map +0 -1
  546. package/lib/packlets/runtime/resource-tree/index.d.ts.map +0 -1
  547. package/lib/packlets/runtime/resource-tree/index.js.map +0 -1
  548. package/lib/packlets/runtime/resource-tree/readOnlyResourceTree.d.ts.map +0 -1
  549. package/lib/packlets/runtime/resource-tree/readOnlyResourceTree.js.map +0 -1
  550. package/lib/packlets/runtime/resource-tree/resourceTreeChildren.d.ts.map +0 -1
  551. package/lib/packlets/runtime/resource-tree/resourceTreeChildren.js.map +0 -1
  552. package/lib/packlets/runtime/resource-tree/resourceTreeChildrenValidator.d.ts.map +0 -1
  553. package/lib/packlets/runtime/resource-tree/resourceTreeChildrenValidator.js.map +0 -1
  554. package/lib/packlets/runtime/resourceResolver.d.ts.map +0 -1
  555. package/lib/packlets/runtime/resourceResolver.js.map +0 -1
  556. package/lib/packlets/runtime/validate.d.ts.map +0 -1
  557. package/lib/packlets/runtime/validate.js.map +0 -1
package/dist/ts-res.d.ts CHANGED
@@ -3,6 +3,7 @@ import { Collections } from '@fgv/ts-utils';
3
3
  import { Converter } from '@fgv/ts-utils';
4
4
  import { DetailedResult } from '@fgv/ts-utils';
5
5
  import { FileTree } from '@fgv/ts-utils';
6
+ import { Hash } from '@fgv/ts-utils';
6
7
  import { ICollectible } from '@fgv/ts-utils';
7
8
  import { IReadOnlyResultMap } from '@fgv/ts-utils';
8
9
  import { JsonObject } from '@fgv/ts-json-base';
@@ -13,6 +14,7 @@ import { ResultMap } from '@fgv/ts-utils';
13
14
  import { ValidatingCollector } from '@fgv/ts-utils';
14
15
  import { ValidatingConvertingCollector } from '@fgv/ts-utils';
15
16
  import { ValidatingResultMap } from '@fgv/ts-utils';
17
+ import { Validator } from '@fgv/ts-utils';
16
18
 
17
19
  /**
18
20
  * An abstract decision represents a class of decisions with candidates
@@ -178,6 +180,280 @@ declare function buildQualifierDefaultValuesToken(parts: ReadonlyArray<IQualifie
178
180
  */
179
181
  declare function buildQualifierDefaultValueToken({ qualifier, value }: IQualifierDefaultValueTokenParts): Result<QualifierDefaultValueToken>;
180
182
 
183
+ /**
184
+ * A factory that creates a {@link QualifierTypes.QualifierType | QualifierType} from a {@link QualifierTypes.Config.ISystemQualifierTypeConfig | system qualifier type configuration}.
185
+ * @public
186
+ */
187
+ declare class BuiltInQualifierTypeFactory implements IConfigInitFactory<QualifierTypes.Config.IAnyQualifierTypeConfig, QualifierType> {
188
+ /** {@inheritDoc Config.IConfigInitFactory.create} */
189
+ create(config: QualifierTypes.Config.IAnyQualifierTypeConfig): Result<QualifierType>;
190
+ }
191
+
192
+ /**
193
+ * A factory that creates a {@link ResourceTypes.ResourceType | ResourceType} from a {@link ResourceTypes.Config.IResourceTypeConfig | resource type configuration}.
194
+ * @public
195
+ */
196
+ declare class BuiltInResourceTypeFactory implements IConfigInitFactory<ResourceTypes.Config.IResourceTypeConfig, ResourceType> {
197
+ /** {@inheritDoc Config.IConfigInitFactory.create} */
198
+ create(config: ResourceTypes.Config.IResourceTypeConfig): Result<ResourceType>;
199
+ }
200
+
201
+ declare namespace Bundle {
202
+ export {
203
+ IBundleMetadata,
204
+ IBundleExportMetadata,
205
+ IBundle,
206
+ IBundleCreateParams,
207
+ BundleBuilder,
208
+ BundleLoader,
209
+ IBundleLoaderCreateParams,
210
+ BundleUtils,
211
+ IBundleComponents,
212
+ Model_4 as Model,
213
+ Convert_10 as Convert,
214
+ BundleNormalizer
215
+ }
216
+ }
217
+ export { Bundle }
218
+
219
+ /**
220
+ * `Converter` for a {@link Bundle.IBundle | bundle} object.
221
+ * @public
222
+ */
223
+ declare const bundle: Converter<IBundle>;
224
+
225
+ /**
226
+ * Builder for creating resource bundles from a ResourceManagerBuilder.
227
+ * Handles the compilation, configuration extraction, and integrity verification
228
+ * needed to create a complete, portable bundle.
229
+ * @public
230
+ */
231
+ export declare class BundleBuilder {
232
+ /**
233
+ * Creates a resource bundle from a ResourceManagerBuilder.
234
+ * @param builder - The ResourceManagerBuilder containing the resources to bundle
235
+ * @param systemConfig - The SystemConfiguration used to create the builder
236
+ * @param params - Optional parameters for bundle creation
237
+ * @returns Success with the created bundle if successful, Failure with error message otherwise
238
+ * @public
239
+ */
240
+ static create(builder: ResourceManagerBuilder, systemConfig: SystemConfiguration, params?: IBundleCreateParams): Result<IBundle>;
241
+ /**
242
+ * Creates a resource bundle from a ResourceManagerBuilder using a predefined system configuration.
243
+ * This is a convenience method for the common case of using predefined configurations.
244
+ * @param builder - The ResourceManagerBuilder containing the resources to bundle
245
+ * @param configName - The name of the predefined system configuration used
246
+ * @param params - Optional parameters for bundle creation
247
+ * @returns Success with the created bundle if successful, Failure with error message otherwise
248
+ * @public
249
+ */
250
+ static createFromPredefined(builder: ResourceManagerBuilder, configName: PredefinedSystemConfiguration, params?: IBundleCreateParams): Result<IBundle>;
251
+ /**
252
+ * Generates a hash checksum for the compiled resource collection.
253
+ * The checksum is calculated using the provided hash normalizer.
254
+ * @param compiledCollection - The compiled resource collection to generate checksum for
255
+ * @param hashNormalizer - The hash normalizer to use for checksum generation
256
+ * @returns Success with the checksum string if successful, Failure otherwise
257
+ * @internal
258
+ */
259
+ private static _generateChecksum;
260
+ }
261
+
262
+ /**
263
+ * `Converter` for {@link Bundle.IBundleCreateParams | bundle creation parameters}.
264
+ * @public
265
+ */
266
+ declare const bundleCreateParams: Converter<IBundleCreateParams>;
267
+
268
+ /**
269
+ * `Converter` for {@link Bundle.IBundleExportMetadata | bundle export metadata}.
270
+ * @public
271
+ */
272
+ declare const bundleExportMetadata: Converter<IBundleExportMetadata>;
273
+
274
+ /**
275
+ * Loader for creating an IResourceManager from a resource bundle.
276
+ * Handles integrity verification and reconstruction of the runtime resource manager.
277
+ * @public
278
+ */
279
+ export declare class BundleLoader {
280
+ /**
281
+ * Creates an IResourceManager from a resource bundle.
282
+ * @param params - Parameters for bundle loading including the bundle and options
283
+ * @returns Success with the IResourceManager if successful, Failure with error message otherwise
284
+ * @public
285
+ */
286
+ static createManagerFromBundle(params: IBundleLoaderCreateParams): Result<IResourceManager>;
287
+ /**
288
+ * Verifies the integrity of a bundle by checking its checksum.
289
+ * @param bundle - The bundle to verify
290
+ * @param skipVerification - Whether to skip verification
291
+ * @param hashNormalizer - The hash normalizer to use for verification
292
+ * @returns Success if verification passes or is skipped, Failure otherwise
293
+ * @internal
294
+ */
295
+ private static _verifyBundleIntegrity;
296
+ /**
297
+ * Generates a hash checksum for the compiled resource collection.
298
+ * @param compiledCollection - The compiled resource collection to generate checksum for
299
+ * @param hashNormalizer - The hash normalizer to use for checksum generation
300
+ * @returns Success with the checksum string if successful, Failure otherwise
301
+ * @internal
302
+ */
303
+ private static _generateChecksum;
304
+ /**
305
+ * Creates a SystemConfiguration from the bundle's configuration.
306
+ * @param bundle - The bundle containing the configuration
307
+ * @returns Success with the SystemConfiguration if successful, Failure otherwise
308
+ * @internal
309
+ */
310
+ private static _createSystemConfiguration;
311
+ /**
312
+ * Creates a CompiledResourceCollection from the bundle.
313
+ * @param bundle - The bundle to load
314
+ * @param qualifierTypes - The qualifier type collector from the system configuration
315
+ * @param resourceTypes - The resource type collector from the system configuration
316
+ * @returns Success with the CompiledResourceCollection if successful, Failure otherwise
317
+ * @internal
318
+ */
319
+ private static _createCompiledResourceCollection;
320
+ }
321
+
322
+ /**
323
+ * `Converter` for a {@link Bundle.IBundleMetadata | bundle metadata} object.
324
+ * @public
325
+ */
326
+ declare const bundleMetadata: Converter<IBundleMetadata>;
327
+
328
+ /**
329
+ * Normalizes ResourceManagerBuilder instances to ensure consistent ordering
330
+ * of internal entities, enabling order-independent bundle checksums.
331
+ *
332
+ * The normalization process rebuilds the ResourceManagerBuilder from the ground up
333
+ * in a canonical order to ensure identical index assignments regardless of
334
+ * original construction order.
335
+ * @public
336
+ */
337
+ declare class BundleNormalizer {
338
+ /**
339
+ * Creates a normalized ResourceManagerBuilder from an existing builder.
340
+ * The normalized builder will have identical entities but arranged in
341
+ * canonical order to ensure consistent index assignments.
342
+ *
343
+ * @param originalBuilder - The ResourceManagerBuilder to normalize
344
+ * @param systemConfig - The SystemConfiguration used to create the original builder
345
+ * @returns Success with the normalized ResourceManagerBuilder if successful, Failure otherwise
346
+ */
347
+ static normalize(originalBuilder: ResourceManagerBuilder, systemConfig: SystemConfiguration): Result<ResourceManagerBuilder>;
348
+ /**
349
+ * Creates a normalized ResourceManagerBuilder using a predefined system configuration.
350
+ * This is a convenience method for the common case of using predefined configurations.
351
+ *
352
+ * @param originalBuilder - The ResourceManagerBuilder to normalize
353
+ * @param configName - The name of the predefined system configuration used
354
+ * @returns Success with the normalized ResourceManagerBuilder if successful, Failure otherwise
355
+ */
356
+ static normalizeFromPredefined(originalBuilder: ResourceManagerBuilder, configName: PredefinedSystemConfiguration): Result<ResourceManagerBuilder>;
357
+ /**
358
+ * Normalizes all conditions from the original builder by adding them to the
359
+ * normalized builder in sorted order using loose condition declarations.
360
+ *
361
+ * @param originalBuilder - The source ResourceManagerBuilder
362
+ * @param normalizedBuilder - The target normalized ResourceManagerBuilder
363
+ * @returns Success if all conditions were normalized successfully, Failure otherwise
364
+ * @internal
365
+ */
366
+ private static _normalizeConditions;
367
+ /**
368
+ * Normalizes all condition sets from the original builder by adding them to the
369
+ * normalized builder in sorted order using loose condition set declarations.
370
+ *
371
+ * @param originalBuilder - The source ResourceManagerBuilder
372
+ * @param normalizedBuilder - The target normalized ResourceManagerBuilder
373
+ * @returns Success if all condition sets were normalized successfully, Failure otherwise
374
+ * @internal
375
+ */
376
+ private static _normalizeConditionSets;
377
+ /**
378
+ * Normalizes all candidates by sorting them first by resource ID, then by condition set.
379
+ *
380
+ * @param originalBuilder - The source ResourceManagerBuilder
381
+ * @param normalizedBuilder - The target normalized ResourceManagerBuilder
382
+ * @returns Success if all candidates were normalized successfully, Failure otherwise
383
+ * @internal
384
+ */
385
+ private static _normalizeCandidates;
386
+ /**
387
+ * Adds normalized resources to the target builder by first normalizing conditions,
388
+ * then condition sets, then candidates.
389
+ *
390
+ * @param originalBuilder - The source ResourceManagerBuilder
391
+ * @param normalizedBuilder - The target normalized ResourceManagerBuilder
392
+ * @returns Success if all resources were added successfully, Failure otherwise
393
+ * @internal
394
+ */
395
+ private static _addNormalizedResources;
396
+ }
397
+
398
+ /**
399
+ * Lightweight converter for bundle structure validation without full processing.
400
+ * Useful for detecting bundle files without the overhead of full validation.
401
+ * @public
402
+ */
403
+ declare const bundleStructure: Converter<{
404
+ metadata: IBundleMetadata;
405
+ config: unknown;
406
+ compiledCollection: unknown;
407
+ }>;
408
+
409
+ /**
410
+ * Utility functions for working with resource bundles.
411
+ * Provides reusable logic for bundle detection, parsing, and component extraction.
412
+ * @public
413
+ */
414
+ declare class BundleUtils {
415
+ /**
416
+ * Checks if the given object appears to be a bundle file by examining its structure.
417
+ * This is a lightweight check that doesn't perform full validation.
418
+ * @param data - The data to check
419
+ * @returns True if the data appears to be a bundle structure
420
+ * @public
421
+ */
422
+ static isBundleFile(data: unknown): boolean;
423
+ /**
424
+ * Extracts and validates components from a bundle for reuse.
425
+ * Performs full validation of the bundle structure and creates typed components.
426
+ * @param bundleData - The raw bundle data to extract components from
427
+ * @returns Success with bundle components if valid, Failure with error message otherwise
428
+ * @public
429
+ */
430
+ static extractBundleComponents(bundleData: unknown): Result<IBundleComponents>;
431
+ /**
432
+ * Extracts just the metadata from potential bundle data without full validation.
433
+ * Useful for displaying bundle information without processing the entire bundle.
434
+ * @param data - The data to extract metadata from
435
+ * @returns Success with metadata if found and valid, Failure otherwise
436
+ * @public
437
+ */
438
+ static extractBundleMetadata(data: unknown): Result<IBundleMetadata>;
439
+ /**
440
+ * Parses bundle data from a JSON string.
441
+ * Convenience method that combines JSON parsing with bundle component extraction.
442
+ * @param jsonString - The JSON string containing bundle data
443
+ * @returns Success with bundle components if valid, Failure with error message otherwise
444
+ * @public
445
+ */
446
+ static parseBundleFromJson(jsonString: string): Result<IBundleComponents>;
447
+ /**
448
+ * Checks if a file name suggests it might be a bundle file.
449
+ * This is a heuristic check based on file naming conventions.
450
+ * @param fileName - The file name to check
451
+ * @returns True if the file name suggests a bundle file
452
+ * @public
453
+ */
454
+ static isBundleFileName(fileName: string): boolean;
455
+ }
456
+
181
457
  /**
182
458
  * Simple implementation of {@link Decisions.ICandidate | ICandidate} with
183
459
  * helper methods for sorting and presentation.
@@ -227,6 +503,15 @@ declare class Candidate<TVALUE extends JsonValue = JsonValue> implements ICandid
227
503
  */
228
504
  declare type CandidateAction = 'unchanged' | 'reduced' | 'suppressed';
229
505
 
506
+ /**
507
+ * The completeness of a resource candidate value. A full value is one that
508
+ * contains all of the required properties for the resource type. A partial
509
+ * value is one that contains some of the required properties for the resource
510
+ * type.
511
+ * @public
512
+ */
513
+ export declare type CandidateCompleteness = 'full' | 'partial';
514
+
230
515
  /**
231
516
  * Manages candidate reduction logic for filtering and qualifier reduction operations.
232
517
  * Encapsulates the state and logic needed to consistently process candidates for reduction.
@@ -292,6 +577,25 @@ declare class CandidateReducer {
292
577
  reduceCandidate(candidate: ResourceCandidate): Result<IReducedCandidate | undefined>;
293
578
  }
294
579
 
580
+ /**
581
+ * A factory that chains multiple factories together.
582
+ * @public
583
+ */
584
+ declare class ChainedConfigInitFactory<TConfig, T> implements IConfigInitFactory<TConfig, T> {
585
+ readonly factories: IConfigInitFactory<TConfig, T>[];
586
+ /**
587
+ * Constructor for a chained config init factory.
588
+ * @param factories - The factories to chain.
589
+ */
590
+ constructor(factories: IConfigInitFactory<TConfig, T>[]);
591
+ /**
592
+ * Creates a new instance of a configuration object.
593
+ * @param config - The configuration object to create.
594
+ * @returns A result containing the new instance of the configuration object.
595
+ */
596
+ create(config: TConfig): Result<T>;
597
+ }
598
+
295
599
  /**
296
600
  * `Converter` for a normalized {@link ResourceJson.Json.IChildConditionDecl | child condition declaration}.
297
601
  * @public
@@ -402,13 +706,14 @@ declare namespace Common {
402
706
  ResourceTypeName,
403
707
  ResourceTypeIndex,
404
708
  ResourceValueMergeMethod,
405
- allResourceValueMergeMethods
709
+ allResourceValueMergeMethods,
710
+ CandidateCompleteness
406
711
  }
407
712
  }
408
713
 
409
714
  declare namespace Compiled {
410
715
  export {
411
- Convert_3 as Convert,
716
+ Convert_6 as Convert,
412
717
  ICompiledResourceOptions,
413
718
  ICompiledConditionMetadata,
414
719
  ICompiledConditionSetMetadata,
@@ -429,61 +734,61 @@ declare namespace Compiled {
429
734
  * Converter for a {@link ResourceJson.Compiled.ICompiledAbstractDecision | compiled abstract decision}.
430
735
  * @public
431
736
  */
432
- declare const compiledAbstractDecision: ObjectConverter<Model.ICompiledAbstractDecision, unknown>;
737
+ declare const compiledAbstractDecision: ObjectConverter<Model_3.ICompiledAbstractDecision, unknown>;
433
738
 
434
739
  /**
435
740
  * Converter for a {@link ResourceJson.Compiled.ICompiledCandidate | compiled candidate}.
436
741
  * @public
437
742
  */
438
- declare const compiledCandidate: ObjectConverter<Model.ICompiledCandidate, unknown>;
743
+ declare const compiledCandidate: ObjectConverter<Model_3.ICompiledCandidate, unknown>;
439
744
 
440
745
  /**
441
746
  * Converter for a {@link ResourceJson.Compiled.ICompiledCondition | compiled condition}.
442
747
  * @public
443
748
  */
444
- declare const compiledCondition: ObjectConverter<Model.ICompiledCondition, unknown>;
749
+ declare const compiledCondition: ObjectConverter<Model_3.ICompiledCondition, unknown>;
445
750
 
446
751
  /**
447
752
  * Converter for a {@link ResourceJson.Compiled.ICompiledConditionMetadata | compiled condition metadata}.
448
753
  * @public
449
754
  */
450
- declare const compiledConditionMetadata: ObjectConverter<Model.ICompiledConditionMetadata, unknown>;
755
+ declare const compiledConditionMetadata: ObjectConverter<Model_3.ICompiledConditionMetadata, unknown>;
451
756
 
452
757
  /**
453
758
  * Converter for a {@link ResourceJson.Compiled.ICompiledConditionSet | compiled condition set}.
454
759
  * @public
455
760
  */
456
- declare const compiledConditionSet: ObjectConverter<Model.ICompiledConditionSet, unknown>;
761
+ declare const compiledConditionSet: ObjectConverter<Model_3.ICompiledConditionSet, unknown>;
457
762
 
458
763
  /**
459
764
  * Converter for a {@link ResourceJson.Compiled.ICompiledConditionSetMetadata | compiled condition set metadata}.
460
765
  * @public
461
766
  */
462
- declare const compiledConditionSetMetadata: ObjectConverter<Model.ICompiledConditionSetMetadata, unknown>;
767
+ declare const compiledConditionSetMetadata: ObjectConverter<Model_3.ICompiledConditionSetMetadata, unknown>;
463
768
 
464
769
  /**
465
770
  * Converter for a {@link ResourceJson.Compiled.ICompiledDecisionMetadata | compiled decision metadata}.
466
771
  * @public
467
772
  */
468
- declare const compiledDecisionMetadata: ObjectConverter<Model.ICompiledDecisionMetadata, unknown>;
773
+ declare const compiledDecisionMetadata: ObjectConverter<Model_3.ICompiledDecisionMetadata, unknown>;
469
774
 
470
775
  /**
471
776
  * Converter for a {@link ResourceJson.Compiled.ICompiledQualifier | compiled qualifier}.
472
777
  * @public
473
778
  */
474
- declare const compiledQualifier: ObjectConverter<Model.ICompiledQualifier, unknown>;
779
+ declare const compiledQualifier: ObjectConverter<Model_3.ICompiledQualifier, unknown>;
475
780
 
476
781
  /**
477
782
  * Converter for a {@link ResourceJson.Compiled.ICompiledQualifierType | compiled qualifier type}.
478
783
  * @public
479
784
  */
480
- declare const compiledQualifierType: ObjectConverter<Model.ICompiledQualifierType, unknown>;
785
+ declare const compiledQualifierType: ObjectConverter<Model_3.ICompiledQualifierType, unknown>;
481
786
 
482
787
  /**
483
788
  * Converter for a {@link ResourceJson.Compiled.ICompiledResource | compiled resource}.
484
789
  * @public
485
790
  */
486
- declare const compiledResource: ObjectConverter<Model.ICompiledResource, unknown>;
791
+ declare const compiledResource: ObjectConverter<Model_3.ICompiledResource, unknown>;
487
792
 
488
793
  /**
489
794
  * A compiled resource collection implements {@link Runtime.IResourceManager | IResourceManager}
@@ -491,7 +796,7 @@ declare const compiledResource: ObjectConverter<Model.ICompiledResource, unknown
491
796
  * and use pre-compiled resource collections without rebuilding them from scratch.
492
797
  * @public
493
798
  */
494
- declare class CompiledResourceCollection implements IResourceManager {
799
+ declare class CompiledResourceCollection implements IResourceManager<IResource> {
495
800
  readonly conditions: ReadOnlyConditionCollector;
496
801
  readonly conditionSets: ReadOnlyConditionSetCollector;
497
802
  readonly decisions: ReadOnlyAbstractDecisionCollector;
@@ -563,7 +868,7 @@ declare class CompiledResourceCollection implements IResourceManager {
563
868
  * @returns Result containing the resource tree root, or failure if tree construction fails
564
869
  * @public
565
870
  */
566
- getBuiltResourceTree(): Result<IReadOnlyResourceTreeRoot<IResource>>;
871
+ getBuiltResourceTree(): Result<ReadOnlyResourceTreeRoot<IResource>>;
567
872
  /**
568
873
  * Reconstructs a QualifierTypeCollector from compiled data.
569
874
  * @param compiled - The compiled resource collection
@@ -628,13 +933,13 @@ declare class CompiledResourceCollection implements IResourceManager {
628
933
  * This combines all the individual converters into a single converter for the entire resource collection.
629
934
  * @public
630
935
  */
631
- declare const compiledResourceCollection: ObjectConverter<Model.ICompiledResourceCollection, unknown>;
936
+ declare const compiledResourceCollection: ObjectConverter<Model_3.ICompiledResourceCollection, unknown>;
632
937
 
633
938
  /**
634
939
  * Converter for a {@link ResourceJson.Compiled.ICompiledResourceType | compiled resource type}.
635
940
  * @public
636
941
  */
637
- declare const compiledResourceType: ObjectConverter<Model.ICompiledResourceType, unknown>;
942
+ declare const compiledResourceType: ObjectConverter<Model_3.ICompiledResourceType, unknown>;
638
943
 
639
944
  /**
640
945
  * A {@link Decisions.ConcreteDecision | concrete decision} is a {@link Decisions.IDecision | decision}
@@ -685,7 +990,7 @@ declare class ConcreteDecision<TVALUE extends JsonValue = JsonValue> implements
685
990
  * Represents a single condition applied to some resource instance.
686
991
  * @public
687
992
  */
688
- declare class Condition implements IValidatedConditionDecl {
993
+ export declare class Condition implements IValidatedConditionDecl {
689
994
  /**
690
995
  * The {@link Qualifiers.Qualifier | qualifier} used in this condition.
691
996
  */
@@ -932,7 +1237,7 @@ declare const conditionPriority: Converter<ConditionPriority, unknown>;
932
1237
 
933
1238
  declare namespace Conditions {
934
1239
  export {
935
- Convert_2 as Convert,
1240
+ Convert_11 as Convert,
936
1241
  Condition,
937
1242
  IConditionCollectorCreateParams,
938
1243
  ConditionCollector,
@@ -956,7 +1261,7 @@ export { Conditions }
956
1261
  * context for a resource instance to be valid.
957
1262
  * @public
958
1263
  */
959
- declare class ConditionSet implements IValidatedConditionSetDecl {
1264
+ export declare class ConditionSet implements IValidatedConditionSetDecl {
960
1265
  protected readonly _collectible: Collections.Collectible<ConditionSetKey, ConditionSetIndex>;
961
1266
  /**
962
1267
  * The {@link Conditions.Condition | conditions} that make up this condition
@@ -1026,6 +1331,14 @@ declare class ConditionSet implements IValidatedConditionSetDecl {
1026
1331
  * @public
1027
1332
  */
1028
1333
  static getKeyForDecl(decl: IValidatedConditionSetDecl): Result<ConditionSetKey>;
1334
+ /**
1335
+ * Gets a condition set key from a loose condition set declaration.
1336
+ * @param conditionSet - The loose condition set declaration to convert.
1337
+ * @param conditionCollector - The condition collector used for validation.
1338
+ * @returns `Success` with the condition set key if successful, `Failure` otherwise.
1339
+ * @public
1340
+ */
1341
+ static getKeyFromLooseDecl(conditionSet: ResourceJson.Json.ConditionSetDecl | undefined, conditionCollector: ConditionCollector): Result<ConditionSetKey>;
1029
1342
  /**
1030
1343
  * Gets a {@link ConditionSetToken | condition set token} for this condition set,
1031
1344
  * if possible.
@@ -1120,10 +1433,10 @@ declare class ConditionSetCollector extends ValidatingCollector<ConditionSet> {
1120
1433
  declare type ConditionSetDecl = ConditionSetDeclAsArray | ConditionSetDeclAsRecord;
1121
1434
 
1122
1435
  /**
1123
- * Converter which converts to a {@link Conditions.IConditionSetDecl | condition set declaration}.
1436
+ * `Converter` for a normalized {@link ResourceJson.Normalized.ConditionSetDecl | condition set declaration}.
1124
1437
  * @public
1125
1438
  */
1126
- declare const conditionSetDecl: ObjectConverter<IConditionSetDecl, unknown>;
1439
+ declare const conditionSetDecl: Converter<Normalized.ConditionSetDecl>;
1127
1440
 
1128
1441
  /**
1129
1442
  * Normalized non-validated declaration of a {@link Conditions.Condition | condition}.
@@ -1132,10 +1445,10 @@ declare const conditionSetDecl: ObjectConverter<IConditionSetDecl, unknown>;
1132
1445
  declare type ConditionSetDecl_2 = ReadonlyArray<ILooseConditionDecl>;
1133
1446
 
1134
1447
  /**
1135
- * `Converter` for a normalized {@link ResourceJson.Normalized.ConditionSetDecl | condition set declaration}.
1448
+ * Converter which converts to a {@link Conditions.IConditionSetDecl | condition set declaration}.
1136
1449
  * @public
1137
1450
  */
1138
- declare const conditionSetDecl_2: Converter<Normalized.ConditionSetDecl>;
1451
+ declare const conditionSetDecl_2: ObjectConverter<IConditionSetDecl, unknown>;
1139
1452
 
1140
1453
  /**
1141
1454
  * Non-validated declaration of a {@link Conditions.Condition | condition}.
@@ -1373,8 +1686,14 @@ declare class ConditionTokens {
1373
1686
 
1374
1687
  declare namespace Config {
1375
1688
  export {
1376
- Model_2 as Model,
1377
- Convert_10 as Convert,
1689
+ Model,
1690
+ Convert_9 as Convert,
1691
+ IConfigInitFactory,
1692
+ ChainedConfigInitFactory,
1693
+ BuiltInQualifierTypeFactory,
1694
+ QualifierTypeFactory,
1695
+ BuiltInResourceTypeFactory,
1696
+ ResourceTypeFactory,
1378
1697
  updateSystemConfigurationQualifierDefaultValues,
1379
1698
  ISystemConfigurationInitParams,
1380
1699
  SystemConfiguration,
@@ -1390,7 +1709,8 @@ export { Config }
1390
1709
 
1391
1710
  declare namespace Config_2 {
1392
1711
  export {
1393
- Convert_6 as Convert,
1712
+ Convert_2 as Convert,
1713
+ isSystemQualifierTypeConfig,
1394
1714
  IQualifierTypeConfig,
1395
1715
  ILanguageQualifierTypeConfig,
1396
1716
  ITerritoryQualifierTypeConfig,
@@ -1398,13 +1718,14 @@ declare namespace Config_2 {
1398
1718
  ISystemLanguageQualifierTypeConfig,
1399
1719
  ISystemTerritoryQualifierTypeConfig,
1400
1720
  ISystemLiteralQualifierTypeConfig,
1401
- ISystemQualifierTypeConfig
1721
+ ISystemQualifierTypeConfig,
1722
+ IAnyQualifierTypeConfig
1402
1723
  }
1403
1724
  }
1404
1725
 
1405
1726
  declare namespace Config_3 {
1406
1727
  export {
1407
- Convert_9 as Convert,
1728
+ Convert_5 as Convert,
1408
1729
  IResourceTypeConfig
1409
1730
  }
1410
1731
  }
@@ -1417,7 +1738,7 @@ declare const containerContextDecl: Converter<Normalized.IContainerContextDecl>;
1417
1738
 
1418
1739
  declare namespace Context {
1419
1740
  export {
1420
- Convert_5 as Convert,
1741
+ Convert_8 as Convert,
1421
1742
  IContextMatchOptions,
1422
1743
  IContextQualifierValueDecl,
1423
1744
  IContextDecl,
@@ -1760,23 +2081,76 @@ export { Convert }
1760
2081
 
1761
2082
  declare namespace Convert_10 {
1762
2083
  export {
1763
- systemConfiguration,
1764
- predefinedSystemConfiguration
2084
+ bundleMetadata,
2085
+ bundleExportMetadata,
2086
+ bundle,
2087
+ bundleCreateParams,
2088
+ bundleStructure
1765
2089
  }
1766
2090
  }
1767
2091
 
1768
- declare namespace Convert_2 {
2092
+ declare namespace Convert_11 {
1769
2093
  export {
1770
2094
  conditionDecl,
1771
2095
  IConditionDeclConvertContext,
1772
2096
  validatedConditionDecl,
1773
- conditionSetDecl,
2097
+ conditionSetDecl_2 as conditionSetDecl,
1774
2098
  IConditionSetDeclConvertContext,
1775
2099
  validatedConditionSetDecl
1776
2100
  }
1777
2101
  }
1778
2102
 
2103
+ declare namespace Convert_12 {
2104
+ export {
2105
+ zipArchiveInputType,
2106
+ zipArchiveConfigType,
2107
+ zipArchiveInputInfo,
2108
+ zipArchiveConfigInfo,
2109
+ zipArchiveManifest,
2110
+ mimeType,
2111
+ importedFile,
2112
+ importedDirectory,
2113
+ systemConfiguration_2 as systemConfiguration
2114
+ }
2115
+ }
2116
+
2117
+ declare namespace Convert_2 {
2118
+ export {
2119
+ languageQualifierTypeConfig,
2120
+ territoryQualifierTypeConfig,
2121
+ literalQualifierTypeConfig,
2122
+ systemLanguageQualifierTypeConfig,
2123
+ systemTerritoryQualifierTypeConfig,
2124
+ systemLiteralQualifierTypeConfig,
2125
+ systemQualifierTypeConfig
2126
+ }
2127
+ }
2128
+
1779
2129
  declare namespace Convert_3 {
2130
+ export {
2131
+ literalValueHierarchyCreateParams,
2132
+ IQualifierTypeConvertContext,
2133
+ qualifierType
2134
+ }
2135
+ }
2136
+
2137
+ declare namespace Convert_4 {
2138
+ export {
2139
+ qualifierDecl,
2140
+ IQualifierDeclConvertContext,
2141
+ validatedQualifierDecl,
2142
+ IQualifierConvertContext,
2143
+ qualifier
2144
+ }
2145
+ }
2146
+
2147
+ declare namespace Convert_5 {
2148
+ export {
2149
+ resourceTypeConfig
2150
+ }
2151
+ }
2152
+
2153
+ declare namespace Convert_6 {
1780
2154
  export {
1781
2155
  compiledConditionMetadata,
1782
2156
  compiledConditionSetMetadata,
@@ -1793,11 +2167,11 @@ declare namespace Convert_3 {
1793
2167
  }
1794
2168
  }
1795
2169
 
1796
- declare namespace Convert_4 {
2170
+ declare namespace Convert_7 {
1797
2171
  export {
1798
2172
  looseConditionDecl,
1799
2173
  childConditionDecl,
1800
- conditionSetDecl_2 as conditionSetDecl,
2174
+ conditionSetDecl,
1801
2175
  looseResourceCandidateDecl,
1802
2176
  importerResourceCandidateDecl,
1803
2177
  childResourceCandidateDecl,
@@ -1811,7 +2185,7 @@ declare namespace Convert_4 {
1811
2185
  }
1812
2186
  }
1813
2187
 
1814
- declare namespace Convert_5 {
2188
+ declare namespace Convert_8 {
1815
2189
  export {
1816
2190
  contextQualifierValueDecl,
1817
2191
  contextDecl,
@@ -1821,39 +2195,11 @@ declare namespace Convert_5 {
1821
2195
  }
1822
2196
  }
1823
2197
 
1824
- declare namespace Convert_6 {
1825
- export {
1826
- languageQualifierTypeConfig,
1827
- territoryQualifierTypeConfig,
1828
- literalQualifierTypeConfig,
1829
- systemLanguageQualifierTypeConfig,
1830
- systemTerritoryQualifierTypeConfig,
1831
- systemLiteralQualifierTypeConfig,
1832
- systemQualifierTypeConfig
1833
- }
1834
- }
1835
-
1836
- declare namespace Convert_7 {
1837
- export {
1838
- literalValueHierarchyCreateParams,
1839
- IQualifierTypeConvertContext,
1840
- qualifierType
1841
- }
1842
- }
1843
-
1844
- declare namespace Convert_8 {
1845
- export {
1846
- qualifierDecl,
1847
- IQualifierDeclConvertContext,
1848
- validatedQualifierDecl,
1849
- IQualifierConvertContext,
1850
- qualifier
1851
- }
1852
- }
1853
-
1854
2198
  declare namespace Convert_9 {
1855
2199
  export {
1856
- resourceTypeConfig
2200
+ validateSystemConfiguration,
2201
+ systemConfiguration,
2202
+ predefinedSystemConfiguration
1857
2203
  }
1858
2204
  }
1859
2205
 
@@ -1891,11 +2237,22 @@ declare function createQualifierTypeFromSystemConfig(typeConfig: Config_2.ISyste
1891
2237
  */
1892
2238
  declare function createResourceTypeFromConfig(config: IResourceTypeConfig): Result<ResourceType>;
1893
2239
 
2240
+ /**
2241
+ * Create a ZIP archive manifest object
2242
+ * @param inputType - Type of input (file or directory)
2243
+ * @param originalPath - Original file/directory path
2244
+ * @param archivePath - Path within the archive
2245
+ * @param configPath - Optional configuration file path
2246
+ * @returns ZIP archive manifest
2247
+ * @public
2248
+ */
2249
+ declare function createZipArchiveManifest(inputType: 'file' | 'directory', originalPath: string, archivePath: string, configPath?: string): Json_2.IZipArchiveManifest;
2250
+
1894
2251
  /**
1895
2252
  * Simple collectible implementation of {@link Decisions.IDecision | IDecision}.
1896
2253
  * @public
1897
2254
  */
1898
- declare class Decision<TVALUE extends JsonValue = JsonValue> implements IDecision<TVALUE> {
2255
+ export declare class Decision<TVALUE extends JsonValue = JsonValue> implements IDecision<TVALUE> {
1899
2256
  /**
1900
2257
  * The sorted {@link Conditions.ConditionSet | ConditionSets} that make up this decision.
1901
2258
  * @public
@@ -2203,6 +2560,30 @@ declare class FsItemImporter implements IImporter {
2203
2560
  */
2204
2561
  declare type FsItemResultDetail = 'failed' | 'skipped' | 'succeeded';
2205
2562
 
2563
+ /**
2564
+ * Generate a timestamp-based filename for ZIP archives
2565
+ * @param customName - Optional custom name prefix
2566
+ * @returns Generated filename
2567
+ * @public
2568
+ */
2569
+ declare function generateZipArchiveFilename(customName?: string): string;
2570
+
2571
+ /**
2572
+ * Extract directory name from a file path
2573
+ * @param path - File path
2574
+ * @returns Directory name
2575
+ * @public
2576
+ */
2577
+ declare function getDirectoryName(path: string): string;
2578
+
2579
+ /**
2580
+ * Gets the name for a resource ID.
2581
+ * @param id - The resource ID to get the name for.
2582
+ * @returns The resource name if found, or undefined if not.
2583
+ * @public
2584
+ */
2585
+ declare function getNameForResourceId(id: string | undefined): Result<ResourceName>;
2586
+
2206
2587
  /**
2207
2588
  * Returns the {@link Config.Model.ISystemConfiguration | system configuration} declaration for the
2208
2589
  * specified predefined system configuration.
@@ -2244,43 +2625,191 @@ declare namespace Helpers {
2244
2625
  IQualifierDefaultValueTokenParts,
2245
2626
  splitResourceId,
2246
2627
  joinResourceIds,
2247
- joinOptionalResourceIds
2628
+ joinOptionalResourceIds,
2629
+ getNameForResourceId
2248
2630
  }
2249
2631
  }
2250
- export { Helpers }
2632
+ export { Helpers }
2633
+
2634
+ declare namespace Helpers_2 {
2635
+ export {
2636
+ mergeContextDecl,
2637
+ mergeLooseCandidate,
2638
+ mergeImporterCandidate,
2639
+ mergeChildCandidate,
2640
+ mergeLooseResource,
2641
+ mergeImporterResource,
2642
+ mergeChildResource,
2643
+ IDeclarationOptions
2644
+ }
2645
+ }
2646
+
2647
+ /**
2648
+ * Parameters for creating a {@link Decisions.AbstractDecisionCollector | AbstractDecisionCollector}.
2649
+ * @public
2650
+ */
2651
+ declare interface IAbstractDecisionCollectorCreateParams {
2652
+ /**
2653
+ * {@link Conditions.ReadOnlyConditionSetCollector | ConditionSetCollector} used to create conditions
2654
+ * sets for decisions in this collector.
2655
+ */
2656
+ conditionSets: ReadOnlyConditionSetCollector;
2657
+ }
2658
+
2659
+ /**
2660
+ * Parameters to create an {@link Decisions.AbstractDecision | AbstractDecision}.
2661
+ * @public
2662
+ */
2663
+ declare interface IAbstractDecisionCreateParams {
2664
+ conditionSets: ConditionSet[];
2665
+ index?: number;
2666
+ }
2667
+
2668
+ /**
2669
+ * A union of all qualifier type configurations.
2670
+ * @public
2671
+ */
2672
+ declare type IAnyQualifierTypeConfig = IQualifierTypeConfig | ISystemQualifierTypeConfig;
2673
+
2674
+ /**
2675
+ * A complete resource bundle that encapsulates built resources, configuration, and metadata.
2676
+ * Bundles provide a portable, integrity-verified way to distribute pre-compiled resource collections.
2677
+ * @public
2678
+ */
2679
+ declare interface IBundle {
2680
+ /**
2681
+ * Metadata about the bundle including build date and integrity checksum.
2682
+ */
2683
+ metadata: IBundleMetadata;
2684
+ /**
2685
+ * The system configuration that was used to build the resources in this bundle.
2686
+ */
2687
+ config: Model.ISystemConfiguration;
2688
+ /**
2689
+ * The compiled resource collection containing all resources, conditions, and decisions.
2690
+ */
2691
+ compiledCollection: Compiled.ICompiledResourceCollection;
2692
+ /**
2693
+ * Optional export metadata for tracking when and how the bundle was exported.
2694
+ */
2695
+ exportMetadata?: IBundleExportMetadata;
2696
+ }
2697
+
2698
+ /**
2699
+ * Components extracted from a bundle for reuse in different contexts.
2700
+ * @public
2701
+ */
2702
+ declare interface IBundleComponents {
2703
+ /**
2704
+ * The system configuration from the bundle.
2705
+ */
2706
+ systemConfiguration: SystemConfiguration;
2707
+ /**
2708
+ * The compiled resource collection from the bundle.
2709
+ */
2710
+ compiledCollection: Compiled.ICompiledResourceCollection;
2711
+ /**
2712
+ * The bundle metadata including build information.
2713
+ */
2714
+ metadata: IBundleMetadata;
2715
+ }
2251
2716
 
2252
- declare namespace Helpers_2 {
2253
- export {
2254
- mergeContextDecl,
2255
- mergeLooseCandidate,
2256
- mergeImporterCandidate,
2257
- mergeChildCandidate,
2258
- mergeLooseResource,
2259
- mergeImporterResource,
2260
- mergeChildResource,
2261
- IDeclarationOptions
2262
- }
2717
+ /**
2718
+ * Optional parameters for bundle creation.
2719
+ * @public
2720
+ */
2721
+ declare interface IBundleCreateParams {
2722
+ /**
2723
+ * Optional version identifier to include in the bundle metadata.
2724
+ */
2725
+ version?: string;
2726
+ /**
2727
+ * Optional description to include in the bundle metadata.
2728
+ */
2729
+ description?: string;
2730
+ /**
2731
+ * Optional custom build date. If not provided, the current date will be used.
2732
+ */
2733
+ dateBuilt?: string;
2734
+ /**
2735
+ * Optional hash normalizer for generating checksums. If not provided,
2736
+ * a CRC32 normalizer will be used for browser compatibility.
2737
+ */
2738
+ hashNormalizer?: Hash.HashingNormalizer;
2739
+ /**
2740
+ * Whether to normalize the ResourceManagerBuilder before bundle creation.
2741
+ * When true, the builder is reconstructed in canonical order to ensure
2742
+ * order-independent checksums. Defaults to false for Phase 1 compatibility.
2743
+ */
2744
+ normalize?: boolean;
2263
2745
  }
2264
2746
 
2265
2747
  /**
2266
- * Parameters for creating a {@link Decisions.AbstractDecisionCollector | AbstractDecisionCollector}.
2748
+ * Optional export metadata for tracking bundle export information.
2267
2749
  * @public
2268
2750
  */
2269
- declare interface IAbstractDecisionCollectorCreateParams {
2751
+ declare interface IBundleExportMetadata {
2270
2752
  /**
2271
- * {@link Conditions.ReadOnlyConditionSetCollector | ConditionSetCollector} used to create conditions
2272
- * sets for decisions in this collector.
2753
+ * ISO timestamp indicating when the bundle was exported.
2273
2754
  */
2274
- conditionSets: ReadOnlyConditionSetCollector;
2755
+ exportedAt: string;
2756
+ /**
2757
+ * Tool or application that exported the bundle.
2758
+ */
2759
+ exportedFrom: string;
2760
+ /**
2761
+ * Type of bundle export (e.g., 'ts-res-bundle', 'ts-res-bundle-filtered').
2762
+ */
2763
+ type: string;
2764
+ /**
2765
+ * Optional filter context if the bundle represents filtered data.
2766
+ */
2767
+ filterContext?: Record<string, unknown>;
2275
2768
  }
2276
2769
 
2277
2770
  /**
2278
- * Parameters to create an {@link Decisions.AbstractDecision | AbstractDecision}.
2771
+ * Parameters for creating a BundleLoader.
2279
2772
  * @public
2280
2773
  */
2281
- declare interface IAbstractDecisionCreateParams {
2282
- conditionSets: ConditionSet[];
2283
- index?: number;
2774
+ declare interface IBundleLoaderCreateParams {
2775
+ /**
2776
+ * The bundle to load.
2777
+ */
2778
+ bundle: IBundle;
2779
+ /**
2780
+ * Whether to skip checksum verification during loading.
2781
+ * Default is false - checksum verification is performed.
2782
+ */
2783
+ skipChecksumVerification?: boolean;
2784
+ /**
2785
+ * Optional hash normalizer for verifying checksums. If not provided,
2786
+ * a CRC32 normalizer will be used for browser compatibility.
2787
+ * Must match the normalizer used during bundle creation.
2788
+ */
2789
+ hashNormalizer?: Hash.HashingNormalizer;
2790
+ }
2791
+
2792
+ /**
2793
+ * Metadata for a resource bundle, including build information and integrity verification.
2794
+ * @public
2795
+ */
2796
+ declare interface IBundleMetadata {
2797
+ /**
2798
+ * ISO timestamp indicating when the bundle was built.
2799
+ */
2800
+ dateBuilt: string;
2801
+ /**
2802
+ * SHA-256 checksum of the serialized compiled resource collection for integrity verification.
2803
+ */
2804
+ checksum: string;
2805
+ /**
2806
+ * Optional version identifier for the bundle.
2807
+ */
2808
+ version?: string;
2809
+ /**
2810
+ * Optional human-readable description of the bundle.
2811
+ */
2812
+ description?: string;
2284
2813
  }
2285
2814
 
2286
2815
  /**
@@ -2829,6 +3358,19 @@ declare interface IConditionTokenParts {
2829
3358
  value: string;
2830
3359
  }
2831
3360
 
3361
+ /**
3362
+ * Interface for a factory that creates a new instance of a configuration object.
3363
+ * @public
3364
+ */
3365
+ declare interface IConfigInitFactory<TConfig, T> {
3366
+ /**
3367
+ * Creates a new instance of a configuration object.
3368
+ * @param config - The configuration object to create.
3369
+ * @returns A result containing the new instance of the configuration object.
3370
+ */
3371
+ create(config: TConfig): Result<T>;
3372
+ }
3373
+
2832
3374
  /**
2833
3375
  * Declared context for a resource container.
2834
3376
  * @public
@@ -3113,6 +3655,46 @@ declare interface IImportContext {
3113
3655
  readonly conditions?: ReadonlyArray<IConditionDecl>;
3114
3656
  }
3115
3657
 
3658
+ /**
3659
+ * JSON representation of an imported directory structure
3660
+ * @public
3661
+ */
3662
+ declare interface IImportedDirectory {
3663
+ /** Directory name */
3664
+ name: string;
3665
+ /** Files in this directory */
3666
+ files: IImportedFile[];
3667
+ /** Subdirectories */
3668
+ subdirectories: IImportedDirectory[];
3669
+ }
3670
+
3671
+ /**
3672
+ * Imported directory structure
3673
+ * @public
3674
+ */
3675
+ declare type IImportedDirectory_2 = Json_2.IImportedDirectory;
3676
+
3677
+ /**
3678
+ * JSON representation of an imported file
3679
+ * @public
3680
+ */
3681
+ declare interface IImportedFile {
3682
+ /** File name */
3683
+ name: string;
3684
+ /** Full path within archive */
3685
+ path: string;
3686
+ /** File content as string */
3687
+ content: string;
3688
+ /** MIME type */
3689
+ type: string;
3690
+ }
3691
+
3692
+ /**
3693
+ * Imported file representation
3694
+ * @public
3695
+ */
3696
+ declare type IImportedFile_2 = Json_2.IImportedFile;
3697
+
3116
3698
  /**
3117
3699
  * Generic interface for an importer than accepts a typed
3118
3700
  * {@link Import.IImportable | importable} item, extracts any resources
@@ -3569,6 +4151,19 @@ declare class ImportContext implements IValidatedImportContext {
3569
4151
  static forContainerImport(container?: ResourceJson.Normalized.IContainerContextDecl, importer?: ImportContext): Result<ImportContext | undefined>;
3570
4152
  }
3571
4153
 
4154
+ /**
4155
+ * Converter for imported directory structure (recursive)
4156
+ * Note: Uses Converter pattern because Validators don't support recursion with self parameter
4157
+ * @public
4158
+ */
4159
+ declare const importedDirectory: Converter<Json_2.IImportedDirectory>;
4160
+
4161
+ /**
4162
+ * Converter for imported file
4163
+ * @public
4164
+ */
4165
+ declare const importedFile: Converter<Json_2.IImportedFile>;
4166
+
3572
4167
  /**
3573
4168
  * `Converter` for a normalized {@link ResourceJson.Normalized.IImporterResourceCandidateDecl | importer resource candidate declaration}.
3574
4169
  * @public
@@ -4077,8 +4672,10 @@ declare interface IReducedCandidate {
4077
4672
  declare interface IResource {
4078
4673
  /** The resource identifier */
4079
4674
  readonly id: string;
4675
+ /** The resource name */
4676
+ readonly name: string;
4080
4677
  /** The resource type */
4081
- readonly resourceType: ResourceType;
4678
+ readonly resourceType: IResourceType;
4082
4679
  /** The decision used to select candidates */
4083
4680
  readonly decision: ConcreteDecision;
4084
4681
  /** The available candidates for this resource */
@@ -4137,10 +4734,10 @@ declare interface IResourceCandidateValidationProperties {
4137
4734
  */
4138
4735
  id: ResourceId;
4139
4736
  /**
4140
- * {@inheritdoc ResourceJson.Json.ILooseResourceCandidateDecl.isPartial}
4737
+ * Describes how complete the candidate value is.
4141
4738
  * @public
4142
4739
  */
4143
- isPartial: boolean;
4740
+ completeness: CandidateCompleteness;
4144
4741
  /**
4145
4742
  * {@inheritdoc ResourceJson.Json.ILooseResourceCandidateDecl.json}
4146
4743
  * @public
@@ -4281,7 +4878,7 @@ declare interface IResourceDeclContainer {
4281
4878
  * implementations without requiring the full ResourceManagerBuilder build mechanics.
4282
4879
  * @public
4283
4880
  */
4284
- declare interface IResourceManager {
4881
+ export declare interface IResourceManager<TR extends IResource = IResource> {
4285
4882
  /**
4286
4883
  * A {@link Conditions.ReadOnlyConditionCollector | ReadOnlyConditionCollector} which
4287
4884
  * contains the {@link Conditions.Condition | conditions} used by resource candidates.
@@ -4302,12 +4899,17 @@ declare interface IResourceManager {
4302
4899
  * @param id - The resource identifier
4303
4900
  * @returns Success with the runtime resource if found, Failure otherwise
4304
4901
  */
4305
- getBuiltResource(id: string): Result<IResource>;
4902
+ getBuiltResource(id: string): Result<TR>;
4903
+ /**
4904
+ * Gets a resource tree built from the resources in this resource manager.
4905
+ * @returns Result containing the resource tree root, or failure if tree construction fails
4906
+ */
4907
+ getBuiltResourceTree(): Result<IReadOnlyResourceTreeRoot<TR>>;
4306
4908
  /**
4307
4909
  * A read-only result map of all built resources, keyed by resource ID.
4308
4910
  * Resources are built on-demand when accessed and returns Results for error handling.
4309
4911
  */
4310
- readonly builtResources: Collections.IReadOnlyValidatingResultMap<ResourceId, IResource>;
4912
+ readonly builtResources: Collections.IReadOnlyValidatingResultMap<ResourceId, TR>;
4311
4913
  /**
4312
4914
  * The number of resources in this resource manager.
4313
4915
  */
@@ -4333,6 +4935,31 @@ declare interface IResourceManagerBuilderCreateParams {
4333
4935
  resourceTypes: ReadOnlyResourceTypeCollector;
4334
4936
  }
4335
4937
 
4938
+ /**
4939
+ * Options for ResourceManagerBuilder clone operations.
4940
+ * Extends IDeclarationOptions to include support for applying edits when cloning.
4941
+ * @public
4942
+ */
4943
+ declare interface IResourceManagerCloneOptions extends IResourceDeclarationOptions {
4944
+ /**
4945
+ * Optional array of loose condition declarations to be applied as edits during the clone operation.
4946
+ * These conditions can modify or extend the resource candidates in the cloned manager.
4947
+ */
4948
+ readonly candidates?: ReadonlyArray<ResourceJson.Json.ILooseResourceCandidateDecl>;
4949
+ /**
4950
+ * Optional qualifier collector to use for the cloned manager.
4951
+ * If not provided, uses the same qualifiers as the original manager.
4952
+ * This allows creating clones with different qualifier configurations.
4953
+ */
4954
+ readonly qualifiers?: IReadOnlyQualifierCollector;
4955
+ /**
4956
+ * Optional resource type collector to use for the cloned manager.
4957
+ * If not provided, uses the same resource types as the original manager.
4958
+ * This allows creating clones with different resource type configurations.
4959
+ */
4960
+ readonly resourceTypes?: ReadOnlyResourceTypeCollector;
4961
+ }
4962
+
4336
4963
  /**
4337
4964
  * A listener for {@link Runtime.ResourceResolver | ResourceResolver} cache activity.
4338
4965
  * @public
@@ -4356,6 +4983,11 @@ declare interface IResourceResolverCacheListener {
4356
4983
  * @param index - The index of the cache that had an error.
4357
4984
  */
4358
4985
  onCacheError(cache: ResourceResolverCacheType, index: number): void;
4986
+ /**
4987
+ * Called when a context error occurs.
4988
+ * @param error - The error that occurred.
4989
+ */
4990
+ onContextError(qualifier: string, error: string): void;
4359
4991
  /**
4360
4992
  * Called when a cache is cleared.
4361
4993
  * @param cache - The type of cache that was cleared.
@@ -4387,6 +5019,24 @@ declare interface IResourceResolverCreateParams {
4387
5019
  * An optional listener for {@link Runtime.ResourceResolver | ResourceResolver} cache activity.
4388
5020
  */
4389
5021
  listener?: IResourceResolverCacheListener;
5022
+ /**
5023
+ * Optional configuration options for the {@link Runtime.ResourceResolver | ResourceResolver}.
5024
+ */
5025
+ options?: IResourceResolverOptions;
5026
+ }
5027
+
5028
+ /**
5029
+ * Options for configuring a {@link Runtime.ResourceResolver | ResourceResolver}.
5030
+ * @public
5031
+ */
5032
+ declare interface IResourceResolverOptions {
5033
+ /**
5034
+ * Controls whether null values in resource composition should suppress properties
5035
+ * instead of setting them to null. When true, properties with null values from
5036
+ * higher-priority partial candidates will be omitted from the final composed resource.
5037
+ * @defaultValue false
5038
+ */
5039
+ suppressNullAsDelete?: boolean;
4390
5040
  }
4391
5041
 
4392
5042
  /**
@@ -4453,6 +5103,71 @@ declare interface IResourceTreeRootInit<T> {
4453
5103
  readonly children: Record<ResourceName, ResourceTreeNodeInit<T>>;
4454
5104
  }
4455
5105
 
5106
+ /**
5107
+ * Interface for a resource type. Resource types are responsible for
5108
+ * validating and converting JSON values into the appropriate strongly-typed
5109
+ * resource value.
5110
+ * @public
5111
+ */
5112
+ declare interface IResourceType<T = unknown> extends ICollectible<ResourceTypeName, ResourceTypeIndex> {
5113
+ /**
5114
+ * The key for this resource type.
5115
+ */
5116
+ readonly key: ResourceTypeName;
5117
+ /**
5118
+ * The index for this resource type.
5119
+ */
5120
+ readonly index: ResourceTypeIndex | undefined;
5121
+ /**
5122
+ * Validates properties of a {@link ResourceJson.Json.ILooseResourceCandidateDecl | resource candidate declaration} for
5123
+ * a resource instance value.
5124
+ * @param props - The {@link ResourceTypes.IResourceCandidateValidationProperties | properties } to validate.
5125
+ * @returns `Success` with the strongly-typed resource value if the JSON and merge method
5126
+ * are valid, `Failure` with an error message otherwise.
5127
+ * @public
5128
+ */
5129
+ validateDeclaration(props: IResourceCandidateValidationProperties): Result<T | Partial<T>>;
5130
+ /**
5131
+ * Validates a JSON value for use as a partial resource instance value.
5132
+ * @param json - The JSON value to validate.
5133
+ * @param completeness - Describes {@link CandidateCompleteness | how complete} the candidate value is.
5134
+ * @returns `Success` with the strongly-typed partial resource value if the JSON is valid,
5135
+ * `Failure` with an error message otherwise.
5136
+ * @public
5137
+ */
5138
+ validate(json: JsonValue, completeness: CandidateCompleteness): Result<Partial<T>>;
5139
+ /**
5140
+ * Validates a JSON value for use as a complete resource instance value.
5141
+ * @param json - The JSON value to validate.
5142
+ * @param completeness - Describes {@link CandidateCompleteness | how complete} the candidate value is.
5143
+ * @returns `Success` with the strongly-typed resource value if the JSON is valid,
5144
+ * `Failure` with an error message otherwise.
5145
+ * @public
5146
+ */
5147
+ validate(json: JsonValue, completeness: 'full'): Result<T>;
5148
+ /**
5149
+ * Validates a JSON value for use as a partial resource instance value.
5150
+ * @param json - The JSON value to validate.
5151
+ * @param completeness - Describes {@link CandidateCompleteness | how complete} the candidate value is.
5152
+ * @returns `Success` with the strongly-typed partial resource value if the JSON is valid,
5153
+ * `Failure` with an error message otherwise.
5154
+ * @public
5155
+ */
5156
+ validate(json: JsonValue, completeness: 'partial'): Result<Partial<T>>;
5157
+ /**
5158
+ * Sets the index for this resource type. Once set, the index cannot be changed.
5159
+ */
5160
+ setIndex(index: number): Result<ResourceTypeIndex>;
5161
+ /**
5162
+ * Creates a template for a new resource of this type.
5163
+ * The template provides a default structure for creating new resource instances.
5164
+ * @param resourceId - The id for the new resource
5165
+ * @returns A loose resource declaration with default values for this resource type
5166
+ * @public
5167
+ */
5168
+ createTemplate(resourceId: ResourceId): ResourceJson.Json.ILooseResourceDecl;
5169
+ }
5170
+
4456
5171
  /**
4457
5172
  * Configuration for a {@link ResourceTypes.ResourceType | resource type}.
4458
5173
  * @public
@@ -4514,6 +5229,15 @@ declare function isResourceTreeLeafInit<T>(init: ResourceTreeNodeInit<T>): init
4514
5229
  */
4515
5230
  declare function isResourceTreeRootOrNodeInit<T>(init: ResourceTreeNodeInit<T> | IResourceTreeRootInit<T>): init is IResourceTreeBranchInit<T>;
4516
5231
 
5232
+ /**
5233
+ * Checks if a {@link QualifierTypes.Config.IAnyQualifierTypeConfig | qualifier type configuration} is a
5234
+ * {@link QualifierTypes.Config.ISystemQualifierTypeConfig | system qualifier type configuration}.
5235
+ * @param config - The {@link QualifierTypes.Config.IAnyQualifierTypeConfig | qualifier type configuration} to check.
5236
+ * @returns `true` if the configuration is a system qualifier type configuration, `false` otherwise.
5237
+ * @public
5238
+ */
5239
+ declare function isSystemQualifierTypeConfig(config: IAnyQualifierTypeConfig): config is ISystemQualifierTypeConfig;
5240
+
4517
5241
  /**
4518
5242
  * Determines whether a number is a valid condition index.
4519
5243
  * @param index - the number to validate
@@ -4760,6 +5484,8 @@ declare interface ISystemConfigurationInitParams {
4760
5484
  * Use `null` as the value to remove an existing default value.
4761
5485
  */
4762
5486
  qualifierDefaultValues?: Record<string, string | null>;
5487
+ qualifierTypeFactory?: IConfigInitFactory<QualifierTypes.Config.IAnyQualifierTypeConfig, QualifierType>;
5488
+ resourceTypeFactory?: IConfigInitFactory<ResourceTypes.Config.IResourceTypeConfig, ResourceType>;
4763
5489
  }
4764
5490
 
4765
5491
  /**
@@ -4792,6 +5518,14 @@ declare interface ISystemTerritoryQualifierTypeConfig extends IQualifierTypeConf
4792
5518
  systemType: 'territory';
4793
5519
  }
4794
5520
 
5521
+ /**
5522
+ * Validate ZIP file extension
5523
+ * @param filename - Filename to validate
5524
+ * @returns True if filename has .zip extension
5525
+ * @public
5526
+ */
5527
+ declare function isZipFile(filename: string): boolean;
5528
+
4795
5529
  /**
4796
5530
  * Configuration for {@link QualifierTypes.TerritoryQualifierType | territory qualifier type} configuration.
4797
5531
  * @public
@@ -4965,6 +5699,111 @@ declare interface IValidatingSimpleContextQualifierProviderCreateParams {
4965
5699
  qualifierValues?: Record<string, string>;
4966
5700
  }
4967
5701
 
5702
+ /**
5703
+ * JSON representation of ZIP archive config information
5704
+ * @public
5705
+ */
5706
+ declare interface IZipArchiveConfigInfo {
5707
+ /** Type of config (always 'file') */
5708
+ type: 'file';
5709
+ /** Original config file path */
5710
+ originalPath: string;
5711
+ /** Path within the archive (e.g., "config.json") */
5712
+ archivePath: string;
5713
+ }
5714
+
5715
+ /**
5716
+ * Options for creating a ZIP archive buffer from a file tree
5717
+ * @public
5718
+ */
5719
+ declare interface IZipArchiveFileTreeOptions {
5720
+ /** Input file or directory */
5721
+ inputItem?: FileTree.FileTreeItem;
5722
+ /** Optional configuration file */
5723
+ configItem?: FileTree.IFileTreeFileItem;
5724
+ }
5725
+
5726
+ /**
5727
+ * JSON representation of ZIP archive input information
5728
+ * @public
5729
+ */
5730
+ declare interface IZipArchiveInputInfo {
5731
+ /** Type of input (file or directory) */
5732
+ type: 'file' | 'directory';
5733
+ /** Original file/directory path */
5734
+ originalPath: string;
5735
+ /** Path within the archive (e.g., "input/mydir") */
5736
+ archivePath: string;
5737
+ }
5738
+
5739
+ /**
5740
+ * Options for loading a ZIP archive
5741
+ * @public
5742
+ */
5743
+ declare interface IZipArchiveLoadOptions {
5744
+ /** Validate manifest strictly */
5745
+ strictManifestValidation?: boolean;
5746
+ }
5747
+
5748
+ /**
5749
+ * Result of ZIP archive loading
5750
+ * @public
5751
+ */
5752
+ declare interface IZipArchiveLoadResult {
5753
+ /** Parsed archive manifest */
5754
+ manifest: IZipArchiveManifest_2 | undefined;
5755
+ /** Loaded configuration */
5756
+ config: Model.ISystemConfiguration | undefined;
5757
+ /** All files extracted from the archive */
5758
+ files: IImportedFile_2[];
5759
+ /** Directory structure if available */
5760
+ directory: IImportedDirectory_2 | undefined;
5761
+ }
5762
+
5763
+ /**
5764
+ * JSON representation of a ZIP archive manifest
5765
+ * Compatible with existing tools from ts-res-browser-cli
5766
+ * @public
5767
+ */
5768
+ declare interface IZipArchiveManifest {
5769
+ /** Archive creation timestamp */
5770
+ timestamp: string;
5771
+ /** Optional input source information */
5772
+ input?: IZipArchiveInputInfo;
5773
+ /** Optional configuration file information */
5774
+ config?: IZipArchiveConfigInfo;
5775
+ }
5776
+
5777
+ /**
5778
+ * Standardized ZIP archive manifest format (compatible with existing tools)
5779
+ * @public
5780
+ */
5781
+ declare type IZipArchiveManifest_2 = Json_2.IZipArchiveManifest;
5782
+
5783
+ /**
5784
+ * Options for creating a ZIP archive buffer
5785
+ * @public
5786
+ */
5787
+ declare interface IZipArchivePathOptions {
5788
+ /** File or directory path to include in the archive */
5789
+ inputPath?: string;
5790
+ /** Optional configuration file path */
5791
+ configPath?: string;
5792
+ }
5793
+
5794
+ /**
5795
+ * Result of ZIP archive buffer creation
5796
+ * @public
5797
+ */
5798
+ declare interface IZipArchiveResult {
5799
+ /** Raw ZIP data buffer */
5800
+ zipBuffer: Uint8Array;
5801
+ /** Archive manifest with metadata */
5802
+ manifest: IZipArchiveManifest_2;
5803
+ /** Total ZIP size in bytes */
5804
+ size: number;
5805
+ }
5806
+
4968
5807
  /**
4969
5808
  * Joins a list of {@link ResourceId | resource ID} or {@link ResourceName | resource name} with
4970
5809
  * to create a new {@link ResourceId | resource ID}. Returns `undefined` if no names are defined.
@@ -5012,6 +5851,16 @@ declare namespace Json {
5012
5851
  }
5013
5852
  }
5014
5853
 
5854
+ declare namespace Json_2 {
5855
+ export {
5856
+ IZipArchiveInputInfo,
5857
+ IZipArchiveConfigInfo,
5858
+ IZipArchiveManifest,
5859
+ IImportedFile,
5860
+ IImportedDirectory
5861
+ }
5862
+ }
5863
+
5015
5864
  /**
5016
5865
  * {@link Import.Importers.IImporter | Importer} implementation which imports resources from a JSON object.
5017
5866
  * @public
@@ -5065,15 +5914,20 @@ declare class JsonResourceType extends ResourceType<JsonObject> {
5065
5914
  /**
5066
5915
  * {@inheritdoc ResourceTypes.ResourceType.(validate:1)}
5067
5916
  */
5068
- validate(json: JsonObject, isPartial: true): Result<JsonObject>;
5917
+ validate(json: JsonObject, completeness: CandidateCompleteness): Result<JsonObject>;
5069
5918
  /**
5070
5919
  * {@inheritdoc ResourceTypes.ResourceType.(validate:2)}
5071
5920
  */
5072
- validate(json: JsonObject, isPartial: false): Result<JsonObject>;
5921
+ validate(json: JsonObject, completeness: 'full'): Result<JsonObject>;
5073
5922
  /**
5074
5923
  * {@inheritdoc ResourceTypes.ResourceType.(validate:3)}
5075
5924
  */
5076
- validate(json: JsonObject, isPartial: boolean): Result<JsonObject>;
5925
+ validate(json: JsonObject, completeness: 'partial'): Result<JsonObject>;
5926
+ /**
5927
+ * Gets the default template value for a JSON resource type.
5928
+ * @returns An empty object as the default JSON value
5929
+ */
5930
+ protected getDefaultTemplateValue(): JsonObject;
5077
5931
  }
5078
5932
 
5079
5933
  /**
@@ -5146,7 +6000,7 @@ declare class LanguageQualifierType extends QualifierType {
5146
6000
  * @returns A `Converter` for {@link QualifierTypes.Config.ILanguageQualifierTypeConfig | LanguageQualifierTypeConfig} objects.
5147
6001
  * @public
5148
6002
  */
5149
- declare const languageQualifierTypeConfig: ObjectConverter<Model_3.ILanguageQualifierTypeConfig, unknown>;
6003
+ declare const languageQualifierTypeConfig: ObjectConverter<Model_2.ILanguageQualifierTypeConfig, unknown>;
5150
6004
 
5151
6005
  /**
5152
6006
  * A {@link QualifierTypes.QualifierType | qualifier} that matches a literal value,
@@ -5234,7 +6088,7 @@ declare class LiteralQualifierType extends QualifierType {
5234
6088
  * @returns A `Converter` for {@link QualifierTypes.Config.ILiteralQualifierTypeConfig | LiteralQualifierTypeConfig} objects.
5235
6089
  * @public
5236
6090
  */
5237
- declare const literalQualifierTypeConfig: ObjectConverter<Model_3.ILiteralQualifierTypeConfig, unknown>;
6091
+ declare const literalQualifierTypeConfig: ObjectConverter<Model_2.ILiteralQualifierTypeConfig, unknown>;
5238
6092
 
5239
6093
  /**
5240
6094
  * A class that implements a hierarchy of literal values. The hierarchy is defined as a
@@ -5480,13 +6334,40 @@ declare function mergeLooseCandidate(candidate: Normalized.IImporterResourceCand
5480
6334
  */
5481
6335
  declare function mergeLooseResource(resource: Normalized.IImporterResourceDecl, baseName?: string, baseConditions?: ReadonlyArray<Json.ILooseConditionDecl>): Result<Normalized.ILooseResourceDecl>;
5482
6336
 
6337
+ /**
6338
+ * Validator for MIME type strings
6339
+ * @public
6340
+ */
6341
+ declare const mimeType: Validator<string>;
6342
+
5483
6343
  /**
5484
6344
  * Minimum valid priority for a condition.
5485
6345
  * @public
5486
6346
  */
5487
6347
  export declare const MinConditionPriority: ConditionPriority;
5488
6348
 
5489
- declare namespace Model {
6349
+ declare namespace Model {
6350
+ export {
6351
+ ISystemConfiguration
6352
+ }
6353
+ }
6354
+
6355
+ declare namespace Model_2 {
6356
+ export {
6357
+ isSystemQualifierTypeConfig,
6358
+ IQualifierTypeConfig,
6359
+ ILanguageQualifierTypeConfig,
6360
+ ITerritoryQualifierTypeConfig,
6361
+ ILiteralQualifierTypeConfig,
6362
+ ISystemLanguageQualifierTypeConfig,
6363
+ ISystemTerritoryQualifierTypeConfig,
6364
+ ISystemLiteralQualifierTypeConfig,
6365
+ ISystemQualifierTypeConfig,
6366
+ IAnyQualifierTypeConfig
6367
+ }
6368
+ }
6369
+
6370
+ declare namespace Model_3 {
5490
6371
  export {
5491
6372
  ICompiledConditionMetadata,
5492
6373
  ICompiledConditionSetMetadata,
@@ -5503,22 +6384,12 @@ declare namespace Model {
5503
6384
  }
5504
6385
  }
5505
6386
 
5506
- declare namespace Model_2 {
5507
- export {
5508
- ISystemConfiguration
5509
- }
5510
- }
5511
-
5512
- declare namespace Model_3 {
6387
+ declare namespace Model_4 {
5513
6388
  export {
5514
- IQualifierTypeConfig,
5515
- ILanguageQualifierTypeConfig,
5516
- ITerritoryQualifierTypeConfig,
5517
- ILiteralQualifierTypeConfig,
5518
- ISystemLanguageQualifierTypeConfig,
5519
- ISystemTerritoryQualifierTypeConfig,
5520
- ISystemLiteralQualifierTypeConfig,
5521
- ISystemQualifierTypeConfig
6389
+ IBundleMetadata,
6390
+ IBundleExportMetadata,
6391
+ IBundle,
6392
+ IBundleCreateParams
5522
6393
  }
5523
6394
  }
5524
6395
 
@@ -5545,6 +6416,10 @@ declare class NoOpResourceResolverCacheListener implements IResourceResolverCach
5545
6416
  * {@inheritDoc Runtime.IResourceResolverCacheListener.onCacheError}
5546
6417
  */
5547
6418
  onCacheError(cache: ResourceResolverCacheType, index: number): void;
6419
+ /**
6420
+ * {@inheritDoc Runtime.IResourceResolverCacheListener.onContextError}
6421
+ */
6422
+ onContextError(qualifier: string, error: string): void;
5548
6423
  /**
5549
6424
  * {@inheritDoc Runtime.IResourceResolverCacheListener.onCacheClear}
5550
6425
  */
@@ -5568,6 +6443,14 @@ declare namespace Normalized {
5568
6443
  }
5569
6444
  }
5570
6445
 
6446
+ /**
6447
+ * Normalize path separators for cross-platform compatibility
6448
+ * @param path - Path to normalize
6449
+ * @returns Normalized path
6450
+ * @public
6451
+ */
6452
+ declare function normalizePath(path: string): string;
6453
+
5571
6454
  /**
5572
6455
  * Overall cache metrics across all cache types.
5573
6456
  * @public
@@ -5622,6 +6505,22 @@ declare function parseQualifierDefaultValuesTokenParts(token: string): Result<IQ
5622
6505
  */
5623
6506
  declare function parseQualifierDefaultValueTokenParts(token: string): Result<IQualifierDefaultValueTokenParts>;
5624
6507
 
6508
+ /**
6509
+ * Parse and validate configuration JSON
6510
+ * @param configData - JSON string containing configuration
6511
+ * @returns Result containing validated configuration
6512
+ * @public
6513
+ */
6514
+ declare function parseZipArchiveConfiguration(configData: string): Result<Model.ISystemConfiguration>;
6515
+
6516
+ /**
6517
+ * Parse and validate a ZIP archive manifest
6518
+ * @param manifestData - JSON string containing manifest data
6519
+ * @returns Result containing validated manifest
6520
+ * @public
6521
+ */
6522
+ declare function parseZipArchiveManifest(manifestData: string): Result<Json_2.IZipArchiveManifest>;
6523
+
5625
6524
  /**
5626
6525
  * {@link Import.Importers.IImporter | Importer} implementation which imports resources from a `FileTree`
5627
6526
  * given a path.
@@ -5692,7 +6591,7 @@ declare const predefinedSystemConfiguration: Converter<PredefinedSystemConfigura
5692
6591
  * which a resource is used.
5693
6592
  * @public
5694
6593
  */
5695
- declare class Qualifier implements IValidatedQualifierDecl, ICollectible<QualifierName, QualifierIndex> {
6594
+ export declare class Qualifier implements IValidatedQualifierDecl, ICollectible<QualifierName, QualifierIndex> {
5696
6595
  /**
5697
6596
  * The name of the qualifier.
5698
6597
  */
@@ -6031,7 +6930,7 @@ declare const qualifierName: Converter<QualifierName, unknown>;
6031
6930
 
6032
6931
  declare namespace Qualifiers {
6033
6932
  export {
6034
- Convert_8 as Convert,
6933
+ Convert_4 as Convert,
6035
6934
  Qualifier,
6036
6935
  IQualifierDecl,
6037
6936
  IValidatedQualifierDecl,
@@ -6052,7 +6951,7 @@ export { Qualifiers }
6052
6951
  * the {@link QualifierTypes.IQualifierType | IQualifierType} interface.
6053
6952
  * @public
6054
6953
  */
6055
- declare abstract class QualifierType implements IQualifierType {
6954
+ export declare abstract class QualifierType implements IQualifierType {
6056
6955
  /**
6057
6956
  * {@inheritdoc QualifierTypes.IQualifierType.name}
6058
6957
  */
@@ -6181,6 +7080,20 @@ declare class QualifierTypeCollector extends ValidatingConvertingCollector<Quali
6181
7080
  protected static _toQualifierType(from: unknown): Result<QualifierType>;
6182
7081
  }
6183
7082
 
7083
+ /**
7084
+ * A factory that creates a {@link QualifierTypes.QualifierType | QualifierType} from a {@link QualifierTypes.Config.IAnyQualifierTypeConfig | system qualifier type configuration}
7085
+ * by chaining a supplied factory with a {@link Config.BuiltInQualifierTypeFactory | built-in factory} that handles built-in qualifier types.
7086
+ * @public
7087
+ */
7088
+ declare class QualifierTypeFactory extends ChainedConfigInitFactory<QualifierTypes.Config.IAnyQualifierTypeConfig, QualifierType> {
7089
+ /**
7090
+ * Constructor for a {@link Config.QualifierTypeFactory | qualifier type factory}.
7091
+ * @param factories - The {@link Config.IConfigInitFactory | factories} to chain.
7092
+ * @remarks The {@link Config.BuiltInQualifierTypeFactory | built-in factory} is always added to the end of the chain.
7093
+ */
7094
+ constructor(factories: IConfigInitFactory<QualifierTypes.Config.IAnyQualifierTypeConfig, QualifierType>[]);
7095
+ }
7096
+
6184
7097
  /**
6185
7098
  * Branded number representing a validated qualifier type index.
6186
7099
  * @public
@@ -6208,7 +7121,7 @@ declare const qualifierTypeName: Converter<QualifierTypeName, unknown>;
6208
7121
  declare namespace QualifierTypes {
6209
7122
  export {
6210
7123
  Config_2 as Config,
6211
- Convert_7 as Convert,
7124
+ Convert_3 as Convert,
6212
7125
  IQualifierType,
6213
7126
  IQualifierTypeCreateParams,
6214
7127
  QualifierType,
@@ -6405,15 +7318,19 @@ declare namespace RegularExpressions {
6405
7318
  * candidate instances.
6406
7319
  * @public
6407
7320
  */
6408
- declare class Resource implements IResource {
7321
+ export declare class Resource implements IResource {
6409
7322
  /**
6410
7323
  * The unique {@link ResourceId | id} of the resource.
6411
7324
  */
6412
7325
  readonly id: ResourceId;
7326
+ /**
7327
+ * The name of the resource.
7328
+ */
7329
+ readonly name: ResourceName;
6413
7330
  /**
6414
7331
  * The {@link ResourceTypes.ResourceType | type} of the resource.
6415
7332
  */
6416
- readonly _resourceType: ResourceType;
7333
+ readonly resourceType: ResourceType;
6417
7334
  /**
6418
7335
  * The array of {@link Resources.ResourceCandidate | candidates} for the resource.
6419
7336
  */
@@ -6422,10 +7339,6 @@ declare class Resource implements IResource {
6422
7339
  * {@link Decisions.ConcreteDecision | Decision} for optimized resource resolution.
6423
7340
  */
6424
7341
  readonly decision: ConcreteDecision;
6425
- /**
6426
- * Gets the resource type (implements IResource interface).
6427
- */
6428
- get resourceType(): ResourceType;
6429
7342
  /**
6430
7343
  * Gets the resource type name as a string.
6431
7344
  */
@@ -6621,7 +7534,7 @@ declare type ResourceBuilderResultDetail = Collections.ResultMapResultDetail | '
6621
7534
  * and instructions on how to merge it with other instances.
6622
7535
  * @public
6623
7536
  */
6624
- declare class ResourceCandidate implements IResourceCandidate {
7537
+ export declare class ResourceCandidate implements IResourceCandidate {
6625
7538
  /**
6626
7539
  * The unique identifier of the resource for which this candidate
6627
7540
  * is a possible instance.
@@ -6648,6 +7561,10 @@ declare class ResourceCandidate implements IResourceCandidate {
6648
7561
  * this candidate belongs.
6649
7562
  */
6650
7563
  readonly resourceType: ResourceType | undefined;
7564
+ /**
7565
+ * The completeness of the candidate value.
7566
+ */
7567
+ get completeness(): CandidateCompleteness;
6651
7568
  /**
6652
7569
  * Constructor for a {@link Resources.ResourceCandidate | ResourceCandidate} object.
6653
7570
  * @param params - Parameters to create a new {@link Resources.ResourceCandidate | ResourceCandidate}.
@@ -6848,7 +7765,7 @@ declare const resourceIndex: Converter<ResourceIndex, unknown>;
6848
7765
  declare namespace ResourceJson {
6849
7766
  export {
6850
7767
  Compiled,
6851
- Convert_4 as Convert,
7768
+ Convert_7 as Convert,
6852
7769
  Helpers_2 as Helpers,
6853
7770
  Json,
6854
7771
  Normalized,
@@ -6866,15 +7783,54 @@ export { ResourceJson }
6866
7783
  * and builds a collection of {@link Resources.Resource | resources} once all candidates are collected.
6867
7784
  * @public
6868
7785
  */
6869
- declare class ResourceManagerBuilder implements IResourceManager {
7786
+ export declare class ResourceManagerBuilder implements IResourceManager<Resource> {
7787
+ /**
7788
+ * The {@link Qualifiers.IReadOnlyQualifierCollector | qualifiers} used by this resource manager.
7789
+ */
6870
7790
  readonly qualifiers: IReadOnlyQualifierCollector;
7791
+ /**
7792
+ * The {@link ResourceTypes.ReadOnlyResourceTypeCollector | resource types} used by this resource manager.
7793
+ */
6871
7794
  readonly resourceTypes: ReadOnlyResourceTypeCollector;
7795
+ /**
7796
+ * The {@link Conditions.ConditionCollector | condition collector} used by this resource manager.
7797
+ * @internal
7798
+ */
6872
7799
  protected readonly _conditions: ConditionCollector;
7800
+ /**
7801
+ * The {@link Conditions.ConditionSetCollector | condition set collector} used by this resource manager.
7802
+ * @internal
7803
+ */
6873
7804
  protected readonly _conditionSets: ConditionSetCollector;
7805
+ /**
7806
+ * The {@link Decisions.AbstractDecisionCollector | abstract decision collector} used by this resource manager.
7807
+ * @internal
7808
+ */
6874
7809
  protected readonly _decisions: AbstractDecisionCollector;
7810
+ /**
7811
+ * The {@link Resources.ResourceBuilder | resource builders} used by this resource manager.
7812
+ * @internal
7813
+ */
6875
7814
  protected readonly _resources: ValidatingResultMap<ResourceId, ResourceBuilder>;
6876
- readonly _builtResources: ValidatingResultMap<ResourceId, Resource>;
7815
+ /**
7816
+ * The {@link Resources.Resource | resources} built by this resource manager.
7817
+ * @internal
7818
+ */
7819
+ protected readonly _builtResources: ValidatingResultMap<ResourceId, Resource>;
7820
+ /**
7821
+ * Whether the resources have been built.
7822
+ * @internal
7823
+ */
6877
7824
  protected _built: boolean;
7825
+ /**
7826
+ * The cached resource tree for this resource manager.
7827
+ * @internal
7828
+ */
7829
+ protected _cachedResourceTree?: ResourceTree.IReadOnlyResourceTreeRoot<Resource>;
7830
+ /**
7831
+ * The {@link QualifierTypes.ReadOnlyQualifierTypeCollector | qualifier types} used by this resource manager.
7832
+ */
7833
+ get qualifierTypes(): ReadOnlyQualifierTypeCollector;
6878
7834
  /**
6879
7835
  * A {@link Conditions.ConditionCollector | ConditionCollector} which
6880
7836
  * contains the {@link Conditions.Condition | conditions} used so far by
@@ -6931,6 +7887,26 @@ declare class ResourceManagerBuilder implements IResourceManager {
6931
7887
  * @public
6932
7888
  */
6933
7889
  static create(params: IResourceManagerBuilderCreateParams): Result<ResourceManagerBuilder>;
7890
+ /**
7891
+ * Creates a new {@link Resources.ResourceManagerBuilder | ResourceManagerBuilder} object from a predefined system configuration.
7892
+ * @param name - The name of the predefined system configuration to use.
7893
+ * @param qualifierDefaultValues - Optional default values for qualifiers.
7894
+ * @returns `Success` with the new {@link Resources.ResourceManagerBuilder | ResourceManagerBuilder} object if successful,
7895
+ * or `Failure` with an error message if not.
7896
+ * @public
7897
+ */
7898
+ static createPredefined(name: Config.PredefinedSystemConfiguration, qualifierDefaultValues?: Config.ISystemConfigurationInitParams['qualifierDefaultValues']): Result<ResourceManagerBuilder>;
7899
+ /**
7900
+ * Creates a new {@link Resources.ResourceManagerBuilder | ResourceManagerBuilder} from a
7901
+ * {@link ResourceJson.Compiled.ICompiledResourceCollection | compiled resource collection}.
7902
+ * This method reconstructs an exactly equivalent builder where all qualifier, condition,
7903
+ * condition set, and decision indices match the original compiled collection.
7904
+ * @param compiledCollection - The compiled resource collection to reconstruct from.
7905
+ * @param systemConfig - The system configuration containing qualifiers and resource types.
7906
+ * @returns `Success` with the new manager if successful, or `Failure` with an error message if not.
7907
+ * @public
7908
+ */
7909
+ static createFromCompiledResourceCollection(compiledCollection: ResourceJson.Compiled.ICompiledResourceCollection, systemConfig: Config.SystemConfiguration): Result<ResourceManagerBuilder>;
6934
7910
  /**
6935
7911
  * Given a {@link ResourceJson.Json.ILooseResourceCandidateDecl | resource candidate declaration}, builds and adds
6936
7912
  * a {@link Resources.ResourceCandidate | candidate} to the manager.
@@ -6940,6 +7916,20 @@ declare class ResourceManagerBuilder implements IResourceManager {
6940
7916
  */
6941
7917
  addLooseCandidate(decl: ResourceJson.Json.ILooseResourceCandidateDecl): DetailedResult<ResourceCandidate, ResourceBuilderResultDetail>;
6942
7918
  addResource(decl: ResourceJson.Json.ILooseResourceDecl): DetailedResult<ResourceBuilder, ResourceBuilderResultDetail>;
7919
+ /**
7920
+ * Adds a condition to the manager.
7921
+ * @param decl - The condition declaration to add.
7922
+ * @returns `Success` with the condition if successful, or `Failure` with an error message if not.
7923
+ * @public
7924
+ */
7925
+ addCondition(decl: ResourceJson.Json.ILooseConditionDecl): Result<Condition>;
7926
+ /**
7927
+ * Adds a condition set to the manager.
7928
+ * @param decl - The condition set declaration to add.
7929
+ * @returns `Success` with the condition set if successful, or `Failure` with an error message if not.
7930
+ * @public
7931
+ */
7932
+ addConditionSet(conditions: ResourceJson.Normalized.ConditionSetDecl): Result<ConditionSet>;
6943
7933
  /**
6944
7934
  * Gets a read-only array of all {@link Resources.ResourceBuilder | resource builders} present in the manager.
6945
7935
  * @returns `Success` with the {@link Resources.ResourceBuilder | resource builder} if successful,
@@ -6970,6 +7960,19 @@ declare class ResourceManagerBuilder implements IResourceManager {
6970
7960
  * @public
6971
7961
  */
6972
7962
  getAllBuiltResources(): Result<ReadonlyArray<Resource>>;
7963
+ /**
7964
+ * Builds and returns a hierarchical tree representation of all resources managed by this builder.
7965
+ * Resources are organized based on their dot-separated resource IDs (e.g., "app.messages.welcome"
7966
+ * becomes a tree with "app" as root, "messages" as branch, and "welcome" as leaf).
7967
+ *
7968
+ * String-based validation is available through the `children.validating` property,
7969
+ * allowing callers to use `tree.children.validating.getById(stringId)` for validated access.
7970
+ *
7971
+ * Uses lazy initialization with caching for performance.
7972
+ * @returns Result containing the resource tree root, or failure if tree construction fails
7973
+ * @public
7974
+ */
7975
+ getBuiltResourceTree(): Result<ResourceTree.IReadOnlyResourceTreeRoot<Resource>>;
6973
7976
  /**
6974
7977
  * Gets a read-only array of all {@link Resources.Resource | built resources} in the manager.
6975
7978
  * @returns `Success` with an array of resources if successful, or `Failure` with an error message if not.
@@ -7043,14 +8046,97 @@ declare class ResourceManagerBuilder implements IResourceManager {
7043
8046
  */
7044
8047
  getResourceCollectionDecl(options?: IResourceDeclarationOptions): Result<ResourceJson.Normalized.IResourceCollectionDecl>;
7045
8048
  /**
7046
- * Creates a filtered clone of this ResourceManagerBuilder using the specified context.
7047
- * This is a convenience method that creates a new ResourceManagerBuilder with the same
7048
- * configuration but filtered to include only candidates that match the provided context.
7049
- * @param options - Options for the cloning operation, including the strongly-typed filterForContext property.
7050
- * @returns A Result containing the new filtered ResourceManagerBuilder.
8049
+ * Creates a clone of this ResourceManagerBuilder with optional configuration overrides.
8050
+ * This method creates a new ResourceManagerBuilder that can optionally use different
8051
+ * qualifiers and/or resource types than the original. It can also be filtered to include
8052
+ * only candidates that match the provided context and apply candidate edits.
8053
+ *
8054
+ * @param options - Options for the cloning operation:
8055
+ * - `qualifiers`: Optional qualifier collector to use instead of the original
8056
+ * - `resourceTypes`: Optional resource type collector to use instead of the original
8057
+ * - `filterForContext`: Optional context filter for candidates
8058
+ * - `candidates`: Optional candidate edits to apply during cloning
8059
+ * @returns A Result containing the new ResourceManagerBuilder with the specified configuration.
7051
8060
  * @public
7052
8061
  */
7053
- clone(options?: IResourceDeclarationOptions): Result<ResourceManagerBuilder>;
8062
+ clone(options?: IResourceManagerCloneOptions): Result<ResourceManagerBuilder>;
8063
+ /**
8064
+ * Creates a resource ID keyed map from an array of loose resource candidate declarations.
8065
+ * This enables efficient detection of edit collisions by grouping candidates by their target resource.
8066
+ * @param candidates - Array of loose resource candidate declarations to organize
8067
+ * @returns A Result containing a Map where keys are validated ResourceIds and values are arrays of candidates for that resource
8068
+ * @internal
8069
+ */
8070
+ private static _createCandidatesByResourceMap;
8071
+ /**
8072
+ * Generates a proper ConditionSet token for collision detection using the existing ConditionSet.getKeyForDecl method.
8073
+ * @param conditionSet - The condition set to generate a token for
8074
+ * @param conditionCollector - The condition collector needed for validation context
8075
+ * @returns A Result containing the ConditionSet token if successful, or failure if validation fails
8076
+ * @internal
8077
+ */
8078
+ /**
8079
+ * Applies candidate edits to a resource declaration, handling collisions using condition set tokens.
8080
+ * If there's no collision, adds the candidate. If there's a collision, replaces the original candidate with the edit.
8081
+ * @param resourceDecl - The original resource declaration to potentially modify
8082
+ * @param candidatesByResource - Map of resource IDs to arrays of candidate edits
8083
+ * @param conditionCollector - The condition collector needed for generating condition tokens
8084
+ * @returns A Result containing the resource declaration to use (original or modified)
8085
+ * @internal
8086
+ */
8087
+ private static _applyEditsToResourceDeclaration;
8088
+ /**
8089
+ * Creates a new resource declaration from an array of candidate declarations.
8090
+ * This is used when cloning to create new resources that don't exist in the original manager.
8091
+ * @param resourceId - The validated resource ID for the new resource
8092
+ * @param candidates - Array of loose candidate declarations for the new resource
8093
+ * @param conditionCollector - The condition collector for validation context
8094
+ * @returns A Result containing the new resource declaration if successful, or failure if validation fails
8095
+ * @internal
8096
+ */
8097
+ private static _createResourceDeclFromCandidates;
8098
+ /**
8099
+ * Reconstructs conditions from a compiled collection and adds them to the builder.
8100
+ * @param builder - The builder to add conditions to.
8101
+ * @param compiledCollection - The compiled collection containing conditions.
8102
+ * @returns `Success` if all conditions were added successfully, `Failure` otherwise.
8103
+ * @internal
8104
+ */
8105
+ private static _reconstructConditions;
8106
+ /**
8107
+ * Reconstructs condition sets from a compiled collection and adds them to the builder.
8108
+ * @param builder - The builder to add condition sets to.
8109
+ * @param compiledCollection - The compiled collection containing condition sets.
8110
+ * @returns `Success` if all condition sets were added successfully, `Failure` otherwise.
8111
+ * @internal
8112
+ */
8113
+ private static _reconstructConditionSets;
8114
+ /**
8115
+ * Reconstructs decisions from a compiled collection and adds them to the builder.
8116
+ * @param builder - The builder to add decisions to.
8117
+ * @param compiledCollection - The compiled collection containing decisions.
8118
+ * @returns `Success` if all decisions were added successfully, `Failure` otherwise.
8119
+ * @internal
8120
+ */
8121
+ private static _reconstructDecisions;
8122
+ /**
8123
+ * Reconstructs resources and their candidates from a compiled collection and adds them to the builder.
8124
+ * @param builder - The builder to add resources to.
8125
+ * @param compiledCollection - The compiled collection containing resources.
8126
+ * @returns `Success` if all resources were added successfully, `Failure` otherwise.
8127
+ * @internal
8128
+ */
8129
+ private static _reconstructResources;
8130
+ /**
8131
+ * Helper method to create candidates from a decision's condition sets.
8132
+ * @param compiledResource - The compiled resource containing candidates.
8133
+ * @param decision - The decision containing condition sets.
8134
+ * @param resourceType - The resource type for the candidates.
8135
+ * @param builder - The builder to add candidates to.
8136
+ * @returns `Success` if all candidates were added successfully, `Failure` otherwise.
8137
+ * @internal
8138
+ */
8139
+ private static _createCandidatesFromDecision;
7054
8140
  }
7055
8141
 
7056
8142
  /**
@@ -7077,7 +8163,7 @@ declare const resourceName: Converter<ResourceName, unknown>;
7077
8163
  * and caching results for optimal performance.
7078
8164
  * @public
7079
8165
  */
7080
- declare class ResourceResolver {
8166
+ export declare class ResourceResolver {
7081
8167
  /**
7082
8168
  * The resource manager that defines available resources and provides condition access.
7083
8169
  */
@@ -7090,6 +8176,10 @@ declare class ResourceResolver {
7090
8176
  * The context qualifier provider that resolves qualifier values.
7091
8177
  */
7092
8178
  readonly contextQualifierProvider: IContextQualifierProvider;
8179
+ /**
8180
+ * The configuration options for this resource resolver.
8181
+ */
8182
+ readonly options: IResourceResolverOptions;
7093
8183
  /**
7094
8184
  * The cache array for resolved conditions, indexed by condition index for O(1) lookup.
7095
8185
  * Each entry stores the resolved {@link Runtime.IConditionMatchResult | condition match result} for
@@ -7233,6 +8323,8 @@ declare type ResourceResolverCacheActivity = 'hit' | 'miss' | 'error' | 'clear';
7233
8323
  */
7234
8324
  declare class ResourceResolverCacheMetricsListener<TM extends ICacheMetrics> implements IResourceResolverCacheListener {
7235
8325
  private readonly _metrics;
8326
+ private _contextErrors;
8327
+ get numContextErrors(): number;
7236
8328
  constructor(factory: () => TM);
7237
8329
  constructor(metrics: OverallCacheMetrics<TM>);
7238
8330
  /**
@@ -7252,6 +8344,10 @@ declare class ResourceResolverCacheMetricsListener<TM extends ICacheMetrics> imp
7252
8344
  * {@inheritDoc Runtime.IResourceResolverCacheListener.onCacheError}
7253
8345
  */
7254
8346
  onCacheError(cache: ResourceResolverCacheType, index: number): void;
8347
+ /**
8348
+ * {@inheritDoc Runtime.IResourceResolverCacheListener.onContextError}
8349
+ */
8350
+ onContextError(qualifier: string, error: string): void;
7255
8351
  /**
7256
8352
  * {@inheritDoc Runtime.IResourceResolverCacheListener.onCacheClear}
7257
8353
  */
@@ -7286,7 +8382,8 @@ declare namespace Resources {
7286
8382
  ResourceManagerBuilderResultDetail,
7287
8383
  ResourceManagerBuilder,
7288
8384
  IResourceDeclarationOptions,
7289
- ICompiledResourceOptionsWithFilter
8385
+ ICompiledResourceOptionsWithFilter,
8386
+ IResourceManagerCloneOptions
7290
8387
  }
7291
8388
  }
7292
8389
  export { Resources }
@@ -7333,7 +8430,7 @@ declare const resourceTreeChildNodeDecl: Converter<Normalized.IResourceTreeChild
7333
8430
  * strongly-typed internal tree operations, ensuring type safety and consistent
7334
8431
  * error handling throughout the resource tree navigation.
7335
8432
  *
7336
- * @internal
8433
+ * @public
7337
8434
  */
7338
8435
  declare class ResourceTreeChildrenValidator<T> implements IReadOnlyResourceTreeChildren<T, string, string> {
7339
8436
  private readonly _inner;
@@ -7388,17 +8485,17 @@ declare class ResourceTreeChildrenValidator<T> implements IReadOnlyResourceTreeC
7388
8485
  */
7389
8486
  forEach(cb: (value: unknown, key: string, map: IReadOnlyResultMap<string, unknown>, thisArg?: unknown) => void, arg?: unknown): void;
7390
8487
  /**
7391
- * Gets a child node by its ResourceName key with detailed error information.
7392
- * @param key - The ResourceName key to look up
8488
+ * Gets a child node by its string key with detailed error information.
8489
+ * @param key - The string key to look up
7393
8490
  * @returns DetailedResult containing the node if found, or failure with details
7394
8491
  */
7395
- get(key: ResourceName): DetailedResult<IReadOnlyResourceTreeNode<T>, Collections.ResultMapResultDetail>;
8492
+ get(key: string): DetailedResult<IReadOnlyResourceTreeNode<T>, Collections.ResultMapResultDetail>;
7396
8493
  /**
7397
- * Checks if a child node exists at the given ResourceName key.
7398
- * @param key - The ResourceName key to check
8494
+ * Checks if a child node exists at the given string key.
8495
+ * @param key - The string key to check
7399
8496
  * @returns True if a child node exists at the key, false otherwise
7400
8497
  */
7401
- has(key: ResourceName): boolean;
8498
+ has(key: string): boolean;
7402
8499
  /**
7403
8500
  * Returns an iterator of ResourceName keys for all child nodes.
7404
8501
  * @returns Map iterator for all child node keys
@@ -7434,14 +8531,14 @@ declare const resourceTreeRootDecl: Converter<Normalized.IResourceTreeRootDecl>;
7434
8531
  * resource value.
7435
8532
  * @public
7436
8533
  */
7437
- declare abstract class ResourceType<T = unknown> implements ICollectible<ResourceTypeName, ResourceTypeIndex> {
8534
+ export declare abstract class ResourceType<T = unknown> implements IResourceType<T> {
7438
8535
  private _collectible;
7439
8536
  /**
7440
- * The key for this resource type.
8537
+ * {@inheritdoc ResourceTypes.IResourceType.key}
7441
8538
  */
7442
8539
  get key(): ResourceTypeName;
7443
8540
  /**
7444
- * The index for this resource type.
8541
+ * {@inheritdoc ResourceTypes.IResourceType.index}
7445
8542
  */
7446
8543
  get index(): ResourceTypeIndex | undefined;
7447
8544
  protected constructor(key: ResourceTypeName, index?: number);
@@ -7457,34 +8554,58 @@ declare abstract class ResourceType<T = unknown> implements ICollectible<Resourc
7457
8554
  /**
7458
8555
  * Validates a JSON value for use as a partial resource instance value.
7459
8556
  * @param json - The JSON value to validate.
7460
- * @param isPartial - `true` indicates that the value is expected to be partial.
8557
+ * @param completeness - Describes {@link CandidateCompleteness | how complete} the candidate value is.
7461
8558
  * @returns `Success` with the strongly-typed partial resource value if the JSON is valid,
7462
8559
  * `Failure` with an error message otherwise.
7463
8560
  * @public
7464
8561
  */
7465
- abstract validate(json: JsonValue, isPartial: true): Result<Partial<T>>;
8562
+ abstract validate(json: JsonValue, completeness: CandidateCompleteness): Result<Partial<T>>;
7466
8563
  /**
7467
8564
  * Validates a JSON value for use as a complete resource instance value.
7468
8565
  * @param json - The JSON value to validate.
7469
- * @param isPartial - `false` indicates that the value is expected to be complete.
8566
+ * @param completeness - Describes {@link CandidateCompleteness | how complete} the candidate value is.
7470
8567
  * @returns `Success` with the strongly-typed resource value if the JSON is valid,
7471
8568
  * `Failure` with an error message otherwise.
7472
8569
  * @public
7473
8570
  */
7474
- abstract validate(json: JsonValue, isPartial: false): Result<T>;
8571
+ abstract validate(json: JsonValue, completeness: 'full'): Result<T>;
8572
+ /**
8573
+ * Validates a JSON value for use as a partial resource instance value.
8574
+ * @param json - The JSON value to validate.
8575
+ * @param completeness - Describes {@link CandidateCompleteness | how complete} the candidate value is.
8576
+ * @returns `Success` with the strongly-typed partial resource value if the JSON is valid,
8577
+ * `Failure` with an error message otherwise.
8578
+ * @public
8579
+ */
8580
+ abstract validate(json: JsonValue, completeness: 'partial'): Result<Partial<T>>;
7475
8581
  /**
7476
8582
  * Validates a JSON value for use as a full or partial resource instance value.
7477
8583
  * @param json - The JSON value to validate.
7478
- * @param isPartial - Indicates whether the value is expected to be partial.
8584
+ * @param completeness - Describes {@link CandidateCompleteness | how complete} the candidate value is.
7479
8585
  * @returns `Success` with the strongly-typed full or partial resource value if
7480
8586
  * the JSON is valid, `Failure` with an error message otherwise.
7481
8587
  * @public
7482
8588
  */
7483
- abstract validate(json: JsonValue, isPartial?: boolean): Result<T | Partial<T>>;
8589
+ abstract validate(json: JsonValue, completeness?: CandidateCompleteness): Result<T | Partial<T>>;
7484
8590
  /**
7485
8591
  * Sets the index for this resource type. Once set, the index cannot be changed.
7486
8592
  */
7487
8593
  setIndex(index: number): Result<ResourceTypeIndex>;
8594
+ /**
8595
+ * Creates a template for a new resource of this type.
8596
+ * Default implementation provides a basic template.
8597
+ * Subclasses can override to provide type-specific templates.
8598
+ * @param resourceId - The id for the new resource
8599
+ * @returns A loose resource declaration with default values for this resource type
8600
+ * @public
8601
+ */
8602
+ createTemplate(resourceId: ResourceId): ResourceJson.Json.ILooseResourceDecl;
8603
+ /**
8604
+ * Gets the default template value for this resource type.
8605
+ * Subclasses should override this to provide type-specific default values.
8606
+ * @returns The default JSON value for a new resource of this type
8607
+ */
8608
+ protected getDefaultTemplateValue(): JsonObject;
7488
8609
  }
7489
8610
 
7490
8611
  /**
@@ -7510,6 +8631,20 @@ declare class ResourceTypeCollector extends ValidatingCollector<ResourceType> {
7510
8631
  */
7511
8632
  declare const resourceTypeConfig: ObjectConverter<IResourceTypeConfig, unknown>;
7512
8633
 
8634
+ /**
8635
+ * A factory that creates a {@link ResourceTypes.ResourceType | ResourceType} from a {@link ResourceTypes.Config.IResourceTypeConfig | resource type configuration}
8636
+ * by chaining a supplied factory with a {@link Config.BuiltInResourceTypeFactory | built-in factory} that handles built-in resource types.
8637
+ * @public
8638
+ */
8639
+ declare class ResourceTypeFactory extends ChainedConfigInitFactory<ResourceTypes.Config.IResourceTypeConfig, ResourceType> {
8640
+ /**
8641
+ * Constructor for a resource type factory.
8642
+ * @param factories - The {@link Config.IConfigInitFactory | factories} to chain.
8643
+ * @remarks The {@link Config.BuiltInResourceTypeFactory | built-in factory} is always added to the end of the chain.
8644
+ */
8645
+ constructor(factories: IConfigInitFactory<ResourceTypes.Config.IResourceTypeConfig, ResourceType>[]);
8646
+ }
8647
+
7513
8648
  /**
7514
8649
  * Branded number representing a validated resource type index.
7515
8650
  * @public
@@ -7538,6 +8673,7 @@ declare namespace ResourceTypes {
7538
8673
  export {
7539
8674
  Config_3 as Config,
7540
8675
  IResourceCandidateValidationProperties,
8676
+ IResourceType,
7541
8677
  ResourceType,
7542
8678
  IResourceCollectorCreateParams,
7543
8679
  ResourceTypeCollector,
@@ -7578,6 +8714,7 @@ declare namespace Runtime {
7578
8714
  IValidatingSimpleContextQualifierProviderCreateParams,
7579
8715
  ValidatingSimpleContextQualifierProvider,
7580
8716
  DecisionResolutionResult,
8717
+ IResourceResolverOptions,
7581
8718
  IResourceResolverCreateParams,
7582
8719
  ResourceResolver,
7583
8720
  ConditionMatchType,
@@ -7595,6 +8732,14 @@ declare namespace Runtime {
7595
8732
  }
7596
8733
  export { Runtime }
7597
8734
 
8735
+ /**
8736
+ * Create a safe filename by removing invalid characters
8737
+ * @param filename - Original filename
8738
+ * @returns Sanitized filename
8739
+ * @public
8740
+ */
8741
+ declare function sanitizeFilename(filename: string): string;
8742
+
7598
8743
  /**
7599
8744
  * @internal
7600
8745
  */
@@ -7736,7 +8881,7 @@ declare class SystemConfiguration {
7736
8881
  * @param config - The {@link Config.Model.ISystemConfiguration | system configuration} to use.
7737
8882
  * @public
7738
8883
  */
7739
- protected constructor(config: ISystemConfiguration);
8884
+ protected constructor(config: ISystemConfiguration, initParams?: ISystemConfigurationInitParams);
7740
8885
  /**
7741
8886
  * Creates a new {@link Config.SystemConfiguration | SystemConfiguration} from the supplied
7742
8887
  * {@link Config.Model.ISystemConfiguration | system configuration}.
@@ -7747,6 +8892,14 @@ declare class SystemConfiguration {
7747
8892
  * @public
7748
8893
  */
7749
8894
  static create(config: ISystemConfiguration, initParams?: ISystemConfigurationInitParams): Result<SystemConfiguration>;
8895
+ /**
8896
+ * Loads a {@link Config.SystemConfiguration | SystemConfiguration} from a file.
8897
+ * @param path - The path to the file to load.
8898
+ * @returns `Success` with the {@link Config.SystemConfiguration | SystemConfiguration}
8899
+ * if successful, `Failure` with an error message otherwise.
8900
+ * @public
8901
+ */
8902
+ static loadFromFile(path: string, initParams?: ISystemConfigurationInitParams): Result<SystemConfiguration>;
7750
8903
  /**
7751
8904
  * Returns the {@link Config.Model.ISystemConfiguration | system configuration} that this
7752
8905
  * {@link Config.SystemConfiguration | SystemConfiguration} was created from.
@@ -7764,33 +8917,40 @@ declare class SystemConfiguration {
7764
8917
  */
7765
8918
  declare const systemConfiguration: ObjectConverter<ISystemConfiguration, unknown>;
7766
8919
 
8920
+ /**
8921
+ * Validator for system configuration (delegates to config packlet)
8922
+ * This validates that the parsed JSON conforms to the system configuration schema
8923
+ * @public
8924
+ */
8925
+ declare const systemConfiguration_2: Validator<Model.ISystemConfiguration>;
8926
+
7767
8927
  /**
7768
8928
  * A `Converter` for {@link QualifierTypes.Config.ISystemLanguageQualifierTypeConfig | SystemLanguageQualifierTypeConfig} objects.
7769
8929
  * @returns A `Converter` for {@link QualifierTypes.Config.ISystemLanguageQualifierTypeConfig | SystemLanguageQualifierTypeConfig} objects.
7770
8930
  * @public
7771
8931
  */
7772
- declare const systemLanguageQualifierTypeConfig: ObjectConverter<Model_3.ISystemLanguageQualifierTypeConfig, unknown>;
8932
+ declare const systemLanguageQualifierTypeConfig: ObjectConverter<Model_2.ISystemLanguageQualifierTypeConfig, unknown>;
7773
8933
 
7774
8934
  /**
7775
8935
  * A `Converter` for {@link QualifierTypes.Config.ISystemLiteralQualifierTypeConfig | SystemLiteralQualifierTypeConfig} objects.
7776
8936
  * @returns A `Converter` for {@link QualifierTypes.Config.ISystemLiteralQualifierTypeConfig | SystemLiteralQualifierTypeConfig} objects.
7777
8937
  * @public
7778
8938
  */
7779
- declare const systemLiteralQualifierTypeConfig: ObjectConverter<Model_3.ISystemLiteralQualifierTypeConfig, unknown>;
8939
+ declare const systemLiteralQualifierTypeConfig: ObjectConverter<Model_2.ISystemLiteralQualifierTypeConfig, unknown>;
7780
8940
 
7781
8941
  /**
7782
8942
  * A `Converter` for {@link QualifierTypes.Config.ISystemQualifierTypeConfig | SystemQualifierTypeConfig} objects.
7783
8943
  * @returns A `Converter` for {@link QualifierTypes.Config.ISystemQualifierTypeConfig | SystemQualifierTypeConfig} objects.
7784
8944
  * @public
7785
8945
  */
7786
- declare const systemQualifierTypeConfig: Converter<Model_3.ISystemQualifierTypeConfig, unknown>;
8946
+ declare const systemQualifierTypeConfig: Converter<Model_2.ISystemQualifierTypeConfig, unknown>;
7787
8947
 
7788
8948
  /**
7789
8949
  * A `Converter` for {@link QualifierTypes.Config.ISystemTerritoryQualifierTypeConfig | SystemTerritoryQualifierTypeConfig} objects.
7790
8950
  * @returns A `Converter` for {@link QualifierTypes.Config.ISystemTerritoryQualifierTypeConfig | SystemTerritoryQualifierTypeConfig} objects.
7791
8951
  * @public
7792
8952
  */
7793
- declare const systemTerritoryQualifierTypeConfig: ObjectConverter<Model_3.ISystemTerritoryQualifierTypeConfig, unknown>;
8953
+ declare const systemTerritoryQualifierTypeConfig: ObjectConverter<Model_2.ISystemTerritoryQualifierTypeConfig, unknown>;
7794
8954
 
7795
8955
  /**
7796
8956
  * @internal
@@ -7893,7 +9053,7 @@ declare class TerritoryQualifierType extends QualifierType {
7893
9053
  * @returns A `Converter` for {@link QualifierTypes.Config.ITerritoryQualifierTypeConfig | TerritoryQualifierTypeConfig} objects.
7894
9054
  * @public
7895
9055
  */
7896
- declare const territoryQualifierTypeConfig: ObjectConverter<Model_3.ITerritoryQualifierTypeConfig, unknown>;
9056
+ declare const territoryQualifierTypeConfig: ObjectConverter<Model_2.ITerritoryQualifierTypeConfig, unknown>;
7897
9057
 
7898
9058
  /**
7899
9059
  * Converts a number to a {@link ConditionIndex} if it is a valid condition index.
@@ -8244,6 +9404,23 @@ declare const validatedContextQualifierValueDecl: Converter<IValidatedContextQua
8244
9404
  */
8245
9405
  declare const validatedQualifierDecl: Converter<IValidatedQualifierDecl, IQualifierDeclConvertContext>;
8246
9406
 
9407
+ /**
9408
+ * Validate a {@link Config.Model.ISystemConfiguration | ISystemConfiguration} object.
9409
+ * @param config - The system configuration to validate
9410
+ * @returns `Success` with the validated system configuration if successful,
9411
+ * or `Failure` with an error message if validation fails.
9412
+ * @public
9413
+ */
9414
+ declare function validateSystemConfiguration(config: unknown): Result<ISystemConfiguration>;
9415
+
9416
+ /**
9417
+ * Validate a ZIP archive manifest object
9418
+ * @param manifest - Object to validate as manifest
9419
+ * @returns Result containing validated manifest
9420
+ * @public
9421
+ */
9422
+ declare function validateZipArchiveManifest(manifest: unknown): Result<Json_2.IZipArchiveManifest>;
9423
+
8247
9424
  /**
8248
9425
  * A {@link Runtime.SimpleContextQualifierProvider | SimpleContextQualifierProvider} with a
8249
9426
  * {@link Runtime.Context.ContextQualifierProviderValidator | validator} property that enables
@@ -8272,4 +9449,194 @@ declare class ValidatingSimpleContextQualifierProvider extends SimpleContextQual
8272
9449
  static create(params: IValidatingSimpleContextQualifierProviderCreateParams): Result<ValidatingSimpleContextQualifierProvider>;
8273
9450
  }
8274
9451
 
9452
+ declare namespace ZipArchive {
9453
+ export {
9454
+ Json_2 as Json,
9455
+ Convert_12 as Convert,
9456
+ ZipArchiveCreator,
9457
+ ZipArchiveLoader,
9458
+ IZipArchivePathOptions,
9459
+ IZipArchiveFileTreeOptions,
9460
+ ZipArchiveOptions,
9461
+ IZipArchiveResult,
9462
+ IZipArchiveManifest_2 as IZipArchiveManifest,
9463
+ IZipArchiveLoadOptions,
9464
+ IZipArchiveLoadResult,
9465
+ IImportedFile_2 as IImportedFile,
9466
+ IImportedDirectory_2 as IImportedDirectory,
9467
+ ZipArchiveProgressCallback,
9468
+ createZipArchiveManifest,
9469
+ parseZipArchiveManifest,
9470
+ validateZipArchiveManifest,
9471
+ parseZipArchiveConfiguration,
9472
+ generateZipArchiveFilename,
9473
+ normalizePath,
9474
+ getDirectoryName,
9475
+ sanitizeFilename,
9476
+ isZipFile,
9477
+ ZipArchiveConstants
9478
+ }
9479
+ }
9480
+ export { ZipArchive }
9481
+
9482
+ /**
9483
+ * Validator for ZIP archive config information
9484
+ * @public
9485
+ */
9486
+ declare const zipArchiveConfigInfo: Validator<Json_2.IZipArchiveConfigInfo>;
9487
+
9488
+ /**
9489
+ * Validator for ZIP archive config type
9490
+ * @public
9491
+ */
9492
+ declare const zipArchiveConfigType: Validator<'file'>;
9493
+
9494
+ /**
9495
+ * Constants for ZIP archive structure
9496
+ * @public
9497
+ */
9498
+ declare const ZipArchiveConstants: {
9499
+ /** Manifest file name */
9500
+ readonly MANIFEST_FILE: "manifest.json";
9501
+ /** Configuration file name */
9502
+ readonly CONFIG_FILE: "config.json";
9503
+ /** Input files directory */
9504
+ readonly INPUT_DIR: "input";
9505
+ /** Configuration files directory */
9506
+ readonly CONFIG_DIR: "config";
9507
+ };
9508
+
9509
+ /**
9510
+ * ZIP archive creator using fflate for universal compatibility
9511
+ * @public
9512
+ */
9513
+ declare class ZipArchiveCreator {
9514
+ /**
9515
+ * Create a ZIP archive buffer from a supplied buffer
9516
+ * @param options - Input paths and configuration
9517
+ * @param onProgress - Optional progress callback
9518
+ * @returns Result containing ZIP buffer and manifest
9519
+ */
9520
+ createFromBuffer(options: ZipArchiveOptions, onProgress?: ZipArchiveProgressCallback): Promise<Result<IZipArchiveResult>>;
9521
+ /**
9522
+ * Add a single FileTree item to the ZIP archive
9523
+ * @param files - ZIP files collection
9524
+ * @param fileItem - FileTree file item to add
9525
+ * @param archivePath - Path within the archive
9526
+ * @returns Result indicating success or failure
9527
+ */
9528
+ private _addFileTreeItemToZip;
9529
+ /**
9530
+ * Add a directory recursively to the ZIP archive using FileTree
9531
+ * @param files - ZIP files collection
9532
+ * @param directoryItem - FileTree directory item to add
9533
+ * @param archivePrefix - Prefix path within the archive
9534
+ * @param onProgress - Optional progress callback
9535
+ * @returns Result indicating success or failure
9536
+ */
9537
+ private _addDirectoryTreeToZip;
9538
+ private _getInputFileTreeItem;
9539
+ private _getConfigFileTreeItem;
9540
+ }
9541
+
9542
+ /**
9543
+ * Validator for ZIP archive input information
9544
+ * @public
9545
+ */
9546
+ declare const zipArchiveInputInfo: Validator<Json_2.IZipArchiveInputInfo>;
9547
+
9548
+ /**
9549
+ * Validator for ZIP archive input type
9550
+ * @public
9551
+ */
9552
+ declare const zipArchiveInputType: Validator<'file' | 'directory'>;
9553
+
9554
+ /**
9555
+ * ZIP archive loader extending ts-extras foundation
9556
+ * @public
9557
+ */
9558
+ declare class ZipArchiveLoader {
9559
+ /**
9560
+ * Load ZIP archive from File object (Browser)
9561
+ * @param file - File object from file input
9562
+ * @param options - Loading options
9563
+ * @param onProgress - Optional progress callback
9564
+ * @returns Result containing loaded archive data
9565
+ */
9566
+ loadFromFile(file: File, options?: IZipArchiveLoadOptions, onProgress?: ZipArchiveProgressCallback): Promise<Result<IZipArchiveLoadResult>>;
9567
+ /**
9568
+ * Load ZIP archive from ArrayBuffer (Universal)
9569
+ * @param buffer - ZIP data buffer
9570
+ * @param options - Loading options
9571
+ * @param onProgress - Optional progress callback
9572
+ * @returns Result containing loaded archive data
9573
+ */
9574
+ loadFromBuffer(buffer: ArrayBuffer, options?: IZipArchiveLoadOptions, onProgress?: ZipArchiveProgressCallback): Promise<Result<IZipArchiveLoadResult>>;
9575
+ /**
9576
+ * Load manifest from ZIP using ZipFileTreeAccessors
9577
+ * @param zipAccessors - ZIP file tree accessors
9578
+ * @returns Result containing parsed manifest
9579
+ */
9580
+ private _loadManifestFromAccessors;
9581
+ /**
9582
+ * Load configuration from ZIP using ZipFileTreeAccessors
9583
+ * @param zipAccessors - ZIP file tree accessors
9584
+ * @param manifest - Parsed manifest (may be undefined)
9585
+ * @param options - Loading options
9586
+ * @returns Result containing parsed configuration
9587
+ */
9588
+ private _loadConfigurationFromAccessors;
9589
+ /**
9590
+ * Extract files and directory structure from ZIP
9591
+ * @param zipAccessors - ZIP file tree accessors
9592
+ * @param onProgress - Optional progress callback
9593
+ * @returns Result containing files and directory structure
9594
+ */
9595
+ private _extractFilesFromAccessors;
9596
+ /**
9597
+ * Recursively process file tree items
9598
+ * @param zipAccessors - ZIP file tree accessors
9599
+ * @param currentPath - Current directory path
9600
+ * @param items - Items to process
9601
+ * @param files - Files collection
9602
+ * @param directories - Directories collection
9603
+ * @param onProgress - Optional progress callback
9604
+ * @param processed - Processing counter
9605
+ */
9606
+ private _processFileTreeItems;
9607
+ /**
9608
+ * Build directory structure from files
9609
+ * @param files - Extracted files
9610
+ * @param directories - Directories map
9611
+ * @returns Root directory structure or null
9612
+ */
9613
+ private _buildDirectoryStructure;
9614
+ /**
9615
+ * Get file MIME type based on extension
9616
+ * @param filename - Filename
9617
+ * @returns MIME type
9618
+ */
9619
+ private _getFileType;
9620
+ }
9621
+
9622
+ /**
9623
+ * Validator for ZIP archive manifest
9624
+ * Compatible with existing tools from ts-res-browser-cli
9625
+ * @public
9626
+ */
9627
+ declare const zipArchiveManifest: Validator<Json_2.IZipArchiveManifest>;
9628
+
9629
+ /**
9630
+ * Options for creating a ZIP archive buffer
9631
+ * @public
9632
+ */
9633
+ declare type ZipArchiveOptions = IZipArchivePathOptions | IZipArchiveFileTreeOptions;
9634
+
9635
+ /**
9636
+ * Progress callback for ZIP operations
9637
+ * @public
9638
+ */
9639
+ declare type ZipArchiveProgressCallback = (stage: 'reading-file' | 'parsing-zip' | 'loading-manifest' | 'loading-config' | 'extracting-files' | 'processing-resources' | 'creating-zip', progress: number, // 0-100
9640
+ details: string) => void;
9641
+
8275
9642
  export { }