adnbn 0.5.7 → 0.6.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 (497) hide show
  1. package/dist/cli/builders/app/command.d.ts +3 -6
  2. package/dist/cli/builders/app/index.d.ts +2 -14
  3. package/dist/cli/builders/locale/FirefoxLocaleValidator.d.ts +4 -7
  4. package/dist/cli/builders/locale/LocaleBuilder.d.ts +3 -6
  5. package/dist/cli/builders/locale/LocaleBuilder.js +3 -1
  6. package/dist/cli/builders/locale/LocaleBuilder.js.map +1 -1
  7. package/dist/cli/builders/locale/LocaleStructureValidator.d.ts +8 -0
  8. package/dist/cli/builders/locale/LocaleStructureValidator.js +64 -0
  9. package/dist/cli/builders/locale/LocaleStructureValidator.js.map +1 -0
  10. package/dist/cli/builders/locale/LocaleValidator.d.ts +4 -7
  11. package/dist/cli/builders/locale/LocaleValidator.js +2 -0
  12. package/dist/cli/builders/locale/LocaleValidator.js.map +1 -1
  13. package/dist/cli/builders/locale/OperaLocaleValidator.d.ts +4 -7
  14. package/dist/cli/builders/locale/index.d.ts +10 -19
  15. package/dist/cli/builders/locale/index.js +2 -0
  16. package/dist/cli/builders/locale/index.js.map +1 -1
  17. package/dist/cli/builders/manifest/ManifestBase.d.ts +30 -18
  18. package/dist/cli/builders/manifest/ManifestBase.js +212 -70
  19. package/dist/cli/builders/manifest/ManifestBase.js.map +1 -1
  20. package/dist/cli/builders/manifest/ManifestV2.d.ts +5 -12
  21. package/dist/cli/builders/manifest/ManifestV2.js +8 -7
  22. package/dist/cli/builders/manifest/ManifestV2.js.map +1 -1
  23. package/dist/cli/builders/manifest/ManifestV3.d.ts +5 -12
  24. package/dist/cli/builders/manifest/ManifestV3.js +9 -6
  25. package/dist/cli/builders/manifest/ManifestV3.js.map +1 -1
  26. package/dist/cli/builders/manifest/index.d.ts +3 -14
  27. package/dist/cli/builders/manifest/utils.d.ts +10 -15
  28. package/dist/cli/builders/manifest/utils.js +14 -2
  29. package/dist/cli/builders/manifest/utils.js.map +1 -1
  30. package/dist/cli/bundler/index.d.ts +2 -16
  31. package/dist/cli/bundler/plugins/EntrypointPlugin.d.ts +10 -19
  32. package/dist/cli/bundler/plugins/EntrypointPlugin.js +1 -0
  33. package/dist/cli/bundler/plugins/EntrypointPlugin.js.map +1 -1
  34. package/dist/cli/bundler/plugins/GenerateJsonPlugin.d.ts +5 -7
  35. package/dist/cli/bundler/plugins/GenerateJsonPlugin.js +1 -0
  36. package/dist/cli/bundler/plugins/GenerateJsonPlugin.js.map +1 -1
  37. package/dist/cli/bundler/plugins/ManifestPlugin.d.ts +3 -11
  38. package/dist/cli/bundler/plugins/ManifestPlugin.js +1 -0
  39. package/dist/cli/bundler/plugins/ManifestPlugin.js.map +1 -1
  40. package/dist/cli/bundler/plugins/ReplacePlugin.d.ts +3 -5
  41. package/dist/cli/bundler/plugins/ReplacePlugin.js +1 -0
  42. package/dist/cli/bundler/plugins/ReplacePlugin.js.map +1 -1
  43. package/dist/cli/bundler/plugins/WatchPlugin.d.ts +3 -6
  44. package/dist/cli/bundler/plugins/WatchPlugin.js +1 -0
  45. package/dist/cli/bundler/plugins/WatchPlugin.js.map +1 -1
  46. package/dist/cli/bundler/plugins/index.d.ts +5 -14
  47. package/dist/cli/bundler/utils/index.d.ts +2 -3
  48. package/dist/cli/bundler/utils/optimization.d.ts +2 -5
  49. package/dist/cli/bundler/utils/output.d.ts +2 -5
  50. package/dist/cli/entrypoint/file/ExpressionFile.d.ts +4 -10
  51. package/dist/cli/entrypoint/file/OptionFile.d.ts +3 -9
  52. package/dist/cli/entrypoint/file/SourceFile.d.ts +7 -11
  53. package/dist/cli/entrypoint/file/SourceFile.js +1 -0
  54. package/dist/cli/entrypoint/file/SourceFile.js.map +1 -1
  55. package/dist/cli/entrypoint/file/index.d.ts +4 -8
  56. package/dist/cli/entrypoint/file/injectors/core.d.ts +2 -4
  57. package/dist/cli/entrypoint/file/injectors/index.d.ts +2 -4
  58. package/dist/cli/entrypoint/file/parsers/AbstractParser.d.ts +6 -12
  59. package/dist/cli/entrypoint/file/parsers/AbstractParser.js +1 -0
  60. package/dist/cli/entrypoint/file/parsers/AbstractParser.js.map +1 -1
  61. package/dist/cli/entrypoint/file/parsers/ClassParser.d.ts +9 -15
  62. package/dist/cli/entrypoint/file/parsers/ClassParser.js +3 -0
  63. package/dist/cli/entrypoint/file/parsers/ClassParser.js.map +1 -1
  64. package/dist/cli/entrypoint/file/parsers/FunctionParser.d.ts +9 -17
  65. package/dist/cli/entrypoint/file/parsers/FunctionParser.js +3 -0
  66. package/dist/cli/entrypoint/file/parsers/FunctionParser.js.map +1 -1
  67. package/dist/cli/entrypoint/file/parsers/JSDocParser.d.ts +2 -5
  68. package/dist/cli/entrypoint/file/parsers/NodeFinder.d.ts +4 -10
  69. package/dist/cli/entrypoint/file/parsers/NodeFinder.js +1 -0
  70. package/dist/cli/entrypoint/file/parsers/NodeFinder.js.map +1 -1
  71. package/dist/cli/entrypoint/file/parsers/ObjectParser.d.ts +7 -15
  72. package/dist/cli/entrypoint/file/parsers/ObjectParser.js +1 -0
  73. package/dist/cli/entrypoint/file/parsers/ObjectParser.js.map +1 -1
  74. package/dist/cli/entrypoint/file/parsers/SignatureBuilder.d.ts +4 -12
  75. package/dist/cli/entrypoint/file/parsers/SignatureBuilder.js +5 -4
  76. package/dist/cli/entrypoint/file/parsers/SignatureBuilder.js.map +1 -1
  77. package/dist/cli/entrypoint/file/parsers/TypeResolver.d.ts +5 -11
  78. package/dist/cli/entrypoint/file/parsers/TypeResolver.js +2 -0
  79. package/dist/cli/entrypoint/file/parsers/TypeResolver.js.map +1 -1
  80. package/dist/cli/entrypoint/file/parsers/helpers/memberFilters.d.ts +1 -3
  81. package/dist/cli/entrypoint/file/parsers/index.d.ts +7 -14
  82. package/dist/cli/entrypoint/file/parsers/types.d.ts +4 -6
  83. package/dist/cli/entrypoint/file/resolvers/ImportResolver.d.ts +2 -6
  84. package/dist/cli/entrypoint/file/resolvers/ImportResolver.js +1 -0
  85. package/dist/cli/entrypoint/file/resolvers/ImportResolver.js.map +1 -1
  86. package/dist/cli/entrypoint/file/resolvers/TsResolver.d.ts +2 -5
  87. package/dist/cli/entrypoint/file/resolvers/index.d.ts +2 -3
  88. package/dist/cli/entrypoint/file/types.d.ts +5 -7
  89. package/dist/cli/entrypoint/finder/AbstractAssetFinder.d.ts +3 -16
  90. package/dist/cli/entrypoint/finder/AbstractEntrypointFinder.d.ts +4 -17
  91. package/dist/cli/entrypoint/finder/AbstractEntrypointFinder.js +22 -17
  92. package/dist/cli/entrypoint/finder/AbstractEntrypointFinder.js.map +1 -1
  93. package/dist/cli/entrypoint/finder/AbstractFinder.d.ts +4 -15
  94. package/dist/cli/entrypoint/finder/AbstractFinder.js +7 -2
  95. package/dist/cli/entrypoint/finder/AbstractFinder.js.map +1 -1
  96. package/dist/cli/entrypoint/finder/AbstractOptionsFinder.d.ts +3 -16
  97. package/dist/cli/entrypoint/finder/AbstractPluginFinder.d.ts +3 -18
  98. package/dist/cli/entrypoint/finder/AbstractTransportFinder.d.ts +9 -26
  99. package/dist/cli/entrypoint/finder/AbstractViewFinder.d.ts +9 -24
  100. package/dist/cli/entrypoint/finder/AssetPluginFinder.d.ts +8 -19
  101. package/dist/cli/entrypoint/finder/AssetPluginFinder.js +2 -0
  102. package/dist/cli/entrypoint/finder/AssetPluginFinder.js.map +1 -1
  103. package/dist/cli/entrypoint/finder/BackgroundFinder.d.ts +5 -19
  104. package/dist/cli/entrypoint/finder/CommandFinder.d.ts +7 -22
  105. package/dist/cli/entrypoint/finder/ContentFinder.d.ts +5 -19
  106. package/dist/cli/entrypoint/finder/IconFinder.d.ts +12 -25
  107. package/dist/cli/entrypoint/finder/LocaleFinder.d.ts +14 -22
  108. package/dist/cli/entrypoint/finder/LocaleFinder.js +23 -9
  109. package/dist/cli/entrypoint/finder/LocaleFinder.js.map +1 -1
  110. package/dist/cli/entrypoint/finder/OffscreenFinder.d.ts +5 -26
  111. package/dist/cli/entrypoint/finder/OffscreenViewFinder.d.ts +8 -29
  112. package/dist/cli/entrypoint/finder/OffscreenViewFinder.js +1 -0
  113. package/dist/cli/entrypoint/finder/OffscreenViewFinder.js.map +1 -1
  114. package/dist/cli/entrypoint/finder/PageFinder.d.ts +5 -22
  115. package/dist/cli/entrypoint/finder/PluginFinder.d.ts +7 -19
  116. package/dist/cli/entrypoint/finder/PluginFinder.js +2 -0
  117. package/dist/cli/entrypoint/finder/PluginFinder.js.map +1 -1
  118. package/dist/cli/entrypoint/finder/PopupFinder.d.ts +5 -22
  119. package/dist/cli/entrypoint/finder/RelayFinder.d.ts +5 -25
  120. package/dist/cli/entrypoint/finder/ServiceFinder.d.ts +5 -25
  121. package/dist/cli/entrypoint/finder/SidebarFinder.d.ts +5 -22
  122. package/dist/cli/entrypoint/finder/index.d.ts +18 -43
  123. package/dist/cli/entrypoint/index.d.ts +4 -64
  124. package/dist/cli/entrypoint/name/InlineNameGenerator.d.ts +2 -12
  125. package/dist/cli/entrypoint/name/NameGenerator.d.ts +2 -11
  126. package/dist/cli/entrypoint/name/NameGenerator.js +1 -0
  127. package/dist/cli/entrypoint/name/NameGenerator.js.map +1 -1
  128. package/dist/cli/entrypoint/name/index.d.ts +2 -9
  129. package/dist/cli/entrypoint/parser/AbstractParser.d.ts +14 -29
  130. package/dist/cli/entrypoint/parser/AbstractParser.js +1 -0
  131. package/dist/cli/entrypoint/parser/AbstractParser.js.map +1 -1
  132. package/dist/cli/entrypoint/parser/BackgroundParser.d.ts +3 -23
  133. package/dist/cli/entrypoint/parser/CommandParser.d.ts +4 -24
  134. package/dist/cli/entrypoint/parser/CommandParser.js +20 -5
  135. package/dist/cli/entrypoint/parser/CommandParser.js.map +1 -1
  136. package/dist/cli/entrypoint/parser/ContentParser.d.ts +4 -23
  137. package/dist/cli/entrypoint/parser/OffscreenParser.d.ts +3 -28
  138. package/dist/cli/entrypoint/parser/PageParser.d.ts +3 -26
  139. package/dist/cli/entrypoint/parser/PopupParser.d.ts +3 -26
  140. package/dist/cli/entrypoint/parser/RelayParser.d.ts +4 -27
  141. package/dist/cli/entrypoint/parser/ServiceParser.d.ts +3 -27
  142. package/dist/cli/entrypoint/parser/SidebarParser.d.ts +3 -26
  143. package/dist/cli/entrypoint/parser/ViewParser.d.ts +60 -80
  144. package/dist/cli/entrypoint/parser/index.d.ts +9 -38
  145. package/dist/cli/entrypoint/utils/framework.d.ts +3 -12
  146. package/dist/cli/entrypoint/utils/index.d.ts +2 -10
  147. package/dist/cli/entrypoint/utils/resolve.d.ts +3 -5
  148. package/dist/cli/index.d.ts +1 -2
  149. package/dist/cli/plugins/asset.d.ts +2 -15
  150. package/dist/cli/plugins/background/Background.d.ts +4 -21
  151. package/dist/cli/plugins/background/BackgroundEntry.d.ts +7 -21
  152. package/dist/cli/plugins/background/BackgroundEntry.js +1 -0
  153. package/dist/cli/plugins/background/BackgroundEntry.js.map +1 -1
  154. package/dist/cli/plugins/background/BackgroundManifest.d.ts +5 -21
  155. package/dist/cli/plugins/background/Command.d.ts +6 -23
  156. package/dist/cli/plugins/background/Service.d.ts +5 -27
  157. package/dist/cli/plugins/background/ServiceDeclaration.d.ts +3 -17
  158. package/dist/cli/plugins/background/index.d.ts +2 -15
  159. package/dist/cli/plugins/bundler.d.ts +2 -15
  160. package/dist/cli/plugins/content/Content.d.ts +9 -24
  161. package/dist/cli/plugins/content/ContentDriver.d.ts +7 -22
  162. package/dist/cli/plugins/content/ContentDriver.js +1 -0
  163. package/dist/cli/plugins/content/ContentDriver.js.map +1 -1
  164. package/dist/cli/plugins/content/ContentManager.d.ts +8 -19
  165. package/dist/cli/plugins/content/ContentName.d.ts +5 -17
  166. package/dist/cli/plugins/content/ContentName.js +1 -0
  167. package/dist/cli/plugins/content/ContentName.js.map +1 -1
  168. package/dist/cli/plugins/content/Relay.d.ts +9 -30
  169. package/dist/cli/plugins/content/RelayDeclaration.d.ts +3 -17
  170. package/dist/cli/plugins/content/index.d.ts +2 -15
  171. package/dist/cli/plugins/content/types.d.ts +8 -16
  172. package/dist/cli/plugins/content/utils.d.ts +2 -11
  173. package/dist/cli/plugins/dotenv/index.d.ts +3 -16
  174. package/dist/cli/plugins/dotenv/utils.d.ts +4 -7
  175. package/dist/cli/plugins/html.d.ts +2 -15
  176. package/dist/cli/plugins/icon/Icon.d.ts +6 -22
  177. package/dist/cli/plugins/icon/declaration/IconDeclaration.d.ts +3 -16
  178. package/dist/cli/plugins/icon/declaration/index.d.ts +1 -13
  179. package/dist/cli/plugins/icon/index.d.ts +4 -21
  180. package/dist/cli/plugins/index.d.ts +22 -58
  181. package/dist/cli/plugins/index.js +32 -30
  182. package/dist/cli/plugins/index.js.map +1 -1
  183. package/dist/cli/plugins/locale/Locale.d.ts +3 -20
  184. package/dist/cli/plugins/locale/declaration/LocaleDeclaration.d.ts +4 -16
  185. package/dist/cli/plugins/locale/declaration/index.d.ts +1 -13
  186. package/dist/cli/plugins/locale/declaration/locale.d.ts +61 -11
  187. package/dist/cli/plugins/locale/index.d.ts +2 -15
  188. package/dist/cli/plugins/locale/index.js +44 -49
  189. package/dist/cli/plugins/locale/index.js.map +1 -1
  190. package/dist/cli/plugins/manifest.d.ts +2 -0
  191. package/dist/cli/plugins/manifest.js +27 -0
  192. package/dist/cli/plugins/manifest.js.map +1 -0
  193. package/dist/cli/plugins/meta/AbstractMeta.d.ts +2 -15
  194. package/dist/cli/plugins/meta/AbstractMeta.js +1 -0
  195. package/dist/cli/plugins/meta/AbstractMeta.js.map +1 -1
  196. package/dist/cli/plugins/meta/Author.d.ts +3 -16
  197. package/dist/cli/plugins/meta/Homepage.d.ts +3 -16
  198. package/dist/cli/plugins/meta/Incognito.d.ts +4 -16
  199. package/dist/cli/plugins/meta/SpecificSettings.d.ts +4 -16
  200. package/dist/cli/plugins/meta/index.d.ts +7 -20
  201. package/dist/cli/plugins/offscreen/Offscreen.d.ts +11 -35
  202. package/dist/cli/plugins/offscreen/OffscreenDeclaration.d.ts +3 -17
  203. package/dist/cli/plugins/offscreen/index.d.ts +2 -15
  204. package/dist/cli/plugins/optimization.d.ts +2 -15
  205. package/dist/cli/plugins/output.d.ts +2 -15
  206. package/dist/cli/plugins/page/Page.d.ts +8 -26
  207. package/dist/cli/plugins/page/declaration/PageDeclaration.d.ts +3 -16
  208. package/dist/cli/plugins/page/declaration/index.d.ts +1 -13
  209. package/dist/cli/plugins/page/index.d.ts +2 -15
  210. package/dist/cli/plugins/popup/Popup.d.ts +9 -27
  211. package/dist/cli/plugins/popup/declaration/PopupDeclaration.d.ts +3 -16
  212. package/dist/cli/plugins/popup/declaration/index.d.ts +1 -13
  213. package/dist/cli/plugins/popup/index.d.ts +2 -15
  214. package/dist/cli/plugins/public.d.ts +2 -15
  215. package/dist/cli/plugins/react.d.ts +2 -15
  216. package/dist/cli/plugins/sidebar/Sidebar.d.ts +9 -27
  217. package/dist/cli/plugins/sidebar/declaration/SidebarDeclaration.d.ts +3 -16
  218. package/dist/cli/plugins/sidebar/declaration/index.d.ts +1 -13
  219. package/dist/cli/plugins/sidebar/index.d.ts +2 -15
  220. package/dist/cli/plugins/style.d.ts +2 -15
  221. package/dist/cli/plugins/typescript/FileBuilder.d.ts +2 -15
  222. package/dist/cli/plugins/typescript/FileBuilder.js +1 -0
  223. package/dist/cli/plugins/typescript/FileBuilder.js.map +1 -1
  224. package/dist/cli/plugins/typescript/TypescriptConfig.d.ts +4 -17
  225. package/dist/cli/plugins/typescript/declaration/index.d.ts +2 -14
  226. package/dist/cli/plugins/typescript/declaration/transport/TransportDeclaration.d.ts +4 -17
  227. package/dist/cli/plugins/typescript/declaration/transport/TransportDeclaration.js +1 -0
  228. package/dist/cli/plugins/typescript/declaration/transport/TransportDeclaration.js.map +1 -1
  229. package/dist/cli/plugins/typescript/declaration/transport/index.d.ts +1 -13
  230. package/dist/cli/plugins/typescript/declaration/vendor/VendorDeclaration.d.ts +3 -16
  231. package/dist/cli/plugins/typescript/declaration/vendor/index.d.ts +1 -13
  232. package/dist/cli/plugins/typescript/index.d.ts +6 -20
  233. package/dist/cli/plugins/version/AbstractVersion.d.ts +2 -15
  234. package/dist/cli/plugins/version/AbstractVersion.js +2 -1
  235. package/dist/cli/plugins/version/AbstractVersion.js.map +1 -1
  236. package/dist/cli/plugins/version/AddonVersion.d.ts +3 -16
  237. package/dist/cli/plugins/version/BrowserMinimumVersion.d.ts +3 -16
  238. package/dist/cli/plugins/version/index.d.ts +5 -18
  239. package/dist/cli/plugins/view/View.d.ts +10 -24
  240. package/dist/cli/plugins/view/View.js +2 -0
  241. package/dist/cli/plugins/view/View.js.map +1 -1
  242. package/dist/cli/plugins/view/index.d.ts +3 -22
  243. package/dist/cli/resolvers/bundler.d.ts +4 -15
  244. package/dist/cli/resolvers/config.d.ts +2 -14
  245. package/dist/cli/resolvers/config.js +45 -6
  246. package/dist/cli/resolvers/config.js.map +1 -1
  247. package/dist/cli/resolvers/path.d.ts +11 -24
  248. package/dist/cli/resolvers/plugin.d.ts +3 -16
  249. package/dist/cli/utils/fs.d.ts +3 -5
  250. package/dist/cli/utils/path.d.ts +3 -5
  251. package/dist/cli/utils/string.d.ts +2 -4
  252. package/dist/cli/virtual/background.d.ts +1 -0
  253. package/dist/cli/virtual/command.d.ts +1 -0
  254. package/dist/cli/virtual/content.d.ts +1 -0
  255. package/dist/cli/virtual/index.d.ts +9 -0
  256. package/dist/cli/virtual/index.js +2 -2
  257. package/dist/cli/virtual/offscreen.background.d.ts +1 -0
  258. package/dist/cli/virtual/offscreen.d.ts +1 -0
  259. package/dist/cli/virtual/relay.d.ts +1 -0
  260. package/dist/cli/virtual/transport.d.ts +1 -0
  261. package/dist/cli/virtual/view.d.ts +1 -0
  262. package/dist/cli/virtual/virtual.d.ts +38 -38
  263. package/dist/entry/background/Builder.d.ts +3 -12
  264. package/dist/entry/background/Builder.js +1 -0
  265. package/dist/entry/background/Builder.js.map +1 -1
  266. package/dist/entry/background/index.d.ts +3 -12
  267. package/dist/entry/background/resolvers/definition.d.ts +3 -12
  268. package/dist/entry/background/resolvers/index.d.ts +1 -8
  269. package/dist/entry/command/Builder.d.ts +4 -12
  270. package/dist/entry/command/index.d.ts +3 -12
  271. package/dist/entry/command/resolvers/definition.d.ts +4 -13
  272. package/dist/entry/command/resolvers/index.d.ts +1 -8
  273. package/dist/entry/content/adapters/react/Builder.d.ts +3 -17
  274. package/dist/entry/content/adapters/react/Node.d.ts +6 -14
  275. package/dist/entry/content/adapters/react/Node.js +2 -0
  276. package/dist/entry/content/adapters/react/Node.js.map +1 -1
  277. package/dist/entry/content/adapters/react/index.d.ts +4 -18
  278. package/dist/entry/content/adapters/react/resolvers/index.d.ts +1 -8
  279. package/dist/entry/content/adapters/react/resolvers/render.d.ts +2 -11
  280. package/dist/entry/content/adapters/vanilla/Builder.d.ts +3 -17
  281. package/dist/entry/content/adapters/vanilla/Node.d.ts +2 -11
  282. package/dist/entry/content/adapters/vanilla/Node.js +2 -0
  283. package/dist/entry/content/adapters/vanilla/Node.js.map +1 -1
  284. package/dist/entry/content/adapters/vanilla/index.d.ts +4 -18
  285. package/dist/entry/content/core/AbstractMarker.d.ts +2 -11
  286. package/dist/entry/content/core/AbstractMarker.js +1 -0
  287. package/dist/entry/content/core/AbstractMarker.js.map +1 -1
  288. package/dist/entry/content/core/AttributeMarker.d.ts +3 -12
  289. package/dist/entry/content/core/Builder.d.ts +8 -17
  290. package/dist/entry/content/core/Context.d.ts +2 -11
  291. package/dist/entry/content/core/Context.js +1 -0
  292. package/dist/entry/content/core/Context.js.map +1 -1
  293. package/dist/entry/content/core/EventEmitter.d.ts +2 -11
  294. package/dist/entry/content/core/EventNode.d.ts +2 -11
  295. package/dist/entry/content/core/EventNode.js +2 -0
  296. package/dist/entry/content/core/EventNode.js.map +1 -1
  297. package/dist/entry/content/core/ManagedContext.d.ts +3 -12
  298. package/dist/entry/content/core/MarkerNode.d.ts +2 -11
  299. package/dist/entry/content/core/MarkerNode.js +2 -0
  300. package/dist/entry/content/core/MarkerNode.js.map +1 -1
  301. package/dist/entry/content/core/MountBuilder.d.ts +3 -16
  302. package/dist/entry/content/core/MountNode.d.ts +2 -11
  303. package/dist/entry/content/core/MountNode.js +2 -0
  304. package/dist/entry/content/core/MountNode.js.map +1 -1
  305. package/dist/entry/content/core/Node.d.ts +2 -11
  306. package/dist/entry/content/core/Node.js +2 -0
  307. package/dist/entry/content/core/Node.js.map +1 -1
  308. package/dist/entry/content/core/WeakMarker.d.ts +3 -12
  309. package/dist/entry/content/core/resolvers/anchor.d.ts +2 -11
  310. package/dist/entry/content/core/resolvers/container.d.ts +2 -11
  311. package/dist/entry/content/core/resolvers/definition.d.ts +3 -12
  312. package/dist/entry/content/core/resolvers/index.d.ts +6 -13
  313. package/dist/entry/content/core/resolvers/mount.d.ts +2 -11
  314. package/dist/entry/content/core/resolvers/render.d.ts +3 -12
  315. package/dist/entry/content/core/resolvers/watch.d.ts +4 -13
  316. package/dist/entry/content/index.d.ts +1 -8
  317. package/dist/entry/core/Builder.d.ts +2 -11
  318. package/dist/entry/offscreen/Builder.d.ts +8 -25
  319. package/dist/entry/offscreen/Builder.js +8 -1
  320. package/dist/entry/offscreen/Builder.js.map +1 -1
  321. package/dist/entry/offscreen/TransportBuilder.d.ts +6 -24
  322. package/dist/entry/offscreen/index.d.ts +4 -25
  323. package/dist/entry/relay/Builder.d.ts +7 -21
  324. package/dist/entry/relay/Builder.js +1 -0
  325. package/dist/entry/relay/Builder.js.map +1 -1
  326. package/dist/entry/relay/TransportBuilder.d.ts +6 -20
  327. package/dist/entry/relay/index.d.ts +4 -21
  328. package/dist/entry/service/Builder.d.ts +6 -20
  329. package/dist/entry/service/index.d.ts +2 -14
  330. package/dist/entry/transport/AbstractBuilder.d.ts +4 -14
  331. package/dist/entry/transport/index.d.ts +1 -14
  332. package/dist/entry/transport/resolvers/definition.d.ts +7 -20
  333. package/dist/entry/transport/resolvers/index.d.ts +1 -14
  334. package/dist/entry/view/adapters/react/Builder.d.ts +4 -16
  335. package/dist/entry/view/adapters/react/index.d.ts +4 -17
  336. package/dist/entry/view/adapters/react/resolvers/render.d.ts +2 -13
  337. package/dist/entry/view/adapters/vanilla/Builder.d.ts +3 -15
  338. package/dist/entry/view/adapters/vanilla/index.d.ts +4 -16
  339. package/dist/entry/view/core/Builder.d.ts +3 -14
  340. package/dist/entry/view/core/resolvers/container.d.ts +2 -13
  341. package/dist/entry/view/core/resolvers/definition.d.ts +3 -14
  342. package/dist/entry/view/core/resolvers/render.d.ts +3 -14
  343. package/dist/entry/view/index.d.ts +1 -10
  344. package/dist/index.d.ts +1 -43
  345. package/dist/locale/adapters/react/LocaleProvider.d.ts +4 -6
  346. package/dist/locale/adapters/react/LocaleProvider.js +5 -5
  347. package/dist/locale/adapters/react/LocaleProvider.js.map +1 -1
  348. package/dist/locale/adapters/react/context.d.ts +8 -13
  349. package/dist/locale/adapters/react/context.js +2 -5
  350. package/dist/locale/adapters/react/context.js.map +1 -1
  351. package/dist/locale/adapters/react/index.d.ts +2 -6
  352. package/dist/locale/helpers.d.ts +60 -36
  353. package/dist/locale/helpers.js +14 -14
  354. package/dist/locale/helpers.js.map +1 -1
  355. package/dist/locale/index.d.ts +3 -7
  356. package/dist/locale/index.js.map +1 -1
  357. package/dist/locale/providers/AbstractLocale.d.ts +5 -8
  358. package/dist/locale/providers/AbstractLocale.js +9 -6
  359. package/dist/locale/providers/AbstractLocale.js.map +1 -1
  360. package/dist/locale/providers/CustomLocale.d.ts +5 -8
  361. package/dist/locale/providers/CustomLocale.js +3 -1
  362. package/dist/locale/providers/CustomLocale.js.map +1 -1
  363. package/dist/locale/providers/DynamicLocale.d.ts +7 -11
  364. package/dist/locale/providers/DynamicLocale.js +1 -1
  365. package/dist/locale/providers/DynamicLocale.js.map +1 -1
  366. package/dist/locale/providers/NativeLocale.d.ts +7 -10
  367. package/dist/locale/providers/NativeLocale.js.map +1 -1
  368. package/dist/locale/providers/index.d.ts +3 -6
  369. package/dist/locale/utils.d.ts +11 -14
  370. package/dist/main/app.d.ts +1 -1
  371. package/dist/main/app.js +3 -2
  372. package/dist/main/app.js.map +1 -1
  373. package/dist/main/background.d.ts +3 -12
  374. package/dist/main/browser.d.ts +1 -1
  375. package/dist/main/command.d.ts +4 -13
  376. package/dist/main/config.d.ts +3 -16
  377. package/dist/main/config.js.map +1 -1
  378. package/dist/main/content.d.ts +6 -18
  379. package/dist/main/env.d.ts +7 -15
  380. package/dist/main/icon.d.ts +6 -7
  381. package/dist/main/index.d.ts +17 -43
  382. package/dist/main/manifest.d.ts +1 -7
  383. package/dist/main/offscreen.d.ts +9 -22
  384. package/dist/main/offscreen.js +1 -1
  385. package/dist/main/offscreen.js.map +1 -1
  386. package/dist/main/page.d.ts +7 -19
  387. package/dist/main/plugin.d.ts +3 -16
  388. package/dist/main/popup.d.ts +8 -18
  389. package/dist/main/popup.js +2 -2
  390. package/dist/main/popup.js.map +1 -1
  391. package/dist/main/relay.d.ts +8 -21
  392. package/dist/main/service.d.ts +6 -15
  393. package/dist/main/sidebar.d.ts +8 -18
  394. package/dist/main/sidebar.js +2 -2
  395. package/dist/main/sidebar.js.map +1 -1
  396. package/dist/main/view.d.ts +1 -9
  397. package/dist/message/MessageManager.d.ts +2 -5
  398. package/dist/message/adapters/react/index.d.ts +1 -2
  399. package/dist/message/adapters/react/useMessageHandler.d.ts +2 -5
  400. package/dist/message/handlers/AbstractHandler.d.ts +2 -5
  401. package/dist/message/handlers/GeneralHandler.d.ts +3 -6
  402. package/dist/message/handlers/GeneralHandler.js +1 -0
  403. package/dist/message/handlers/GeneralHandler.js.map +1 -1
  404. package/dist/message/handlers/MapHandler.d.ts +3 -6
  405. package/dist/message/handlers/MapHandler.js +1 -0
  406. package/dist/message/handlers/MapHandler.js.map +1 -1
  407. package/dist/message/handlers/SingleHandler.d.ts +3 -6
  408. package/dist/message/handlers/SingleHandler.js +2 -0
  409. package/dist/message/handlers/SingleHandler.js.map +1 -1
  410. package/dist/message/handlers/index.d.ts +3 -5
  411. package/dist/message/index.d.ts +9 -13
  412. package/dist/message/providers/AbstractMessage.d.ts +2 -5
  413. package/dist/message/providers/Message.d.ts +4 -7
  414. package/dist/message/providers/index.d.ts +1 -4
  415. package/dist/offscreen/OffscreenBackground.d.ts +2 -9
  416. package/dist/offscreen/OffscreenBridge.d.ts +8 -9
  417. package/dist/offscreen/OffscreenBridge.js +55 -7
  418. package/dist/offscreen/OffscreenBridge.js.map +1 -1
  419. package/dist/offscreen/OffscreenManager.d.ts +4 -15
  420. package/dist/offscreen/OffscreenMessage.d.ts +2 -14
  421. package/dist/offscreen/index.d.ts +5 -26
  422. package/dist/offscreen/providers/Offscreen.d.ts +3 -14
  423. package/dist/offscreen/providers/ProxyOffscreen.d.ts +7 -18
  424. package/dist/offscreen/providers/ProxyOffscreen.js +44 -23
  425. package/dist/offscreen/providers/ProxyOffscreen.js.map +1 -1
  426. package/dist/offscreen/providers/RegisterOffscreen.d.ts +5 -18
  427. package/dist/offscreen/providers/RegisterOffscreen.js +1 -0
  428. package/dist/offscreen/providers/RegisterOffscreen.js.map +1 -1
  429. package/dist/offscreen/providers/index.d.ts +3 -17
  430. package/dist/offscreen/utils.d.ts +1 -3
  431. package/dist/relay/RelayManager.d.ts +6 -16
  432. package/dist/relay/RelayMessage.d.ts +2 -14
  433. package/dist/relay/RelayPermission.d.ts +4 -15
  434. package/dist/relay/index.d.ts +4 -22
  435. package/dist/relay/providers/ProxyRelay.d.ts +8 -19
  436. package/dist/relay/providers/ProxyRelay.js +2 -0
  437. package/dist/relay/providers/ProxyRelay.js.map +1 -1
  438. package/dist/relay/providers/RegisterRelay.d.ts +4 -16
  439. package/dist/relay/providers/RegisterRelay.js +2 -0
  440. package/dist/relay/providers/RegisterRelay.js.map +1 -1
  441. package/dist/relay/providers/Relay.d.ts +3 -14
  442. package/dist/relay/providers/index.d.ts +3 -18
  443. package/dist/relay/utils.d.ts +3 -5
  444. package/dist/service/ServiceManager.d.ts +4 -15
  445. package/dist/service/ServiceMessage.d.ts +2 -14
  446. package/dist/service/index.d.ts +4 -19
  447. package/dist/service/providers/ProxyService.d.ts +4 -15
  448. package/dist/service/providers/RegisterService.d.ts +3 -15
  449. package/dist/service/providers/RegisterService.js +1 -0
  450. package/dist/service/providers/RegisterService.js.map +1 -1
  451. package/dist/service/providers/Service.d.ts +3 -14
  452. package/dist/service/providers/index.d.ts +3 -15
  453. package/dist/transport/BaseTransport.d.ts +2 -13
  454. package/dist/transport/BaseTransport.js +1 -0
  455. package/dist/transport/BaseTransport.js.map +1 -1
  456. package/dist/transport/ProxyTransport.d.ts +4 -14
  457. package/dist/transport/RegisterTransport.d.ts +4 -16
  458. package/dist/transport/RegisterTransport.js +13 -20
  459. package/dist/transport/RegisterTransport.js.map +1 -1
  460. package/dist/transport/TransportManager.d.ts +2 -13
  461. package/dist/transport/TransportMessage.d.ts +3 -13
  462. package/dist/transport/index.d.ts +1 -9
  463. package/dist/types/app.d.ts +8 -6
  464. package/dist/types/app.js +7 -1
  465. package/dist/types/app.js.map +1 -1
  466. package/dist/types/background.d.ts +20 -7
  467. package/dist/types/browser.d.ts +6 -8
  468. package/dist/types/command.d.ts +27 -7
  469. package/dist/types/config.d.ts +673 -11
  470. package/dist/types/content.d.ts +195 -7
  471. package/dist/types/entrypoint.d.ts +106 -7
  472. package/dist/types/entrypoint.js.map +1 -1
  473. package/dist/types/env.d.ts +4 -6
  474. package/dist/types/framework.d.ts +1 -3
  475. package/dist/types/helpers.d.ts +6 -7
  476. package/dist/types/icon.d.ts +3 -5
  477. package/dist/types/locale.d.ts +35 -29
  478. package/dist/types/locale.js.map +1 -1
  479. package/dist/types/manifest.d.ts +163 -7
  480. package/dist/types/manifest.js.map +1 -1
  481. package/dist/types/message.d.ts +17 -19
  482. package/dist/types/message.js +1 -1
  483. package/dist/types/message.js.map +1 -1
  484. package/dist/types/offscreen.d.ts +13 -23
  485. package/dist/types/offscreen.js +2 -0
  486. package/dist/types/offscreen.js.map +1 -1
  487. package/dist/types/page.d.ts +5 -16
  488. package/dist/types/plugin.d.ts +101 -11
  489. package/dist/types/popup.d.ts +5 -16
  490. package/dist/types/relay.d.ts +13 -21
  491. package/dist/types/service.d.ts +9 -18
  492. package/dist/types/sidebar.d.ts +7 -17
  493. package/dist/types/transport.d.ts +22 -29
  494. package/dist/types/view.d.ts +18 -24
  495. package/package.json +9 -11
  496. package/dist/config-B38J9WIM.d.ts +0 -743
  497. package/dist/manifest-DKvERQ4d.d.ts +0 -503
@@ -1,11 +1,673 @@
1
- import '@rspack/core';
2
- import 'html-rspack-tags-plugin';
3
- import './app.js';
4
- import './browser.js';
5
- import '../manifest-DKvERQ4d.js';
6
- export { C as Config, a as ConfigDefinition, O as OptionalConfig, R as ReadonlyConfig, U as UserConfig, r as UserConfigCallback } from '../config-B38J9WIM.js';
7
- import './locale.js';
8
- import './helpers.js';
9
- import './env.js';
10
- import 'react';
11
- import 'utility-types';
1
+ import type { Configuration as RspackConfig, Filename } from "@rspack/core";
2
+ import type { Options as HtmlOptions } from "html-rspack-tags-plugin";
3
+ import { Command, Mode, Workspace } from "./app.js";
4
+ import { Browser, BrowserSpecific } from "./browser.js";
5
+ import { ManifestIncognitoValue, ManifestVersion, ManifestBuilder, OptionalManifest } from "./manifest.js";
6
+ import { Plugin } from "./plugin.js";
7
+ import { Language } from "./locale.js";
8
+ import { Awaiter } from "./helpers.js";
9
+ import { EnvFilterOptions, EnvFilterVariant } from "./env.js";
10
+ /**
11
+ * Configuration options for building a browser extension. This interface defines
12
+ * all the properties required to customize the build process, extension metadata,
13
+ * file structure, and other build-related settings.
14
+ */
15
+ export interface Config {
16
+ /**
17
+ * Enables debug mode during extension building.
18
+ * In debug mode, additional information about the build process is displayed.
19
+ */
20
+ debug: boolean;
21
+ /**
22
+ * Defines the command to be executed.
23
+ * For example, `build`, `watch`, etc.
24
+ */
25
+ command: Command;
26
+ /**
27
+ * Build mode for the extension (e.g., `production`, `development`).
28
+ * Affects optimization and other build parameters.
29
+ */
30
+ mode: Mode;
31
+ /**
32
+ * Browser for which the extension is being built.
33
+ * Determines specific settings and compatibility.
34
+ */
35
+ browser: Browser;
36
+ /**
37
+ * Name of the application (extension) that will be built.
38
+ * Used to identify a specific extension in a multi-project structure.
39
+ * @example "my-app"
40
+ */
41
+ app: string;
42
+ /**
43
+ * Extension name for manifest.name.
44
+ *
45
+ * Can be either:
46
+ * - a plain string — inserted into the manifest as-is;
47
+ * - a localization key (for example, "@app.name") — converted to a reference to a localized message
48
+ * and must exist in your locale files.
49
+ *
50
+ * @example "@app.name"
51
+ * @example "Awesome App"
52
+ */
53
+ name: undefined | string;
54
+ /**
55
+ * Short extension name for manifest.short_name.
56
+ *
57
+ * Can be either:
58
+ * - a plain string — inserted into the manifest as-is;
59
+ * - a localization key (for example, "@app.short_name") — converted to a reference to a localized message
60
+ * and must exist in your locale files.
61
+ *
62
+ * Note: some browsers do not support localization in the short_name field (e.g., Opera, Edge).
63
+ * In that case, when a localization key is provided, it will be resolved to the actual string for the selected language.
64
+ *
65
+ * @example "@app.short_name"
66
+ * @example "Awesome"
67
+ */
68
+ shortName: undefined | string;
69
+ /**
70
+ * Extension description for manifest.description.
71
+ *
72
+ * Can be either:
73
+ * - a plain string — inserted into the manifest as-is;
74
+ * - a localization key (for example, "@app.description") — converted to a reference to a localized message
75
+ * and must exist in your locale files.
76
+ *
77
+ * @example "@app.description"
78
+ * @example "My awesome app description"
79
+ */
80
+ description: undefined | string;
81
+ /**
82
+ * Author for manifest.author.
83
+ *
84
+ * Can be either:
85
+ * - a plain string — inserted into the manifest as-is;
86
+ * - a function returning a string or undefined — allows computing the value at build time.
87
+ *
88
+ * If the value is undefined (or the function returns undefined), the field will be omitted.
89
+ *
90
+ * @example "ACME Corp."
91
+ * @example () => getEnv('AUTHOR') || "Addon Bone"
92
+ */
93
+ author: undefined | string | (() => string | undefined);
94
+ /**
95
+ * The version of the extension.
96
+ * Can be either:
97
+ * - a valid version (e.g., "1.0.0"), or a key referencing a value from an .env file.
98
+ * - a function that returns the version or key dynamically.
99
+ *
100
+ * @default "VERSION"
101
+ */
102
+ version: string | (() => string | undefined);
103
+ /**
104
+ * The minimum supported version of browser.
105
+ * Used to populate fields in the manifest:
106
+ * - `minimum_chrome_version`
107
+ * - `browser_specific_settings.gecko.strict_min_version` for Firefox
108
+ *
109
+ * Can be either:
110
+ * - a valid version, or a key referencing a value from an .env file.
111
+ * - a function that returns the version or key dynamically.
112
+ *
113
+ * @default "MINIMUM_VERSION"
114
+ */
115
+ minimumVersion: string | number | (() => string | number | undefined);
116
+ /**
117
+ * The URL for the extension's homepage
118
+ * Can be either:
119
+ * - a valid url or a key referencing a value from an .env file.
120
+ * - a function that returns the url or key dynamically.
121
+ *
122
+ * @default HOMEPAGE
123
+ */
124
+ homepage: string | (() => string | undefined);
125
+ /**
126
+ * Name of the icon group to use in the manifest as the primary extension icon (manifest.icons).
127
+ *
128
+ * An icon group is a named set of icons by sizes (e.g., 16, 32, 48, 128, ...).
129
+ * The value must match one of the available icon groups.
130
+ *
131
+ * @default: "default"
132
+ *
133
+ * Examples:
134
+ * - "default"
135
+ * - "active"
136
+ * - "disable"
137
+ */
138
+ icon: string;
139
+ /**
140
+ * Browser-specific settings (populate manifest.browser_specific_settings).
141
+ *
142
+ * Two forms are supported:
143
+ * - object — fixed values for browsers (e.g., gecko, safari);
144
+ * - function — lazy evaluation at build time; if it returns undefined, the field is omitted.
145
+ *
146
+ * Examples:
147
+ * - { gecko: { id: "addon@example.com", strictMinVersion: "109.0" } }
148
+ * - () => ({ gecko: { id: "addon@example.com" } })
149
+ */
150
+ specific?: BrowserSpecific | (() => BrowserSpecific | undefined);
151
+ /**
152
+ * Used to specify how this extension will behave in incognito mode
153
+ *
154
+ * @default "not_allowed"
155
+ */
156
+ incognito?: ManifestIncognitoValue | (() => ManifestIncognitoValue | undefined);
157
+ /**
158
+ * Extension manifest without the version.
159
+ * Allows customizing the manifest.json file beyond the standard fields handled by the builder.
160
+ * The structure and available APIs depend on the manifest version (v2 or v3).
161
+ *
162
+ * Accepts:
163
+ * - an object with additional manifest fields
164
+ * - a function that receives a ManifestBuilder instance and returns manifest fields
165
+ *
166
+ * Note: Some fields like name, version, and permissions are handled automatically
167
+ * by the builder and should not be included here unless you need to override them.
168
+ */
169
+ manifest?: OptionalManifest | ((builder: ManifestBuilder) => OptionalManifest | undefined);
170
+ /**
171
+ * Extension manifest version (e.g., v2 or v3).
172
+ * Defines the manifest structure and available APIs.
173
+ */
174
+ manifestVersion: ManifestVersion;
175
+ /**
176
+ * Default locale for the extension.
177
+ * @example "en"
178
+ */
179
+ lang: Language;
180
+ /**
181
+ * Project workspace mode.
182
+ *
183
+ * - `single` uses the source directory itself as the shared layer.
184
+ * - `multi` uses the configured shared directory.
185
+ *
186
+ * @default "single"
187
+ */
188
+ workspace: Workspace;
189
+ /**
190
+ * Path to the directory with source files for building.
191
+ * This is the base directory relative to which other paths are defined.
192
+ * @example "addon"
193
+ */
194
+ rootDir: string;
195
+ /**
196
+ * Directory where the built extensions will be placed.
197
+ * Final extension files will be located here.
198
+ * @example "./dist"
199
+ * @path Output path: `{{inputDir}}/{{outputDir}}`
200
+ *
201
+ * @default "dist"
202
+ */
203
+ outDir: string;
204
+ /**
205
+ * Directory where the application and shared directory are located.
206
+ * Main directory with source code.
207
+ * @example "src"
208
+ * @path Full path: `{{inputDir}}/{{srcDir}}`
209
+ *
210
+ * @default "src"
211
+ */
212
+ srcDir: string;
213
+ /**
214
+ * Directory with shared modules (content scripts, background scripts, common code)
215
+ * used across multiple extensions. Applies only when `workspace` is `"multi"`;
216
+ * for a `"single"` workspace the value is forced to `"."`, since a single-app
217
+ * project has no separate shared layer.
218
+ *
219
+ * @example "shared"
220
+ * @path Full path: `{{inputDir}}/{{srcDir}}/{{sharedDir}}`
221
+ *
222
+ * @default "shared"
223
+ */
224
+ sharedDir: string;
225
+ /**
226
+ * Directory where all app extensions are located.
227
+ * These extensions can use code from the Shared directory.
228
+ * @example "apps"
229
+ * @path Full path: `{{inputDir}}/{{srcDir}}/{{appsDir}}`
230
+ *
231
+ * @default "apps"
232
+ */
233
+ appsDir: string;
234
+ /**
235
+ * Directory inside a specific extension application.
236
+ * May contain additional structure, such as a src folder.
237
+ * @example "src"
238
+ * @path Full path: `{{inputDir}}/{{appsDir}}/{{appDir}}/{{appSrcDir}}`
239
+ *
240
+ * @default "."
241
+ */
242
+ appSrcDir: string;
243
+ /**
244
+ * Directory for icons and logos. Can be located in the Shared directory,
245
+ * in the project root, or in a folder for a specific App.
246
+ *
247
+ * @example "icons"
248
+ *
249
+ * @path Full paths can be:
250
+ *
251
+ * - `{{inputDir}}/{{srcDir}}/{{icon.sourceDir}}`
252
+ * - `{{inputDir}}/{{sharedDir}}/{{icon.sourceDir}}`
253
+ * - `{{inputDir}}/{{appsDir}}/{{appDir}}/{{icon.sourceDir}}`
254
+ */
255
+ iconSrcDir: string;
256
+ /**
257
+ * Directory for image files in outputDir.
258
+ *
259
+ * @example "icons"
260
+ * @path Full path: `{{inputDir}}/{{outputDir}}/{{appDir}}/{{icon.outputDir}}`
261
+ */
262
+ iconOutDir: string;
263
+ /**
264
+ * Directory for output JavaScript files in outputDir.
265
+ * All compiled JS files will be placed here.
266
+ * @example "js"
267
+ * @path Full path: `{{inputDir}}//{{outputDir}}/{{appDir}}/{{jsDir}}`
268
+ *
269
+ * @default "js"
270
+ */
271
+ jsDir: string;
272
+ /**
273
+ * Directory for output CSS files in outputDir.
274
+ * All compiled styles will be placed here.
275
+ * @example "css"
276
+ * @path Full path: `{{inputDir}}/{{outputDir}}/{{appDir}}/{{cssDir}}`
277
+ *
278
+ * @default "css"
279
+ */
280
+ cssDir: string;
281
+ /**
282
+ * Directory for assets (images, fonts, etc.) in outputDir.
283
+ * @example "assets"
284
+ * @path Full path: `{{inputDir}}/{{outputDir}}/{{appDir}}/{{assetsDir}}`
285
+ *
286
+ * @default "assets"
287
+ */
288
+ assetsDir: string;
289
+ /**
290
+ * Directory for HTML files in outputDir.
291
+ * @example "view"
292
+ * @path Full path: `{{inputDir}}/{{outputDir}}/{{appDir}}/{{htmlDir}}`
293
+ *
294
+ * @default "."
295
+ */
296
+ htmlDir: string;
297
+ /**
298
+ * Directory for localizations. Can be located in the Shared directory,
299
+ * in the project root, or in a folder for a specific App.
300
+ *
301
+ * @example "locales"
302
+ *
303
+ * @path Full paths can be:
304
+ *
305
+ * - `{{inputDir}}/{{srcDir}}/{{localeDir}}`
306
+ * - `{{inputDir}}/{{sharedDir}}/{{localeDir}}`
307
+ * - `{{inputDir}}/{{appsDir}}/{{appDir}}/{{localeDir}}`
308
+ */
309
+ localeDir: string;
310
+ /**
311
+ * Represents an HTML configuration, which can either be a single HtmlOptions object,
312
+ * an array of HtmlOptions objects, or a function returning one of these formats.
313
+ *
314
+ * - HtmlOptions: A single HTML configuration object.
315
+ * - HtmlOptions[]: An array containing multiple HTML configuration objects.
316
+ * - { (): HtmlOptions | HtmlOptions[] }: A function that dynamically generates and
317
+ * returns either an HtmlOptions object or an array of HtmlOptions objects.
318
+ */
319
+ html: HtmlOptions | HtmlOptions[] | (() => HtmlOptions | HtmlOptions[]);
320
+ /**
321
+ * Rspack bundler configuration.
322
+ *
323
+ * Accepts:
324
+ * - a Rspack configuration object;
325
+ * - a function that receives the current (system-prepared) Rspack configuration
326
+ * and returns an object with changes.
327
+ *
328
+ * How it works:
329
+ * - Any object you provide (either returned from the function or passed directly) will be
330
+ * recursively merged with the base configuration by the build system.
331
+ * - Do NOT perform manual merging inside the function — simply return a patch object with the
332
+ * fields you want to adjust, or return an empty object if no changes are needed.
333
+ * - The function parameter is mainly for inspecting the current config to decide whether
334
+ * additional adjustments are necessary.
335
+ */
336
+ bundler: RspackConfig | ((rspack: RspackConfig) => Awaiter<RspackConfig>);
337
+ /**
338
+ * Environment variables inclusion settings.
339
+ *
340
+ * Supports three forms:
341
+ * - string: treated as a prefix filter. Only variables whose names start with this prefix are included.
342
+ * Equivalent to: { filter: "<PREFIX>" }.
343
+ * - function: a predicate that receives a variable name and returns true to include it.
344
+ * Equivalent to: { filter: (name) => boolean }.
345
+ * - object: advanced settings.
346
+ * - filter?: string | ((name: string) => boolean) — a prefix or predicate to select variables.
347
+ * - crypt?: boolean — if true, values will be obfuscated with a simple reversible scheme
348
+ * (for convenience only; not secure).
349
+ *
350
+ * Notes:
351
+ * - If no filter is provided (e.g., empty string or a function that always returns false), no variables are included.
352
+ * - Obfuscation is intended to reduce casual inspection only and should not be considered encryption.
353
+ *
354
+ * Examples:
355
+ * - `"APP_"` - include all variables starting with `APP_`
356
+ * - `(name) => name === "FEATURE_FLAG"` - include a single variable via predicate
357
+ * - `{ filter: "PUBLIC_", crypt: true }` - include by prefix and obfuscate values
358
+ */
359
+ env: EnvFilterVariant | Partial<EnvFilterOptions>;
360
+ /**
361
+ * Array of plugins used when building the extension.
362
+ * Allows extending the builder's functionality.
363
+ */
364
+ plugins: Plugin[];
365
+ /**
366
+ * Flag to enable dependency analyzer.
367
+ * When activated, open RSDoctor during the build, which shows
368
+ * project dependencies and their sizes.
369
+ *
370
+ * @default false
371
+ */
372
+ analyze: boolean;
373
+ /**
374
+ * Path to the builder configuration file.
375
+ * @example "./adnbn.config.ts"
376
+ */
377
+ configFile: string;
378
+ /**
379
+ * Flag indicating whether to merge background scripts from App and Shared directories.
380
+ * When `true`, background scripts from both directories will be combined into a single file.
381
+ *
382
+ * @default false
383
+ */
384
+ mergeBackground: boolean;
385
+ /**
386
+ * Flag indicating whether to merge commands from App and Shared directories.
387
+ * When `true`, commands from both directories will be combined.
388
+ *
389
+ * @default false
390
+ */
391
+ mergeCommands: boolean;
392
+ /**
393
+ * Flag indicating whether to merge content scripts from App and Shared directories.
394
+ * When `true`, content scripts from both directories will be combined.
395
+ *
396
+ * @default false
397
+ */
398
+ mergeContentScripts: boolean;
399
+ /**
400
+ * Flag indicating whether to combine content scripts with identical options into one chunk.
401
+ * When `true`, content scripts with identical settings will be compiled into a single file.
402
+ *
403
+ * @default true
404
+ */
405
+ concatContentScripts: boolean;
406
+ /**
407
+ * Flag indicating whether to merge styles from App and Shared directories.
408
+ * When `true`, styles from both directories will be combined.
409
+ *
410
+ * @default true
411
+ */
412
+ mergeStyles: boolean;
413
+ /**
414
+ * Flag indicating whether to merge icon files from App and Shared directories.
415
+ * When `true`, icon files from both directories will be combined.
416
+ *
417
+ * @default false
418
+ */
419
+ mergeIcons: boolean;
420
+ /**
421
+ * Flag indicating whether to merge localizations from App and Shared directories.
422
+ * When `true`, localization files from both directories will be combined.
423
+ *
424
+ * @default true
425
+ */
426
+ mergeLocales: boolean;
427
+ /**
428
+ * Flag indicating whether to merge page files from App and Shared directories.
429
+ * When `true`, page files from both directories will be combined.
430
+ *
431
+ * @default false
432
+ */
433
+ mergePages: boolean;
434
+ /**
435
+ * Flag indicating whether to merge popup files from App and Shared directories.
436
+ * When `true`, popup files from both directories will be combined.
437
+ * This is useful for sharing popup components across different parts of the application.
438
+ *
439
+ * @default false
440
+ */
441
+ mergePopup: boolean;
442
+ /**
443
+ * Flag indicating whether multiple popup files are supported in the extension.
444
+ * When `true`, the build process will handle and include multiple popup files in the extension.
445
+ * This allows the extension to have different popup interfaces for different contexts or states.
446
+ *
447
+ * @default false
448
+ */
449
+ multiplePopup: boolean;
450
+ /**
451
+ * Flag indicating whether to merge sidebar files from App and Shared directories.
452
+ * When `true`, sidebar files from both directories will be combined.
453
+ * This is useful for sharing sidebar components across different parts of the application.
454
+ *
455
+ * @default false
456
+ */
457
+ mergeSidebar: boolean;
458
+ /**
459
+ * Flag indicating whether multiple sidebar files are supported in the extension.
460
+ * When `true`, the build process will handle and include multiple sidebar files in the extension.
461
+ * This allows the extension to have different sidebar interfaces for different contexts or states.
462
+ *
463
+ * @default false
464
+ */
465
+ multipleSidebar: boolean;
466
+ /**
467
+ * Flag indicating whether to merge relay files from App and Shared directories.
468
+ * When `true`, relay files from both directories will be combined.
469
+ *
470
+ * @default false
471
+ */
472
+ mergeRelay: boolean;
473
+ /**
474
+ * Flag indicating whether to merge service files from App and Shared directories.
475
+ * When `true`, service files from both directories will be combined.
476
+ *
477
+ * @default false
478
+ */
479
+ mergeService: boolean;
480
+ /**
481
+ * Flag indicating whether to merge offscreen files from App and Shared directories.
482
+ * When `true`, offscreen files from both directories will be combined.
483
+ *
484
+ * @default false
485
+ */
486
+ mergeOffscreen: boolean;
487
+ /**
488
+ * Path to the directory containing public assets to be copied into the build output.
489
+ * Must be relative to the project root and cannot be "." (the project root itself).
490
+ *
491
+ * @default "public"
492
+ */
493
+ publicDir: string;
494
+ /**
495
+ * If true, merges the contents of the public directory with corresponding
496
+ * directories from Shared and Apps modules during the copy process.
497
+ *
498
+ * @default true
499
+ */
500
+ mergePublic: boolean;
501
+ /**
502
+ * Flag indicating whether to create separate chunks for common code.
503
+ * When `true`, common code will be extracted into separate chunks for build size optimization
504
+ * and improved caching. This allows the browser to load common modules once
505
+ * and reuse them across different parts of the extension.
506
+ *
507
+ * When a function is provided, it receives a Set of entry point names that share common code
508
+ * and should return a string representing the chunk name, or undefined to skip chunk creation.
509
+ * The function allows dynamic naming of common chunks based on the entries that use them.
510
+ *
511
+ * @example
512
+ * // Boolean usage:
513
+ * true // Creates common chunks with auto-generated names
514
+ * false // Disables common chunk creation
515
+ *
516
+ * @example
517
+ * // Function usage:
518
+ * (names) => {
519
+ * const entryList = Array.from(names).toSorted().join("-");
520
+ *
521
+ * return `${entryList}.common`;
522
+ * }
523
+ *
524
+ * @default true
525
+ */
526
+ commonChunks: boolean | ((names: Set<string>) => string | undefined);
527
+ /**
528
+ * Build artifact name.
529
+ *
530
+ * Used as:
531
+ * - the directory name where the built extension will be placed;
532
+ * - the base name of the packaged archive.
533
+ *
534
+ * Supports placeholders that are substituted and then normalized:
535
+ * - `[app]` / `[name]` — application name in kebab-case;
536
+ * - `[mode]` — current build mode (e.g., development, production);
537
+ * - `[browser]` — target browser;
538
+ * - `[mv]` — manifest version in mvN format (e.g., mv3).
539
+ *
540
+ * Notes:
541
+ * - the final name is automatically converted to kebab-case;
542
+ * - sequences like "mv-<number>" are normalized to "mv<number>" (e.g., "mv-3" → "mv3");
543
+ * - it is recommended to specify only a name (no paths or extensions).
544
+ *
545
+ * Examples:
546
+ * - `[app]` → `my-app`
547
+ * - `[app]-[browser]-[mv]` → `my-app-chrome-mv3`
548
+ * - `bundle-[name]-[mode]` → `bundle-my-app-production`
549
+ */
550
+ artifactName: string;
551
+ /**
552
+ * Template for generating asset output file names.
553
+ *
554
+ * This property defines how asset files (images, fonts, etc.) will be named in the build output.
555
+ * It uses Rspack's Filename type, which can be either a string template or a function
556
+ * that returns a filename string.
557
+ *
558
+ * Supported placeholders in string templates:
559
+ * - `[app]` - Extension name (kebab case)
560
+ * - `[name]` - The original asset file name without extension
561
+ * - `[ext]` - The original asset file extension (including the dot)
562
+ * - `[hash]` - A hash of the asset content
563
+ * - `[contenthash]` - A hash of the content only
564
+ *
565
+ * When used as a function, it receives pathData and assetInfo parameters
566
+ * and should return the final filename string.
567
+ *
568
+ * @example
569
+ * // String template examples:
570
+ * "[name].[hash][ext]"
571
+ * "[app]-[name].[contenthash:8][ext]"
572
+ * "images/[name].[hash][ext]"
573
+ *
574
+ * @example
575
+ * // Function example:
576
+ * (pathData, assetInfo) => {
577
+ * const info = pathData.module.resourceResolveData;
578
+ * return `${info.descriptionFileData.name}.${pathData.contentHash}${info.relativePath}`;
579
+ * }
580
+ *
581
+ * @see {@link https://rspack.dev/config/output#outputassetmodulefilename} Rspack asset module filename documentation
582
+ */
583
+ assetsFilename: Filename;
584
+ /**
585
+ * Template for generating JavaScript output file names.
586
+ *
587
+ * This property defines how JavaScript files will be named in the build output.
588
+ * It uses Rspack's Filename type, which can be either a string template or a function
589
+ * that returns a filename string.
590
+ *
591
+ * Supported placeholders in string templates:
592
+ * - `[app]` - Extension name (kebab case)
593
+ * - `[name]` - The name of the entry or chunk
594
+ * - `[hash]` - A hash of the module identifier and content
595
+ * - `[chunkhash]` - A hash of the chunk content
596
+ * - `[contenthash]` - A hash of the content only
597
+ *
598
+ * When used as a function, it receives pathData and assetInfo parameters
599
+ * and should return the final filename string.
600
+ *
601
+ * @example
602
+ * // String template examples:
603
+ * "[name].[contenthash].js"
604
+ * "[app]-[name].[hash:8].js"
605
+ *
606
+ * @example
607
+ * // Function example:
608
+ * (pathData, assetInfo) => {
609
+ * return `${pathData.chunk.name}.${pathData.chunk.hash}.js`;
610
+ * }
611
+ *
612
+ * @see {@link https://rspack.dev/config/output#outputfilename} Rspack filename documentation
613
+ */
614
+ jsFilename: Filename;
615
+ /**
616
+ * Template for generating CSS output file names.
617
+ *
618
+ * This property defines how CSS files will be named in the build output.
619
+ * It uses Rspack's Filename type, which can be either a string template or a function
620
+ * that returns a filename string.
621
+ *
622
+ * Supported placeholders in string templates:
623
+ * - `[app]` - Extension name (kebab case)
624
+ * - `[name]` - The name of the entry or chunk
625
+ * - `[hash]` - A hash of the module identifier and content
626
+ * - `[chunkhash]` - A hash of the chunk content
627
+ * - `[contenthash]` - A hash of the content only
628
+ *
629
+ * When used as a function, it receives pathData and assetInfo parameters
630
+ * and should return the final filename string.
631
+ *
632
+ * @example
633
+ * // String template examples:
634
+ * "[name].[contenthash].css"
635
+ * "[app]-[name].[hash:8].css"
636
+ *
637
+ * @example
638
+ * // Function example:
639
+ * (pathData, assetInfo) => {
640
+ * return `${pathData.chunk.name}.${pathData.chunk.hash}.css`;
641
+ * }
642
+ *
643
+ * @see {@link https://rspack.dev/config/output#outputfilename} Rspack filename documentation
644
+ */
645
+ cssFilename: Filename;
646
+ /**
647
+ * Template for generating scoped CSS class names.
648
+ *
649
+ * Supported placeholders:
650
+ * - `[app]` – extension name (kebab case)
651
+ * - `[name]` – file basename without extension
652
+ * - `[local]` – original class name from your CSS
653
+ * - `[path]` – path to the resource, relative to the build context
654
+ * - `[folder]` – name of the folder containing the resource
655
+ * - `[file]` – combination of `[path]` and `[name]`
656
+ * - `[ext]` – file extension (including the dot)
657
+ * - `[hash]` – hash based on resourcePath + exportName, uniq for app.
658
+ *
659
+ *
660
+ * Note: all characters illegal in filenames (except inside `[local]`) are replaced with “-”
661
+ *
662
+ * @type {string}
663
+ */
664
+ cssIdentName: string;
665
+ }
666
+ export type OptionalConfig = Omit<Partial<Config>, "lang" | "workspace"> & {
667
+ lang?: Language | `${Language}`;
668
+ workspace?: Workspace | `${Workspace}`;
669
+ };
670
+ export type UserConfig = Omit<OptionalConfig, "configFile" | "command">;
671
+ export type ReadonlyConfig = Readonly<Config>;
672
+ export type UserConfigCallback = (config: ReadonlyConfig) => UserConfig;
673
+ export type ConfigDefinition = UserConfigCallback | UserConfig;