adnbn 0.9.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (608) hide show
  1. package/dist/cli/builders/locale/LocaleBuilder.js +2 -11
  2. package/dist/cli/builders/locale/LocaleBuilder.js.map +1 -1
  3. package/dist/cli/builders/locale/index.js +1 -1
  4. package/dist/cli/builders/locale/index.js.map +1 -1
  5. package/dist/cli/builders/manifest/ManifestBase.d.ts +4 -1
  6. package/dist/cli/builders/manifest/ManifestBase.js +35 -6
  7. package/dist/cli/builders/manifest/ManifestBase.js.map +1 -1
  8. package/dist/cli/builders/manifest/ManifestV2.js +1 -1
  9. package/dist/cli/builders/manifest/ManifestV3.js +12 -5
  10. package/dist/cli/builders/manifest/ManifestV3.js.map +1 -1
  11. package/dist/cli/builders/manifest/utils/data-collection-permissions.d.ts +15 -0
  12. package/dist/cli/builders/manifest/utils/data-collection-permissions.js +26 -0
  13. package/dist/cli/builders/manifest/utils/data-collection-permissions.js.map +1 -0
  14. package/dist/cli/builders/manifest/utils/host-patterns.d.ts +1 -0
  15. package/dist/cli/builders/manifest/utils/host-patterns.js +40 -0
  16. package/dist/cli/builders/manifest/utils/host-patterns.js.map +1 -0
  17. package/dist/cli/builders/manifest/utils/index.d.ts +4 -0
  18. package/dist/cli/builders/manifest/utils/index.js +19 -0
  19. package/dist/cli/builders/manifest/utils/index.js.map +1 -0
  20. package/dist/cli/builders/manifest/utils/permissions.d.ts +14 -0
  21. package/dist/cli/builders/manifest/utils/permissions.js +34 -0
  22. package/dist/cli/builders/manifest/utils/permissions.js.map +1 -0
  23. package/dist/cli/builders/manifest/utils/web-accessible-resources.d.ts +2 -0
  24. package/dist/cli/builders/manifest/utils/web-accessible-resources.js +92 -0
  25. package/dist/cli/builders/manifest/utils/web-accessible-resources.js.map +1 -0
  26. package/dist/cli/bundler/plugins/build-assets-map/BuildAssetsMapPlugin.d.ts +14 -0
  27. package/dist/cli/bundler/plugins/build-assets-map/BuildAssetsMapPlugin.js +523 -0
  28. package/dist/cli/bundler/plugins/build-assets-map/BuildAssetsMapPlugin.js.map +1 -0
  29. package/dist/cli/bundler/plugins/build-assets-map/entrypoint-module.d.ts +13 -0
  30. package/dist/cli/bundler/plugins/build-assets-map/entrypoint-module.js +16 -0
  31. package/dist/cli/bundler/plugins/build-assets-map/entrypoint-module.js.map +1 -0
  32. package/dist/cli/bundler/plugins/build-assets-map/index.d.ts +3 -0
  33. package/dist/cli/bundler/plugins/build-assets-map/index.js +8 -0
  34. package/dist/cli/bundler/plugins/build-assets-map/index.js.map +1 -0
  35. package/dist/cli/bundler/plugins/build-assets-map/usage.d.ts +12 -0
  36. package/dist/cli/bundler/plugins/build-assets-map/usage.js +28 -0
  37. package/dist/cli/bundler/plugins/build-assets-map/usage.js.map +1 -0
  38. package/dist/cli/bundler/plugins/chunk-loader/ChunkLoaderPlugin.d.ts +9 -0
  39. package/dist/cli/bundler/plugins/chunk-loader/ChunkLoaderPlugin.js +43 -0
  40. package/dist/cli/bundler/plugins/chunk-loader/ChunkLoaderPlugin.js.map +1 -0
  41. package/dist/cli/bundler/plugins/chunk-loader/index.d.ts +1 -0
  42. package/dist/cli/bundler/plugins/chunk-loader/index.js +5 -0
  43. package/dist/cli/bundler/plugins/chunk-loader/index.js.map +1 -0
  44. package/dist/cli/bundler/plugins/chunk-loader/templates/runtime.template.d.ts +2 -0
  45. package/dist/cli/bundler/plugins/chunk-loader/templates.d.ts +7 -0
  46. package/dist/cli/bundler/plugins/chunk-loader/templates.js +30 -0
  47. package/dist/cli/bundler/plugins/{EntrypointPlugin.d.ts → entrypoint/EntrypointPlugin.d.ts} +7 -2
  48. package/dist/cli/bundler/plugins/{EntrypointPlugin.js → entrypoint/EntrypointPlugin.js} +46 -26
  49. package/dist/cli/bundler/plugins/entrypoint/EntrypointPlugin.js.map +1 -0
  50. package/dist/cli/bundler/plugins/entrypoint/index.d.ts +1 -0
  51. package/dist/cli/bundler/plugins/entrypoint/index.js +7 -0
  52. package/dist/cli/bundler/plugins/entrypoint/index.js.map +1 -0
  53. package/dist/cli/bundler/plugins/{GenerateJsonPlugin.d.ts → generate-json/GenerateJsonPlugin.d.ts} +1 -0
  54. package/dist/cli/bundler/plugins/generate-json/GenerateJsonPlugin.js +73 -0
  55. package/dist/cli/bundler/plugins/generate-json/GenerateJsonPlugin.js.map +1 -0
  56. package/dist/cli/bundler/plugins/generate-json/index.d.ts +1 -0
  57. package/dist/cli/bundler/plugins/generate-json/index.js +5 -0
  58. package/dist/cli/bundler/plugins/generate-json/index.js.map +1 -0
  59. package/dist/cli/bundler/plugins/generate-module/GenerateModulePlugin.d.ts +23 -0
  60. package/dist/cli/bundler/plugins/generate-module/GenerateModulePlugin.js +88 -0
  61. package/dist/cli/bundler/plugins/generate-module/GenerateModulePlugin.js.map +1 -0
  62. package/dist/cli/bundler/plugins/generate-module/index.d.ts +1 -0
  63. package/dist/cli/bundler/plugins/generate-module/index.js +7 -0
  64. package/dist/cli/bundler/plugins/generate-module/index.js.map +1 -0
  65. package/dist/cli/bundler/plugins/index.d.ts +11 -5
  66. package/dist/cli/bundler/plugins/index.js +32 -10
  67. package/dist/cli/bundler/plugins/index.js.map +1 -1
  68. package/dist/cli/bundler/plugins/isolated-styles/IsolatedStylesPlugin.d.ts +21 -0
  69. package/dist/cli/bundler/plugins/isolated-styles/IsolatedStylesPlugin.js +174 -0
  70. package/dist/cli/bundler/plugins/isolated-styles/IsolatedStylesPlugin.js.map +1 -0
  71. package/dist/cli/bundler/plugins/isolated-styles/index.d.ts +1 -0
  72. package/dist/cli/bundler/plugins/isolated-styles/index.js +5 -0
  73. package/dist/cli/bundler/plugins/isolated-styles/index.js.map +1 -0
  74. package/dist/cli/bundler/plugins/isolated-styles/templates/css-loader.template.d.ts +1 -0
  75. package/dist/cli/bundler/plugins/isolated-styles/templates/runtime.template.d.ts +7 -0
  76. package/dist/cli/bundler/plugins/isolated-styles/templates.d.ts +18 -0
  77. package/dist/cli/bundler/plugins/isolated-styles/templates.js +174 -0
  78. package/dist/cli/bundler/plugins/manifest/ManifestPlugin.d.ts +10 -0
  79. package/dist/cli/bundler/plugins/manifest/ManifestPlugin.js +55 -0
  80. package/dist/cli/bundler/plugins/manifest/ManifestPlugin.js.map +1 -0
  81. package/dist/cli/bundler/plugins/manifest/index.d.ts +1 -0
  82. package/dist/cli/bundler/plugins/manifest/index.js +6 -0
  83. package/dist/cli/bundler/plugins/manifest/index.js.map +1 -0
  84. package/dist/cli/bundler/plugins/replace/ReplacePlugin.js.map +1 -0
  85. package/dist/cli/bundler/plugins/replace/index.d.ts +1 -0
  86. package/dist/cli/bundler/plugins/replace/index.js +5 -0
  87. package/dist/cli/bundler/plugins/replace/index.js.map +1 -0
  88. package/dist/cli/bundler/plugins/resource-access/ResourceAccessPlugin.d.ts +19 -0
  89. package/dist/cli/bundler/plugins/resource-access/ResourceAccessPlugin.js +20 -0
  90. package/dist/cli/bundler/plugins/resource-access/ResourceAccessPlugin.js.map +1 -0
  91. package/dist/cli/bundler/plugins/resource-access/index.d.ts +1 -0
  92. package/dist/cli/bundler/plugins/resource-access/index.js +5 -0
  93. package/dist/cli/bundler/plugins/resource-access/index.js.map +1 -0
  94. package/dist/cli/bundler/plugins/resource-access/utils.d.ts +8 -0
  95. package/dist/cli/bundler/plugins/resource-access/utils.js +42 -0
  96. package/dist/cli/bundler/plugins/resource-access/utils.js.map +1 -0
  97. package/dist/cli/bundler/plugins/types.d.ts +4 -0
  98. package/dist/cli/bundler/plugins/types.js +1 -0
  99. package/dist/cli/bundler/plugins/types.js.map +1 -0
  100. package/dist/cli/bundler/plugins/utils/index.d.ts +3 -0
  101. package/dist/cli/bundler/plugins/utils/index.js +9 -0
  102. package/dist/cli/bundler/plugins/utils/index.js.map +1 -0
  103. package/dist/cli/bundler/plugins/utils/manifest-hooks.d.ts +13 -0
  104. package/dist/cli/bundler/plugins/utils/manifest-hooks.js +17 -0
  105. package/dist/cli/bundler/plugins/utils/manifest-hooks.js.map +1 -0
  106. package/dist/cli/bundler/plugins/utils/runtime-template.d.ts +1 -0
  107. package/dist/cli/bundler/plugins/utils/runtime-template.js +18 -0
  108. package/dist/cli/bundler/plugins/utils/runtime-template.js.map +1 -0
  109. package/dist/cli/bundler/plugins/utils/watch-compilation.d.ts +3 -0
  110. package/dist/cli/bundler/plugins/utils/watch-compilation.js +18 -0
  111. package/dist/cli/bundler/plugins/utils/watch-compilation.js.map +1 -0
  112. package/dist/cli/bundler/plugins/watch/WatchPlugin.js +16 -0
  113. package/dist/cli/bundler/plugins/watch/WatchPlugin.js.map +1 -0
  114. package/dist/cli/bundler/plugins/watch/index.d.ts +1 -0
  115. package/dist/cli/bundler/plugins/watch/index.js +5 -0
  116. package/dist/cli/bundler/plugins/watch/index.js.map +1 -0
  117. package/dist/cli/bundler/utils/chunk-filename.d.ts +6 -0
  118. package/dist/cli/bundler/utils/chunk-filename.js +93 -0
  119. package/dist/cli/bundler/utils/chunk-filename.js.map +1 -0
  120. package/dist/cli/bundler/utils/index.d.ts +2 -0
  121. package/dist/cli/bundler/utils/index.js +2 -0
  122. package/dist/cli/bundler/utils/index.js.map +1 -1
  123. package/dist/cli/bundler/utils/layers.d.ts +4 -0
  124. package/dist/cli/bundler/utils/layers.js +10 -0
  125. package/dist/cli/bundler/utils/layers.js.map +1 -0
  126. package/dist/cli/bundler/utils/output.d.ts +6 -2
  127. package/dist/cli/bundler/utils/output.js +165 -7
  128. package/dist/cli/bundler/utils/output.js.map +1 -1
  129. package/dist/cli/bundler/utils/styles.d.ts +5 -0
  130. package/dist/cli/bundler/utils/styles.js +30 -0
  131. package/dist/cli/bundler/utils/styles.js.map +1 -0
  132. package/dist/cli/entrypoint/file/ExpressionFile.d.ts +4 -1
  133. package/dist/cli/entrypoint/file/ExpressionFile.js +11 -0
  134. package/dist/cli/entrypoint/file/ExpressionFile.js.map +1 -1
  135. package/dist/cli/entrypoint/file/OptionFile.d.ts +4 -2
  136. package/dist/cli/entrypoint/file/OptionFile.js +35 -31
  137. package/dist/cli/entrypoint/file/OptionFile.js.map +1 -1
  138. package/dist/cli/entrypoint/file/SourceFile.d.ts +18 -7
  139. package/dist/cli/entrypoint/file/SourceFile.js +260 -156
  140. package/dist/cli/entrypoint/file/SourceFile.js.map +1 -1
  141. package/dist/cli/entrypoint/file/index.d.ts +2 -0
  142. package/dist/cli/entrypoint/file/index.js +2 -0
  143. package/dist/cli/entrypoint/file/index.js.map +1 -1
  144. package/dist/cli/entrypoint/file/injectors/core.js +22 -1
  145. package/dist/cli/entrypoint/file/injectors/core.js.map +1 -1
  146. package/dist/cli/entrypoint/file/parsers/ExportParser.d.ts +14 -0
  147. package/dist/cli/entrypoint/file/parsers/ExportParser.js +71 -0
  148. package/dist/cli/entrypoint/file/parsers/ExportParser.js.map +1 -0
  149. package/dist/cli/entrypoint/file/parsers/NodeFinder.d.ts +2 -0
  150. package/dist/cli/entrypoint/file/parsers/NodeFinder.js +9 -0
  151. package/dist/cli/entrypoint/file/parsers/NodeFinder.js.map +1 -1
  152. package/dist/cli/entrypoint/file/parsers/ObjectParser.js +5 -1
  153. package/dist/cli/entrypoint/file/parsers/ObjectParser.js.map +1 -1
  154. package/dist/cli/entrypoint/file/parsers/index.d.ts +1 -0
  155. package/dist/cli/entrypoint/file/parsers/index.js +2 -0
  156. package/dist/cli/entrypoint/file/parsers/index.js.map +1 -1
  157. package/dist/cli/entrypoint/file/parsers/types.d.ts +16 -0
  158. package/dist/cli/entrypoint/file/parsers/types.js +13 -0
  159. package/dist/cli/entrypoint/file/parsers/types.js.map +1 -1
  160. package/dist/cli/entrypoint/file/resolvers/ImportResolver.d.ts +1 -0
  161. package/dist/cli/entrypoint/file/resolvers/ImportResolver.js +3 -0
  162. package/dist/cli/entrypoint/file/resolvers/ImportResolver.js.map +1 -1
  163. package/dist/cli/entrypoint/file/types.d.ts +26 -1
  164. package/dist/cli/entrypoint/finder/AbstractEntrypointFinder.d.ts +2 -2
  165. package/dist/cli/entrypoint/finder/AbstractEntrypointFinder.js +2 -2
  166. package/dist/cli/entrypoint/finder/AbstractEntrypointFinder.js.map +1 -1
  167. package/dist/cli/entrypoint/finder/{AbstractOptionsFinder.js → AbstractParsedFinder.js} +3 -3
  168. package/dist/cli/entrypoint/finder/AbstractParsedFinder.js.map +1 -0
  169. package/dist/cli/entrypoint/finder/OptionsFinder.d.ts +13 -0
  170. package/dist/cli/entrypoint/finder/OptionsFinder.js +33 -0
  171. package/dist/cli/entrypoint/finder/OptionsFinder.js.map +1 -0
  172. package/dist/cli/entrypoint/finder/PluginFinder.d.ts +4 -4
  173. package/dist/cli/entrypoint/finder/PluginFinder.js +2 -2
  174. package/dist/cli/entrypoint/finder/PluginFinder.js.map +1 -1
  175. package/dist/cli/entrypoint/finder/index.d.ts +2 -1
  176. package/dist/cli/entrypoint/finder/index.js +20 -18
  177. package/dist/cli/entrypoint/finder/index.js.map +1 -1
  178. package/dist/cli/entrypoint/parser/AbstractParser.d.ts +3 -2
  179. package/dist/cli/entrypoint/parser/AbstractParser.js +6 -3
  180. package/dist/cli/entrypoint/parser/AbstractParser.js.map +1 -1
  181. package/dist/cli/entrypoint/parser/CommandParser.js +1 -1
  182. package/dist/cli/entrypoint/parser/CommandParser.js.map +1 -1
  183. package/dist/cli/entrypoint/parser/ContentParser.d.ts +5 -1
  184. package/dist/cli/entrypoint/parser/ContentParser.js +55 -3
  185. package/dist/cli/entrypoint/parser/ContentParser.js.map +1 -1
  186. package/dist/cli/entrypoint/parser/OptionsParser.d.ts +6 -0
  187. package/dist/cli/entrypoint/parser/OptionsParser.js +16 -0
  188. package/dist/cli/entrypoint/parser/OptionsParser.js.map +1 -0
  189. package/dist/cli/entrypoint/parser/RelayParser.d.ts +21 -2
  190. package/dist/cli/entrypoint/parser/RelayParser.js +4 -0
  191. package/dist/cli/entrypoint/parser/RelayParser.js.map +1 -1
  192. package/dist/cli/entrypoint/parser/index.d.ts +1 -0
  193. package/dist/cli/entrypoint/parser/index.js +16 -14
  194. package/dist/cli/entrypoint/parser/index.js.map +1 -1
  195. package/dist/cli/plugins/asset.js +9 -4
  196. package/dist/cli/plugins/asset.js.map +1 -1
  197. package/dist/cli/plugins/background/index.js +1 -1
  198. package/dist/cli/plugins/background/index.js.map +1 -1
  199. package/dist/cli/plugins/content/Content.d.ts +1 -1
  200. package/dist/cli/plugins/content/Content.js +3 -2
  201. package/dist/cli/plugins/content/Content.js.map +1 -1
  202. package/dist/cli/plugins/content/ContentManager.d.ts +8 -5
  203. package/dist/cli/plugins/content/ContentManager.js +79 -28
  204. package/dist/cli/plugins/content/ContentManager.js.map +1 -1
  205. package/dist/cli/plugins/content/ContentName.d.ts +1 -1
  206. package/dist/cli/plugins/content/ContentName.js +8 -7
  207. package/dist/cli/plugins/content/ContentName.js.map +1 -1
  208. package/dist/cli/plugins/content/Relay.d.ts +1 -1
  209. package/dist/cli/plugins/content/Relay.js +3 -2
  210. package/dist/cli/plugins/content/Relay.js.map +1 -1
  211. package/dist/cli/plugins/content/bundler.d.ts +7 -0
  212. package/dist/cli/plugins/content/bundler.js +47 -0
  213. package/dist/cli/plugins/content/bundler.js.map +1 -0
  214. package/dist/cli/plugins/content/index.js +121 -62
  215. package/dist/cli/plugins/content/index.js.map +1 -1
  216. package/dist/cli/plugins/content/relay-module.d.ts +3 -0
  217. package/dist/cli/plugins/content/relay-module.js +11 -0
  218. package/dist/cli/plugins/content/relay-module.js.map +1 -0
  219. package/dist/cli/plugins/content/types.d.ts +1 -1
  220. package/dist/cli/plugins/content/utils.d.ts +2 -0
  221. package/dist/cli/plugins/content/utils.js +8 -1
  222. package/dist/cli/plugins/content/utils.js.map +1 -1
  223. package/dist/cli/plugins/icon/declaration/IconDeclaration.d.ts +1 -1
  224. package/dist/cli/plugins/icon/declaration/IconDeclaration.js +6 -6
  225. package/dist/cli/plugins/icon/declaration/IconDeclaration.js.map +1 -1
  226. package/dist/cli/plugins/icon/declaration/icon.d.ts +3 -5
  227. package/dist/cli/plugins/icon/icon-module.d.ts +2 -0
  228. package/dist/cli/plugins/icon/icon-module.js +11 -0
  229. package/dist/cli/plugins/icon/icon-module.js.map +1 -0
  230. package/dist/cli/plugins/icon/index.js +5 -3
  231. package/dist/cli/plugins/icon/index.js.map +1 -1
  232. package/dist/cli/plugins/index.d.ts +1 -0
  233. package/dist/cli/plugins/index.js +22 -20
  234. package/dist/cli/plugins/index.js.map +1 -1
  235. package/dist/cli/plugins/locale/Locale.d.ts +9 -2
  236. package/dist/cli/plugins/locale/Locale.js +37 -5
  237. package/dist/cli/plugins/locale/Locale.js.map +1 -1
  238. package/dist/cli/plugins/locale/declaration/locale.d.ts +1 -1
  239. package/dist/cli/plugins/locale/index.js +57 -22
  240. package/dist/cli/plugins/locale/index.js.map +1 -1
  241. package/dist/cli/plugins/locale/locale-module.d.ts +4 -0
  242. package/dist/cli/plugins/locale/locale-module.js +16 -0
  243. package/dist/cli/plugins/locale/locale-module.js.map +1 -0
  244. package/dist/cli/plugins/offscreen/Offscreen.d.ts +2 -3
  245. package/dist/cli/plugins/offscreen/Offscreen.js.map +1 -1
  246. package/dist/cli/plugins/offscreen/index.js +5 -4
  247. package/dist/cli/plugins/offscreen/index.js.map +1 -1
  248. package/dist/cli/plugins/offscreen/offscreen-module.d.ts +3 -0
  249. package/dist/cli/plugins/offscreen/offscreen-module.js +11 -0
  250. package/dist/cli/plugins/offscreen/offscreen-module.js.map +1 -0
  251. package/dist/cli/plugins/options/Options.d.ts +10 -0
  252. package/dist/cli/plugins/options/Options.js +24 -0
  253. package/dist/cli/plugins/options/Options.js.map +1 -0
  254. package/dist/cli/plugins/options/index.d.ts +2 -0
  255. package/dist/cli/plugins/options/index.js +41 -0
  256. package/dist/cli/plugins/options/index.js.map +1 -0
  257. package/dist/cli/plugins/output.js +33 -3
  258. package/dist/cli/plugins/output.js.map +1 -1
  259. package/dist/cli/plugins/page/declaration/PageDeclaration.js +4 -4
  260. package/dist/cli/plugins/page/declaration/PageDeclaration.js.map +1 -1
  261. package/dist/cli/plugins/page/declaration/page.d.ts +3 -3
  262. package/dist/cli/plugins/page/index.js +14 -10
  263. package/dist/cli/plugins/page/index.js.map +1 -1
  264. package/dist/cli/plugins/page/page-module.d.ts +2 -0
  265. package/dist/cli/plugins/page/page-module.js +11 -0
  266. package/dist/cli/plugins/page/page-module.js.map +1 -0
  267. package/dist/cli/plugins/popup/Popup.d.ts +1 -1
  268. package/dist/cli/plugins/popup/Popup.js +2 -2
  269. package/dist/cli/plugins/popup/Popup.js.map +1 -1
  270. package/dist/cli/plugins/popup/declaration/PopupDeclaration.d.ts +1 -1
  271. package/dist/cli/plugins/popup/declaration/PopupDeclaration.js +6 -6
  272. package/dist/cli/plugins/popup/declaration/PopupDeclaration.js.map +1 -1
  273. package/dist/cli/plugins/popup/declaration/popup.d.ts +3 -3
  274. package/dist/cli/plugins/popup/index.js +6 -5
  275. package/dist/cli/plugins/popup/index.js.map +1 -1
  276. package/dist/cli/plugins/popup/popup-module.d.ts +3 -0
  277. package/dist/cli/plugins/popup/popup-module.js +11 -0
  278. package/dist/cli/plugins/popup/popup-module.js.map +1 -0
  279. package/dist/cli/plugins/sandbox/Sandbox.d.ts +1 -2
  280. package/dist/cli/plugins/sandbox/Sandbox.js.map +1 -1
  281. package/dist/cli/plugins/sandbox/index.js +5 -4
  282. package/dist/cli/plugins/sandbox/index.js.map +1 -1
  283. package/dist/cli/plugins/sandbox/sandbox-module.d.ts +3 -0
  284. package/dist/cli/plugins/sandbox/sandbox-module.js +11 -0
  285. package/dist/cli/plugins/sandbox/sandbox-module.js.map +1 -0
  286. package/dist/cli/plugins/sidebar/Sidebar.d.ts +1 -1
  287. package/dist/cli/plugins/sidebar/Sidebar.js +2 -2
  288. package/dist/cli/plugins/sidebar/Sidebar.js.map +1 -1
  289. package/dist/cli/plugins/sidebar/declaration/SidebarDeclaration.d.ts +1 -1
  290. package/dist/cli/plugins/sidebar/declaration/SidebarDeclaration.js +6 -6
  291. package/dist/cli/plugins/sidebar/declaration/SidebarDeclaration.js.map +1 -1
  292. package/dist/cli/plugins/sidebar/declaration/sidebar.d.ts +3 -3
  293. package/dist/cli/plugins/sidebar/index.js +6 -5
  294. package/dist/cli/plugins/sidebar/index.js.map +1 -1
  295. package/dist/cli/plugins/sidebar/sidebar-module.d.ts +3 -0
  296. package/dist/cli/plugins/sidebar/sidebar-module.js +11 -0
  297. package/dist/cli/plugins/sidebar/sidebar-module.js.map +1 -0
  298. package/dist/cli/plugins/style/index.d.ts +2 -1
  299. package/dist/cli/plugins/style/index.js +52 -25
  300. package/dist/cli/plugins/style/index.js.map +1 -1
  301. package/dist/cli/plugins/style/types.d.ts +5 -0
  302. package/dist/cli/plugins/style/types.js +1 -0
  303. package/dist/cli/plugins/style/types.js.map +1 -0
  304. package/dist/cli/plugins/view/index.js +1 -1
  305. package/dist/cli/plugins/view/index.js.map +1 -1
  306. package/dist/cli/raw.d.ts +4 -0
  307. package/dist/cli/resolvers/bundler.js +9 -7
  308. package/dist/cli/resolvers/bundler.js.map +1 -1
  309. package/dist/cli/resolvers/config.js +4 -1
  310. package/dist/cli/resolvers/config.js.map +1 -1
  311. package/dist/cli/virtual/index.d.ts +2 -2
  312. package/dist/cli/virtual/index.js +11 -8
  313. package/dist/cli/virtual/virtual.d.ts +8 -10
  314. package/dist/entry/content/adapters/react/Builder.js +1 -1
  315. package/dist/entry/content/adapters/react/Builder.js.map +1 -1
  316. package/dist/entry/content/adapters/react/Node.d.ts +2 -0
  317. package/dist/entry/content/adapters/react/Node.js +10 -2
  318. package/dist/entry/content/adapters/react/Node.js.map +1 -1
  319. package/dist/entry/content/adapters/vanilla/Builder.js +1 -1
  320. package/dist/entry/content/adapters/vanilla/Builder.js.map +1 -1
  321. package/dist/entry/content/adapters/vanilla/Node.d.ts +2 -1
  322. package/dist/entry/content/adapters/vanilla/Node.js +10 -7
  323. package/dist/entry/content/adapters/vanilla/Node.js.map +1 -1
  324. package/dist/entry/content/core/Builder.d.ts +1 -2
  325. package/dist/entry/content/core/Builder.js +9 -5
  326. package/dist/entry/content/core/Builder.js.map +1 -1
  327. package/dist/entry/content/core/MountBuilder.js +14 -6
  328. package/dist/entry/content/core/MountBuilder.js.map +1 -1
  329. package/dist/entry/content/core/{Context.d.ts → context/Context.d.ts} +2 -1
  330. package/dist/entry/content/core/{Context.js → context/Context.js} +7 -0
  331. package/dist/entry/content/core/context/Context.js.map +1 -0
  332. package/dist/entry/content/core/{EventEmitter.d.ts → context/EventEmitter.d.ts} +1 -1
  333. package/dist/entry/content/core/{EventEmitter.js → context/EventEmitter.js} +1 -1
  334. package/dist/entry/content/core/context/EventEmitter.js.map +1 -0
  335. package/dist/entry/content/core/{ManagedContext.d.ts → context/ManagedContext.d.ts} +1 -1
  336. package/dist/entry/content/core/context/ManagedContext.js.map +1 -0
  337. package/dist/entry/content/core/context/index.d.ts +3 -0
  338. package/dist/entry/content/core/context/index.js +9 -0
  339. package/dist/entry/content/core/context/index.js.map +1 -0
  340. package/dist/entry/content/core/{AbstractMarker.d.ts → markers/AbstractMarker.d.ts} +1 -1
  341. package/dist/entry/content/core/{AbstractMarker.js → markers/AbstractMarker.js} +1 -1
  342. package/dist/entry/content/core/markers/AbstractMarker.js.map +1 -0
  343. package/dist/entry/content/core/{AttributeMarker.d.ts → markers/AttributeMarker.d.ts} +1 -1
  344. package/dist/entry/content/core/markers/AttributeMarker.js.map +1 -0
  345. package/dist/entry/content/core/{WeakMarker.d.ts → markers/WeakMarker.d.ts} +1 -1
  346. package/dist/entry/content/core/markers/WeakMarker.js.map +1 -0
  347. package/dist/entry/content/core/markers/index.d.ts +3 -0
  348. package/dist/entry/content/core/markers/index.js +9 -0
  349. package/dist/entry/content/core/markers/index.js.map +1 -0
  350. package/dist/entry/content/core/{EventNode.d.ts → nodes/EventNode.d.ts} +2 -1
  351. package/dist/entry/content/core/{EventNode.js → nodes/EventNode.js} +3 -0
  352. package/dist/entry/content/core/nodes/EventNode.js.map +1 -0
  353. package/dist/entry/content/core/nodes/FrameNode.d.ts +23 -0
  354. package/dist/entry/content/core/nodes/FrameNode.js +125 -0
  355. package/dist/entry/content/core/nodes/FrameNode.js.map +1 -0
  356. package/dist/entry/content/core/{MarkerNode.d.ts → nodes/MarkerNode.d.ts} +2 -1
  357. package/dist/entry/content/core/{MarkerNode.js → nodes/MarkerNode.js} +3 -0
  358. package/dist/entry/content/core/nodes/MarkerNode.js.map +1 -0
  359. package/dist/entry/content/core/{MountNode.d.ts → nodes/MountNode.d.ts} +2 -1
  360. package/dist/entry/content/core/{MountNode.js → nodes/MountNode.js} +3 -0
  361. package/dist/entry/content/core/nodes/MountNode.js.map +1 -0
  362. package/dist/entry/content/core/{Node.d.ts → nodes/Node.d.ts} +2 -1
  363. package/dist/entry/content/core/{Node.js → nodes/Node.js} +3 -0
  364. package/dist/entry/content/core/nodes/Node.js.map +1 -0
  365. package/dist/entry/content/core/nodes/ShadowNode.d.ts +14 -0
  366. package/dist/entry/content/core/nodes/ShadowNode.js +67 -0
  367. package/dist/entry/content/core/nodes/ShadowNode.js.map +1 -0
  368. package/dist/entry/content/core/nodes/index.d.ts +6 -0
  369. package/dist/entry/content/core/nodes/index.js +15 -0
  370. package/dist/entry/content/core/nodes/index.js.map +1 -0
  371. package/dist/entry/content/core/nodes/isolated-styles.d.ts +2 -0
  372. package/dist/entry/content/core/nodes/isolated-styles.js +14 -0
  373. package/dist/entry/content/core/nodes/isolated-styles.js.map +1 -0
  374. package/dist/entry/content/core/resolvers/watch.js +1 -1
  375. package/dist/entry/content/core/resolvers/watch.js.map +1 -1
  376. package/dist/entry/content/frame/Builder.d.ts +7 -0
  377. package/dist/entry/content/frame/Builder.js +14 -0
  378. package/dist/entry/content/frame/Builder.js.map +1 -0
  379. package/dist/entry/content/frame/index.d.ts +4 -0
  380. package/dist/entry/content/frame/index.js +7 -0
  381. package/dist/entry/content/frame/index.js.map +1 -0
  382. package/dist/entry/relay/Builder.js +5 -1
  383. package/dist/entry/relay/Builder.js.map +1 -1
  384. package/dist/entry/relay/index.d.ts +1 -1
  385. package/dist/locale/adapters/react/ReactLocale.d.ts +18 -0
  386. package/dist/locale/adapters/react/ReactLocale.js +41 -0
  387. package/dist/locale/adapters/react/ReactLocale.js.map +1 -0
  388. package/dist/locale/adapters/react/hooks/use-locale-attributes.d.ts +7 -0
  389. package/dist/locale/adapters/react/hooks/use-locale-attributes.js +30 -0
  390. package/dist/locale/adapters/react/hooks/use-locale-attributes.js.map +1 -0
  391. package/dist/locale/adapters/react/hooks/use-locale.d.ts +3 -0
  392. package/dist/locale/adapters/react/hooks/use-locale.js +17 -0
  393. package/dist/locale/adapters/react/hooks/use-locale.js.map +1 -0
  394. package/dist/locale/adapters/react/hooks/use-native-locale.d.ts +3 -0
  395. package/dist/locale/adapters/react/hooks/use-native-locale.js +10 -0
  396. package/dist/locale/adapters/react/hooks/use-native-locale.js.map +1 -0
  397. package/dist/locale/adapters/react/index.d.ts +4 -2
  398. package/dist/locale/adapters/react/index.js +6 -4
  399. package/dist/locale/adapters/react/index.js.map +1 -1
  400. package/dist/locale/adapters/react/types.d.ts +22 -0
  401. package/dist/locale/adapters/react/types.js +1 -0
  402. package/dist/locale/adapters/react/types.js.map +1 -0
  403. package/dist/locale/helpers.d.ts +4 -5
  404. package/dist/locale/helpers.js +1 -1
  405. package/dist/locale/helpers.js.map +1 -1
  406. package/dist/locale/index.d.ts +2 -1
  407. package/dist/locale/index.js +1 -0
  408. package/dist/locale/index.js.map +1 -1
  409. package/dist/locale/providers/AbstractLocale.d.ts +4 -4
  410. package/dist/locale/providers/AbstractLocale.js +13 -94
  411. package/dist/locale/providers/AbstractLocale.js.map +1 -1
  412. package/dist/locale/providers/CustomLocale.d.ts +3 -3
  413. package/dist/locale/providers/CustomLocale.js +6 -5
  414. package/dist/locale/providers/CustomLocale.js.map +1 -1
  415. package/dist/locale/providers/DynamicLocale.d.ts +18 -11
  416. package/dist/locale/providers/DynamicLocale.js +60 -47
  417. package/dist/locale/providers/DynamicLocale.js.map +1 -1
  418. package/dist/locale/providers/NativeLocale.d.ts +4 -7
  419. package/dist/locale/providers/NativeLocale.js +5 -14
  420. package/dist/locale/providers/NativeLocale.js.map +1 -1
  421. package/dist/locale/providers/ObservableLocale.d.ts +35 -0
  422. package/dist/locale/providers/ObservableLocale.js +179 -0
  423. package/dist/locale/providers/ObservableLocale.js.map +1 -0
  424. package/dist/locale/providers/index.d.ts +2 -1
  425. package/dist/locale/providers/index.js +3 -1
  426. package/dist/locale/providers/index.js.map +1 -1
  427. package/dist/locale/storage/LocaleStorage.d.ts +11 -0
  428. package/dist/locale/storage/LocaleStorage.js +40 -0
  429. package/dist/locale/storage/LocaleStorage.js.map +1 -0
  430. package/dist/locale/storage/index.d.ts +1 -0
  431. package/dist/locale/storage/index.js +5 -0
  432. package/dist/locale/storage/index.js.map +1 -0
  433. package/dist/main/entrypoint.d.ts +4 -0
  434. package/dist/main/entrypoint.js +20 -0
  435. package/dist/main/entrypoint.js.map +1 -0
  436. package/dist/main/icon.d.ts +2 -3
  437. package/dist/main/icon.js +2 -1
  438. package/dist/main/icon.js.map +1 -1
  439. package/dist/main/index.d.ts +2 -0
  440. package/dist/main/index.js +2 -0
  441. package/dist/main/index.js.map +1 -1
  442. package/dist/main/offscreen.d.ts +2 -5
  443. package/dist/main/offscreen.js +5 -2
  444. package/dist/main/offscreen.js.map +1 -1
  445. package/dist/main/options.d.ts +3 -0
  446. package/dist/main/options.js +7 -0
  447. package/dist/main/options.js.map +1 -0
  448. package/dist/main/page.d.ts +2 -4
  449. package/dist/main/page.js +2 -1
  450. package/dist/main/page.js.map +1 -1
  451. package/dist/main/popup.d.ts +2 -5
  452. package/dist/main/popup.js +3 -3
  453. package/dist/main/popup.js.map +1 -1
  454. package/dist/main/relay.d.ts +1 -2
  455. package/dist/main/relay.js +2 -1
  456. package/dist/main/relay.js.map +1 -1
  457. package/dist/main/sandbox.d.ts +1 -4
  458. package/dist/main/sandbox.js +2 -1
  459. package/dist/main/sandbox.js.map +1 -1
  460. package/dist/main/service.d.ts +1 -2
  461. package/dist/main/service.js.map +1 -1
  462. package/dist/main/sidebar.d.ts +2 -5
  463. package/dist/main/sidebar.js +3 -3
  464. package/dist/main/sidebar.js.map +1 -1
  465. package/dist/message/index.d.ts +2 -4
  466. package/dist/message/index.js.map +1 -1
  467. package/dist/offscreen/index.d.ts +2 -6
  468. package/dist/offscreen/index.js.map +1 -1
  469. package/dist/relay/index.d.ts +2 -5
  470. package/dist/relay/index.js.map +1 -1
  471. package/dist/sandbox/index.d.ts +1 -5
  472. package/dist/sandbox/index.js.map +1 -1
  473. package/dist/service/index.d.ts +2 -6
  474. package/dist/service/index.js.map +1 -1
  475. package/dist/shared/content/index.d.ts +1 -0
  476. package/dist/shared/content/index.js +6 -0
  477. package/dist/shared/content/index.js.map +1 -0
  478. package/dist/shared/content/isolation.d.ts +4 -0
  479. package/dist/shared/content/isolation.js +70 -0
  480. package/dist/shared/content/isolation.js.map +1 -0
  481. package/dist/shared/locale/index.d.ts +5 -0
  482. package/dist/shared/locale/index.js +21 -0
  483. package/dist/shared/locale/index.js.map +1 -0
  484. package/dist/shared/locale/keys.d.ts +5 -0
  485. package/dist/shared/locale/keys.js +33 -0
  486. package/dist/shared/locale/keys.js.map +1 -0
  487. package/dist/shared/locale/language.d.ts +4 -0
  488. package/dist/shared/locale/language.js +23 -0
  489. package/dist/shared/locale/language.js.map +1 -0
  490. package/dist/shared/locale/messages.d.ts +3 -0
  491. package/dist/shared/locale/messages.js +9 -0
  492. package/dist/shared/locale/messages.js.map +1 -0
  493. package/dist/shared/locale/plural.d.ts +2 -0
  494. package/dist/shared/locale/plural.js +81 -0
  495. package/dist/shared/locale/plural.js.map +1 -0
  496. package/dist/shared/locale/substitutions.d.ts +10 -0
  497. package/dist/shared/locale/substitutions.js +32 -0
  498. package/dist/shared/locale/substitutions.js.map +1 -0
  499. package/dist/types/background.d.ts +1 -1
  500. package/dist/types/background.js.map +1 -1
  501. package/dist/types/command.d.ts +1 -1
  502. package/dist/types/command.js.map +1 -1
  503. package/dist/types/content.d.ts +120 -31
  504. package/dist/types/content.js +22 -1
  505. package/dist/types/content.js.map +1 -1
  506. package/dist/types/entrypoint.d.ts +20 -0
  507. package/dist/types/entrypoint.js +4 -0
  508. package/dist/types/entrypoint.js.map +1 -1
  509. package/dist/types/icon.d.ts +8 -0
  510. package/dist/types/icon.js.map +1 -1
  511. package/dist/types/language.d.ts +57 -0
  512. package/dist/types/language.js +62 -0
  513. package/dist/types/language.js.map +1 -0
  514. package/dist/types/locale.d.ts +34 -63
  515. package/dist/types/locale.js +62 -119
  516. package/dist/types/locale.js.map +1 -1
  517. package/dist/types/manifest.d.ts +24 -7
  518. package/dist/types/manifest.js.map +1 -1
  519. package/dist/types/message.d.ts +7 -0
  520. package/dist/types/message.js.map +1 -1
  521. package/dist/types/offscreen.d.ts +14 -1
  522. package/dist/types/offscreen.js.map +1 -1
  523. package/dist/types/options.d.ts +9 -0
  524. package/dist/types/options.js +1 -0
  525. package/dist/types/options.js.map +1 -0
  526. package/dist/types/page.d.ts +8 -0
  527. package/dist/types/plugin.d.ts +2 -1
  528. package/dist/types/popup.d.ts +9 -0
  529. package/dist/types/relay.d.ts +16 -7
  530. package/dist/types/relay.js.map +1 -1
  531. package/dist/types/sandbox.d.ts +12 -0
  532. package/dist/types/sandbox.js.map +1 -1
  533. package/dist/types/service.d.ts +10 -1
  534. package/dist/types/service.js.map +1 -1
  535. package/dist/types/sidebar.d.ts +9 -0
  536. package/dist/types/sidebar.js.map +1 -1
  537. package/dist/types/transport.d.ts +4 -0
  538. package/dist/virtual/entrypoint.d.ts +5 -0
  539. package/dist/virtual/entrypoint.js +7 -0
  540. package/dist/virtual/entrypoint.js.map +1 -0
  541. package/dist/virtual/icon.d.ts +2 -0
  542. package/dist/virtual/icon.js +5 -0
  543. package/dist/virtual/icon.js.map +1 -0
  544. package/dist/virtual/locale.d.ts +7 -0
  545. package/dist/virtual/locale.js +13 -0
  546. package/dist/virtual/locale.js.map +1 -0
  547. package/dist/virtual/modules.d.ts +40 -0
  548. package/dist/virtual/offscreen.d.ts +3 -0
  549. package/dist/virtual/offscreen.js +5 -0
  550. package/dist/virtual/offscreen.js.map +1 -0
  551. package/dist/virtual/page.d.ts +2 -0
  552. package/dist/virtual/page.js +5 -0
  553. package/dist/virtual/page.js.map +1 -0
  554. package/dist/virtual/popup.d.ts +3 -0
  555. package/dist/virtual/popup.js +5 -0
  556. package/dist/virtual/popup.js.map +1 -0
  557. package/dist/virtual/relay.d.ts +3 -0
  558. package/dist/virtual/relay.js +5 -0
  559. package/dist/virtual/relay.js.map +1 -0
  560. package/dist/virtual/sandbox.d.ts +3 -0
  561. package/dist/virtual/sandbox.js +5 -0
  562. package/dist/virtual/sandbox.js.map +1 -0
  563. package/dist/virtual/sidebar.d.ts +3 -0
  564. package/dist/virtual/sidebar.js +5 -0
  565. package/dist/virtual/sidebar.js.map +1 -0
  566. package/package.json +31 -10
  567. package/scripts/clean-dist.js +7 -0
  568. package/scripts/copy-dts.js +11 -1
  569. package/types/client.d.ts +15 -0
  570. package/dist/cli/builders/manifest/utils.d.ts +0 -32
  571. package/dist/cli/builders/manifest/utils.js +0 -209
  572. package/dist/cli/builders/manifest/utils.js.map +0 -1
  573. package/dist/cli/bundler/plugins/EntrypointPlugin.js.map +0 -1
  574. package/dist/cli/bundler/plugins/GenerateJsonPlugin.js +0 -40
  575. package/dist/cli/bundler/plugins/GenerateJsonPlugin.js.map +0 -1
  576. package/dist/cli/bundler/plugins/ManifestPlugin.d.ts +0 -10
  577. package/dist/cli/bundler/plugins/ManifestPlugin.js +0 -78
  578. package/dist/cli/bundler/plugins/ManifestPlugin.js.map +0 -1
  579. package/dist/cli/bundler/plugins/ReplacePlugin.js.map +0 -1
  580. package/dist/cli/bundler/plugins/WatchPlugin.js +0 -21
  581. package/dist/cli/bundler/plugins/WatchPlugin.js.map +0 -1
  582. package/dist/cli/entrypoint/finder/AbstractOptionsFinder.js.map +0 -1
  583. package/dist/entry/content/core/AbstractMarker.js.map +0 -1
  584. package/dist/entry/content/core/AttributeMarker.js.map +0 -1
  585. package/dist/entry/content/core/Context.js.map +0 -1
  586. package/dist/entry/content/core/EventEmitter.js.map +0 -1
  587. package/dist/entry/content/core/EventNode.js.map +0 -1
  588. package/dist/entry/content/core/ManagedContext.js.map +0 -1
  589. package/dist/entry/content/core/MarkerNode.js.map +0 -1
  590. package/dist/entry/content/core/MountNode.js.map +0 -1
  591. package/dist/entry/content/core/Node.js.map +0 -1
  592. package/dist/entry/content/core/WeakMarker.js.map +0 -1
  593. package/dist/locale/adapters/react/LocaleProvider.d.ts +0 -7
  594. package/dist/locale/adapters/react/LocaleProvider.js +0 -58
  595. package/dist/locale/adapters/react/LocaleProvider.js.map +0 -1
  596. package/dist/locale/adapters/react/context.d.ts +0 -14
  597. package/dist/locale/adapters/react/context.js +0 -25
  598. package/dist/locale/adapters/react/context.js.map +0 -1
  599. package/dist/locale/utils.d.ts +0 -11
  600. package/dist/locale/utils.js +0 -67
  601. package/dist/locale/utils.js.map +0 -1
  602. /package/dist/cli/bundler/plugins/{ReplacePlugin.d.ts → replace/ReplacePlugin.d.ts} +0 -0
  603. /package/dist/cli/bundler/plugins/{ReplacePlugin.js → replace/ReplacePlugin.js} +0 -0
  604. /package/dist/cli/bundler/plugins/{WatchPlugin.d.ts → watch/WatchPlugin.d.ts} +0 -0
  605. /package/dist/cli/entrypoint/finder/{AbstractOptionsFinder.d.ts → AbstractParsedFinder.d.ts} +0 -0
  606. /package/dist/entry/content/core/{ManagedContext.js → context/ManagedContext.js} +0 -0
  607. /package/dist/entry/content/core/{AttributeMarker.js → markers/AttributeMarker.js} +0 -0
  608. /package/dist/entry/content/core/{WeakMarker.js → markers/WeakMarker.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/message.ts"],"sourcesContent":["export const MessageGlobalKey = \"adnbnMessage\";\n\nexport const MessageTypeSeparator = \":\";\n\nexport const MessageSenderProperty = \"$sender\";\n\nexport const MessageResultEnvelopeProperty = \"__adnbnEnvelope\";\n\nexport type MessageSender = chrome.runtime.MessageSender;\n\nexport type MessageSendOptions = number | {tabId: number; frameId?: number; documentId?: string};\n\nexport interface MessageDictionary {\n [key: string]: (data: any) => any;\n}\n\nexport interface MessageSenderAware {\n readonly [MessageSenderProperty]?: MessageSender;\n}\n\nexport interface MessageError {\n name: string;\n message: string;\n stack?: string;\n}\n\nexport type MessageResult<T = any> =\n | {readonly [MessageResultEnvelopeProperty]: true; ok: true; payload: T}\n | {readonly [MessageResultEnvelopeProperty]: true; ok: false; error: MessageError};\n\nexport type MessageType<T extends MessageDictionary> = Extract<keyof T, string>;\nexport type MessageData<T extends MessageDictionary, K extends MessageType<T>> = Parameters<T[K]>[0];\nexport type MessageResponse<T extends MessageDictionary, K extends MessageType<T>> = ReturnType<T[K]>;\n\nexport type MessageTargetHandler<T extends MessageDictionary, K extends MessageType<T>> = (\n data: MessageData<T, K>,\n sender: MessageSender\n) => MessageResponse<T, K>;\nexport type MessageMapHandler<T extends MessageDictionary> = {[K in MessageType<T>]?: MessageTargetHandler<T, K>};\nexport type MessageGeneralHandler<T extends MessageDictionary, K extends MessageType<T>> = (\n type: K,\n data: MessageData<T, K>,\n sender: MessageSender\n) => any;\n\nexport interface MessageBody<T extends MessageDictionary, K extends MessageType<T>> {\n id: string;\n type: K;\n data: MessageData<T, K>;\n timestamp: number;\n}\n\nexport interface MessageProvider<T extends MessageDictionary, TOptions = void> {\n send<K extends MessageType<T>>(\n type: K,\n data: MessageData<T, K>,\n options?: TOptions\n ): Promise<MessageResponse<T, K>>;\n\n watch<K extends MessageType<T>>(type: K, handler: MessageTargetHandler<T, K>): () => void;\n\n watch(map: MessageMapHandler<T>): () => void;\n\n watch<K extends MessageType<T>>(general: MessageGeneralHandler<T, K>): () => void;\n}\n\nexport interface MessageHandler<T extends MessageDictionary> {\n run(\n type: MessageType<T>,\n data: MessageData<T, MessageType<T>>,\n sender: MessageSender\n ): MessageResponse<T, MessageType<T>> | undefined | null;\n}\n"],"mappings":"AAAO,MAAM,mBAAmB;AAEzB,MAAM,uBAAuB;AAE7B,MAAM,wBAAwB;AAE9B,MAAM,gCAAgC;","names":[]}
1
+ {"version":3,"sources":["../../src/types/message.ts"],"sourcesContent":["export const MessageGlobalKey = \"adnbnMessage\";\n\nexport const MessageTypeSeparator = \":\";\n\nexport const MessageSenderProperty = \"$sender\";\n\nexport const MessageResultEnvelopeProperty = \"__adnbnEnvelope\";\n\nexport type MessageSender = chrome.runtime.MessageSender;\n\nexport type MessageSendOptions = number | {tabId: number; frameId?: number; documentId?: string};\n\nexport interface MessageDictionary {\n [key: string]: (data: any) => any;\n}\n\n/**\n * Declares no application-specific message signatures by default.\n * Applications add their signatures by augmenting `adnbn/message`.\n * Undeclared names retain the MessageDictionary fallback.\n */\nexport interface MessageRegistry extends MessageDictionary {}\n\nexport interface MessageSenderAware {\n readonly [MessageSenderProperty]?: MessageSender;\n}\n\nexport interface MessageError {\n name: string;\n message: string;\n stack?: string;\n}\n\nexport type MessageResult<T = any> =\n | {readonly [MessageResultEnvelopeProperty]: true; ok: true; payload: T}\n | {readonly [MessageResultEnvelopeProperty]: true; ok: false; error: MessageError};\n\nexport type MessageType<T extends MessageDictionary> = Extract<keyof T, string>;\nexport type MessageData<T extends MessageDictionary, K extends MessageType<T>> = Parameters<T[K]>[0];\nexport type MessageResponse<T extends MessageDictionary, K extends MessageType<T>> = ReturnType<T[K]>;\n\nexport type MessageTargetHandler<T extends MessageDictionary, K extends MessageType<T>> = (\n data: MessageData<T, K>,\n sender: MessageSender\n) => MessageResponse<T, K>;\nexport type MessageMapHandler<T extends MessageDictionary> = {[K in MessageType<T>]?: MessageTargetHandler<T, K>};\nexport type MessageGeneralHandler<T extends MessageDictionary, K extends MessageType<T>> = (\n type: K,\n data: MessageData<T, K>,\n sender: MessageSender\n) => any;\n\nexport interface MessageBody<T extends MessageDictionary, K extends MessageType<T>> {\n id: string;\n type: K;\n data: MessageData<T, K>;\n timestamp: number;\n}\n\nexport interface MessageProvider<T extends MessageDictionary, TOptions = void> {\n send<K extends MessageType<T>>(\n type: K,\n data: MessageData<T, K>,\n options?: TOptions\n ): Promise<MessageResponse<T, K>>;\n\n watch<K extends MessageType<T>>(type: K, handler: MessageTargetHandler<T, K>): () => void;\n\n watch(map: MessageMapHandler<T>): () => void;\n\n watch<K extends MessageType<T>>(general: MessageGeneralHandler<T, K>): () => void;\n}\n\nexport interface MessageHandler<T extends MessageDictionary> {\n run(\n type: MessageType<T>,\n data: MessageData<T, MessageType<T>>,\n sender: MessageSender\n ): MessageResponse<T, MessageType<T>> | undefined | null;\n}\n"],"mappings":"AAAO,MAAM,mBAAmB;AAEzB,MAAM,uBAAuB;AAE7B,MAAM,wBAAwB;AAE9B,MAAM,gCAAgC;","names":[]}
@@ -1,4 +1,4 @@
1
- import { TransportConfig, TransportDefinition, TransportType } from "./transport.js";
1
+ import { TransportConfig, TransportDefinition, TransportProxyTarget, TransportTarget, TransportType } from "./transport.js";
2
2
  import { ViewOptions } from "./view.js";
3
3
  import { Awaiter } from "./helpers.js";
4
4
  import { CspOptions } from "./csp.js";
@@ -37,6 +37,19 @@ export declare enum OffscreenReason {
37
37
  /** Specifies that the offscreen document needs to use navigator.geolocation. */
38
38
  Geolocation = "GEOLOCATION"
39
39
  }
40
+ /**
41
+ * Empty because offscreen names and contracts belong to the consuming application.
42
+ * Generated `.adnbn/offscreen.d.ts` declarations populate it by augmenting `adnbn/offscreen`.
43
+ */
44
+ export interface OffscreenRegistry {
45
+ }
46
+ export type OffscreenName = Extract<keyof OffscreenRegistry, string>;
47
+ export type OffscreenTarget<N extends keyof OffscreenRegistry> = TransportTarget<OffscreenRegistry, N>;
48
+ export type OffscreenProxyTarget<N extends keyof OffscreenRegistry> = TransportProxyTarget<OffscreenRegistry, N>;
49
+ export type OffscreenAlias = string;
50
+ export type OffscreenMap = Map<OffscreenAlias, OffscreenParameters>;
51
+ export type OffscreenParameters = chrome.offscreen.CreateParameters;
52
+ export type OffscreenParametersMap = Record<string, OffscreenParameters>;
40
53
  export interface OffscreenConfig extends TransportConfig {
41
54
  reasons?: `${OffscreenReason}` | `${OffscreenReason}`[] | OffscreenReason | OffscreenReason[];
42
55
  justification?: string;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/offscreen.ts"],"sourcesContent":["import {TransportConfig, TransportDefinition, TransportType} from \"@typing/transport\";\nimport {ViewOptions} from \"@typing/view\";\nimport {Awaiter} from \"@typing/helpers\";\nimport {CspOptions} from \"@typing/csp\";\n\nexport const OffscreenGlobalKey = \"adnbnOffscreen\";\nexport const OffscreenGlobalAccess = \"adnbnOffscreenAccess\";\nexport const OffscreenBridgeReadyMessageType = \"adnbn:offscreen:ready\";\n\nexport enum OffscreenReason {\n /** A reason used for testing purposes only. */\n Testing = \"TESTING\",\n /** The offscreen document is responsible for playing audio. */\n AudioPlayback = \"AUDIO_PLAYBACK\",\n /** The offscreen document needs to embed and script an iframe in order to modify the iframe's content. */\n IframeScripting = \"IFRAME_SCRIPTING\",\n /** The offscreen document needs to embed an iframe and scrape its DOM to extract information. */\n DOMScraping = \"DOM_SCRAPING\",\n /** The offscreen document needs to interact with Blob objects (including URL.createObjectURL()). */\n Blobs = \"BLOBS\",\n /** The offscreen document needs to use the DOMParser API. */\n DOMParser = \"DOM_PARSER\",\n /** The offscreen document needs to interact with media streams from user media (e.g. getUserMedia()). */\n UserMedia = \"USER_MEDIA\",\n /** The offscreen document needs to interact with media streams from display media (e.g. getDisplayMedia()). */\n DisplayMedia = \"DISPLAY_MEDIA\",\n /** The offscreen document needs to use WebRTC APIs. */\n WebRTC = \"WEB_RTC\",\n /** The offscreen document needs to interact with the clipboard APIs(e.g. Navigator.clipboard). */\n Clipboard = \"CLIPBOARD\",\n /** Specifies that the offscreen document needs access to localStorage. */\n LocalStorage = \"LOCAL_STORAGE\",\n /** Specifies that the offscreen document needs to spawn workers. */\n Workers = \"WORKERS\",\n /** Specifies that the offscreen document needs to use navigator.getBattery. */\n BatteryStatus = \"BATTERY_STATUS\",\n /** Specifies that the offscreen document needs to use window.matchMedia. */\n MatchMedia = \"MATCH_MEDIA\",\n /** Specifies that the offscreen document needs to use navigator.geolocation. */\n Geolocation = \"GEOLOCATION\",\n}\n\nexport interface OffscreenConfig extends TransportConfig {\n reasons?: `${OffscreenReason}` | `${OffscreenReason}`[] | OffscreenReason | OffscreenReason[];\n justification?: string;\n}\n\nexport type OffscreenOptions = OffscreenConfig & CspOptions & ViewOptions;\n\nexport type OffscreenEntrypointOptions = Partial<OffscreenOptions>;\n\nexport type OffscreenMainHandler<T extends TransportType> = (\n offscreen: T,\n options: OffscreenEntrypointOptions\n) => Awaiter<void>;\n\nexport interface OffscreenDefinition<T extends TransportType>\n extends TransportDefinition<OffscreenOptions, T>, OffscreenEntrypointOptions {\n main?: OffscreenMainHandler<T>;\n}\n\nexport type OffscreenUnresolvedDefinition<T extends TransportType> = Partial<OffscreenDefinition<T>>;\n"],"mappings":"AAKO,MAAM,qBAAqB;AAC3B,MAAM,wBAAwB;AAC9B,MAAM,kCAAkC;AAExC,IAAK,kBAAL,kBAAKA,qBAAL;AAEH,EAAAA,iBAAA,aAAU;AAEV,EAAAA,iBAAA,mBAAgB;AAEhB,EAAAA,iBAAA,qBAAkB;AAElB,EAAAA,iBAAA,iBAAc;AAEd,EAAAA,iBAAA,WAAQ;AAER,EAAAA,iBAAA,eAAY;AAEZ,EAAAA,iBAAA,eAAY;AAEZ,EAAAA,iBAAA,kBAAe;AAEf,EAAAA,iBAAA,YAAS;AAET,EAAAA,iBAAA,eAAY;AAEZ,EAAAA,iBAAA,kBAAe;AAEf,EAAAA,iBAAA,aAAU;AAEV,EAAAA,iBAAA,mBAAgB;AAEhB,EAAAA,iBAAA,gBAAa;AAEb,EAAAA,iBAAA,iBAAc;AA9BN,SAAAA;AAAA,GAAA;","names":["OffscreenReason"]}
1
+ {"version":3,"sources":["../../src/types/offscreen.ts"],"sourcesContent":["import {\n TransportConfig,\n TransportDefinition,\n TransportProxyTarget,\n TransportTarget,\n TransportType,\n} from \"@typing/transport\";\nimport {ViewOptions} from \"@typing/view\";\nimport {Awaiter} from \"@typing/helpers\";\nimport {CspOptions} from \"@typing/csp\";\n\nexport const OffscreenGlobalKey = \"adnbnOffscreen\";\n\nexport const OffscreenGlobalAccess = \"adnbnOffscreenAccess\";\n\nexport const OffscreenBridgeReadyMessageType = \"adnbn:offscreen:ready\";\n\nexport enum OffscreenReason {\n /** A reason used for testing purposes only. */\n Testing = \"TESTING\",\n /** The offscreen document is responsible for playing audio. */\n AudioPlayback = \"AUDIO_PLAYBACK\",\n /** The offscreen document needs to embed and script an iframe in order to modify the iframe's content. */\n IframeScripting = \"IFRAME_SCRIPTING\",\n /** The offscreen document needs to embed an iframe and scrape its DOM to extract information. */\n DOMScraping = \"DOM_SCRAPING\",\n /** The offscreen document needs to interact with Blob objects (including URL.createObjectURL()). */\n Blobs = \"BLOBS\",\n /** The offscreen document needs to use the DOMParser API. */\n DOMParser = \"DOM_PARSER\",\n /** The offscreen document needs to interact with media streams from user media (e.g. getUserMedia()). */\n UserMedia = \"USER_MEDIA\",\n /** The offscreen document needs to interact with media streams from display media (e.g. getDisplayMedia()). */\n DisplayMedia = \"DISPLAY_MEDIA\",\n /** The offscreen document needs to use WebRTC APIs. */\n WebRTC = \"WEB_RTC\",\n /** The offscreen document needs to interact with the clipboard APIs(e.g. Navigator.clipboard). */\n Clipboard = \"CLIPBOARD\",\n /** Specifies that the offscreen document needs access to localStorage. */\n LocalStorage = \"LOCAL_STORAGE\",\n /** Specifies that the offscreen document needs to spawn workers. */\n Workers = \"WORKERS\",\n /** Specifies that the offscreen document needs to use navigator.getBattery. */\n BatteryStatus = \"BATTERY_STATUS\",\n /** Specifies that the offscreen document needs to use window.matchMedia. */\n MatchMedia = \"MATCH_MEDIA\",\n /** Specifies that the offscreen document needs to use navigator.geolocation. */\n Geolocation = \"GEOLOCATION\",\n}\n\n/**\n * Empty because offscreen names and contracts belong to the consuming application.\n * Generated `.adnbn/offscreen.d.ts` declarations populate it by augmenting `adnbn/offscreen`.\n */\nexport interface OffscreenRegistry {}\n\nexport type OffscreenName = Extract<keyof OffscreenRegistry, string>;\n\nexport type OffscreenTarget<N extends keyof OffscreenRegistry> = TransportTarget<OffscreenRegistry, N>;\n\nexport type OffscreenProxyTarget<N extends keyof OffscreenRegistry> = TransportProxyTarget<OffscreenRegistry, N>;\n\nexport type OffscreenAlias = string;\n\nexport type OffscreenMap = Map<OffscreenAlias, OffscreenParameters>;\n\nexport type OffscreenParameters = chrome.offscreen.CreateParameters;\n\nexport type OffscreenParametersMap = Record<string, OffscreenParameters>;\n\nexport interface OffscreenConfig extends TransportConfig {\n reasons?: `${OffscreenReason}` | `${OffscreenReason}`[] | OffscreenReason | OffscreenReason[];\n justification?: string;\n}\n\nexport type OffscreenOptions = OffscreenConfig & CspOptions & ViewOptions;\n\nexport type OffscreenEntrypointOptions = Partial<OffscreenOptions>;\n\nexport type OffscreenMainHandler<T extends TransportType> = (\n offscreen: T,\n options: OffscreenEntrypointOptions\n) => Awaiter<void>;\n\nexport interface OffscreenDefinition<T extends TransportType>\n extends TransportDefinition<OffscreenOptions, T>, OffscreenEntrypointOptions {\n main?: OffscreenMainHandler<T>;\n}\n\nexport type OffscreenUnresolvedDefinition<T extends TransportType> = Partial<OffscreenDefinition<T>>;\n"],"mappings":"AAWO,MAAM,qBAAqB;AAE3B,MAAM,wBAAwB;AAE9B,MAAM,kCAAkC;AAExC,IAAK,kBAAL,kBAAKA,qBAAL;AAEH,EAAAA,iBAAA,aAAU;AAEV,EAAAA,iBAAA,mBAAgB;AAEhB,EAAAA,iBAAA,qBAAkB;AAElB,EAAAA,iBAAA,iBAAc;AAEd,EAAAA,iBAAA,WAAQ;AAER,EAAAA,iBAAA,eAAY;AAEZ,EAAAA,iBAAA,eAAY;AAEZ,EAAAA,iBAAA,kBAAe;AAEf,EAAAA,iBAAA,YAAS;AAET,EAAAA,iBAAA,eAAY;AAEZ,EAAAA,iBAAA,kBAAe;AAEf,EAAAA,iBAAA,aAAU;AAEV,EAAAA,iBAAA,mBAAgB;AAEhB,EAAAA,iBAAA,gBAAa;AAEb,EAAAA,iBAAA,iBAAc;AA9BN,SAAAA;AAAA,GAAA;","names":["OffscreenReason"]}
@@ -0,0 +1,9 @@
1
+ import { ViewDefinition, ViewOptions } from "./view.js";
2
+ import { CspOptions } from "./csp.js";
3
+ export interface OptionsConfig {
4
+ /** Open in a browser tab. Defaults to true; embedded mode depends on browser support. */
5
+ openInTab?: boolean;
6
+ }
7
+ export type OptionsEntrypointOptions = OptionsConfig & CspOptions & ViewOptions;
8
+ export type OptionsProps = OptionsEntrypointOptions;
9
+ export type OptionsDefinition = OptionsEntrypointOptions & ViewDefinition<OptionsProps>;
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,5 +1,13 @@
1
1
  import { ViewDefinition, ViewOptions } from "./view.js";
2
2
  import { CspOptions } from "./csp.js";
3
+ /**
4
+ * Empty because page aliases depend on the consuming application's entrypoints.
5
+ * Generated `.adnbn/page.d.ts` declarations augment `adnbn`, adding discovered aliases as keys with value `true`.
6
+ */
7
+ export interface PageAliasRegistry {
8
+ }
9
+ export type PageAlias = keyof PageAliasRegistry extends never ? string : Extract<keyof PageAliasRegistry, string>;
10
+ export type PageMap = Map<PageAlias, string>;
3
11
  export interface PageConfig {
4
12
  name?: string;
5
13
  matches?: string[];
@@ -70,6 +70,7 @@ export interface Plugin extends PluginName {
70
70
  bundler?: PluginHandler<PluginBundlerOptions, RspackConfig>;
71
71
  command?: PluginHandler<PluginConfigOptions, PluginEntrypointResult>;
72
72
  content?: PluginHandler<PluginConfigOptions, PluginEntrypointResult>;
73
+ options?: PluginHandler<PluginConfigOptions, PluginEntrypointResult>;
73
74
  page?: PluginHandler<PluginConfigOptions, PluginEntrypointResult>;
74
75
  popup?: PluginHandler<PluginConfigOptions, PluginEntrypointResult>;
75
76
  relay?: PluginHandler<PluginConfigOptions, PluginEntrypointResult>;
@@ -87,7 +88,7 @@ export type PluginHandlerCallback<O, T = void> = {
87
88
  (options: O): Awaiter<T>;
88
89
  };
89
90
  export type PluginHandlerKeys = keyof Omit<Plugin, "name">;
90
- export type PluginEntrypointKeys = keyof Pick<Plugin, "background" | "command" | "content" | "page" | "popup" | "relay" | "sandbox" | "service" | "sidebar" | "offscreen">;
91
+ export type PluginEntrypointKeys = keyof Pick<Plugin, "background" | "command" | "content" | "options" | "page" | "popup" | "relay" | "sandbox" | "service" | "sidebar" | "offscreen">;
91
92
  export type PluginAssetKeys = keyof Pick<Plugin, "icon" | "locale">;
92
93
  export type PluginHandlerType<T extends Plugin[PluginHandlerKeys]> = T extends PluginHandlerCallback<infer O, infer R> ? {
93
94
  options: O;
@@ -1,5 +1,14 @@
1
1
  import { ViewDefinition, ViewOptions } from "./view.js";
2
2
  import { CspOptions } from "./csp.js";
3
+ import type { ManifestPopup } from "./manifest.js";
4
+ /**
5
+ * Empty because popup aliases depend on the consuming application's entrypoints.
6
+ * Generated `.adnbn/popup.d.ts` declarations augment `adnbn`, adding discovered aliases as keys with value `true`.
7
+ */
8
+ export interface PopupAliasRegistry {
9
+ }
10
+ export type PopupAlias = keyof PopupAliasRegistry extends never ? string : Extract<keyof PopupAliasRegistry, string>;
11
+ export type PopupMap = Map<PopupAlias, ManifestPopup>;
3
12
  export interface PopupConfig {
4
13
  icon?: string;
5
14
  apply?: boolean;
@@ -1,9 +1,8 @@
1
1
  import { EntrypointOptions } from "./entrypoint.js";
2
- import { ContentScriptConfig, ContentScriptContext, ContentScriptDefinition } from "./content.js";
3
- import { TransportConfig, TransportDefinition, TransportType, type TransportProxyTarget } from "./transport.js";
2
+ import { ContentScriptConfig, ContentScriptContext, ContentScriptDefinition, ContentScriptEntrypointOptions } from "./content.js";
3
+ import { TransportConfig, TransportDefinition, TransportType, type TransportProxyTarget, type TransportTarget } from "./transport.js";
4
4
  import { Awaiter } from "./helpers.js";
5
5
  import type { MessageError } from "./message.js";
6
- import type { RelayRegistry } from "../relay/index.js";
7
6
  export declare const RelayGlobalKey = "adnbnRelay";
8
7
  export declare enum RelayMethod {
9
8
  Scripting = "scripting",
@@ -28,6 +27,13 @@ export declare enum RelayFrameErrorKind {
28
27
  TargetGone = "target-gone",
29
28
  Unobservable = "unobservable"
30
29
  }
30
+ /**
31
+ * Empty because relay names and contracts belong to the consuming application.
32
+ * Generated `.adnbn/relay.d.ts` declarations populate it by augmenting `adnbn/relay`.
33
+ */
34
+ export interface RelayRegistry {
35
+ }
36
+ export type RelayName = Extract<keyof RelayRegistry, string>;
31
37
  export type RelayNonEmptyReadonlyArray<T> = readonly [T, ...T[]];
32
38
  export interface RelayExecutionOptions {
33
39
  /** Maximum execution time per addressed Messaging frame or for the Inject Script operation. */
@@ -130,6 +136,7 @@ export type RelayBatchRpcProxy<T> = {
130
136
  [K in keyof T]: T[K] extends (...args: any[]) => any ? (...args: Parameters<T[K]>) => Promise<RelayFramesResult<Awaited<ReturnType<T[K]>>>> : T[K] extends object ? RelayBatchRpcProxyObject<T[K]> : () => Promise<RelayFramesResult<Awaited<T[K]>>>;
131
137
  };
132
138
  export type RelayBatchRpcProxyObject<T> = (() => Promise<RelayFramesResult<Awaited<T>>>) & RelayBatchRpcProxy<T>;
139
+ export type RelayTarget<N extends keyof RelayRegistry> = TransportTarget<RelayRegistry, N>;
133
140
  export type RelayProxyTarget<N extends keyof RelayRegistry> = TransportProxyTarget<RelayRegistry, N>;
134
141
  export type RelayBatchProxyTarget<N extends keyof RelayRegistry> = RelayBatchRpcProxy<RelayRegistry[N]>;
135
142
  export interface RelayConfig extends TransportConfig, Omit<ContentScriptConfig, "allFrames"> {
@@ -138,10 +145,12 @@ export interface RelayConfig extends TransportConfig, Omit<ContentScriptConfig,
138
145
  }
139
146
  export type RelayOptions = RelayConfig & EntrypointOptions;
140
147
  export type RelayOptionsMap = Map<string, RelayOptions>;
141
- export type RelayEntrypointOptions = Partial<RelayOptions>;
148
+ export type RelayEntrypointOptions = Partial<RelayOptions> & Pick<ContentScriptEntrypointOptions, "isolation">;
142
149
  export type RelayMainHandler<T extends TransportType> = (relay: T, context: ContentScriptContext, options: RelayEntrypointOptions) => Awaiter<void>;
143
- export interface RelayDefinition<T extends TransportType> extends Omit<TransportDefinition<RelayOptions, T>, "main">, Omit<ContentScriptDefinition, "main" | "allFrames">, RelayEntrypointOptions {
150
+ type RelayContentDefinition<T = ContentScriptDefinition> = T extends unknown ? Omit<T, "main" | "allFrames"> : never;
151
+ export type RelayDefinition<T extends TransportType> = Omit<TransportDefinition<RelayOptions, T>, "main"> & RelayContentDefinition & Partial<RelayOptions> & {
144
152
  main?: RelayMainHandler<T>;
145
- }
146
- export type RelayUnresolvedDefinition<T extends TransportType> = Partial<RelayDefinition<T>>;
153
+ };
154
+ /** Internal, merged runtime input. The public definition retains its discriminated union. */
155
+ export type RelayUnresolvedDefinition<T extends TransportType> = Partial<Omit<RelayDefinition<T>, never>>;
147
156
  export {};
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/relay.ts"],"sourcesContent":["import {EntrypointOptions} from \"@typing/entrypoint\";\nimport {ContentScriptConfig, ContentScriptContext, ContentScriptDefinition} from \"@typing/content\";\nimport {TransportConfig, TransportDefinition, TransportType, type TransportProxyTarget} from \"@typing/transport\";\nimport {Awaiter} from \"@typing/helpers\";\nimport type {MessageError} from \"@typing/message\";\nimport type {RelayRegistry} from \"@relay/index\";\n\nexport const RelayGlobalKey = \"adnbnRelay\";\n\nexport enum RelayMethod {\n Scripting = \"scripting\",\n Messaging = \"messaging\",\n}\n\nexport enum RelayAllFrames {\n /**\n * Executes the method in every frame reached by the selected transport and returns one outcome:\n * Scripting prefers a fulfilled result, while Messaging returns the first response.\n *\n * Warning: mutating methods can execute in multiple frames even though only one outcome is returned.\n */\n Any = \"any\",\n\n /** Executes the method in every discovered frame and returns an outcome for each frame. */\n All = \"all\",\n}\n\nexport enum RelayFrameErrorKind {\n Remote = \"remote\",\n Execution = \"execution\",\n Delivery = \"delivery\",\n Timeout = \"timeout\",\n TargetGone = \"target-gone\",\n Unobservable = \"unobservable\",\n}\n\nexport type RelayNonEmptyReadonlyArray<T> = readonly [T, ...T[]];\n\nexport interface RelayExecutionOptions {\n /** Maximum execution time per addressed Messaging frame or for the Inject Script operation. */\n timeoutMs?: number;\n}\n\ninterface RelayTargetBase extends RelayExecutionOptions {\n tabId: number;\n}\n\nexport interface RelayTopFrameOptions extends RelayTargetBase {\n allFrames?: false;\n frameId?: never;\n frameIds?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport interface RelayFrameOptions extends RelayTargetBase {\n frameId: number;\n allFrames?: never;\n frameIds?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport interface RelayFramesOptions extends RelayTargetBase {\n frameIds: RelayNonEmptyReadonlyArray<number>;\n allFrames?: never;\n frameId?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport interface RelayDocumentOptions extends RelayTargetBase {\n documentId: string;\n allFrames?: never;\n frameId?: never;\n frameIds?: never;\n documentIds?: never;\n}\n\nexport interface RelayDocumentsOptions extends RelayTargetBase {\n documentIds: RelayNonEmptyReadonlyArray<string>;\n allFrames?: never;\n frameId?: never;\n frameIds?: never;\n documentId?: never;\n}\n\n/**\n * Broadcasts the call to all frames without requiring an exhaustive frame list and returns one outcome.\n * `true` is an alias for `RelayAllFrames.Any`.\n *\n * Warning: mutating methods can execute in multiple frames even though only one outcome is returned.\n */\nexport interface RelayAnyFramesOptions extends RelayTargetBase {\n allFrames: true | RelayAllFrames.Any;\n frameId?: never;\n frameIds?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport interface RelayEveryFrameOptions extends RelayTargetBase {\n allFrames: RelayAllFrames.All;\n frameId?: never;\n frameIds?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport type RelayAllFramesOptions = RelayAnyFramesOptions | RelayEveryFrameOptions;\n\nexport type RelayScalarOptions = RelayTopFrameOptions | RelayFrameOptions | RelayDocumentOptions;\n\nexport type RelayBatchOptions = RelayFramesOptions | RelayDocumentsOptions | RelayAllFramesOptions;\n\nexport type RelayCallOptions = RelayScalarOptions | RelayBatchOptions;\n\nexport type RelayAddressTarget =\n | {\n tabId: number;\n frameId: number;\n documentId?: string;\n allFrames?: never;\n }\n | {\n tabId: number;\n frameId?: never;\n documentId: string;\n allFrames?: never;\n };\n\nexport type RelayOperationTarget = {\n tabId: number;\n allFrames: RelayAllFrames;\n frameId?: never;\n documentId?: never;\n};\n\nexport type RelayResultTarget = RelayAddressTarget | RelayOperationTarget;\n\nexport interface RelayFrameError extends MessageError {\n kind: RelayFrameErrorKind;\n}\n\nexport type RelayFrameResult<T> =\n | {\n target: RelayResultTarget;\n status: \"fulfilled\";\n result: T;\n }\n | {\n target: RelayResultTarget;\n status: \"rejected\";\n error: RelayFrameError;\n };\n\nexport type RelayFramesResult<T> = readonly RelayFrameResult<T>[];\n\nexport type RelayBatchRpcProxy<T> = {\n [K in keyof T]: T[K] extends (...args: any[]) => any\n ? (...args: Parameters<T[K]>) => Promise<RelayFramesResult<Awaited<ReturnType<T[K]>>>>\n : T[K] extends object\n ? RelayBatchRpcProxyObject<T[K]>\n : () => Promise<RelayFramesResult<Awaited<T[K]>>>;\n};\n\nexport type RelayBatchRpcProxyObject<T> = (() => Promise<RelayFramesResult<Awaited<T>>>) & RelayBatchRpcProxy<T>;\n\nexport type RelayProxyTarget<N extends keyof RelayRegistry> = TransportProxyTarget<RelayRegistry, N>;\n\nexport type RelayBatchProxyTarget<N extends keyof RelayRegistry> = RelayBatchRpcProxy<RelayRegistry[N]>;\n\nexport interface RelayConfig extends TransportConfig, Omit<ContentScriptConfig, \"allFrames\"> {\n allFrames?: boolean | RelayAllFrames;\n method?: RelayMethod;\n}\n\nexport type RelayOptions = RelayConfig & EntrypointOptions;\n\nexport type RelayOptionsMap = Map<string, RelayOptions>;\n\nexport type RelayEntrypointOptions = Partial<RelayOptions>;\n\nexport type RelayMainHandler<T extends TransportType> = (\n relay: T,\n context: ContentScriptContext,\n options: RelayEntrypointOptions\n) => Awaiter<void>;\n\nexport interface RelayDefinition<T extends TransportType>\n extends\n Omit<TransportDefinition<RelayOptions, T>, \"main\">,\n Omit<ContentScriptDefinition, \"main\" | \"allFrames\">,\n RelayEntrypointOptions {\n main?: RelayMainHandler<T>;\n}\n\nexport type RelayUnresolvedDefinition<T extends TransportType> = Partial<RelayDefinition<T>>;\n"],"mappings":"AAOO,MAAM,iBAAiB;AAEvB,IAAK,cAAL,kBAAKA,iBAAL;AACH,EAAAA,aAAA,eAAY;AACZ,EAAAA,aAAA,eAAY;AAFJ,SAAAA;AAAA,GAAA;AAKL,IAAK,iBAAL,kBAAKC,oBAAL;AAOH,EAAAA,gBAAA,SAAM;AAGN,EAAAA,gBAAA,SAAM;AAVE,SAAAA;AAAA,GAAA;AAaL,IAAK,sBAAL,kBAAKC,yBAAL;AACH,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,eAAY;AACZ,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,aAAU;AACV,EAAAA,qBAAA,gBAAa;AACb,EAAAA,qBAAA,kBAAe;AANP,SAAAA;AAAA,GAAA;","names":["RelayMethod","RelayAllFrames","RelayFrameErrorKind"]}
1
+ {"version":3,"sources":["../../src/types/relay.ts"],"sourcesContent":["import {EntrypointOptions} from \"@typing/entrypoint\";\nimport {\n ContentScriptConfig,\n ContentScriptContext,\n ContentScriptDefinition,\n ContentScriptEntrypointOptions,\n} from \"@typing/content\";\nimport {\n TransportConfig,\n TransportDefinition,\n TransportType,\n type TransportProxyTarget,\n type TransportTarget,\n} from \"@typing/transport\";\nimport {Awaiter} from \"@typing/helpers\";\nimport type {MessageError} from \"@typing/message\";\n\nexport const RelayGlobalKey = \"adnbnRelay\";\n\nexport enum RelayMethod {\n Scripting = \"scripting\",\n Messaging = \"messaging\",\n}\n\nexport enum RelayAllFrames {\n /**\n * Executes the method in every frame reached by the selected transport and returns one outcome:\n * Scripting prefers a fulfilled result, while Messaging returns the first response.\n *\n * Warning: mutating methods can execute in multiple frames even though only one outcome is returned.\n */\n Any = \"any\",\n\n /** Executes the method in every discovered frame and returns an outcome for each frame. */\n All = \"all\",\n}\n\nexport enum RelayFrameErrorKind {\n Remote = \"remote\",\n Execution = \"execution\",\n Delivery = \"delivery\",\n Timeout = \"timeout\",\n TargetGone = \"target-gone\",\n Unobservable = \"unobservable\",\n}\n\n/**\n * Empty because relay names and contracts belong to the consuming application.\n * Generated `.adnbn/relay.d.ts` declarations populate it by augmenting `adnbn/relay`.\n */\nexport interface RelayRegistry {}\n\nexport type RelayName = Extract<keyof RelayRegistry, string>;\n\nexport type RelayNonEmptyReadonlyArray<T> = readonly [T, ...T[]];\n\nexport interface RelayExecutionOptions {\n /** Maximum execution time per addressed Messaging frame or for the Inject Script operation. */\n timeoutMs?: number;\n}\n\ninterface RelayTargetBase extends RelayExecutionOptions {\n tabId: number;\n}\n\nexport interface RelayTopFrameOptions extends RelayTargetBase {\n allFrames?: false;\n frameId?: never;\n frameIds?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport interface RelayFrameOptions extends RelayTargetBase {\n frameId: number;\n allFrames?: never;\n frameIds?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport interface RelayFramesOptions extends RelayTargetBase {\n frameIds: RelayNonEmptyReadonlyArray<number>;\n allFrames?: never;\n frameId?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport interface RelayDocumentOptions extends RelayTargetBase {\n documentId: string;\n allFrames?: never;\n frameId?: never;\n frameIds?: never;\n documentIds?: never;\n}\n\nexport interface RelayDocumentsOptions extends RelayTargetBase {\n documentIds: RelayNonEmptyReadonlyArray<string>;\n allFrames?: never;\n frameId?: never;\n frameIds?: never;\n documentId?: never;\n}\n\n/**\n * Broadcasts the call to all frames without requiring an exhaustive frame list and returns one outcome.\n * `true` is an alias for `RelayAllFrames.Any`.\n *\n * Warning: mutating methods can execute in multiple frames even though only one outcome is returned.\n */\nexport interface RelayAnyFramesOptions extends RelayTargetBase {\n allFrames: true | RelayAllFrames.Any;\n frameId?: never;\n frameIds?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport interface RelayEveryFrameOptions extends RelayTargetBase {\n allFrames: RelayAllFrames.All;\n frameId?: never;\n frameIds?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport type RelayAllFramesOptions = RelayAnyFramesOptions | RelayEveryFrameOptions;\n\nexport type RelayScalarOptions = RelayTopFrameOptions | RelayFrameOptions | RelayDocumentOptions;\n\nexport type RelayBatchOptions = RelayFramesOptions | RelayDocumentsOptions | RelayAllFramesOptions;\n\nexport type RelayCallOptions = RelayScalarOptions | RelayBatchOptions;\n\nexport type RelayAddressTarget =\n | {\n tabId: number;\n frameId: number;\n documentId?: string;\n allFrames?: never;\n }\n | {\n tabId: number;\n frameId?: never;\n documentId: string;\n allFrames?: never;\n };\n\nexport type RelayOperationTarget = {\n tabId: number;\n allFrames: RelayAllFrames;\n frameId?: never;\n documentId?: never;\n};\n\nexport type RelayResultTarget = RelayAddressTarget | RelayOperationTarget;\n\nexport interface RelayFrameError extends MessageError {\n kind: RelayFrameErrorKind;\n}\n\nexport type RelayFrameResult<T> =\n | {\n target: RelayResultTarget;\n status: \"fulfilled\";\n result: T;\n }\n | {\n target: RelayResultTarget;\n status: \"rejected\";\n error: RelayFrameError;\n };\n\nexport type RelayFramesResult<T> = readonly RelayFrameResult<T>[];\n\nexport type RelayBatchRpcProxy<T> = {\n [K in keyof T]: T[K] extends (...args: any[]) => any\n ? (...args: Parameters<T[K]>) => Promise<RelayFramesResult<Awaited<ReturnType<T[K]>>>>\n : T[K] extends object\n ? RelayBatchRpcProxyObject<T[K]>\n : () => Promise<RelayFramesResult<Awaited<T[K]>>>;\n};\n\nexport type RelayBatchRpcProxyObject<T> = (() => Promise<RelayFramesResult<Awaited<T>>>) & RelayBatchRpcProxy<T>;\n\nexport type RelayTarget<N extends keyof RelayRegistry> = TransportTarget<RelayRegistry, N>;\n\nexport type RelayProxyTarget<N extends keyof RelayRegistry> = TransportProxyTarget<RelayRegistry, N>;\n\nexport type RelayBatchProxyTarget<N extends keyof RelayRegistry> = RelayBatchRpcProxy<RelayRegistry[N]>;\n\nexport interface RelayConfig extends TransportConfig, Omit<ContentScriptConfig, \"allFrames\"> {\n allFrames?: boolean | RelayAllFrames;\n method?: RelayMethod;\n}\n\nexport type RelayOptions = RelayConfig & EntrypointOptions;\n\nexport type RelayOptionsMap = Map<string, RelayOptions>;\n\nexport type RelayEntrypointOptions = Partial<RelayOptions> & Pick<ContentScriptEntrypointOptions, \"isolation\">;\n\nexport type RelayMainHandler<T extends TransportType> = (\n relay: T,\n context: ContentScriptContext,\n options: RelayEntrypointOptions\n) => Awaiter<void>;\n\ntype RelayContentDefinition<T = ContentScriptDefinition> = T extends unknown ? Omit<T, \"main\" | \"allFrames\"> : never;\n\nexport type RelayDefinition<T extends TransportType> = Omit<TransportDefinition<RelayOptions, T>, \"main\"> &\n RelayContentDefinition &\n Partial<RelayOptions> & {\n main?: RelayMainHandler<T>;\n };\n\n/** Internal, merged runtime input. The public definition retains its discriminated union. */\nexport type RelayUnresolvedDefinition<T extends TransportType> = Partial<Omit<RelayDefinition<T>, never>>;\n"],"mappings":"AAiBO,MAAM,iBAAiB;AAEvB,IAAK,cAAL,kBAAKA,iBAAL;AACH,EAAAA,aAAA,eAAY;AACZ,EAAAA,aAAA,eAAY;AAFJ,SAAAA;AAAA,GAAA;AAKL,IAAK,iBAAL,kBAAKC,oBAAL;AAOH,EAAAA,gBAAA,SAAM;AAGN,EAAAA,gBAAA,SAAM;AAVE,SAAAA;AAAA,GAAA;AAaL,IAAK,sBAAL,kBAAKC,yBAAL;AACH,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,eAAY;AACZ,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,aAAU;AACV,EAAAA,qBAAA,gBAAa;AACb,EAAAA,qBAAA,kBAAe;AANP,SAAAA;AAAA,GAAA;","names":["RelayMethod","RelayAllFrames","RelayFrameErrorKind"]}
@@ -2,6 +2,7 @@ import { TransportConfig, TransportDefinition, TransportType } from "./transport
2
2
  import { ViewOptions } from "./view.js";
3
3
  import { Awaiter } from "./helpers.js";
4
4
  import { MessageError, MessageSender } from "./message.js";
5
+ import type { RpcAsyncProxy } from "./rpc.js";
5
6
  export declare const SandboxGlobalKey = "adnbnSandbox";
6
7
  export declare const SandboxGlobalAccess = "adnbnSandboxAccess";
7
8
  export declare const SandboxNamespace = "adnbn:sandbox";
@@ -23,6 +24,16 @@ export declare enum SandboxSource {
23
24
  Blob = "blob:",
24
25
  UnsafeInline = "'unsafe-inline'"
25
26
  }
27
+ /**
28
+ * Empty because sandbox names and contracts belong to the consuming application.
29
+ * Generated `.adnbn/sandbox.d.ts` declarations populate it by augmenting `adnbn/sandbox`.
30
+ */
31
+ export interface SandboxRegistry {
32
+ }
33
+ export type SandboxName = Extract<keyof SandboxRegistry, string>;
34
+ export type SandboxProxyTarget<N extends keyof SandboxRegistry> = RpcAsyncProxy<SandboxRegistry[N]>;
35
+ export type SandboxAlias = string;
36
+ export type SandboxMap = Map<SandboxAlias, SandboxParameters>;
26
37
  export interface SandboxCspSources {
27
38
  connect?: Array<SandboxSource | `${SandboxSource}`>;
28
39
  image?: Array<SandboxSource | `${SandboxSource}`>;
@@ -56,6 +67,7 @@ export type SandboxUnresolvedDefinition<T extends TransportType> = Partial<Sandb
56
67
  export type SandboxParameters = {
57
68
  url: string;
58
69
  } & Pick<SandboxConfig, "readyTimeout" | "requestTimeout" | "removeOnRequestTimeout">;
70
+ export type SandboxParametersMap = Record<string, SandboxParameters>;
59
71
  export interface SandboxReadyMessage {
60
72
  type: typeof SandboxReadyMessageType;
61
73
  channel: string;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/sandbox.ts"],"sourcesContent":["import {TransportConfig, TransportDefinition, TransportType} from \"@typing/transport\";\nimport {ViewOptions} from \"@typing/view\";\nimport {Awaiter} from \"@typing/helpers\";\nimport {MessageError, MessageSender} from \"@typing/message\";\n\nexport const SandboxGlobalKey = \"adnbnSandbox\";\nexport const SandboxGlobalAccess = \"adnbnSandboxAccess\";\nexport const SandboxNamespace = \"adnbn:sandbox\";\nexport const SandboxReadyMessageType = `${SandboxNamespace}:ready`;\nexport const SandboxRequestMessageType = `${SandboxNamespace}:request`;\nexport const SandboxResponseMessageType = `${SandboxNamespace}:response`;\n\nexport enum SandboxAllow {\n Forms = \"forms\",\n Popups = \"popups\",\n Modals = \"modals\",\n Downloads = \"downloads\",\n PointerLock = \"pointer-lock\",\n TopNavigationByUserActivation = \"top-navigation-by-user-activation\",\n}\n\nexport enum SandboxSource {\n Self = \"'self'\",\n None = \"'none'\",\n Data = \"data:\",\n Blob = \"blob:\",\n UnsafeInline = \"'unsafe-inline'\",\n}\n\nexport interface SandboxCspSources {\n connect?: Array<SandboxSource | `${SandboxSource}`>;\n image?: Array<SandboxSource | `${SandboxSource}`>;\n style?: Array<SandboxSource | `${SandboxSource}`>;\n font?: Array<SandboxSource | `${SandboxSource}`>;\n media?: Array<SandboxSource | `${SandboxSource}`>;\n worker?: Array<SandboxSource | `${SandboxSource}`>;\n child?: Array<SandboxSource | `${SandboxSource}`>;\n}\n\nexport interface SandboxCspConfig {\n eval?: boolean;\n inline?: boolean;\n allow?: Array<SandboxAllow | `${SandboxAllow}`>;\n sources?: SandboxCspSources;\n}\n\nexport interface SandboxCspOptions {\n csp?: SandboxCspConfig;\n}\n\nexport interface SandboxConfig extends TransportConfig {\n readyTimeout?: number;\n requestTimeout?: number;\n removeOnRequestTimeout?: boolean;\n}\n\nexport type SandboxOptions = SandboxConfig & SandboxCspOptions & ViewOptions;\n\nexport type SandboxEntrypointOptions = Partial<SandboxOptions>;\n\nexport type SandboxMainHandler<T extends TransportType> = (\n sandbox: T,\n options: SandboxEntrypointOptions\n) => Awaiter<void>;\n\nexport interface SandboxDefinition<T extends TransportType>\n extends TransportDefinition<SandboxOptions, T>, SandboxEntrypointOptions {\n main?: SandboxMainHandler<T>;\n}\n\nexport type SandboxUnresolvedDefinition<T extends TransportType> = Partial<SandboxDefinition<T>>;\n\nexport type SandboxParameters = {url: string} & Pick<\n SandboxConfig,\n \"readyTimeout\" | \"requestTimeout\" | \"removeOnRequestTimeout\"\n>;\n\nexport interface SandboxReadyMessage {\n type: typeof SandboxReadyMessageType;\n channel: string;\n name: string;\n}\n\nexport interface SandboxRequestMessage {\n type: typeof SandboxRequestMessageType;\n channel: string;\n name: string;\n requestId: string;\n path?: string;\n args: any[];\n}\n\nexport interface SandboxResponseMessage {\n type: typeof SandboxResponseMessageType;\n channel: string;\n name: string;\n requestId: string;\n ok: boolean;\n payload?: any;\n error?: MessageError;\n}\n\nexport type SandboxEnvelope = SandboxRequestMessage | SandboxResponseMessage;\n\n/**\n * Internal seam for the sandbox wire. Lives below `SandboxMessage`, invisible to callers.\n *\n * - `connect` establishes the channel (host: create the iframe and await the ready\n * handshake; sandbox/in-memory: resolves immediately). Must be idempotent — concurrent\n * callers share one connection.\n * - `post` sends one already-built envelope to the peer.\n * - `subscribe` attaches exactly one underlying listener and returns its remover.\n * - `dispose` tears the channel down (remove listener, drop the iframe).\n */\nexport interface SandboxPort {\n connect(): Promise<void>;\n\n post(message: SandboxEnvelope): void;\n\n subscribe(onMessage: (message: SandboxEnvelope, sender: MessageSender) => void): () => void;\n\n dispose(): void;\n}\n"],"mappings":"AAKO,MAAM,mBAAmB;AACzB,MAAM,sBAAsB;AAC5B,MAAM,mBAAmB;AACzB,MAAM,0BAA0B,GAAG,gBAAgB;AACnD,MAAM,4BAA4B,GAAG,gBAAgB;AACrD,MAAM,6BAA6B,GAAG,gBAAgB;AAEtD,IAAK,eAAL,kBAAKA,kBAAL;AACH,EAAAA,cAAA,WAAQ;AACR,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,eAAY;AACZ,EAAAA,cAAA,iBAAc;AACd,EAAAA,cAAA,mCAAgC;AANxB,SAAAA;AAAA,GAAA;AASL,IAAK,gBAAL,kBAAKC,mBAAL;AACH,EAAAA,eAAA,UAAO;AACP,EAAAA,eAAA,UAAO;AACP,EAAAA,eAAA,UAAO;AACP,EAAAA,eAAA,UAAO;AACP,EAAAA,eAAA,kBAAe;AALP,SAAAA;AAAA,GAAA;","names":["SandboxAllow","SandboxSource"]}
1
+ {"version":3,"sources":["../../src/types/sandbox.ts"],"sourcesContent":["import {TransportConfig, TransportDefinition, TransportType} from \"@typing/transport\";\nimport {ViewOptions} from \"@typing/view\";\nimport {Awaiter} from \"@typing/helpers\";\nimport {MessageError, MessageSender} from \"@typing/message\";\nimport type {RpcAsyncProxy} from \"@typing/rpc\";\n\nexport const SandboxGlobalKey = \"adnbnSandbox\";\n\nexport const SandboxGlobalAccess = \"adnbnSandboxAccess\";\n\nexport const SandboxNamespace = \"adnbn:sandbox\";\n\nexport const SandboxReadyMessageType = `${SandboxNamespace}:ready`;\n\nexport const SandboxRequestMessageType = `${SandboxNamespace}:request`;\n\nexport const SandboxResponseMessageType = `${SandboxNamespace}:response`;\n\nexport enum SandboxAllow {\n Forms = \"forms\",\n Popups = \"popups\",\n Modals = \"modals\",\n Downloads = \"downloads\",\n PointerLock = \"pointer-lock\",\n TopNavigationByUserActivation = \"top-navigation-by-user-activation\",\n}\n\nexport enum SandboxSource {\n Self = \"'self'\",\n None = \"'none'\",\n Data = \"data:\",\n Blob = \"blob:\",\n UnsafeInline = \"'unsafe-inline'\",\n}\n\n/**\n * Empty because sandbox names and contracts belong to the consuming application.\n * Generated `.adnbn/sandbox.d.ts` declarations populate it by augmenting `adnbn/sandbox`.\n */\nexport interface SandboxRegistry {}\n\nexport type SandboxName = Extract<keyof SandboxRegistry, string>;\n\nexport type SandboxProxyTarget<N extends keyof SandboxRegistry> = RpcAsyncProxy<SandboxRegistry[N]>;\n\nexport type SandboxAlias = string;\n\nexport type SandboxMap = Map<SandboxAlias, SandboxParameters>;\n\nexport interface SandboxCspSources {\n connect?: Array<SandboxSource | `${SandboxSource}`>;\n image?: Array<SandboxSource | `${SandboxSource}`>;\n style?: Array<SandboxSource | `${SandboxSource}`>;\n font?: Array<SandboxSource | `${SandboxSource}`>;\n media?: Array<SandboxSource | `${SandboxSource}`>;\n worker?: Array<SandboxSource | `${SandboxSource}`>;\n child?: Array<SandboxSource | `${SandboxSource}`>;\n}\n\nexport interface SandboxCspConfig {\n eval?: boolean;\n inline?: boolean;\n allow?: Array<SandboxAllow | `${SandboxAllow}`>;\n sources?: SandboxCspSources;\n}\n\nexport interface SandboxCspOptions {\n csp?: SandboxCspConfig;\n}\n\nexport interface SandboxConfig extends TransportConfig {\n readyTimeout?: number;\n requestTimeout?: number;\n removeOnRequestTimeout?: boolean;\n}\n\nexport type SandboxOptions = SandboxConfig & SandboxCspOptions & ViewOptions;\n\nexport type SandboxEntrypointOptions = Partial<SandboxOptions>;\n\nexport type SandboxMainHandler<T extends TransportType> = (\n sandbox: T,\n options: SandboxEntrypointOptions\n) => Awaiter<void>;\n\nexport interface SandboxDefinition<T extends TransportType>\n extends TransportDefinition<SandboxOptions, T>, SandboxEntrypointOptions {\n main?: SandboxMainHandler<T>;\n}\n\nexport type SandboxUnresolvedDefinition<T extends TransportType> = Partial<SandboxDefinition<T>>;\n\nexport type SandboxParameters = {url: string} & Pick<\n SandboxConfig,\n \"readyTimeout\" | \"requestTimeout\" | \"removeOnRequestTimeout\"\n>;\n\nexport type SandboxParametersMap = Record<string, SandboxParameters>;\n\nexport interface SandboxReadyMessage {\n type: typeof SandboxReadyMessageType;\n channel: string;\n name: string;\n}\n\nexport interface SandboxRequestMessage {\n type: typeof SandboxRequestMessageType;\n channel: string;\n name: string;\n requestId: string;\n path?: string;\n args: any[];\n}\n\nexport interface SandboxResponseMessage {\n type: typeof SandboxResponseMessageType;\n channel: string;\n name: string;\n requestId: string;\n ok: boolean;\n payload?: any;\n error?: MessageError;\n}\n\nexport type SandboxEnvelope = SandboxRequestMessage | SandboxResponseMessage;\n\n/**\n * Internal seam for the sandbox wire. Lives below `SandboxMessage`, invisible to callers.\n *\n * - `connect` establishes the channel (host: create the iframe and await the ready\n * handshake; sandbox/in-memory: resolves immediately). Must be idempotent — concurrent\n * callers share one connection.\n * - `post` sends one already-built envelope to the peer.\n * - `subscribe` attaches exactly one underlying listener and returns its remover.\n * - `dispose` tears the channel down (remove listener, drop the iframe).\n */\nexport interface SandboxPort {\n connect(): Promise<void>;\n\n post(message: SandboxEnvelope): void;\n\n subscribe(onMessage: (message: SandboxEnvelope, sender: MessageSender) => void): () => void;\n\n dispose(): void;\n}\n"],"mappings":"AAMO,MAAM,mBAAmB;AAEzB,MAAM,sBAAsB;AAE5B,MAAM,mBAAmB;AAEzB,MAAM,0BAA0B,GAAG,gBAAgB;AAEnD,MAAM,4BAA4B,GAAG,gBAAgB;AAErD,MAAM,6BAA6B,GAAG,gBAAgB;AAEtD,IAAK,eAAL,kBAAKA,kBAAL;AACH,EAAAA,cAAA,WAAQ;AACR,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,eAAY;AACZ,EAAAA,cAAA,iBAAc;AACd,EAAAA,cAAA,mCAAgC;AANxB,SAAAA;AAAA,GAAA;AASL,IAAK,gBAAL,kBAAKC,mBAAL;AACH,EAAAA,eAAA,UAAO;AACP,EAAAA,eAAA,UAAO;AACP,EAAAA,eAAA,UAAO;AACP,EAAAA,eAAA,UAAO;AACP,EAAAA,eAAA,kBAAe;AALP,SAAAA;AAAA,GAAA;","names":["SandboxAllow","SandboxSource"]}
@@ -1,7 +1,16 @@
1
1
  import { BackgroundConfig } from "./background.js";
2
2
  import { EntrypointOptions } from "./entrypoint.js";
3
- import { TransportConfig, TransportDefinition, TransportType } from "./transport.js";
3
+ import { TransportConfig, TransportDefinition, TransportProxyTarget, TransportTarget, TransportType } from "./transport.js";
4
4
  export declare const ServiceGlobalKey = "adnbnService";
5
+ /**
6
+ * Empty because service names and contracts belong to the consuming application.
7
+ * Generated `.adnbn/service.d.ts` declarations populate it by augmenting `adnbn/service`.
8
+ */
9
+ export interface ServiceRegistry {
10
+ }
11
+ export type ServiceName = Extract<keyof ServiceRegistry, string>;
12
+ export type ServiceTarget<N extends keyof ServiceRegistry> = TransportTarget<ServiceRegistry, N>;
13
+ export type ServiceProxyTarget<N extends keyof ServiceRegistry> = TransportProxyTarget<ServiceRegistry, N>;
5
14
  export type ServiceConfig = TransportConfig & BackgroundConfig;
6
15
  export type ServiceOptions = ServiceConfig & EntrypointOptions;
7
16
  export type ServiceEntrypointOptions = Partial<ServiceOptions>;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/service.ts"],"sourcesContent":["import {BackgroundConfig} from \"@typing/background\";\nimport {EntrypointOptions} from \"@typing/entrypoint\";\nimport {TransportConfig, TransportDefinition, TransportType} from \"@typing/transport\";\n\nexport const ServiceGlobalKey = \"adnbnService\";\n\nexport type ServiceConfig = TransportConfig & BackgroundConfig;\n\nexport type ServiceOptions = ServiceConfig & EntrypointOptions;\n\nexport type ServiceEntrypointOptions = Partial<ServiceOptions>;\n\nexport type ServiceDefinition<T extends TransportType> = TransportDefinition<ServiceOptions, T> &\n ServiceEntrypointOptions;\n\nexport type ServiceUnresolvedDefinition<T extends TransportType> = Partial<ServiceDefinition<T>>;\n"],"mappings":"AAIO,MAAM,mBAAmB;","names":[]}
1
+ {"version":3,"sources":["../../src/types/service.ts"],"sourcesContent":["import {BackgroundConfig} from \"@typing/background\";\nimport {EntrypointOptions} from \"@typing/entrypoint\";\nimport {\n TransportConfig,\n TransportDefinition,\n TransportProxyTarget,\n TransportTarget,\n TransportType,\n} from \"@typing/transport\";\n\nexport const ServiceGlobalKey = \"adnbnService\";\n\n/**\n * Empty because service names and contracts belong to the consuming application.\n * Generated `.adnbn/service.d.ts` declarations populate it by augmenting `adnbn/service`.\n */\nexport interface ServiceRegistry {}\n\nexport type ServiceName = Extract<keyof ServiceRegistry, string>;\n\nexport type ServiceTarget<N extends keyof ServiceRegistry> = TransportTarget<ServiceRegistry, N>;\n\nexport type ServiceProxyTarget<N extends keyof ServiceRegistry> = TransportProxyTarget<ServiceRegistry, N>;\n\nexport type ServiceConfig = TransportConfig & BackgroundConfig;\n\nexport type ServiceOptions = ServiceConfig & EntrypointOptions;\n\nexport type ServiceEntrypointOptions = Partial<ServiceOptions>;\n\nexport type ServiceDefinition<T extends TransportType> = TransportDefinition<ServiceOptions, T> &\n ServiceEntrypointOptions;\n\nexport type ServiceUnresolvedDefinition<T extends TransportType> = Partial<ServiceDefinition<T>>;\n"],"mappings":"AAUO,MAAM,mBAAmB;","names":[]}
@@ -1,7 +1,16 @@
1
1
  import { ViewDefinition, ViewOptions } from "./view.js";
2
2
  import { Browser } from "./browser.js";
3
3
  import { CspOptions } from "./csp.js";
4
+ import type { ManifestSidebar } from "./manifest.js";
4
5
  export declare const SidebarAlternativeBrowsers: ReadonlySet<Browser>;
6
+ /**
7
+ * Empty because sidebar aliases depend on the consuming application's entrypoints.
8
+ * Generated `.adnbn/sidebar.d.ts` declarations augment `adnbn`, adding discovered aliases as keys with value `true`.
9
+ */
10
+ export interface SidebarAliasRegistry {
11
+ }
12
+ export type SidebarAlias = keyof SidebarAliasRegistry extends never ? string : Extract<keyof SidebarAliasRegistry, string>;
13
+ export type SidebarMap = Map<SidebarAlias, ManifestSidebar>;
5
14
  export interface SidebarConfig {
6
15
  icon?: string;
7
16
  apply?: boolean;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/sidebar.ts"],"sourcesContent":["import {ViewDefinition, ViewOptions} from \"@typing/view\";\nimport {Browser} from \"@typing/browser\";\nimport {CspOptions} from \"@typing/csp\";\n\nexport const SidebarAlternativeBrowsers: ReadonlySet<Browser> = new Set([Browser.Opera, Browser.Firefox]);\n\nexport interface SidebarConfig {\n icon?: string;\n apply?: boolean;\n}\n\nexport type SidebarEntrypointOptions = SidebarConfig & CspOptions & ViewOptions;\n\nexport type SidebarProps = SidebarEntrypointOptions;\n\nexport type SidebarDefinition = SidebarEntrypointOptions & ViewDefinition<SidebarProps>;\n"],"mappings":"AACA,SAAQ,eAAc;AAGf,MAAM,6BAAmD,oBAAI,IAAI,CAAC,QAAQ,OAAO,QAAQ,OAAO,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../src/types/sidebar.ts"],"sourcesContent":["import {ViewDefinition, ViewOptions} from \"@typing/view\";\nimport {Browser} from \"@typing/browser\";\nimport {CspOptions} from \"@typing/csp\";\nimport type {ManifestSidebar} from \"@typing/manifest\";\n\nexport const SidebarAlternativeBrowsers: ReadonlySet<Browser> = new Set([Browser.Opera, Browser.Firefox]);\n\n/**\n * Empty because sidebar aliases depend on the consuming application's entrypoints.\n * Generated `.adnbn/sidebar.d.ts` declarations augment `adnbn`, adding discovered aliases as keys with value `true`.\n */\nexport interface SidebarAliasRegistry {}\n\nexport type SidebarAlias = keyof SidebarAliasRegistry extends never\n ? string\n : Extract<keyof SidebarAliasRegistry, string>;\n\nexport type SidebarMap = Map<SidebarAlias, ManifestSidebar>;\n\nexport interface SidebarConfig {\n icon?: string;\n apply?: boolean;\n}\n\nexport type SidebarEntrypointOptions = SidebarConfig & CspOptions & ViewOptions;\n\nexport type SidebarProps = SidebarEntrypointOptions;\n\nexport type SidebarDefinition = SidebarEntrypointOptions & ViewDefinition<SidebarProps>;\n"],"mappings":"AACA,SAAQ,eAAc;AAIf,MAAM,6BAAmD,oBAAI,IAAI,CAAC,QAAQ,OAAO,QAAQ,OAAO,CAAC;","names":[]}
@@ -29,6 +29,10 @@ export interface TransportReceiver {
29
29
  export interface TransportSender {
30
30
  send(data: TransportMessageData, options?: MessageSendOptions): any;
31
31
  }
32
+ /**
33
+ * Combines message sending and receiving without introducing additional members.
34
+ * Its members are inherited from TransportSender and TransportReceiver, rather than generated or augmented.
35
+ */
32
36
  export interface TransportMessage extends TransportSender, TransportReceiver {
33
37
  }
34
38
  export interface TransportProvider<T extends TransportType> {
@@ -0,0 +1,5 @@
1
+ import type { EntrypointAssets, EntrypointAssetsMap } from "../types/entrypoint.js";
2
+ /** Package fallback; extension builds provide access to their own bundler runtime. */
3
+ export declare const readAssets: () => EntrypointAssets | undefined;
4
+ /** Package fallback; the complete map is supplied only by a consuming background runtime. */
5
+ export declare const readAssetsMap: () => EntrypointAssetsMap | undefined;
@@ -0,0 +1,7 @@
1
+ const readAssets = () => void 0;
2
+ const readAssetsMap = () => void 0;
3
+ export {
4
+ readAssets,
5
+ readAssetsMap
6
+ };
7
+ //# sourceMappingURL=entrypoint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/virtual/entrypoint.ts"],"sourcesContent":["import type {EntrypointAssets, EntrypointAssetsMap} from \"@typing/entrypoint\";\n\n/** Package fallback; extension builds provide access to their own bundler runtime. */\nexport const readAssets = (): EntrypointAssets | undefined => undefined;\n\n/** Package fallback; the complete map is supplied only by a consuming background runtime. */\nexport const readAssetsMap = (): EntrypointAssetsMap | undefined => undefined;\n"],"mappings":"AAGO,MAAM,aAAa,MAAoC;AAGvD,MAAM,gBAAgB,MAAuC;","names":[]}
@@ -0,0 +1,2 @@
1
+ /** Package fallback; extension builds supply #adnbn/icon as a generated module. */
2
+ export declare const groups: Record<string, Record<number, string>>;
@@ -0,0 +1,5 @@
1
+ const groups = {};
2
+ export {
3
+ groups
4
+ };
5
+ //# sourceMappingURL=icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/virtual/icon.ts"],"sourcesContent":["/** Package fallback; extension builds supply #adnbn/icon as a generated module. */\nexport const groups: Record<string, Record<number, string>> = {};\n"],"mappings":"AACO,MAAM,SAAiD,CAAC;","names":[]}
@@ -0,0 +1,7 @@
1
+ import { Language, type LocaleCatalogue } from "../types/locale.js";
2
+ /** Package fallback; extension builds supply #adnbn/locale as a generated module. */
3
+ declare const catalogue: LocaleCatalogue;
4
+ export declare const lang: Language;
5
+ export declare const keys: readonly string[];
6
+ export declare const languages: readonly Language[];
7
+ export default catalogue;
@@ -0,0 +1,13 @@
1
+ import { Language } from "./../types/locale.js";
2
+ const catalogue = {};
3
+ const lang = Language.English;
4
+ const keys = [];
5
+ const languages = [];
6
+ var locale_default = catalogue;
7
+ export {
8
+ locale_default as default,
9
+ keys,
10
+ lang,
11
+ languages
12
+ };
13
+ //# sourceMappingURL=locale.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/virtual/locale.ts"],"sourcesContent":["import {Language, type LocaleCatalogue} from \"@typing/locale\";\n\n/** Package fallback; extension builds supply #adnbn/locale as a generated module. */\nconst catalogue: LocaleCatalogue = {};\n\nexport const lang: Language = Language.English;\nexport const keys: readonly string[] = [];\nexport const languages: readonly Language[] = [];\n\nexport default catalogue;\n"],"mappings":"AAAA,SAAQ,gBAAqC;AAG7C,MAAM,YAA6B,CAAC;AAE7B,MAAM,OAAiB,SAAS;AAChC,MAAM,OAA0B,CAAC;AACjC,MAAM,YAAiC,CAAC;AAE/C,IAAO,iBAAQ;","names":[]}
@@ -0,0 +1,40 @@
1
+ declare module "#adnbn/locale" {
2
+ const catalogue: typeof import("./locale.js").default;
3
+ export const lang: typeof import("./locale.js").lang;
4
+ export const keys: typeof import("./locale.js").keys;
5
+ export const languages: typeof import("./locale.js").languages;
6
+ export default catalogue;
7
+ }
8
+
9
+ declare module "#adnbn/page" {
10
+ export const aliases: typeof import("./page.js").aliases;
11
+ }
12
+
13
+ declare module "#adnbn/entrypoint" {
14
+ export const readAssets: typeof import("./entrypoint.js").readAssets;
15
+ export const readAssetsMap: typeof import("./entrypoint.js").readAssetsMap;
16
+ }
17
+
18
+ declare module "#adnbn/relay" {
19
+ export const options: typeof import("./relay.js").options;
20
+ }
21
+
22
+ declare module "#adnbn/popup" {
23
+ export const aliases: typeof import("./popup.js").aliases;
24
+ }
25
+
26
+ declare module "#adnbn/sidebar" {
27
+ export const aliases: typeof import("./sidebar.js").aliases;
28
+ }
29
+
30
+ declare module "#adnbn/offscreen" {
31
+ export const parameters: typeof import("./offscreen.js").parameters;
32
+ }
33
+
34
+ declare module "#adnbn/sandbox" {
35
+ export const parameters: typeof import("./sandbox.js").parameters;
36
+ }
37
+
38
+ declare module "#adnbn/icon" {
39
+ export const groups: typeof import("./icon.js").groups;
40
+ }
@@ -0,0 +1,3 @@
1
+ import type { OffscreenParametersMap } from "../types/offscreen.js";
2
+ /** Package fallback; extension builds supply #adnbn/offscreen as a generated module. */
3
+ export declare const parameters: OffscreenParametersMap;
@@ -0,0 +1,5 @@
1
+ const parameters = {};
2
+ export {
3
+ parameters
4
+ };
5
+ //# sourceMappingURL=offscreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/virtual/offscreen.ts"],"sourcesContent":["import type {OffscreenParametersMap} from \"@typing/offscreen\";\n\n/** Package fallback; extension builds supply #adnbn/offscreen as a generated module. */\nexport const parameters: OffscreenParametersMap = {};\n"],"mappings":"AAGO,MAAM,aAAqC,CAAC;","names":[]}
@@ -0,0 +1,2 @@
1
+ /** Package fallback; extension builds supply #adnbn/page as a generated module. */
2
+ export declare const aliases: Record<string, string>;
@@ -0,0 +1,5 @@
1
+ const aliases = {};
2
+ export {
3
+ aliases
4
+ };
5
+ //# sourceMappingURL=page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/virtual/page.ts"],"sourcesContent":["/** Package fallback; extension builds supply #adnbn/page as a generated module. */\nexport const aliases: Record<string, string> = {};\n"],"mappings":"AACO,MAAM,UAAkC,CAAC;","names":[]}
@@ -0,0 +1,3 @@
1
+ import type { ManifestPopup } from "../types/manifest.js";
2
+ /** Package fallback; extension builds supply #adnbn/popup as a generated module. */
3
+ export declare const aliases: Record<string, ManifestPopup>;
@@ -0,0 +1,5 @@
1
+ const aliases = {};
2
+ export {
3
+ aliases
4
+ };
5
+ //# sourceMappingURL=popup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/virtual/popup.ts"],"sourcesContent":["import type {ManifestPopup} from \"@typing/manifest\";\n\n/** Package fallback; extension builds supply #adnbn/popup as a generated module. */\nexport const aliases: Record<string, ManifestPopup> = {};\n"],"mappings":"AAGO,MAAM,UAAyC,CAAC;","names":[]}
@@ -0,0 +1,3 @@
1
+ import type { RelayOptions } from "../types/relay.js";
2
+ /** Package fallback; extension builds supply #adnbn/relay as a generated module. */
3
+ export declare const options: Record<string, RelayOptions>;
@@ -0,0 +1,5 @@
1
+ const options = {};
2
+ export {
3
+ options
4
+ };
5
+ //# sourceMappingURL=relay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/virtual/relay.ts"],"sourcesContent":["import type {RelayOptions} from \"@typing/relay\";\n\n/** Package fallback; extension builds supply #adnbn/relay as a generated module. */\nexport const options: Record<string, RelayOptions> = {};\n"],"mappings":"AAGO,MAAM,UAAwC,CAAC;","names":[]}
@@ -0,0 +1,3 @@
1
+ import type { SandboxParametersMap } from "../types/sandbox.js";
2
+ /** Package fallback; extension builds supply #adnbn/sandbox as a generated module. */
3
+ export declare const parameters: SandboxParametersMap;
@@ -0,0 +1,5 @@
1
+ const parameters = {};
2
+ export {
3
+ parameters
4
+ };
5
+ //# sourceMappingURL=sandbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/virtual/sandbox.ts"],"sourcesContent":["import type {SandboxParametersMap} from \"@typing/sandbox\";\n\n/** Package fallback; extension builds supply #adnbn/sandbox as a generated module. */\nexport const parameters: SandboxParametersMap = {};\n"],"mappings":"AAGO,MAAM,aAAmC,CAAC;","names":[]}
@@ -0,0 +1,3 @@
1
+ import type { ManifestSidebar } from "../types/manifest.js";
2
+ /** Package fallback; extension builds supply #adnbn/sidebar as a generated module. */
3
+ export declare const aliases: Record<string, ManifestSidebar>;
@@ -0,0 +1,5 @@
1
+ const aliases = {};
2
+ export {
3
+ aliases
4
+ };
5
+ //# sourceMappingURL=sidebar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/virtual/sidebar.ts"],"sourcesContent":["import type {ManifestSidebar} from \"@typing/manifest\";\n\n/** Package fallback; extension builds supply #adnbn/sidebar as a generated module. */\nexport const aliases: Record<string, ManifestSidebar> = {};\n"],"mappings":"AAGO,MAAM,UAA2C,CAAC;","names":[]}