adnbn 0.10.0 → 0.12.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 (716) hide show
  1. package/README.md +3 -0
  2. package/dist/cli/builders/locale/LocaleBuilder.js +2 -11
  3. package/dist/cli/builders/locale/LocaleBuilder.js.map +1 -1
  4. package/dist/cli/builders/locale/index.js +1 -1
  5. package/dist/cli/builders/locale/index.js.map +1 -1
  6. package/dist/cli/builders/manifest/ManifestBase.js +17 -7
  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/index.d.ts +1 -0
  27. package/dist/cli/bundler/index.js +1 -0
  28. package/dist/cli/bundler/index.js.map +1 -1
  29. package/dist/cli/bundler/layers.d.ts +5 -0
  30. package/dist/cli/bundler/layers.js +12 -0
  31. package/dist/cli/bundler/layers.js.map +1 -0
  32. package/dist/cli/bundler/plugins/build-assets-map/BuildAssetsMapPlugin.d.ts +14 -0
  33. package/dist/cli/bundler/plugins/build-assets-map/BuildAssetsMapPlugin.js +524 -0
  34. package/dist/cli/bundler/plugins/build-assets-map/BuildAssetsMapPlugin.js.map +1 -0
  35. package/dist/cli/bundler/plugins/build-assets-map/index.d.ts +2 -0
  36. package/dist/cli/bundler/plugins/build-assets-map/index.js +5 -0
  37. package/dist/cli/bundler/plugins/build-assets-map/index.js.map +1 -0
  38. package/dist/cli/bundler/plugins/build-assets-map/usage.d.ts +9 -0
  39. package/dist/cli/bundler/plugins/build-assets-map/usage.js +31 -0
  40. package/dist/cli/bundler/plugins/build-assets-map/usage.js.map +1 -0
  41. package/dist/cli/bundler/plugins/chunk-loader/ChunkLoaderPlugin.d.ts +9 -0
  42. package/dist/cli/bundler/plugins/chunk-loader/ChunkLoaderPlugin.js +43 -0
  43. package/dist/cli/bundler/plugins/chunk-loader/ChunkLoaderPlugin.js.map +1 -0
  44. package/dist/cli/bundler/plugins/chunk-loader/index.d.ts +1 -0
  45. package/dist/cli/bundler/plugins/chunk-loader/index.js +5 -0
  46. package/dist/cli/bundler/plugins/chunk-loader/index.js.map +1 -0
  47. package/dist/cli/bundler/plugins/chunk-loader/templates/runtime.template.d.ts +2 -0
  48. package/dist/cli/bundler/plugins/chunk-loader/templates.d.ts +7 -0
  49. package/dist/cli/bundler/plugins/chunk-loader/templates.js +30 -0
  50. package/dist/cli/bundler/plugins/{EntrypointPlugin.d.ts → entrypoint/EntrypointPlugin.d.ts} +7 -2
  51. package/dist/cli/bundler/plugins/{EntrypointPlugin.js → entrypoint/EntrypointPlugin.js} +46 -26
  52. package/dist/cli/bundler/plugins/entrypoint/EntrypointPlugin.js.map +1 -0
  53. package/dist/cli/bundler/plugins/entrypoint/index.d.ts +1 -0
  54. package/dist/cli/bundler/plugins/entrypoint/index.js +7 -0
  55. package/dist/cli/bundler/plugins/entrypoint/index.js.map +1 -0
  56. package/dist/cli/bundler/plugins/{GenerateJsonPlugin.d.ts → generate-json/GenerateJsonPlugin.d.ts} +1 -0
  57. package/dist/cli/bundler/plugins/generate-json/GenerateJsonPlugin.js +73 -0
  58. package/dist/cli/bundler/plugins/generate-json/GenerateJsonPlugin.js.map +1 -0
  59. package/dist/cli/bundler/plugins/generate-json/index.d.ts +1 -0
  60. package/dist/cli/bundler/plugins/generate-json/index.js +5 -0
  61. package/dist/cli/bundler/plugins/generate-json/index.js.map +1 -0
  62. package/dist/cli/bundler/plugins/generate-module/GenerateModulePlugin.d.ts +23 -0
  63. package/dist/cli/bundler/plugins/generate-module/GenerateModulePlugin.js +88 -0
  64. package/dist/cli/bundler/plugins/generate-module/GenerateModulePlugin.js.map +1 -0
  65. package/dist/cli/bundler/plugins/generate-module/index.d.ts +1 -0
  66. package/dist/cli/bundler/plugins/generate-module/index.js +7 -0
  67. package/dist/cli/bundler/plugins/generate-module/index.js.map +1 -0
  68. package/dist/cli/bundler/plugins/index.d.ts +11 -5
  69. package/dist/cli/bundler/plugins/index.js +28 -10
  70. package/dist/cli/bundler/plugins/index.js.map +1 -1
  71. package/dist/cli/bundler/plugins/isolated-styles/IsolatedStylesPlugin.d.ts +21 -0
  72. package/dist/cli/bundler/plugins/isolated-styles/IsolatedStylesPlugin.js +174 -0
  73. package/dist/cli/bundler/plugins/isolated-styles/IsolatedStylesPlugin.js.map +1 -0
  74. package/dist/cli/bundler/plugins/isolated-styles/chunks.d.ts +3 -0
  75. package/dist/cli/bundler/plugins/isolated-styles/chunks.js +32 -0
  76. package/dist/cli/bundler/plugins/isolated-styles/chunks.js.map +1 -0
  77. package/dist/cli/bundler/plugins/isolated-styles/index.d.ts +1 -0
  78. package/dist/cli/bundler/plugins/isolated-styles/index.js +5 -0
  79. package/dist/cli/bundler/plugins/isolated-styles/index.js.map +1 -0
  80. package/dist/cli/bundler/plugins/isolated-styles/templates/css-loader.template.d.ts +1 -0
  81. package/dist/cli/bundler/plugins/isolated-styles/templates/runtime.template.d.ts +7 -0
  82. package/dist/cli/bundler/plugins/isolated-styles/templates.d.ts +18 -0
  83. package/dist/cli/bundler/plugins/isolated-styles/templates.js +174 -0
  84. package/dist/cli/bundler/plugins/manifest/ManifestPlugin.d.ts +10 -0
  85. package/dist/cli/bundler/plugins/manifest/ManifestPlugin.js +54 -0
  86. package/dist/cli/bundler/plugins/manifest/ManifestPlugin.js.map +1 -0
  87. package/dist/cli/bundler/plugins/manifest/index.d.ts +1 -0
  88. package/dist/cli/bundler/plugins/manifest/index.js +6 -0
  89. package/dist/cli/bundler/plugins/manifest/index.js.map +1 -0
  90. package/dist/cli/bundler/plugins/replace/ReplacePlugin.js.map +1 -0
  91. package/dist/cli/bundler/plugins/replace/index.d.ts +1 -0
  92. package/dist/cli/bundler/plugins/replace/index.js +5 -0
  93. package/dist/cli/bundler/plugins/replace/index.js.map +1 -0
  94. package/dist/cli/bundler/plugins/resource-access/ResourceAccessPlugin.d.ts +19 -0
  95. package/dist/cli/bundler/plugins/resource-access/ResourceAccessPlugin.js +20 -0
  96. package/dist/cli/bundler/plugins/resource-access/ResourceAccessPlugin.js.map +1 -0
  97. package/dist/cli/bundler/plugins/resource-access/index.d.ts +1 -0
  98. package/dist/cli/bundler/plugins/resource-access/index.js +5 -0
  99. package/dist/cli/bundler/plugins/resource-access/index.js.map +1 -0
  100. package/dist/cli/bundler/plugins/resource-access/utils.d.ts +8 -0
  101. package/dist/cli/bundler/plugins/resource-access/utils.js +42 -0
  102. package/dist/cli/bundler/plugins/resource-access/utils.js.map +1 -0
  103. package/dist/cli/bundler/plugins/types.d.ts +8 -0
  104. package/dist/cli/bundler/plugins/types.js +1 -0
  105. package/dist/cli/bundler/plugins/types.js.map +1 -0
  106. package/dist/cli/bundler/plugins/utils/compilation-assets.d.ts +4 -0
  107. package/dist/cli/bundler/plugins/utils/compilation-assets.js +12 -0
  108. package/dist/cli/bundler/plugins/utils/compilation-assets.js.map +1 -0
  109. package/dist/cli/bundler/plugins/utils/index.d.ts +5 -0
  110. package/dist/cli/bundler/plugins/utils/index.js +14 -0
  111. package/dist/cli/bundler/plugins/utils/index.js.map +1 -0
  112. package/dist/cli/bundler/plugins/utils/manifest-hooks.d.ts +13 -0
  113. package/dist/cli/bundler/plugins/utils/manifest-hooks.js +17 -0
  114. package/dist/cli/bundler/plugins/utils/manifest-hooks.js.map +1 -0
  115. package/dist/cli/bundler/plugins/utils/runtime-module.d.ts +3 -0
  116. package/dist/cli/bundler/plugins/utils/runtime-module.js +11 -0
  117. package/dist/cli/bundler/plugins/utils/runtime-module.js.map +1 -0
  118. package/dist/cli/bundler/plugins/utils/runtime-template.d.ts +1 -0
  119. package/dist/cli/bundler/plugins/utils/runtime-template.js +18 -0
  120. package/dist/cli/bundler/plugins/utils/runtime-template.js.map +1 -0
  121. package/dist/cli/bundler/plugins/utils/watch-compilation.d.ts +3 -0
  122. package/dist/cli/bundler/plugins/utils/watch-compilation.js +18 -0
  123. package/dist/cli/bundler/plugins/utils/watch-compilation.js.map +1 -0
  124. package/dist/cli/bundler/plugins/watch/WatchPlugin.js +16 -0
  125. package/dist/cli/bundler/plugins/watch/WatchPlugin.js.map +1 -0
  126. package/dist/cli/bundler/plugins/watch/index.d.ts +1 -0
  127. package/dist/cli/bundler/plugins/watch/index.js +5 -0
  128. package/dist/cli/bundler/plugins/watch/index.js.map +1 -0
  129. package/dist/cli/bundler/utils/app-filename.d.ts +2 -0
  130. package/dist/cli/bundler/utils/app-filename.js +19 -0
  131. package/dist/cli/bundler/utils/app-filename.js.map +1 -0
  132. package/dist/cli/bundler/utils/assets.d.ts +3 -0
  133. package/dist/cli/bundler/utils/assets.js +162 -0
  134. package/dist/cli/bundler/utils/assets.js.map +1 -0
  135. package/dist/cli/bundler/utils/chunk-filename.d.ts +6 -0
  136. package/dist/cli/bundler/utils/chunk-filename.js +93 -0
  137. package/dist/cli/bundler/utils/chunk-filename.js.map +1 -0
  138. package/dist/cli/bundler/utils/index.d.ts +2 -1
  139. package/dist/cli/bundler/utils/index.js +2 -1
  140. package/dist/cli/bundler/utils/index.js.map +1 -1
  141. package/dist/cli/entrypoint/file/ExpressionFile.d.ts +4 -1
  142. package/dist/cli/entrypoint/file/ExpressionFile.js +11 -0
  143. package/dist/cli/entrypoint/file/ExpressionFile.js.map +1 -1
  144. package/dist/cli/entrypoint/file/OptionFile.d.ts +4 -2
  145. package/dist/cli/entrypoint/file/OptionFile.js +35 -31
  146. package/dist/cli/entrypoint/file/OptionFile.js.map +1 -1
  147. package/dist/cli/entrypoint/file/SourceFile.d.ts +18 -7
  148. package/dist/cli/entrypoint/file/SourceFile.js +260 -156
  149. package/dist/cli/entrypoint/file/SourceFile.js.map +1 -1
  150. package/dist/cli/entrypoint/file/index.d.ts +2 -0
  151. package/dist/cli/entrypoint/file/index.js +2 -0
  152. package/dist/cli/entrypoint/file/index.js.map +1 -1
  153. package/dist/cli/entrypoint/file/injectors/core.js +22 -1
  154. package/dist/cli/entrypoint/file/injectors/core.js.map +1 -1
  155. package/dist/cli/entrypoint/file/parsers/ExportParser.d.ts +14 -0
  156. package/dist/cli/entrypoint/file/parsers/ExportParser.js +71 -0
  157. package/dist/cli/entrypoint/file/parsers/ExportParser.js.map +1 -0
  158. package/dist/cli/entrypoint/file/parsers/NodeFinder.d.ts +2 -0
  159. package/dist/cli/entrypoint/file/parsers/NodeFinder.js +9 -0
  160. package/dist/cli/entrypoint/file/parsers/NodeFinder.js.map +1 -1
  161. package/dist/cli/entrypoint/file/parsers/ObjectParser.js +5 -1
  162. package/dist/cli/entrypoint/file/parsers/ObjectParser.js.map +1 -1
  163. package/dist/cli/entrypoint/file/parsers/index.d.ts +1 -0
  164. package/dist/cli/entrypoint/file/parsers/index.js +2 -0
  165. package/dist/cli/entrypoint/file/parsers/index.js.map +1 -1
  166. package/dist/cli/entrypoint/file/parsers/types.d.ts +16 -0
  167. package/dist/cli/entrypoint/file/parsers/types.js +13 -0
  168. package/dist/cli/entrypoint/file/parsers/types.js.map +1 -1
  169. package/dist/cli/entrypoint/file/resolvers/ImportResolver.d.ts +1 -0
  170. package/dist/cli/entrypoint/file/resolvers/ImportResolver.js +3 -0
  171. package/dist/cli/entrypoint/file/resolvers/ImportResolver.js.map +1 -1
  172. package/dist/cli/entrypoint/file/types.d.ts +26 -1
  173. package/dist/cli/entrypoint/finder/AbstractEntrypointFinder.js.map +1 -1
  174. package/dist/cli/entrypoint/finder/ContentFinder.d.ts +1 -1
  175. package/dist/cli/entrypoint/parser/AbstractParser.d.ts +3 -2
  176. package/dist/cli/entrypoint/parser/AbstractParser.js +6 -3
  177. package/dist/cli/entrypoint/parser/AbstractParser.js.map +1 -1
  178. package/dist/cli/entrypoint/parser/CommandParser.js +1 -1
  179. package/dist/cli/entrypoint/parser/CommandParser.js.map +1 -1
  180. package/dist/cli/entrypoint/parser/ContentParser.d.ts +7 -3
  181. package/dist/cli/entrypoint/parser/ContentParser.js +42 -6
  182. package/dist/cli/entrypoint/parser/ContentParser.js.map +1 -1
  183. package/dist/cli/entrypoint/parser/RelayParser.d.ts +21 -2
  184. package/dist/cli/entrypoint/parser/RelayParser.js +5 -1
  185. package/dist/cli/entrypoint/parser/RelayParser.js.map +1 -1
  186. package/dist/cli/entrypoint/parser/utils/content/default-render.d.ts +3 -0
  187. package/dist/cli/entrypoint/parser/utils/content/default-render.js +21 -0
  188. package/dist/cli/entrypoint/parser/utils/content/default-render.js.map +1 -0
  189. package/dist/cli/plugins/asset.js +9 -4
  190. package/dist/cli/plugins/asset.js.map +1 -1
  191. package/dist/cli/plugins/background/index.js +1 -1
  192. package/dist/cli/plugins/background/index.js.map +1 -1
  193. package/dist/cli/plugins/content/Content.d.ts +2 -2
  194. package/dist/cli/plugins/content/Content.js +3 -2
  195. package/dist/cli/plugins/content/Content.js.map +1 -1
  196. package/dist/cli/plugins/content/ContentDriver.d.ts +1 -1
  197. package/dist/cli/plugins/content/ContentManager.d.ts +8 -5
  198. package/dist/cli/plugins/content/ContentManager.js +79 -28
  199. package/dist/cli/plugins/content/ContentManager.js.map +1 -1
  200. package/dist/cli/plugins/content/ContentName.d.ts +2 -2
  201. package/dist/cli/plugins/content/ContentName.js +8 -7
  202. package/dist/cli/plugins/content/ContentName.js.map +1 -1
  203. package/dist/cli/plugins/content/Relay.d.ts +2 -2
  204. package/dist/cli/plugins/content/Relay.js +3 -2
  205. package/dist/cli/plugins/content/Relay.js.map +1 -1
  206. package/dist/cli/plugins/content/RelayDriver.d.ts +1 -1
  207. package/dist/cli/plugins/content/RelayDriver.js +1 -1
  208. package/dist/cli/plugins/content/bundler.d.ts +7 -0
  209. package/dist/cli/plugins/content/bundler.js +47 -0
  210. package/dist/cli/plugins/content/bundler.js.map +1 -0
  211. package/dist/cli/plugins/content/index.js +121 -62
  212. package/dist/cli/plugins/content/index.js.map +1 -1
  213. package/dist/cli/plugins/content/relay-module.d.ts +3 -0
  214. package/dist/cli/plugins/content/relay-module.js +11 -0
  215. package/dist/cli/plugins/content/relay-module.js.map +1 -0
  216. package/dist/cli/plugins/content/types.d.ts +2 -2
  217. package/dist/cli/plugins/content/utils.d.ts +3 -1
  218. package/dist/cli/plugins/content/utils.js +8 -1
  219. package/dist/cli/plugins/content/utils.js.map +1 -1
  220. package/dist/cli/plugins/icon/declaration/IconDeclaration.d.ts +1 -1
  221. package/dist/cli/plugins/icon/declaration/IconDeclaration.js +6 -6
  222. package/dist/cli/plugins/icon/declaration/IconDeclaration.js.map +1 -1
  223. package/dist/cli/plugins/icon/declaration/icon.d.ts +3 -5
  224. package/dist/cli/plugins/icon/icon-module.d.ts +2 -0
  225. package/dist/cli/plugins/icon/icon-module.js +11 -0
  226. package/dist/cli/plugins/icon/icon-module.js.map +1 -0
  227. package/dist/cli/plugins/icon/index.js +5 -3
  228. package/dist/cli/plugins/icon/index.js.map +1 -1
  229. package/dist/cli/plugins/index.d.ts +1 -1
  230. package/dist/cli/plugins/index.js +1 -1
  231. package/dist/cli/plugins/locale/Locale.d.ts +9 -2
  232. package/dist/cli/plugins/locale/Locale.js +37 -5
  233. package/dist/cli/plugins/locale/Locale.js.map +1 -1
  234. package/dist/cli/plugins/locale/declaration/locale.d.ts +1 -1
  235. package/dist/cli/plugins/locale/index.js +57 -22
  236. package/dist/cli/plugins/locale/index.js.map +1 -1
  237. package/dist/cli/plugins/locale/locale-module.d.ts +4 -0
  238. package/dist/cli/plugins/locale/locale-module.js +16 -0
  239. package/dist/cli/plugins/locale/locale-module.js.map +1 -0
  240. package/dist/cli/plugins/offscreen/Offscreen.d.ts +2 -3
  241. package/dist/cli/plugins/offscreen/Offscreen.js.map +1 -1
  242. package/dist/cli/plugins/offscreen/index.js +5 -4
  243. package/dist/cli/plugins/offscreen/index.js.map +1 -1
  244. package/dist/cli/plugins/offscreen/offscreen-module.d.ts +3 -0
  245. package/dist/cli/plugins/offscreen/offscreen-module.js +11 -0
  246. package/dist/cli/plugins/offscreen/offscreen-module.js.map +1 -0
  247. package/dist/cli/plugins/output/index.d.ts +2 -0
  248. package/dist/cli/plugins/output/index.js +60 -0
  249. package/dist/cli/plugins/output/index.js.map +1 -0
  250. package/dist/cli/plugins/output/runtime.d.ts +26 -0
  251. package/dist/cli/plugins/output/runtime.js +19 -0
  252. package/dist/cli/plugins/output/runtime.js.map +1 -0
  253. package/dist/cli/plugins/page/declaration/PageDeclaration.js +4 -4
  254. package/dist/cli/plugins/page/declaration/PageDeclaration.js.map +1 -1
  255. package/dist/cli/plugins/page/declaration/page.d.ts +3 -3
  256. package/dist/cli/plugins/page/index.js +14 -10
  257. package/dist/cli/plugins/page/index.js.map +1 -1
  258. package/dist/cli/plugins/page/page-module.d.ts +2 -0
  259. package/dist/cli/plugins/page/page-module.js +11 -0
  260. package/dist/cli/plugins/page/page-module.js.map +1 -0
  261. package/dist/cli/plugins/popup/Popup.d.ts +1 -1
  262. package/dist/cli/plugins/popup/Popup.js +2 -2
  263. package/dist/cli/plugins/popup/Popup.js.map +1 -1
  264. package/dist/cli/plugins/popup/declaration/PopupDeclaration.d.ts +1 -1
  265. package/dist/cli/plugins/popup/declaration/PopupDeclaration.js +6 -6
  266. package/dist/cli/plugins/popup/declaration/PopupDeclaration.js.map +1 -1
  267. package/dist/cli/plugins/popup/declaration/popup.d.ts +3 -3
  268. package/dist/cli/plugins/popup/index.js +6 -5
  269. package/dist/cli/plugins/popup/index.js.map +1 -1
  270. package/dist/cli/plugins/popup/popup-module.d.ts +3 -0
  271. package/dist/cli/plugins/popup/popup-module.js +11 -0
  272. package/dist/cli/plugins/popup/popup-module.js.map +1 -0
  273. package/dist/cli/plugins/sandbox/Sandbox.d.ts +1 -2
  274. package/dist/cli/plugins/sandbox/Sandbox.js.map +1 -1
  275. package/dist/cli/plugins/sandbox/index.js +5 -4
  276. package/dist/cli/plugins/sandbox/index.js.map +1 -1
  277. package/dist/cli/plugins/sandbox/sandbox-module.d.ts +3 -0
  278. package/dist/cli/plugins/sandbox/sandbox-module.js +11 -0
  279. package/dist/cli/plugins/sandbox/sandbox-module.js.map +1 -0
  280. package/dist/cli/plugins/sidebar/Sidebar.d.ts +1 -1
  281. package/dist/cli/plugins/sidebar/Sidebar.js +2 -2
  282. package/dist/cli/plugins/sidebar/Sidebar.js.map +1 -1
  283. package/dist/cli/plugins/sidebar/declaration/SidebarDeclaration.d.ts +1 -1
  284. package/dist/cli/plugins/sidebar/declaration/SidebarDeclaration.js +6 -6
  285. package/dist/cli/plugins/sidebar/declaration/SidebarDeclaration.js.map +1 -1
  286. package/dist/cli/plugins/sidebar/declaration/sidebar.d.ts +3 -3
  287. package/dist/cli/plugins/sidebar/index.js +6 -5
  288. package/dist/cli/plugins/sidebar/index.js.map +1 -1
  289. package/dist/cli/plugins/sidebar/sidebar-module.d.ts +3 -0
  290. package/dist/cli/plugins/sidebar/sidebar-module.js +11 -0
  291. package/dist/cli/plugins/sidebar/sidebar-module.js.map +1 -0
  292. package/dist/cli/plugins/style/index.d.ts +2 -1
  293. package/dist/cli/plugins/style/index.js +52 -25
  294. package/dist/cli/plugins/style/index.js.map +1 -1
  295. package/dist/cli/plugins/style/types.d.ts +5 -0
  296. package/dist/cli/plugins/style/types.js +1 -0
  297. package/dist/cli/plugins/style/types.js.map +1 -0
  298. package/dist/cli/raw.d.ts +4 -0
  299. package/dist/cli/resolvers/bundler.js +9 -7
  300. package/dist/cli/resolvers/bundler.js.map +1 -1
  301. package/dist/cli/resolvers/config.js +2 -1
  302. package/dist/cli/resolvers/config.js.map +1 -1
  303. package/dist/cli/virtual/index.d.ts +2 -2
  304. package/dist/cli/virtual/index.js +11 -8
  305. package/dist/cli/virtual/virtual.d.ts +14 -11
  306. package/dist/content/index.d.ts +3 -0
  307. package/dist/content/index.js +8 -0
  308. package/dist/content/index.js.map +1 -0
  309. package/dist/entry/content/adapters/react/Builder.d.ts +5 -6
  310. package/dist/entry/content/adapters/react/Builder.js +8 -21
  311. package/dist/entry/content/adapters/react/Builder.js.map +1 -1
  312. package/dist/entry/content/adapters/react/Node.d.ts +6 -12
  313. package/dist/entry/content/adapters/react/Node.js +9 -25
  314. package/dist/entry/content/adapters/react/Node.js.map +1 -1
  315. package/dist/entry/content/adapters/react/index.d.ts +2 -1
  316. package/dist/entry/content/adapters/react/index.js +3 -1
  317. package/dist/entry/content/adapters/react/index.js.map +1 -1
  318. package/dist/entry/content/adapters/react/resolvers/definition.d.ts +2 -0
  319. package/dist/entry/content/adapters/react/resolvers/definition.js +12 -0
  320. package/dist/entry/content/adapters/react/resolvers/definition.js.map +1 -0
  321. package/dist/entry/content/adapters/react/resolvers/render.d.ts +2 -2
  322. package/dist/entry/content/adapters/react/resolvers/render.js +4 -6
  323. package/dist/entry/content/adapters/react/resolvers/render.js.map +1 -1
  324. package/dist/entry/content/adapters/vanilla/Builder.d.ts +5 -5
  325. package/dist/entry/content/adapters/vanilla/Builder.js +9 -15
  326. package/dist/entry/content/adapters/vanilla/Builder.js.map +1 -1
  327. package/dist/entry/content/adapters/vanilla/Node.d.ts +5 -10
  328. package/dist/entry/content/adapters/vanilla/Node.js +11 -34
  329. package/dist/entry/content/adapters/vanilla/Node.js.map +1 -1
  330. package/dist/entry/content/adapters/vanilla/index.d.ts +2 -1
  331. package/dist/entry/content/adapters/vanilla/index.js +3 -1
  332. package/dist/entry/content/adapters/vanilla/index.js.map +1 -1
  333. package/dist/entry/content/adapters/vanilla/resolvers/definition.d.ts +2 -0
  334. package/dist/entry/content/adapters/vanilla/resolvers/definition.js +9 -0
  335. package/dist/entry/content/adapters/vanilla/resolvers/definition.js.map +1 -0
  336. package/dist/entry/content/adapters/vanilla/resolvers/render.d.ts +3 -0
  337. package/dist/entry/content/adapters/vanilla/resolvers/render.js +15 -0
  338. package/dist/entry/content/adapters/vanilla/resolvers/render.js.map +1 -0
  339. package/dist/entry/content/index.d.ts +5 -1
  340. package/dist/entry/content/index.js +8 -1
  341. package/dist/entry/content/index.js.map +1 -1
  342. package/dist/entry/content/lifecycle/Builder.d.ts +26 -0
  343. package/dist/entry/content/lifecycle/Builder.js +212 -0
  344. package/dist/entry/content/lifecycle/Builder.js.map +1 -0
  345. package/dist/entry/content/lifecycle/IsolationSetup.d.ts +16 -0
  346. package/dist/entry/content/lifecycle/IsolationSetup.js +37 -0
  347. package/dist/entry/content/lifecycle/IsolationSetup.js.map +1 -0
  348. package/dist/entry/content/lifecycle/MountBuilder.d.ts +8 -0
  349. package/dist/entry/content/lifecycle/MountBuilder.js +57 -0
  350. package/dist/entry/content/lifecycle/MountBuilder.js.map +1 -0
  351. package/dist/entry/content/{core → lifecycle/context}/Context.d.ts +5 -2
  352. package/dist/entry/content/lifecycle/context/Context.js +73 -0
  353. package/dist/entry/content/lifecycle/context/Context.js.map +1 -0
  354. package/dist/entry/content/{core → lifecycle/context}/EventEmitter.d.ts +2 -2
  355. package/dist/entry/content/{core → lifecycle/context}/EventEmitter.js +3 -3
  356. package/dist/entry/content/lifecycle/context/EventEmitter.js.map +1 -0
  357. package/dist/entry/content/lifecycle/context/ManagedContext.d.ts +5 -0
  358. package/dist/entry/content/{core → lifecycle/context}/ManagedContext.js +2 -2
  359. package/dist/entry/content/lifecycle/context/ManagedContext.js.map +1 -0
  360. package/dist/entry/content/lifecycle/context/index.d.ts +3 -0
  361. package/dist/entry/content/lifecycle/context/index.js +9 -0
  362. package/dist/entry/content/lifecycle/context/index.js.map +1 -0
  363. package/dist/entry/content/{core → lifecycle/markers}/AbstractMarker.d.ts +2 -2
  364. package/dist/entry/content/{core → lifecycle/markers}/AbstractMarker.js +3 -3
  365. package/dist/entry/content/lifecycle/markers/AbstractMarker.js.map +1 -0
  366. package/dist/entry/content/{core → lifecycle/markers}/AttributeMarker.d.ts +2 -2
  367. package/dist/entry/content/{core → lifecycle/markers}/AttributeMarker.js +2 -2
  368. package/dist/entry/content/lifecycle/markers/AttributeMarker.js.map +1 -0
  369. package/dist/entry/content/{core → lifecycle/markers}/WeakMarker.d.ts +2 -2
  370. package/dist/entry/content/{core → lifecycle/markers}/WeakMarker.js +2 -2
  371. package/dist/entry/content/lifecycle/markers/WeakMarker.js.map +1 -0
  372. package/dist/entry/content/lifecycle/markers/index.d.ts +3 -0
  373. package/dist/entry/content/lifecycle/markers/index.js +9 -0
  374. package/dist/entry/content/lifecycle/markers/index.js.map +1 -0
  375. package/dist/entry/content/{core → lifecycle/nodes}/EventNode.d.ts +5 -2
  376. package/dist/entry/content/{core → lifecycle/nodes}/EventNode.js +14 -2
  377. package/dist/entry/content/lifecycle/nodes/EventNode.js.map +1 -0
  378. package/dist/entry/content/lifecycle/nodes/FrameNode.d.ts +29 -0
  379. package/dist/entry/content/lifecycle/nodes/FrameNode.js +187 -0
  380. package/dist/entry/content/lifecycle/nodes/FrameNode.js.map +1 -0
  381. package/dist/entry/content/{core → lifecycle/nodes}/MarkerNode.d.ts +4 -2
  382. package/dist/entry/content/{core → lifecycle/nodes}/MarkerNode.js +8 -2
  383. package/dist/entry/content/lifecycle/nodes/MarkerNode.js.map +1 -0
  384. package/dist/entry/content/{core → lifecycle/nodes}/MountNode.d.ts +4 -2
  385. package/dist/entry/content/{core → lifecycle/nodes}/MountNode.js +8 -2
  386. package/dist/entry/content/lifecycle/nodes/MountNode.js.map +1 -0
  387. package/dist/entry/content/{core → lifecycle/nodes}/Node.d.ts +3 -2
  388. package/dist/entry/content/{core → lifecycle/nodes}/Node.js +5 -2
  389. package/dist/entry/content/lifecycle/nodes/Node.js.map +1 -0
  390. package/dist/entry/content/lifecycle/nodes/RenderNode.d.ts +19 -0
  391. package/dist/entry/content/lifecycle/nodes/RenderNode.js +75 -0
  392. package/dist/entry/content/lifecycle/nodes/RenderNode.js.map +1 -0
  393. package/dist/entry/content/lifecycle/nodes/ShadowNode.d.ts +21 -0
  394. package/dist/entry/content/lifecycle/nodes/ShadowNode.js +121 -0
  395. package/dist/entry/content/lifecycle/nodes/ShadowNode.js.map +1 -0
  396. package/dist/entry/content/lifecycle/nodes/index.d.ts +7 -0
  397. package/dist/entry/content/lifecycle/nodes/index.js +17 -0
  398. package/dist/entry/content/lifecycle/nodes/index.js.map +1 -0
  399. package/dist/entry/content/lifecycle/nodes/isolated-styles.d.ts +2 -0
  400. package/dist/entry/content/lifecycle/nodes/isolated-styles.js +14 -0
  401. package/dist/entry/content/lifecycle/nodes/isolated-styles.js.map +1 -0
  402. package/dist/entry/content/resolvers/anchor.d.ts +2 -0
  403. package/dist/entry/content/{core/resolvers → resolvers}/anchor.js +2 -2
  404. package/dist/entry/content/resolvers/anchor.js.map +1 -0
  405. package/dist/entry/content/resolvers/container.d.ts +2 -0
  406. package/dist/entry/content/{core/resolvers → resolvers}/container.js +2 -2
  407. package/dist/entry/content/resolvers/container.js.map +1 -0
  408. package/dist/entry/content/resolvers/definition.d.ts +5 -0
  409. package/dist/entry/content/resolvers/definition.js +24 -0
  410. package/dist/entry/content/resolvers/definition.js.map +1 -0
  411. package/dist/entry/content/{core/resolvers → resolvers}/index.d.ts +1 -1
  412. package/dist/entry/content/{core/resolvers → resolvers}/index.js +1 -1
  413. package/dist/entry/content/resolvers/index.js.map +1 -0
  414. package/dist/entry/content/resolvers/mount.d.ts +2 -0
  415. package/dist/entry/content/{core/resolvers → resolvers}/mount.js +3 -3
  416. package/dist/entry/content/resolvers/mount.js.map +1 -0
  417. package/dist/entry/content/resolvers/target.d.ts +3 -0
  418. package/dist/entry/content/resolvers/target.js +34 -0
  419. package/dist/entry/content/resolvers/target.js.map +1 -0
  420. package/dist/entry/content/resolvers/watch.d.ts +6 -0
  421. package/dist/entry/content/{core/resolvers → resolvers}/watch.js +15 -11
  422. package/dist/entry/content/resolvers/watch.js.map +1 -0
  423. package/dist/entry/relay/Builder.d.ts +8 -8
  424. package/dist/entry/relay/Builder.js +32 -19
  425. package/dist/entry/relay/Builder.js.map +1 -1
  426. package/dist/entry/relay/TransportBuilder.d.ts +3 -2
  427. package/dist/entry/relay/TransportBuilder.js +3 -3
  428. package/dist/entry/relay/TransportBuilder.js.map +1 -1
  429. package/dist/entry/relay/index.d.ts +5 -2
  430. package/dist/entry/relay/index.js +8 -2
  431. package/dist/entry/relay/index.js.map +1 -1
  432. package/dist/entry/relay/resolvers/definition.d.ts +4 -0
  433. package/dist/entry/relay/resolvers/definition.js +16 -0
  434. package/dist/entry/relay/resolvers/definition.js.map +1 -0
  435. package/dist/locale/adapters/react/ReactLocale.d.ts +18 -0
  436. package/dist/locale/adapters/react/ReactLocale.js +41 -0
  437. package/dist/locale/adapters/react/ReactLocale.js.map +1 -0
  438. package/dist/locale/adapters/react/hooks/use-locale-attributes.d.ts +7 -0
  439. package/dist/locale/adapters/react/hooks/use-locale-attributes.js +30 -0
  440. package/dist/locale/adapters/react/hooks/use-locale-attributes.js.map +1 -0
  441. package/dist/locale/adapters/react/hooks/use-locale.d.ts +3 -0
  442. package/dist/locale/adapters/react/hooks/use-locale.js +17 -0
  443. package/dist/locale/adapters/react/hooks/use-locale.js.map +1 -0
  444. package/dist/locale/adapters/react/hooks/use-native-locale.d.ts +3 -0
  445. package/dist/locale/adapters/react/hooks/use-native-locale.js +10 -0
  446. package/dist/locale/adapters/react/hooks/use-native-locale.js.map +1 -0
  447. package/dist/locale/adapters/react/index.d.ts +4 -2
  448. package/dist/locale/adapters/react/index.js +6 -4
  449. package/dist/locale/adapters/react/index.js.map +1 -1
  450. package/dist/locale/adapters/react/types.d.ts +22 -0
  451. package/dist/locale/adapters/react/types.js +1 -0
  452. package/dist/locale/adapters/react/types.js.map +1 -0
  453. package/dist/locale/helpers.d.ts +4 -5
  454. package/dist/locale/helpers.js +1 -1
  455. package/dist/locale/helpers.js.map +1 -1
  456. package/dist/locale/index.d.ts +2 -1
  457. package/dist/locale/index.js +1 -0
  458. package/dist/locale/index.js.map +1 -1
  459. package/dist/locale/providers/AbstractLocale.d.ts +4 -4
  460. package/dist/locale/providers/AbstractLocale.js +13 -94
  461. package/dist/locale/providers/AbstractLocale.js.map +1 -1
  462. package/dist/locale/providers/CustomLocale.d.ts +3 -3
  463. package/dist/locale/providers/CustomLocale.js +6 -5
  464. package/dist/locale/providers/CustomLocale.js.map +1 -1
  465. package/dist/locale/providers/DynamicLocale.d.ts +18 -11
  466. package/dist/locale/providers/DynamicLocale.js +60 -47
  467. package/dist/locale/providers/DynamicLocale.js.map +1 -1
  468. package/dist/locale/providers/NativeLocale.d.ts +4 -7
  469. package/dist/locale/providers/NativeLocale.js +5 -14
  470. package/dist/locale/providers/NativeLocale.js.map +1 -1
  471. package/dist/locale/providers/ObservableLocale.d.ts +35 -0
  472. package/dist/locale/providers/ObservableLocale.js +179 -0
  473. package/dist/locale/providers/ObservableLocale.js.map +1 -0
  474. package/dist/locale/providers/index.d.ts +2 -1
  475. package/dist/locale/providers/index.js +3 -1
  476. package/dist/locale/providers/index.js.map +1 -1
  477. package/dist/locale/storage/LocaleStorage.d.ts +11 -0
  478. package/dist/locale/storage/LocaleStorage.js +40 -0
  479. package/dist/locale/storage/LocaleStorage.js.map +1 -0
  480. package/dist/locale/storage/index.d.ts +1 -0
  481. package/dist/locale/storage/index.js +5 -0
  482. package/dist/locale/storage/index.js.map +1 -0
  483. package/dist/main/content.d.ts +4 -6
  484. package/dist/main/content.js +3 -16
  485. package/dist/main/content.js.map +1 -1
  486. package/dist/main/entrypoint.d.ts +4 -0
  487. package/dist/main/entrypoint.js +20 -0
  488. package/dist/main/entrypoint.js.map +1 -0
  489. package/dist/main/icon.d.ts +2 -3
  490. package/dist/main/icon.js +2 -1
  491. package/dist/main/icon.js.map +1 -1
  492. package/dist/main/index.d.ts +1 -0
  493. package/dist/main/index.js +1 -0
  494. package/dist/main/index.js.map +1 -1
  495. package/dist/main/offscreen.d.ts +2 -5
  496. package/dist/main/offscreen.js +5 -2
  497. package/dist/main/offscreen.js.map +1 -1
  498. package/dist/main/page.d.ts +2 -4
  499. package/dist/main/page.js +2 -1
  500. package/dist/main/page.js.map +1 -1
  501. package/dist/main/popup.d.ts +2 -5
  502. package/dist/main/popup.js +3 -3
  503. package/dist/main/popup.js.map +1 -1
  504. package/dist/main/relay.d.ts +3 -3
  505. package/dist/main/relay.js +2 -1
  506. package/dist/main/relay.js.map +1 -1
  507. package/dist/main/sandbox.d.ts +1 -4
  508. package/dist/main/sandbox.js +2 -1
  509. package/dist/main/sandbox.js.map +1 -1
  510. package/dist/main/service.d.ts +1 -2
  511. package/dist/main/service.js.map +1 -1
  512. package/dist/main/sidebar.d.ts +2 -5
  513. package/dist/main/sidebar.js +3 -3
  514. package/dist/main/sidebar.js.map +1 -1
  515. package/dist/message/index.d.ts +2 -4
  516. package/dist/message/index.js.map +1 -1
  517. package/dist/offscreen/index.d.ts +2 -6
  518. package/dist/offscreen/index.js.map +1 -1
  519. package/dist/relay/RelayPermission.js +1 -1
  520. package/dist/relay/index.d.ts +2 -5
  521. package/dist/relay/index.js.map +1 -1
  522. package/dist/sandbox/index.d.ts +1 -5
  523. package/dist/sandbox/index.js.map +1 -1
  524. package/dist/service/index.d.ts +2 -6
  525. package/dist/service/index.js.map +1 -1
  526. package/dist/shared/content/index.d.ts +1 -0
  527. package/dist/shared/content/index.js +6 -0
  528. package/dist/shared/content/index.js.map +1 -0
  529. package/dist/shared/content/isolation.d.ts +4 -0
  530. package/dist/shared/content/isolation.js +63 -0
  531. package/dist/shared/content/isolation.js.map +1 -0
  532. package/dist/shared/locale/index.d.ts +5 -0
  533. package/dist/shared/locale/index.js +21 -0
  534. package/dist/shared/locale/index.js.map +1 -0
  535. package/dist/shared/locale/keys.d.ts +5 -0
  536. package/dist/shared/locale/keys.js +33 -0
  537. package/dist/shared/locale/keys.js.map +1 -0
  538. package/dist/shared/locale/language.d.ts +4 -0
  539. package/dist/shared/locale/language.js +23 -0
  540. package/dist/shared/locale/language.js.map +1 -0
  541. package/dist/shared/locale/messages.d.ts +3 -0
  542. package/dist/shared/locale/messages.js +9 -0
  543. package/dist/shared/locale/messages.js.map +1 -0
  544. package/dist/shared/locale/plural.d.ts +2 -0
  545. package/dist/shared/locale/plural.js +81 -0
  546. package/dist/shared/locale/plural.js.map +1 -0
  547. package/dist/shared/locale/substitutions.d.ts +10 -0
  548. package/dist/shared/locale/substitutions.js +32 -0
  549. package/dist/shared/locale/substitutions.js.map +1 -0
  550. package/dist/types/background.d.ts +1 -1
  551. package/dist/types/background.js.map +1 -1
  552. package/dist/types/command.d.ts +1 -1
  553. package/dist/types/command.js.map +1 -1
  554. package/dist/types/content/adapters/index.d.ts +2 -0
  555. package/dist/types/content/adapters/index.js +1 -0
  556. package/dist/types/content/adapters/index.js.map +1 -0
  557. package/dist/types/content/adapters/react.d.ts +4 -0
  558. package/dist/types/content/adapters/react.js +1 -0
  559. package/dist/types/content/adapters/react.js.map +1 -0
  560. package/dist/types/content/adapters/vanilla.d.ts +1 -0
  561. package/dist/types/content/adapters/vanilla.js +1 -0
  562. package/dist/types/content/adapters/vanilla.js.map +1 -0
  563. package/dist/types/content/boundary.d.ts +17 -0
  564. package/dist/types/content/boundary.js +1 -0
  565. package/dist/types/content/boundary.js.map +1 -0
  566. package/dist/types/{content.d.ts → content/common.d.ts} +119 -59
  567. package/dist/types/{content.js → content/common.js} +23 -2
  568. package/dist/types/content/common.js.map +1 -0
  569. package/dist/types/content/definition.d.ts +61 -0
  570. package/dist/types/content/definition.js +1 -0
  571. package/dist/types/content/definition.js.map +1 -0
  572. package/dist/types/content/index.d.ts +7 -0
  573. package/dist/types/content/index.js +2 -0
  574. package/dist/types/content/index.js.map +1 -0
  575. package/dist/types/content/prepare.d.ts +9 -0
  576. package/dist/types/content/prepare.js +1 -0
  577. package/dist/types/content/prepare.js.map +1 -0
  578. package/dist/types/content/render.d.ts +6 -0
  579. package/dist/types/content/render.js +1 -0
  580. package/dist/types/content/render.js.map +1 -0
  581. package/dist/types/content/target.d.ts +13 -0
  582. package/dist/types/content/target.js +1 -0
  583. package/dist/types/content/target.js.map +1 -0
  584. package/dist/types/entrypoint.d.ts +20 -0
  585. package/dist/types/entrypoint.js +4 -0
  586. package/dist/types/entrypoint.js.map +1 -1
  587. package/dist/types/icon.d.ts +8 -0
  588. package/dist/types/icon.js.map +1 -1
  589. package/dist/types/language.d.ts +57 -0
  590. package/dist/types/language.js +62 -0
  591. package/dist/types/language.js.map +1 -0
  592. package/dist/types/locale.d.ts +34 -63
  593. package/dist/types/locale.js +62 -119
  594. package/dist/types/locale.js.map +1 -1
  595. package/dist/types/manifest.d.ts +11 -8
  596. package/dist/types/manifest.js.map +1 -1
  597. package/dist/types/message.d.ts +7 -0
  598. package/dist/types/message.js.map +1 -1
  599. package/dist/types/offscreen.d.ts +14 -1
  600. package/dist/types/offscreen.js.map +1 -1
  601. package/dist/types/page.d.ts +8 -0
  602. package/dist/types/popup.d.ts +9 -0
  603. package/dist/types/relay.d.ts +15 -7
  604. package/dist/types/relay.js.map +1 -1
  605. package/dist/types/sandbox.d.ts +12 -0
  606. package/dist/types/sandbox.js.map +1 -1
  607. package/dist/types/service.d.ts +10 -1
  608. package/dist/types/service.js.map +1 -1
  609. package/dist/types/sidebar.d.ts +9 -0
  610. package/dist/types/sidebar.js.map +1 -1
  611. package/dist/types/transport.d.ts +4 -0
  612. package/dist/virtual/icon.d.ts +2 -0
  613. package/dist/virtual/icon.js +5 -0
  614. package/dist/virtual/icon.js.map +1 -0
  615. package/dist/virtual/locale.d.ts +7 -0
  616. package/dist/virtual/locale.js +13 -0
  617. package/dist/virtual/locale.js.map +1 -0
  618. package/dist/virtual/modules.d.ts +41 -0
  619. package/dist/virtual/offscreen.d.ts +3 -0
  620. package/dist/virtual/offscreen.js +5 -0
  621. package/dist/virtual/offscreen.js.map +1 -0
  622. package/dist/virtual/page.d.ts +2 -0
  623. package/dist/virtual/page.js +5 -0
  624. package/dist/virtual/page.js.map +1 -0
  625. package/dist/virtual/popup.d.ts +3 -0
  626. package/dist/virtual/popup.js +5 -0
  627. package/dist/virtual/popup.js.map +1 -0
  628. package/dist/virtual/relay.d.ts +3 -0
  629. package/dist/virtual/relay.js +5 -0
  630. package/dist/virtual/relay.js.map +1 -0
  631. package/dist/virtual/runtime.d.ts +8 -0
  632. package/dist/virtual/runtime.js +9 -0
  633. package/dist/virtual/runtime.js.map +1 -0
  634. package/dist/virtual/sandbox.d.ts +3 -0
  635. package/dist/virtual/sandbox.js +5 -0
  636. package/dist/virtual/sandbox.js.map +1 -0
  637. package/dist/virtual/sidebar.d.ts +3 -0
  638. package/dist/virtual/sidebar.js +5 -0
  639. package/dist/virtual/sidebar.js.map +1 -0
  640. package/package.json +53 -23
  641. package/scripts/clean-dist.js +7 -0
  642. package/scripts/copy-dts.js +11 -1
  643. package/scripts/merge-coverage.mjs +12 -0
  644. package/scripts/pre-commit.mjs +22 -0
  645. package/scripts/test-inventory.mjs +38 -0
  646. package/scripts/test-run.mjs +25 -0
  647. package/types/client.d.ts +15 -0
  648. package/dist/cli/builders/manifest/utils.d.ts +0 -32
  649. package/dist/cli/builders/manifest/utils.js +0 -209
  650. package/dist/cli/builders/manifest/utils.js.map +0 -1
  651. package/dist/cli/bundler/plugins/EntrypointPlugin.js.map +0 -1
  652. package/dist/cli/bundler/plugins/GenerateJsonPlugin.js +0 -40
  653. package/dist/cli/bundler/plugins/GenerateJsonPlugin.js.map +0 -1
  654. package/dist/cli/bundler/plugins/ManifestPlugin.d.ts +0 -10
  655. package/dist/cli/bundler/plugins/ManifestPlugin.js +0 -78
  656. package/dist/cli/bundler/plugins/ManifestPlugin.js.map +0 -1
  657. package/dist/cli/bundler/plugins/ReplacePlugin.js.map +0 -1
  658. package/dist/cli/bundler/plugins/WatchPlugin.js +0 -21
  659. package/dist/cli/bundler/plugins/WatchPlugin.js.map +0 -1
  660. package/dist/cli/bundler/utils/output.d.ts +0 -2
  661. package/dist/cli/bundler/utils/output.js +0 -15
  662. package/dist/cli/bundler/utils/output.js.map +0 -1
  663. package/dist/cli/entrypoint/finder/tests/fixtures/options/discovery/account.options.d.ts +0 -1
  664. package/dist/cli/entrypoint/finder/tests/fixtures/options/discovery/advanced.options/index.d.ts +0 -1
  665. package/dist/cli/plugins/output.d.ts +0 -2
  666. package/dist/cli/plugins/output.js +0 -32
  667. package/dist/cli/plugins/output.js.map +0 -1
  668. package/dist/entry/content/adapters/react/resolvers/index.d.ts +0 -1
  669. package/dist/entry/content/adapters/react/resolvers/index.js +0 -2
  670. package/dist/entry/content/adapters/react/resolvers/index.js.map +0 -1
  671. package/dist/entry/content/core/AbstractMarker.js.map +0 -1
  672. package/dist/entry/content/core/AttributeMarker.js.map +0 -1
  673. package/dist/entry/content/core/Builder.d.ts +0 -27
  674. package/dist/entry/content/core/Builder.js +0 -124
  675. package/dist/entry/content/core/Builder.js.map +0 -1
  676. package/dist/entry/content/core/Context.js +0 -43
  677. package/dist/entry/content/core/Context.js.map +0 -1
  678. package/dist/entry/content/core/EventEmitter.js.map +0 -1
  679. package/dist/entry/content/core/EventNode.js.map +0 -1
  680. package/dist/entry/content/core/ManagedContext.d.ts +0 -5
  681. package/dist/entry/content/core/ManagedContext.js.map +0 -1
  682. package/dist/entry/content/core/MarkerNode.js.map +0 -1
  683. package/dist/entry/content/core/MountBuilder.d.ts +0 -10
  684. package/dist/entry/content/core/MountBuilder.js +0 -40
  685. package/dist/entry/content/core/MountBuilder.js.map +0 -1
  686. package/dist/entry/content/core/MountNode.js.map +0 -1
  687. package/dist/entry/content/core/Node.js.map +0 -1
  688. package/dist/entry/content/core/WeakMarker.js.map +0 -1
  689. package/dist/entry/content/core/resolvers/anchor.d.ts +0 -2
  690. package/dist/entry/content/core/resolvers/anchor.js.map +0 -1
  691. package/dist/entry/content/core/resolvers/container.d.ts +0 -2
  692. package/dist/entry/content/core/resolvers/container.js.map +0 -1
  693. package/dist/entry/content/core/resolvers/definition.d.ts +0 -3
  694. package/dist/entry/content/core/resolvers/definition.js +0 -12
  695. package/dist/entry/content/core/resolvers/definition.js.map +0 -1
  696. package/dist/entry/content/core/resolvers/index.js.map +0 -1
  697. package/dist/entry/content/core/resolvers/mount.d.ts +0 -2
  698. package/dist/entry/content/core/resolvers/mount.js.map +0 -1
  699. package/dist/entry/content/core/resolvers/render.d.ts +0 -3
  700. package/dist/entry/content/core/resolvers/render.js +0 -18
  701. package/dist/entry/content/core/resolvers/render.js.map +0 -1
  702. package/dist/entry/content/core/resolvers/watch.d.ts +0 -4
  703. package/dist/entry/content/core/resolvers/watch.js.map +0 -1
  704. package/dist/locale/adapters/react/LocaleProvider.d.ts +0 -7
  705. package/dist/locale/adapters/react/LocaleProvider.js +0 -58
  706. package/dist/locale/adapters/react/LocaleProvider.js.map +0 -1
  707. package/dist/locale/adapters/react/context.d.ts +0 -14
  708. package/dist/locale/adapters/react/context.js +0 -25
  709. package/dist/locale/adapters/react/context.js.map +0 -1
  710. package/dist/locale/utils.d.ts +0 -11
  711. package/dist/locale/utils.js +0 -67
  712. package/dist/locale/utils.js.map +0 -1
  713. package/dist/types/content.js.map +0 -1
  714. /package/dist/cli/bundler/plugins/{ReplacePlugin.d.ts → replace/ReplacePlugin.d.ts} +0 -0
  715. /package/dist/cli/bundler/plugins/{ReplacePlugin.js → replace/ReplacePlugin.js} +0 -0
  716. /package/dist/cli/bundler/plugins/{WatchPlugin.d.ts → watch/WatchPlugin.d.ts} +0 -0
@@ -1,14 +1,62 @@
1
- import type { FC, ReactNode } from "react";
2
- import { Optional } from "utility-types";
3
- import { EntrypointBuilder, EntrypointOptions } from "./entrypoint.js";
4
- import { Awaiter, PickNonFunctionProperties } from "./helpers.js";
5
- type ExecutionWorld = chrome.scripting.ExecutionWorld;
6
- type RunAt = chrome.extensionTypes.RunAt;
1
+ import type { ContentScriptPrepareProps } from "./prepare.js";
2
+ import type { ContentScriptBoundary } from "./boundary.js";
3
+ import type { PageAlias } from "../page.js";
4
+ import type { Optional } from "utility-types";
5
+ import type { EntrypointBuilder, EntrypointOptions } from "../entrypoint.js";
6
+ import type { Awaiter, PickNonFunctionProperties } from "../helpers.js";
7
7
  export declare const ContentScriptMatches: string[];
8
+ /** Shared property used by the bundler plugin and the content script's style runtime getter. */
9
+ export declare const ContentScriptStylesRuntimeProperty = "__adnbnIsolatedStyles";
10
+ export declare enum ContentScriptWorld {
11
+ Isolated = "ISOLATED",
12
+ Main = "MAIN"
13
+ }
8
14
  export declare enum ContentScriptDeclarative {
9
15
  Required = "required",
10
16
  Optional = "optional"
11
17
  }
18
+ export declare enum ContentScriptIsolation {
19
+ None = "none",
20
+ Shadow = "shadow",
21
+ Iframe = "iframe"
22
+ }
23
+ export declare enum ContentScriptShadowMode {
24
+ Open = "open",
25
+ Closed = "closed"
26
+ }
27
+ export declare enum ContentScriptAppend {
28
+ Last = "last",
29
+ First = "first",
30
+ Replace = "replace",
31
+ Before = "before",
32
+ After = "after"
33
+ }
34
+ export declare enum ContentScriptMarker {
35
+ /** In-memory marking (no DOM mutations). */
36
+ Weak = "weak",
37
+ /** DOM attribute-based marking. */
38
+ Attribute = "attribute"
39
+ }
40
+ export declare enum ContentScriptMarkerValue {
41
+ Mounted = "1",
42
+ Unmounted = "0"
43
+ }
44
+ export declare enum ContentScriptEvent {
45
+ Mount = "mount",
46
+ Unmount = "unmount",
47
+ Add = "add",
48
+ Remove = "remove"
49
+ }
50
+ type RunAt = chrome.extensionTypes.RunAt;
51
+ export interface ContentScriptStylesRuntime {
52
+ /** Resolves initial stylesheet URLs once, before the first root is registered. */
53
+ initialize(resolveUrl: (file: string) => string): void;
54
+ /** Retry restored styles once on load error; future loads keep the default failure behavior. */
55
+ add(root: ShadowRoot | HTMLElement, target: Element | null, retry?: boolean): void;
56
+ delete(root: ShadowRoot | HTMLElement): void;
57
+ load(url: string): Promise<void>;
58
+ }
59
+ export type ContentScriptWorldValue = ContentScriptWorld | `${chrome.scripting.ExecutionWorld}`;
12
60
  export interface ContentScriptConfig {
13
61
  matches?: string[];
14
62
  /**
@@ -38,8 +86,13 @@ export interface ContentScriptConfig {
38
86
  runAt?: RunAt;
39
87
  /**
40
88
  * See https://developer.chrome.com/docs/extensions/develop/concepts/content-scripts#isolated_world
89
+ *
90
+ * Dynamic imports keep physical async chunks in ISOLATED. MAIN keeps the same Promise-based
91
+ * execution semantics but includes dynamic dependencies in the initial entrypoint graph.
92
+ * Manifest V2 builds always use ISOLATED. Requesting MAIN emits a build warning and applies
93
+ * ISOLATED grouping and chunk loading rules before generating the manifest.
41
94
  */
42
- world?: ExecutionWorld;
95
+ world?: ContentScriptWorldValue;
43
96
  /**
44
97
  * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/
45
98
  * @default false
@@ -68,34 +121,66 @@ export interface ContentScriptConfig {
68
121
  declarative?: boolean | `${ContentScriptDeclarative}` | ContentScriptDeclarative;
69
122
  }
70
123
  export type ContentScriptOptions = ContentScriptConfig & EntrypointOptions;
71
- export type ContentScriptEntrypointOptions = Partial<ContentScriptOptions>;
72
- export declare enum ContentScriptAppend {
73
- Last = "last",
74
- First = "first",
75
- Replace = "replace",
76
- Before = "before",
77
- After = "after"
78
- }
124
+ export interface ContentScriptShadowOptions {
125
+ /**
126
+ * Controls access through the host's shadowRoot property, not CSS isolation or UI visibility.
127
+ * @default ContentScriptShadowMode.Open
128
+ */
129
+ mode?: ContentScriptShadowMode | `${ContentScriptShadowMode}`;
130
+ }
131
+ export interface ContentScriptFrameRenderOptions {
132
+ page?: never;
133
+ src?: never;
134
+ }
135
+ export interface ContentScriptFramePageOptions {
136
+ page: PageAlias;
137
+ src?: never;
138
+ }
139
+ export interface ContentScriptFrameSourceOptions {
140
+ src: string;
141
+ page?: never;
142
+ }
143
+ export type ContentScriptFrame = ContentScriptFrameRenderOptions | ContentScriptFramePageOptions | ContentScriptFrameSourceOptions;
144
+ export interface ContentScriptIsolationNoneOptions {
145
+ type: ContentScriptIsolation.None | "none";
146
+ mode?: never;
147
+ page?: never;
148
+ src?: never;
149
+ }
150
+ export interface ContentScriptIsolationShadowOptions extends ContentScriptShadowOptions {
151
+ type: ContentScriptIsolation.Shadow | "shadow";
152
+ page?: never;
153
+ src?: never;
154
+ }
155
+ export type ContentScriptIsolationFrameOptions = ContentScriptFrame & {
156
+ type: ContentScriptIsolation.Iframe | "iframe";
157
+ mode?: never;
158
+ };
159
+ /** Object form of isolation, also used after resolving shorthand values. */
160
+ export type ContentScriptIsolationOptions = ContentScriptIsolationNoneOptions | ContentScriptIsolationShadowOptions | ContentScriptIsolationFrameOptions;
161
+ export type ContentScriptIsolationValue = ContentScriptIsolation | `${ContentScriptIsolation}` | ContentScriptIsolationOptions;
162
+ /** Statically resolved configuration; runtime render values are never retained here. */
163
+ export type ContentScriptEntrypointOptions = Partial<ContentScriptOptions> & {
164
+ isolation?: ContentScriptIsolationOptions;
165
+ };
79
166
  export type ContentScriptMountFunction = (anchor: Element, container: Element) => void | (() => void);
80
167
  export interface ContentScriptMount {
81
168
  mount(): boolean | undefined | void;
82
169
  unmount(): boolean | undefined | void;
83
170
  }
84
- export interface ContentScriptProps extends ContentScriptEntrypointOptions {
85
- anchor: Element;
171
+ export interface ContentScriptContainerProps<Data = unknown> extends ContentScriptPrepareProps {
172
+ data: Data;
173
+ }
174
+ export interface ContentScriptProps<Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> extends ContentScriptContainerProps<Data> {
175
+ /** Outer mounted element; the Shadow host or iframe wrapper when isolated. */
176
+ container: Element;
177
+ /** Actual render destination. Use its root/document for portals and DOM operations. */
178
+ target: Element;
179
+ /** ShadowRoot or iframe for the active isolation; undefined without isolation. */
180
+ boundary: ContentScriptBoundary<Isolation>;
86
181
  }
87
182
  export type ContentScriptAnchor = string | Element | null | undefined;
88
183
  export type ContentScriptAnchorGetter = () => Awaiter<ContentScriptAnchor>;
89
- export declare enum ContentScriptMarker {
90
- /** In-memory marking (no DOM mutations). */
91
- Weak = "weak",
92
- /** DOM attribute-based marking. */
93
- Attribute = "attribute"
94
- }
95
- export declare enum ContentScriptMarkerValue {
96
- Mounted = "1",
97
- Unmounted = "0"
98
- }
99
184
  export interface ContentScriptMarkerContract {
100
185
  for(anchor: ContentScriptAnchor): ContentScriptMarkerContract;
101
186
  /**
@@ -115,24 +200,15 @@ export interface ContentScriptMarkerContract {
115
200
  export type ContentScriptMarkerType = ContentScriptMarker | `${ContentScriptMarker}` | ContentScriptMarkerContract | undefined;
116
201
  export type ContentScriptMarkerGetter = (options: ContentScriptOptions) => Awaiter<ContentScriptMarkerType>;
117
202
  export type ContentScriptMarkerResolver = (options: ContentScriptOptions) => Awaiter<ContentScriptMarkerContract>;
118
- export type ContentScriptRenderReactComponent = FC<ContentScriptProps>;
119
- export type ContentScriptRenderValue = Element | ReactNode | ContentScriptRenderReactComponent;
120
- export type ContentScriptRenderHandler = (props: ContentScriptProps) => Awaiter<undefined | ContentScriptRenderValue>;
121
203
  export type ContentScriptContainerTag = Exclude<keyof HTMLElementTagNameMap, "html" | "body">;
122
204
  export type ContentScriptContainerOptions = {
123
205
  [Tag in ContentScriptContainerTag]: {
124
206
  tagName: Tag;
125
207
  } & Exclude<Optional<PickNonFunctionProperties<HTMLElementTagNameMap[Tag]>>, "id">;
126
208
  }[ContentScriptContainerTag];
127
- export type ContentScriptContainerFactory = (props: ContentScriptProps) => Awaiter<Element | ContentScriptContainerTag | ContentScriptContainerOptions>;
128
- export type ContentScriptContainerCreator = (props: ContentScriptProps) => Awaiter<Element>;
129
- export type ContentScriptWatchStrategy = (update: () => void, context: ContentScriptContext) => () => void;
130
- export declare enum ContentScriptEvent {
131
- Mount = "mount",
132
- Unmount = "unmount",
133
- Add = "add",
134
- Remove = "remove"
135
- }
209
+ export type ContentScriptContainerFactory<Data = unknown> = (props: ContentScriptContainerProps<Data>) => Awaiter<Element | ContentScriptContainerTag | ContentScriptContainerOptions>;
210
+ export type ContentScriptContainerCreator<Data = unknown> = (props: ContentScriptContainerProps<Data>) => Awaiter<Element>;
211
+ export type ContentScriptWatchStrategy = (update: () => Awaiter<void>, context: ContentScriptContext) => () => void;
136
212
  export type ContentScriptEventCallback = (event: ContentScriptEvent, node: ContentScriptNode) => void;
137
213
  export interface ContentScriptEventEmitter {
138
214
  on(callback: ContentScriptEventCallback): void;
@@ -167,28 +243,12 @@ export type ContentScriptMainFunction = (context: ContentScriptContext, options:
167
243
  export interface ContentScriptNode extends ContentScriptMount {
168
244
  anchor: Element;
169
245
  container?: Element;
246
+ /** Element used by the active adapter as the destination for rendered UI. */
247
+ target?: Element;
248
+ /** Present while isolation is mounted, including navigation-only iframes. */
249
+ boundary?: ContentScriptBoundary;
170
250
  }
171
251
  export type ContentScriptNodeSet = Set<ContentScriptNode>;
172
- export interface ContentScriptDefinition extends ContentScriptEntrypointOptions {
173
- marker?: ContentScriptMarkerType | ContentScriptMarkerGetter;
174
- anchor?: ContentScriptAnchor | ContentScriptAnchorGetter;
175
- mount?: ContentScriptMountFunction;
176
- render?: ContentScriptRenderValue | ContentScriptRenderHandler;
177
- container?: ContentScriptContainerTag | ContentScriptContainerOptions | ContentScriptContainerFactory;
178
- watch?: true | ContentScriptWatchStrategy;
179
- main?: ContentScriptMainFunction;
180
- }
181
- export interface ContentScriptResolvedDefinition extends Omit<ContentScriptDefinition, "anchor" | "marker" | "mount" | "container" | "render" | "watch"> {
182
- marker: ContentScriptMarkerResolver;
183
- anchor: ContentScriptAnchorGetter;
184
- mount: ContentScriptMountFunction;
185
- render?: ContentScriptRenderHandler;
186
- container: ContentScriptContainerCreator;
187
- watch: ContentScriptWatchStrategy;
188
- }
189
- export interface ContentScriptAppendDefinition extends Omit<ContentScriptDefinition, "mount"> {
190
- append?: ContentScriptAppend;
191
- }
192
252
  export interface ContentScriptBuilder extends EntrypointBuilder {
193
253
  getContext(): ContentScriptContext;
194
254
  }
@@ -1,9 +1,26 @@
1
1
  const ContentScriptMatches = ["http://*/*", "https://*/*"];
2
+ const ContentScriptStylesRuntimeProperty = "__adnbnIsolatedStyles";
3
+ var ContentScriptWorld = /* @__PURE__ */ ((ContentScriptWorld2) => {
4
+ ContentScriptWorld2["Isolated"] = "ISOLATED";
5
+ ContentScriptWorld2["Main"] = "MAIN";
6
+ return ContentScriptWorld2;
7
+ })(ContentScriptWorld || {});
2
8
  var ContentScriptDeclarative = /* @__PURE__ */ ((ContentScriptDeclarative2) => {
3
9
  ContentScriptDeclarative2["Required"] = "required";
4
10
  ContentScriptDeclarative2["Optional"] = "optional";
5
11
  return ContentScriptDeclarative2;
6
12
  })(ContentScriptDeclarative || {});
13
+ var ContentScriptIsolation = /* @__PURE__ */ ((ContentScriptIsolation2) => {
14
+ ContentScriptIsolation2["None"] = "none";
15
+ ContentScriptIsolation2["Shadow"] = "shadow";
16
+ ContentScriptIsolation2["Iframe"] = "iframe";
17
+ return ContentScriptIsolation2;
18
+ })(ContentScriptIsolation || {});
19
+ var ContentScriptShadowMode = /* @__PURE__ */ ((ContentScriptShadowMode2) => {
20
+ ContentScriptShadowMode2["Open"] = "open";
21
+ ContentScriptShadowMode2["Closed"] = "closed";
22
+ return ContentScriptShadowMode2;
23
+ })(ContentScriptShadowMode || {});
7
24
  var ContentScriptAppend = /* @__PURE__ */ ((ContentScriptAppend2) => {
8
25
  ContentScriptAppend2["Last"] = "last";
9
26
  ContentScriptAppend2["First"] = "first";
@@ -33,8 +50,12 @@ export {
33
50
  ContentScriptAppend,
34
51
  ContentScriptDeclarative,
35
52
  ContentScriptEvent,
53
+ ContentScriptIsolation,
36
54
  ContentScriptMarker,
37
55
  ContentScriptMarkerValue,
38
- ContentScriptMatches
56
+ ContentScriptMatches,
57
+ ContentScriptShadowMode,
58
+ ContentScriptStylesRuntimeProperty,
59
+ ContentScriptWorld
39
60
  };
40
- //# sourceMappingURL=content.js.map
61
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/types/content/common.ts"],"sourcesContent":["import type {ContentScriptPrepareProps} from \"./prepare\";\nimport type {ContentScriptBoundary} from \"./boundary\";\n\nimport type {PageAlias} from \"@typing/page\";\nimport type {Optional} from \"utility-types\";\n\nimport type {EntrypointBuilder, EntrypointOptions} from \"@typing/entrypoint\";\nimport type {Awaiter, PickNonFunctionProperties} from \"@typing/helpers\";\n\nexport const ContentScriptMatches = [\"http://*/*\", \"https://*/*\"];\n\n/** Shared property used by the bundler plugin and the content script's style runtime getter. */\nexport const ContentScriptStylesRuntimeProperty = \"__adnbnIsolatedStyles\";\n\nexport enum ContentScriptWorld {\n Isolated = \"ISOLATED\",\n Main = \"MAIN\",\n}\n\nexport enum ContentScriptDeclarative {\n Required = \"required\",\n Optional = \"optional\",\n}\n\nexport enum ContentScriptIsolation {\n None = \"none\",\n Shadow = \"shadow\",\n Iframe = \"iframe\",\n}\n\nexport enum ContentScriptShadowMode {\n Open = \"open\",\n Closed = \"closed\",\n}\n\n// Append\nexport enum ContentScriptAppend {\n Last = \"last\",\n First = \"first\",\n Replace = \"replace\",\n Before = \"before\",\n After = \"after\",\n}\n\n// Marker\nexport enum ContentScriptMarker {\n /** In-memory marking (no DOM mutations). */\n Weak = \"weak\",\n /** DOM attribute-based marking. */\n Attribute = \"attribute\",\n}\n\nexport enum ContentScriptMarkerValue {\n Mounted = \"1\",\n Unmounted = \"0\",\n}\n\n// Event\nexport enum ContentScriptEvent {\n Mount = \"mount\",\n Unmount = \"unmount\",\n Add = \"add\",\n Remove = \"remove\",\n}\n\ntype RunAt = chrome.extensionTypes.RunAt;\n\nexport interface ContentScriptStylesRuntime {\n /** Resolves initial stylesheet URLs once, before the first root is registered. */\n initialize(resolveUrl: (file: string) => string): void;\n /** Retry restored styles once on load error; future loads keep the default failure behavior. */\n add(root: ShadowRoot | HTMLElement, target: Element | null, retry?: boolean): void;\n delete(root: ShadowRoot | HTMLElement): void;\n load(url: string): Promise<void>;\n}\n\nexport type ContentScriptWorldValue = ContentScriptWorld | `${chrome.scripting.ExecutionWorld}`;\n\nexport interface ContentScriptConfig {\n matches?: string[];\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default []\n */\n excludeMatches?: string[];\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default []\n */\n includeGlobs?: string[];\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default []\n */\n excludeGlobs?: string[];\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default false\n */\n allFrames?: boolean;\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default \"documentIdle\"\n */\n runAt?: RunAt;\n /**\n * See https://developer.chrome.com/docs/extensions/develop/concepts/content-scripts#isolated_world\n *\n * Dynamic imports keep physical async chunks in ISOLATED. MAIN keeps the same Promise-based\n * execution semantics but includes dynamic dependencies in the initial entrypoint graph.\n * Manifest V2 builds always use ISOLATED. Requesting MAIN emits a build warning and applies\n * ISOLATED grouping and chunk loading rules before generating the manifest.\n */\n world?: ContentScriptWorldValue;\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default false\n */\n matchAboutBlank?: boolean;\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default false\n */\n matchOriginAsFallback?: boolean;\n /**\n * Whether this content script requires explicit host permission declaration in the extension manifest.\n *\n * Accepted values:\n * - ContentScriptDeclarative.Required — adds the corresponding host patterns to manifest.host_permissions.\n * - ContentScriptDeclarative.Optional — adds the corresponding host patterns to manifest.optional_host_permissions.\n *\n * Backward compatibility:\n * - true ≡ ContentScriptDeclarative.Required\n * - false ≡ undefined (as if the value is not set)\n *\n * @see https://developer.chrome.com/docs/extensions/mv3/declare_permissions/\n *\n * @default undefined\n */\n declarative?: boolean | `${ContentScriptDeclarative}` | ContentScriptDeclarative;\n}\n\nexport type ContentScriptOptions = ContentScriptConfig & EntrypointOptions;\n\nexport interface ContentScriptShadowOptions {\n /**\n * Controls access through the host's shadowRoot property, not CSS isolation or UI visibility.\n * @default ContentScriptShadowMode.Open\n */\n mode?: ContentScriptShadowMode | `${ContentScriptShadowMode}`;\n}\n\nexport interface ContentScriptFrameRenderOptions {\n page?: never;\n src?: never;\n}\n\nexport interface ContentScriptFramePageOptions {\n page: PageAlias;\n src?: never;\n}\n\nexport interface ContentScriptFrameSourceOptions {\n src: string;\n page?: never;\n}\n\nexport type ContentScriptFrame =\n | ContentScriptFrameRenderOptions\n | ContentScriptFramePageOptions\n | ContentScriptFrameSourceOptions;\n\nexport interface ContentScriptIsolationNoneOptions {\n type: ContentScriptIsolation.None | \"none\";\n mode?: never;\n page?: never;\n src?: never;\n}\n\nexport interface ContentScriptIsolationShadowOptions extends ContentScriptShadowOptions {\n type: ContentScriptIsolation.Shadow | \"shadow\";\n page?: never;\n src?: never;\n}\n\nexport type ContentScriptIsolationFrameOptions = ContentScriptFrame & {\n type: ContentScriptIsolation.Iframe | \"iframe\";\n mode?: never;\n};\n\n/** Object form of isolation, also used after resolving shorthand values. */\nexport type ContentScriptIsolationOptions =\n | ContentScriptIsolationNoneOptions\n | ContentScriptIsolationShadowOptions\n | ContentScriptIsolationFrameOptions;\n\nexport type ContentScriptIsolationValue =\n | ContentScriptIsolation\n | `${ContentScriptIsolation}`\n | ContentScriptIsolationOptions;\n\n/** Statically resolved configuration; runtime render values are never retained here. */\nexport type ContentScriptEntrypointOptions = Partial<ContentScriptOptions> & {\n isolation?: ContentScriptIsolationOptions;\n};\n\n// Mount\nexport type ContentScriptMountFunction = (anchor: Element, container: Element) => void | (() => void);\n\nexport interface ContentScriptMount {\n mount(): boolean | undefined | void;\n\n unmount(): boolean | undefined | void;\n}\n\n// Props\nexport interface ContentScriptContainerProps<Data = unknown> extends ContentScriptPrepareProps {\n data: Data;\n}\n\nexport interface ContentScriptProps<\n Data = unknown,\n Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`,\n> extends ContentScriptContainerProps<Data> {\n /** Outer mounted element; the Shadow host or iframe wrapper when isolated. */\n container: Element;\n /** Actual render destination. Use its root/document for portals and DOM operations. */\n target: Element;\n /** ShadowRoot or iframe for the active isolation; undefined without isolation. */\n boundary: ContentScriptBoundary<Isolation>;\n}\n\n// Anchor\nexport type ContentScriptAnchor = string | Element | null | undefined;\n\nexport type ContentScriptAnchorGetter = () => Awaiter<ContentScriptAnchor>;\n\nexport interface ContentScriptMarkerContract {\n for(anchor: ContentScriptAnchor): ContentScriptMarkerContract;\n\n /**\n * Returns elements that are not tracked yet (no marker attribute present).\n * MUST NOT mutate marker state.\n */\n unmarked(): Element[];\n\n marked(): Element[];\n\n mark(element: Element, value: ContentScriptMarkerValue): boolean;\n\n unmark(element: Element): boolean;\n\n isMarked(element: Element): boolean;\n\n value(element: Element): ContentScriptMarkerValue | undefined;\n\n mount(element: Element): boolean;\n\n unmount(element: Element): boolean;\n\n reset(): ContentScriptMarkerContract;\n}\n\nexport type ContentScriptMarkerType =\n | ContentScriptMarker\n | `${ContentScriptMarker}`\n | ContentScriptMarkerContract\n | undefined;\n\nexport type ContentScriptMarkerGetter = (options: ContentScriptOptions) => Awaiter<ContentScriptMarkerType>;\n\nexport type ContentScriptMarkerResolver = (options: ContentScriptOptions) => Awaiter<ContentScriptMarkerContract>;\n\n// Container\nexport type ContentScriptContainerTag = Exclude<keyof HTMLElementTagNameMap, \"html\" | \"body\">;\n\nexport type ContentScriptContainerOptions = {\n [Tag in ContentScriptContainerTag]: {\n tagName: Tag;\n } & Exclude<Optional<PickNonFunctionProperties<HTMLElementTagNameMap[Tag]>>, \"id\">;\n}[ContentScriptContainerTag];\n\nexport type ContentScriptContainerFactory<Data = unknown> = (\n props: ContentScriptContainerProps<Data>\n) => Awaiter<Element | ContentScriptContainerTag | ContentScriptContainerOptions>;\n\nexport type ContentScriptContainerCreator<Data = unknown> = (\n props: ContentScriptContainerProps<Data>\n) => Awaiter<Element>;\n\n// Watch\nexport type ContentScriptWatchStrategy = (update: () => Awaiter<void>, context: ContentScriptContext) => () => void;\n\nexport type ContentScriptEventCallback = (event: ContentScriptEvent, node: ContentScriptNode) => void;\n\nexport interface ContentScriptEventEmitter {\n on(callback: ContentScriptEventCallback): void;\n\n off(callback: ContentScriptEventCallback): void;\n\n emit(event: ContentScriptEvent, node: ContentScriptNode): void;\n\n emitMount(node: ContentScriptNode): void;\n\n emitUnmount(node: ContentScriptNode): void;\n\n emitAdd(node: ContentScriptNode): void;\n\n emitRemove(node: ContentScriptNode): void;\n\n removeAllListeners(): void;\n\n listenerCount(): number;\n\n hasListeners(): boolean;\n}\n\n// Context\nexport interface ContentScriptContext extends ContentScriptMount {\n nodes: ReadonlySet<ContentScriptNode>;\n\n /**\n * Registers a callback function that will be invoked when a specific content script context event occurs.\n *\n * @param {ContentScriptEventCallback} callback - The function to be executed when the event is triggered. Receives event-related data as its argument.\n * @return {Function} A function that can be called to unsubscribe the callback from the event.\n */\n watch(callback: ContentScriptEventCallback): () => void;\n\n /**\n * Stops watching for changes or events that were previously being observed.\n * Unsubscribes from all event listeners that were registered through the watch method.\n *\n * @return {void} No return value.\n */\n unwatch(): void;\n}\n\n// Main\nexport type ContentScriptMainFunction = (context: ContentScriptContext, options: ContentScriptOptions) => Awaiter<void>;\n\n// Node\nexport interface ContentScriptNode extends ContentScriptMount {\n anchor: Element;\n container?: Element;\n\n /** Element used by the active adapter as the destination for rendered UI. */\n target?: Element;\n\n /** Present while isolation is mounted, including navigation-only iframes. */\n boundary?: ContentScriptBoundary;\n}\n\nexport type ContentScriptNodeSet = Set<ContentScriptNode>;\n\n// Builder\nexport interface ContentScriptBuilder extends EntrypointBuilder {\n getContext(): ContentScriptContext;\n}\n"],"mappings":"AASO,MAAM,uBAAuB,CAAC,cAAc,aAAa;AAGzD,MAAM,qCAAqC;AAE3C,IAAK,qBAAL,kBAAKA,wBAAL;AACH,EAAAA,oBAAA,cAAW;AACX,EAAAA,oBAAA,UAAO;AAFC,SAAAA;AAAA,GAAA;AAKL,IAAK,2BAAL,kBAAKC,8BAAL;AACH,EAAAA,0BAAA,cAAW;AACX,EAAAA,0BAAA,cAAW;AAFH,SAAAA;AAAA,GAAA;AAKL,IAAK,yBAAL,kBAAKC,4BAAL;AACH,EAAAA,wBAAA,UAAO;AACP,EAAAA,wBAAA,YAAS;AACT,EAAAA,wBAAA,YAAS;AAHD,SAAAA;AAAA,GAAA;AAML,IAAK,0BAAL,kBAAKC,6BAAL;AACH,EAAAA,yBAAA,UAAO;AACP,EAAAA,yBAAA,YAAS;AAFD,SAAAA;AAAA,GAAA;AAML,IAAK,sBAAL,kBAAKC,yBAAL;AACH,EAAAA,qBAAA,UAAO;AACP,EAAAA,qBAAA,WAAQ;AACR,EAAAA,qBAAA,aAAU;AACV,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,WAAQ;AALA,SAAAA;AAAA,GAAA;AASL,IAAK,sBAAL,kBAAKC,yBAAL;AAEH,EAAAA,qBAAA,UAAO;AAEP,EAAAA,qBAAA,eAAY;AAJJ,SAAAA;AAAA,GAAA;AAOL,IAAK,2BAAL,kBAAKC,8BAAL;AACH,EAAAA,0BAAA,aAAU;AACV,EAAAA,0BAAA,eAAY;AAFJ,SAAAA;AAAA,GAAA;AAML,IAAK,qBAAL,kBAAKC,wBAAL;AACH,EAAAA,oBAAA,WAAQ;AACR,EAAAA,oBAAA,aAAU;AACV,EAAAA,oBAAA,SAAM;AACN,EAAAA,oBAAA,YAAS;AAJD,SAAAA;AAAA,GAAA;","names":["ContentScriptWorld","ContentScriptDeclarative","ContentScriptIsolation","ContentScriptShadowMode","ContentScriptAppend","ContentScriptMarker","ContentScriptMarkerValue","ContentScriptEvent"]}
@@ -0,0 +1,61 @@
1
+ import type { ContentScriptPrepareHandler } from "./prepare.js";
2
+ import type { ContentScriptBoundaryHandler } from "./boundary.js";
3
+ import type { ContentScriptAnchor, ContentScriptAnchorGetter, ContentScriptAppend, ContentScriptContainerCreator, ContentScriptContainerFactory, ContentScriptContainerOptions, ContentScriptContainerTag, ContentScriptFramePageOptions, ContentScriptFrameRenderOptions, ContentScriptFrameSourceOptions, ContentScriptIsolation, ContentScriptIsolationFrameOptions, ContentScriptIsolationOptions, ContentScriptIsolationShadowOptions, ContentScriptMainFunction, ContentScriptMarkerGetter, ContentScriptMarkerResolver, ContentScriptMarkerType, ContentScriptMountFunction, ContentScriptOptions, ContentScriptWatchStrategy } from "./common.js";
4
+ import type { ContentScriptRenderHandler, ContentScriptRenderValue } from "./render.js";
5
+ import type { ContentScriptTarget, ContentScriptTargetCreator } from "./target.js";
6
+ export interface ContentScriptDefinitionBase<Data = unknown> extends Partial<ContentScriptOptions> {
7
+ marker?: ContentScriptMarkerType | ContentScriptMarkerGetter;
8
+ anchor?: ContentScriptAnchor | ContentScriptAnchorGetter;
9
+ mount?: ContentScriptMountFunction;
10
+ container?: ContentScriptContainerTag | ContentScriptContainerOptions | ContentScriptContainerFactory<NoInfer<Data>>;
11
+ prepare?: ContentScriptPrepareHandler<Data>;
12
+ watch?: true | ContentScriptWatchStrategy;
13
+ main?: ContentScriptMainFunction;
14
+ }
15
+ export type ContentScriptRenderDefinition<Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> = {
16
+ isolation?: Isolation | {
17
+ type: Isolation;
18
+ };
19
+ boundary?: ContentScriptBoundaryHandler<NoInfer<Data>, NoInfer<Isolation>>;
20
+ target?: ContentScriptTarget<NoInfer<Data>, NoInfer<Isolation>>;
21
+ render?: ContentScriptRenderValue<NoInfer<Data>, NoInfer<Isolation>> | ContentScriptRenderHandler<NoInfer<Data>, NoInfer<Isolation>>;
22
+ } & ({
23
+ isolation?: NoInfer<Isolation> | Extract<ContentScriptIsolationOptions, {
24
+ type: `${NoInfer<Isolation>}`;
25
+ page?: never;
26
+ src?: never;
27
+ }>;
28
+ boundary?: never;
29
+ target?: never;
30
+ } | {
31
+ isolation: Extract<NoInfer<Isolation>, "shadow"> | Extract<ContentScriptIsolationShadowOptions, {
32
+ type: `${NoInfer<Isolation>}`;
33
+ }>;
34
+ } | {
35
+ isolation: Extract<NoInfer<Isolation>, "iframe"> | Extract<ContentScriptIsolationFrameOptions & ContentScriptFrameRenderOptions, {
36
+ type: `${NoInfer<Isolation>}`;
37
+ }>;
38
+ } | {
39
+ isolation: Extract<ContentScriptIsolationFrameOptions & (ContentScriptFramePageOptions | ContentScriptFrameSourceOptions), {
40
+ type: `${NoInfer<Isolation>}`;
41
+ }>;
42
+ render?: never;
43
+ target?: never;
44
+ }) & ("none" extends `${NoInfer<Isolation>}` ? unknown : {
45
+ isolation: unknown;
46
+ });
47
+ export type ContentScriptDefinition<Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> = ContentScriptDefinitionBase<Data> & ContentScriptRenderDefinition<Data, Isolation>;
48
+ export interface ContentScriptResolvedDefinition<Data = unknown> extends Omit<ContentScriptDefinitionBase<Data>, "anchor" | "marker" | "mount" | "container" | "watch"> {
49
+ isolation: ContentScriptIsolationOptions;
50
+ boundary?: ContentScriptBoundaryHandler<Data>;
51
+ marker: ContentScriptMarkerResolver;
52
+ anchor: ContentScriptAnchorGetter;
53
+ mount: ContentScriptMountFunction;
54
+ render?: true | ContentScriptRenderHandler<Data>;
55
+ container: ContentScriptContainerCreator<Data>;
56
+ target: ContentScriptTargetCreator<Data>;
57
+ watch: ContentScriptWatchStrategy;
58
+ }
59
+ export type ContentScriptAppendDefinition<Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> = Omit<ContentScriptDefinitionBase<Data>, "mount"> & ContentScriptRenderDefinition<Data, Isolation> & {
60
+ append?: ContentScriptAppend;
61
+ };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=definition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,7 @@
1
+ export * from "./common.js";
2
+ export type * from "./definition.js";
3
+ export type * from "./render.js";
4
+ export type * from "./adapters/index.js";
5
+ export type * from "./prepare.js";
6
+ export type * from "./boundary.js";
7
+ export type * from "./target.js";
@@ -0,0 +1,2 @@
1
+ export * from "./common.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/types/content/index.ts"],"sourcesContent":["export * from \"./common\";\n\nexport type * from \"./definition\";\nexport type * from \"./render\";\n\nexport type * from \"./adapters\";\nexport type * from \"./prepare\";\nexport type * from \"./boundary\";\nexport type * from \"./target\";\n"],"mappings":"AAAA,cAAc;","names":[]}
@@ -0,0 +1,9 @@
1
+ import type { Awaiter } from "../helpers.js";
2
+ import type { ContentScriptEntrypointOptions } from "./common.js";
3
+ /** Per-anchor input available before a container or render target exists. */
4
+ export interface ContentScriptPrepareProps extends ContentScriptEntrypointOptions {
5
+ anchor: Element;
6
+ }
7
+ /** False tracks the anchor without creating UI. Other results become render props.data. */
8
+ export type ContentScriptPrepareResult<Data> = Data | false;
9
+ export type ContentScriptPrepareHandler<Data = unknown> = (props: ContentScriptPrepareProps) => Awaiter<ContentScriptPrepareResult<Data>>;
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=prepare.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,6 @@
1
+ import type { ContentScriptIsolation, ContentScriptProps } from "./common.js";
2
+ import type { ContentScriptVanillaRenderValue, ContentScriptReactRenderValue } from "./adapters/index.js";
3
+ /** All supported render values; the entrypoint's filename selects the runtime adapter. */
4
+ export type ContentScriptRenderValue<Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> = ContentScriptVanillaRenderValue | ContentScriptReactRenderValue<Data, Isolation>;
5
+ /** Synchronous rendering into prepared DOM. Await data and decide whether to render in prepare. */
6
+ export type ContentScriptRenderHandler<Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> = (props: ContentScriptProps<Data, Isolation>) => ContentScriptRenderValue<Data, Isolation>;
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=render.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,13 @@
1
+ import type { ContentScriptContainerOptions, ContentScriptContainerTag, ContentScriptIsolation } from "./common.js";
2
+ import type { ContentScriptBoundaryProps } from "./boundary.js";
3
+ export type ContentScriptTargetTag = ContentScriptContainerTag;
4
+ export type ContentScriptTargetOptions = ContentScriptContainerOptions;
5
+ /** Available after isolation exists, before the target is created or rendering starts. */
6
+ export interface ContentScriptTargetProps<Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> extends ContentScriptBoundaryProps<Data, Isolation> {
7
+ /** Create elements in this document, including for an iframe's child document. */
8
+ document: Document;
9
+ }
10
+ export type ContentScriptTargetFactory<Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> = (props: ContentScriptTargetProps<Data, Isolation>) => Element | ContentScriptTargetTag | ContentScriptTargetOptions;
11
+ export type ContentScriptTarget<Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> = ContentScriptTargetTag | ContentScriptTargetOptions | ContentScriptTargetFactory<Data, Isolation>;
12
+ /** Synchronous DOM creation; asynchronous work belongs in prepare. */
13
+ export type ContentScriptTargetCreator<Data = unknown> = (props: ContentScriptTargetProps<Data>) => Element;
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=target.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -2,6 +2,8 @@ import { Mode } from "./app.js";
2
2
  import { Browser } from "./browser.js";
3
3
  import { ManifestVersion } from "./manifest.js";
4
4
  export declare const EntrypointFileExtensions: ReadonlySet<string>;
5
+ export declare const EntrypointAssetsRuntimeProperty = "__adnbnCurrentEntrypointAssets";
6
+ export declare const EntrypointAssetsMapRuntimeProperty = "__adnbnBuildAssets";
5
7
  export declare enum EntrypointType {
6
8
  Background = "background",
7
9
  Command = "command",
@@ -76,6 +78,18 @@ export interface EntrypointFile {
76
78
  * These files will be compiled and bundled together as part of the specified entrypoint.
77
79
  */
78
80
  export type EntrypointEntries = Map<string, Set<EntrypointFile>>;
81
+ export interface EntrypointAssetsFiles {
82
+ readonly js: readonly string[];
83
+ readonly css: readonly string[];
84
+ }
85
+ export interface EntrypointAssets {
86
+ readonly initial: EntrypointAssetsFiles;
87
+ readonly async: EntrypointAssetsFiles;
88
+ }
89
+ export interface EntrypointAssetsMapEntry extends EntrypointAssets {
90
+ readonly assets: readonly string[];
91
+ }
92
+ export type EntrypointAssetsMap = Readonly<Record<string, EntrypointAssetsMapEntry>>;
79
93
  export interface EntrypointParser<O extends EntrypointOptions> {
80
94
  options(file: EntrypointFile): O;
81
95
  contract(file: EntrypointFile): string | undefined;
@@ -85,6 +99,12 @@ export interface EntrypointFinder {
85
99
  empty(): Promise<boolean>;
86
100
  exists(): Promise<boolean>;
87
101
  clear(): this;
102
+ /**
103
+ * Determines if the specified file exists within the current set of files.
104
+ *
105
+ * @param {EntrypointFile} file - The file to be checked for existence in the set of files.
106
+ * @return {boolean} Returns true if the file exists in the set, otherwise false.
107
+ */
88
108
  holds(file: EntrypointFile): boolean;
89
109
  }
90
110
  export interface EntrypointOptionsFinder<O extends EntrypointOptions> extends EntrypointFinder {
@@ -1,4 +1,6 @@
1
1
  const EntrypointFileExtensions = /* @__PURE__ */ new Set(["ts", "tsx", "js", "jsx", "vue", "svelte"]);
2
+ const EntrypointAssetsRuntimeProperty = "__adnbnCurrentEntrypointAssets";
3
+ const EntrypointAssetsMapRuntimeProperty = "__adnbnBuildAssets";
2
4
  var EntrypointType = /* @__PURE__ */ ((EntrypointType2) => {
3
5
  EntrypointType2["Background"] = "background";
4
6
  EntrypointType2["Command"] = "command";
@@ -14,6 +16,8 @@ var EntrypointType = /* @__PURE__ */ ((EntrypointType2) => {
14
16
  return EntrypointType2;
15
17
  })(EntrypointType || {});
16
18
  export {
19
+ EntrypointAssetsMapRuntimeProperty,
20
+ EntrypointAssetsRuntimeProperty,
17
21
  EntrypointFileExtensions,
18
22
  EntrypointType
19
23
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/entrypoint.ts"],"sourcesContent":["import {Mode} from \"@typing/app\";\nimport {Browser} from \"@typing/browser\";\nimport {ManifestVersion} from \"@typing/manifest\";\n\nexport const EntrypointFileExtensions: ReadonlySet<string> = new Set([\"ts\", \"tsx\", \"js\", \"jsx\", \"vue\", \"svelte\"]);\n\nexport enum EntrypointType {\n Background = \"background\",\n Command = \"command\",\n ContentScript = \"content\",\n Page = \"page\",\n Service = \"service\",\n Relay = \"relay\",\n Options = \"options\",\n Popup = \"popup\",\n Sidebar = \"sidebar\",\n Offscreen = \"offscreen\",\n Sandbox = \"sandbox\",\n}\n\nexport interface EntrypointOptions {\n /**\n * List of target browsers to include this entrypoint in. Defaults to being included in all\n * builds.\n *\n * @default undefined\n */\n includeBrowser?: `${Browser}`[] | Browser[];\n\n /**\n * List of target browsers to exclude this entrypoint from.\n *\n * @default undefined\n */\n excludeBrowser?: `${Browser}`[] | Browser[];\n\n /**\n * List of target apps to include this entrypoint in. Defaults to being included in all builds.\n *\n * @default undefined\n */\n excludeApp?: string[];\n\n /**\n * List of target apps to exclude this entrypoint from.\n *\n * @default undefined\n */\n includeApp?: string[];\n\n /**\n * Build mode for filtering entry points. Entry point will be included only\n * if it matches the current build mode (Production or Development).\n *\n * @default undefined\n */\n mode?: `${Exclude<Mode, Mode.None>}` | Exclude<Mode, Mode.None>;\n\n /**\n * Manifest version constraint for this entry point. Entry point will be included\n * only if it matches the target manifest version.\n *\n * @default undefined\n */\n manifestVersion?: ManifestVersion;\n\n /**\n * Debug mode flag. If true, entry point will be included only when building\n * with DEBUG flag enabled.\n *\n * @default undefined\n */\n debug?: boolean;\n}\n\nexport interface EntrypointFile {\n file: string;\n import: string;\n external?: string;\n}\n\n/**\n * Dictionary of entrypoint for the build configuration.\n *\n * @key {string} - The name of the entrypoint that will be used in the bundler configuration.\n * @value {EntrypointFile[]} - Array of files that will be included in this entrypoint.\n * These files will be compiled and bundled together as part of the specified entrypoint.\n */\nexport type EntrypointEntries = Map<string, Set<EntrypointFile>>;\n\nexport interface EntrypointParser<O extends EntrypointOptions> {\n options(file: EntrypointFile): O;\n\n contract(file: EntrypointFile): string | undefined;\n}\n\nexport interface EntrypointFinder {\n files(): Promise<Set<EntrypointFile>>;\n\n empty(): Promise<boolean>;\n\n exists(): Promise<boolean>;\n\n clear(): this;\n\n holds(file: EntrypointFile): boolean;\n}\n\nexport interface EntrypointOptionsFinder<O extends EntrypointOptions> extends EntrypointFinder {\n type(): EntrypointType;\n\n options(): Promise<Map<EntrypointFile, O>>;\n\n contracts(): Promise<Map<EntrypointFile, string | undefined>>;\n}\n\nexport interface EntrypointNameGenerator {\n reserve(name: string): this;\n\n name(name: string): string;\n\n file(file: EntrypointFile): string;\n\n likely(name?: string): boolean;\n\n has(name: string): boolean;\n\n reset(): this;\n}\n\nexport interface EntrypointBuilder {\n build(): Promise<void>;\n\n destroy(): Promise<void>;\n}\n\nexport type EntrypointConstructorParameter<T> = T extends new (arg: infer P) => any ? P : never;\n"],"mappings":"AAIO,MAAM,2BAAgD,oBAAI,IAAI,CAAC,MAAM,OAAO,MAAM,OAAO,OAAO,QAAQ,CAAC;AAEzG,IAAK,iBAAL,kBAAKA,oBAAL;AACH,EAAAA,gBAAA,gBAAa;AACb,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,mBAAgB;AAChB,EAAAA,gBAAA,UAAO;AACP,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,WAAQ;AACR,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,WAAQ;AACR,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,eAAY;AACZ,EAAAA,gBAAA,aAAU;AAXF,SAAAA;AAAA,GAAA;","names":["EntrypointType"]}
1
+ {"version":3,"sources":["../../src/types/entrypoint.ts"],"sourcesContent":["import {Mode} from \"@typing/app\";\nimport {Browser} from \"@typing/browser\";\nimport {ManifestVersion} from \"@typing/manifest\";\n\nexport const EntrypointFileExtensions: ReadonlySet<string> = new Set([\"ts\", \"tsx\", \"js\", \"jsx\", \"vue\", \"svelte\"]);\n\nexport const EntrypointAssetsRuntimeProperty = \"__adnbnCurrentEntrypointAssets\";\nexport const EntrypointAssetsMapRuntimeProperty = \"__adnbnBuildAssets\";\n\nexport enum EntrypointType {\n Background = \"background\",\n Command = \"command\",\n ContentScript = \"content\",\n Page = \"page\",\n Service = \"service\",\n Relay = \"relay\",\n Options = \"options\",\n Popup = \"popup\",\n Sidebar = \"sidebar\",\n Offscreen = \"offscreen\",\n Sandbox = \"sandbox\",\n}\n\nexport interface EntrypointOptions {\n /**\n * List of target browsers to include this entrypoint in. Defaults to being included in all\n * builds.\n *\n * @default undefined\n */\n includeBrowser?: `${Browser}`[] | Browser[];\n\n /**\n * List of target browsers to exclude this entrypoint from.\n *\n * @default undefined\n */\n excludeBrowser?: `${Browser}`[] | Browser[];\n\n /**\n * List of target apps to include this entrypoint in. Defaults to being included in all builds.\n *\n * @default undefined\n */\n excludeApp?: string[];\n\n /**\n * List of target apps to exclude this entrypoint from.\n *\n * @default undefined\n */\n includeApp?: string[];\n\n /**\n * Build mode for filtering entry points. Entry point will be included only\n * if it matches the current build mode (Production or Development).\n *\n * @default undefined\n */\n mode?: `${Exclude<Mode, Mode.None>}` | Exclude<Mode, Mode.None>;\n\n /**\n * Manifest version constraint for this entry point. Entry point will be included\n * only if it matches the target manifest version.\n *\n * @default undefined\n */\n manifestVersion?: ManifestVersion;\n\n /**\n * Debug mode flag. If true, entry point will be included only when building\n * with DEBUG flag enabled.\n *\n * @default undefined\n */\n debug?: boolean;\n}\n\nexport interface EntrypointFile {\n file: string;\n import: string;\n external?: string;\n}\n\n/**\n * Dictionary of entrypoint for the build configuration.\n *\n * @key {string} - The name of the entrypoint that will be used in the bundler configuration.\n * @value {EntrypointFile[]} - Array of files that will be included in this entrypoint.\n * These files will be compiled and bundled together as part of the specified entrypoint.\n */\nexport type EntrypointEntries = Map<string, Set<EntrypointFile>>;\n\nexport interface EntrypointAssetsFiles {\n readonly js: readonly string[];\n readonly css: readonly string[];\n}\n\nexport interface EntrypointAssets {\n readonly initial: EntrypointAssetsFiles;\n readonly async: EntrypointAssetsFiles;\n}\n\nexport interface EntrypointAssetsMapEntry extends EntrypointAssets {\n readonly assets: readonly string[];\n}\n\nexport type EntrypointAssetsMap = Readonly<Record<string, EntrypointAssetsMapEntry>>;\n\nexport interface EntrypointParser<O extends EntrypointOptions> {\n options(file: EntrypointFile): O;\n\n contract(file: EntrypointFile): string | undefined;\n}\n\nexport interface EntrypointFinder {\n files(): Promise<Set<EntrypointFile>>;\n\n empty(): Promise<boolean>;\n\n exists(): Promise<boolean>;\n\n clear(): this;\n\n /**\n * Determines if the specified file exists within the current set of files.\n *\n * @param {EntrypointFile} file - The file to be checked for existence in the set of files.\n * @return {boolean} Returns true if the file exists in the set, otherwise false.\n */\n holds(file: EntrypointFile): boolean;\n}\n\nexport interface EntrypointOptionsFinder<O extends EntrypointOptions> extends EntrypointFinder {\n type(): EntrypointType;\n\n options(): Promise<Map<EntrypointFile, O>>;\n\n contracts(): Promise<Map<EntrypointFile, string | undefined>>;\n}\n\nexport interface EntrypointNameGenerator {\n reserve(name: string): this;\n\n name(name: string): string;\n\n file(file: EntrypointFile): string;\n\n likely(name?: string): boolean;\n\n has(name: string): boolean;\n\n reset(): this;\n}\n\nexport interface EntrypointBuilder {\n build(): Promise<void>;\n\n destroy(): Promise<void>;\n}\n\nexport type EntrypointConstructorParameter<T> = T extends new (arg: infer P) => any ? P : never;\n"],"mappings":"AAIO,MAAM,2BAAgD,oBAAI,IAAI,CAAC,MAAM,OAAO,MAAM,OAAO,OAAO,QAAQ,CAAC;AAEzG,MAAM,kCAAkC;AACxC,MAAM,qCAAqC;AAE3C,IAAK,iBAAL,kBAAKA,oBAAL;AACH,EAAAA,gBAAA,gBAAa;AACb,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,mBAAgB;AAChB,EAAAA,gBAAA,UAAO;AACP,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,WAAQ;AACR,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,WAAQ;AACR,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,eAAY;AACZ,EAAAA,gBAAA,aAAU;AAXF,SAAAA;AAAA,GAAA;","names":["EntrypointType"]}
@@ -1,3 +1,11 @@
1
1
  export declare const DefaultIconGroupName = "default";
2
2
  export declare const IconFileExtensions: ReadonlySet<string>;
3
3
  export declare const IconSizes: ReadonlySet<number>;
4
+ /**
5
+ * Empty because icon group names depend on the consuming application's icon files.
6
+ * Generated `.adnbn/icon.d.ts` declarations augment `adnbn`, adding discovered names as keys with value `true`.
7
+ */
8
+ export interface IconNameRegistry {
9
+ }
10
+ export type IconName = keyof IconNameRegistry extends never ? string : Extract<keyof IconNameRegistry, string>;
11
+ export type IconsMap = Map<IconName, Record<number, string>>;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/icon.ts"],"sourcesContent":["export const DefaultIconGroupName = \"default\";\n\nexport const IconFileExtensions: ReadonlySet<string> = new Set([\"png\"]);\n\nexport const IconSizes: ReadonlySet<number> = new Set([16, 32, 48, 64, 128, 256, 512]);\n"],"mappings":"AAAO,MAAM,uBAAuB;AAE7B,MAAM,qBAA0C,oBAAI,IAAI,CAAC,KAAK,CAAC;AAE/D,MAAM,YAAiC,oBAAI,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,KAAK,KAAK,GAAG,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../src/types/icon.ts"],"sourcesContent":["export const DefaultIconGroupName = \"default\";\n\nexport const IconFileExtensions: ReadonlySet<string> = new Set([\"png\"]);\n\nexport const IconSizes: ReadonlySet<number> = new Set([16, 32, 48, 64, 128, 256, 512]);\n\n/**\n * Empty because icon group names depend on the consuming application's icon files.\n * Generated `.adnbn/icon.d.ts` declarations augment `adnbn`, adding discovered names as keys with value `true`.\n */\nexport interface IconNameRegistry {}\n\nexport type IconName = keyof IconNameRegistry extends never ? string : Extract<keyof IconNameRegistry, string>;\n\nexport type IconsMap = Map<IconName, Record<number, string>>;\n"],"mappings":"AAAO,MAAM,uBAAuB;AAE7B,MAAM,qBAA0C,oBAAI,IAAI,CAAC,KAAK,CAAC;AAE/D,MAAM,YAAiC,oBAAI,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,KAAK,KAAK,GAAG,CAAC;","names":[]}
@@ -0,0 +1,57 @@
1
+ export declare enum Language {
2
+ Arabic = "ar",
3
+ Amharic = "am",
4
+ Bulgarian = "bg",
5
+ Bengali = "bn",
6
+ Catalan = "ca",
7
+ Czech = "cs",
8
+ Danish = "da",
9
+ German = "de",
10
+ Greek = "el",
11
+ English = "en",
12
+ EnglishAustralia = "en_AU",
13
+ EnglishGreatBritain = "en_GB",
14
+ EnglishUSA = "en_US",
15
+ Spanish = "es",
16
+ SpanishLatinAmericaAndCaribbean = "es_419",
17
+ Estonian = "et",
18
+ Persian = "fa",
19
+ Finnish = "fi",
20
+ Filipino = "fil",
21
+ French = "fr",
22
+ Gujarati = "gu",
23
+ Hebrew = "he",
24
+ Hindi = "hi",
25
+ Croatian = "hr",
26
+ Hungarian = "hu",
27
+ Indonesian = "id",
28
+ Italian = "it",
29
+ Japanese = "ja",
30
+ Kannada = "kn",
31
+ Korean = "ko",
32
+ Lithuanian = "lt",
33
+ Latvian = "lv",
34
+ Malayalam = "ml",
35
+ Marathi = "mr",
36
+ Malay = "ms",
37
+ Dutch = "nl",
38
+ Norwegian = "no",
39
+ Polish = "pl",
40
+ PortugueseBrazil = "pt_BR",
41
+ PortuguesePortugal = "pt_PT",
42
+ Romanian = "ro",
43
+ Russian = "ru",
44
+ Slovak = "sk",
45
+ Slovenian = "sl",
46
+ Serbian = "sr",
47
+ Swedish = "sv",
48
+ Swahili = "sw",
49
+ Tamil = "ta",
50
+ Telugu = "te",
51
+ Thai = "th",
52
+ Turkish = "tr",
53
+ Ukrainian = "uk",
54
+ Vietnamese = "vi",
55
+ ChineseChina = "zh_CN",
56
+ ChineseTaiwan = "zh_TW"
57
+ }