@realsee/five 6.8.0-alpha.2 → 6.8.0-alpha.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 (715) hide show
  1. package/AGENTS_READ_ME.md +4 -0
  2. package/AI_CONTEXT.md +4 -0
  3. package/README.md +9 -6
  4. package/{guides → ai_guides}/README.md +12 -2
  5. package/ai_guides/ai-doc-guidelines.md +102 -0
  6. package/{guides → ai_guides}/api.md +24 -1
  7. package/ai_guides/features/3dtile.md +172 -0
  8. package/{guides → ai_guides}/features/camera-animation.md +24 -3
  9. package/{guides → ai_guides}/features/clipper.md +2 -0
  10. package/{guides/features/coordnate-system.md → ai_guides/features/coordinate-system.md} +2 -0
  11. package/{guides → ai_guides}/features/event.md +2 -0
  12. package/{guides → ai_guides}/features/five.md +4 -0
  13. package/ai_guides/features/flowing-light-2d-pass.md +438 -0
  14. package/ai_guides/features/flowing-light-3d-pass.md +420 -0
  15. package/ai_guides/features/gaussian-blur-pass.md +202 -0
  16. package/{guides → ai_guides}/features/gesture.md +3 -0
  17. package/{guides → ai_guides}/features/get-screen-pixels.md +2 -0
  18. package/{guides → ai_guides}/features/image-options.md +3 -0
  19. package/{guides → ai_guides}/features/load-external-model.md +21 -0
  20. package/ai_guides/features/load-progress.md +140 -0
  21. package/ai_guides/features/material.md +153 -0
  22. package/{guides → ai_guides}/features/mode.md +4 -0
  23. package/{guides → ai_guides}/features/model.md +4 -1
  24. package/{guides → ai_guides}/features/move-pano-effect.md +2 -0
  25. package/{guides → ai_guides}/features/multi-work.md +2 -0
  26. package/ai_guides/features/pano-filter.md +148 -0
  27. package/{guides → ai_guides}/features/pano-tile.md +7 -14
  28. package/ai_guides/features/pano-uv.md +131 -0
  29. package/ai_guides/features/parameter.md +153 -0
  30. package/ai_guides/features/plugin.md +210 -0
  31. package/{guides → ai_guides}/features/postprocessing.md +39 -4
  32. package/{guides → ai_guides}/features/raycast.md +11 -0
  33. package/{guides → ai_guides}/features/request-proxy.md +2 -0
  34. package/{guides → ai_guides}/features/screen-project.md +2 -0
  35. package/{guides → ai_guides}/features/state.md +2 -0
  36. package/ai_guides/features/view-layer.md +187 -0
  37. package/{guides → ai_guides}/features/work.md +63 -2
  38. package/{guides → ai_guides}/glossary.md +26 -5
  39. package/{guides → ai_guides}/intro.md +1 -1
  40. package/{guides → ai_guides}/quick-start.md +1 -0
  41. package/ai_guides/release_notes/6.8.md +208 -0
  42. package/{guides → ai_guides}/template.md +17 -3
  43. package/docs/00_FOR_AI_AGENTS.md +11 -0
  44. package/docs/README.md +4 -7
  45. package/docs/assets/hierarchy.js +1 -1
  46. package/docs/assets/navigation.js +1 -1
  47. package/docs/assets/search.js +1 -1
  48. package/docs/classes/five.AdaptiveLuminancePass.html +7 -6
  49. package/docs/classes/five.BoundingMesh.html +2 -2
  50. package/docs/classes/five.Camera.html +1 -1
  51. package/docs/classes/five.EyeDomeLightingPass.html +1 -1
  52. package/docs/classes/five.Five.html +73 -72
  53. package/docs/classes/five.FivePass.html +1 -1
  54. package/docs/classes/five.Histogram.html +19 -0
  55. package/docs/classes/five.InternalWebGLRenderer.html +1 -1
  56. package/docs/classes/five.Model.html +31 -31
  57. package/docs/classes/five.ModelScene.html +1 -1
  58. package/docs/classes/five.NetworkSubscribe.html +1 -1
  59. package/docs/classes/five.PBMContainer.html +1 -1
  60. package/docs/classes/five.PBMCustomShader.html +42 -3
  61. package/docs/classes/five.PBMGSObject.html +5 -3
  62. package/docs/classes/five.PBMGroup.html +1 -1
  63. package/docs/classes/five.PBMMesh.html +1 -1
  64. package/docs/classes/five.PBMMeshMaterial.html +16 -7
  65. package/docs/classes/five.PBMPanoFilter.html +61 -0
  66. package/docs/classes/five.PBMPointCloud.html +1 -1
  67. package/docs/classes/five.PBMPointCloudMaterial.html +5 -6
  68. package/docs/classes/five.PBMSkinnedMesh.html +1 -1
  69. package/docs/classes/five.PBMUpdateable.html +41 -0
  70. package/docs/classes/five.PanoCircleMesh.html +1 -1
  71. package/docs/classes/five.PanoCircleMeshCustom.html +1 -1
  72. package/docs/classes/five.PanoCircleMeshSolid.html +1 -1
  73. package/docs/classes/five.Parameter.html +57 -53
  74. package/docs/classes/five.Scene.html +1 -1
  75. package/docs/classes/five.Subscribe.html +1 -1
  76. package/docs/classes/five.Tile.html +1 -1
  77. package/docs/classes/five.Tile3D.html +30 -26
  78. package/docs/classes/five.TileNode.html +1 -1
  79. package/docs/classes/five.Trajectory.html +1 -1
  80. package/docs/classes/five.TrajectoryNode.html +1 -1
  81. package/docs/classes/five.Work.html +16 -16
  82. package/docs/classes/five.WorkResolvedObserver.html +27 -2
  83. package/docs/classes/gltf-loader.DDSLoader.html +1 -1
  84. package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
  85. package/docs/classes/gltf-loader.GLTFLoader.html +1 -1
  86. package/docs/classes/gltf-loader.GLTFObject.html +1 -1
  87. package/docs/classes/gltf-loader.GLTFParser.html +1 -1
  88. package/docs/classes/gltf-loader.THREEGLTFLoader.html +1 -1
  89. package/docs/classes/line.Line.html +1 -1
  90. package/docs/classes/line.LineGeometry.html +1 -1
  91. package/docs/classes/line.LineMaterial.html +1 -1
  92. package/docs/classes/line.LineSegmentsGeometry.html +1 -1
  93. package/docs/classes/line.THREE_Line2.html +1 -1
  94. package/docs/classes/line.THREE_LineSegments2.html +1 -1
  95. package/docs/classes/plugins.BasePlugin.Controller.html +1 -1
  96. package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
  97. package/docs/classes/sticker.Sticker.html +1 -1
  98. package/docs/classes/vfx.Airflow.html +1 -1
  99. package/docs/classes/vfx.Flame.html +1 -1
  100. package/docs/classes/vfx.Particle.html +1 -1
  101. package/docs/classes/vfx.ParticleGPU.html +1 -1
  102. package/docs/classes/vfx.SpotLight.html +1 -1
  103. package/docs/documents/README.html +11 -2
  104. package/docs/documents/ai-doc-guidelines.html +60 -15
  105. package/docs/documents/api.html +40 -15
  106. package/docs/documents/features_3dtile.html +142 -45
  107. package/docs/documents/features_camera-animation.html +62 -5
  108. package/docs/documents/features_clipper.html +3 -0
  109. package/docs/documents/{features_coordnate-system.html → features_coordinate-system.html} +4 -1
  110. package/docs/documents/features_event.html +3 -0
  111. package/docs/documents/features_five.html +4 -0
  112. package/docs/documents/features_flowing-light-2d-pass.html +356 -0
  113. package/docs/documents/features_flowing-light-3d-pass.html +351 -0
  114. package/docs/documents/features_gaussian-blur-pass.html +182 -0
  115. package/docs/documents/features_gesture.html +4 -0
  116. package/docs/documents/features_get-screen-pixels.html +3 -0
  117. package/docs/documents/features_image-options.html +3 -0
  118. package/docs/documents/features_load-external-model.html +25 -2
  119. package/docs/documents/features_load-progress.html +110 -0
  120. package/docs/documents/features_material.html +341 -0
  121. package/docs/documents/features_mode.html +5 -0
  122. package/docs/documents/features_model.html +5 -1
  123. package/docs/documents/features_move-pano-effect.html +3 -0
  124. package/docs/documents/features_multi-work.html +3 -0
  125. package/docs/documents/features_pano-filter.html +122 -0
  126. package/docs/documents/features_pano-tile.html +34 -19
  127. package/docs/documents/features_pano-uv.html +82 -0
  128. package/docs/documents/features_parameter.html +76 -56
  129. package/docs/documents/features_plugin.html +105 -0
  130. package/docs/documents/features_postprocessing.html +22 -5
  131. package/docs/documents/features_raycast.html +4 -1
  132. package/docs/documents/features_request-proxy.html +3 -0
  133. package/docs/documents/features_screen-project.html +3 -0
  134. package/docs/documents/features_state.html +3 -0
  135. package/docs/documents/features_view-layer.html +158 -0
  136. package/docs/documents/features_work.html +63 -2
  137. package/docs/documents/glossary.html +31 -6
  138. package/docs/documents/intro.html +1 -1
  139. package/docs/documents/quick-start.html +1 -0
  140. package/docs/documents/release_notes_6.8.html +189 -0
  141. package/docs/documents/template.html +45 -4
  142. package/docs/functions/five.loadAt3d.html +1 -1
  143. package/docs/functions/five.loadB3dm.html +1 -1
  144. package/docs/functions/five.loadDome.html +1 -1
  145. package/docs/functions/five.loadDomez.html +1 -1
  146. package/docs/functions/five.loadFbx.html +1 -1
  147. package/docs/functions/five.loadGltf.html +1 -1
  148. package/docs/functions/five.loadPbm.html +1 -1
  149. package/docs/functions/five.loadPly.html +1 -1
  150. package/docs/functions/five.loadPnts.html +1 -1
  151. package/docs/functions/five.loadSplat.html +1 -1
  152. package/docs/functions/five.loadSpz.html +1 -1
  153. package/docs/functions/five.loadX3p.html +1 -1
  154. package/docs/functions/five.parseWork.html +1 -1
  155. package/docs/functions/vue.useFiveWorks.html +2 -2
  156. package/docs/hierarchy.html +1 -1
  157. package/docs/index.html +11 -2
  158. package/docs/interfaces/five.AddableObject.html +1 -1
  159. package/docs/interfaces/five.AjaxOptions.html +1 -1
  160. package/docs/interfaces/five.BaseEvent.html +2 -2
  161. package/docs/interfaces/five.EventCallback.html +53 -47
  162. package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +9 -9
  163. package/docs/interfaces/five.GestureEvent.html +2 -2
  164. package/docs/interfaces/five.ImageOptions.html +1 -1
  165. package/docs/interfaces/five.IntersectEvent.html +2 -2
  166. package/docs/interfaces/five.IntersectMesh.html +1 -1
  167. package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
  168. package/docs/interfaces/five.Intersection.html +4 -3
  169. package/docs/interfaces/five.LooseWorkWithExtrinsics.html +6 -6
  170. package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +9 -9
  171. package/docs/interfaces/five.ModeChangeEvent.html +2 -2
  172. package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
  173. package/docs/interfaces/five.ModelEvent.html +2 -2
  174. package/docs/interfaces/five.ModelSceneEvent.html +2 -2
  175. package/docs/interfaces/five.ModelTileEvent.html +8 -0
  176. package/docs/interfaces/five.MovePanoOptions.html +7 -7
  177. package/docs/interfaces/five.NetworkAbortError.html +1 -1
  178. package/docs/interfaces/five.NetworkFirbiddenError.html +1 -1
  179. package/docs/interfaces/five.NetworkOptions.html +1 -1
  180. package/docs/interfaces/five.NetworkProxyError.html +1 -1
  181. package/docs/interfaces/five.NetworkResourceEvent.html +2 -2
  182. package/docs/interfaces/five.NetworkResponseError.html +1 -1
  183. package/docs/interfaces/five.NetworkTimeoutError.html +1 -1
  184. package/docs/interfaces/five.ObjectEvent.html +2 -2
  185. package/docs/interfaces/five.PBMClipperParameter.html +2 -2
  186. package/docs/interfaces/five.PBMCustomShaderInitArgs.html +2 -2
  187. package/docs/interfaces/five.PBMCustomShaderSlots.html +2 -2
  188. package/docs/interfaces/five.PBMMaterial.html +1 -1
  189. package/docs/interfaces/five.PBMMeshMaterialParameters.html +5 -3
  190. package/docs/interfaces/five.PBMPanoDepth.html +5 -5
  191. package/docs/interfaces/five.PBMPanoFilterValue.html +6 -0
  192. package/docs/interfaces/five.PBMPanoPicture.html +8 -6
  193. package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +2 -3
  194. package/docs/interfaces/five.PBMRefinedScreen.html +2 -2
  195. package/docs/interfaces/five.PanoCircleMeshInterface.html +1 -1
  196. package/docs/interfaces/five.PanoEvent.html +2 -2
  197. package/docs/interfaces/five.PanoTextureEvent.html +2 -2
  198. package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
  199. package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
  200. package/docs/interfaces/five.ParameterMaterialValue.html +42 -38
  201. package/docs/interfaces/five.ParameterTilesetValue.html +15 -15
  202. package/docs/interfaces/five.ParameterValue.html +56 -52
  203. package/docs/interfaces/five.Pose.html +1 -1
  204. package/docs/interfaces/five.RenderEvent.html +2 -2
  205. package/docs/interfaces/five.ResolvedParameterValue.html +56 -52
  206. package/docs/interfaces/five.RgbaData.html +7 -0
  207. package/docs/interfaces/five.SplatData.html +2 -2
  208. package/docs/interfaces/five.State.html +1 -1
  209. package/docs/interfaces/five.StateEvent.html +2 -2
  210. package/docs/interfaces/five.TextureOptions.html +1 -1
  211. package/docs/interfaces/five.Tile3DOptions.html +2 -2
  212. package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +7 -7
  213. package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +1 -1
  214. package/docs/interfaces/five.ViewLayer.html +30 -26
  215. package/docs/interfaces/five.WorkCubeImage.html +1 -1
  216. package/docs/interfaces/five.WorkImage.html +1 -1
  217. package/docs/interfaces/five.WorkModel.html +8 -8
  218. package/docs/interfaces/five.WorkModelLayer.html +6 -6
  219. package/docs/interfaces/five.WorkObserver.html +27 -2
  220. package/docs/interfaces/five.WorkTile.html +1 -1
  221. package/docs/interfaces/five.WorksEvent.html +2 -2
  222. package/docs/interfaces/five.XRControllerEvent.html +2 -2
  223. package/docs/interfaces/five.XRGestureEvent.html +2 -2
  224. package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +1 -1
  225. package/docs/interfaces/five.XRSessionEvent.html +2 -2
  226. package/docs/interfaces/plugins.BackgroundPluginController.html +1 -1
  227. package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +1 -1
  228. package/docs/interfaces/plugins.BasePlugin.State.html +1 -1
  229. package/docs/interfaces/plugins.DynamicPathLinePluginController.html +1 -1
  230. package/docs/interfaces/plugins.DynamicPathLinePluginType.EventMap.html +1 -1
  231. package/docs/interfaces/plugins.DynamicPathLinePluginType.State.html +1 -1
  232. package/docs/interfaces/plugins.ItemMaskController.html +1 -1
  233. package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
  234. package/docs/interfaces/plugins.ItemMaskPluginType.State.html +1 -1
  235. package/docs/interfaces/plugins.OrientationPluginController.html +1 -1
  236. package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
  237. package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
  238. package/docs/interfaces/plugins.PanoAnimeController.html +1 -1
  239. package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +1 -1
  240. package/docs/interfaces/plugins.PanoAnimePluginType.State.html +1 -1
  241. package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
  242. package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
  243. package/docs/interfaces/plugins.TrajectoryController.html +1 -1
  244. package/docs/interfaces/react.FiveInjectionTypes.html +13 -13
  245. package/docs/modules/five.html +1 -1
  246. package/docs/modules.html +1 -1
  247. package/docs/types/five.ControllerEventTypes.html +27 -25
  248. package/docs/types/five.EasingFunction.html +1 -0
  249. package/docs/types/five.EventTypes.html +27 -25
  250. package/docs/types/five.FivePlugin.html +1 -1
  251. package/docs/types/five.FivePluginInit.html +1 -1
  252. package/docs/types/five.FivePluginInstance.html +1 -1
  253. package/docs/types/five.NetworkProgressCallback.html +1 -1
  254. package/docs/types/five.PBMAlphaMode.html +1 -1
  255. package/docs/types/five.PBMColorStyle.html +1 -1
  256. package/docs/types/five.PBMFloorStyle.html +1 -1
  257. package/docs/types/five.PBMMeshShaderType.html +1 -1
  258. package/docs/types/five.PBMPointBack.html +1 -1
  259. package/docs/types/five.PBMPointCloudShaderType.html +1 -1
  260. package/docs/types/five.PBMPointShape.html +1 -1
  261. package/docs/types/five.PBMPointSize.html +1 -1
  262. package/docs/types/five.PBMTransition.html +1 -1
  263. package/docs/types/five.ParseOptions.html +6 -6
  264. package/docs/types/plugins.BasePlugin.EventMap.html +1 -1
  265. package/docs/variables/five.PROXY_CONTROLLER_EVENT_NAMES.html +1 -1
  266. package/five/application/analysis.d.ts +40 -0
  267. package/five/application/controllers.d.ts +41 -0
  268. package/five/application/events-legacy.d.ts +454 -0
  269. package/five/application/events.d.ts +69 -0
  270. package/five/application/five.d.ts +519 -0
  271. package/five/application/fiveInitArgs.d.ts +176 -0
  272. package/five/application/fiveLoadOptions.d.ts +21 -0
  273. package/five/application/generateDefaultVideoElement.d.ts +2 -0
  274. package/five/application/getViewportScale.d.ts +2 -0
  275. package/five/application/initLights.d.ts +3 -0
  276. package/five/application/mode.d.ts +28 -0
  277. package/five/application/renderPoweredByRealsee.d.ts +3 -0
  278. package/five/assets/cardboard-png-data-url.d.ts +2 -0
  279. package/five/assets/gradient-png-data-url.d.ts +2 -0
  280. package/five/assets/loading-png-data-url.d.ts +2 -0
  281. package/five/assets/phone-png-data-url.d.ts +2 -0
  282. package/five/assets/realsee-png-data-url.d.ts +2 -0
  283. package/five/bvh/bvhMath.d.ts +33 -0
  284. package/five/bvh/bvhMesh.d.ts +7 -0
  285. package/five/bvh/bvhNode.d.ts +29 -0
  286. package/five/bvh/bvhObject.d.ts +18 -0
  287. package/five/bvh/bvhPoints.d.ts +6 -0
  288. package/five/bvh/index.d.ts +10 -0
  289. package/five/bvh/worker.d.ts +35 -0
  290. package/five/cardboard/helper.d.ts +2 -0
  291. package/five/cardboard/index.d.ts +13 -0
  292. package/five/cardboard/sensor.d.ts +158 -0
  293. package/five/certificates/hardware.d.ts +1 -0
  294. package/five/controllers/base.d.ts +167 -0
  295. package/five/controllers/events.d.ts +71 -0
  296. package/five/controllers/floorplan.d.ts +119 -0
  297. package/five/controllers/mapview.d.ts +139 -0
  298. package/five/controllers/model.d.ts +57 -0
  299. package/five/controllers/panorama.d.ts +143 -0
  300. package/five/controllers/panoramaLike.d.ts +87 -0
  301. package/five/controllers/topview.d.ts +42 -0
  302. package/five/controllers/vrPanorama.d.ts +56 -0
  303. package/five/controllers/xrPanorama.d.ts +81 -0
  304. package/five/core/camera.d.ts +65 -0
  305. package/five/core/internalWebGLRenderer.d.ts +14 -0
  306. package/five/core/panoVideo.d.ts +18 -0
  307. package/five/core/scene.d.ts +10 -0
  308. package/five/core/tiling.d.ts +43 -0
  309. package/five/declare.d.ts +2 -1
  310. package/five/gaussian-splatting/util/renderData.d.ts +52 -0
  311. package/five/gaussian-splatting/wasm/data.d.ts +20 -0
  312. package/five/gaussian-splatting/wasm/sort.d.ts +18 -0
  313. package/five/gaussian-splatting/worker/dataWorker.d.ts +1 -0
  314. package/five/gaussian-splatting/worker/sortWorker.d.ts +1 -0
  315. package/five/index.d.ts +60 -4637
  316. package/five/index.js +193 -341
  317. package/five/index.mjs +26455 -31011
  318. package/five/meshes/boundingMesh.d.ts +12 -0
  319. package/five/meshes/intersectMesh.d.ts +8 -0
  320. package/five/meshes/panoCircleMesh.d.ts +35 -0
  321. package/five/meshes/panoCircleMeshCustom.d.ts +40 -0
  322. package/five/meshes/panoCircleMeshSolid.d.ts +34 -0
  323. package/five/meshes/panoSphereMesh.d.ts +27 -0
  324. package/five/model/helpers/coordinate-transform.d.ts +3 -0
  325. package/five/model/helpers/ellipsoid-coordinates.d.ts +14 -0
  326. package/five/model/helpers/get-edges-by-sphere.d.ts +8 -0
  327. package/five/model/helpers/get-recommend-tile3d-parameters.d.ts +8 -0
  328. package/five/model/index.d.ts +70 -0
  329. package/five/model/intersection.d.ts +18 -0
  330. package/five/model/loaders/at3d.d.ts +12 -0
  331. package/five/model/loaders/b3dm.d.ts +9 -0
  332. package/five/model/loaders/dome.d.ts +22 -0
  333. package/five/model/loaders/domez.d.ts +11 -0
  334. package/five/model/loaders/fbx.d.ts +8 -0
  335. package/five/model/loaders/glTF-helpers/extensions/CESIUM_RTC.d.ts +9 -0
  336. package/five/model/loaders/glTF-helpers/extensions/EXT_meshopt_compression.d.ts +8 -0
  337. package/five/model/loaders/glTF-helpers/extensions/EXT_texture_webp.d.ts +11 -0
  338. package/five/model/loaders/glTF-helpers/extensions/KHR_animation_pointer.d.ts +6 -0
  339. package/five/model/loaders/glTF-helpers/extensions/KHR_binary_glTF.d.ts +25 -0
  340. package/five/model/loaders/glTF-helpers/extensions/KHR_draco_mesh_compression.d.ts +11 -0
  341. package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz.d.ts +9 -0
  342. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_clearcoat.d.ts +10 -0
  343. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_emissive_strength.d.ts +10 -0
  344. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_sheen.d.ts +10 -0
  345. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_transmission.d.ts +10 -0
  346. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_unlit.d.ts +10 -0
  347. package/five/model/loaders/glTF-helpers/extensions/KHR_mesh_quantization.d.ts +6 -0
  348. package/five/model/loaders/glTF-helpers/extensions/KHR_node_visibility.d.ts +10 -0
  349. package/five/model/loaders/glTF-helpers/extensions/KHR_texture_basisu.d.ts +9 -0
  350. package/five/model/loaders/glTF-helpers/extensions/KHR_texture_transform.d.ts +10 -0
  351. package/five/model/loaders/glTF-helpers/extensions/REALSEE_materials_lightmap.d.ts +7 -0
  352. package/five/model/loaders/glTF-helpers/extensions/base.d.ts +24 -0
  353. package/five/model/loaders/glTF-helpers/glTF.d.ts +713 -0
  354. package/five/model/loaders/glTF-helpers/index.d.ts +47 -0
  355. package/five/model/loaders/glTF-helpers/parser.d.ts +114 -0
  356. package/five/model/loaders/glTF-helpers/type.d.ts +14 -0
  357. package/five/model/loaders/gltf.d.ts +10 -0
  358. package/five/model/loaders/obj.d.ts +9 -0
  359. package/five/model/loaders/pbm.d.ts +26 -0
  360. package/five/model/loaders/ply.d.ts +24 -0
  361. package/five/model/loaders/pnts.d.ts +8 -0
  362. package/five/model/loaders/protobuf/dome.d.ts +540 -0
  363. package/five/model/loaders/protobuf/pbm.d.ts +203 -0
  364. package/five/model/loaders/shared.d.ts +16 -0
  365. package/five/model/loaders/splat.d.ts +8 -0
  366. package/five/model/loaders/spz.d.ts +14 -0
  367. package/five/model/loaders/tile3d-helpers/feature-table.d.ts +15 -0
  368. package/five/model/loaders/tile3d-helpers/gl-type.d.ts +20 -0
  369. package/five/model/loaders/tile3d-helpers/parse-gltf-array-buffer.d.ts +2 -0
  370. package/five/model/loaders/tile3d-helpers/parse-header.d.ts +2 -0
  371. package/five/model/loaders/tile3d-helpers/parse-point-cloud-attributes.d.ts +2 -0
  372. package/five/model/loaders/tile3d-helpers/parse-point-cloud-attributes.worker.d.ts +6 -0
  373. package/five/model/loaders/tile3d-helpers/parse-table.d.ts +3 -0
  374. package/five/model/loaders/tile3d-helpers/tile3d-type.d.ts +35 -0
  375. package/five/model/loaders/x3p.d.ts +22 -0
  376. package/five/model/materials/pbmMaterial.d.ts +137 -0
  377. package/five/model/materials/pbmMeshMaterial.d.ts +126 -0
  378. package/five/model/materials/pbmPointCloudMaterial.d.ts +70 -0
  379. package/five/model/model-scene.d.ts +172 -0
  380. package/five/model/model.d.ts +209 -0
  381. package/five/model/objects/pbmContainer.d.ts +28 -0
  382. package/five/model/objects/pbmGaussianSplattingObject.d.ts +43 -0
  383. package/five/model/objects/pbmGaussianSplattingRenderMesh.d.ts +55 -0
  384. package/five/model/objects/pbmGaussianSplattingTestMesh.d.ts +7 -0
  385. package/five/model/objects/pbmGroup.d.ts +8 -0
  386. package/five/model/objects/pbmMesh.d.ts +10 -0
  387. package/five/model/objects/pbmPointCloud.d.ts +7 -0
  388. package/five/model/parameter.d.ts +140 -0
  389. package/five/model/shaders/pbm_gaussian_splatting/fragment.d.ts +2 -0
  390. package/five/model/shaders/pbm_gaussian_splatting/vertex.d.ts +2 -0
  391. package/five/model/shaders/pbm_mesh_basic/fragment.d.ts +2 -0
  392. package/five/model/shaders/pbm_mesh_basic/vertex.d.ts +2 -0
  393. package/five/model/shaders/pbm_mesh_none/fragment.d.ts +2 -0
  394. package/five/model/shaders/pbm_mesh_none/vertex.d.ts +2 -0
  395. package/five/model/shaders/pbm_mesh_phong/fragment.d.ts +2 -0
  396. package/five/model/shaders/pbm_mesh_phong/vertex.d.ts +2 -0
  397. package/five/model/shaders/pbm_mesh_standard/fragment.d.ts +2 -0
  398. package/five/model/shaders/pbm_mesh_standard/vertex.d.ts +2 -0
  399. package/five/model/shaders/pbm_pointcloud/fragment.d.ts +2 -0
  400. package/five/model/shaders/pbm_pointcloud/vertex.d.ts +2 -0
  401. package/five/model/tile3d/header.d.ts +88 -0
  402. package/five/model/tile3d/index.d.ts +214 -0
  403. package/five/model/tile3d/tile-cache.d.ts +18 -0
  404. package/five/model/tile3d/tile-content.d.ts +10 -0
  405. package/five/model/tile3d/tile-node.d.ts +24 -0
  406. package/five/model/tile3d/tile-request-scheduler.d.ts +17 -0
  407. package/five/model/tile3d/tile.d.ts +79 -0
  408. package/five/model/tile3d/tileset-base-traverser.d.ts +59 -0
  409. package/five/model/tile3d/tileset-most-detail-traverser.d.ts +14 -0
  410. package/five/model/tile3d/tileset-normal-traverser.d.ts +15 -0
  411. package/five/model/tile3d/tileset-skip-traverser.d.ts +60 -0
  412. package/five/model/tile3d/tileset.d.ts +69 -0
  413. package/five/model/tile3d/trajectory-content.d.ts +9 -0
  414. package/five/model/tile3d/trajectory-node.d.ts +15 -0
  415. package/five/model/tile3d/trajectory.d.ts +30 -0
  416. package/five/model/tile3d/types.d.ts +33 -0
  417. package/five/model/view-layer.d.ts +20 -0
  418. package/five/renderer/five-renderer.d.ts +17 -0
  419. package/five/renderer/index.d.ts +3 -0
  420. package/five/renderer/postprocessing/composer.d.ts +37 -0
  421. package/five/renderer/postprocessing/index.d.ts +7 -0
  422. package/five/renderer/postprocessing/passes/adaptive-luminance-pass.d.ts +17 -0
  423. package/five/renderer/postprocessing/passes/eye-dome-lighting-pass.d.ts +14 -0
  424. package/five/renderer/postprocessing/passes/flowing-light-2d-pass.d.ts +36 -0
  425. package/five/renderer/postprocessing/passes/flowing-light-3d-pass.d.ts +36 -0
  426. package/five/renderer/postprocessing/passes/gaussian-blur-pass.d.ts +12 -0
  427. package/five/renderer/postprocessing/passes/pass.d.ts +38 -0
  428. package/five/renderer/scene-renderers/point-cloud-high-quality-scene-renderer.d.ts +11 -0
  429. package/five/renderer/scene-renderers/scene-renderer.d.ts +9 -0
  430. package/five/renderer/scene-renderers/ssaa-scene-renderer.d.ts +15 -0
  431. package/five/renderer/tools/full-screen-quad.d.ts +15 -0
  432. package/five/renderer/tools/render-cube-to-equirectangular.d.ts +7 -0
  433. package/five/renderer/tools/render-full-screen-depth.d.ts +2 -0
  434. package/five/renderer/tools/render-full-screen.d.ts +2 -0
  435. package/five/texture/histogram.d.ts +54 -0
  436. package/five/texture/imageBitmap.d.ts +13 -0
  437. package/five/texture/initTexture.d.ts +3 -0
  438. package/five/texture/loader.d.ts +39 -0
  439. package/five/texture/textureData.d.ts +11 -0
  440. package/five/thirdparty/fflate.d.ts +1407 -0
  441. package/five/thirdparty/hammer.d.ts +375 -0
  442. package/five/thirdparty/jsrsasign.d.ts +753 -0
  443. package/five/thirdparty/meshopt_decoder.d.ts +15 -0
  444. package/five/three-version-check.d.ts +1 -0
  445. package/five/types/addableObject.d.ts +12 -0
  446. package/five/types/cube.d.ts +1 -0
  447. package/five/types/gestureInput.d.ts +24 -0
  448. package/five/types/imageOptions.d.ts +20 -0
  449. package/five/types/intersectMeshInterface.d.ts +8 -0
  450. package/five/types/movePanoEffect.d.ts +13 -0
  451. package/five/types/movePanoOptions.d.ts +36 -0
  452. package/five/types/panoCircleMeshInterface.d.ts +34 -0
  453. package/five/types/plugin.d.ts +25 -0
  454. package/five/types/pose.d.ts +17 -0
  455. package/five/types/state.d.ts +20 -0
  456. package/five/types/viewport.d.ts +22 -0
  457. package/five/utils/ajax.d.ts +66 -0
  458. package/five/utils/animationFrameLoop.d.ts +45 -0
  459. package/five/utils/array.d.ts +31 -0
  460. package/five/utils/asyncTaskQueue.d.ts +8 -0
  461. package/five/utils/bufferGeometry.d.ts +33 -0
  462. package/five/utils/calculateProgress.d.ts +39 -0
  463. package/five/utils/calculateThreeMouse.d.ts +13 -0
  464. package/five/utils/canplayVideo.d.ts +2 -0
  465. package/five/utils/clamp.d.ts +2 -0
  466. package/five/utils/clock.d.ts +17 -0
  467. package/five/utils/createSymbol.d.ts +5 -0
  468. package/five/utils/decodeText.d.ts +2 -0
  469. package/five/utils/deepEqual.d.ts +2 -0
  470. package/five/utils/deepFreeze.d.ts +2 -0
  471. package/five/utils/defineProperty.d.ts +9 -0
  472. package/five/utils/detector.d.ts +14 -0
  473. package/five/utils/distance.d.ts +10 -0
  474. package/five/utils/draco.d.ts +26 -0
  475. package/five/utils/easing.d.ts +63 -0
  476. package/five/utils/event.d.ts +159 -0
  477. package/five/utils/formatRad.d.ts +7 -0
  478. package/five/utils/imageSupport.d.ts +6 -0
  479. package/five/utils/imageURL.d.ts +42 -0
  480. package/five/utils/isEmptyObject.d.ts +2 -0
  481. package/five/utils/isNil.d.ts +6 -0
  482. package/five/utils/isNumber.d.ts +2 -0
  483. package/five/utils/isPowerOfTwo.d.ts +2 -0
  484. package/five/utils/isPromise.d.ts +2 -0
  485. package/five/utils/isSimilar.d.ts +6 -0
  486. package/five/utils/json.d.ts +7 -0
  487. package/five/utils/ktx2.d.ts +30 -0
  488. package/five/utils/lzma/index.d.ts +2 -0
  489. package/five/utils/lzma/lzma.d.ts +3 -0
  490. package/five/utils/lzma/lzmaWASM.d.ts +2 -0
  491. package/five/utils/lzma/lzmaWorker.d.ts +14 -0
  492. package/five/utils/memoryUsage.d.ts +29 -0
  493. package/five/utils/motion.d.ts +38 -0
  494. package/five/utils/noop.d.ts +6 -0
  495. package/five/utils/now.d.ts +7 -0
  496. package/five/utils/pano.d.ts +9 -0
  497. package/five/utils/pick.d.ts +3 -0
  498. package/five/utils/poseUtils.d.ts +5 -0
  499. package/five/utils/renderCubeTextureToCubeRenderTarget.d.ts +3 -0
  500. package/five/utils/renderDepth.d.ts +2 -0
  501. package/five/utils/renderTexturesToCubeRenderTarget.d.ts +10 -0
  502. package/five/utils/requestPermission.d.ts +3 -0
  503. package/five/utils/shaderContentFix.d.ts +7 -0
  504. package/five/utils/shaderMaterial.d.ts +20 -0
  505. package/five/utils/stateUtils.d.ts +5 -0
  506. package/five/utils/string-pattern.d.ts +8 -0
  507. package/five/utils/subscribe.d.ts +67 -0
  508. package/five/utils/tileCube.d.ts +19 -0
  509. package/five/utils/toFastProperties.d.ts +1 -0
  510. package/five/utils/typedCache.d.ts +10 -0
  511. package/five/utils/uniform.d.ts +15 -0
  512. package/five/utils/url.d.ts +35 -0
  513. package/five/utils/uuid.d.ts +5 -0
  514. package/five/utils/values.d.ts +2 -0
  515. package/five/utils/vectorCoordinates.d.ts +29 -0
  516. package/five/utils/volume.d.ts +111 -0
  517. package/five/utils/webglError.d.ts +7 -0
  518. package/five/utils/worker.d.ts +26 -0
  519. package/five/webxr/XRControllerModelFactory.d.ts +28 -0
  520. package/five/webxr/motionHelper.d.ts +68 -0
  521. package/five/webxr/xrButton.d.ts +4 -0
  522. package/five/webxr/xrController.d.ts +24 -0
  523. package/five/webxr/xrManager.d.ts +84 -0
  524. package/five/work/_ALLOW_HOST.d.ts +2 -0
  525. package/five/work/index.d.ts +6 -0
  526. package/five/work/keychain.d.ts +5 -0
  527. package/five/work/looseWorkType.d.ts +121 -0
  528. package/five/work/verify.d.ts +7 -0
  529. package/five/work/work.d.ts +236 -0
  530. package/five/work/workFetcher.d.ts +4 -0
  531. package/five/work/workJson.d.ts +3 -0
  532. package/five/work/workJsonType.d.ts +73 -0
  533. package/five/work/workObserverUtils.d.ts +36 -0
  534. package/five/work/workParser.d.ts +6 -0
  535. package/five/work/workResolvedObserver.d.ts +12 -0
  536. package/five/work/workVerify.d.ts +2 -0
  537. package/five/work/works.d.ts +10 -0
  538. package/gltf-loader/gltf-object.d.ts +17 -0
  539. package/gltf-loader/index.d.ts +60 -160
  540. package/gltf-loader/index.js +9 -9
  541. package/gltf-loader/index.mjs +1351 -1451
  542. package/gltf-loader/thirdparty/DDSLoader.d.ts +23 -0
  543. package/gltf-loader/thirdparty/DRACOLoader.d.ts +18 -0
  544. package/gltf-loader/thirdparty/GLTFLoader.d.ts +59 -0
  545. package/line/circle_png.d.ts +1 -0
  546. package/line/index.d.ts +19 -69
  547. package/line/index.js +4 -4
  548. package/line/index.mjs +334 -513
  549. package/line/utils/Line2.d.ts +7 -0
  550. package/line/utils/LineGeometry.d.ts +10 -0
  551. package/line/utils/LineMaterial.d.ts +20 -0
  552. package/line/utils/LineSegments2.d.ts +11 -0
  553. package/line/utils/LineSegmentsGeometry.d.ts +15 -0
  554. package/llms.txt +43 -31
  555. package/package.json +11 -2
  556. package/plugins/BackgroundPlugin/Controller.d.ts +20 -0
  557. package/plugins/BackgroundPlugin/index.d.ts +5 -0
  558. package/plugins/BackgroundPlugin/typings.d.ts +44 -0
  559. package/plugins/BasePlugin/index.d.ts +119 -0
  560. package/plugins/DynamicPathLinePlugin/Controller.d.ts +167 -0
  561. package/plugins/DynamicPathLinePlugin/index.d.ts +5 -0
  562. package/plugins/DynamicPathLinePlugin/line2/Line2.d.ts +7 -0
  563. package/plugins/DynamicPathLinePlugin/line2/LineGeometry.d.ts +10 -0
  564. package/plugins/DynamicPathLinePlugin/line2/LineMaterial.d.ts +17 -0
  565. package/plugins/DynamicPathLinePlugin/line2/LineSegments2.d.ts +11 -0
  566. package/plugins/DynamicPathLinePlugin/line2/LineSegmentsGeometry.d.ts +15 -0
  567. package/plugins/DynamicPathLinePlugin/typing.d.ts +129 -0
  568. package/plugins/DynamicPathLinePlugin/typings.d.ts +72 -0
  569. package/plugins/ItemMaskPlugin/Controller.d.ts +48 -0
  570. package/plugins/ItemMaskPlugin/index.d.ts +5 -0
  571. package/plugins/ItemMaskPlugin/typing.d.ts +58 -0
  572. package/plugins/OrientationPlugin/Controller.d.ts +82 -0
  573. package/plugins/OrientationPlugin/RoundedBoxGeometry.d.ts +11 -0
  574. package/plugins/OrientationPlugin/index.d.ts +6 -0
  575. package/plugins/OrientationPlugin/typing.d.ts +25 -0
  576. package/plugins/PanoAnimePlugin/Controller.d.ts +46 -0
  577. package/plugins/PanoAnimePlugin/index.d.ts +5 -0
  578. package/plugins/PanoAnimePlugin/typing.d.ts +37 -0
  579. package/plugins/PluginTemplate/Controller.d.ts +27 -0
  580. package/plugins/PluginTemplate/index.d.ts +5 -0
  581. package/plugins/PluginTemplate/typing.d.ts +21 -0
  582. package/plugins/TrajectoryPlugin/Controller.d.ts +85 -0
  583. package/plugins/TrajectoryPlugin/index.d.ts +6 -0
  584. package/plugins/TrajectoryPlugin/typing.d.ts +25 -0
  585. package/plugins/index.d.ts +9 -1102
  586. package/plugins/index.js +17 -21
  587. package/plugins/index.mjs +3342 -4245
  588. package/plugins/thirdParty/CSS3DRenderer.d.ts +32 -0
  589. package/plugins/thirdParty/OrbitControls.d.ts +78 -0
  590. package/plugins/utils/absoluteUrl.d.ts +5 -0
  591. package/plugins/utils/clamp.d.ts +2 -0
  592. package/plugins/utils/loadImage.d.ts +1 -0
  593. package/plugins/utils/motion.d.ts +38 -0
  594. package/plugins/utils/now.d.ts +6 -0
  595. package/plugins/utils/uuid.d.ts +5 -0
  596. package/react/canvas.d.ts +19 -0
  597. package/react/context.d.ts +11 -0
  598. package/react/createProvider.d.ts +95 -0
  599. package/react/createStore.d.ts +144 -0
  600. package/react/hooks/unsafe__useFiveInstance.d.ts +9 -0
  601. package/react/hooks/useFiveAction.d.ts +147 -0
  602. package/react/hooks/useFiveCameraDirection.d.ts +7 -0
  603. package/react/hooks/useFiveCameraRaycaster.d.ts +7 -0
  604. package/react/hooks/useFiveCurrentObserver.d.ts +11 -0
  605. package/react/hooks/useFiveCurrentState.d.ts +15 -0
  606. package/react/hooks/useFiveEventCallback.d.ts +12 -0
  607. package/react/hooks/useFiveFloor.d.ts +15 -0
  608. package/react/hooks/useFiveHelper.d.ts +14 -0
  609. package/react/hooks/useFiveModelBounding.d.ts +5 -0
  610. package/react/hooks/useFiveModelEffect.d.ts +14 -0
  611. package/react/hooks/useFiveModelIntersectRaycaster.d.ts +22 -0
  612. package/react/hooks/useFiveModelReadyState.d.ts +8 -0
  613. package/react/hooks/useFiveProject2d.d.ts +20 -0
  614. package/react/hooks/useFiveSceneEffect.d.ts +21 -0
  615. package/react/hooks/useFiveState.d.ts +6 -0
  616. package/react/hooks/useFiveWork.d.ts +29 -0
  617. package/react/index.d.ts +24 -830
  618. package/react/index.js +3 -3
  619. package/react/index.mjs +572 -783
  620. package/react/rendererPool.d.ts +7 -0
  621. package/react/withFive.d.ts +213 -0
  622. package/shader-lib/EvenessPlane/index.d.ts +10 -0
  623. package/shader-lib/PointCloudExpand/index.d.ts +59 -0
  624. package/shader-lib/PolygonCuter/index.d.ts +52 -0
  625. package/shader-lib/PolygonCuter/worker.d.ts +14 -0
  626. package/shader-lib/ShineModel/index.d.ts +7 -0
  627. package/shader-lib/SweepModel/index.d.ts +7 -0
  628. package/shader-lib/index.d.ts +5 -86
  629. package/shader-lib/index.js +13 -14
  630. package/shader-lib/index.mjs +424 -824
  631. package/sticker/geometry.d.ts +3 -0
  632. package/sticker/index.d.ts +68 -71
  633. package/sticker/index.js +3 -3
  634. package/sticker/index.mjs +102 -142
  635. package/umd/five-gltf-loader.js +9 -9
  636. package/umd/five-line.js +4 -4
  637. package/umd/five-plugins.js +17 -21
  638. package/umd/five-react.js +3 -3
  639. package/umd/five-shader-lib.js +13 -14
  640. package/umd/five-sticker.js +3 -3
  641. package/umd/five-vfx.js +21 -21
  642. package/umd/five-vue.js +3 -3
  643. package/umd/five.js +188 -336
  644. package/vfx/airflow/airflow.d.ts +18 -0
  645. package/vfx/airflow/fragment-shader.d.ts +2 -0
  646. package/vfx/airflow/vertex-shader.d.ts +2 -0
  647. package/vfx/common/scale-shader.d.ts +2 -0
  648. package/vfx/common/simplex-noise-shader.d.ts +2 -0
  649. package/vfx/frame/fragment-shader.d.ts +2 -0
  650. package/vfx/frame/frame.d.ts +22 -0
  651. package/vfx/frame/vertex-shader.d.ts +2 -0
  652. package/vfx/index.d.ts +7 -363
  653. package/vfx/index.js +21 -21
  654. package/vfx/index.mjs +454 -910
  655. package/vfx/particle/fragment-shader.d.ts +2 -0
  656. package/vfx/particle/instance.d.ts +36 -0
  657. package/vfx/particle/particle.d.ts +205 -0
  658. package/vfx/particle/utils.d.ts +11 -0
  659. package/vfx/particle/vertex-shader.d.ts +2 -0
  660. package/vfx/particle-gpu/fragment-shader.d.ts +2 -0
  661. package/vfx/particle-gpu/instance.d.ts +36 -0
  662. package/vfx/particle-gpu/particle.d.ts +95 -0
  663. package/vfx/particle-gpu/utils.d.ts +11 -0
  664. package/vfx/particle-gpu/vertex-shader.d.ts +2 -0
  665. package/vfx/spotLight/fragment-shader.d.ts +2 -0
  666. package/vfx/spotLight/spotLight.d.ts +15 -0
  667. package/vfx/spotLight/vertex-shader.d.ts +2 -0
  668. package/vue/context.d.ts +7 -0
  669. package/vue/hooks/FiveCanvas.d.ts +36 -0
  670. package/vue/hooks/FiveProvider.d.ts +35 -0
  671. package/vue/hooks/unsafe__useFiveInject.d.ts +9 -0
  672. package/vue/hooks/useFiveAction.d.ts +178 -0
  673. package/vue/hooks/useFiveCameraDirection.d.ts +8 -0
  674. package/vue/hooks/useFiveCameraRaycaster.d.ts +8 -0
  675. package/vue/hooks/useFiveCurrentObserver.d.ts +12 -0
  676. package/vue/hooks/useFiveCurrentState.d.ts +16 -0
  677. package/vue/hooks/useFiveEventCallback.d.ts +11 -0
  678. package/vue/hooks/useFiveFloor.d.ts +16 -0
  679. package/vue/hooks/useFiveHelper.d.ts +15 -0
  680. package/vue/hooks/useFiveModel.d.ts +7 -0
  681. package/vue/hooks/useFiveModelBounding.d.ts +7 -0
  682. package/vue/hooks/useFiveModelIntersectRaycaster.d.ts +23 -0
  683. package/vue/hooks/useFiveModelReadyState.d.ts +9 -0
  684. package/vue/hooks/useFiveProject2d.d.ts +26 -0
  685. package/vue/hooks/useFiveScene.d.ts +6 -0
  686. package/vue/hooks/useFiveState.d.ts +16 -0
  687. package/vue/hooks/useFiveWork.d.ts +30 -0
  688. package/vue/index.d.ts +23 -467
  689. package/vue/index.js +3 -3
  690. package/vue/index.mjs +309 -301
  691. package/vue/rendererPool.d.ts +10 -0
  692. package/work-downloader/components/model-3d-tile.d.ts +2 -0
  693. package/work-downloader/components/model.d.ts +3 -0
  694. package/work-downloader/components/observer.d.ts +7 -0
  695. package/work-downloader/download.d.ts +16 -0
  696. package/work-downloader/index.d.ts +2 -33
  697. package/work-downloader/index.js +3 -3
  698. package/work-downloader/index.mjs +317 -556
  699. package/work-downloader/type.d.ts +28 -0
  700. package/work-downloader/utils/download-to-file.d.ts +1 -0
  701. package/work-downloader/utils/image-processing.d.ts +7 -0
  702. package/work-downloader/utils/join-url.d.ts +2 -0
  703. package/work-downloader/utils/log.d.ts +1 -0
  704. package/work-downloader/utils/relative-url.d.ts +1 -0
  705. package/docs/documents/five.FivePlugin.plugin.html +0 -60
  706. package/docs/documents/plugin.html +0 -60
  707. package/docs/media/five.ts +0 -2881
  708. package/docs/media/pass.ts +0 -64
  709. package/guides/ai-doc-guidelines.md +0 -72
  710. package/guides/features/3dtile.md +0 -264
  711. package/guides/features/parameter.md +0 -178
  712. package/guides/plugin.md +0 -206
  713. /package/{guides → ai_guides}/release_notes/6.6.md +0 -0
  714. /package/{guides → ai_guides}/release_notes/6.7.md +0 -0
  715. /package/{guides → ai_guides}/support.md +0 -0
@@ -0,0 +1,1407 @@
1
+ /**
2
+ * Codes for errors generated within this library
3
+ */
4
+ export declare const FlateErrorCode: {
5
+ readonly UnexpectedEOF: 0;
6
+ readonly InvalidBlockType: 1;
7
+ readonly InvalidLengthLiteral: 2;
8
+ readonly InvalidDistance: 3;
9
+ readonly StreamFinished: 4;
10
+ readonly NoStreamHandler: 5;
11
+ readonly InvalidHeader: 6;
12
+ readonly NoCallback: 7;
13
+ readonly InvalidUTF8: 8;
14
+ readonly ExtraFieldTooLong: 9;
15
+ readonly InvalidDate: 10;
16
+ readonly FilenameTooLong: 11;
17
+ readonly StreamFinishing: 12;
18
+ readonly InvalidZipData: 13;
19
+ readonly UnknownCompressionMethod: 14;
20
+ };
21
+ /**
22
+ * An error generated within this library
23
+ */
24
+ export interface FlateError extends Error {
25
+ /**
26
+ * The code associated with this error
27
+ */
28
+ code: number;
29
+ }
30
+ /**
31
+ * Options for decompressing a DEFLATE stream
32
+ */
33
+ export interface InflateStreamOptions {
34
+ /**
35
+ * The dictionary used to compress the original data. If no dictionary was used during compression, this option has no effect.
36
+ *
37
+ * Supplying the wrong dictionary during decompression usually yields corrupt output or causes an invalid distance error.
38
+ */
39
+ dictionary?: Uint8Array;
40
+ }
41
+ /**
42
+ * Options for decompressing DEFLATE data
43
+ */
44
+ export interface InflateOptions extends InflateStreamOptions {
45
+ /**
46
+ * The buffer into which to write the decompressed data. Saves memory if you know the decompressed size in advance.
47
+ *
48
+ * Note that if the decompression result is larger than the size of this buffer, it will be truncated to fit.
49
+ */
50
+ out?: Uint8Array;
51
+ }
52
+ /**
53
+ * Options for decompressing a GZIP stream
54
+ */
55
+ export interface GunzipStreamOptions extends InflateStreamOptions {
56
+ }
57
+ /**
58
+ * Options for decompressing GZIP data
59
+ */
60
+ export interface GunzipOptions extends InflateStreamOptions {
61
+ /**
62
+ * The buffer into which to write the decompressed data. GZIP already encodes the output size, so providing this doesn't save memory.
63
+ *
64
+ * Note that if the decompression result is larger than the size of this buffer, it will be truncated to fit.
65
+ */
66
+ out?: Uint8Array;
67
+ }
68
+ /**
69
+ * Options for decompressing a Zlib stream
70
+ */
71
+ export interface UnzlibStreamOptions extends InflateStreamOptions {
72
+ }
73
+ /**
74
+ * Options for decompressing Zlib data
75
+ */
76
+ export interface UnzlibOptions extends InflateOptions {
77
+ }
78
+ /**
79
+ * Options for compressing data into a DEFLATE format
80
+ */
81
+ export interface DeflateOptions {
82
+ /**
83
+ * The level of compression to use, ranging from 0-9.
84
+ *
85
+ * 0 will store the data without compression.
86
+ * 1 is fastest but compresses the worst, 9 is slowest but compresses the best.
87
+ * The default level is 6.
88
+ *
89
+ * Typically, binary data benefits much more from higher values than text data.
90
+ * In both cases, higher values usually take disproportionately longer than the reduction in final size that results.
91
+ *
92
+ * For example, a 1 MB text file could:
93
+ * - become 1.01 MB with level 0 in 1ms
94
+ * - become 400 kB with level 1 in 10ms
95
+ * - become 320 kB with level 9 in 100ms
96
+ */
97
+ level?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
98
+ /**
99
+ * The memory level to use, ranging from 0-12. Increasing this increases speed and compression ratio at the cost of memory.
100
+ *
101
+ * Note that this is exponential: while level 0 uses 4 kB, level 4 uses 64 kB, level 8 uses 1 MB, and level 12 uses 16 MB.
102
+ * It is recommended not to lower the value below 4, since that tends to hurt performance.
103
+ * In addition, values above 8 tend to help very little on most data and can even hurt performance.
104
+ *
105
+ * The default value is automatically determined based on the size of the input data.
106
+ */
107
+ mem?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
108
+ /**
109
+ * A buffer containing common byte sequences in the input data that can be used to significantly improve compression ratios.
110
+ *
111
+ * Dictionaries should be 32kB or smaller and include strings or byte sequences likely to appear in the input.
112
+ * The decompressor must supply the same dictionary as the compressor to extract the original data.
113
+ *
114
+ * Dictionaries only improve aggregate compression ratio when reused across multiple small inputs. They should typically not be used otherwise.
115
+ *
116
+ * Avoid using dictionaries with GZIP and ZIP to maximize software compatibility.
117
+ */
118
+ dictionary?: Uint8Array;
119
+ }
120
+ /**
121
+ * Options for compressing data into a GZIP format
122
+ */
123
+ export interface GzipOptions extends DeflateOptions {
124
+ /**
125
+ * When the file was last modified. Defaults to the current time.
126
+ * Set this to 0 to avoid revealing a modification date entirely.
127
+ */
128
+ mtime?: Date | string | number;
129
+ /**
130
+ * The filename of the data. If the `gunzip` command is used to decompress the data, it will output a file
131
+ * with this name instead of the name of the compressed file.
132
+ */
133
+ filename?: string;
134
+ }
135
+ /**
136
+ * Options for compressing data into a Zlib format
137
+ */
138
+ export interface ZlibOptions extends DeflateOptions {
139
+ }
140
+ /**
141
+ * Handler for data (de)compression streams
142
+ * @param data The data output from the stream processor
143
+ * @param final Whether this is the final block
144
+ */
145
+ export type FlateStreamHandler = (data: Uint8Array, final: boolean) => void;
146
+ /**
147
+ * Handler for asynchronous data (de)compression streams
148
+ * @param err Any error that occurred
149
+ * @param data The data output from the stream processor
150
+ * @param final Whether this is the final block
151
+ */
152
+ export type AsyncFlateStreamHandler = (err: FlateError | null, data: Uint8Array, final: boolean) => void;
153
+ /**
154
+ * Callback for asynchronous (de)compression methods
155
+ * @param err Any error that occurred
156
+ * @param data The resulting data. Only present if `err` is null
157
+ */
158
+ export type FlateCallback = (err: FlateError | null, data: Uint8Array) => void;
159
+ interface AsyncOptions {
160
+ /**
161
+ * Whether or not to "consume" the source data. This will make the typed array/buffer you pass in
162
+ * unusable but will increase performance and reduce memory usage.
163
+ */
164
+ consume?: boolean;
165
+ }
166
+ /**
167
+ * Options for compressing data asynchronously into a DEFLATE format
168
+ */
169
+ export interface AsyncDeflateOptions extends DeflateOptions, AsyncOptions {
170
+ }
171
+ /**
172
+ * Options for decompressing DEFLATE data asynchronously
173
+ */
174
+ export interface AsyncInflateOptions extends AsyncOptions, InflateStreamOptions {
175
+ /**
176
+ * The original size of the data. Currently, the asynchronous API disallows
177
+ * writing into a buffer you provide; the best you can do is provide the
178
+ * size in bytes and be given back a new typed array.
179
+ */
180
+ size?: number;
181
+ }
182
+ /**
183
+ * Options for compressing data asynchronously into a GZIP format
184
+ */
185
+ export interface AsyncGzipOptions extends GzipOptions, AsyncOptions {
186
+ }
187
+ /**
188
+ * Options for decompressing GZIP data asynchronously
189
+ */
190
+ export interface AsyncGunzipOptions extends AsyncOptions, InflateStreamOptions {
191
+ }
192
+ /**
193
+ * Options for compressing data asynchronously into a Zlib format
194
+ */
195
+ export interface AsyncZlibOptions extends ZlibOptions, AsyncOptions {
196
+ }
197
+ /**
198
+ * Options for decompressing Zlib data asynchronously
199
+ */
200
+ export interface AsyncUnzlibOptions extends AsyncInflateOptions {
201
+ }
202
+ /**
203
+ * A terminable compression/decompression process
204
+ */
205
+ export interface AsyncTerminable {
206
+ /**
207
+ * Terminates the worker thread immediately. The callback will not be called.
208
+ */
209
+ (): void;
210
+ }
211
+ /**
212
+ * Streaming DEFLATE compression
213
+ */
214
+ export declare class Deflate {
215
+ /**
216
+ * Creates a DEFLATE stream
217
+ * @param opts The compression options
218
+ * @param cb The callback to call whenever data is deflated
219
+ */
220
+ constructor(opts: DeflateOptions, cb?: FlateStreamHandler);
221
+ /**
222
+ * Creates a DEFLATE stream
223
+ * @param cb The callback to call whenever data is deflated
224
+ */
225
+ constructor(cb?: FlateStreamHandler);
226
+ private b;
227
+ private s;
228
+ private o;
229
+ /**
230
+ * The handler to call whenever data is available
231
+ */
232
+ ondata: FlateStreamHandler;
233
+ private p;
234
+ /**
235
+ * Pushes a chunk to be deflated
236
+ * @param chunk The chunk to push
237
+ * @param final Whether this is the last chunk
238
+ */
239
+ push(chunk: Uint8Array, final?: boolean): void;
240
+ }
241
+ /**
242
+ * Asynchronous streaming DEFLATE compression
243
+ */
244
+ export declare class AsyncDeflate {
245
+ /**
246
+ * The handler to call whenever data is available
247
+ */
248
+ ondata: AsyncFlateStreamHandler;
249
+ /**
250
+ * Creates an asynchronous DEFLATE stream
251
+ * @param opts The compression options
252
+ * @param cb The callback to call whenever data is deflated
253
+ */
254
+ constructor(opts: DeflateOptions, cb?: AsyncFlateStreamHandler);
255
+ /**
256
+ * Creates an asynchronous DEFLATE stream
257
+ * @param cb The callback to call whenever data is deflated
258
+ */
259
+ constructor(cb?: AsyncFlateStreamHandler);
260
+ /**
261
+ * Pushes a chunk to be deflated
262
+ * @param chunk The chunk to push
263
+ * @param final Whether this is the last chunk
264
+ */
265
+ push(chunk: Uint8Array, final?: boolean): void;
266
+ /**
267
+ * A method to terminate the stream's internal worker. Subsequent calls to
268
+ * push() will silently fail.
269
+ */
270
+ terminate: AsyncTerminable;
271
+ }
272
+ /**
273
+ * Asynchronously compresses data with DEFLATE without any wrapper
274
+ * @param data The data to compress
275
+ * @param opts The compression options
276
+ * @param cb The function to be called upon compression completion
277
+ * @returns A function that can be used to immediately terminate the compression
278
+ */
279
+ export declare function deflate(data: Uint8Array, opts: AsyncDeflateOptions, cb: FlateCallback): AsyncTerminable;
280
+ /**
281
+ * Asynchronously compresses data with DEFLATE without any wrapper
282
+ * @param data The data to compress
283
+ * @param cb The function to be called upon compression completion
284
+ */
285
+ export declare function deflate(data: Uint8Array, cb: FlateCallback): AsyncTerminable;
286
+ /**
287
+ * Compresses data with DEFLATE without any wrapper
288
+ * @param data The data to compress
289
+ * @param opts The compression options
290
+ * @returns The deflated version of the data
291
+ */
292
+ export declare function deflateSync(data: Uint8Array, opts?: DeflateOptions): Uint8Array;
293
+ /**
294
+ * Streaming DEFLATE decompression
295
+ */
296
+ export declare class Inflate {
297
+ private s;
298
+ private o;
299
+ private p;
300
+ private d;
301
+ /**
302
+ * The handler to call whenever data is available
303
+ */
304
+ ondata: FlateStreamHandler;
305
+ /**
306
+ * Creates a DEFLATE decompression stream
307
+ * @param opts The decompression options
308
+ * @param cb The callback to call whenever data is inflated
309
+ */
310
+ constructor(opts: InflateStreamOptions, cb?: FlateStreamHandler);
311
+ /**
312
+ * Creates a DEFLATE decompression stream
313
+ * @param cb The callback to call whenever data is inflated
314
+ */
315
+ constructor(cb?: FlateStreamHandler);
316
+ private e;
317
+ private c;
318
+ /**
319
+ * Pushes a chunk to be inflated
320
+ * @param chunk The chunk to push
321
+ * @param final Whether this is the final chunk
322
+ */
323
+ push(chunk: Uint8Array, final?: boolean): void;
324
+ }
325
+ /**
326
+ * Asynchronous streaming DEFLATE decompression
327
+ */
328
+ export declare class AsyncInflate {
329
+ /**
330
+ * The handler to call whenever data is available
331
+ */
332
+ ondata: AsyncFlateStreamHandler;
333
+ /**
334
+ * Creates an asynchronous DEFLATE decompression stream
335
+ * @param opts The decompression options
336
+ * @param cb The callback to call whenever data is inflated
337
+ */
338
+ constructor(opts: InflateStreamOptions, cb?: AsyncFlateStreamHandler);
339
+ /**
340
+ * Creates an asynchronous DEFLATE decompression stream
341
+ * @param cb The callback to call whenever data is inflated
342
+ */
343
+ constructor(cb?: AsyncFlateStreamHandler);
344
+ /**
345
+ * Pushes a chunk to be inflated
346
+ * @param chunk The chunk to push
347
+ * @param final Whether this is the last chunk
348
+ */
349
+ push(chunk: Uint8Array, final?: boolean): void;
350
+ /**
351
+ * A method to terminate the stream's internal worker. Subsequent calls to
352
+ * push() will silently fail.
353
+ */
354
+ terminate: AsyncTerminable;
355
+ }
356
+ /**
357
+ * Asynchronously expands DEFLATE data with no wrapper
358
+ * @param data The data to decompress
359
+ * @param opts The decompression options
360
+ * @param cb The function to be called upon decompression completion
361
+ * @returns A function that can be used to immediately terminate the decompression
362
+ */
363
+ export declare function inflate(data: Uint8Array, opts: AsyncInflateOptions, cb: FlateCallback): AsyncTerminable;
364
+ /**
365
+ * Asynchronously expands DEFLATE data with no wrapper
366
+ * @param data The data to decompress
367
+ * @param cb The function to be called upon decompression completion
368
+ * @returns A function that can be used to immediately terminate the decompression
369
+ */
370
+ export declare function inflate(data: Uint8Array, cb: FlateCallback): AsyncTerminable;
371
+ /**
372
+ * Expands DEFLATE data with no wrapper
373
+ * @param data The data to decompress
374
+ * @param opts The decompression options
375
+ * @returns The decompressed version of the data
376
+ */
377
+ export declare function inflateSync(data: Uint8Array, opts?: InflateOptions): Uint8Array;
378
+ /**
379
+ * Streaming GZIP compression
380
+ */
381
+ export declare class Gzip {
382
+ private c;
383
+ private l;
384
+ private v;
385
+ private o;
386
+ private s;
387
+ /**
388
+ * The handler to call whenever data is available
389
+ */
390
+ ondata: FlateStreamHandler;
391
+ /**
392
+ * Creates a GZIP stream
393
+ * @param opts The compression options
394
+ * @param cb The callback to call whenever data is deflated
395
+ */
396
+ constructor(opts: GzipOptions, cb?: FlateStreamHandler);
397
+ /**
398
+ * Creates a GZIP stream
399
+ * @param cb The callback to call whenever data is deflated
400
+ */
401
+ constructor(cb?: FlateStreamHandler);
402
+ /**
403
+ * Pushes a chunk to be GZIPped
404
+ * @param chunk The chunk to push
405
+ * @param final Whether this is the last chunk
406
+ */
407
+ push(chunk: Uint8Array, final?: boolean): void;
408
+ private p;
409
+ }
410
+ /**
411
+ * Asynchronous streaming GZIP compression
412
+ */
413
+ export declare class AsyncGzip {
414
+ /**
415
+ * The handler to call whenever data is available
416
+ */
417
+ ondata: AsyncFlateStreamHandler;
418
+ /**
419
+ * Creates an asynchronous GZIP stream
420
+ * @param opts The compression options
421
+ * @param cb The callback to call whenever data is deflated
422
+ */
423
+ constructor(opts: GzipOptions, cb?: AsyncFlateStreamHandler);
424
+ /**
425
+ * Creates an asynchronous GZIP stream
426
+ * @param cb The callback to call whenever data is deflated
427
+ */
428
+ constructor(cb?: AsyncFlateStreamHandler);
429
+ /**
430
+ * Pushes a chunk to be GZIPped
431
+ * @param chunk The chunk to push
432
+ * @param final Whether this is the last chunk
433
+ */
434
+ push(chunk: Uint8Array, final?: boolean): void;
435
+ /**
436
+ * A method to terminate the stream's internal worker. Subsequent calls to
437
+ * push() will silently fail.
438
+ */
439
+ terminate: AsyncTerminable;
440
+ }
441
+ /**
442
+ * Asynchronously compresses data with GZIP
443
+ * @param data The data to compress
444
+ * @param opts The compression options
445
+ * @param cb The function to be called upon compression completion
446
+ * @returns A function that can be used to immediately terminate the compression
447
+ */
448
+ export declare function gzip(data: Uint8Array, opts: AsyncGzipOptions, cb: FlateCallback): AsyncTerminable;
449
+ /**
450
+ * Asynchronously compresses data with GZIP
451
+ * @param data The data to compress
452
+ * @param cb The function to be called upon compression completion
453
+ * @returns A function that can be used to immediately terminate the decompression
454
+ */
455
+ export declare function gzip(data: Uint8Array, cb: FlateCallback): AsyncTerminable;
456
+ /**
457
+ * Compresses data with GZIP
458
+ * @param data The data to compress
459
+ * @param opts The compression options
460
+ * @returns The gzipped version of the data
461
+ */
462
+ export declare function gzipSync(data: Uint8Array, opts?: GzipOptions): Uint8Array;
463
+ /**
464
+ * Handler for new GZIP members in concatenated GZIP streams. Useful for building indices used to perform random-access reads on compressed files.
465
+ * @param offset The offset of the new member relative to the start of the stream
466
+ */
467
+ export type GunzipMemberHandler = (offset: number) => void;
468
+ /**
469
+ * Streaming single or multi-member GZIP decompression
470
+ */
471
+ export declare class Gunzip {
472
+ private v;
473
+ private r;
474
+ private o;
475
+ private p;
476
+ private s;
477
+ /**
478
+ * The handler to call whenever data is available
479
+ */
480
+ ondata: FlateStreamHandler;
481
+ /**
482
+ * The handler to call whenever a new GZIP member is found
483
+ */
484
+ onmember?: GunzipMemberHandler;
485
+ /**
486
+ * Creates a GUNZIP stream
487
+ * @param opts The decompression options
488
+ * @param cb The callback to call whenever data is inflated
489
+ */
490
+ constructor(opts: GunzipStreamOptions, cb?: FlateStreamHandler);
491
+ /**
492
+ * Creates a GUNZIP stream
493
+ * @param cb The callback to call whenever data is inflated
494
+ */
495
+ constructor(cb?: FlateStreamHandler);
496
+ /**
497
+ * Pushes a chunk to be GUNZIPped
498
+ * @param chunk The chunk to push
499
+ * @param final Whether this is the last chunk
500
+ */
501
+ push(chunk: Uint8Array, final?: boolean): void;
502
+ }
503
+ /**
504
+ * Asynchronous streaming single or multi-member GZIP decompression
505
+ */
506
+ export declare class AsyncGunzip {
507
+ /**
508
+ * The handler to call whenever data is available
509
+ */
510
+ ondata: AsyncFlateStreamHandler;
511
+ /**
512
+ * The handler to call whenever a new GZIP member is found
513
+ */
514
+ onmember?: GunzipMemberHandler;
515
+ /**
516
+ * Creates an asynchronous GUNZIP stream
517
+ * @param opts The decompression options
518
+ * @param cb The callback to call whenever data is inflated
519
+ */
520
+ constructor(opts: GunzipStreamOptions, cb?: AsyncFlateStreamHandler);
521
+ /**
522
+ * Creates an asynchronous GUNZIP stream
523
+ * @param cb The callback to call whenever data is inflated
524
+ */
525
+ constructor(cb?: AsyncFlateStreamHandler);
526
+ /**
527
+ * Pushes a chunk to be GUNZIPped
528
+ * @param chunk The chunk to push
529
+ * @param final Whether this is the last chunk
530
+ */
531
+ push(chunk: Uint8Array, final?: boolean): void;
532
+ /**
533
+ * A method to terminate the stream's internal worker. Subsequent calls to
534
+ * push() will silently fail.
535
+ */
536
+ terminate: AsyncTerminable;
537
+ }
538
+ /**
539
+ * Asynchronously expands GZIP data
540
+ * @param data The data to decompress
541
+ * @param opts The decompression options
542
+ * @param cb The function to be called upon decompression completion
543
+ * @returns A function that can be used to immediately terminate the decompression
544
+ */
545
+ export declare function gunzip(data: Uint8Array, opts: AsyncGunzipOptions, cb: FlateCallback): AsyncTerminable;
546
+ /**
547
+ * Asynchronously expands GZIP data
548
+ * @param data The data to decompress
549
+ * @param cb The function to be called upon decompression completion
550
+ * @returns A function that can be used to immediately terminate the decompression
551
+ */
552
+ export declare function gunzip(data: Uint8Array, cb: FlateCallback): AsyncTerminable;
553
+ /**
554
+ * Expands GZIP data
555
+ * @param data The data to decompress
556
+ * @param opts The decompression options
557
+ * @returns The decompressed version of the data
558
+ */
559
+ export declare function gunzipSync(data: Uint8Array, opts?: GunzipOptions): Uint8Array;
560
+ /**
561
+ * Streaming Zlib compression
562
+ */
563
+ export declare class Zlib {
564
+ private c;
565
+ private v;
566
+ private o;
567
+ private s;
568
+ /**
569
+ * The handler to call whenever data is available
570
+ */
571
+ ondata: FlateStreamHandler;
572
+ /**
573
+ * Creates a Zlib stream
574
+ * @param opts The compression options
575
+ * @param cb The callback to call whenever data is deflated
576
+ */
577
+ constructor(opts: ZlibOptions, cb?: FlateStreamHandler);
578
+ /**
579
+ * Creates a Zlib stream
580
+ * @param cb The callback to call whenever data is deflated
581
+ */
582
+ constructor(cb?: FlateStreamHandler);
583
+ /**
584
+ * Pushes a chunk to be zlibbed
585
+ * @param chunk The chunk to push
586
+ * @param final Whether this is the last chunk
587
+ */
588
+ push(chunk: Uint8Array, final?: boolean): void;
589
+ private p;
590
+ }
591
+ /**
592
+ * Asynchronous streaming Zlib compression
593
+ */
594
+ export declare class AsyncZlib {
595
+ /**
596
+ * The handler to call whenever data is available
597
+ */
598
+ ondata: AsyncFlateStreamHandler;
599
+ /**
600
+ * Creates an asynchronous Zlib stream
601
+ * @param opts The compression options
602
+ * @param cb The callback to call whenever data is deflated
603
+ */
604
+ constructor(opts: ZlibOptions, cb?: AsyncFlateStreamHandler);
605
+ /**
606
+ * Creates an asynchronous Zlib stream
607
+ * @param cb The callback to call whenever data is deflated
608
+ */
609
+ constructor(cb?: AsyncFlateStreamHandler);
610
+ /**
611
+ * Pushes a chunk to be deflated
612
+ * @param chunk The chunk to push
613
+ * @param final Whether this is the last chunk
614
+ */
615
+ push(chunk: Uint8Array, final?: boolean): void;
616
+ /**
617
+ * A method to terminate the stream's internal worker. Subsequent calls to
618
+ * push() will silently fail.
619
+ */
620
+ terminate: AsyncTerminable;
621
+ }
622
+ /**
623
+ * Asynchronously compresses data with Zlib
624
+ * @param data The data to compress
625
+ * @param opts The compression options
626
+ * @param cb The function to be called upon compression completion
627
+ */
628
+ export declare function zlib(data: Uint8Array, opts: AsyncZlibOptions, cb: FlateCallback): AsyncTerminable;
629
+ /**
630
+ * Asynchronously compresses data with Zlib
631
+ * @param data The data to compress
632
+ * @param cb The function to be called upon compression completion
633
+ * @returns A function that can be used to immediately terminate the compression
634
+ */
635
+ export declare function zlib(data: Uint8Array, cb: FlateCallback): AsyncTerminable;
636
+ /**
637
+ * Compress data with Zlib
638
+ * @param data The data to compress
639
+ * @param opts The compression options
640
+ * @returns The zlib-compressed version of the data
641
+ */
642
+ export declare function zlibSync(data: Uint8Array, opts?: ZlibOptions): Uint8Array;
643
+ /**
644
+ * Streaming Zlib decompression
645
+ */
646
+ export declare class Unzlib {
647
+ private v;
648
+ private p;
649
+ /**
650
+ * The handler to call whenever data is available
651
+ */
652
+ ondata: FlateStreamHandler;
653
+ /**
654
+ * Creates a Zlib decompression stream
655
+ * @param opts The decompression options
656
+ * @param cb The callback to call whenever data is inflated
657
+ */
658
+ constructor(opts: UnzlibStreamOptions, cb?: FlateStreamHandler);
659
+ /**
660
+ * Creates a Zlib decompression stream
661
+ * @param cb The callback to call whenever data is inflated
662
+ */
663
+ constructor(cb?: FlateStreamHandler);
664
+ /**
665
+ * Pushes a chunk to be unzlibbed
666
+ * @param chunk The chunk to push
667
+ * @param final Whether this is the last chunk
668
+ */
669
+ push(chunk: Uint8Array, final?: boolean): void;
670
+ }
671
+ /**
672
+ * Asynchronous streaming Zlib decompression
673
+ */
674
+ export declare class AsyncUnzlib {
675
+ /**
676
+ * The handler to call whenever data is available
677
+ */
678
+ ondata: AsyncFlateStreamHandler;
679
+ /**
680
+ * Creates an asynchronous Zlib decompression stream
681
+ * @param opts The decompression options
682
+ * @param cb The callback to call whenever data is inflated
683
+ */
684
+ constructor(opts: UnzlibStreamOptions, cb?: AsyncFlateStreamHandler);
685
+ /**
686
+ * Creates an asynchronous Zlib decompression stream
687
+ * @param cb The callback to call whenever data is inflated
688
+ */
689
+ constructor(cb?: AsyncFlateStreamHandler);
690
+ /**
691
+ * Pushes a chunk to be decompressed from Zlib
692
+ * @param chunk The chunk to push
693
+ * @param final Whether this is the last chunk
694
+ */
695
+ push(chunk: Uint8Array, final?: boolean): void;
696
+ /**
697
+ * A method to terminate the stream's internal worker. Subsequent calls to
698
+ * push() will silently fail.
699
+ */
700
+ terminate: AsyncTerminable;
701
+ }
702
+ /**
703
+ * Asynchronously expands Zlib data
704
+ * @param data The data to decompress
705
+ * @param opts The decompression options
706
+ * @param cb The function to be called upon decompression completion
707
+ * @returns A function that can be used to immediately terminate the decompression
708
+ */
709
+ export declare function unzlib(data: Uint8Array, opts: AsyncUnzlibOptions, cb: FlateCallback): AsyncTerminable;
710
+ /**
711
+ * Asynchronously expands Zlib data
712
+ * @param data The data to decompress
713
+ * @param cb The function to be called upon decompression completion
714
+ * @returns A function that can be used to immediately terminate the decompression
715
+ */
716
+ export declare function unzlib(data: Uint8Array, cb: FlateCallback): AsyncTerminable;
717
+ /**
718
+ * Expands Zlib data
719
+ * @param data The data to decompress
720
+ * @param opts The decompression options
721
+ * @returns The decompressed version of the data
722
+ */
723
+ export declare function unzlibSync(data: Uint8Array, opts?: UnzlibOptions): Uint8Array;
724
+ export { gzip as compress, AsyncGzip as AsyncCompress };
725
+ export { gzipSync as compressSync, Gzip as Compress };
726
+ /**
727
+ * Streaming GZIP, Zlib, or raw DEFLATE decompression
728
+ */
729
+ export declare class Decompress {
730
+ private G;
731
+ private I;
732
+ private Z;
733
+ private o;
734
+ private s;
735
+ private p;
736
+ /**
737
+ * The handler to call whenever data is available
738
+ */
739
+ ondata: FlateStreamHandler;
740
+ /**
741
+ * Creates a decompression stream
742
+ * @param opts The decompression options
743
+ * @param cb The callback to call whenever data is decompressed
744
+ */
745
+ constructor(opts: InflateStreamOptions, cb?: FlateStreamHandler);
746
+ /**
747
+ * Creates a decompression stream
748
+ * @param cb The callback to call whenever data is decompressed
749
+ */
750
+ constructor(cb?: FlateStreamHandler);
751
+ /**
752
+ * Pushes a chunk to be decompressed
753
+ * @param chunk The chunk to push
754
+ * @param final Whether this is the last chunk
755
+ */
756
+ push(chunk: Uint8Array, final?: boolean): void;
757
+ }
758
+ /**
759
+ * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression
760
+ */
761
+ export declare class AsyncDecompress {
762
+ private G;
763
+ private I;
764
+ private Z;
765
+ /**
766
+ * The handler to call whenever data is available
767
+ */
768
+ ondata: AsyncFlateStreamHandler;
769
+ /**
770
+ * Creates an asynchronous decompression stream
771
+ * @param opts The decompression options
772
+ * @param cb The callback to call whenever data is decompressed
773
+ */
774
+ constructor(opts: InflateStreamOptions, cb?: AsyncFlateStreamHandler);
775
+ /**
776
+ * Creates an asynchronous decompression stream
777
+ * @param cb The callback to call whenever data is decompressed
778
+ */
779
+ constructor(cb?: AsyncFlateStreamHandler);
780
+ /**
781
+ * Pushes a chunk to be decompressed
782
+ * @param chunk The chunk to push
783
+ * @param final Whether this is the last chunk
784
+ */
785
+ push(chunk: Uint8Array, final?: boolean): void;
786
+ }
787
+ /**
788
+ * Asynchrononously expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format
789
+ * @param data The data to decompress
790
+ * @param opts The decompression options
791
+ * @param cb The function to be called upon decompression completion
792
+ * @returns A function that can be used to immediately terminate the decompression
793
+ */
794
+ export declare function decompress(data: Uint8Array, opts: AsyncInflateOptions, cb: FlateCallback): AsyncTerminable;
795
+ /**
796
+ * Asynchrononously expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format
797
+ * @param data The data to decompress
798
+ * @param cb The function to be called upon decompression completion
799
+ * @returns A function that can be used to immediately terminate the decompression
800
+ */
801
+ export declare function decompress(data: Uint8Array, cb: FlateCallback): AsyncTerminable;
802
+ /**
803
+ * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format
804
+ * @param data The data to decompress
805
+ * @param opts The decompression options
806
+ * @returns The decompressed version of the data
807
+ */
808
+ export declare function decompressSync(data: Uint8Array, opts?: InflateOptions): Uint8Array;
809
+ /**
810
+ * Attributes for files added to a ZIP archive object
811
+ */
812
+ export interface ZipAttributes {
813
+ /**
814
+ * The operating system of origin for this file. The value is defined
815
+ * by PKZIP's APPNOTE.txt, section 4.4.2.2. For example, 0 (the default)
816
+ * is MS/DOS, 3 is Unix, 19 is macOS.
817
+ */
818
+ os?: number;
819
+ /**
820
+ * The file's attributes. These are traditionally somewhat complicated
821
+ * and platform-dependent, so using them is scarcely necessary. However,
822
+ * here is a representation of what this is, bit by bit:
823
+ *
824
+ * `TTTTugtrwxrwxrwx0000000000ADVSHR`
825
+ *
826
+ * TTTT = file type (rarely useful)
827
+ *
828
+ * u = setuid, g = setgid, t = sticky
829
+ *
830
+ * rwx = user permissions, rwx = group permissions, rwx = other permissions
831
+ *
832
+ * 0000000000 = unused
833
+ *
834
+ * A = archive, D = directory, V = volume label, S = system file, H = hidden, R = read-only
835
+ *
836
+ * If you want to set the Unix permissions, for instance, just bit shift by 16, e.g. 0o644 << 16.
837
+ * Note that attributes usually only work in conjunction with the `os` setting: you must use
838
+ * `os` = 3 (Unix) if you want to set Unix permissions
839
+ */
840
+ attrs?: number;
841
+ /**
842
+ * Extra metadata to add to the file. This field is defined by PKZIP's APPNOTE.txt,
843
+ * section 4.4.28. At most 65,535 bytes may be used in each ID. The ID must be an
844
+ * integer between 0 and 65,535, inclusive.
845
+ *
846
+ * This field is incredibly rare and almost never needed except for compliance with
847
+ * proprietary standards and software.
848
+ */
849
+ extra?: Record<number, Uint8Array>;
850
+ /**
851
+ * The comment to attach to the file. This field is defined by PKZIP's APPNOTE.txt,
852
+ * section 4.4.26. The comment must be at most 65,535 bytes long UTF-8 encoded. This
853
+ * field is not read by consumer software.
854
+ */
855
+ comment?: string;
856
+ /**
857
+ * When the file was last modified. Defaults to the current time.
858
+ */
859
+ mtime?: GzipOptions['mtime'];
860
+ }
861
+ /**
862
+ * Options for creating a ZIP archive
863
+ */
864
+ export interface ZipOptions extends DeflateOptions, ZipAttributes {
865
+ }
866
+ /**
867
+ * Options for expanding a ZIP archive
868
+ */
869
+ export interface UnzipOptions {
870
+ /**
871
+ * A filter function to extract only certain files from a ZIP archive
872
+ */
873
+ filter?: UnzipFileFilter;
874
+ }
875
+ /**
876
+ * Options for asynchronously creating a ZIP archive
877
+ */
878
+ export interface AsyncZipOptions extends AsyncDeflateOptions, ZipAttributes {
879
+ }
880
+ /**
881
+ * Options for asynchronously expanding a ZIP archive
882
+ */
883
+ export interface AsyncUnzipOptions extends UnzipOptions {
884
+ }
885
+ /**
886
+ * A file that can be used to create a ZIP archive
887
+ */
888
+ export type ZippableFile = Uint8Array | Zippable | [Uint8Array | Zippable, ZipOptions];
889
+ /**
890
+ * A file that can be used to asynchronously create a ZIP archive
891
+ */
892
+ export type AsyncZippableFile = Uint8Array | AsyncZippable | [Uint8Array | AsyncZippable, AsyncZipOptions];
893
+ /**
894
+ * The complete directory structure of a ZIPpable archive
895
+ */
896
+ export interface Zippable {
897
+ [path: string]: ZippableFile;
898
+ }
899
+ /**
900
+ * The complete directory structure of an asynchronously ZIPpable archive
901
+ */
902
+ export interface AsyncZippable {
903
+ [path: string]: AsyncZippableFile;
904
+ }
905
+ /**
906
+ * An unzipped archive. The full path of each file is used as the key,
907
+ * and the file is the value
908
+ */
909
+ export interface Unzipped {
910
+ [path: string]: Uint8Array;
911
+ }
912
+ /**
913
+ * Handler for string generation streams
914
+ * @param data The string output from the stream processor
915
+ * @param final Whether this is the final block
916
+ */
917
+ export type StringStreamHandler = (data: string, final: boolean) => void;
918
+ /**
919
+ * Callback for asynchronous ZIP decompression
920
+ * @param err Any error that occurred
921
+ * @param data The decompressed ZIP archive
922
+ */
923
+ export type UnzipCallback = (err: FlateError | null, data: Unzipped) => void;
924
+ /**
925
+ * Handler for streaming ZIP decompression
926
+ * @param file The file that was found in the archive
927
+ */
928
+ export type UnzipFileHandler = (file: UnzipFile) => void;
929
+ /**
930
+ * Streaming UTF-8 decoding
931
+ */
932
+ export declare class DecodeUTF8 {
933
+ private p;
934
+ private t;
935
+ /**
936
+ * Creates a UTF-8 decoding stream
937
+ * @param cb The callback to call whenever data is decoded
938
+ */
939
+ constructor(cb?: StringStreamHandler);
940
+ /**
941
+ * Pushes a chunk to be decoded from UTF-8 binary
942
+ * @param chunk The chunk to push
943
+ * @param final Whether this is the last chunk
944
+ */
945
+ push(chunk: Uint8Array, final?: boolean): void;
946
+ /**
947
+ * The handler to call whenever data is available
948
+ */
949
+ ondata: StringStreamHandler;
950
+ }
951
+ /**
952
+ * Streaming UTF-8 encoding
953
+ */
954
+ export declare class EncodeUTF8 {
955
+ private d;
956
+ /**
957
+ * Creates a UTF-8 decoding stream
958
+ * @param cb The callback to call whenever data is encoded
959
+ */
960
+ constructor(cb?: FlateStreamHandler);
961
+ /**
962
+ * Pushes a chunk to be encoded to UTF-8
963
+ * @param chunk The string data to push
964
+ * @param final Whether this is the last chunk
965
+ */
966
+ push(chunk: string, final?: boolean): void;
967
+ /**
968
+ * The handler to call whenever data is available
969
+ */
970
+ ondata: FlateStreamHandler;
971
+ }
972
+ /**
973
+ * Converts a string into a Uint8Array for use with compression/decompression methods
974
+ * @param str The string to encode
975
+ * @param latin1 Whether or not to interpret the data as Latin-1. This should
976
+ * not need to be true unless decoding a binary string.
977
+ * @returns The string encoded in UTF-8/Latin-1 binary
978
+ */
979
+ export declare function strToU8(str: string, latin1?: boolean): Uint8Array;
980
+ /**
981
+ * Converts a Uint8Array to a string
982
+ * @param dat The data to decode to string
983
+ * @param latin1 Whether or not to interpret the data as Latin-1. This should
984
+ * not need to be true unless encoding to binary string.
985
+ * @returns The original UTF-8/Latin-1 string
986
+ */
987
+ export declare function strFromU8(dat: Uint8Array, latin1?: boolean): string;
988
+ /**
989
+ * A stream that can be used to create a file in a ZIP archive
990
+ */
991
+ export interface ZipInputFile extends ZipAttributes {
992
+ /**
993
+ * The filename to associate with the data provided to this stream. If you
994
+ * want a file in a subdirectory, use forward slashes as a separator (e.g.
995
+ * `directory/filename.ext`). This will still work on Windows.
996
+ */
997
+ filename: string;
998
+ /**
999
+ * The size of the file in bytes. This attribute may be invalid after
1000
+ * the file is added to the ZIP archive; it must be correct only before the
1001
+ * stream completes.
1002
+ *
1003
+ * If you don't want to have to compute this yourself, consider extending the
1004
+ * ZipPassThrough class and overriding its process() method, or using one of
1005
+ * ZipDeflate or AsyncZipDeflate.
1006
+ */
1007
+ size: number;
1008
+ /**
1009
+ * A CRC of the original file contents. This attribute may be invalid after
1010
+ * the file is added to the ZIP archive; it must be correct only before the
1011
+ * stream completes.
1012
+ *
1013
+ * If you don't want to have to generate this yourself, consider extending the
1014
+ * ZipPassThrough class and overriding its process() method, or using one of
1015
+ * ZipDeflate or AsyncZipDeflate.
1016
+ */
1017
+ crc: number;
1018
+ /**
1019
+ * The compression format for the data stream. This number is determined by
1020
+ * the spec in PKZIP's APPNOTE.txt, section 4.4.5. For example, 0 = no
1021
+ * compression, 8 = deflate, 14 = LZMA
1022
+ */
1023
+ compression: number;
1024
+ /**
1025
+ * Bits 1 and 2 of the general purpose bit flag, specified in PKZIP's
1026
+ * APPNOTE.txt, section 4.4.4. Should be between 0 and 3. This is unlikely
1027
+ * to be necessary.
1028
+ */
1029
+ flag?: number;
1030
+ /**
1031
+ * The handler to be called when data is added. After passing this stream to
1032
+ * the ZIP file object, this handler will always be defined. To call it:
1033
+ *
1034
+ * `stream.ondata(error, chunk, final)`
1035
+ *
1036
+ * error = any error that occurred (null if there was no error)
1037
+ *
1038
+ * chunk = a Uint8Array of the data that was added (null if there was an
1039
+ * error)
1040
+ *
1041
+ * final = boolean, whether this is the final chunk in the stream
1042
+ */
1043
+ ondata?: AsyncFlateStreamHandler;
1044
+ /**
1045
+ * A method called when the stream is no longer needed, for clean-up
1046
+ * purposes. This will not always be called after the stream completes,
1047
+ * so you may wish to call this.terminate() after the final chunk is
1048
+ * processed if you have clean-up logic.
1049
+ */
1050
+ terminate?: AsyncTerminable;
1051
+ }
1052
+ /**
1053
+ * A pass-through stream to keep data uncompressed in a ZIP archive.
1054
+ */
1055
+ export declare class ZipPassThrough implements ZipInputFile {
1056
+ filename: string;
1057
+ crc: number;
1058
+ size: number;
1059
+ compression: number;
1060
+ os?: number;
1061
+ attrs?: number;
1062
+ comment?: string;
1063
+ extra?: Record<number, Uint8Array>;
1064
+ mtime?: GzipOptions['mtime'];
1065
+ ondata: AsyncFlateStreamHandler;
1066
+ private c;
1067
+ /**
1068
+ * Creates a pass-through stream that can be added to ZIP archives
1069
+ * @param filename The filename to associate with this data stream
1070
+ */
1071
+ constructor(filename: string);
1072
+ /**
1073
+ * Processes a chunk and pushes to the output stream. You can override this
1074
+ * method in a subclass for custom behavior, but by default this passes
1075
+ * the data through. You must call this.ondata(err, chunk, final) at some
1076
+ * point in this method.
1077
+ * @param chunk The chunk to process
1078
+ * @param final Whether this is the last chunk
1079
+ */
1080
+ protected process(chunk: Uint8Array, final: boolean): void;
1081
+ /**
1082
+ * Pushes a chunk to be added. If you are subclassing this with a custom
1083
+ * compression algorithm, note that you must push data from the source
1084
+ * file only, pre-compression.
1085
+ * @param chunk The chunk to push
1086
+ * @param final Whether this is the last chunk
1087
+ */
1088
+ push(chunk: Uint8Array, final?: boolean): void;
1089
+ }
1090
+ /**
1091
+ * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate
1092
+ * for better performance
1093
+ */
1094
+ export declare class ZipDeflate implements ZipInputFile {
1095
+ filename: string;
1096
+ crc: number;
1097
+ size: number;
1098
+ compression: number;
1099
+ flag: 0 | 1 | 2 | 3;
1100
+ os?: number;
1101
+ attrs?: number;
1102
+ comment?: string;
1103
+ extra?: Record<number, Uint8Array>;
1104
+ mtime?: GzipOptions['mtime'];
1105
+ ondata: AsyncFlateStreamHandler;
1106
+ private d;
1107
+ /**
1108
+ * Creates a DEFLATE stream that can be added to ZIP archives
1109
+ * @param filename The filename to associate with this data stream
1110
+ * @param opts The compression options
1111
+ */
1112
+ constructor(filename: string, opts?: DeflateOptions);
1113
+ process(chunk: Uint8Array, final: boolean): void;
1114
+ /**
1115
+ * Pushes a chunk to be deflated
1116
+ * @param chunk The chunk to push
1117
+ * @param final Whether this is the last chunk
1118
+ */
1119
+ push(chunk: Uint8Array, final?: boolean): void;
1120
+ }
1121
+ /**
1122
+ * Asynchronous streaming DEFLATE compression for ZIP archives
1123
+ */
1124
+ export declare class AsyncZipDeflate implements ZipInputFile {
1125
+ filename: string;
1126
+ crc: number;
1127
+ size: number;
1128
+ compression: number;
1129
+ flag: 0 | 1 | 2 | 3;
1130
+ os?: number;
1131
+ attrs?: number;
1132
+ comment?: string;
1133
+ extra?: Record<number, Uint8Array>;
1134
+ mtime?: GzipOptions['mtime'];
1135
+ ondata: AsyncFlateStreamHandler;
1136
+ private d;
1137
+ terminate: AsyncTerminable;
1138
+ /**
1139
+ * Creates an asynchronous DEFLATE stream that can be added to ZIP archives
1140
+ * @param filename The filename to associate with this data stream
1141
+ * @param opts The compression options
1142
+ */
1143
+ constructor(filename: string, opts?: DeflateOptions);
1144
+ process(chunk: Uint8Array, final: boolean): void;
1145
+ /**
1146
+ * Pushes a chunk to be deflated
1147
+ * @param chunk The chunk to push
1148
+ * @param final Whether this is the last chunk
1149
+ */
1150
+ push(chunk: Uint8Array, final?: boolean): void;
1151
+ }
1152
+ /**
1153
+ * A zippable archive to which files can incrementally be added
1154
+ */
1155
+ export declare class Zip {
1156
+ private u;
1157
+ private d;
1158
+ /**
1159
+ * Creates an empty ZIP archive to which files can be added
1160
+ * @param cb The callback to call whenever data for the generated ZIP archive
1161
+ * is available
1162
+ */
1163
+ constructor(cb?: AsyncFlateStreamHandler);
1164
+ /**
1165
+ * Adds a file to the ZIP archive
1166
+ * @param file The file stream to add
1167
+ */
1168
+ add(file: ZipInputFile): void;
1169
+ /**
1170
+ * Ends the process of adding files and prepares to emit the final chunks.
1171
+ * This *must* be called after adding all desired files for the resulting
1172
+ * ZIP file to work properly.
1173
+ */
1174
+ end(): void;
1175
+ private e;
1176
+ /**
1177
+ * A method to terminate any internal workers used by the stream. Subsequent
1178
+ * calls to add() will fail.
1179
+ */
1180
+ terminate(): void;
1181
+ /**
1182
+ * The handler to call whenever data is available
1183
+ */
1184
+ ondata: AsyncFlateStreamHandler;
1185
+ }
1186
+ /**
1187
+ * Asynchronously creates a ZIP file
1188
+ * @param data The directory structure for the ZIP archive
1189
+ * @param opts The main options, merged with per-file options
1190
+ * @param cb The callback to call with the generated ZIP archive
1191
+ * @returns A function that can be used to immediately terminate the compression
1192
+ */
1193
+ export declare function zip(data: AsyncZippable, opts: AsyncZipOptions, cb: FlateCallback): AsyncTerminable;
1194
+ /**
1195
+ * Asynchronously creates a ZIP file
1196
+ * @param data The directory structure for the ZIP archive
1197
+ * @param cb The callback to call with the generated ZIP archive
1198
+ * @returns A function that can be used to immediately terminate the compression
1199
+ */
1200
+ export declare function zip(data: AsyncZippable, cb: FlateCallback): AsyncTerminable;
1201
+ /**
1202
+ * Synchronously creates a ZIP file. Prefer using `zip` for better performance
1203
+ * with more than one file.
1204
+ * @param data The directory structure for the ZIP archive
1205
+ * @param opts The main options, merged with per-file options
1206
+ * @returns The generated ZIP archive
1207
+ */
1208
+ export declare function zipSync(data: Zippable, opts?: ZipOptions): Uint8Array;
1209
+ /**
1210
+ * A decoder for files in ZIP streams
1211
+ */
1212
+ export interface UnzipDecoder {
1213
+ /**
1214
+ * The handler to call whenever data is available
1215
+ */
1216
+ ondata: AsyncFlateStreamHandler;
1217
+ /**
1218
+ * Pushes a chunk to be decompressed
1219
+ * @param data The data in this chunk. Do not consume (detach) this data.
1220
+ * @param final Whether this is the last chunk in the data stream
1221
+ */
1222
+ push(data: Uint8Array, final: boolean): void;
1223
+ /**
1224
+ * A method to terminate any internal workers used by the stream. Subsequent
1225
+ * calls to push() should silently fail.
1226
+ */
1227
+ terminate?: AsyncTerminable;
1228
+ }
1229
+ /**
1230
+ * A constructor for a decoder for unzip streams
1231
+ */
1232
+ export interface UnzipDecoderConstructor {
1233
+ /**
1234
+ * Creates an instance of the decoder
1235
+ * @param filename The name of the file
1236
+ * @param size The compressed size of the file
1237
+ * @param originalSize The original size of the file
1238
+ */
1239
+ new (filename: string, size?: number, originalSize?: number): UnzipDecoder;
1240
+ /**
1241
+ * The compression format for the data stream. This number is determined by
1242
+ * the spec in PKZIP's APPNOTE.txt, section 4.4.5. For example, 0 = no
1243
+ * compression, 8 = deflate, 14 = LZMA
1244
+ */
1245
+ compression: number;
1246
+ }
1247
+ /**
1248
+ * Information about a file to be extracted from a ZIP archive
1249
+ */
1250
+ export interface UnzipFileInfo {
1251
+ /**
1252
+ * The name of the file
1253
+ */
1254
+ name: string;
1255
+ /**
1256
+ * The compressed size of the file
1257
+ */
1258
+ size: number;
1259
+ /**
1260
+ * The original size of the file
1261
+ */
1262
+ originalSize: number;
1263
+ /**
1264
+ * The compression format for the data stream. This number is determined by
1265
+ * the spec in PKZIP's APPNOTE.txt, section 4.4.5. For example, 0 = no
1266
+ * compression, 8 = deflate, 14 = LZMA. If the filter function returns true
1267
+ * but this value is not 8, the unzip function will throw.
1268
+ */
1269
+ compression: number;
1270
+ }
1271
+ /**
1272
+ * A filter for files to be extracted during the unzipping process
1273
+ * @param file The info for the current file being processed
1274
+ * @returns Whether or not to extract the current file
1275
+ */
1276
+ export type UnzipFileFilter = (file: UnzipFileInfo) => boolean;
1277
+ /**
1278
+ * Streaming file extraction from ZIP archives
1279
+ */
1280
+ export interface UnzipFile {
1281
+ /**
1282
+ * The handler to call whenever data is available
1283
+ */
1284
+ ondata: AsyncFlateStreamHandler;
1285
+ /**
1286
+ * The name of the file
1287
+ */
1288
+ name: string;
1289
+ /**
1290
+ * The compression format for the data stream. This number is determined by
1291
+ * the spec in PKZIP's APPNOTE.txt, section 4.4.5. For example, 0 = no
1292
+ * compression, 8 = deflate, 14 = LZMA. If start() is called but there is no
1293
+ * decompression stream available for this method, start() will throw.
1294
+ */
1295
+ compression: number;
1296
+ /**
1297
+ * The compressed size of the file. Will not be present for archives created
1298
+ * in a streaming fashion.
1299
+ */
1300
+ size?: number;
1301
+ /**
1302
+ * The original size of the file. Will not be present for archives created
1303
+ * in a streaming fashion.
1304
+ */
1305
+ originalSize?: number;
1306
+ /**
1307
+ * Starts reading from the stream. Calling this function will always enable
1308
+ * this stream, but ocassionally the stream will be enabled even without
1309
+ * this being called.
1310
+ */
1311
+ start(): void;
1312
+ /**
1313
+ * A method to terminate any internal workers used by the stream. ondata
1314
+ * will not be called any further.
1315
+ */
1316
+ terminate: AsyncTerminable;
1317
+ }
1318
+ /**
1319
+ * Streaming pass-through decompression for ZIP archives
1320
+ */
1321
+ export declare class UnzipPassThrough implements UnzipDecoder {
1322
+ static compression: number;
1323
+ ondata: AsyncFlateStreamHandler;
1324
+ push(data: Uint8Array, final: boolean): void;
1325
+ }
1326
+ /**
1327
+ * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for
1328
+ * better performance.
1329
+ */
1330
+ export declare class UnzipInflate implements UnzipDecoder {
1331
+ static compression: number;
1332
+ private i;
1333
+ ondata: AsyncFlateStreamHandler;
1334
+ /**
1335
+ * Creates a DEFLATE decompression that can be used in ZIP archives
1336
+ */
1337
+ constructor();
1338
+ push(data: Uint8Array, final: boolean): void;
1339
+ }
1340
+ /**
1341
+ * Asynchronous streaming DEFLATE decompression for ZIP archives
1342
+ */
1343
+ export declare class AsyncUnzipInflate implements UnzipDecoder {
1344
+ static compression: number;
1345
+ private i;
1346
+ ondata: AsyncFlateStreamHandler;
1347
+ terminate: AsyncTerminable;
1348
+ /**
1349
+ * Creates a DEFLATE decompression that can be used in ZIP archives
1350
+ */
1351
+ constructor(_: string, sz?: number);
1352
+ push(data: Uint8Array, final: boolean): void;
1353
+ }
1354
+ /**
1355
+ * A ZIP archive decompression stream that emits files as they are discovered
1356
+ */
1357
+ export declare class Unzip {
1358
+ private d;
1359
+ private c;
1360
+ private p;
1361
+ private k;
1362
+ private o;
1363
+ /**
1364
+ * Creates a ZIP decompression stream
1365
+ * @param cb The callback to call whenever a file in the ZIP archive is found
1366
+ */
1367
+ constructor(cb?: UnzipFileHandler);
1368
+ /**
1369
+ * Pushes a chunk to be unzipped
1370
+ * @param chunk The chunk to push
1371
+ * @param final Whether this is the last chunk
1372
+ */
1373
+ push(chunk: Uint8Array, final?: boolean): any;
1374
+ /**
1375
+ * Registers a decoder with the stream, allowing for files compressed with
1376
+ * the compression type provided to be expanded correctly
1377
+ * @param decoder The decoder constructor
1378
+ */
1379
+ register(decoder: UnzipDecoderConstructor): void;
1380
+ /**
1381
+ * The handler to call whenever a file is discovered
1382
+ */
1383
+ onfile: UnzipFileHandler;
1384
+ }
1385
+ /**
1386
+ * Asynchronously decompresses a ZIP archive
1387
+ * @param data The raw compressed ZIP file
1388
+ * @param opts The ZIP extraction options
1389
+ * @param cb The callback to call with the decompressed files
1390
+ * @returns A function that can be used to immediately terminate the unzipping
1391
+ */
1392
+ export declare function unzip(data: Uint8Array, opts: AsyncUnzipOptions, cb: UnzipCallback): AsyncTerminable;
1393
+ /**
1394
+ * Asynchronously decompresses a ZIP archive
1395
+ * @param data The raw compressed ZIP file
1396
+ * @param cb The callback to call with the decompressed files
1397
+ * @returns A function that can be used to immediately terminate the unzipping
1398
+ */
1399
+ export declare function unzip(data: Uint8Array, cb: UnzipCallback): AsyncTerminable;
1400
+ /**
1401
+ * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better
1402
+ * performance with more than one file.
1403
+ * @param data The raw compressed ZIP file
1404
+ * @param opts The ZIP extraction options
1405
+ * @returns The decompressed files
1406
+ */
1407
+ export declare function unzipSync(data: Uint8Array, opts?: UnzipOptions): Unzipped;