adnbn 0.11.0 → 0.13.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 (378) hide show
  1. package/README.md +3 -0
  2. package/dist/cli/builders/manifest/ManifestBase.js +1 -1
  3. package/dist/cli/bundler/index.d.ts +1 -0
  4. package/dist/cli/bundler/index.js +1 -0
  5. package/dist/cli/bundler/index.js.map +1 -1
  6. package/dist/cli/bundler/layers.d.ts +5 -0
  7. package/dist/cli/bundler/layers.js +11 -0
  8. package/dist/cli/bundler/layers.js.map +1 -0
  9. package/dist/cli/bundler/plugins/build-assets-map/BuildAssetsMapPlugin.js +44 -15
  10. package/dist/cli/bundler/plugins/build-assets-map/BuildAssetsMapPlugin.js.map +1 -1
  11. package/dist/cli/bundler/plugins/build-assets-map/index.d.ts +1 -2
  12. package/dist/cli/bundler/plugins/build-assets-map/index.js +0 -3
  13. package/dist/cli/bundler/plugins/build-assets-map/index.js.map +1 -1
  14. package/dist/cli/bundler/plugins/build-assets-map/normalize.d.ts +3 -0
  15. package/dist/cli/bundler/plugins/build-assets-map/normalize.js +24 -0
  16. package/dist/cli/bundler/plugins/build-assets-map/normalize.js.map +1 -0
  17. package/dist/cli/bundler/plugins/build-assets-map/templates/runtime.template.d.ts +2 -0
  18. package/dist/cli/bundler/plugins/build-assets-map/templates.d.ts +9 -0
  19. package/dist/cli/bundler/plugins/build-assets-map/templates.js +32 -0
  20. package/dist/cli/bundler/plugins/build-assets-map/usage.d.ts +3 -6
  21. package/dist/cli/bundler/plugins/build-assets-map/usage.js +6 -3
  22. package/dist/cli/bundler/plugins/build-assets-map/usage.js.map +1 -1
  23. package/dist/cli/bundler/plugins/entrypoint/EntrypointPlugin.js +11 -0
  24. package/dist/cli/bundler/plugins/entrypoint/EntrypointPlugin.js.map +1 -1
  25. package/dist/cli/bundler/plugins/index.d.ts +2 -2
  26. package/dist/cli/bundler/plugins/index.js +2 -6
  27. package/dist/cli/bundler/plugins/index.js.map +1 -1
  28. package/dist/cli/bundler/plugins/isolated-styles/IsolatedStylesPlugin.d.ts +1 -1
  29. package/dist/cli/bundler/plugins/isolated-styles/IsolatedStylesPlugin.js +38 -13
  30. package/dist/cli/bundler/plugins/isolated-styles/IsolatedStylesPlugin.js.map +1 -1
  31. package/dist/cli/bundler/plugins/isolated-styles/chunks.d.ts +7 -0
  32. package/dist/cli/bundler/plugins/isolated-styles/chunks.js +33 -0
  33. package/dist/cli/bundler/plugins/isolated-styles/chunks.js.map +1 -0
  34. package/dist/cli/bundler/plugins/isolated-styles/split-chunks.d.ts +4 -0
  35. package/dist/cli/bundler/plugins/isolated-styles/split-chunks.js +51 -0
  36. package/dist/cli/bundler/plugins/isolated-styles/split-chunks.js.map +1 -0
  37. package/dist/cli/bundler/plugins/isolated-styles/templates.js +36 -6
  38. package/dist/cli/bundler/plugins/manifest/ManifestPlugin.js +1 -2
  39. package/dist/cli/bundler/plugins/manifest/ManifestPlugin.js.map +1 -1
  40. package/dist/cli/bundler/plugins/types.d.ts +4 -0
  41. package/dist/cli/bundler/plugins/utils/compilation-assets.d.ts +4 -0
  42. package/dist/cli/bundler/plugins/utils/compilation-assets.js +12 -0
  43. package/dist/cli/bundler/plugins/utils/compilation-assets.js.map +1 -0
  44. package/dist/cli/bundler/plugins/utils/index.d.ts +2 -0
  45. package/dist/cli/bundler/plugins/utils/index.js +5 -0
  46. package/dist/cli/bundler/plugins/utils/index.js.map +1 -1
  47. package/dist/cli/bundler/plugins/utils/runtime-module.d.ts +3 -0
  48. package/dist/cli/bundler/plugins/utils/runtime-module.js +11 -0
  49. package/dist/cli/bundler/plugins/utils/runtime-module.js.map +1 -0
  50. package/dist/cli/bundler/utils/app-filename.d.ts +2 -0
  51. package/dist/cli/bundler/utils/app-filename.js +19 -0
  52. package/dist/cli/bundler/utils/app-filename.js.map +1 -0
  53. package/dist/cli/bundler/utils/assets.d.ts +3 -0
  54. package/dist/cli/bundler/utils/{output.js → assets.js} +22 -33
  55. package/dist/cli/bundler/utils/assets.js.map +1 -0
  56. package/dist/cli/bundler/utils/index.d.ts +2 -3
  57. package/dist/cli/bundler/utils/index.js +2 -3
  58. package/dist/cli/bundler/utils/index.js.map +1 -1
  59. package/dist/cli/entrypoint/file/injectors/core.js +1 -1
  60. package/dist/cli/entrypoint/finder/ContentFinder.d.ts +1 -1
  61. package/dist/cli/entrypoint/parser/ContentParser.d.ts +2 -2
  62. package/dist/cli/entrypoint/parser/ContentParser.js +6 -22
  63. package/dist/cli/entrypoint/parser/ContentParser.js.map +1 -1
  64. package/dist/cli/entrypoint/parser/RelayParser.js +1 -1
  65. package/dist/cli/entrypoint/parser/utils/content/default-render.d.ts +3 -0
  66. package/dist/cli/entrypoint/parser/utils/content/default-render.js +21 -0
  67. package/dist/cli/entrypoint/parser/utils/content/default-render.js.map +1 -0
  68. package/dist/cli/plugins/content/Content.d.ts +1 -1
  69. package/dist/cli/plugins/content/ContentDriver.d.ts +1 -1
  70. package/dist/cli/plugins/content/ContentManager.d.ts +1 -1
  71. package/dist/cli/plugins/content/ContentManager.js +1 -1
  72. package/dist/cli/plugins/content/ContentName.d.ts +1 -1
  73. package/dist/cli/plugins/content/ContentName.js +1 -1
  74. package/dist/cli/plugins/content/Relay.d.ts +1 -1
  75. package/dist/cli/plugins/content/RelayDriver.d.ts +1 -1
  76. package/dist/cli/plugins/content/RelayDriver.js +1 -1
  77. package/dist/cli/plugins/content/bundler.d.ts +1 -4
  78. package/dist/cli/plugins/content/bundler.js +5 -21
  79. package/dist/cli/plugins/content/bundler.js.map +1 -1
  80. package/dist/cli/plugins/content/index.js +4 -5
  81. package/dist/cli/plugins/content/index.js.map +1 -1
  82. package/dist/cli/plugins/content/types.d.ts +1 -1
  83. package/dist/cli/plugins/content/utils.d.ts +1 -1
  84. package/dist/cli/plugins/content/utils.js +1 -1
  85. package/dist/cli/plugins/index.d.ts +1 -1
  86. package/dist/cli/plugins/index.js +1 -1
  87. package/dist/cli/plugins/locale/Locale.js +5 -2
  88. package/dist/cli/plugins/locale/Locale.js.map +1 -1
  89. package/dist/cli/plugins/locale/index.js +2 -2
  90. package/dist/cli/plugins/locale/index.js.map +1 -1
  91. package/dist/cli/plugins/output/index.d.ts +2 -0
  92. package/dist/cli/plugins/{output.js → output/index.js} +11 -13
  93. package/dist/cli/plugins/output/index.js.map +1 -0
  94. package/dist/cli/plugins/output/runtime.d.ts +26 -0
  95. package/dist/cli/plugins/output/runtime.js +19 -0
  96. package/dist/cli/plugins/output/runtime.js.map +1 -0
  97. package/dist/cli/plugins/style/index.d.ts +1 -2
  98. package/dist/cli/plugins/style/index.js +19 -30
  99. package/dist/cli/plugins/style/index.js.map +1 -1
  100. package/dist/cli/resolvers/config.js +1 -2
  101. package/dist/cli/resolvers/config.js.map +1 -1
  102. package/dist/cli/virtual/index.js +4 -4
  103. package/dist/cli/virtual/virtual.d.ts +8 -3
  104. package/dist/content/index.d.ts +3 -0
  105. package/dist/content/index.js +8 -0
  106. package/dist/content/index.js.map +1 -0
  107. package/dist/entry/content/adapters/react/Builder.d.ts +7 -6
  108. package/dist/entry/content/adapters/react/Builder.js +12 -19
  109. package/dist/entry/content/adapters/react/Builder.js.map +1 -1
  110. package/dist/entry/content/adapters/react/Node.d.ts +6 -14
  111. package/dist/entry/content/adapters/react/Node.js +11 -35
  112. package/dist/entry/content/adapters/react/Node.js.map +1 -1
  113. package/dist/entry/content/adapters/react/definition.d.ts +2 -0
  114. package/dist/entry/content/adapters/react/definition.js +12 -0
  115. package/dist/entry/content/adapters/react/definition.js.map +1 -0
  116. package/dist/entry/content/adapters/react/index.d.ts +2 -1
  117. package/dist/entry/content/adapters/react/index.js +3 -1
  118. package/dist/entry/content/adapters/react/index.js.map +1 -1
  119. package/dist/entry/content/adapters/vanilla/Builder.d.ts +7 -5
  120. package/dist/entry/content/adapters/vanilla/Builder.js +17 -14
  121. package/dist/entry/content/adapters/vanilla/Builder.js.map +1 -1
  122. package/dist/entry/content/adapters/vanilla/Node.d.ts +5 -11
  123. package/dist/entry/content/adapters/vanilla/Node.js +11 -37
  124. package/dist/entry/content/adapters/vanilla/Node.js.map +1 -1
  125. package/dist/entry/content/adapters/vanilla/definition.d.ts +2 -0
  126. package/dist/entry/content/adapters/vanilla/definition.js +9 -0
  127. package/dist/entry/content/adapters/vanilla/definition.js.map +1 -0
  128. package/dist/entry/content/adapters/vanilla/index.d.ts +2 -1
  129. package/dist/entry/content/adapters/vanilla/index.js +3 -1
  130. package/dist/entry/content/adapters/vanilla/index.js.map +1 -1
  131. package/dist/entry/content/adapters/vanilla/utils.d.ts +1 -0
  132. package/dist/entry/content/adapters/vanilla/utils.js +7 -0
  133. package/dist/entry/content/adapters/vanilla/utils.js.map +1 -0
  134. package/dist/entry/content/index.d.ts +5 -1
  135. package/dist/entry/content/index.js +8 -1
  136. package/dist/entry/content/index.js.map +1 -1
  137. package/dist/entry/content/lifecycle/Builder.d.ts +32 -0
  138. package/dist/entry/content/lifecycle/Builder.js +254 -0
  139. package/dist/entry/content/lifecycle/Builder.js.map +1 -0
  140. package/dist/entry/content/lifecycle/IsolationSetup.d.ts +16 -0
  141. package/dist/entry/content/lifecycle/IsolationSetup.js +37 -0
  142. package/dist/entry/content/lifecycle/IsolationSetup.js.map +1 -0
  143. package/dist/entry/content/lifecycle/MountBuilder.d.ts +11 -0
  144. package/dist/entry/content/lifecycle/MountBuilder.js +73 -0
  145. package/dist/entry/content/lifecycle/MountBuilder.js.map +1 -0
  146. package/dist/entry/content/lifecycle/context/ContainerRegistry.d.ts +7 -0
  147. package/dist/entry/content/lifecycle/context/ContainerRegistry.js +45 -0
  148. package/dist/entry/content/lifecycle/context/ContainerRegistry.js.map +1 -0
  149. package/dist/entry/content/lifecycle/context/Context.d.ts +17 -0
  150. package/dist/entry/content/lifecycle/context/Context.js +88 -0
  151. package/dist/entry/content/lifecycle/context/Context.js.map +1 -0
  152. package/dist/entry/content/{core → lifecycle}/context/EventEmitter.d.ts +2 -2
  153. package/dist/entry/content/{core → lifecycle}/context/EventEmitter.js +3 -3
  154. package/dist/entry/content/lifecycle/context/EventEmitter.js.map +1 -0
  155. package/dist/entry/content/lifecycle/context/ManagedContext.d.ts +8 -0
  156. package/dist/entry/content/lifecycle/context/ManagedContext.js +19 -0
  157. package/dist/entry/content/lifecycle/context/ManagedContext.js.map +1 -0
  158. package/dist/entry/content/{core → lifecycle}/context/index.d.ts +1 -0
  159. package/dist/entry/content/lifecycle/context/index.js +11 -0
  160. package/dist/entry/content/lifecycle/context/index.js.map +1 -0
  161. package/dist/entry/content/{core → lifecycle}/markers/AbstractMarker.d.ts +2 -2
  162. package/dist/entry/content/{core → lifecycle}/markers/AbstractMarker.js +3 -3
  163. package/dist/entry/content/lifecycle/markers/AbstractMarker.js.map +1 -0
  164. package/dist/entry/content/{core → lifecycle}/markers/AttributeMarker.d.ts +2 -2
  165. package/dist/entry/content/{core → lifecycle}/markers/AttributeMarker.js +5 -3
  166. package/dist/entry/content/lifecycle/markers/AttributeMarker.js.map +1 -0
  167. package/dist/entry/content/{core → lifecycle}/markers/WeakMarker.d.ts +2 -2
  168. package/dist/entry/content/{core → lifecycle}/markers/WeakMarker.js +2 -2
  169. package/dist/entry/content/lifecycle/markers/WeakMarker.js.map +1 -0
  170. package/dist/entry/content/lifecycle/markers/index.js.map +1 -0
  171. package/dist/entry/content/lifecycle/nodes/EventNode.d.ts +15 -0
  172. package/dist/entry/content/lifecycle/nodes/EventNode.js +49 -0
  173. package/dist/entry/content/lifecycle/nodes/EventNode.js.map +1 -0
  174. package/dist/entry/content/lifecycle/nodes/FrameNode.d.ts +30 -0
  175. package/dist/entry/content/lifecycle/nodes/FrameNode.js +190 -0
  176. package/dist/entry/content/lifecycle/nodes/FrameNode.js.map +1 -0
  177. package/dist/entry/content/{core → lifecycle}/nodes/MarkerNode.d.ts +3 -2
  178. package/dist/entry/content/{core → lifecycle}/nodes/MarkerNode.js +5 -2
  179. package/dist/entry/content/lifecycle/nodes/MarkerNode.js.map +1 -0
  180. package/dist/entry/content/lifecycle/nodes/MountNode.d.ts +17 -0
  181. package/dist/entry/content/lifecycle/nodes/MountNode.js +80 -0
  182. package/dist/entry/content/lifecycle/nodes/MountNode.js.map +1 -0
  183. package/dist/entry/content/{core → lifecycle}/nodes/Node.d.ts +2 -2
  184. package/dist/entry/content/{core → lifecycle}/nodes/Node.js +2 -2
  185. package/dist/entry/content/lifecycle/nodes/Node.js.map +1 -0
  186. package/dist/entry/content/lifecycle/nodes/RenderNode.d.ts +28 -0
  187. package/dist/entry/content/lifecycle/nodes/RenderNode.js +140 -0
  188. package/dist/entry/content/lifecycle/nodes/RenderNode.js.map +1 -0
  189. package/dist/entry/content/lifecycle/nodes/ShadowNode.d.ts +22 -0
  190. package/dist/entry/content/lifecycle/nodes/ShadowNode.js +124 -0
  191. package/dist/entry/content/lifecycle/nodes/ShadowNode.js.map +1 -0
  192. package/dist/entry/content/{core → lifecycle}/nodes/index.d.ts +1 -0
  193. package/dist/entry/content/lifecycle/nodes/index.js +17 -0
  194. package/dist/entry/content/lifecycle/nodes/index.js.map +1 -0
  195. package/dist/entry/content/{core → lifecycle}/nodes/isolated-styles.d.ts +1 -1
  196. package/dist/entry/content/{core → lifecycle}/nodes/isolated-styles.js +2 -2
  197. package/dist/entry/content/lifecycle/nodes/isolated-styles.js.map +1 -0
  198. package/dist/entry/content/lifecycle/types.d.ts +28 -0
  199. package/dist/entry/content/resolvers/anchor.d.ts +2 -0
  200. package/dist/entry/content/{core/resolvers → resolvers}/anchor.js +2 -2
  201. package/dist/entry/content/resolvers/anchor.js.map +1 -0
  202. package/dist/entry/content/resolvers/container.d.ts +2 -0
  203. package/dist/entry/content/{core/resolvers → resolvers}/container.js +2 -2
  204. package/dist/entry/content/resolvers/container.js.map +1 -0
  205. package/dist/entry/content/resolvers/definition.d.ts +5 -0
  206. package/dist/entry/content/resolvers/definition.js +24 -0
  207. package/dist/entry/content/resolvers/definition.js.map +1 -0
  208. package/dist/entry/content/{core/resolvers → resolvers}/index.d.ts +1 -1
  209. package/dist/entry/content/{core/resolvers → resolvers}/index.js +1 -1
  210. package/dist/entry/content/resolvers/index.js.map +1 -0
  211. package/dist/entry/content/resolvers/mount.d.ts +2 -0
  212. package/dist/entry/content/{core/resolvers → resolvers}/mount.js +3 -3
  213. package/dist/entry/content/resolvers/mount.js.map +1 -0
  214. package/dist/entry/content/resolvers/target.d.ts +3 -0
  215. package/dist/entry/content/resolvers/target.js +34 -0
  216. package/dist/entry/content/resolvers/target.js.map +1 -0
  217. package/dist/entry/content/resolvers/watch.d.ts +6 -0
  218. package/dist/entry/content/resolvers/watch.js +81 -0
  219. package/dist/entry/content/resolvers/watch.js.map +1 -0
  220. package/dist/entry/relay/Builder.d.ts +8 -8
  221. package/dist/entry/relay/Builder.js +28 -19
  222. package/dist/entry/relay/Builder.js.map +1 -1
  223. package/dist/entry/relay/TransportBuilder.d.ts +3 -2
  224. package/dist/entry/relay/TransportBuilder.js +3 -3
  225. package/dist/entry/relay/TransportBuilder.js.map +1 -1
  226. package/dist/entry/relay/index.d.ts +5 -2
  227. package/dist/entry/relay/index.js +8 -2
  228. package/dist/entry/relay/index.js.map +1 -1
  229. package/dist/entry/relay/resolvers/definition.d.ts +4 -0
  230. package/dist/entry/relay/resolvers/definition.js +16 -0
  231. package/dist/entry/relay/resolvers/definition.js.map +1 -0
  232. package/dist/main/content.d.ts +4 -6
  233. package/dist/main/content.js +3 -16
  234. package/dist/main/content.js.map +1 -1
  235. package/dist/main/entrypoint.js +1 -1
  236. package/dist/main/entrypoint.js.map +1 -1
  237. package/dist/main/relay.d.ts +2 -1
  238. package/dist/main/relay.js.map +1 -1
  239. package/dist/relay/RelayPermission.js +1 -1
  240. package/dist/shared/content/isolation.d.ts +1 -1
  241. package/dist/shared/content/isolation.js +13 -20
  242. package/dist/shared/content/isolation.js.map +1 -1
  243. package/dist/shared/locale/index.d.ts +1 -1
  244. package/dist/shared/locale/index.js +3 -1
  245. package/dist/shared/locale/index.js.map +1 -1
  246. package/dist/shared/locale/messages.d.ts +4 -0
  247. package/dist/shared/locale/messages.js +12 -0
  248. package/dist/shared/locale/messages.js.map +1 -1
  249. package/dist/types/content/adapters/index.d.ts +2 -0
  250. package/dist/types/content/adapters/index.js +1 -0
  251. package/dist/types/content/adapters/index.js.map +1 -0
  252. package/dist/types/content/adapters/react.d.ts +4 -0
  253. package/dist/types/content/adapters/react.js +1 -0
  254. package/dist/types/content/adapters/react.js.map +1 -0
  255. package/dist/types/content/adapters/vanilla.d.ts +1 -0
  256. package/dist/types/content/adapters/vanilla.js +1 -0
  257. package/dist/types/content/adapters/vanilla.js.map +1 -0
  258. package/dist/types/content/boundary.d.ts +17 -0
  259. package/dist/types/content/boundary.js +1 -0
  260. package/dist/types/content/boundary.js.map +1 -0
  261. package/dist/types/{content.d.ts → content/common.d.ts} +32 -53
  262. package/dist/types/{content.js → content/common.js} +1 -1
  263. package/dist/types/content/common.js.map +1 -0
  264. package/dist/types/content/definition.d.ts +66 -0
  265. package/dist/types/content/definition.js +1 -0
  266. package/dist/types/content/definition.js.map +1 -0
  267. package/dist/types/content/index.d.ts +7 -0
  268. package/dist/types/content/index.js +2 -0
  269. package/dist/types/content/index.js.map +1 -0
  270. package/dist/types/content/prepare.d.ts +9 -0
  271. package/dist/types/content/prepare.js +1 -0
  272. package/dist/types/content/prepare.js.map +1 -0
  273. package/dist/types/content/render.d.ts +6 -0
  274. package/dist/types/content/render.js +1 -0
  275. package/dist/types/content/render.js.map +1 -0
  276. package/dist/types/content/target.d.ts +13 -0
  277. package/dist/types/content/target.js +1 -0
  278. package/dist/types/content/target.js.map +1 -0
  279. package/dist/types/locale.d.ts +3 -0
  280. package/dist/types/locale.js.map +1 -1
  281. package/dist/types/manifest.d.ts +1 -1
  282. package/dist/types/relay.d.ts +3 -4
  283. package/dist/types/relay.js.map +1 -1
  284. package/dist/virtual/modules.d.ts +4 -3
  285. package/dist/virtual/{entrypoint.d.ts → runtime.d.ts} +3 -0
  286. package/dist/virtual/runtime.js +9 -0
  287. package/dist/virtual/runtime.js.map +1 -0
  288. package/package.json +32 -25
  289. package/scripts/merge-coverage.mjs +12 -0
  290. package/scripts/pre-commit.mjs +22 -0
  291. package/scripts/test-inventory.mjs +38 -0
  292. package/scripts/test-run.mjs +25 -0
  293. package/types/client.d.ts +3 -3
  294. package/dist/cli/bundler/plugins/build-assets-map/entrypoint-module.d.ts +0 -13
  295. package/dist/cli/bundler/plugins/build-assets-map/entrypoint-module.js +0 -16
  296. package/dist/cli/bundler/plugins/build-assets-map/entrypoint-module.js.map +0 -1
  297. package/dist/cli/bundler/utils/layers.d.ts +0 -4
  298. package/dist/cli/bundler/utils/layers.js +0 -10
  299. package/dist/cli/bundler/utils/layers.js.map +0 -1
  300. package/dist/cli/bundler/utils/output.d.ts +0 -6
  301. package/dist/cli/bundler/utils/output.js.map +0 -1
  302. package/dist/cli/bundler/utils/styles.d.ts +0 -5
  303. package/dist/cli/bundler/utils/styles.js +0 -30
  304. package/dist/cli/bundler/utils/styles.js.map +0 -1
  305. package/dist/cli/plugins/output.d.ts +0 -2
  306. package/dist/cli/plugins/output.js.map +0 -1
  307. package/dist/cli/plugins/style/types.d.ts +0 -5
  308. package/dist/entry/content/adapters/react/resolvers/index.d.ts +0 -1
  309. package/dist/entry/content/adapters/react/resolvers/index.js +0 -2
  310. package/dist/entry/content/adapters/react/resolvers/index.js.map +0 -1
  311. package/dist/entry/content/adapters/react/resolvers/render.d.ts +0 -2
  312. package/dist/entry/content/adapters/react/resolvers/render.js +0 -11
  313. package/dist/entry/content/adapters/react/resolvers/render.js.map +0 -1
  314. package/dist/entry/content/core/Builder.d.ts +0 -26
  315. package/dist/entry/content/core/Builder.js +0 -128
  316. package/dist/entry/content/core/Builder.js.map +0 -1
  317. package/dist/entry/content/core/MountBuilder.d.ts +0 -10
  318. package/dist/entry/content/core/MountBuilder.js +0 -48
  319. package/dist/entry/content/core/MountBuilder.js.map +0 -1
  320. package/dist/entry/content/core/context/Context.d.ts +0 -12
  321. package/dist/entry/content/core/context/Context.js +0 -50
  322. package/dist/entry/content/core/context/Context.js.map +0 -1
  323. package/dist/entry/content/core/context/EventEmitter.js.map +0 -1
  324. package/dist/entry/content/core/context/ManagedContext.d.ts +0 -5
  325. package/dist/entry/content/core/context/ManagedContext.js +0 -12
  326. package/dist/entry/content/core/context/ManagedContext.js.map +0 -1
  327. package/dist/entry/content/core/context/index.js +0 -9
  328. package/dist/entry/content/core/context/index.js.map +0 -1
  329. package/dist/entry/content/core/markers/AbstractMarker.js.map +0 -1
  330. package/dist/entry/content/core/markers/AttributeMarker.js.map +0 -1
  331. package/dist/entry/content/core/markers/WeakMarker.js.map +0 -1
  332. package/dist/entry/content/core/markers/index.js.map +0 -1
  333. package/dist/entry/content/core/nodes/EventNode.d.ts +0 -11
  334. package/dist/entry/content/core/nodes/EventNode.js +0 -35
  335. package/dist/entry/content/core/nodes/EventNode.js.map +0 -1
  336. package/dist/entry/content/core/nodes/FrameNode.d.ts +0 -23
  337. package/dist/entry/content/core/nodes/FrameNode.js +0 -125
  338. package/dist/entry/content/core/nodes/FrameNode.js.map +0 -1
  339. package/dist/entry/content/core/nodes/MarkerNode.js.map +0 -1
  340. package/dist/entry/content/core/nodes/MountNode.d.ts +0 -12
  341. package/dist/entry/content/core/nodes/MountNode.js +0 -42
  342. package/dist/entry/content/core/nodes/MountNode.js.map +0 -1
  343. package/dist/entry/content/core/nodes/Node.js.map +0 -1
  344. package/dist/entry/content/core/nodes/ShadowNode.d.ts +0 -14
  345. package/dist/entry/content/core/nodes/ShadowNode.js +0 -67
  346. package/dist/entry/content/core/nodes/ShadowNode.js.map +0 -1
  347. package/dist/entry/content/core/nodes/index.js +0 -15
  348. package/dist/entry/content/core/nodes/index.js.map +0 -1
  349. package/dist/entry/content/core/nodes/isolated-styles.js.map +0 -1
  350. package/dist/entry/content/core/resolvers/anchor.d.ts +0 -2
  351. package/dist/entry/content/core/resolvers/anchor.js.map +0 -1
  352. package/dist/entry/content/core/resolvers/container.d.ts +0 -2
  353. package/dist/entry/content/core/resolvers/container.js.map +0 -1
  354. package/dist/entry/content/core/resolvers/definition.d.ts +0 -3
  355. package/dist/entry/content/core/resolvers/definition.js +0 -12
  356. package/dist/entry/content/core/resolvers/definition.js.map +0 -1
  357. package/dist/entry/content/core/resolvers/index.js.map +0 -1
  358. package/dist/entry/content/core/resolvers/mount.d.ts +0 -2
  359. package/dist/entry/content/core/resolvers/mount.js.map +0 -1
  360. package/dist/entry/content/core/resolvers/render.d.ts +0 -3
  361. package/dist/entry/content/core/resolvers/render.js +0 -18
  362. package/dist/entry/content/core/resolvers/render.js.map +0 -1
  363. package/dist/entry/content/core/resolvers/watch.d.ts +0 -4
  364. package/dist/entry/content/core/resolvers/watch.js +0 -62
  365. package/dist/entry/content/core/resolvers/watch.js.map +0 -1
  366. package/dist/entry/content/frame/Builder.d.ts +0 -7
  367. package/dist/entry/content/frame/Builder.js +0 -14
  368. package/dist/entry/content/frame/Builder.js.map +0 -1
  369. package/dist/entry/content/frame/index.d.ts +0 -4
  370. package/dist/entry/content/frame/index.js +0 -7
  371. package/dist/entry/content/frame/index.js.map +0 -1
  372. package/dist/types/content.js.map +0 -1
  373. package/dist/virtual/entrypoint.js +0 -7
  374. package/dist/virtual/entrypoint.js.map +0 -1
  375. /package/dist/entry/content/{core → lifecycle}/markers/index.d.ts +0 -0
  376. /package/dist/entry/content/{core → lifecycle}/markers/index.js +0 -0
  377. /package/dist/{cli/plugins/style → entry/content/lifecycle}/types.js +0 -0
  378. /package/dist/{cli/plugins/style → entry/content/lifecycle}/types.js.map +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/locale.ts"],"sourcesContent":["import {Language} from \"@typing/language\";\n\nexport {Language};\n\nexport const RtlLanguages: ReadonlySet<Language> = new Set([Language.Arabic, Language.Persian, Language.Hebrew]);\n\nexport const LocaleNestedKeysSeparator = \".\";\n\nexport const LocaleKeysSeparator = \"_\";\n\nexport const LocaleValuesSeparator = \"|\";\n\nexport const LocaleCustomKeyForLanguage = \"locale\";\n\nexport const LocaleKeyMarker = \"@\";\n\nexport const LanguageCodes: ReadonlySet<string> = new Set(Object.values(Language));\n\n/** Native language names, independent of the selected UI language. */\nexport const LanguageNames: Readonly<Record<Language, string>> = Object.freeze({\n [Language.Arabic]: \"العربية\",\n [Language.Amharic]: \"አማርኛ\",\n [Language.Bulgarian]: \"Български\",\n [Language.Bengali]: \"বাংলা\",\n [Language.Catalan]: \"Català\",\n [Language.Czech]: \"Čeština\",\n [Language.Danish]: \"Dansk\",\n [Language.German]: \"Deutsch\",\n [Language.Greek]: \"Ελληνικά\",\n [Language.English]: \"English\",\n [Language.EnglishAustralia]: \"English (Australia)\",\n [Language.EnglishGreatBritain]: \"English (United Kingdom)\",\n [Language.EnglishUSA]: \"English (United States)\",\n [Language.Spanish]: \"Español\",\n [Language.SpanishLatinAmericaAndCaribbean]: \"Español (Latinoamérica y el Caribe)\",\n [Language.Estonian]: \"Eesti\",\n [Language.Persian]: \"فارسی\",\n [Language.Finnish]: \"Suomi\",\n [Language.Filipino]: \"Filipino\",\n [Language.French]: \"Français\",\n [Language.Gujarati]: \"ગુજરાતી\",\n [Language.Hebrew]: \"עברית\",\n [Language.Hindi]: \"हिन्दी\",\n [Language.Croatian]: \"Hrvatski\",\n [Language.Hungarian]: \"Magyar\",\n [Language.Indonesian]: \"Bahasa Indonesia\",\n [Language.Italian]: \"Italiano\",\n [Language.Japanese]: \"日本語\",\n [Language.Kannada]: \"ಕನ್ನಡ\",\n [Language.Korean]: \"한국어\",\n [Language.Lithuanian]: \"Lietuvių\",\n [Language.Latvian]: \"Latviešu\",\n [Language.Malayalam]: \"മലയാളം\",\n [Language.Marathi]: \"मराठी\",\n [Language.Malay]: \"Bahasa Melayu\",\n [Language.Dutch]: \"Nederlands\",\n [Language.Norwegian]: \"Norsk\",\n [Language.Polish]: \"Polski\",\n [Language.PortugueseBrazil]: \"Português (Brasil)\",\n [Language.PortuguesePortugal]: \"Português (Portugal)\",\n [Language.Romanian]: \"Română\",\n [Language.Russian]: \"Русский\",\n [Language.Slovak]: \"Slovenčina\",\n [Language.Slovenian]: \"Slovenščina\",\n [Language.Serbian]: \"Српски\",\n [Language.Swedish]: \"Svenska\",\n [Language.Swahili]: \"Kiswahili\",\n [Language.Tamil]: \"தமிழ்\",\n [Language.Telugu]: \"తెలుగు\",\n [Language.Thai]: \"ไทย\",\n [Language.Turkish]: \"Türkçe\",\n [Language.Ukrainian]: \"Українська\",\n [Language.Vietnamese]: \"Tiếng Việt\",\n [Language.ChineseChina]: \"中文(简体)\",\n [Language.ChineseTaiwan]: \"中文(繁體)\",\n});\n\nexport const LocaleFileExtensions: ReadonlySet<string> = new Set([\"yaml\", \"yml\", \"json\"]);\n\nexport enum LocaleDir {\n RightToLeft = \"rtl\",\n LeftToRight = \"ltr\",\n}\n\nexport type LocaleValue = string | number | Array<string | number>;\n\nexport type LocaleData = {\n [key: string]: LocaleValue | LocaleData;\n};\n\nexport type LocaleItems = Map<string, string>;\n\nexport type LocaleKeys = ReadonlySet<string>;\n\nexport type LocaleMessages = {\n [key: string]: {\n message: string;\n };\n};\n\nexport interface LocaleBuilder {\n lang(): Language;\n\n merge(data: LocaleData): this;\n\n build(): LocaleMessages;\n\n get(): LocaleItems;\n\n keys(): LocaleKeys;\n\n structure(): LocaleStructure;\n\n isValid(): boolean;\n\n validate(): this;\n}\n\nexport type LocaleBuilders = Map<Language, LocaleBuilder>;\n\n/** Completed messages keyed by language and browser-compatible message key. */\nexport type LocaleCatalogue = Partial<Record<Language, Record<string, string>>>;\n\nexport interface LocaleValidator {\n isValid(locale: LocaleBuilder): boolean;\n\n validate(locale: LocaleBuilder): this;\n}\n\nexport interface LocaleContractValidator {\n isValid(builders: LocaleBuilders): boolean;\n\n validate(builders: LocaleBuilders): this;\n}\n\nexport interface LocaleFutures {\n plural: boolean;\n substitutions: readonly string[];\n}\n\nexport interface LocaleStructure {\n [key: string]: LocaleFutures;\n}\n\n/**\n * Empty because translation keys and their plural/substitution contracts belong to the consuming application.\n * Generated `.adnbn/locale.d.ts` declarations populate it by augmenting `adnbn/locale`.\n */\nexport interface LocaleRegistry {}\n\nexport type LocaleNonPluralKeys<T> = {\n [K in keyof T]: T[K] extends {plural: false} ? K : never;\n}[keyof T] &\n string;\n\nexport type LocalePluralKeys<T> = {\n [K in keyof T]: T[K] extends {plural: true} ? K : never;\n}[keyof T] &\n string;\n\nexport type LocaleSubstitutionValue = string | number;\n\nexport type LocaleSubstitutionKeys<T, K extends keyof T> = T[K] extends {substitutions: readonly (infer U)[]}\n ? U & string\n : never;\n\nexport type LocaleSubstitutionsFor<T, K extends keyof T> = [LocaleSubstitutionKeys<T, K>] extends [never]\n ? never\n : Record<LocaleSubstitutionKeys<T, K>, LocaleSubstitutionValue>;\n\nexport type LocaleSubstitutionArgs<T, K extends keyof T> = string extends keyof T\n ? [substitutions?: Record<string, LocaleSubstitutionValue>]\n : [LocaleSubstitutionKeys<T, K>] extends [never]\n ? []\n : [substitutions: LocaleSubstitutionsFor<T, K>];\n\nexport interface LocaleProvider<S> {\n /** Currently selected language code. */\n lang(): Language;\n\n /** Available language codes. */\n langs(): ReadonlySet<Language>;\n\n /** Native names keyed by the available language codes. */\n langNames(): ReadonlyMap<Language, string>;\n\n keys(): ReadonlySet<keyof S>;\n\n // non-plural keys\n trans<K extends LocaleNonPluralKeys<S>>(key: K, ...args: LocaleSubstitutionArgs<S, K>): string;\n\n // plural keys\n choice<K extends LocalePluralKeys<S>>(key: K, count: number, ...args: LocaleSubstitutionArgs<S, K>): string;\n}\n\nexport interface LocaleDynamicProvider<S> extends LocaleProvider<S> {\n change(lang: Language): Promise<Language>;\n}\n\n/** Read-only message access for one selected language. */\nexport interface LocaleSnapshot<S> {\n readonly lang: () => Language;\n readonly langs: () => ReadonlySet<Language>;\n readonly langNames: () => ReadonlyMap<Language, string>;\n readonly get: <K extends keyof S & string>(key: K) => string;\n}\n\n/** Persists one language selection independently of the application's translation catalogue. */\nexport interface LocaleStorageDriver {\n /** No saved selection leaves the provider's current language unchanged. */\n get(): Promise<Language | undefined>;\n\n set(lang: Language): Promise<void>;\n\n /** Observes valid selections, including own writes; does not emit an initial value or deletions. */\n watch(handler: (lang: Language) => void): () => void;\n}\n"],"mappings":"AAAA,SAAQ,gBAAe;AAIhB,MAAM,eAAsC,oBAAI,IAAI,CAAC,SAAS,QAAQ,SAAS,SAAS,SAAS,MAAM,CAAC;AAExG,MAAM,4BAA4B;AAElC,MAAM,sBAAsB;AAE5B,MAAM,wBAAwB;AAE9B,MAAM,6BAA6B;AAEnC,MAAM,kBAAkB;AAExB,MAAM,gBAAqC,IAAI,IAAI,OAAO,OAAO,QAAQ,CAAC;AAG1E,MAAM,gBAAoD,OAAO,OAAO;AAAA,EAC3E,CAAC,SAAS,MAAM,GAAG;AAAA,EACnB,CAAC,SAAS,OAAO,GAAG;AAAA,EACpB,CAAC,SAAS,SAAS,GAAG;AAAA,EACtB,CAAC,SAAS,OAAO,GAAG;AAAA,EACpB,CAAC,SAAS,OAAO,GAAG;AAAA,EACpB,CAAC,SAAS,KAAK,GAAG;AAAA,EAClB,CAAC,SAAS,MAAM,GAAG;AAAA,EACnB,CAAC,SAAS,MAAM,GAAG;AAAA,EACnB,CAAC,SAAS,KAAK,GAAG;AAAA,EAClB,CAAC,SAAS,OAAO,GAAG;AAAA,EACpB,CAAC,SAAS,gBAAgB,GAAG;AAAA,EAC7B,CAAC,SAAS,mBAAmB,GAAG;AAAA,EAChC,CAAC,SAAS,UAAU,GAAG;AAAA,EACvB,CAAC,SAAS,OAAO,GAAG;AAAA,EACpB,CAAC,SAAS,+BAA+B,GAAG;AAAA,EAC5C,CAAC,SAAS,QAAQ,GAAG;AAAA,EACrB,CAAC,SAAS,OAAO,GAAG;AAAA,EACpB,CAAC,SAAS,OAAO,GAAG;AAAA,EACpB,CAAC,SAAS,QAAQ,GAAG;AAAA,EACrB,CAAC,SAAS,MAAM,GAAG;AAAA,EACnB,CAAC,SAAS,QAAQ,GAAG;AAAA,EACrB,CAAC,SAAS,MAAM,GAAG;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4C,oBAAI,IAAI,CAAC,QAAQ,OAAO,MAAM,CAAC;AAEjF,IAAK,YAAL,kBAAKA,eAAL;AACH,EAAAA,WAAA,iBAAc;AACd,EAAAA,WAAA,iBAAc;AAFN,SAAAA;AAAA,GAAA;","names":["LocaleDir"]}
1
+ {"version":3,"sources":["../../src/types/locale.ts"],"sourcesContent":["import {Language} from \"@typing/language\";\n\nexport {Language};\n\nexport const RtlLanguages: ReadonlySet<Language> = new Set([Language.Arabic, Language.Persian, Language.Hebrew]);\n\nexport const LocaleNestedKeysSeparator = \".\";\n\nexport const LocaleKeysSeparator = \"_\";\n\nexport const LocaleValuesSeparator = \"|\";\n\nexport const LocaleCustomKeyForLanguage = \"locale\";\n\nexport const LocaleKeyMarker = \"@\";\n\nexport const LanguageCodes: ReadonlySet<string> = new Set(Object.values(Language));\n\n/** Native language names, independent of the selected UI language. */\nexport const LanguageNames: Readonly<Record<Language, string>> = Object.freeze({\n [Language.Arabic]: \"العربية\",\n [Language.Amharic]: \"አማርኛ\",\n [Language.Bulgarian]: \"Български\",\n [Language.Bengali]: \"বাংলা\",\n [Language.Catalan]: \"Català\",\n [Language.Czech]: \"Čeština\",\n [Language.Danish]: \"Dansk\",\n [Language.German]: \"Deutsch\",\n [Language.Greek]: \"Ελληνικά\",\n [Language.English]: \"English\",\n [Language.EnglishAustralia]: \"English (Australia)\",\n [Language.EnglishGreatBritain]: \"English (United Kingdom)\",\n [Language.EnglishUSA]: \"English (United States)\",\n [Language.Spanish]: \"Español\",\n [Language.SpanishLatinAmericaAndCaribbean]: \"Español (Latinoamérica y el Caribe)\",\n [Language.Estonian]: \"Eesti\",\n [Language.Persian]: \"فارسی\",\n [Language.Finnish]: \"Suomi\",\n [Language.Filipino]: \"Filipino\",\n [Language.French]: \"Français\",\n [Language.Gujarati]: \"ગુજરાતી\",\n [Language.Hebrew]: \"עברית\",\n [Language.Hindi]: \"हिन्दी\",\n [Language.Croatian]: \"Hrvatski\",\n [Language.Hungarian]: \"Magyar\",\n [Language.Indonesian]: \"Bahasa Indonesia\",\n [Language.Italian]: \"Italiano\",\n [Language.Japanese]: \"日本語\",\n [Language.Kannada]: \"ಕನ್ನಡ\",\n [Language.Korean]: \"한국어\",\n [Language.Lithuanian]: \"Lietuvių\",\n [Language.Latvian]: \"Latviešu\",\n [Language.Malayalam]: \"മലയാളം\",\n [Language.Marathi]: \"मराठी\",\n [Language.Malay]: \"Bahasa Melayu\",\n [Language.Dutch]: \"Nederlands\",\n [Language.Norwegian]: \"Norsk\",\n [Language.Polish]: \"Polski\",\n [Language.PortugueseBrazil]: \"Português (Brasil)\",\n [Language.PortuguesePortugal]: \"Português (Portugal)\",\n [Language.Romanian]: \"Română\",\n [Language.Russian]: \"Русский\",\n [Language.Slovak]: \"Slovenčina\",\n [Language.Slovenian]: \"Slovenščina\",\n [Language.Serbian]: \"Српски\",\n [Language.Swedish]: \"Svenska\",\n [Language.Swahili]: \"Kiswahili\",\n [Language.Tamil]: \"தமிழ்\",\n [Language.Telugu]: \"తెలుగు\",\n [Language.Thai]: \"ไทย\",\n [Language.Turkish]: \"Türkçe\",\n [Language.Ukrainian]: \"Українська\",\n [Language.Vietnamese]: \"Tiếng Việt\",\n [Language.ChineseChina]: \"中文(简体)\",\n [Language.ChineseTaiwan]: \"中文(繁體)\",\n});\n\nexport const LocaleFileExtensions: ReadonlySet<string> = new Set([\"yaml\", \"yml\", \"json\"]);\n\nexport enum LocaleDir {\n RightToLeft = \"rtl\",\n LeftToRight = \"ltr\",\n}\n\nexport type LocaleValue = string | number | Array<string | number>;\n\nexport type LocaleData = {\n [key: string]: LocaleValue | LocaleData;\n};\n\nexport type LocaleItems = Map<string, string>;\n\nexport type LocaleKeys = ReadonlySet<string>;\n\nexport type LocaleMessages = {\n [key: string]: {\n message: string;\n placeholders?: Record<string, {content: string}>;\n };\n};\n\nexport interface LocaleBuilder {\n lang(): Language;\n\n merge(data: LocaleData): this;\n\n build(): LocaleMessages;\n\n get(): LocaleItems;\n\n keys(): LocaleKeys;\n\n structure(): LocaleStructure;\n\n isValid(): boolean;\n\n validate(): this;\n}\n\nexport type LocaleBuilders = Map<Language, LocaleBuilder>;\n\n/** Completed messages keyed by language and browser-compatible message key. */\nexport type LocaleCatalogue = Partial<Record<Language, Record<string, string>>>;\n\nexport interface LocaleValidator {\n isValid(locale: LocaleBuilder): boolean;\n\n validate(locale: LocaleBuilder): this;\n}\n\nexport interface LocaleContractValidator {\n isValid(builders: LocaleBuilders): boolean;\n\n validate(builders: LocaleBuilders): this;\n}\n\nexport interface LocaleFutures {\n plural: boolean;\n substitutions: readonly string[];\n}\n\nexport interface LocaleStructure {\n [key: string]: LocaleFutures;\n}\n\n/**\n * Empty because translation keys and their plural/substitution contracts belong to the consuming application.\n * Generated `.adnbn/locale.d.ts` declarations populate it by augmenting `adnbn/locale`.\n */\nexport interface LocaleRegistry {}\n\nexport type LocaleNonPluralKeys<T> = {\n [K in keyof T]: T[K] extends {plural: false} ? K : never;\n}[keyof T] &\n string;\n\nexport type LocalePluralKeys<T> = {\n [K in keyof T]: T[K] extends {plural: true} ? K : never;\n}[keyof T] &\n string;\n\nexport type LocaleSubstitutionValue = string | number;\n\nexport type LocaleSubstitutionKeys<T, K extends keyof T> = T[K] extends {substitutions: readonly (infer U)[]}\n ? U & string\n : never;\n\nexport type LocaleSubstitutionsFor<T, K extends keyof T> = [LocaleSubstitutionKeys<T, K>] extends [never]\n ? never\n : Record<LocaleSubstitutionKeys<T, K>, LocaleSubstitutionValue>;\n\nexport type LocaleSubstitutionArgs<T, K extends keyof T> = string extends keyof T\n ? [substitutions?: Record<string, LocaleSubstitutionValue>]\n : [LocaleSubstitutionKeys<T, K>] extends [never]\n ? []\n : [substitutions: LocaleSubstitutionsFor<T, K>];\n\nexport interface LocaleProvider<S> {\n /** Currently selected language code. */\n lang(): Language;\n\n /** Available language codes. */\n langs(): ReadonlySet<Language>;\n\n /** Native names keyed by the available language codes. */\n langNames(): ReadonlyMap<Language, string>;\n\n keys(): ReadonlySet<keyof S>;\n\n // non-plural keys\n trans<K extends LocaleNonPluralKeys<S>>(key: K, ...args: LocaleSubstitutionArgs<S, K>): string;\n\n // plural keys\n choice<K extends LocalePluralKeys<S>>(key: K, count: number, ...args: LocaleSubstitutionArgs<S, K>): string;\n}\n\nexport interface LocaleDynamicProvider<S> extends LocaleProvider<S> {\n change(lang: Language): Promise<Language>;\n}\n\n/** Read-only message access for one selected language. */\nexport interface LocaleSnapshot<S> {\n readonly lang: () => Language;\n readonly langs: () => ReadonlySet<Language>;\n readonly langNames: () => ReadonlyMap<Language, string>;\n readonly get: <K extends keyof S & string>(key: K) => string;\n}\n\n/** Persists one language selection independently of the application's translation catalogue. */\nexport interface LocaleStorageDriver {\n /** No saved selection leaves the provider's current language unchanged. */\n get(): Promise<Language | undefined>;\n\n set(lang: Language): Promise<void>;\n\n /** Observes valid selections, including own writes; does not emit an initial value or deletions. */\n watch(handler: (lang: Language) => void): () => void;\n}\n"],"mappings":"AAAA,SAAQ,gBAAe;AAIhB,MAAM,eAAsC,oBAAI,IAAI,CAAC,SAAS,QAAQ,SAAS,SAAS,SAAS,MAAM,CAAC;AAExG,MAAM,4BAA4B;AAElC,MAAM,sBAAsB;AAE5B,MAAM,wBAAwB;AAE9B,MAAM,6BAA6B;AAEnC,MAAM,kBAAkB;AAExB,MAAM,gBAAqC,IAAI,IAAI,OAAO,OAAO,QAAQ,CAAC;AAG1E,MAAM,gBAAoD,OAAO,OAAO;AAAA,EAC3E,CAAC,SAAS,MAAM,GAAG;AAAA,EACnB,CAAC,SAAS,OAAO,GAAG;AAAA,EACpB,CAAC,SAAS,SAAS,GAAG;AAAA,EACtB,CAAC,SAAS,OAAO,GAAG;AAAA,EACpB,CAAC,SAAS,OAAO,GAAG;AAAA,EACpB,CAAC,SAAS,KAAK,GAAG;AAAA,EAClB,CAAC,SAAS,MAAM,GAAG;AAAA,EACnB,CAAC,SAAS,MAAM,GAAG;AAAA,EACnB,CAAC,SAAS,KAAK,GAAG;AAAA,EAClB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M,GAAG;AAAA,EACnB,CAAC,SAAS,SAAS,GAAG;AAAA,EACtB,CAAC,SAAS,OAAO,GAAG;AAAA,EACpB,CAAC,SAAS,OAAO,GAAG;AAAA,EACpB,CAAC,SAAS,OAAO,GAAG;AAAA,EACpB,CAAC,SAAS,KAAK,GAAG;AAAA,EAClB,CAAC,SAAS,MAAM,GAAG;AAAA,EACnB,CAAC,SAAS,IAAI,GAAG;AAAA,EACjB,CAAC,SAAS,OAAO,GAAG;AAAA,EACpB,CAAC,SAAS,SAAS,GAAG;AAAA,EACtB,CAAC,SAAS,UAAU,GAAG;AAAA,EACvB,CAAC,SAAS,YAAY,GAAG;AAAA,EACzB,CAAC,SAAS,aAAa,GAAG;AAC9B,CAAC;AAEM,MAAM,uBAA4C,oBAAI,IAAI,CAAC,QAAQ,OAAO,MAAM,CAAC;AAEjF,IAAK,YAAL,kBAAKA,eAAL;AACH,EAAAA,WAAA,iBAAc;AACd,EAAAA,WAAA,iBAAc;AAFN,SAAAA;AAAA,GAAA;","names":["LocaleDir"]}
@@ -1,4 +1,4 @@
1
- import { ContentScriptConfig } from "./content.js";
1
+ import { ContentScriptConfig } from "./content/index.js";
2
2
  import { BackgroundConfig } from "./background.js";
3
3
  import { CommandConfig } from "./command.js";
4
4
  import { Language } from "./locale.js";
@@ -1,5 +1,5 @@
1
1
  import { EntrypointOptions } from "./entrypoint.js";
2
- import { ContentScriptConfig, ContentScriptContext, ContentScriptDefinition, ContentScriptEntrypointOptions } from "./content.js";
2
+ import { ContentScriptConfig, ContentScriptContext, ContentScriptDefinitionBase, ContentScriptRenderDefinition, ContentScriptEntrypointOptions, ContentScriptIsolation } from "./content/index.js";
3
3
  import { TransportConfig, TransportDefinition, TransportType, type TransportProxyTarget, type TransportTarget } from "./transport.js";
4
4
  import { Awaiter } from "./helpers.js";
5
5
  import type { MessageError } from "./message.js";
@@ -147,10 +147,9 @@ export type RelayOptions = RelayConfig & EntrypointOptions;
147
147
  export type RelayOptionsMap = Map<string, RelayOptions>;
148
148
  export type RelayEntrypointOptions = Partial<RelayOptions> & Pick<ContentScriptEntrypointOptions, "isolation">;
149
149
  export type RelayMainHandler<T extends TransportType> = (relay: T, context: ContentScriptContext, options: RelayEntrypointOptions) => Awaiter<void>;
150
- type RelayContentDefinition<T = ContentScriptDefinition> = T extends unknown ? Omit<T, "main" | "allFrames"> : never;
151
- export type RelayDefinition<T extends TransportType> = Omit<TransportDefinition<RelayOptions, T>, "main"> & RelayContentDefinition & Partial<RelayOptions> & {
150
+ export type RelayDefinition<T extends TransportType, Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> = Omit<TransportDefinition<RelayOptions, T>, "main"> & Omit<ContentScriptDefinitionBase<Data>, "main" | "allFrames"> & ContentScriptRenderDefinition<Data, Isolation> & Partial<RelayOptions> & {
152
151
  main?: RelayMainHandler<T>;
153
152
  };
154
153
  /** Internal, merged runtime input. The public definition retains its discriminated union. */
155
- export type RelayUnresolvedDefinition<T extends TransportType> = Partial<Omit<RelayDefinition<T>, never>>;
154
+ export type RelayUnresolvedDefinition<T extends TransportType, Data = unknown, Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`> = Partial<Omit<RelayDefinition<T, Data, Isolation>, never>>;
156
155
  export {};
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/relay.ts"],"sourcesContent":["import {EntrypointOptions} from \"@typing/entrypoint\";\nimport {\n ContentScriptConfig,\n ContentScriptContext,\n ContentScriptDefinition,\n ContentScriptEntrypointOptions,\n} from \"@typing/content\";\nimport {\n TransportConfig,\n TransportDefinition,\n TransportType,\n type TransportProxyTarget,\n type TransportTarget,\n} from \"@typing/transport\";\nimport {Awaiter} from \"@typing/helpers\";\nimport type {MessageError} from \"@typing/message\";\n\nexport const RelayGlobalKey = \"adnbnRelay\";\n\nexport enum RelayMethod {\n Scripting = \"scripting\",\n Messaging = \"messaging\",\n}\n\nexport enum RelayAllFrames {\n /**\n * Executes the method in every frame reached by the selected transport and returns one outcome:\n * Scripting prefers a fulfilled result, while Messaging returns the first response.\n *\n * Warning: mutating methods can execute in multiple frames even though only one outcome is returned.\n */\n Any = \"any\",\n\n /** Executes the method in every discovered frame and returns an outcome for each frame. */\n All = \"all\",\n}\n\nexport enum RelayFrameErrorKind {\n Remote = \"remote\",\n Execution = \"execution\",\n Delivery = \"delivery\",\n Timeout = \"timeout\",\n TargetGone = \"target-gone\",\n Unobservable = \"unobservable\",\n}\n\n/**\n * Empty because relay names and contracts belong to the consuming application.\n * Generated `.adnbn/relay.d.ts` declarations populate it by augmenting `adnbn/relay`.\n */\nexport interface RelayRegistry {}\n\nexport type RelayName = Extract<keyof RelayRegistry, string>;\n\nexport type RelayNonEmptyReadonlyArray<T> = readonly [T, ...T[]];\n\nexport interface RelayExecutionOptions {\n /** Maximum execution time per addressed Messaging frame or for the Inject Script operation. */\n timeoutMs?: number;\n}\n\ninterface RelayTargetBase extends RelayExecutionOptions {\n tabId: number;\n}\n\nexport interface RelayTopFrameOptions extends RelayTargetBase {\n allFrames?: false;\n frameId?: never;\n frameIds?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport interface RelayFrameOptions extends RelayTargetBase {\n frameId: number;\n allFrames?: never;\n frameIds?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport interface RelayFramesOptions extends RelayTargetBase {\n frameIds: RelayNonEmptyReadonlyArray<number>;\n allFrames?: never;\n frameId?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport interface RelayDocumentOptions extends RelayTargetBase {\n documentId: string;\n allFrames?: never;\n frameId?: never;\n frameIds?: never;\n documentIds?: never;\n}\n\nexport interface RelayDocumentsOptions extends RelayTargetBase {\n documentIds: RelayNonEmptyReadonlyArray<string>;\n allFrames?: never;\n frameId?: never;\n frameIds?: never;\n documentId?: never;\n}\n\n/**\n * Broadcasts the call to all frames without requiring an exhaustive frame list and returns one outcome.\n * `true` is an alias for `RelayAllFrames.Any`.\n *\n * Warning: mutating methods can execute in multiple frames even though only one outcome is returned.\n */\nexport interface RelayAnyFramesOptions extends RelayTargetBase {\n allFrames: true | RelayAllFrames.Any;\n frameId?: never;\n frameIds?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport interface RelayEveryFrameOptions extends RelayTargetBase {\n allFrames: RelayAllFrames.All;\n frameId?: never;\n frameIds?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport type RelayAllFramesOptions = RelayAnyFramesOptions | RelayEveryFrameOptions;\n\nexport type RelayScalarOptions = RelayTopFrameOptions | RelayFrameOptions | RelayDocumentOptions;\n\nexport type RelayBatchOptions = RelayFramesOptions | RelayDocumentsOptions | RelayAllFramesOptions;\n\nexport type RelayCallOptions = RelayScalarOptions | RelayBatchOptions;\n\nexport type RelayAddressTarget =\n | {\n tabId: number;\n frameId: number;\n documentId?: string;\n allFrames?: never;\n }\n | {\n tabId: number;\n frameId?: never;\n documentId: string;\n allFrames?: never;\n };\n\nexport type RelayOperationTarget = {\n tabId: number;\n allFrames: RelayAllFrames;\n frameId?: never;\n documentId?: never;\n};\n\nexport type RelayResultTarget = RelayAddressTarget | RelayOperationTarget;\n\nexport interface RelayFrameError extends MessageError {\n kind: RelayFrameErrorKind;\n}\n\nexport type RelayFrameResult<T> =\n | {\n target: RelayResultTarget;\n status: \"fulfilled\";\n result: T;\n }\n | {\n target: RelayResultTarget;\n status: \"rejected\";\n error: RelayFrameError;\n };\n\nexport type RelayFramesResult<T> = readonly RelayFrameResult<T>[];\n\nexport type RelayBatchRpcProxy<T> = {\n [K in keyof T]: T[K] extends (...args: any[]) => any\n ? (...args: Parameters<T[K]>) => Promise<RelayFramesResult<Awaited<ReturnType<T[K]>>>>\n : T[K] extends object\n ? RelayBatchRpcProxyObject<T[K]>\n : () => Promise<RelayFramesResult<Awaited<T[K]>>>;\n};\n\nexport type RelayBatchRpcProxyObject<T> = (() => Promise<RelayFramesResult<Awaited<T>>>) & RelayBatchRpcProxy<T>;\n\nexport type RelayTarget<N extends keyof RelayRegistry> = TransportTarget<RelayRegistry, N>;\n\nexport type RelayProxyTarget<N extends keyof RelayRegistry> = TransportProxyTarget<RelayRegistry, N>;\n\nexport type RelayBatchProxyTarget<N extends keyof RelayRegistry> = RelayBatchRpcProxy<RelayRegistry[N]>;\n\nexport interface RelayConfig extends TransportConfig, Omit<ContentScriptConfig, \"allFrames\"> {\n allFrames?: boolean | RelayAllFrames;\n method?: RelayMethod;\n}\n\nexport type RelayOptions = RelayConfig & EntrypointOptions;\n\nexport type RelayOptionsMap = Map<string, RelayOptions>;\n\nexport type RelayEntrypointOptions = Partial<RelayOptions> & Pick<ContentScriptEntrypointOptions, \"isolation\">;\n\nexport type RelayMainHandler<T extends TransportType> = (\n relay: T,\n context: ContentScriptContext,\n options: RelayEntrypointOptions\n) => Awaiter<void>;\n\ntype RelayContentDefinition<T = ContentScriptDefinition> = T extends unknown ? Omit<T, \"main\" | \"allFrames\"> : never;\n\nexport type RelayDefinition<T extends TransportType> = Omit<TransportDefinition<RelayOptions, T>, \"main\"> &\n RelayContentDefinition &\n Partial<RelayOptions> & {\n main?: RelayMainHandler<T>;\n };\n\n/** Internal, merged runtime input. The public definition retains its discriminated union. */\nexport type RelayUnresolvedDefinition<T extends TransportType> = Partial<Omit<RelayDefinition<T>, never>>;\n"],"mappings":"AAiBO,MAAM,iBAAiB;AAEvB,IAAK,cAAL,kBAAKA,iBAAL;AACH,EAAAA,aAAA,eAAY;AACZ,EAAAA,aAAA,eAAY;AAFJ,SAAAA;AAAA,GAAA;AAKL,IAAK,iBAAL,kBAAKC,oBAAL;AAOH,EAAAA,gBAAA,SAAM;AAGN,EAAAA,gBAAA,SAAM;AAVE,SAAAA;AAAA,GAAA;AAaL,IAAK,sBAAL,kBAAKC,yBAAL;AACH,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,eAAY;AACZ,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,aAAU;AACV,EAAAA,qBAAA,gBAAa;AACb,EAAAA,qBAAA,kBAAe;AANP,SAAAA;AAAA,GAAA;","names":["RelayMethod","RelayAllFrames","RelayFrameErrorKind"]}
1
+ {"version":3,"sources":["../../src/types/relay.ts"],"sourcesContent":["import {EntrypointOptions} from \"@typing/entrypoint\";\n\nimport {\n ContentScriptConfig,\n ContentScriptContext,\n ContentScriptDefinitionBase,\n ContentScriptRenderDefinition,\n ContentScriptEntrypointOptions,\n ContentScriptIsolation,\n} from \"@typing/content\";\n\nimport {\n TransportConfig,\n TransportDefinition,\n TransportType,\n type TransportProxyTarget,\n type TransportTarget,\n} from \"@typing/transport\";\n\nimport {Awaiter} from \"@typing/helpers\";\nimport type {MessageError} from \"@typing/message\";\n\nexport const RelayGlobalKey = \"adnbnRelay\";\n\nexport enum RelayMethod {\n Scripting = \"scripting\",\n Messaging = \"messaging\",\n}\n\nexport enum RelayAllFrames {\n /**\n * Executes the method in every frame reached by the selected transport and returns one outcome:\n * Scripting prefers a fulfilled result, while Messaging returns the first response.\n *\n * Warning: mutating methods can execute in multiple frames even though only one outcome is returned.\n */\n Any = \"any\",\n\n /** Executes the method in every discovered frame and returns an outcome for each frame. */\n All = \"all\",\n}\n\nexport enum RelayFrameErrorKind {\n Remote = \"remote\",\n Execution = \"execution\",\n Delivery = \"delivery\",\n Timeout = \"timeout\",\n TargetGone = \"target-gone\",\n Unobservable = \"unobservable\",\n}\n\n/**\n * Empty because relay names and contracts belong to the consuming application.\n * Generated `.adnbn/relay.d.ts` declarations populate it by augmenting `adnbn/relay`.\n */\nexport interface RelayRegistry {}\n\nexport type RelayName = Extract<keyof RelayRegistry, string>;\n\nexport type RelayNonEmptyReadonlyArray<T> = readonly [T, ...T[]];\n\nexport interface RelayExecutionOptions {\n /** Maximum execution time per addressed Messaging frame or for the Inject Script operation. */\n timeoutMs?: number;\n}\n\ninterface RelayTargetBase extends RelayExecutionOptions {\n tabId: number;\n}\n\nexport interface RelayTopFrameOptions extends RelayTargetBase {\n allFrames?: false;\n frameId?: never;\n frameIds?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport interface RelayFrameOptions extends RelayTargetBase {\n frameId: number;\n allFrames?: never;\n frameIds?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport interface RelayFramesOptions extends RelayTargetBase {\n frameIds: RelayNonEmptyReadonlyArray<number>;\n allFrames?: never;\n frameId?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport interface RelayDocumentOptions extends RelayTargetBase {\n documentId: string;\n allFrames?: never;\n frameId?: never;\n frameIds?: never;\n documentIds?: never;\n}\n\nexport interface RelayDocumentsOptions extends RelayTargetBase {\n documentIds: RelayNonEmptyReadonlyArray<string>;\n allFrames?: never;\n frameId?: never;\n frameIds?: never;\n documentId?: never;\n}\n\n/**\n * Broadcasts the call to all frames without requiring an exhaustive frame list and returns one outcome.\n * `true` is an alias for `RelayAllFrames.Any`.\n *\n * Warning: mutating methods can execute in multiple frames even though only one outcome is returned.\n */\nexport interface RelayAnyFramesOptions extends RelayTargetBase {\n allFrames: true | RelayAllFrames.Any;\n frameId?: never;\n frameIds?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport interface RelayEveryFrameOptions extends RelayTargetBase {\n allFrames: RelayAllFrames.All;\n frameId?: never;\n frameIds?: never;\n documentId?: never;\n documentIds?: never;\n}\n\nexport type RelayAllFramesOptions = RelayAnyFramesOptions | RelayEveryFrameOptions;\n\nexport type RelayScalarOptions = RelayTopFrameOptions | RelayFrameOptions | RelayDocumentOptions;\n\nexport type RelayBatchOptions = RelayFramesOptions | RelayDocumentsOptions | RelayAllFramesOptions;\n\nexport type RelayCallOptions = RelayScalarOptions | RelayBatchOptions;\n\nexport type RelayAddressTarget =\n | {\n tabId: number;\n frameId: number;\n documentId?: string;\n allFrames?: never;\n }\n | {\n tabId: number;\n frameId?: never;\n documentId: string;\n allFrames?: never;\n };\n\nexport type RelayOperationTarget = {\n tabId: number;\n allFrames: RelayAllFrames;\n frameId?: never;\n documentId?: never;\n};\n\nexport type RelayResultTarget = RelayAddressTarget | RelayOperationTarget;\n\nexport interface RelayFrameError extends MessageError {\n kind: RelayFrameErrorKind;\n}\n\nexport type RelayFrameResult<T> =\n | {\n target: RelayResultTarget;\n status: \"fulfilled\";\n result: T;\n }\n | {\n target: RelayResultTarget;\n status: \"rejected\";\n error: RelayFrameError;\n };\n\nexport type RelayFramesResult<T> = readonly RelayFrameResult<T>[];\n\nexport type RelayBatchRpcProxy<T> = {\n [K in keyof T]: T[K] extends (...args: any[]) => any\n ? (...args: Parameters<T[K]>) => Promise<RelayFramesResult<Awaited<ReturnType<T[K]>>>>\n : T[K] extends object\n ? RelayBatchRpcProxyObject<T[K]>\n : () => Promise<RelayFramesResult<Awaited<T[K]>>>;\n};\n\nexport type RelayBatchRpcProxyObject<T> = (() => Promise<RelayFramesResult<Awaited<T>>>) & RelayBatchRpcProxy<T>;\n\nexport type RelayTarget<N extends keyof RelayRegistry> = TransportTarget<RelayRegistry, N>;\n\nexport type RelayProxyTarget<N extends keyof RelayRegistry> = TransportProxyTarget<RelayRegistry, N>;\n\nexport type RelayBatchProxyTarget<N extends keyof RelayRegistry> = RelayBatchRpcProxy<RelayRegistry[N]>;\n\nexport interface RelayConfig extends TransportConfig, Omit<ContentScriptConfig, \"allFrames\"> {\n allFrames?: boolean | RelayAllFrames;\n method?: RelayMethod;\n}\n\nexport type RelayOptions = RelayConfig & EntrypointOptions;\n\nexport type RelayOptionsMap = Map<string, RelayOptions>;\n\nexport type RelayEntrypointOptions = Partial<RelayOptions> & Pick<ContentScriptEntrypointOptions, \"isolation\">;\n\nexport type RelayMainHandler<T extends TransportType> = (\n relay: T,\n context: ContentScriptContext,\n options: RelayEntrypointOptions\n) => Awaiter<void>;\n\nexport type RelayDefinition<\n T extends TransportType,\n Data = unknown,\n Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`,\n> = Omit<TransportDefinition<RelayOptions, T>, \"main\"> &\n Omit<ContentScriptDefinitionBase<Data>, \"main\" | \"allFrames\"> &\n ContentScriptRenderDefinition<Data, Isolation> &\n Partial<RelayOptions> & {\n main?: RelayMainHandler<T>;\n };\n\n/** Internal, merged runtime input. The public definition retains its discriminated union. */\nexport type RelayUnresolvedDefinition<\n T extends TransportType,\n Data = unknown,\n Isolation extends `${ContentScriptIsolation}` = `${ContentScriptIsolation}`,\n> = Partial<Omit<RelayDefinition<T, Data, Isolation>, never>>;\n"],"mappings":"AAsBO,MAAM,iBAAiB;AAEvB,IAAK,cAAL,kBAAKA,iBAAL;AACH,EAAAA,aAAA,eAAY;AACZ,EAAAA,aAAA,eAAY;AAFJ,SAAAA;AAAA,GAAA;AAKL,IAAK,iBAAL,kBAAKC,oBAAL;AAOH,EAAAA,gBAAA,SAAM;AAGN,EAAAA,gBAAA,SAAM;AAVE,SAAAA;AAAA,GAAA;AAaL,IAAK,sBAAL,kBAAKC,yBAAL;AACH,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,eAAY;AACZ,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,aAAU;AACV,EAAAA,qBAAA,gBAAa;AACb,EAAAA,qBAAA,kBAAe;AANP,SAAAA;AAAA,GAAA;","names":["RelayMethod","RelayAllFrames","RelayFrameErrorKind"]}
@@ -10,9 +10,10 @@ declare module "#adnbn/page" {
10
10
  export const aliases: typeof import("./page.js").aliases;
11
11
  }
12
12
 
13
- declare module "#adnbn/entrypoint" {
14
- export const readAssets: typeof import("./entrypoint.js").readAssets;
15
- export const readAssetsMap: typeof import("./entrypoint.js").readAssetsMap;
13
+ declare module "#adnbn/runtime" {
14
+ export const readAssets: typeof import("./runtime.js").readAssets;
15
+ export const readAssetsMap: typeof import("./runtime.js").readAssetsMap;
16
+ export const readContentStyles: typeof import("./runtime.js").readContentStyles;
16
17
  }
17
18
 
18
19
  declare module "#adnbn/relay" {
@@ -1,5 +1,8 @@
1
1
  import type { EntrypointAssets, EntrypointAssetsMap } from "../types/entrypoint.js";
2
+ import type { ContentScriptStylesRuntime } from "../types/content/index.js";
2
3
  /** Package fallback; extension builds provide access to their own bundler runtime. */
3
4
  export declare const readAssets: () => EntrypointAssets | undefined;
4
5
  /** Package fallback; the complete map is supplied only by a consuming background runtime. */
5
6
  export declare const readAssetsMap: () => EntrypointAssetsMap | undefined;
7
+ /** Package fallback; isolated content builds supply their own styles runtime. */
8
+ export declare const readContentStyles: () => ContentScriptStylesRuntime | undefined;
@@ -0,0 +1,9 @@
1
+ const readAssets = () => void 0;
2
+ const readAssetsMap = () => void 0;
3
+ const readContentStyles = () => void 0;
4
+ export {
5
+ readAssets,
6
+ readAssetsMap,
7
+ readContentStyles
8
+ };
9
+ //# sourceMappingURL=runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/virtual/runtime.ts"],"sourcesContent":["import type {EntrypointAssets, EntrypointAssetsMap} from \"@typing/entrypoint\";\nimport type {ContentScriptStylesRuntime} from \"@typing/content\";\n\n/** Package fallback; extension builds provide access to their own bundler runtime. */\nexport const readAssets = (): EntrypointAssets | undefined => undefined;\n\n/** Package fallback; the complete map is supplied only by a consuming background runtime. */\nexport const readAssetsMap = (): EntrypointAssetsMap | undefined => undefined;\n\n/** Package fallback; isolated content builds supply their own styles runtime. */\nexport const readContentStyles = (): ContentScriptStylesRuntime | undefined => undefined;\n"],"mappings":"AAIO,MAAM,aAAa,MAAoC;AAGvD,MAAM,gBAAgB,MAAuC;AAG7D,MAAM,oBAAoB,MAA8C;","names":[]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adnbn",
3
3
  "type": "module",
4
- "version": "0.11.0",
4
+ "version": "0.13.0",
5
5
  "description": "Addon Bone - Cross-browser web extension framework with shared code base",
6
6
  "homepage": "https://addonbone.com",
7
7
  "author": "Anjey Tsibylskij (https://github.com/atldays)",
@@ -55,10 +55,6 @@
55
55
  "types": "./dist/entry/*/index.d.ts",
56
56
  "default": "./dist/entry/*/index.js"
57
57
  },
58
- "./entry/content/frame": {
59
- "types": "./dist/entry/content/frame/index.d.ts",
60
- "default": "./dist/entry/content/frame/index.js"
61
- },
62
58
  "./entry/content/*": {
63
59
  "types": "./dist/entry/content/adapters/*/index.d.ts",
64
60
  "default": "./dist/entry/content/adapters/*/index.js"
@@ -67,6 +63,10 @@
67
63
  "types": "./dist/entry/view/adapters/*/index.d.ts",
68
64
  "default": "./dist/entry/view/adapters/*/index.js"
69
65
  },
66
+ "./content": {
67
+ "types": "./dist/content/index.d.ts",
68
+ "default": "./dist/content/index.js"
69
+ },
70
70
  "./locale": {
71
71
  "types": "./dist/locale/index.d.ts",
72
72
  "default": "./dist/locale/index.js"
@@ -116,26 +116,32 @@
116
116
  "format": "prettier --write .",
117
117
  "typecheck": "tsc -p tsconfig.json --noEmit",
118
118
  "prepare:integration": "npm run build && tsx tests/integration/prepare.ts",
119
- "typecheck:integration": "npm run prepare:integration && tsx tests/integration/typecheck.ts",
120
- "test:integration": "npm run test -- --testPathPatterns=tests/integration --runInBand",
121
- "test:integration:build": "npm run test -- --testPathPatterns=tests/integration/build --runInBand",
119
+ "typecheck:integration": "npm run build && tsx tests/integration/typecheck.ts --prepare",
120
+ "test:integration": "npm run build && node scripts/test-run.mjs --selectProjects build types chrome firefox",
121
+ "test:integration:build": "npm run test:build --",
122
122
  "check:node-version": "node ./scripts/check-node-version.js",
123
- "test": "npm run build && jest",
124
- "test:ci": "npm run test -- --ci --passWithNoTests --coverage",
125
- "test:ci:non-browser": "npm run test -- --ci --passWithNoTests --coverage --testPathIgnorePatterns=tests/integration/browser",
126
- "test:watch": "jest --watch --testPathIgnorePatterns=tests/integration/browser",
127
- "test:offscreen": "jest --testPathPatterns=Offscreen",
128
- "test:chrome": "npm run test -- --testPathPatterns=tests/integration/browser --testPathIgnorePatterns=firefox.integration.test --runInBand",
129
- "test:firefox": "npm run test -- --testPathPatterns=firefox.integration.test --runInBand",
130
- "test:message": "jest --testPathPatterns=src/message",
131
- "test:service": "jest --testPathPatterns=Service",
132
- "test:relay": "jest --testPathPatterns=Relay",
133
- "test:locale": "jest --testPathPatterns=Locale",
134
- "test:manifest": "jest --testPathPatterns=src/cli/builders/manifest",
135
- "test:entrypoint": "jest --testPathPatterns=src/cli/entrypoint",
136
- "test:plugins": "jest --testPathPatterns=src/cli/plugins",
123
+ "test": "npm run build && node scripts/test-run.mjs",
124
+ "test:ci": "npm run test -- --ci --coverage",
125
+ "test:ci:non-browser": "npm run test -- --ci --coverage --selectProjects unit-node unit-dom build types",
126
+ "test:watch": "node scripts/test-run.mjs --selectProjects unit-node unit-dom --watch",
127
+ "test:offscreen": "node scripts/test-run.mjs --testPathPatterns=Offscreen",
128
+ "test:chrome": "npm run build && node scripts/test-run.mjs --selectProjects chrome",
129
+ "test:firefox": "npm run build && node scripts/test-run.mjs --selectProjects firefox",
130
+ "test:message": "node scripts/test-run.mjs --testPathPatterns=src/message",
131
+ "test:service": "node scripts/test-run.mjs --testPathPatterns=Service",
132
+ "test:relay": "npm run test -- --testPathPatterns=Relay",
133
+ "test:locale": "npm run test -- --testPathPatterns=Locale",
134
+ "test:manifest": "node scripts/test-run.mjs --testPathPatterns=src/cli/builders/manifest",
135
+ "test:entrypoint": "node scripts/test-run.mjs --testPathPatterns=src/cli/entrypoint",
136
+ "test:plugins": "npm run test -- --testPathPatterns=src/cli/plugins",
137
137
  "release": "release-it",
138
- "release:preview": "release-it --no-github.release --no-npm.publish --no-git.tag --ci"
138
+ "release:preview": "release-it --no-github.release --no-npm.publish --no-git.tag --ci",
139
+ "test:unit": "node scripts/test-run.mjs --selectProjects unit-node unit-dom --verbose=false",
140
+ "test:build": "npm run build && node scripts/test-run.mjs --selectProjects build",
141
+ "test:types": "npm run typecheck:integration && node scripts/test-run.mjs --selectProjects types",
142
+ "test:inventory": "node scripts/test-inventory.mjs",
143
+ "test:pre-push": "tsx tests/pre-push.ts",
144
+ "test:run": "node scripts/test-run.mjs"
139
145
  },
140
146
  "dependencies": {
141
147
  "@addon-core/browser": "^0.7.2",
@@ -146,12 +152,10 @@
146
152
  "@rspack/core": "^1.7.5",
147
153
  "@rspack/lite-tapable": "^1.1.0",
148
154
  "@svgr/webpack": "^8.1.0",
149
- "await-lock": "^3.0.0",
150
155
  "c12": "^3.3.2",
151
156
  "cac": "^6.7.14",
152
157
  "consola": "^3.4.2",
153
158
  "css-loader": "^7.1.2",
154
- "debounce": "^2.2.0",
155
159
  "file-loader": "^6.2.0",
156
160
  "get-value": "^4.0.1",
157
161
  "html-rspack-tags-plugin": "^0.0.3",
@@ -203,6 +207,9 @@
203
207
  "glob": "^13.0.1",
204
208
  "globby": "^14.1.0",
205
209
  "husky": "^9.1.7",
210
+ "istanbul-lib-coverage": "^3.2.2",
211
+ "istanbul-lib-report": "^3.0.1",
212
+ "istanbul-reports": "^3.2.0",
206
213
  "jest": "^30.2.0",
207
214
  "jest-environment-jsdom": "^30.0.0",
208
215
  "jest-webextension-mock": "^4.0.0",
@@ -0,0 +1,12 @@
1
+ import {readFile} from "node:fs/promises";
2
+ import path from "node:path";
3
+ import coverage from "istanbul-lib-coverage";
4
+ import report from "istanbul-lib-report";
5
+ import reports from "istanbul-reports";
6
+
7
+ const files = process.argv.slice(2);
8
+ if (files.length < 2) throw new Error("Pass the unit and build coverage-final.json files");
9
+ const map = coverage.createCoverageMap({});
10
+ for (const file of files) map.merge(JSON.parse(await readFile(file, "utf8")));
11
+ const context = report.createContext({dir: path.resolve("coverage/merged"), coverageMap: map});
12
+ for (const format of ["json", "lcov", "text-summary"]) reports.create(format).execute(context);
@@ -0,0 +1,22 @@
1
+ import {execFileSync} from "node:child_process";
2
+ import path from "node:path";
3
+ import * as prettier from "prettier";
4
+
5
+ const root = path.resolve(import.meta.dirname, "..");
6
+ const git = args => execFileSync("git", args, {cwd: root, encoding: "utf8"});
7
+ const changed = git(["diff", "--cached", "--name-only", "--diff-filter=ACMR", "-z"]).split("\0").filter(Boolean);
8
+ const unformatted = [];
9
+
10
+ for (const file of changed) {
11
+ const filepath = path.join(root, file);
12
+ const info = await prettier.getFileInfo(filepath, {ignorePath: path.join(root, ".prettierignore")});
13
+ if (info.ignored || !info.inferredParser) continue;
14
+ // Check the staged contents; never rewrite unstaged work or silently stage it.
15
+ const contents = git(["show", `:${file}`]);
16
+ if (!(await prettier.check(contents, {...(await prettier.resolveConfig(filepath)), filepath})))
17
+ unformatted.push(file);
18
+ }
19
+ if (unformatted.length) {
20
+ console.error(`Format and stage these files before committing:\n${unformatted.join("\n")}`);
21
+ process.exit(1);
22
+ }
@@ -0,0 +1,38 @@
1
+ import assert from "node:assert/strict";
2
+ import {execFile} from "node:child_process";
3
+ import {existsSync} from "node:fs";
4
+ import path from "node:path";
5
+ import {promisify} from "node:util";
6
+
7
+ const execute = promisify(execFile);
8
+ const root = path.resolve(import.meta.dirname, "..");
9
+ const jest = path.join(root, "scripts/test-run.mjs");
10
+ const options = {cwd: root, maxBuffer: 10 * 1024 * 1024};
11
+ const {stdout: configuration} = await execute(process.execPath, [jest, "--showConfig"], options);
12
+ const projects = JSON.parse(configuration).configs.map(config => config.displayName.name);
13
+ const {stdout: tracked} = await execute(
14
+ "git",
15
+ ["ls-files", "--cached", "--others", "--exclude-standard", "-z"],
16
+ options
17
+ );
18
+ const expected = new Set(
19
+ tracked.split("\0").filter(file => file.endsWith(".test.ts") && existsSync(path.join(root, file)))
20
+ );
21
+ const owners = new Map();
22
+
23
+ for (const project of projects) {
24
+ const {stdout} = await execute(
25
+ process.execPath,
26
+ [jest, "--selectProjects", project, "--listTests", "--json", "--runInBand"],
27
+ options
28
+ );
29
+ const files = JSON.parse(stdout);
30
+ console.info(`${project}: ${files.length} files`);
31
+ for (const filename of files) {
32
+ const file = path.relative(root, filename).split(path.sep).join("/");
33
+ assert(!owners.has(file), `${file} belongs to both ${owners.get(file)} and ${project}`);
34
+ owners.set(file, project);
35
+ }
36
+ }
37
+ assert.deepEqual(new Set(owners.keys()), expected, "Every test file must belong to exactly one Jest project");
38
+ console.info(`${expected.size} test files, each in exactly one project`);
@@ -0,0 +1,25 @@
1
+ import {spawn} from "node:child_process";
2
+ import {constants} from "node:os";
3
+ import path from "node:path";
4
+
5
+ const root = path.resolve(import.meta.dirname, "..");
6
+ // Keep the workaround scoped to the environment where this project reproduces nodejs/node#62393.
7
+ const flags = process.platform === "darwin" && process.arch === "arm64" ? ["--no-sparkplug"] : [];
8
+ const child = spawn(
9
+ process.execPath,
10
+ [...flags, path.join(root, "node_modules/jest/bin/jest.js"), ...process.argv.slice(2)],
11
+ {stdio: "inherit"}
12
+ );
13
+
14
+ const forward = signal => child.kill(signal);
15
+ const signals = ["SIGINT", "SIGTERM", "SIGHUP"];
16
+ for (const signal of signals) process.on(signal, forward);
17
+ child.once("error", error => {
18
+ console.error(error);
19
+ process.exitCode = 1;
20
+ });
21
+ child.once("close", (code, signal) => {
22
+ for (const signal of signals) process.off(signal, forward);
23
+ if (signal) console.error(`Jest terminated with ${signal}`);
24
+ process.exitCode = code ?? (signal ? 128 + constants.signals[signal] : 1);
25
+ });
package/types/client.d.ts CHANGED
@@ -310,17 +310,17 @@ declare module "*?asis" {
310
310
  export default src;
311
311
  }
312
312
 
313
- declare module "*?isolation" {
313
+ declare module "*?unisolated" {
314
314
  const classes: Readonly<Record<string, string>>;
315
315
  export default classes;
316
316
  }
317
317
 
318
- declare module "*?isolation&asis" {
318
+ declare module "*?unisolated&asis" {
319
319
  const src: string;
320
320
  export default src;
321
321
  }
322
322
 
323
- declare module "*?asis&isolation" {
323
+ declare module "*?asis&unisolated" {
324
324
  const src: string;
325
325
  export default src;
326
326
  }
@@ -1,13 +0,0 @@
1
- export declare const EntrypointAssetsModule: {
2
- request: string;
3
- current: {
4
- export: string;
5
- property: string;
6
- };
7
- full: {
8
- export: string;
9
- property: string;
10
- };
11
- };
12
- /** Readers keep runtime data live without capturing a snapshot during module evaluation. */
13
- export declare const createEntrypointModule: () => string;
@@ -1,16 +0,0 @@
1
- import { RuntimeGlobals } from "@rspack/core";
2
- import { EntrypointAssetsMapRuntimeProperty, EntrypointAssetsRuntimeProperty } from "./../../../../types/entrypoint.js";
3
- const EntrypointAssetsModule = {
4
- request: "#adnbn/entrypoint",
5
- current: { export: "readAssets", property: EntrypointAssetsRuntimeProperty },
6
- full: { export: "readAssetsMap", property: EntrypointAssetsMapRuntimeProperty }
7
- };
8
- const createEntrypointModule = () => [EntrypointAssetsModule.current, EntrypointAssetsModule.full].map(
9
- ({ export: name, property }) => `export const ${name} = () => ${RuntimeGlobals.require}[${JSON.stringify(property)}];
10
- `
11
- ).join("");
12
- export {
13
- EntrypointAssetsModule,
14
- createEntrypointModule
15
- };
16
- //# sourceMappingURL=entrypoint-module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../src/cli/bundler/plugins/build-assets-map/entrypoint-module.ts"],"sourcesContent":["import {RuntimeGlobals} from \"@rspack/core\";\n\nimport {EntrypointAssetsMapRuntimeProperty, EntrypointAssetsRuntimeProperty} from \"@typing/entrypoint\";\n\nimport type {BuildAssetsMapPluginModuleOptions} from \"./usage\";\n\nexport const EntrypointAssetsModule = {\n request: \"#adnbn/entrypoint\",\n current: {export: \"readAssets\", property: EntrypointAssetsRuntimeProperty},\n full: {export: \"readAssetsMap\", property: EntrypointAssetsMapRuntimeProperty},\n} satisfies BuildAssetsMapPluginModuleOptions;\n\n/** Readers keep runtime data live without capturing a snapshot during module evaluation. */\nexport const createEntrypointModule = (): string =>\n [EntrypointAssetsModule.current, EntrypointAssetsModule.full]\n .map(\n ({export: name, property}) =>\n `export const ${name} = () => ${RuntimeGlobals.require}[${JSON.stringify(property)}];\\n`\n )\n .join(\"\");\n"],"mappings":"AAAA,SAAQ,sBAAqB;AAE7B,SAAQ,oCAAoC,uCAAsC;AAI3E,MAAM,yBAAyB;AAAA,EAClC,SAAS;AAAA,EACT,SAAS,EAAC,QAAQ,cAAc,UAAU,gCAA+B;AAAA,EACzE,MAAM,EAAC,QAAQ,iBAAiB,UAAU,mCAAkC;AAChF;AAGO,MAAM,yBAAyB,MAClC,CAAC,uBAAuB,SAAS,uBAAuB,IAAI,EACvD;AAAA,EACG,CAAC,EAAC,QAAQ,MAAM,SAAQ,MACpB,gBAAgB,IAAI,YAAY,eAAe,OAAO,IAAI,KAAK,UAAU,QAAQ,CAAC;AAAA;AAC1F,EACC,KAAK,EAAE;","names":[]}
@@ -1,4 +0,0 @@
1
- import type { ContentScriptWorld } from "../../../types/content.js";
2
- /** Shared build identity for content and Relay modules, independent of their UI isolation. */
3
- export declare const getContentLayer: (world: ContentScriptWorld) => string;
4
- export declare const isContentLayer: (layer: string) => boolean;
@@ -1,10 +0,0 @@
1
- const ContentLayerPrefix = "adnbn:content:";
2
- const getContentLayer = (world) => {
3
- return `${ContentLayerPrefix}${world.toLowerCase()}`;
4
- };
5
- const isContentLayer = (layer) => layer.startsWith(ContentLayerPrefix);
6
- export {
7
- getContentLayer,
8
- isContentLayer
9
- };
10
- //# sourceMappingURL=layers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/cli/bundler/utils/layers.ts"],"sourcesContent":["import type {ContentScriptWorld} from \"@typing/content\";\n\nconst ContentLayerPrefix = \"adnbn:content:\";\n\n/** Shared build identity for content and Relay modules, independent of their UI isolation. */\nexport const getContentLayer = (world: ContentScriptWorld): string => {\n return `${ContentLayerPrefix}${world.toLowerCase()}`;\n};\n\nexport const isContentLayer = (layer: string): boolean => layer.startsWith(ContentLayerPrefix);\n"],"mappings":"AAEA,MAAM,qBAAqB;AAGpB,MAAM,kBAAkB,CAAC,UAAsC;AAClE,SAAO,GAAG,kBAAkB,GAAG,MAAM,YAAY,CAAC;AACtD;AAEO,MAAM,iBAAiB,CAAC,UAA2B,MAAM,WAAW,kBAAkB;","names":[]}
@@ -1,6 +0,0 @@
1
- import type { Compilation, Filename } from "@rspack/core";
2
- import type { EntrypointAssetsMap } from "../../../types/entrypoint.js";
3
- export declare const appFilenameResolver: (app: string, filename: Filename, dirname?: string) => Filename;
4
- export declare const collectBuildAssets: (compilation: Compilation) => EntrypointAssetsMap;
5
- export declare const setCompilationBuildAssets: (compilation: Compilation, assets: EntrypointAssetsMap) => void;
6
- export declare const getCompilationBuildAssets: (compilation: Compilation) => EntrypointAssetsMap | undefined;
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/cli/bundler/utils/output.ts"],"sourcesContent":["import type {AssetInfo, Chunk, Compilation, Filename, Module} from \"@rspack/core\";\nimport _ from \"lodash\";\nimport path from \"path\";\nimport postcss from \"postcss\";\nimport valueParser from \"postcss-value-parser\";\n\nimport {toPosix} from \"@cli/utils/path\";\n\nimport type {EntrypointAssetsMap, EntrypointAssetsMapEntry, EntrypointAssetsFiles} from \"@typing/entrypoint\";\n\ntype AssetKind = \"asset\" | \"css\" | \"js\";\n\nconst compilationBuildAssets = new WeakMap<Compilation, EntrypointAssetsMap>();\n\n// prettier-ignore\nexport const appFilenameResolver =\n (app: string, filename: Filename, dirname?: string): Filename => {\n app = _.kebabCase(app);\n\n const resolve = (name: string): string => {\n name = name.replaceAll(\"[app]\", app);\n\n return dirname ? path.posix.join(dirname, name) : name;\n };\n\n if (!_.isFunction(filename)) {\n return resolve(filename);\n }\n\n return (pathData, assetInfo): string => {\n return resolve(filename(pathData, assetInfo));\n };\n };\n\nconst addRelatedSourceMaps = (sourceMaps: Set<string>, related: AssetInfo[\"related\"]): void => {\n const sourceMap = related?.sourceMap;\n\n if (Array.isArray(sourceMap)) {\n sourceMap.forEach(file => sourceMaps.add(toPosix(file)));\n } else if (sourceMap) {\n sourceMaps.add(toPosix(sourceMap));\n }\n};\n\nconst getRelatedSourceMaps = (compilation: Compilation): ReadonlySet<string> => {\n const sourceMaps = new Set<string>();\n\n compilation.getAssets().forEach(({info}) => addRelatedSourceMaps(sourceMaps, info.related));\n\n return sourceMaps;\n};\n\nconst isIgnoredAsset = (file: string, info: AssetInfo, sourceMaps: ReadonlySet<string>): boolean => {\n return Boolean(info.development || info.hotModuleReplacement || sourceMaps.has(file));\n};\n\nconst classifyAsset = (file: string, info: AssetInfo, fromModuleAssets: boolean): AssetKind => {\n if (info.assetType === \"javascript\") {\n return \"js\";\n }\n\n if (info.assetType === \"css\" || info.assetType === \"extract-css\") {\n return \"css\";\n }\n\n if (info.assetType || info.sourceFilename || fromModuleAssets) {\n return \"asset\";\n }\n\n if (file.endsWith(\".js\") || file.endsWith(\".mjs\") || file.endsWith(\".cjs\")) {\n return \"js\";\n }\n\n if (file.endsWith(\".css\")) {\n return \"css\";\n }\n\n return \"asset\";\n};\n\nconst getAssetKind = (\n compilation: Compilation,\n file: string,\n sourceMaps: ReadonlySet<string>,\n fromModuleAssets = false\n): AssetKind | undefined => {\n file = toPosix(file);\n\n const asset = compilation.getAsset(file);\n\n if (!asset || isIgnoredAsset(file, asset.info, sourceMaps)) {\n return;\n }\n\n return classifyAsset(file, asset.info, fromModuleAssets);\n};\n\nconst getModuleAssetNames = (module: Module): readonly string[] => {\n return Object.keys(module.buildInfo?.assets ?? {});\n};\n\nconst collectResources = (\n compilation: Compilation,\n chunks: Iterable<Chunk>,\n sourceMaps: ReadonlySet<string>\n): readonly string[] => {\n const candidates = new Map<string, boolean>();\n const cssFiles = new Set<string>();\n const sourceFiles = new Set<string>();\n\n for (const chunk of chunks) {\n for (const file of [...chunk.files, ...chunk.auxiliaryFiles]) {\n const normalized = toPosix(file);\n\n candidates.set(normalized, candidates.get(normalized) ?? false);\n if (getAssetKind(compilation, normalized, sourceMaps) === \"css\") cssFiles.add(normalized);\n }\n\n for (const module of compilation.chunkGraph.getChunkModulesIterable(chunk)) {\n for (const file of getModuleAssetNames(module)) {\n candidates.set(toPosix(file), true);\n }\n if (module.type === \"css/mini-extract\") {\n for (const dependency of module.buildInfo?.fileDependencies ?? [])\n sourceFiles.add(path.resolve(dependency));\n }\n }\n }\n\n // CssExtract executes url() asset modules during the build. They are not\n // runtime chunk modules, so follow the emitted CSS references as well.\n // This only reads assets; it never rewrites CSS or its filenames.\n const resources = compilation\n .getAssets()\n .filter(\n asset =>\n getAssetKind(compilation, asset.name, sourceMaps) === \"asset\" &&\n (!asset.info.sourceFilename ||\n sourceFiles.has(\n path.resolve(compilation.compiler.context, asset.info.sourceFilename.split(/[?#]/)[0])\n ))\n )\n .map(asset => asset.name)\n .sort((left, right) => right.length - left.length);\n for (const file of cssFiles) {\n const css = compilation.getAsset(file)?.source.source().toString();\n if (!css) continue;\n postcss.parse(css, {from: file}).walkDecls(declaration => {\n valueParser(declaration.value).walk(node => {\n if (node.type !== \"function\" || node.value.toLowerCase() !== \"url\") return;\n const argument = node.nodes[0];\n if (!argument || (argument.type !== \"string\" && argument.type !== \"word\")) return false;\n const url = argument.value.replace(/\\\\([\\da-f]{1,6}\\s?|.)/gi, (_match, escape: string) =>\n /^[\\da-f]{1,6}\\s?$/i.test(escape)\n ? String.fromCodePoint(parseInt(escape.trim(), 16) || 0xfffd)\n : escape\n );\n if (/^(?:data|blob):/i.test(url)) return false;\n try {\n const pathname = decodeURIComponent(new URL(url, `https://adnbn.invalid/${file}`).pathname);\n const resource = resources.find(candidate => pathname.endsWith(`/${candidate}`));\n if (resource) candidates.set(resource, true);\n } catch {\n // External or malformed URLs do not name an emitted build resource.\n }\n return false;\n });\n });\n }\n\n return Array.from(candidates)\n .filter(([file, fromModuleAssets]) => {\n return getAssetKind(compilation, file, sourceMaps, fromModuleAssets) === \"asset\";\n })\n .map(([file]) => file)\n .toSorted();\n};\n\nconst collectCodeFiles = (\n compilation: Compilation,\n files: Iterable<string>,\n sourceMaps: ReadonlySet<string>\n): EntrypointAssetsFiles => {\n const css = new Set<string>();\n const js = new Set<string>();\n\n for (const rawFile of files) {\n const file = toPosix(rawFile);\n const kind = getAssetKind(compilation, file, sourceMaps);\n\n if (kind === \"js\") {\n js.add(file);\n } else if (kind === \"css\") {\n css.add(file);\n }\n }\n\n return {js: Array.from(js), css: Array.from(css)};\n};\n\nconst collectAsyncCodeFiles = (\n compilation: Compilation,\n chunks: Iterable<Chunk>,\n sourceMaps: ReadonlySet<string>,\n initialFiles: ReadonlySet<string>\n): EntrypointAssetsFiles => {\n const files = new Set<string>();\n\n for (const chunk of chunks) {\n for (const file of [...chunk.files, ...chunk.auxiliaryFiles]) {\n const normalized = toPosix(file);\n\n if (!initialFiles.has(normalized)) {\n files.add(normalized);\n }\n }\n }\n\n return collectCodeFiles(compilation, files, sourceMaps);\n};\n\nexport const collectBuildAssets = (compilation: Compilation): EntrypointAssetsMap => {\n const sourceMaps = getRelatedSourceMaps(compilation);\n const assets = Object.create(null) as Record<string, EntrypointAssetsMapEntry>;\n\n const entrypoints = Array.from(compilation.entrypoints).toSorted(([left], [right]) => left.localeCompare(right));\n\n for (const [name, entrypoint] of entrypoints) {\n const initial = collectCodeFiles(compilation, entrypoint.getFiles(), sourceMaps);\n const initialFiles = new Set([...initial.js, ...initial.css]);\n const entryChunk = entrypoint.getEntrypointChunk();\n\n assets[name] = {\n initial,\n async: collectAsyncCodeFiles(compilation, entryChunk.getAllAsyncChunks(), sourceMaps, initialFiles),\n assets: collectResources(compilation, entryChunk.getAllReferencedChunks(), sourceMaps),\n };\n }\n\n return assets;\n};\n\nexport const setCompilationBuildAssets = (compilation: Compilation, assets: EntrypointAssetsMap): void => {\n compilationBuildAssets.set(compilation, assets);\n};\n\nexport const getCompilationBuildAssets = (compilation: Compilation): EntrypointAssetsMap | undefined => {\n return compilationBuildAssets.get(compilation);\n};\n"],"mappings":"AACA,OAAO,OAAO;AACd,OAAO,UAAU;AACjB,OAAO,aAAa;AACpB,OAAO,iBAAiB;AAExB,SAAQ,eAAc;AAMtB,MAAM,yBAAyB,oBAAI,QAA0C;AAGtE,MAAM,sBACT,CAAC,KAAa,UAAoB,YAA+B;AAC7D,QAAM,EAAE,UAAU,GAAG;AAErB,QAAM,UAAU,CAAC,SAAyB;AACtC,WAAO,KAAK,WAAW,SAAS,GAAG;AAEnC,WAAO,UAAU,KAAK,MAAM,KAAK,SAAS,IAAI,IAAI;AAAA,EACtD;AAEA,MAAI,CAAC,EAAE,WAAW,QAAQ,GAAG;AACzB,WAAO,QAAQ,QAAQ;AAAA,EAC3B;AAEA,SAAO,CAAC,UAAU,cAAsB;AACpC,WAAO,QAAQ,SAA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J;AAEA,SAAO;AACX;AAEO,MAAM,4BAA4B,CAAC,aAA0B,WAAsC;AACtG,yBAAuB,IAAI,aAAa,MAAM;AAClD;AAEO,MAAM,4BAA4B,CAAC,gBAA8D;AACpG,SAAO,uBAAuB,IAAI,WAAW;AACjD;","names":[]}
@@ -1,5 +0,0 @@
1
- import type { Chunk, Compilation, Module } from "@rspack/core";
2
- export declare const IsolatedStylesLayer = "adnbn:css:isolation";
3
- export declare const isIsolatedStylesModule: (module: Module) => boolean;
4
- export declare const isIsolatedStylesChunk: (compilation: Compilation, chunk: Chunk) => boolean;
5
- export declare const getIsolatedStylesFiles: (compilation: Compilation) => ReadonlySet<string>;
@@ -1,30 +0,0 @@
1
- const IsolatedStylesLayer = "adnbn:css:isolation";
2
- const isIsolatedStylesModule = (module) => module.type === "css/mini-extract" && module.layer === IsolatedStylesLayer;
3
- const isIsolatedStylesChunk = (compilation, chunk) => {
4
- const modules = [...compilation.chunkGraph.getChunkModulesIterable(chunk)].filter(
5
- (module) => module.type === "css/mini-extract"
6
- );
7
- const isolated = modules.some(isIsolatedStylesModule);
8
- if (isolated && !modules.every(isIsolatedStylesModule)) {
9
- throw new Error(
10
- `CSS chunk "${chunk.name ?? chunk.id}" mixes document and ?isolation styles. Preserve the adnbnIsolatedStyles CSS cache group in your bundler configuration.`
11
- );
12
- }
13
- return isolated;
14
- };
15
- const getIsolatedStylesFiles = (compilation) => {
16
- const files = /* @__PURE__ */ new Set();
17
- for (const chunk of compilation.chunks) {
18
- if (isIsolatedStylesChunk(compilation, chunk)) {
19
- for (const file of chunk.files) if (file.endsWith(".css")) files.add(file);
20
- }
21
- }
22
- return files;
23
- };
24
- export {
25
- IsolatedStylesLayer,
26
- getIsolatedStylesFiles,
27
- isIsolatedStylesChunk,
28
- isIsolatedStylesModule
29
- };
30
- //# sourceMappingURL=styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/cli/bundler/utils/styles.ts"],"sourcesContent":["import type {Chunk, Compilation, Module} from \"@rspack/core\";\n\n// This is a bundler layer, not a CSS @layer. A distinct css-loader identity is\n// also required: CssExtract deduplicates dependencies by their loader request.\nexport const IsolatedStylesLayer = \"adnbn:css:isolation\";\n\nexport const isIsolatedStylesModule = (module: Module): boolean =>\n module.type === \"css/mini-extract\" && module.layer === IsolatedStylesLayer;\n\nexport const isIsolatedStylesChunk = (compilation: Compilation, chunk: Chunk): boolean => {\n const modules = [...compilation.chunkGraph.getChunkModulesIterable(chunk)].filter(\n module => module.type === \"css/mini-extract\"\n );\n const isolated = modules.some(isIsolatedStylesModule);\n if (isolated && !modules.every(isIsolatedStylesModule)) {\n throw new Error(\n `CSS chunk \"${chunk.name ?? chunk.id}\" mixes document and ?isolation styles. Preserve the adnbnIsolatedStyles CSS cache group in your bundler configuration.`\n );\n }\n return isolated;\n};\n\nexport const getIsolatedStylesFiles = (compilation: Compilation): ReadonlySet<string> => {\n const files = new Set<string>();\n for (const chunk of compilation.chunks) {\n if (isIsolatedStylesChunk(compilation, chunk)) {\n for (const file of chunk.files) if (file.endsWith(\".css\")) files.add(file);\n }\n }\n return files;\n};\n"],"mappings":"AAIO,MAAM,sBAAsB;AAE5B,MAAM,yBAAyB,CAAC,WACnC,OAAO,SAAS,sBAAsB,OAAO,UAAU;AAEpD,MAAM,wBAAwB,CAAC,aAA0B,UAA0B;AACtF,QAAM,UAAU,CAAC,GAAG,YAAY,WAAW,wBAAwB,KAAK,CAAC,EAAE;AAAA,IACvE,YAAU,OAAO,SAAS;AAAA,EAC9B;AACA,QAAM,WAAW,QAAQ,KAAK,sBAAsB;AACpD,MAAI,YAAY,CAAC,QAAQ,MAAM,sBAAsB,GAAG;AACpD,UAAM,IAAI;AAAA,MACN,cAAc,MAAM,QAAQ,MAAM,EAAE;AAAA,IACxC;AAAA,EACJ;AACA,SAAO;AACX;AAEO,MAAM,yBAAyB,CAAC,gBAAkD;AACrF,QAAM,QAAQ,oBAAI,IAAY;AAC9B,aAAW,SAAS,YAAY,QAAQ;AACpC,QAAI,sBAAsB,aAAa,KAAK,GAAG;AAC3C,iBAAW,QAAQ,MAAM,MAAO,KAAI,KAAK,SAAS,MAAM,EAAG,OAAM,IAAI,IAAI;AAAA,IAC7E;AAAA,EACJ;AACA,SAAO;AACX;","names":[]}
@@ -1,2 +0,0 @@
1
- declare const _default: import("../../main/plugin.js").PluginDefinition<[]>;
2
- export default _default;
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/cli/plugins/output.ts"],"sourcesContent":["import _ from \"lodash\";\nimport {Configuration as RspackConfig} from \"@rspack/core\";\n\nimport {definePlugin} from \"@main/plugin\";\n\nimport {\n appFilenameResolver,\n BuildAssetsMapPlugin,\n GenerateModulePlugin,\n createEntrypointModule,\n EntrypointAssetsModule,\n} from \"@cli/bundler\";\nimport {getOutputPath, getResolvePath} from \"@cli/resolvers/path\";\n\nimport {Command} from \"@typing/app\";\nimport {BackgroundEntryName} from \"@typing/background\";\n\nconst serializeFilename = (filename: unknown): string => {\n return typeof filename === \"function\" ? filename.toString() : String(filename ?? \"\");\n};\n\nexport default definePlugin(() => {\n return {\n name: \"adnbn:output\",\n bundler: ({config}) => {\n const {app, assetsDir, assetsFilename, cssDir, cssFilename, jsDir, jsFilename} = config;\n\n const kebabApp = _.kebabCase(app);\n const camelApp = _.camelCase(app);\n\n const filename = appFilenameResolver(app, jsFilename, jsDir);\n const cssOutputFilename = appFilenameResolver(app, cssFilename, cssDir);\n const buildHashSalt = JSON.stringify({\n app,\n assetsDir,\n assetsFilename: serializeFilename(assetsFilename),\n cssDir,\n cssFilename: serializeFilename(cssFilename),\n jsDir,\n jsFilename: serializeFilename(jsFilename),\n });\n\n return {\n output: {\n path: getResolvePath(getOutputPath(config)),\n filename,\n chunkFilename: filename,\n hashSalt: kebabApp,\n hotUpdateGlobal: camelApp + \"HotUpdate\",\n chunkLoadingGlobal: camelApp + \"ChunkLoading\",\n uniqueName: kebabApp,\n clean: config.command === Command.Build,\n },\n plugins: [\n new GenerateModulePlugin({[EntrypointAssetsModule.request]: createEntrypointModule()}),\n new BuildAssetsMapPlugin({\n module: EntrypointAssetsModule,\n buildHashSalt,\n cssChunkFilename: cssOutputFilename,\n cssFilename: cssOutputFilename,\n fullMapEntrypoint: BackgroundEntryName,\n }),\n ],\n } satisfies RspackConfig;\n },\n };\n});\n"],"mappings":"AAAA,OAAO,OAAO;AAGd,SAAQ,oBAAmB;AAE3B;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACG;AACP,SAAQ,eAAe,sBAAqB;AAE5C,SAAQ,eAAc;AACtB,SAAQ,2BAA0B;AAElC,MAAM,oBAAoB,CAAC,aAA8B;AACrD,SAAO,OAAO,aAAa,aAAa,SAAS,SAAS,IAAI,OAAO,YAAY,EAAE;AACvF;AAEA,IAAO,iBAAQ,aAAa,MAAM;AAC9B,SAAO;AAAA,IACH,MAAM;AAAA,IACN,SAAS,CAAC,EAAC,OAAM,MAAM;AACnB,YAAM,EAAC,KAAK,WAAW,gBAAgB,QAAQ,aAAa,OAAO,WAAU,IAAI;AAEjF,YAAM,WAAW,EAAE,UAAU,GAAG;AAChC,YAAM,WAAW,EAAE,UAAU,GAAG;AAEhC,YAAM,WAAW,oBAAoB,KAAK,YAAY,KAAK;AAC3D,YAAM,oBAAoB,oBAAoB,KAAK,aAAa,MAAM;AACtE,YAAM,gBAAgB,KAAK,UAAU;AAAA,QACjC;AAAA,QACA;AAAA,QACA,gBAAgB,kBAAkB,cAAc;AAAA,QAChD;AAAA,QACA,aAAa,kBAAkB,WAAW;AAAA,QAC1C;AAAA,QACA,YAAY,kBAAkB,UAAU;AAAA,MAC5C,CAAC;AAED,aAAO;AAAA,QACH,QAAQ;AAAA,UACJ,MAAM,eAAe,cAAc,MAAM,CAAC;AAAA,UAC1C;AAAA,UACA,eAAe;AAAA,UACf,UAAU;AAAA,UACV,iBAAiB,WAAW;AAAA,UAC5B,oBAAoB,WAAW;AAAA,UAC/B,YAAY;AAAA,UACZ,OAAO,OAAO,YAAY,QAAQ;AAAA,QACtC;AAAA,QACA,SAAS;AAAA,UACL,IAAI,qBAAqB,EAAC,CAAC,uBAAuB,OAAO,GAAG,uBAAuB,EAAC,CAAC;AAAA,UACrF,IAAI,qBAAqB;AAAA,YACrB,QAAQ;AAAA,YACR;AAAA,YACA,kBAAkB;AAAA,YAClB,aAAa;AAAA,YACb,mBAAmB;AAAA,UACvB,CAAC;AAAA,QACL;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AACJ,CAAC;","names":[]}
@@ -1,5 +0,0 @@
1
- import type { RuleSetCondition } from "@rspack/core";
2
- export interface StylePluginOptions {
3
- /** Issuer layers where ?isolation selects a separate CSS destination. Omit to use ordinary CSS rules. */
4
- isolationIssuerLayer?: RuleSetCondition;
5
- }
@@ -1 +0,0 @@
1
- export * from "./render.js";
@@ -1,2 +0,0 @@
1
- export * from "./render.js";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../src/entry/content/adapters/react/resolvers/index.ts"],"sourcesContent":["export * from \"./render\";\n"],"mappings":"AAAA,cAAc;","names":[]}
@@ -1,2 +0,0 @@
1
- import { ContentScriptRenderHandler, ContentScriptRenderValue } from "../../../../../types/content.js";
2
- export declare const contentScriptReactRenderResolver: (render?: ContentScriptRenderValue) => ContentScriptRenderHandler;
@@ -1,11 +0,0 @@
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
- }
7
- };
8
- export {
9
- contentScriptReactRenderResolver
10
- };
11
- //# sourceMappingURL=render.js.map
@@ -1 +0,0 @@
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":[]}