@fgv/ts-web-extras 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/.rush/temp/86c9c1ad46e237e0b957c2442bf0355cf39babba.tar.log +121 -0
  2. package/.rush/temp/chunked-rush-logs/ts-web-extras.build.chunks.jsonl +40 -0
  3. package/.rush/temp/operation/build/all.log +40 -0
  4. package/.rush/temp/operation/build/log-chunks.jsonl +40 -0
  5. package/.rush/temp/operation/build/state.json +3 -0
  6. package/.rush/temp/shrinkwrap-deps.json +624 -0
  7. package/config/api-extractor.json +343 -0
  8. package/config/jest.config.json +16 -0
  9. package/config/rig.json +16 -0
  10. package/dist/ts-web-extras.d.ts +574 -0
  11. package/dist/tsdoc-metadata.json +11 -0
  12. package/docs/index.md +34 -0
  13. package/docs/ts-web-extras.browserhashprovider.hashparts.md +88 -0
  14. package/docs/ts-web-extras.browserhashprovider.hashstring.md +72 -0
  15. package/docs/ts-web-extras.browserhashprovider.md +66 -0
  16. package/docs/ts-web-extras.exportasjson.md +70 -0
  17. package/docs/ts-web-extras.exportusingfilesystemapi.md +104 -0
  18. package/docs/ts-web-extras.extractdirectorypath.md +52 -0
  19. package/docs/ts-web-extras.fileapitreeaccessors.create.md +72 -0
  20. package/docs/ts-web-extras.fileapitreeaccessors.extractfilemetadata.md +54 -0
  21. package/docs/ts-web-extras.fileapitreeaccessors.fromdirectoryupload.md +72 -0
  22. package/docs/ts-web-extras.fileapitreeaccessors.fromfilelist.md +72 -0
  23. package/docs/ts-web-extras.fileapitreeaccessors.getoriginalfile.md +72 -0
  24. package/docs/ts-web-extras.fileapitreeaccessors.md +114 -0
  25. package/docs/ts-web-extras.filepickeraccepttype.accept.md +11 -0
  26. package/docs/ts-web-extras.filepickeraccepttype.description.md +11 -0
  27. package/docs/ts-web-extras.filepickeraccepttype.md +75 -0
  28. package/docs/ts-web-extras.filesystemcreatewritableoptions_2.keepexistingdata.md +11 -0
  29. package/docs/ts-web-extras.filesystemcreatewritableoptions_2.md +58 -0
  30. package/docs/ts-web-extras.filesystemdirectoryhandle_2._symbol.asynciterator_.md +15 -0
  31. package/docs/ts-web-extras.filesystemdirectoryhandle_2.entries.md +15 -0
  32. package/docs/ts-web-extras.filesystemdirectoryhandle_2.getdirectoryhandle.md +66 -0
  33. package/docs/ts-web-extras.filesystemdirectoryhandle_2.getfilehandle.md +66 -0
  34. package/docs/ts-web-extras.filesystemdirectoryhandle_2.keys.md +15 -0
  35. package/docs/ts-web-extras.filesystemdirectoryhandle_2.kind.md +11 -0
  36. package/docs/ts-web-extras.filesystemdirectoryhandle_2.md +146 -0
  37. package/docs/ts-web-extras.filesystemdirectoryhandle_2.removeentry.md +66 -0
  38. package/docs/ts-web-extras.filesystemdirectoryhandle_2.resolve.md +50 -0
  39. package/docs/ts-web-extras.filesystemdirectoryhandle_2.values.md +15 -0
  40. package/docs/ts-web-extras.filesystemfilehandle_2.createwritable.md +52 -0
  41. package/docs/ts-web-extras.filesystemfilehandle_2.getfile.md +15 -0
  42. package/docs/ts-web-extras.filesystemfilehandle_2.kind.md +11 -0
  43. package/docs/ts-web-extras.filesystemfilehandle_2.md +92 -0
  44. package/docs/ts-web-extras.filesystemgetdirectoryoptions_2.create.md +11 -0
  45. package/docs/ts-web-extras.filesystemgetdirectoryoptions_2.md +58 -0
  46. package/docs/ts-web-extras.filesystemgetfileoptions_2.create.md +11 -0
  47. package/docs/ts-web-extras.filesystemgetfileoptions_2.md +58 -0
  48. package/docs/ts-web-extras.filesystemhandle_2.issameentry.md +50 -0
  49. package/docs/ts-web-extras.filesystemhandle_2.kind.md +11 -0
  50. package/docs/ts-web-extras.filesystemhandle_2.md +119 -0
  51. package/docs/ts-web-extras.filesystemhandle_2.name.md +11 -0
  52. package/docs/ts-web-extras.filesystemhandle_2.querypermission.md +52 -0
  53. package/docs/ts-web-extras.filesystemhandle_2.requestpermission.md +52 -0
  54. package/docs/ts-web-extras.filesystemhandlepermissiondescriptor.md +58 -0
  55. package/docs/ts-web-extras.filesystemhandlepermissiondescriptor.mode.md +11 -0
  56. package/docs/ts-web-extras.filesystemremoveoptions_2.md +58 -0
  57. package/docs/ts-web-extras.filesystemremoveoptions_2.recursive.md +11 -0
  58. package/docs/ts-web-extras.filesystemwritablefilestream_2.md +57 -0
  59. package/docs/ts-web-extras.filesystemwritablefilestream_2.seek.md +50 -0
  60. package/docs/ts-web-extras.filesystemwritablefilestream_2.truncate.md +50 -0
  61. package/docs/ts-web-extras.filesystemwritablefilestream_2.write.md +50 -0
  62. package/docs/ts-web-extras.filetreehelpers.defaultfileapitreeinitparams.md +13 -0
  63. package/docs/ts-web-extras.filetreehelpers.extractfilelistmetadata.md +56 -0
  64. package/docs/ts-web-extras.filetreehelpers.extractfilemetadata.md +56 -0
  65. package/docs/ts-web-extras.filetreehelpers.fromdirectoryupload.md +76 -0
  66. package/docs/ts-web-extras.filetreehelpers.fromfilelist.md +76 -0
  67. package/docs/ts-web-extras.filetreehelpers.getoriginalfile.md +72 -0
  68. package/docs/ts-web-extras.filetreehelpers.md +102 -0
  69. package/docs/ts-web-extras.idirectoryhandletreeinitializer.dirhandles.md +11 -0
  70. package/docs/ts-web-extras.idirectoryhandletreeinitializer.md +100 -0
  71. package/docs/ts-web-extras.idirectoryhandletreeinitializer.nonrecursive.md +11 -0
  72. package/docs/ts-web-extras.idirectoryhandletreeinitializer.prefix.md +11 -0
  73. package/docs/ts-web-extras.ifilehandletreeinitializer.filehandles.md +11 -0
  74. package/docs/ts-web-extras.ifilehandletreeinitializer.md +79 -0
  75. package/docs/ts-web-extras.ifilehandletreeinitializer.prefix.md +11 -0
  76. package/docs/ts-web-extras.ifilelisttreeinitializer.filelist.md +11 -0
  77. package/docs/ts-web-extras.ifilelisttreeinitializer.md +58 -0
  78. package/docs/ts-web-extras.ifilemetadata.lastmodified.md +11 -0
  79. package/docs/ts-web-extras.ifilemetadata.md +124 -0
  80. package/docs/ts-web-extras.ifilemetadata.name.md +11 -0
  81. package/docs/ts-web-extras.ifilemetadata.path.md +11 -0
  82. package/docs/ts-web-extras.ifilemetadata.size.md +11 -0
  83. package/docs/ts-web-extras.ifilemetadata.type.md +11 -0
  84. package/docs/ts-web-extras.ifsaccessapis.md +56 -0
  85. package/docs/ts-web-extras.ifsaccessapis.showdirectorypicker.md +52 -0
  86. package/docs/ts-web-extras.ifsaccessapis.showopenfilepicker.md +52 -0
  87. package/docs/ts-web-extras.ifsaccessapis.showsavefilepicker.md +52 -0
  88. package/docs/ts-web-extras.isdirectoryhandle.md +56 -0
  89. package/docs/ts-web-extras.isfilehandle.md +56 -0
  90. package/docs/ts-web-extras.isfilepath.md +52 -0
  91. package/docs/ts-web-extras.iurlconfigoptions.config.md +13 -0
  92. package/docs/ts-web-extras.iurlconfigoptions.configstartdir.md +13 -0
  93. package/docs/ts-web-extras.iurlconfigoptions.contextfilter.md +13 -0
  94. package/docs/ts-web-extras.iurlconfigoptions.input.md +13 -0
  95. package/docs/ts-web-extras.iurlconfigoptions.inputstartdir.md +13 -0
  96. package/docs/ts-web-extras.iurlconfigoptions.interactive.md +13 -0
  97. package/docs/ts-web-extras.iurlconfigoptions.loadzip.md +13 -0
  98. package/docs/ts-web-extras.iurlconfigoptions.maxdistance.md +13 -0
  99. package/docs/ts-web-extras.iurlconfigoptions.md +286 -0
  100. package/docs/ts-web-extras.iurlconfigoptions.qualifierdefaults.md +13 -0
  101. package/docs/ts-web-extras.iurlconfigoptions.reducequalifiers.md +13 -0
  102. package/docs/ts-web-extras.iurlconfigoptions.resourcetypes.md +13 -0
  103. package/docs/ts-web-extras.iurlconfigoptions.zipfile.md +13 -0
  104. package/docs/ts-web-extras.iurlconfigoptions.zippath.md +13 -0
  105. package/docs/ts-web-extras.md +512 -0
  106. package/docs/ts-web-extras.parsecontextfilter.md +52 -0
  107. package/docs/ts-web-extras.parsequalifierdefaults.md +52 -0
  108. package/docs/ts-web-extras.parseresourcetypes.md +52 -0
  109. package/docs/ts-web-extras.parseurlparameters.md +17 -0
  110. package/docs/ts-web-extras.safeshowdirectorypicker.md +72 -0
  111. package/docs/ts-web-extras.safeshowopenfilepicker.md +72 -0
  112. package/docs/ts-web-extras.safeshowsavefilepicker.md +72 -0
  113. package/docs/ts-web-extras.showdirectorypickeroptions.id.md +11 -0
  114. package/docs/ts-web-extras.showdirectorypickeroptions.md +96 -0
  115. package/docs/ts-web-extras.showdirectorypickeroptions.mode.md +11 -0
  116. package/docs/ts-web-extras.showdirectorypickeroptions.startin.md +11 -0
  117. package/docs/ts-web-extras.showopenfilepickeroptions.excludeacceptalloption.md +11 -0
  118. package/docs/ts-web-extras.showopenfilepickeroptions.id.md +11 -0
  119. package/docs/ts-web-extras.showopenfilepickeroptions.md +134 -0
  120. package/docs/ts-web-extras.showopenfilepickeroptions.multiple.md +11 -0
  121. package/docs/ts-web-extras.showopenfilepickeroptions.startin.md +11 -0
  122. package/docs/ts-web-extras.showopenfilepickeroptions.types.md +11 -0
  123. package/docs/ts-web-extras.showsavefilepickeroptions.excludeacceptalloption.md +11 -0
  124. package/docs/ts-web-extras.showsavefilepickeroptions.id.md +11 -0
  125. package/docs/ts-web-extras.showsavefilepickeroptions.md +134 -0
  126. package/docs/ts-web-extras.showsavefilepickeroptions.startin.md +11 -0
  127. package/docs/ts-web-extras.showsavefilepickeroptions.suggestedname.md +11 -0
  128. package/docs/ts-web-extras.showsavefilepickeroptions.types.md +11 -0
  129. package/docs/ts-web-extras.supportsfilesystemaccess.md +56 -0
  130. package/docs/ts-web-extras.treeinitializer.md +15 -0
  131. package/docs/ts-web-extras.wellknowndirectory.md +13 -0
  132. package/docs/ts-web-extras.windowwithfsaccess.md +15 -0
  133. package/etc/ts-web-extras.api.md +310 -0
  134. package/lib/index.d.ts +16 -0
  135. package/lib/index.d.ts.map +1 -0
  136. package/lib/index.js +58 -0
  137. package/lib/index.js.map +1 -0
  138. package/lib/packlets/crypto/browserHashProvider.d.ts +24 -0
  139. package/lib/packlets/crypto/browserHashProvider.d.ts.map +1 -0
  140. package/lib/packlets/crypto/browserHashProvider.js +70 -0
  141. package/lib/packlets/crypto/browserHashProvider.js.map +1 -0
  142. package/lib/packlets/crypto/index.d.ts +6 -0
  143. package/lib/packlets/crypto/index.d.ts.map +1 -0
  144. package/lib/packlets/crypto/index.js +43 -0
  145. package/lib/packlets/crypto/index.js.map +1 -0
  146. package/lib/packlets/file-api-types/index.d.ts +205 -0
  147. package/lib/packlets/file-api-types/index.d.ts.map +1 -0
  148. package/lib/packlets/file-api-types/index.js +166 -0
  149. package/lib/packlets/file-api-types/index.js.map +1 -0
  150. package/lib/packlets/file-tree/fileApiTreeAccessors.d.ts +129 -0
  151. package/lib/packlets/file-tree/fileApiTreeAccessors.d.ts.map +1 -0
  152. package/lib/packlets/file-tree/fileApiTreeAccessors.js +334 -0
  153. package/lib/packlets/file-tree/fileApiTreeAccessors.js.map +1 -0
  154. package/lib/packlets/file-tree/index.d.ts +6 -0
  155. package/lib/packlets/file-tree/index.d.ts.map +1 -0
  156. package/lib/packlets/file-tree/index.js +43 -0
  157. package/lib/packlets/file-tree/index.js.map +1 -0
  158. package/lib/packlets/helpers/fileTreeHelpers.d.ts +60 -0
  159. package/lib/packlets/helpers/fileTreeHelpers.d.ts.map +1 -0
  160. package/lib/packlets/helpers/fileTreeHelpers.js +102 -0
  161. package/lib/packlets/helpers/fileTreeHelpers.js.map +1 -0
  162. package/lib/packlets/helpers/index.d.ts +6 -0
  163. package/lib/packlets/helpers/index.d.ts.map +1 -0
  164. package/lib/packlets/helpers/index.js +63 -0
  165. package/lib/packlets/helpers/index.js.map +1 -0
  166. package/lib/packlets/url-utils/index.d.ts +6 -0
  167. package/lib/packlets/url-utils/index.d.ts.map +1 -0
  168. package/lib/packlets/url-utils/index.js +43 -0
  169. package/lib/packlets/url-utils/index.js.map +1 -0
  170. package/lib/packlets/url-utils/urlParams.d.ts +94 -0
  171. package/lib/packlets/url-utils/urlParams.d.ts.map +1 -0
  172. package/lib/packlets/url-utils/urlParams.js +165 -0
  173. package/lib/packlets/url-utils/urlParams.js.map +1 -0
  174. package/lib/test/setupTests.d.ts +2 -0
  175. package/lib/test/setupTests.d.ts.map +1 -0
  176. package/lib/test/setupTests.js +76 -0
  177. package/lib/test/setupTests.js.map +1 -0
  178. package/lib/test/unit/browserHashProvider.test.d.ts +2 -0
  179. package/lib/test/unit/browserHashProvider.test.d.ts.map +1 -0
  180. package/lib/test/unit/browserHashProvider.test.js +142 -0
  181. package/lib/test/unit/browserHashProvider.test.js.map +1 -0
  182. package/lib/test/unit/fileApiTreeAccessors.test.d.ts +2 -0
  183. package/lib/test/unit/fileApiTreeAccessors.test.d.ts.map +1 -0
  184. package/lib/test/unit/fileApiTreeAccessors.test.js +1139 -0
  185. package/lib/test/unit/fileApiTreeAccessors.test.js.map +1 -0
  186. package/lib/test/unit/fileApiTypes.test.d.ts +2 -0
  187. package/lib/test/unit/fileApiTypes.test.d.ts.map +1 -0
  188. package/lib/test/unit/fileApiTypes.test.js +444 -0
  189. package/lib/test/unit/fileApiTypes.test.js.map +1 -0
  190. package/lib/test/unit/fileTreeHelpers.test.d.ts +2 -0
  191. package/lib/test/unit/fileTreeHelpers.test.d.ts.map +1 -0
  192. package/lib/test/unit/fileTreeHelpers.test.js +592 -0
  193. package/lib/test/unit/fileTreeHelpers.test.js.map +1 -0
  194. package/lib/test/unit/urlParams.test.d.ts +2 -0
  195. package/lib/test/unit/urlParams.test.d.ts.map +1 -0
  196. package/lib/test/unit/urlParams.test.js +395 -0
  197. package/lib/test/unit/urlParams.test.js.map +1 -0
  198. package/lib/test/utils/testHelpers.d.ts +51 -0
  199. package/lib/test/utils/testHelpers.d.ts.map +1 -0
  200. package/lib/test/utils/testHelpers.js +133 -0
  201. package/lib/test/utils/testHelpers.js.map +1 -0
  202. package/package.json +68 -0
  203. package/rush-logs/ts-web-extras.build.cache.log +3 -0
  204. package/rush-logs/ts-web-extras.build.log +40 -0
  205. package/src/index.ts +47 -0
  206. package/src/packlets/crypto/browserHashProvider.ts +73 -0
  207. package/src/packlets/crypto/index.ts +28 -0
  208. package/src/packlets/file-api-types/index.ts +345 -0
  209. package/src/packlets/file-tree/fileApiTreeAccessors.ts +420 -0
  210. package/src/packlets/file-tree/index.ts +28 -0
  211. package/src/packlets/helpers/fileTreeHelpers.ts +107 -0
  212. package/src/packlets/helpers/index.ts +28 -0
  213. package/src/packlets/url-utils/index.ts +28 -0
  214. package/src/packlets/url-utils/urlParams.ts +245 -0
  215. package/src/test/setupTests.ts +87 -0
  216. package/src/test/unit/browserHashProvider.test.ts +155 -0
  217. package/src/test/unit/browserHashProvider.test.ts.bak +376 -0
  218. package/src/test/unit/fileApiTreeAccessors.test.ts +1318 -0
  219. package/src/test/unit/fileApiTypes.test.ts +551 -0
  220. package/src/test/unit/fileTreeHelpers.test.ts +694 -0
  221. package/src/test/unit/urlParams.test.ts +464 -0
  222. package/src/test/utils/testHelpers.ts +155 -0
  223. package/temp/build/typescript/ts_l9Fw4VUO.json +1 -0
  224. package/temp/coverage/base.css +224 -0
  225. package/temp/coverage/block-navigation.js +87 -0
  226. package/temp/coverage/crypto/browserHashProvider.ts.html +304 -0
  227. package/temp/coverage/crypto/index.html +116 -0
  228. package/temp/coverage/favicon.png +0 -0
  229. package/temp/coverage/file-tree/fileApiTreeAccessors.ts.html +1345 -0
  230. package/temp/coverage/file-tree/index.html +116 -0
  231. package/temp/coverage/helpers/fileTreeHelpers.ts.html +406 -0
  232. package/temp/coverage/helpers/index.html +116 -0
  233. package/temp/coverage/index.html +161 -0
  234. package/temp/coverage/lcov-report/base.css +224 -0
  235. package/temp/coverage/lcov-report/block-navigation.js +87 -0
  236. package/temp/coverage/lcov-report/crypto/browserHashProvider.ts.html +304 -0
  237. package/temp/coverage/lcov-report/crypto/index.html +116 -0
  238. package/temp/coverage/lcov-report/favicon.png +0 -0
  239. package/temp/coverage/lcov-report/file-tree/fileApiTreeAccessors.ts.html +1345 -0
  240. package/temp/coverage/lcov-report/file-tree/index.html +116 -0
  241. package/temp/coverage/lcov-report/helpers/fileTreeHelpers.ts.html +406 -0
  242. package/temp/coverage/lcov-report/helpers/index.html +116 -0
  243. package/temp/coverage/lcov-report/index.html +161 -0
  244. package/temp/coverage/lcov-report/prettify.css +1 -0
  245. package/temp/coverage/lcov-report/prettify.js +2 -0
  246. package/temp/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  247. package/temp/coverage/lcov-report/sorter.js +210 -0
  248. package/temp/coverage/lcov-report/url-utils/index.html +116 -0
  249. package/temp/coverage/lcov-report/url-utils/urlParams.ts.html +820 -0
  250. package/temp/coverage/lcov.info +1096 -0
  251. package/temp/coverage/prettify.css +1 -0
  252. package/temp/coverage/prettify.js +2 -0
  253. package/temp/coverage/sort-arrow-sprite.png +0 -0
  254. package/temp/coverage/sorter.js +210 -0
  255. package/temp/coverage/url-utils/index.html +116 -0
  256. package/temp/coverage/url-utils/urlParams.ts.html +820 -0
  257. package/temp/test/jest/haste-map-7492f1b44480e0cdd1f220078fb3afd8-c8dd6c3430605adeb2f1cadf4f75e791-8c9336785555d572065b28c111982ba4 +0 -0
  258. package/temp/test/jest/jest-transform-cache-7492f1b44480e0cdd1f220078fb3afd8-79ef2876fae7ca75eedb2aa53dc48338/63/package_63a8257b0e4d0e7ff33f927d75f27a75 +53 -0
  259. package/temp/test/jest/perf-cache-7492f1b44480e0cdd1f220078fb3afd8-da39a3ee5e6b4b0d3255bfef95601890 +1 -0
  260. package/temp/ts-web-extras.api.json +5040 -0
  261. package/temp/ts-web-extras.api.md +310 -0
  262. package/tsconfig.json +7 -0
@@ -0,0 +1,420 @@
1
+ /*
2
+ * Copyright (c) 2025 Erik Fortune
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+ // File System Access API types are imported via the file-api-types module
24
+ import { Result, succeed, fail } from '@fgv/ts-utils';
25
+ import { FileTree } from '@fgv/ts-json-base';
26
+ import {
27
+ isFileHandle,
28
+ isDirectoryHandle,
29
+ FileSystemFileHandle,
30
+ FileSystemDirectoryHandle
31
+ } from '../file-api-types';
32
+
33
+ /**
34
+ * Interface for File objects that may have the webkitRelativePath property.
35
+ * This property is added by browsers when using directory upload (webkitdirectory).
36
+ * @internal
37
+ */
38
+ interface IFileWithWebkitPath {
39
+ readonly webkitRelativePath?: string;
40
+ }
41
+
42
+ /**
43
+ * Helper function to safely get webkitRelativePath from a File object.
44
+ * @internal
45
+ */
46
+ function getFileRelativePath(file: File): string {
47
+ return (file as unknown as IFileWithWebkitPath).webkitRelativePath || file.name;
48
+ }
49
+
50
+ /**
51
+ * Tree initializer for FileList objects (from File API).
52
+ * @public
53
+ */
54
+ export interface IFileListTreeInitializer {
55
+ readonly fileList: FileList;
56
+ }
57
+
58
+ /**
59
+ * Tree initializer for File System Access API file handles.
60
+ * @public
61
+ */
62
+ export interface IFileHandleTreeInitializer {
63
+ readonly prefix?: string;
64
+ readonly fileHandles: FileSystemFileHandle[];
65
+ }
66
+
67
+ /**
68
+ * Tree initializer for File System Access API directory handles.
69
+ * @public
70
+ */
71
+ export interface IDirectoryHandleTreeInitializer {
72
+ readonly prefix?: string;
73
+ readonly dirHandles: FileSystemDirectoryHandle[];
74
+ readonly nonRecursive?: boolean; // Default: false (recursive by default)
75
+ }
76
+
77
+ /**
78
+ * Union type for all supported tree initializers.
79
+ * @public
80
+ */
81
+ export type TreeInitializer =
82
+ | IFileListTreeInitializer
83
+ | IFileHandleTreeInitializer
84
+ | IDirectoryHandleTreeInitializer;
85
+
86
+ /**
87
+ * Interface for file metadata.
88
+ * @public
89
+ */
90
+ export interface IFileMetadata {
91
+ path: string;
92
+ name: string;
93
+ size: number;
94
+ type: string;
95
+ lastModified: number;
96
+ }
97
+
98
+ /**
99
+ * Helper class to create FileTree instances from various file sources.
100
+ * Supports File API (FileList) and File System Access API handles.
101
+ * @public
102
+ */
103
+ export class FileApiTreeAccessors<TCT extends string = string> {
104
+ /**
105
+ * Create FileTree from various file sources using TreeInitializer array.
106
+ * @param initializers - Array of TreeInitializer objects specifying file sources
107
+ * @param params - Optional `IFileTreeInitParams` for the file tree.
108
+ * @returns Promise resolving to a FileTree with all content pre-loaded
109
+ */
110
+ public static async create<TCT extends string = string>(
111
+ initializers: TreeInitializer[],
112
+ params?: FileTree.IFileTreeInitParams<TCT>
113
+ ): Promise<Result<FileTree.FileTree<TCT>>> {
114
+ try {
115
+ const allFiles: FileTree.IInMemoryFile<TCT>[] = [];
116
+
117
+ for (const initializer of initializers) {
118
+ const filesResult = await this._processInitializer<TCT>(initializer, params);
119
+ if (filesResult.isFailure()) {
120
+ return fail(filesResult.message);
121
+ }
122
+ allFiles.push(...filesResult.value);
123
+ }
124
+
125
+ return FileTree.inMemory<TCT>(allFiles, params);
126
+ /* c8 ignore next 5 - defense in depth */
127
+ } catch (error) {
128
+ const message = error instanceof Error ? error.message : String(error);
129
+ return fail(`Failed to process initializers: ${message}`);
130
+ }
131
+ }
132
+
133
+ /**
134
+ * Create FileTree from FileList (e.g., from input[type="file"]).
135
+ * @param fileList - FileList from a file input element
136
+ * @param params - Optional `IFileTreeInitParams` for the file tree.
137
+ * @returns Promise resolving to a FileTree with all content pre-loaded
138
+ */
139
+ public static async fromFileList<TCT extends string = string>(
140
+ fileList: FileList,
141
+ params?: FileTree.IFileTreeInitParams<TCT>
142
+ ): Promise<Result<FileTree.FileTree<TCT>>> {
143
+ const files: FileTree.IInMemoryFile<TCT>[] = [];
144
+
145
+ for (let i = 0; i < fileList.length; i++) {
146
+ const file = fileList[i];
147
+ const path = this._normalizePath(params?.prefix || '', file.name);
148
+
149
+ try {
150
+ const contents = await file.text();
151
+ const contentType = params?.inferContentType?.(path, file.type).orDefault();
152
+ files.push({
153
+ path,
154
+ contents,
155
+ contentType
156
+ });
157
+ } catch (error) {
158
+ /* c8 ignore next 1 - defense in depth */
159
+ const message = error instanceof Error ? error.message : String(error);
160
+ return fail(`Failed to read file ${file.name}: ${message}`);
161
+ }
162
+ }
163
+
164
+ return FileTree.inMemory<TCT>(files, params);
165
+ }
166
+
167
+ /**
168
+ * Create FileTree from directory upload with webkitRelativePath.
169
+ * @param fileList - FileList from a directory upload (input with webkitdirectory)
170
+ * @param params - Optional `IFileTreeInitParams` for the file tree.
171
+ * @returns Promise resolving to a FileTree with all content pre-loaded
172
+ */
173
+ public static async fromDirectoryUpload<TCT extends string = string>(
174
+ fileList: FileList,
175
+ params?: FileTree.IFileTreeInitParams<TCT>
176
+ ): Promise<Result<FileTree.FileTree<TCT>>> {
177
+ const files: FileTree.IInMemoryFile<TCT>[] = [];
178
+
179
+ for (let i = 0; i < fileList.length; i++) {
180
+ const file = fileList[i];
181
+ const relativePath = getFileRelativePath(file);
182
+ const path = this._normalizePath(params?.prefix || '', relativePath);
183
+
184
+ try {
185
+ const contents = await file.text();
186
+ const contentType = params?.inferContentType?.(path, file.type).orDefault();
187
+ files.push({
188
+ path,
189
+ contents,
190
+ contentType
191
+ });
192
+ } catch (error) {
193
+ /* c8 ignore next 1 - defense in depth */
194
+ const message = error instanceof Error ? error.message : String(error);
195
+ return fail(`Failed to read file ${relativePath}: ${message}`);
196
+ }
197
+ }
198
+
199
+ return FileTree.inMemory<TCT>(files, params);
200
+ }
201
+
202
+ /**
203
+ * Get the File object for a specific path from the original FileList.
204
+ * This is useful for accessing the original File API object for operations
205
+ * like getting file metadata, MIME type, etc.
206
+ * @param fileList - The original FileList
207
+ * @param targetPath - The path to find
208
+ * @returns Result containing the File object if found
209
+ */
210
+ public static getOriginalFile(fileList: FileList, targetPath: string): Result<File> {
211
+ for (const file of Array.from(fileList)) {
212
+ const filePath = getFileRelativePath(file);
213
+ if (filePath === targetPath) {
214
+ return succeed(file);
215
+ }
216
+ }
217
+ return fail(`File not found: ${targetPath}`);
218
+ }
219
+
220
+ /**
221
+ * Extract file metadata from a File.
222
+ * @param fileList - The File to extract metadata from
223
+ * @returns The {@link IFileMetadata | file metadata}
224
+ */
225
+ public static extractFileMetadata(file: File): IFileMetadata {
226
+ return {
227
+ path: getFileRelativePath(file),
228
+ name: file.name,
229
+ size: file.size,
230
+ type: file.type,
231
+ lastModified: file.lastModified
232
+ };
233
+ }
234
+
235
+ /**
236
+ * Process a single TreeInitializer and return the resulting files.
237
+ * @param initializer - The TreeInitializer to process
238
+ * @param params - Optional `IFileTreeInitParams` for the file tree.
239
+ * @returns Promise resolving to an array of `IInMemoryFile` objects
240
+ * @internal
241
+ */
242
+ private static async _processInitializer<TCT extends string = string>(
243
+ initializer: TreeInitializer,
244
+ params?: FileTree.IFileTreeInitParams<TCT>
245
+ ): Promise<Result<FileTree.IInMemoryFile<TCT>[]>> {
246
+ if ('fileList' in initializer) {
247
+ return this._processFileList<TCT>(initializer.fileList, params);
248
+ } else if ('fileHandles' in initializer) {
249
+ return this._processFileHandles<TCT>(initializer.fileHandles, params);
250
+ } else if ('dirHandles' in initializer) {
251
+ return this._processDirectoryHandles<TCT>(
252
+ initializer.dirHandles,
253
+ initializer.prefix ?? params?.prefix,
254
+ !initializer.nonRecursive,
255
+ params
256
+ );
257
+ } else {
258
+ return fail('Unknown initializer type');
259
+ }
260
+ }
261
+
262
+ /**
263
+ * Process a FileList and return IInMemoryFile array.
264
+ * @param fileList - The FileList to process
265
+ * @param params - Optional `IFileTreeInitParams` for the file tree.
266
+ * @returns Promise resolving to an array of `IInMemoryFile` objects
267
+ * @internal
268
+ */
269
+ private static async _processFileList<TCT extends string = string>(
270
+ fileList: FileList,
271
+ params?: FileTree.IFileTreeInitParams<TCT>
272
+ ): Promise<Result<FileTree.IInMemoryFile<TCT>[]>> {
273
+ const files: FileTree.IInMemoryFile<TCT>[] = [];
274
+
275
+ for (let i = 0; i < fileList.length; i++) {
276
+ const file = fileList[i];
277
+ const metadata = this.extractFileMetadata(file);
278
+ const relativePath = metadata.path;
279
+ const path = relativePath.startsWith('/') ? relativePath : `/${relativePath}`;
280
+
281
+ try {
282
+ const contents = await file.text();
283
+ const contentType = params?.inferContentType?.(path, metadata.type).orDefault();
284
+ files.push({
285
+ path,
286
+ contents,
287
+ contentType
288
+ });
289
+ } catch (error) {
290
+ /* c8 ignore next 1 - defense in depth */
291
+ const message = error instanceof Error ? error.message : String(error);
292
+ return fail(`Failed to read file ${relativePath}: ${message}`);
293
+ }
294
+ }
295
+
296
+ return succeed(files);
297
+ }
298
+
299
+ /**
300
+ * Process FileSystemFileHandles and return IInMemoryFile array.
301
+ * @internal
302
+ */
303
+ private static async _processFileHandles<TCT extends string = string>(
304
+ handles: FileSystemFileHandle[],
305
+ params?: FileTree.IFileTreeInitParams<TCT>
306
+ ): Promise<Result<FileTree.IInMemoryFile<TCT>[]>> {
307
+ const files: FileTree.IInMemoryFile<TCT>[] = [];
308
+
309
+ for (const handle of handles) {
310
+ try {
311
+ const file = await handle.getFile();
312
+ const contents = await file.text();
313
+ const metadata = this.extractFileMetadata(file);
314
+ /* c8 ignore next 1 - defense in depth */
315
+ const path = this._normalizePath(params?.prefix ?? '', handle.name);
316
+ const contentType = params?.inferContentType?.(path, metadata.type).orDefault();
317
+
318
+ files.push({
319
+ path,
320
+ contents,
321
+ contentType
322
+ });
323
+ } catch (error) {
324
+ /* c8 ignore next 1 - defense in depth */
325
+ const message = error instanceof Error ? error.message : String(error);
326
+ return fail(`Failed to read file handle ${handle.name}: ${message}`);
327
+ }
328
+ }
329
+
330
+ return succeed(files);
331
+ }
332
+
333
+ /**
334
+ * Process FileSystemDirectoryHandles and return IInMemoryFile array.
335
+ * @param handles - The FileSystemDirectoryHandle[] to process
336
+ * @param prefix - The prefix to use for the file paths
337
+ * @param recursive - Whether to process the directory recursively
338
+ * @param params - Optional `IFileTreeInitParams` for the file tree.
339
+ * @returns Promise resolving to an array of `IInMemoryFile` objects
340
+ * @internal
341
+ */
342
+ private static async _processDirectoryHandles<TCT extends string = string>(
343
+ handles: FileSystemDirectoryHandle[],
344
+ prefix?: string,
345
+ recursive: boolean = true,
346
+ params?: FileTree.IFileTreeInitParams<TCT>
347
+ ): Promise<Result<FileTree.IInMemoryFile<TCT>[]>> {
348
+ const allFiles: FileTree.IInMemoryFile<TCT>[] = [];
349
+ prefix = prefix ?? params?.prefix;
350
+
351
+ for (const handle of handles) {
352
+ const dirPrefix = this._normalizePath(prefix ?? '', handle.name);
353
+ const filesResult = await this._processDirectoryHandle<TCT>(handle, dirPrefix, recursive, params);
354
+ if (filesResult.isFailure()) {
355
+ return filesResult;
356
+ }
357
+ allFiles.push(...filesResult.value);
358
+ }
359
+
360
+ return succeed(allFiles);
361
+ }
362
+
363
+ /**
364
+ * Process a single FileSystemDirectoryHandle recursively.
365
+ * @param handle - The FileSystemDirectoryHandle to process
366
+ * @param basePath - The base path to use for the file paths
367
+ * @param recursive - Whether to process the directory recursively
368
+ * @param params - Optional `IFileTreeInitParams` for the file tree.
369
+ * @returns Promise resolving to an array of `IInMemoryFile` objects
370
+ * @internal
371
+ */
372
+ private static async _processDirectoryHandle<TCT extends string = string>(
373
+ handle: FileSystemDirectoryHandle,
374
+ basePath: string,
375
+ recursive: boolean,
376
+ params?: FileTree.IFileTreeInitParams<TCT>
377
+ ): Promise<Result<FileTree.IInMemoryFile<TCT>[]>> {
378
+ const files: FileTree.IInMemoryFile<TCT>[] = [];
379
+
380
+ try {
381
+ for await (const entry of handle.values()) {
382
+ if (isFileHandle(entry)) {
383
+ const file = await entry.getFile();
384
+ const contents = await file.text();
385
+ const path = this._normalizePath(basePath, entry.name);
386
+ const contentType = params?.inferContentType?.(path).orDefault();
387
+
388
+ files.push({
389
+ path,
390
+ contents,
391
+ contentType
392
+ });
393
+ } else if (isDirectoryHandle(entry) && recursive) {
394
+ const subDirPath = this._normalizePath(basePath, entry.name);
395
+ const subdirResult = await this._processDirectoryHandle<TCT>(entry, subDirPath, recursive, params);
396
+ if (subdirResult.isFailure()) {
397
+ return subdirResult;
398
+ }
399
+ files.push(...subdirResult.value);
400
+ }
401
+ }
402
+
403
+ return succeed(files);
404
+ } catch (error) {
405
+ /* c8 ignore next 1 - defense in depth */
406
+ const message = error instanceof Error ? error.message : String(error);
407
+ return fail(`Failed to process directory ${handle.name}: ${message}`);
408
+ }
409
+ }
410
+
411
+ private static _normalizePath(prefix: string, path: string): string {
412
+ // Remove leading slash from prefix if it exists to avoid double slashes
413
+ const cleanPrefix = prefix ? prefix.replace(/^\/+/, '') : '';
414
+ const combined = cleanPrefix ? `${cleanPrefix}/${path}` : path;
415
+ // Normalize multiple slashes and ensure it starts with / for FileTree compatibility
416
+ const normalized = combined.replace(/\/+/g, '/').replace(/\/$/, '');
417
+ /* c8 ignore next 1 - tested but coverage intermittently missed */
418
+ return normalized.startsWith('/') ? normalized : `/${normalized}`;
419
+ }
420
+ }
@@ -0,0 +1,28 @@
1
+ /*
2
+ * Copyright (c) 2025 Erik Fortune
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+ /**
24
+ * Browser-compatible FileTree implementations using the File API.
25
+ * @packageDocumentation
26
+ */
27
+
28
+ export * from './fileApiTreeAccessors';
@@ -0,0 +1,107 @@
1
+ /*
2
+ * Copyright (c) 2025 Erik Fortune
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+ import { Result } from '@fgv/ts-utils';
24
+ import { FileTree } from '@fgv/ts-json-base';
25
+ import { FileApiTreeAccessors, IFileMetadata } from '../file-tree/fileApiTreeAccessors';
26
+
27
+ /**
28
+ * Default initialization parameters for a `FileTree` using {@link FileApiTreeAccessors}.
29
+ * @public
30
+ */
31
+ export const defaultFileApiTreeInitParams: FileTree.IFileTreeInitParams<string> = {
32
+ inferContentType: FileTree.FileItem.defaultAcceptContentType
33
+ };
34
+
35
+ /**
36
+ * Helper function to create a new FileTree instance
37
+ * from a browser FileList (e.g., from input[type="file"]).
38
+ * @param fileList - FileList from a file input element
39
+ * @param params - Optional `IFileTreeInitParams` for the file tree.
40
+ * @returns Promise resolving to a successful Result with the new FileTree instance
41
+ * if successful, or a failed Result with an error message otherwise
42
+ * @remarks The content type of the files is always `string` and the default
43
+ * accept contentType function (`FileTree.FileItem.defaultAcceptContentType`) is
44
+ * used, so content type is derived from the mime type of the file, when
45
+ * available.
46
+ * @public
47
+ */
48
+ export function fromFileList(
49
+ fileList: FileList,
50
+ params?: FileTree.IFileTreeInitParams<string>
51
+ ): Promise<Result<FileTree.FileTree<string>>> {
52
+ params = { ...defaultFileApiTreeInitParams, ...(params ?? {}) };
53
+ return FileApiTreeAccessors.fromFileList(fileList, params);
54
+ }
55
+
56
+ /**
57
+ * Helper function to create a new FileTree instance
58
+ * from a directory upload with webkitRelativePath support.
59
+ * @param fileList - FileList from a directory upload (input with webkitdirectory)
60
+ * @param params - Optional `IFileTreeInitParams` for the file tree.
61
+ * @returns Promise resolving to a successful Result with the new FileTree instance
62
+ * if successful, or a failed Result with an error message otherwise
63
+ * @remarks The content type of the files is always `string` and the default
64
+ * accept contentType function (`FileTree.FileItem.defaultAcceptContentType`) is
65
+ * is used, so content type is derived from the mime type of the file, when
66
+ * available.
67
+ * @public
68
+ */
69
+ export function fromDirectoryUpload(
70
+ fileList: FileList,
71
+ params?: FileTree.IFileTreeInitParams<string>
72
+ ): Promise<Result<FileTree.FileTree<string>>> {
73
+ params = { ...defaultFileApiTreeInitParams, ...(params ?? {}) };
74
+ return FileApiTreeAccessors.fromDirectoryUpload(fileList, params);
75
+ }
76
+
77
+ /**
78
+ * Helper function to get the original File object from a FileList by path.
79
+ * @param fileList - The original FileList
80
+ * @param path - The path to the file
81
+ * @returns A successful Result with the File object if found,
82
+ * or a failed Result with an error message otherwise
83
+ * @public
84
+ */
85
+ export function getOriginalFile(fileList: FileList, path: string): Result<File> {
86
+ return FileApiTreeAccessors.getOriginalFile(fileList, path);
87
+ }
88
+
89
+ /**
90
+ * Helper function to extract metadata from a `FileList`.
91
+ * @param fileList - The `FileList` to extract metadata from
92
+ * @returns Array of {@link IFileMetadata | file metadata} objects
93
+ * @public
94
+ */
95
+ export function extractFileListMetadata(fileList: FileList): Array<IFileMetadata> {
96
+ return Array.from(fileList).map((f) => FileApiTreeAccessors.extractFileMetadata(f));
97
+ }
98
+
99
+ /**
100
+ * Helper function to extract metadata from a `File`.
101
+ * @param file - The File to extract metadata from
102
+ * @returns {@link IFileMetadata | file metadata} object
103
+ * @public
104
+ */
105
+ export function extractFileMetadata(file: File): IFileMetadata {
106
+ return FileApiTreeAccessors.extractFileMetadata(file);
107
+ }
@@ -0,0 +1,28 @@
1
+ /*
2
+ * Copyright (c) 2025 Erik Fortune
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+ /**
24
+ * Tree-shakeable helper functions for browser-compatible file operations.
25
+ * @packageDocumentation
26
+ */
27
+
28
+ export * as FileTreeHelpers from './fileTreeHelpers';
@@ -0,0 +1,28 @@
1
+ /*
2
+ * Copyright (c) 2025 Erik Fortune
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+ /**
24
+ * URL parameter parsing utilities for web applications.
25
+ * @packageDocumentation
26
+ */
27
+
28
+ export * from './urlParams';