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,9 +1,3 @@
1
- // Only placeholders belong here; real adnbn imports resolve to their source modules via tsconfig.json.
2
- declare module "*?raw" {
3
- const content: string;
4
- export default content;
5
- }
6
-
7
1
  declare module "virtual:background-entrypoint" {
8
2
  type BackgroundDefinition = import("../../types/background.js").BackgroundDefinition;
9
3
 
@@ -27,9 +21,10 @@ declare module "virtual:command-entrypoint" {
27
21
  }
28
22
 
29
23
  declare module "virtual:content-entrypoint" {
30
- type ContentScriptDefinition = import("../../types/content.js").ContentScriptDefinition;
24
+ type ContentScriptDefinition = import("../../types/content/index.js").ContentScriptDefinition;
31
25
 
32
- interface ModuleType extends ContentScriptDefinition {
26
+ interface ModuleType {
27
+ [name: string]: unknown;
33
28
  default: ContentScriptDefinition | ContentScriptDefinition["render"] | undefined;
34
29
  }
35
30
 
@@ -37,14 +32,18 @@ declare module "virtual:content-entrypoint" {
37
32
  export = module;
38
33
  }
39
34
 
40
- declare module "virtual:content-framework" {
35
+ declare module "virtual:content-builder" {
36
+ export const resolveDefinition: (module: object) => import("../../types/content/index.js").ContentScriptDefinition;
37
+
41
38
  export const Builder:
42
39
  | typeof import("../../entry/content/adapters/vanilla/index.js").Builder
43
- | typeof import("../../entry/content/adapters/react/index.js").Builder;
40
+ | typeof import("../../entry/content/adapters/react/index.js").Builder
41
+ | typeof import("../../entry/content/index.js").Builder;
44
42
 
45
43
  const content:
46
44
  | typeof import("../../entry/content/adapters/vanilla/index.js").default
47
- | typeof import("../../entry/content/adapters/react/index.js").default;
45
+ | typeof import("../../entry/content/adapters/react/index.js").default
46
+ | typeof import("../../entry/content/index.js").default;
48
47
  export default content;
49
48
  }
50
49
 
@@ -69,6 +68,7 @@ declare module "virtual:relay-entrypoint" {
69
68
  main,
70
69
  name,
71
70
  method,
71
+ isolation,
72
72
  allFrames,
73
73
  matches,
74
74
  excludeMatches,
@@ -82,8 +82,11 @@ declare module "virtual:relay-entrypoint" {
82
82
  marker,
83
83
  anchor,
84
84
  mount,
85
+ prepare,
85
86
  render,
86
87
  container,
88
+ boundary,
89
+ target,
87
90
  watch,
88
91
  includeBrowser,
89
92
  excludeBrowser,
@@ -0,0 +1,3 @@
1
+ export { createMutationObserverStrategy, createAwaitFirstStrategy } from "../entry/content/resolvers/watch.js";
2
+ export { ContentScriptEvent } from "../types/content/index.js";
3
+ export type { ContentScriptWatchStrategy, ContentScriptContext, ContentScriptEventCallback, ContentScriptNode, } from "../types/content/index.js";
@@ -0,0 +1,8 @@
1
+ import { createMutationObserverStrategy, createAwaitFirstStrategy } from "./../entry/content/resolvers/watch.js";
2
+ import { ContentScriptEvent } from "./../types/content/index.js";
3
+ export {
4
+ ContentScriptEvent,
5
+ createAwaitFirstStrategy,
6
+ createMutationObserverStrategy
7
+ };
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/content/index.ts"],"sourcesContent":["export {createMutationObserverStrategy, createAwaitFirstStrategy} from \"@entry/content/resolvers/watch\";\n\nexport {ContentScriptEvent} from \"@typing/content\";\nexport type {\n ContentScriptWatchStrategy,\n ContentScriptContext,\n ContentScriptEventCallback,\n ContentScriptNode,\n} from \"@typing/content\";\n"],"mappings":"AAAA,SAAQ,gCAAgC,gCAA+B;AAEvE,SAAQ,0BAAyB;","names":[]}
@@ -1,7 +1,6 @@
1
- import MountBuilder from "../../core/MountBuilder.js";
2
- import { ContentScriptDefinition, ContentScriptNode, ContentScriptRenderHandler, ContentScriptRenderValue } from "../../../../types/content.js";
3
- export default class extends MountBuilder {
4
- constructor(definition: ContentScriptDefinition);
5
- protected resolveRender(render?: ContentScriptRenderValue): ContentScriptRenderHandler | undefined;
6
- protected createNode(anchor: Element): Promise<ContentScriptNode>;
1
+ import MountBuilder from "../../lifecycle/MountBuilder.js";
2
+ import type { ContentScriptNode, ContentScriptIsolation, ContentScriptProps, ContentScriptRenderHandler, ContentScriptRenderValue } from "../../../../types/content/index.js";
3
+ export default class Builder<Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> extends MountBuilder<Data, Isolation> {
4
+ protected resolveRender(render?: ContentScriptRenderValue<Data> | ContentScriptRenderHandler<Data>): ContentScriptRenderHandler<Data> | undefined;
5
+ protected createRenderer(node: ContentScriptNode, render: ContentScriptRenderHandler<Data>, props: () => ContentScriptProps<Data>): ContentScriptNode;
7
6
  }
@@ -1,28 +1,15 @@
1
- import { isValidElement } from "react";
2
- import MountBuilder from "../../core/MountBuilder.js";
3
- import EventNode from "../../core/EventNode.js";
4
- import ReactNode from "./Node.js";
5
- import { contentScriptReactRenderResolver } from "./resolvers/index.js";
6
- class Builder_default extends MountBuilder {
7
- constructor(definition) {
8
- super(definition);
9
- }
1
+ import MountBuilder from "../../lifecycle/MountBuilder.js";
2
+ import RenderNode from "./Node.js";
3
+ import { createRenderResolver } from "./resolvers/render.js";
4
+ class Builder extends MountBuilder {
10
5
  resolveRender(render) {
11
- if (render === void 0) {
12
- return;
13
- }
14
- return contentScriptReactRenderResolver(render);
6
+ return render === void 0 ? void 0 : createRenderResolver(render);
15
7
  }
16
- async createNode(anchor) {
17
- let value = await this.getValue(anchor);
18
- if (!isValidElement(value)) {
19
- value = void 0;
20
- console.warn("Content script react value is not a valid React element");
21
- }
22
- return new EventNode(new ReactNode(await super.createNode(anchor), value), this.emitter);
8
+ createRenderer(node, render, props) {
9
+ return new RenderNode(node, render, props);
23
10
  }
24
11
  }
25
12
  export {
26
- Builder_default as default
13
+ Builder as default
27
14
  };
28
15
  //# sourceMappingURL=Builder.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/entry/content/adapters/react/Builder.ts"],"sourcesContent":["import {isValidElement} from \"react\";\n\nimport MountBuilder from \"../../core/MountBuilder\";\nimport EventNode from \"../../core/EventNode\";\nimport ReactNode from \"./Node\";\n\nimport {contentScriptReactRenderResolver} from \"./resolvers\";\n\nimport {\n ContentScriptDefinition,\n ContentScriptNode,\n ContentScriptRenderHandler,\n ContentScriptRenderValue,\n} from \"@typing/content\";\n\nexport default class extends MountBuilder {\n constructor(definition: ContentScriptDefinition) {\n super(definition);\n }\n\n protected resolveRender(render?: ContentScriptRenderValue): ContentScriptRenderHandler | undefined {\n if (render === undefined) {\n return;\n }\n\n return contentScriptReactRenderResolver(render);\n }\n\n protected async createNode(anchor: Element): Promise<ContentScriptNode> {\n let value = await this.getValue(anchor);\n\n if (!isValidElement(value)) {\n value = undefined;\n\n console.warn(\"Content script react value is not a valid React element\");\n }\n\n return new EventNode(new ReactNode(await super.createNode(anchor), value), this.emitter);\n }\n}\n"],"mappings":"AAAA,SAAQ,sBAAqB;AAE7B,OAAO,kBAAkB;AACzB,OAAO,eAAe;AACtB,OAAO,eAAe;AAEtB,SAAQ,wCAAuC;AAS/C,MAAO,wBAAsB,aAAa;AAAA,EACtC,YAAY,YAAqC;AAC7C,UAAM,UAAU;AAAA,EACpB;AAAA,EAEU,cAAc,QAA2E;AAC/F,QAAI,WAAW,QAAW;AACtB;AAAA,IACJ;AAEA,WAAO,iCAAiC,MAAM;AAAA,EAClD;AAAA,EAEA,MAAgB,WAAW,QAA6C;AACpE,QAAI,QAAQ,MAAM,KAAK,SAAS,MAAM;AAEtC,QAAI,CAAC,eAAe,KAAK,GAAG;AACxB,cAAQ;AAER,cAAQ,KAAK,yDAAyD;AAAA,IAC1E;AAEA,WAAO,IAAI,UAAU,IAAI,UAAU,MAAM,MAAM,WAAW,MAAM,GAAG,KAAK,GAAG,KAAK,OAAO;AAAA,EAC3F;AACJ;","names":[]}
1
+ {"version":3,"sources":["../../../../../src/entry/content/adapters/react/Builder.ts"],"sourcesContent":["import MountBuilder from \"../../lifecycle/MountBuilder\";\nimport RenderNode from \"./Node\";\nimport {createRenderResolver} from \"./resolvers/render\";\n\nimport type {\n ContentScriptNode,\n ContentScriptIsolation,\n ContentScriptProps,\n ContentScriptRenderHandler,\n ContentScriptRenderValue,\n} from \"@typing/content\";\n\nexport default class Builder<\n Data = unknown,\n Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`,\n> extends MountBuilder<Data, Isolation> {\n protected resolveRender(\n render?: ContentScriptRenderValue<Data> | ContentScriptRenderHandler<Data>\n ): ContentScriptRenderHandler<Data> | undefined {\n return render === undefined ? undefined : createRenderResolver(render);\n }\n\n protected createRenderer(\n node: ContentScriptNode,\n render: ContentScriptRenderHandler<Data>,\n props: () => ContentScriptProps<Data>\n ): ContentScriptNode {\n return new RenderNode(node, render, props);\n }\n}\n"],"mappings":"AAAA,OAAO,kBAAkB;AACzB,OAAO,gBAAgB;AACvB,SAAQ,4BAA2B;AAUnC,MAAO,gBAGG,aAA8B;AAAA,EAC1B,cACN,QAC4C;AAC5C,WAAO,WAAW,SAAY,SAAY,qBAAqB,MAAM;AAAA,EACzE;AAAA,EAEU,eACN,MACA,QACA,OACiB;AACjB,WAAO,IAAI,WAAW,MAAM,QAAQ,KAAK;AAAA,EAC7C;AACJ;","names":[]}
@@ -1,13 +1,7 @@
1
- import { ReactNode as ReactComponent } from "react";
2
- import { Root } from "react-dom/client";
3
- import { ContentScriptNode } from "../../../../types/content.js";
4
- export default class implements ContentScriptNode {
5
- protected readonly node: ContentScriptNode;
6
- protected readonly component?: ReactComponent;
7
- protected root?: Root;
8
- constructor(node: ContentScriptNode, component?: ReactComponent);
9
- get anchor(): Element;
10
- get container(): Element | undefined;
11
- mount(): boolean;
12
- unmount(): boolean;
1
+ import { RenderNode } from "../../lifecycle/nodes/index.js";
2
+ import type { ContentScriptRenderValue } from "../../../../types/content/index.js";
3
+ export default class Node<Data = unknown> extends RenderNode<Data> {
4
+ private root?;
5
+ protected render(value: ContentScriptRenderValue<Data> | undefined, target: Element): boolean;
6
+ protected clear(): void;
13
7
  }
@@ -1,39 +1,23 @@
1
+ import { isValidElement } from "react";
1
2
  import { createRoot } from "react-dom/client";
2
- class Node_default {
3
- constructor(node, component) {
4
- this.node = node;
5
- this.component = component;
6
- }
7
- node;
8
- component;
3
+ import { RenderNode } from "../../lifecycle/nodes/index.js";
4
+ class Node extends RenderNode {
9
5
  root;
10
- get anchor() {
11
- return this.node.anchor;
12
- }
13
- get container() {
14
- return this.node.container;
15
- }
16
- mount() {
17
- this.node.mount();
18
- if (!this.container || this.root) {
19
- return false;
20
- }
21
- if (!this.component) {
22
- console.warn("Content script react component is empty");
6
+ render(value, target) {
7
+ if (!isValidElement(value)) {
23
8
  return false;
24
9
  }
25
- this.root = createRoot(this.container);
26
- this.root.render(this.component);
10
+ this.root = createRoot(target);
11
+ this.root.render(value);
27
12
  return true;
28
13
  }
29
- unmount() {
14
+ clear() {
30
15
  var _a;
31
16
  (_a = this.root) == null ? void 0 : _a.unmount();
32
17
  this.root = void 0;
33
- return !!this.node.unmount();
34
18
  }
35
19
  }
36
20
  export {
37
- Node_default as default
21
+ Node as default
38
22
  };
39
23
  //# sourceMappingURL=Node.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/entry/content/adapters/react/Node.ts"],"sourcesContent":["import {ReactNode as ReactComponent} from \"react\";\nimport {createRoot, Root} from \"react-dom/client\";\n\nimport {ContentScriptNode} from \"@typing/content\";\n\nexport default class implements ContentScriptNode {\n protected root?: Root;\n\n constructor(\n protected readonly node: ContentScriptNode,\n protected readonly component?: ReactComponent\n ) {}\n\n public get anchor(): Element {\n return this.node.anchor;\n }\n\n public get container(): Element | undefined {\n return this.node.container;\n }\n\n public mount(): boolean {\n this.node.mount();\n\n if (!this.container || this.root) {\n return false;\n }\n\n if (!this.component) {\n console.warn(\"Content script react component is empty\");\n\n return false;\n }\n\n this.root = createRoot(this.container);\n\n this.root.render(this.component);\n\n return true;\n }\n\n public unmount(): boolean {\n this.root?.unmount();\n this.root = undefined;\n\n return !!this.node.unmount();\n }\n}\n"],"mappings":"AACA,SAAQ,kBAAuB;AAI/B,MAAO,aAA2C;AAAA,EAG9C,YACuB,MACA,WACrB;AAFqB;AACA;AAAA,EACpB;AAAA,EAFoB;AAAA,EACA;AAAA,EAJb;AAAA,EAOV,IAAW,SAAkB;AACzB,WAAO,KAAK,KAAK;AAAA,EACrB;AAAA,EAEA,IAAW,YAAiC;AACxC,WAAO,KAAK,KAAK;AAAA,EACrB;AAAA,EAEO,QAAiB;AACpB,SAAK,KAAK,MAAM;AAEhB,QAAI,CAAC,KAAK,aAAa,KAAK,MAAM;AAC9B,aAAO;AAAA,IACX;AAEA,QAAI,CAAC,KAAK,WAAW;AACjB,cAAQ,KAAK,yCAAyC;AAEtD,aAAO;AAAA,IACX;AAEA,SAAK,OAAO,WAAW,KAAK,SAAS;AAErC,SAAK,KAAK,OAAO,KAAK,SAAS;AAE/B,WAAO;AAAA,EACX;AAAA,EAEO,UAAmB;AAzC9B;AA0CQ,eAAK,SAAL,mBAAW;AACX,SAAK,OAAO;AAEZ,WAAO,CAAC,CAAC,KAAK,KAAK,QAAQ;AAAA,EAC/B;AACJ;","names":[]}
1
+ {"version":3,"sources":["../../../../../src/entry/content/adapters/react/Node.ts"],"sourcesContent":["import {isValidElement} from \"react\";\nimport {createRoot, type Root} from \"react-dom/client\";\n\nimport {RenderNode} from \"../../lifecycle/nodes\";\n\nimport type {ContentScriptRenderValue} from \"@typing/content\";\n\nexport default class Node<Data = unknown> extends RenderNode<Data> {\n private root?: Root;\n\n protected render(value: ContentScriptRenderValue<Data> | undefined, target: Element): boolean {\n if (!isValidElement(value)) {\n return false;\n }\n\n this.root = createRoot(target);\n this.root.render(value);\n\n return true;\n }\n\n protected clear(): void {\n this.root?.unmount();\n this.root = undefined;\n }\n}\n"],"mappings":"AAAA,SAAQ,sBAAqB;AAC7B,SAAQ,kBAA4B;AAEpC,SAAQ,kBAAiB;AAIzB,MAAO,aAA2C,WAAiB;AAAA,EACvD;AAAA,EAEE,OAAO,OAAmD,QAA0B;AAC1F,QAAI,CAAC,eAAe,KAAK,GAAG;AACxB,aAAO;AAAA,IACX;AAEA,SAAK,OAAO,WAAW,MAAM;AAC7B,SAAK,KAAK,OAAO,KAAK;AAEtB,WAAO;AAAA,EACX;AAAA,EAEU,QAAc;AArB5B;AAsBQ,eAAK,SAAL,mBAAW;AACX,SAAK,OAAO;AAAA,EAChB;AACJ;","names":[]}
@@ -1,4 +1,5 @@
1
1
  import Builder from "./Builder.js";
2
2
  export { Builder };
3
- declare const _default: (definition: import("../../../../index.js").ContentScriptDefinition) => void;
3
+ export { resolveDefinition } from "./resolvers/definition.js";
4
+ declare const _default: (definition: import("../../../../index.js").ContentScriptDefinition<unknown, "none" | "shadow" | "iframe">) => void;
4
5
  export default _default;
@@ -1,7 +1,9 @@
1
1
  import Builder from "./Builder.js";
2
+ import { resolveDefinition } from "./resolvers/definition.js";
2
3
  var react_default = Builder.resolver();
3
4
  export {
4
5
  Builder,
5
- react_default as default
6
+ react_default as default,
7
+ resolveDefinition
6
8
  };
7
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/entry/content/adapters/react/index.ts"],"sourcesContent":["import Builder from \"./Builder\";\n\nexport {Builder};\n\nexport default Builder.resolver();\n"],"mappings":"AAAA,OAAO,aAAa;AAIpB,IAAO,gBAAQ,QAAQ,SAAS;","names":[]}
1
+ {"version":3,"sources":["../../../../../src/entry/content/adapters/react/index.ts"],"sourcesContent":["import Builder from \"./Builder\";\n\nexport {Builder};\nexport {resolveDefinition} from \"./resolvers/definition\";\n\nexport default Builder.resolver();\n"],"mappings":"AAAA,OAAO,aAAa;AAGpB,SAAQ,yBAAwB;AAEhC,IAAO,gBAAQ,QAAQ,SAAS;","names":[]}
@@ -0,0 +1,2 @@
1
+ import type { ContentScriptDefinition } from "../../../../../types/content/index.js";
2
+ export declare const resolveDefinition: (module: object) => ContentScriptDefinition;
@@ -0,0 +1,12 @@
1
+ import { isValidElement } from "react";
2
+ import { mergeDefinition } from "../../../resolvers/definition.js";
3
+ const resolveDefinition = (module) => {
4
+ return mergeDefinition(
5
+ module,
6
+ (value) => typeof value === "function" || isValidElement(value) || typeof value === "number" || typeof value === "string" && value.length > 0 || value instanceof Element
7
+ );
8
+ };
9
+ export {
10
+ resolveDefinition
11
+ };
12
+ //# sourceMappingURL=definition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/entry/content/adapters/react/resolvers/definition.ts"],"sourcesContent":["import {isValidElement} from \"react\";\nimport {mergeDefinition} from \"../../../resolvers/definition\";\n\nimport type {ContentScriptDefinition} from \"@typing/content\";\n\nexport const resolveDefinition = (module: object): ContentScriptDefinition => {\n return mergeDefinition(\n module,\n value =>\n typeof value === \"function\" ||\n isValidElement(value) ||\n typeof value === \"number\" ||\n (typeof value === \"string\" && value.length > 0) ||\n value instanceof Element\n );\n};\n"],"mappings":"AAAA,SAAQ,sBAAqB;AAC7B,SAAQ,uBAAsB;AAIvB,MAAM,oBAAoB,CAAC,WAA4C;AAC1E,SAAO;AAAA,IACH;AAAA,IACA,WACI,OAAO,UAAU,cACjB,eAAe,KAAK,KACpB,OAAO,UAAU,YAChB,OAAO,UAAU,YAAY,MAAM,SAAS,KAC7C,iBAAiB;AAAA,EACzB;AACJ;","names":[]}
@@ -1,2 +1,2 @@
1
- import { ContentScriptRenderHandler, ContentScriptRenderValue } from "../../../../../types/content.js";
2
- export declare const contentScriptReactRenderResolver: (render?: ContentScriptRenderValue) => ContentScriptRenderHandler;
1
+ import type { ContentScriptRenderHandler, ContentScriptRenderValue } from "../../../../../types/content/index.js";
2
+ export declare const createRenderResolver: <Data = unknown>(render?: ContentScriptRenderValue<Data> | ContentScriptRenderHandler<Data>) => ContentScriptRenderHandler<Data>;
@@ -1,11 +1,9 @@
1
1
  import { createElement, isValidElement } from "react";
2
- const contentScriptReactRenderResolver = (render) => async (props) => {
3
- let resolvedRender = typeof render === "function" ? createElement(render, props) : render;
4
- if (isValidElement(resolvedRender)) {
5
- return resolvedRender;
6
- }
2
+ const createRenderResolver = (render) => (props) => {
3
+ const value = typeof render === "function" ? createElement(render, props) : render;
4
+ return isValidElement(value) ? value : void 0;
7
5
  };
8
6
  export {
9
- contentScriptReactRenderResolver
7
+ createRenderResolver
10
8
  };
11
9
  //# sourceMappingURL=render.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/entry/content/adapters/react/resolvers/render.ts"],"sourcesContent":["import {createElement, isValidElement} from \"react\";\n\nimport {ContentScriptRenderHandler, ContentScriptRenderValue} from \"@typing/content\";\n\nexport const contentScriptReactRenderResolver =\n (render?: ContentScriptRenderValue): ContentScriptRenderHandler =>\n async (props): Promise<undefined | ContentScriptRenderValue> => {\n let resolvedRender = typeof render === \"function\" ? createElement(render, props) : render;\n\n if (isValidElement(resolvedRender)) {\n return resolvedRender;\n }\n };\n"],"mappings":"AAAA,SAAQ,eAAe,sBAAqB;AAIrC,MAAM,mCACT,CAAC,WACD,OAAO,UAAyD;AAC5D,MAAI,iBAAiB,OAAO,WAAW,aAAa,cAAc,QAAQ,KAAK,IAAI;AAEnF,MAAI,eAAe,cAAc,GAAG;AAChC,WAAO;AAAA,EACX;AACJ;","names":[]}
1
+ {"version":3,"sources":["../../../../../../src/entry/content/adapters/react/resolvers/render.ts"],"sourcesContent":["import {createElement, isValidElement} from \"react\";\n\nimport type {\n ContentScriptRenderHandler,\n ContentScriptRenderValue,\n ContentScriptRenderReactComponent,\n} from \"@typing/content\";\n\nexport const createRenderResolver =\n <Data = unknown>(\n render?: ContentScriptRenderValue<Data> | ContentScriptRenderHandler<Data>\n ): ContentScriptRenderHandler<Data> =>\n props => {\n // Functions in React entrypoints are components; React owns their invocation and hooks.\n const value =\n typeof render === \"function\"\n ? createElement(render as ContentScriptRenderReactComponent<Data>, props)\n : render;\n\n return isValidElement(value) ? value : undefined;\n };\n"],"mappings":"AAAA,SAAQ,eAAe,sBAAqB;AAQrC,MAAM,uBACT,CACI,WAEJ,WAAS;AAEL,QAAM,QACF,OAAO,WAAW,aACZ,cAAc,QAAmD,KAAK,IACtE;AAEV,SAAO,eAAe,KAAK,IAAI,QAAQ;AAC3C;","names":[]}
@@ -1,6 +1,6 @@
1
- import MountBuilder from "../../core/MountBuilder.js";
2
- import { ContentScriptDefinition, ContentScriptNode } from "../../../../types/content.js";
3
- export default class extends MountBuilder {
4
- constructor(definition: ContentScriptDefinition);
5
- protected createNode(anchor: Element): Promise<ContentScriptNode>;
1
+ import MountBuilder from "../../lifecycle/MountBuilder.js";
2
+ import type { ContentScriptNode, ContentScriptIsolation, ContentScriptProps, ContentScriptRenderHandler, ContentScriptRenderValue } from "../../../../types/content/index.js";
3
+ export default class Builder<Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> extends MountBuilder<Data, Isolation> {
4
+ protected resolveRender(render?: ContentScriptRenderValue<Data> | ContentScriptRenderHandler<Data>): ContentScriptRenderHandler<Data> | undefined;
5
+ protected createRenderer(node: ContentScriptNode, render: ContentScriptRenderHandler<Data>, props: () => ContentScriptProps<Data>): ContentScriptNode;
6
6
  }
@@ -1,21 +1,15 @@
1
- import { isValidContentScriptRenderValue } from "../../core/resolvers/index.js";
2
- import MountBuilder from "../../core/MountBuilder.js";
3
- import EventNode from "../../core/EventNode.js";
4
- import VanillaNode from "./Node.js";
5
- class Builder_default extends MountBuilder {
6
- constructor(definition) {
7
- super(definition);
1
+ import MountBuilder from "../../lifecycle/MountBuilder.js";
2
+ import RenderNode from "./Node.js";
3
+ import { createRenderResolver } from "./resolvers/render.js";
4
+ class Builder extends MountBuilder {
5
+ resolveRender(render) {
6
+ return render === void 0 ? void 0 : createRenderResolver(render);
8
7
  }
9
- async createNode(anchor) {
10
- let value = await this.getValue(anchor);
11
- if (value !== true && !isValidContentScriptRenderValue(value)) {
12
- value = void 0;
13
- console.warn("Content script vanilla value is not a valid render value");
14
- }
15
- return new EventNode(new VanillaNode(await super.createNode(anchor), value), this.emitter);
8
+ createRenderer(node, render, props) {
9
+ return new RenderNode(node, render, props);
16
10
  }
17
11
  }
18
12
  export {
19
- Builder_default as default
13
+ Builder as default
20
14
  };
21
15
  //# sourceMappingURL=Builder.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/entry/content/adapters/vanilla/Builder.ts"],"sourcesContent":["import {isValidContentScriptRenderValue} from \"../../core/resolvers\";\n\nimport MountBuilder from \"../../core/MountBuilder\";\nimport EventNode from \"../../core/EventNode\";\nimport VanillaNode from \"./Node\";\n\nimport {ContentScriptDefinition, ContentScriptNode} from \"@typing/content\";\n\nexport default class extends MountBuilder {\n public constructor(definition: ContentScriptDefinition) {\n super(definition);\n }\n\n protected async createNode(anchor: Element): Promise<ContentScriptNode> {\n let value = await this.getValue(anchor);\n\n if (value !== true && !isValidContentScriptRenderValue(value)) {\n value = undefined;\n\n console.warn(\"Content script vanilla value is not a valid render value\");\n }\n\n return new EventNode(new VanillaNode(await super.createNode(anchor), value), this.emitter);\n }\n}\n"],"mappings":"AAAA,SAAQ,uCAAsC;AAE9C,OAAO,kBAAkB;AACzB,OAAO,eAAe;AACtB,OAAO,iBAAiB;AAIxB,MAAO,wBAAsB,aAAa;AAAA,EAC/B,YAAY,YAAqC;AACpD,UAAM,UAAU;AAAA,EACpB;AAAA,EAEA,MAAgB,WAAW,QAA6C;AACpE,QAAI,QAAQ,MAAM,KAAK,SAAS,MAAM;AAEtC,QAAI,UAAU,QAAQ,CAAC,gCAAgC,KAAK,GAAG;AAC3D,cAAQ;AAER,cAAQ,KAAK,0DAA0D;AAAA,IAC3E;AAEA,WAAO,IAAI,UAAU,IAAI,YAAY,MAAM,MAAM,WAAW,MAAM,GAAG,KAAK,GAAG,KAAK,OAAO;AAAA,EAC7F;AACJ;","names":[]}
1
+ {"version":3,"sources":["../../../../../src/entry/content/adapters/vanilla/Builder.ts"],"sourcesContent":["import MountBuilder from \"../../lifecycle/MountBuilder\";\nimport RenderNode from \"./Node\";\nimport {createRenderResolver} from \"./resolvers/render\";\n\nimport type {\n ContentScriptNode,\n ContentScriptIsolation,\n ContentScriptProps,\n ContentScriptRenderHandler,\n ContentScriptRenderValue,\n} from \"@typing/content\";\n\nexport default class Builder<\n Data = unknown,\n Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`,\n> extends MountBuilder<Data, Isolation> {\n protected resolveRender(\n render?: ContentScriptRenderValue<Data> | ContentScriptRenderHandler<Data>\n ): ContentScriptRenderHandler<Data> | undefined {\n return render === undefined ? undefined : createRenderResolver(render);\n }\n\n protected createRenderer(\n node: ContentScriptNode,\n render: ContentScriptRenderHandler<Data>,\n props: () => ContentScriptProps<Data>\n ): ContentScriptNode {\n return new RenderNode(node, render, props);\n }\n}\n"],"mappings":"AAAA,OAAO,kBAAkB;AACzB,OAAO,gBAAgB;AACvB,SAAQ,4BAA2B;AAUnC,MAAO,gBAGG,aAA8B;AAAA,EAC1B,cACN,QAC4C;AAC5C,WAAO,WAAW,SAAY,SAAY,qBAAqB,MAAM;AAAA,EACzE;AAAA,EAEU,eACN,MACA,QACA,OACiB;AACjB,WAAO,IAAI,WAAW,MAAM,QAAQ,KAAK;AAAA,EAC7C;AACJ;","names":[]}
@@ -1,11 +1,6 @@
1
- import { ContentScriptNode } from "../../../../types/content.js";
2
- export default class implements ContentScriptNode {
3
- protected readonly node: ContentScriptNode;
4
- protected readonly value?: (null | boolean | string | number | Element) | undefined;
5
- private mounted;
6
- constructor(node: ContentScriptNode, value?: (null | boolean | string | number | Element) | undefined);
7
- get anchor(): Element;
8
- get container(): Element | undefined;
9
- mount(): boolean;
10
- unmount(): boolean;
1
+ import { RenderNode } from "../../lifecycle/nodes/index.js";
2
+ import type { ContentScriptRenderValue } from "../../../../types/content/index.js";
3
+ export default class Node<Data = unknown> extends RenderNode<Data> {
4
+ protected render(value: ContentScriptRenderValue<Data> | undefined, target: Element): boolean;
5
+ protected clear(): void;
11
6
  }
@@ -1,42 +1,19 @@
1
- class Node_default {
2
- constructor(node, value) {
3
- this.node = node;
4
- this.value = value;
5
- }
6
- node;
7
- value;
8
- mounted = false;
9
- get anchor() {
10
- return this.node.anchor;
11
- }
12
- get container() {
13
- return this.node.container;
14
- }
15
- mount() {
16
- this.node.mount();
17
- if (!this.container || this.mounted) {
1
+ import { RenderNode } from "../../lifecycle/nodes/index.js";
2
+ class Node extends RenderNode {
3
+ render(value, target) {
4
+ if (value && typeof value === "object" && "nodeType" in value && value.nodeType === 1) {
5
+ target.appendChild(value);
6
+ } else if (typeof value === "string" || typeof value === "number") {
7
+ target.textContent = String(value);
8
+ } else {
18
9
  return false;
19
10
  }
20
- let result = true;
21
- if (this.value instanceof Element) {
22
- this.container.appendChild(this.value);
23
- } else if (typeof this.value === "string" || typeof this.value === "number") {
24
- this.container.textContent = String(this.value);
25
- } else if (this.value === null || this.value === void 0 || this.value === false) {
26
- result = false;
27
- console.warn("Content script vanilla value is empty");
28
- } else if (this.value === true) {
29
- result = false;
30
- }
31
- this.mounted = true;
32
- return result;
11
+ return true;
33
12
  }
34
- unmount() {
35
- this.mounted = false;
36
- return !!this.node.unmount();
13
+ clear() {
37
14
  }
38
15
  }
39
16
  export {
40
- Node_default as default
17
+ Node as default
41
18
  };
42
19
  //# sourceMappingURL=Node.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/entry/content/adapters/vanilla/Node.ts"],"sourcesContent":["import {ContentScriptNode} from \"@typing/content\";\n\nexport default class implements ContentScriptNode {\n private mounted: boolean = false;\n\n constructor(\n protected readonly node: ContentScriptNode,\n protected readonly value?: null | boolean | string | number | Element\n ) {}\n\n public get anchor(): Element {\n return this.node.anchor;\n }\n\n public get container(): Element | undefined {\n return this.node.container;\n }\n\n public mount(): boolean {\n this.node.mount();\n\n if (!this.container || this.mounted) {\n return false;\n }\n\n let result: boolean = true;\n\n if (this.value instanceof Element) {\n this.container.appendChild(this.value);\n } else if (typeof this.value === \"string\" || typeof this.value === \"number\") {\n this.container.textContent = String(this.value);\n } else if (this.value === null || this.value === undefined || this.value === false) {\n result = false;\n\n console.warn(\"Content script vanilla value is empty\");\n } else if (this.value === true) {\n result = false;\n }\n\n this.mounted = true;\n\n return result;\n }\n\n public unmount(): boolean {\n this.mounted = false;\n\n return !!this.node.unmount();\n }\n}\n"],"mappings":"AAEA,MAAO,aAA2C;AAAA,EAG9C,YACuB,MACA,OACrB;AAFqB;AACA;AAAA,EACpB;AAAA,EAFoB;AAAA,EACA;AAAA,EAJf,UAAmB;AAAA,EAO3B,IAAW,SAAkB;AACzB,WAAO,KAAK,KAAK;AAAA,EACrB;AAAA,EAEA,IAAW,YAAiC;AACxC,WAAO,KAAK,KAAK;AAAA,EACrB;AAAA,EAEO,QAAiB;AACpB,SAAK,KAAK,MAAM;AAEhB,QAAI,CAAC,KAAK,aAAa,KAAK,SAAS;AACjC,aAAO;AAAA,IACX;AAEA,QAAI,SAAkB;AAEtB,QAAI,KAAK,iBAAiB,SAAS;AAC/B,WAAK,UAAU,YAAY,KAAK,KAAK;AAAA,IACzC,WAAW,OAAO,KAAK,UAAU,YAAY,OAAO,KAAK,UAAU,UAAU;AACzE,WAAK,UAAU,cAAc,OAAO,KAAK,KAAK;AAAA,IAClD,WAAW,KAAK,UAAU,QAAQ,KAAK,UAAU,UAAa,KAAK,UAAU,OAAO;AAChF,eAAS;AAET,cAAQ,KAAK,uCAAuC;AAAA,IACxD,WAAW,KAAK,UAAU,MAAM;AAC5B,eAAS;AAAA,IACb;AAEA,SAAK,UAAU;AAEf,WAAO;AAAA,EACX;AAAA,EAEO,UAAmB;AACtB,SAAK,UAAU;AAEf,WAAO,CAAC,CAAC,KAAK,KAAK,QAAQ;AAAA,EAC/B;AACJ;","names":[]}
1
+ {"version":3,"sources":["../../../../../src/entry/content/adapters/vanilla/Node.ts"],"sourcesContent":["import {RenderNode} from \"../../lifecycle/nodes\";\nimport type {ContentScriptRenderValue} from \"@typing/content\";\n\nexport default class Node<Data = unknown> extends RenderNode<Data> {\n protected render(value: ContentScriptRenderValue<Data> | undefined, target: Element): boolean {\n if (value && typeof value === \"object\" && \"nodeType\" in value && value.nodeType === 1) {\n target.appendChild(value as Element);\n } else if (typeof value === \"string\" || typeof value === \"number\") {\n target.textContent = String(value);\n } else {\n return false;\n }\n\n return true;\n }\n\n protected clear(): void {}\n}\n"],"mappings":"AAAA,SAAQ,kBAAiB;AAGzB,MAAO,aAA2C,WAAiB;AAAA,EACrD,OAAO,OAAmD,QAA0B;AAC1F,QAAI,SAAS,OAAO,UAAU,YAAY,cAAc,SAAS,MAAM,aAAa,GAAG;AACnF,aAAO,YAAY,KAAgB;AAAA,IACvC,WAAW,OAAO,UAAU,YAAY,OAAO,UAAU,UAAU;AAC/D,aAAO,cAAc,OAAO,KAAK;AAAA,IACrC,OAAO;AACH,aAAO;AAAA,IACX;AAEA,WAAO;AAAA,EACX;AAAA,EAEU,QAAc;AAAA,EAAC;AAC7B;","names":[]}
@@ -1,4 +1,5 @@
1
1
  import Builder from "./Builder.js";
2
2
  export { Builder };
3
- declare const _default: (definition: import("../../../../index.js").ContentScriptDefinition) => void;
3
+ export { resolveDefinition } from "./resolvers/definition.js";
4
+ declare const _default: (definition: import("../../../../index.js").ContentScriptDefinition<unknown, "none" | "shadow" | "iframe">) => void;
4
5
  export default _default;
@@ -1,7 +1,9 @@
1
1
  import Builder from "./Builder.js";
2
+ import { resolveDefinition } from "./resolvers/definition.js";
2
3
  var vanilla_default = Builder.resolver();
3
4
  export {
4
5
  Builder,
5
- vanilla_default as default
6
+ vanilla_default as default,
7
+ resolveDefinition
6
8
  };
7
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/entry/content/adapters/vanilla/index.ts"],"sourcesContent":["import Builder from \"./Builder\";\n\nexport {Builder};\n\nexport default Builder.resolver();\n"],"mappings":"AAAA,OAAO,aAAa;AAIpB,IAAO,kBAAQ,QAAQ,SAAS;","names":[]}
1
+ {"version":3,"sources":["../../../../../src/entry/content/adapters/vanilla/index.ts"],"sourcesContent":["import Builder from \"./Builder\";\n\nexport {Builder};\nexport {resolveDefinition} from \"./resolvers/definition\";\n\nexport default Builder.resolver();\n"],"mappings":"AAAA,OAAO,aAAa;AAGpB,SAAQ,yBAAwB;AAEhC,IAAO,kBAAQ,QAAQ,SAAS;","names":[]}
@@ -0,0 +1,2 @@
1
+ import type { ContentScriptDefinition } from "../../../../../types/content/index.js";
2
+ export declare const resolveDefinition: (module: object) => ContentScriptDefinition;
@@ -0,0 +1,9 @@
1
+ import { mergeDefinition } from "../../../resolvers/definition.js";
2
+ import { isValidRenderValue } from "./render.js";
3
+ const resolveDefinition = (module) => {
4
+ return mergeDefinition(module, (value) => typeof value === "function" || isValidRenderValue(value));
5
+ };
6
+ export {
7
+ resolveDefinition
8
+ };
9
+ //# sourceMappingURL=definition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/entry/content/adapters/vanilla/resolvers/definition.ts"],"sourcesContent":["import {mergeDefinition} from \"../../../resolvers/definition\";\nimport {isValidRenderValue} from \"./render\";\n\nimport type {ContentScriptDefinition} from \"@typing/content\";\n\nexport const resolveDefinition = (module: object): ContentScriptDefinition => {\n return mergeDefinition(module, value => typeof value === \"function\" || isValidRenderValue(value));\n};\n"],"mappings":"AAAA,SAAQ,uBAAsB;AAC9B,SAAQ,0BAAyB;AAI1B,MAAM,oBAAoB,CAAC,WAA4C;AAC1E,SAAO,gBAAgB,QAAQ,WAAS,OAAO,UAAU,cAAc,mBAAmB,KAAK,CAAC;AACpG;","names":[]}
@@ -0,0 +1,3 @@
1
+ import type { ContentScriptRenderHandler, ContentScriptRenderValue } from "../../../../../types/content/index.js";
2
+ export declare const isValidRenderValue: (value: unknown) => value is string | number | Element;
3
+ export declare const createRenderResolver: <Data = unknown>(render?: ContentScriptRenderValue<Data> | ContentScriptRenderHandler<Data>) => ContentScriptRenderHandler<Data>;
@@ -0,0 +1,15 @@
1
+ const isValidRenderValue = (value) => {
2
+ return typeof value === "string" && value.length > 0 || typeof value === "number" || value instanceof Element;
3
+ };
4
+ const createRenderResolver = (render) => (props) => {
5
+ const resolvedRender = typeof render === "function" ? render(props) : render;
6
+ if (!isValidRenderValue(resolvedRender)) {
7
+ return;
8
+ }
9
+ return resolvedRender;
10
+ };
11
+ export {
12
+ createRenderResolver,
13
+ isValidRenderValue
14
+ };
15
+ //# sourceMappingURL=render.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/entry/content/adapters/vanilla/resolvers/render.ts"],"sourcesContent":["import type {ContentScriptRenderHandler, ContentScriptRenderValue} from \"@typing/content\";\n\nexport const isValidRenderValue = (value: unknown): value is string | number | Element => {\n return (typeof value === \"string\" && value.length > 0) || typeof value === \"number\" || value instanceof Element;\n};\n\n// prettier-ignore\nexport const createRenderResolver =\n <Data = unknown>(render?: ContentScriptRenderValue<Data> | ContentScriptRenderHandler<Data>): ContentScriptRenderHandler<Data> =>\n props => {\n const resolvedRender = typeof render === \"function\" ? render(props) : render;\n\n if (!isValidRenderValue(resolvedRender)) {\n return;\n }\n\n return resolvedRender;\n };\n"],"mappings":"AAEO,MAAM,qBAAqB,CAAC,UAAuD;AACtF,SAAQ,OAAO,UAAU,YAAY,MAAM,SAAS,KAAM,OAAO,UAAU,YAAY,iBAAiB;AAC5G;AAGO,MAAM,uBACT,CAAiB,WACb,WAAS;AACL,QAAM,iBAAiB,OAAO,WAAW,aAAa,OAAO,KAAK,IAAI;AAEtE,MAAI,CAAC,mBAAmB,cAAc,GAAG;AACrC;AAAA,EACJ;AAEA,SAAO;AACX;","names":[]}
@@ -1 +1,5 @@
1
- export * from "./core/resolvers/definition.js";
1
+ import MountBuilder from "./lifecycle/MountBuilder.js";
2
+ export { MountBuilder as Builder };
3
+ export { resolveDefinition } from "./resolvers/definition.js";
4
+ declare const _default: (definition: import("../../index.js").ContentScriptDefinition<unknown, "none" | "shadow" | "iframe">) => void;
5
+ export default _default;
@@ -1,2 +1,9 @@
1
- export * from "./core/resolvers/definition.js";
1
+ import MountBuilder from "./lifecycle/MountBuilder.js";
2
+ import { resolveDefinition } from "./resolvers/definition.js";
3
+ var content_default = MountBuilder.resolver();
4
+ export {
5
+ MountBuilder as Builder,
6
+ content_default as default,
7
+ resolveDefinition
8
+ };
2
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/entry/content/index.ts"],"sourcesContent":["export * from \"./core/resolvers/definition\";\n"],"mappings":"AAAA,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../../src/entry/content/index.ts"],"sourcesContent":["import MountBuilder from \"./lifecycle/MountBuilder\";\n\nexport {MountBuilder as Builder};\nexport {resolveDefinition} from \"./resolvers/definition\";\n\nexport default MountBuilder.resolver();\n"],"mappings":"AAAA,OAAO,kBAAkB;AAGzB,SAAQ,yBAAwB;AAEhC,IAAO,kBAAQ,aAAa,SAAS;","names":[]}
@@ -0,0 +1,26 @@
1
+ import EntrypointBuilder from "../../core/Builder.js";
2
+ import { ManagedContext, EventEmitter } from "./context/index.js";
3
+ import { ContentScriptAnchor, ContentScriptAnchorGetter, ContentScriptBuilder, ContentScriptContainerCreator, ContentScriptContainerFactory, ContentScriptContainerOptions, ContentScriptContainerTag, ContentScriptContext, ContentScriptDefinition, ContentScriptIsolation, ContentScriptMarkerContract, ContentScriptMarkerGetter, ContentScriptMarkerResolver, ContentScriptMarkerType, ContentScriptMountFunction, ContentScriptNode, ContentScriptPrepareProps, ContentScriptRenderHandler, ContentScriptRenderValue, ContentScriptResolvedDefinition, ContentScriptWatchStrategy } from "../../../types/content/index.js";
4
+ export default abstract class Builder<Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> extends EntrypointBuilder implements ContentScriptBuilder {
5
+ private lock;
6
+ protected generation: number;
7
+ protected readonly definition: ContentScriptResolvedDefinition<Data>;
8
+ protected readonly emitter: EventEmitter;
9
+ protected readonly context: ManagedContext;
10
+ protected marker: ContentScriptMarkerContract;
11
+ protected unwatch?: () => void;
12
+ protected abstract createNode(anchor: Element, data: Data, enabled: boolean): Promise<ContentScriptNode>;
13
+ protected constructor(input: ContentScriptDefinition<Data, Isolation>);
14
+ protected resolveMarker(marker: ContentScriptMarkerType | ContentScriptMarkerGetter): ContentScriptMarkerResolver;
15
+ protected resolveAnchor(anchor?: ContentScriptAnchor | ContentScriptAnchorGetter): ContentScriptAnchorGetter;
16
+ protected resolveMount(mount?: ContentScriptMountFunction): ContentScriptMountFunction;
17
+ protected resolveContainer(container?: ContentScriptContainerTag | ContentScriptContainerOptions | ContentScriptContainerFactory<Data>): ContentScriptContainerCreator<Data>;
18
+ protected resolveRender(render?: ContentScriptRenderValue<Data> | ContentScriptRenderHandler<Data>): ContentScriptRenderHandler<Data> | undefined;
19
+ protected resolveWatch(watch?: true | ContentScriptWatchStrategy): ContentScriptWatchStrategy;
20
+ getContext(): ContentScriptContext;
21
+ build(): Promise<void>;
22
+ destroy(): Promise<void>;
23
+ protected getPrepareProps(anchor: Element): ContentScriptPrepareProps;
24
+ protected processing(generation: number): Promise<void>;
25
+ protected processAnchor(anchor: Element, generation: number): Promise<void>;
26
+ }