extension-develop 4.1.39 → 4.1.40-canary.458.001a6a0

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 (188) hide show
  1. package/README.md +7 -4
  2. package/dist/{771~0.mjs → 5h~0.mjs} +13 -3
  3. package/dist/{273~0.mjs → 6l~0.mjs} +1 -1
  4. package/dist/{524~0.mjs → 9~0.mjs} +18 -2
  5. package/dist/{640~0.mjs → bh~0.mjs} +6 -1
  6. package/dist/bridge.mjs +14 -8
  7. package/dist/b~0.mjs +8568 -0
  8. package/dist/command-dev.d.ts +2 -0
  9. package/dist/command-preview.d.ts +2 -0
  10. package/dist/contracts.mjs +2 -1
  11. package/dist/{469~0.mjs → cp~0.mjs} +30 -18
  12. package/dist/css-parse-guard-loader.mjs +2 -2
  13. package/dist/c~0.mjs +56 -0
  14. package/dist/dead-css-url-loader.mjs +20 -119
  15. package/dist/dev-server/control-bridge/actions-file.d.ts +7 -0
  16. package/dist/dev-server/control-bridge/broker.d.ts +42 -2
  17. package/dist/dev-server/control-bridge/consumer-client.d.ts +7 -0
  18. package/dist/dev-server/control-bridge/contracts.d.ts +29 -1
  19. package/dist/dev-server/control-bridge/logs-file.d.ts +6 -0
  20. package/dist/dev-server/control-bridge/loopback.d.ts +1 -0
  21. package/dist/dev-server/control-bridge/producer-runtime.d.ts +5 -2
  22. package/dist/dev-server/control-bridge/production-control.d.ts +1 -0
  23. package/dist/dev-server/control-bridge/session-token.d.ts +5 -2
  24. package/dist/dev-server/cors.d.ts +4 -2
  25. package/dist/dev-server/messages.d.ts +6 -0
  26. package/dist/dev-server/session-restart.d.ts +3 -1
  27. package/dist/dev-server~0.mjs +71 -129
  28. package/dist/df~0.mjs +197 -0
  29. package/dist/{846~0.mjs → d~0.mjs} +4 -3
  30. package/dist/ensure-hmr-for-scripts.js +3 -3
  31. package/dist/ensure-hmr-for-scripts.mjs +3 -3
  32. package/dist/extension-js-devtools/build-stamp.json +2 -2
  33. package/dist/extension-js-devtools/chrome/background/service_worker.js +2 -2
  34. package/dist/extension-js-devtools/chrome/pages/welcome.js +2 -2
  35. package/dist/extension-js-devtools/chromium/background/service_worker.js +2 -2
  36. package/dist/extension-js-devtools/chromium/pages/welcome.js +2 -2
  37. package/dist/extension-js-devtools/edge/background/service_worker.js +2 -2
  38. package/dist/extension-js-devtools/edge/pages/welcome.js +2 -2
  39. package/dist/extension-js-devtools/firefox/background/scripts.js +2 -2
  40. package/dist/extension-js-devtools/firefox/pages/welcome.js +2 -2
  41. package/dist/extension-js-theme/build-stamp.json +2 -2
  42. package/dist/{143~0.mjs → ey~0.mjs} +2 -2
  43. package/dist/e~0.mjs +33 -0
  44. package/dist/feature-scripts-classic-traced-globals-loader.mjs +7 -2
  45. package/dist/feature-scripts-content-script-wrapper.js +55 -17
  46. package/dist/feature-scripts-content-script-wrapper.mjs +55 -17
  47. package/dist/feature-scripts-native-geturl-import-loader.mjs +1 -1
  48. package/dist/{105~0.mjs → g0~0.mjs} +1 -1
  49. package/dist/{88~0.mjs → j6~0.mjs} +9 -1
  50. package/dist/{731~0.mjs → j~0.mjs} +2 -2
  51. package/dist/{712~0.mjs → ka~0.mjs} +18 -2
  52. package/dist/{852~0.mjs → k~0.mjs} +4 -2
  53. package/dist/late-css-import-loader.mjs +1 -1
  54. package/dist/lib/addon-lint.d.ts +6 -0
  55. package/dist/lib/build-summary.d.ts +6 -0
  56. package/dist/lib/dev-additions.d.ts +12 -0
  57. package/dist/lib/extension-base-from-stack.d.ts +16 -0
  58. package/dist/lib/localized-manifest-name.d.ts +9 -0
  59. package/dist/lib/messages.d.ts +5 -2
  60. package/dist/lib/process-started-at.d.ts +1 -0
  61. package/dist/lib/real-path.d.ts +8 -0
  62. package/dist/lib/resource-path.d.ts +1 -0
  63. package/dist/lib/session-paths.d.ts +2 -0
  64. package/dist/lib/split-chunks.d.ts +2 -1
  65. package/dist/lib/stats-handler.d.ts +1 -0
  66. package/dist/lib/tsconfig-includes-file.d.ts +1 -0
  67. package/dist/l~0.mjs +2290 -0
  68. package/dist/main-world-bridge.js +92 -23
  69. package/dist/main-world-bridge.mjs +92 -23
  70. package/dist/manifest-entry.d.ts +2 -0
  71. package/dist/manifest.mjs +3 -1
  72. package/dist/module.mjs +3 -3
  73. package/dist/{832~0.mjs → m~0.mjs} +2242 -286
  74. package/dist/o~0.mjs +47 -0
  75. package/dist/plugin-browsers/index.d.ts +7 -0
  76. package/dist/plugin-browsers/safari-dev-plugin.d.ts +2 -0
  77. package/dist/plugin-compatibility/compatibility-lib/messages.d.ts +1 -1
  78. package/dist/plugin-compatibility/compatibility-lib/native-browser-namespace.d.ts +5 -0
  79. package/dist/plugin-compatibility/feature-browser-global.d.ts +4 -0
  80. package/dist/plugin-compilation/compilation-lib/messages.d.ts +4 -1
  81. package/dist/plugin-compilation/env.d.ts +1 -0
  82. package/dist/plugin-compilation/index.d.ts +2 -0
  83. package/dist/plugin-compilation/node-builtins.d.ts +5 -0
  84. package/dist/plugin-compilation/one-diagnostic-per-location.d.ts +13 -0
  85. package/dist/plugin-compilation/resolve-file-requests.d.ts +16 -0
  86. package/dist/plugin-compilation/warm-ancestor-watchers.d.ts +19 -0
  87. package/dist/plugin-compilation/watch-real-project-path.d.ts +27 -0
  88. package/dist/plugin-compilation/zip.d.ts +2 -0
  89. package/dist/plugin-css/css-in-content-script-loader.d.ts +1 -1
  90. package/dist/plugin-css/css-lib/build-css-rules.d.ts +3 -0
  91. package/dist/plugin-css/css-lib/inline-content-script-css.d.ts +3 -1
  92. package/dist/plugin-css/css-lib/messages.d.ts +4 -0
  93. package/dist/plugin-css/css-lib/sfc-style-block.d.ts +26 -0
  94. package/dist/plugin-css/css-lib/unplaced-style-imports.d.ts +7 -0
  95. package/dist/plugin-css/css-lib/verbatim-css.d.ts +1 -0
  96. package/dist/plugin-css/dead-css-url-loader.d.ts +9 -1
  97. package/dist/plugin-css/index.d.ts +1 -0
  98. package/dist/plugin-css/sfc-style-block-loader.d.ts +18 -0
  99. package/dist/plugin-css/unplaced-style-import-loader.d.ts +16 -0
  100. package/dist/plugin-playwright/index.d.ts +22 -0
  101. package/dist/plugin-reload/classify-reload.d.ts +20 -0
  102. package/dist/plugin-reload/index.d.ts +4 -2
  103. package/dist/plugin-reload/messages.d.ts +1 -0
  104. package/dist/plugin-reload/reload-dispatch.d.ts +21 -2
  105. package/dist/plugin-reload/reload-lib/dev-content-scripts.d.ts +6 -0
  106. package/dist/plugin-reload/reload-lib/scripts-replay-shim.d.ts +1 -1
  107. package/dist/plugin-reload/steps/inject-bridge-producer.d.ts +6 -0
  108. package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/ChunkLoader.d.ts +3 -0
  109. package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/RuntimeModules/AutoPublicPath.d.ts +1 -1
  110. package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/RuntimeModules/BaseUri.d.ts +1 -1
  111. package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/RuntimeModules/LoadScript.d.ts +1 -1
  112. package/dist/plugin-reload/steps/setup-reload-strategy/webpack-target-webextension-fork/lib/webpack5/RuntimeModules/PublicPath.d.ts +1 -1
  113. package/dist/plugin-special-folders/get-data.d.ts +2 -0
  114. package/dist/plugin-special-folders/hint-import-only-scripts.d.ts +4 -0
  115. package/dist/plugin-special-folders/include-files.d.ts +2 -0
  116. package/dist/plugin-special-folders/messages.d.ts +1 -0
  117. package/dist/plugin-web-extension/feature-html/html-lib/inject.d.ts +1 -1
  118. package/dist/plugin-web-extension/feature-html/html-lib/patch-html.d.ts +1 -0
  119. package/dist/plugin-web-extension/feature-html/steps/update-html-file.d.ts +1 -0
  120. package/dist/plugin-web-extension/feature-manifest/manifest-lib/filter-keys-gecko.d.ts +21 -0
  121. package/dist/plugin-web-extension/feature-manifest/manifest-lib/filter-keys-safari.d.ts +1 -1
  122. package/dist/plugin-web-extension/feature-manifest/manifest-lib/webkit-unsupported-keys.d.ts +15 -0
  123. package/dist/plugin-web-extension/feature-manifest/messages.d.ts +7 -0
  124. package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/dev-additions.d.ts +8 -0
  125. package/dist/plugin-web-extension/feature-manifest/steps/warn-description-length.d.ts +25 -0
  126. package/dist/plugin-web-extension/feature-manifest/steps/warn-gecko-unsupported-apis.d.ts +2 -2
  127. package/dist/plugin-web-extension/feature-scripts/contracts.d.ts +3 -0
  128. package/dist/plugin-web-extension/feature-scripts/index.d.ts +1 -0
  129. package/dist/plugin-web-extension/feature-scripts/messages.d.ts +9 -0
  130. package/dist/plugin-web-extension/feature-scripts/scripts-lib/completion-value.d.ts +13 -0
  131. package/dist/plugin-web-extension/feature-scripts/scripts-lib/injected-sheet-urls.d.ts +5 -0
  132. package/dist/plugin-web-extension/feature-scripts/scripts-lib/main-world-bridge-pairing.d.ts +5 -0
  133. package/dist/plugin-web-extension/feature-scripts/scripts-lib/main-world-copy-routing.d.ts +2 -0
  134. package/dist/plugin-web-extension/feature-scripts/scripts-lib/registration-worlds.d.ts +10 -0
  135. package/dist/plugin-web-extension/feature-scripts/scripts-lib/runtime-main-world-scripts.d.ts +25 -2
  136. package/dist/plugin-web-extension/feature-scripts/scripts-lib/runtime-script-sheet.d.ts +14 -0
  137. package/dist/plugin-web-extension/feature-scripts/scripts-lib/taken-extension-base.d.ts +10 -0
  138. package/dist/plugin-web-extension/feature-scripts/steps/add-base-uri-runtime-module.d.ts +7 -1
  139. package/dist/plugin-web-extension/feature-scripts/steps/add-content-script-wrapper/content-script-wrapper.d.ts +2 -0
  140. package/dist/plugin-web-extension/feature-scripts/steps/add-content-script-wrapper/index.d.ts +2 -0
  141. package/dist/plugin-web-extension/feature-scripts/steps/add-public-path-runtime-module.d.ts +6 -0
  142. package/dist/plugin-web-extension/feature-scripts/steps/classic-traced-globals-loader.d.ts +1 -0
  143. package/dist/plugin-web-extension/feature-scripts/steps/compile-main-world-scripts.d.ts +4 -0
  144. package/dist/plugin-web-extension/feature-scripts/steps/keep-completion-value.d.ts +6 -0
  145. package/dist/plugin-web-extension/feature-scripts/steps/pair-runtime-main-world-bridges.d.ts +12 -0
  146. package/dist/plugin-web-extension/feature-scripts/steps/place-runtime-script-sheets.d.ts +12 -0
  147. package/dist/plugin-web-extension/feature-scripts/steps/prune-main-world-bridges.d.ts +1 -0
  148. package/dist/plugin-web-extension/feature-scripts/steps/root-injected-sheet-urls.d.ts +9 -0
  149. package/dist/plugin-web-extension/feature-scripts/steps/route-main-world-copies.d.ts +10 -0
  150. package/dist/plugin-web-extension/feature-scripts/steps/source-literals.d.ts +24 -0
  151. package/dist/plugin-web-extension/feature-scripts/steps/take-extension-base.d.ts +11 -0
  152. package/dist/plugin-web-extension/feature-scripts/steps/trace-runtime-loaded-files.d.ts +18 -3
  153. package/dist/plugin-web-extension/feature-scripts/steps/warn-main-world-registration-changed.d.ts +12 -0
  154. package/dist/plugin-web-extension/feature-scripts/steps/warn-moved-page-relative-urls.d.ts +30 -0
  155. package/dist/plugin-web-extension/feature-scripts/steps/warn-page-relative-script-path.d.ts +10 -0
  156. package/dist/plugin-web-extension/feature-scripts/steps/warn-unknown-registration-world.d.ts +10 -0
  157. package/dist/plugin-web-extension/feature-web-resources/collect-entry-imports.d.ts +1 -0
  158. package/dist/plugin-web-extension/feature-web-resources/web-resources-lib/messages.d.ts +1 -0
  159. package/dist/plugin-web-extension/feature-web-resources/web-resources-lib/page-requests.d.ts +5 -0
  160. package/dist/plugin-web-extension/feature-web-resources/web-resources-lib/resolve-war.d.ts +1 -0
  161. package/dist/plugin-web-extension/feature-web-resources/web-resources-lib/unreachable-resources.d.ts +1 -0
  162. package/dist/plugin-web-extension/shared/script-graph.d.ts +12 -0
  163. package/dist/preprocessor-passthrough-loader.mjs +1 -1
  164. package/dist/preview.mjs +1 -1
  165. package/dist/public-css-url-loader.mjs +1 -1
  166. package/dist/{331~0.mjs → q~0.mjs} +2 -2
  167. package/dist/rj~0.mjs +125 -0
  168. package/dist/{519~0.mjs → rl~0.mjs} +53 -3
  169. package/dist/rspack-config~0.mjs +2768 -3256
  170. package/dist/{177~0.mjs → r~0.mjs} +2 -2
  171. package/dist/sfc-style-block-loader.mjs +49 -0
  172. package/dist/stats-handler~0.mjs +15 -7
  173. package/dist/tm~0.mjs +71 -0
  174. package/dist/types.d.ts +43 -3
  175. package/dist/{285~0.mjs → t~0.mjs} +41 -26
  176. package/dist/unplaced-style-import-loader.mjs +131 -0
  177. package/dist/x~0.mjs +3 -0
  178. package/dist/y~0.mjs +234 -0
  179. package/dist/zip~0.mjs +5 -4
  180. package/dist/{363~0.mjs → z~0.mjs} +360 -267
  181. package/package.json +5 -5
  182. package/dist/527~0.mjs +0 -3
  183. package/dist/840~0.mjs +0 -5635
  184. /package/dist/{895~0.mjs → 3~0.mjs} +0 -0
  185. /package/dist/{374~0.mjs → 5~0.mjs} +0 -0
  186. /package/dist/{206~0.mjs → 6~0.mjs} +0 -0
  187. /package/dist/{471~0.mjs → g~0.mjs} +0 -0
  188. /package/dist/{117~0.mjs → w~0.mjs} +0 -0
@@ -1 +1 @@
1
- export declare const SCRIPTS_REPLAY_SHIM_SOURCE = ";(function () {\n try {\n if (typeof globalThis !== \"object\" || !globalThis) return;\n var chromeRef =\n (globalThis.chrome && globalThis.chrome.scripting && typeof globalThis.chrome.scripting.executeScript === \"function\")\n ? globalThis.chrome\n : (globalThis.browser && globalThis.browser.scripting && typeof globalThis.browser.scripting.executeScript === \"function\")\n ? globalThis.browser\n : null;\n if (!chromeRef) return;\n if (globalThis.__extjsScriptsReplayInstalled) return;\n globalThis.__extjsScriptsReplayInstalled = true;\n\n var MAX_TABS = 50;\n var MAX_ENTRIES_PER_TAB = 50;\n var registry = new Map();\n var originalExecuteScript = chromeRef.scripting.executeScript.bind(chromeRef.scripting);\n var tabsApi = chromeRef.tabs && typeof chromeRef.tabs.get === \"function\" ? chromeRef.tabs : null;\n\n var serialize = function (entry) {\n try {\n return JSON.stringify({\n files: entry && Array.isArray(entry.files) ? entry.files : [],\n world: entry && entry.world ? String(entry.world) : \"\"\n });\n } catch (error) {\n return \"\";\n }\n };\n\n var pageKey = function (url) {\n if (typeof url !== \"string\" || !url) return \"\";\n try {\n var parsed = new URL(url);\n return parsed.origin + parsed.pathname;\n } catch (error) {\n return url;\n }\n };\n\n // Resolves to the page the tab shows now, \"\" when the url is not visible\n // to the extension, and null once the tab is gone.\n var currentPage = function (tabId) {\n if (!tabsApi) return Promise.resolve(\"\");\n try {\n var lookup = tabsApi.get(tabId);\n if (!lookup || typeof lookup.then !== \"function\") return Promise.resolve(\"\");\n return lookup.then(\n function (tab) { return tab ? pageKey(tab.url) : null; },\n function () { return null; }\n );\n } catch (error) {\n return Promise.resolve(\"\");\n }\n };\n\n var remember = function (tabId, entry) {\n var entries = (registry.get(tabId) || []).filter(function (e) { return e.sig !== entry.sig; });\n entries.push(entry);\n registry.delete(tabId);\n registry.set(tabId, entries.slice(-MAX_ENTRIES_PER_TAB));\n while (registry.size > MAX_TABS) {\n registry.delete(registry.keys().next().value);\n }\n };\n\n var track = function (injection) {\n try {\n var tabId = injection && injection.target && injection.target.tabId;\n var files =\n injection && Array.isArray(injection.files) ? injection.files.slice() : null;\n if (typeof tabId !== \"number\") return;\n if (!files || !files.length) return;\n var world = injection.world ? String(injection.world) : undefined;\n var entry = { files: files, world: world, sig: serialize({ files: files, world: world }), page: \"\" };\n remember(tabId, entry);\n currentPage(tabId).then(function (page) {\n entry.page = page || \"\";\n }, function () {});\n } catch (error) {\n // Ignore\n }\n };\n\n chromeRef.scripting.executeScript = function (injection, callback) {\n track(injection);\n return originalExecuteScript(injection, callback);\n };\n\n try {\n if (chromeRef.tabs && chromeRef.tabs.onRemoved && typeof chromeRef.tabs.onRemoved.addListener === \"function\") {\n chromeRef.tabs.onRemoved.addListener(function (tabId) {\n registry.delete(tabId);\n });\n }\n } catch (error) {\n // Ignore\n }\n\n var normalizeFile = function (value) {\n return String(value || \"\").replace(/^[/\\\\]+/, \"\");\n };\n\n var fileMatches = function (entryFile, changedNormalized) {\n var fn = normalizeFile(entryFile);\n for (var i = 0; i < changedNormalized.length; i++) {\n var c = changedNormalized[i];\n if (!c) continue;\n if (fn === c) return true;\n if (fn.length > c.length && fn.slice(fn.length - c.length - 1) === \"/\" + c) return true;\n if (c.length > fn.length && c.slice(c.length - fn.length - 1) === \"/\" + fn) return true;\n }\n return false;\n };\n\n var entryMatches = function (entry, changedNormalized) {\n for (var i = 0; i < entry.files.length; i++) {\n if (fileMatches(entry.files[i], changedNormalized)) return true;\n }\n return false;\n };\n\n var replayEntry = function (tabId, entry) {\n try {\n return Promise.resolve(\n originalExecuteScript({\n target: { tabId: tabId },\n files: entry.files,\n world: entry.world\n })\n ).then(\n function () { return { ok: true, tabId: tabId, files: entry.files }; },\n function (error) {\n return {\n ok: false,\n tabId: tabId,\n files: entry.files,\n error: String((error && error.message) || error)\n };\n }\n );\n } catch (error) {\n return Promise.resolve(null);\n }\n };\n\n var replayTab = function (tabId, changedNormalized) {\n return currentPage(tabId).then(function (page) {\n if (page === null) {\n registry.delete(tabId);\n return [];\n }\n // An entry recorded on another page belongs to a document this tab\n // no longer shows, so it is dropped instead of injected into the new one.\n var live = (registry.get(tabId) || []).filter(function (entry) {\n return !(page && entry.page && entry.page !== page);\n });\n if (!live.length) {\n registry.delete(tabId);\n return [];\n }\n registry.set(tabId, live);\n return Promise.all(\n live\n .filter(function (entry) { return entryMatches(entry, changedNormalized); })\n .map(function (entry) { return replayEntry(tabId, entry); })\n );\n }, function () { return []; });\n };\n\n globalThis.__extjsScriptsReplay = function (changedFiles) {\n var changedNormalized = (Array.isArray(changedFiles) ? changedFiles : []).map(normalizeFile);\n var tabReplays = [];\n registry.forEach(function (entries, tabId) {\n if (!entries.some(function (entry) { return entryMatches(entry, changedNormalized); })) return;\n tabReplays.push(replayTab(tabId, changedNormalized));\n });\n return Promise.all(tabReplays).then(function (perTab) {\n var outcomes = [];\n perTab.forEach(function (results) {\n results.forEach(function (result) {\n if (result) outcomes.push(result);\n });\n });\n return outcomes;\n });\n };\n } catch (error) {\n // Best-effort shim; do not break the SW bootstrap on any failure.\n }\n})();\n";
1
+ export declare const SCRIPTS_REPLAY_SHIM_SOURCE = ";(function () {\n try {\n if (typeof globalThis !== \"object\" || !globalThis) return;\n var injects = function (root) {\n return !!root && !!root.scripting && typeof root.scripting.executeScript === \"function\";\n };\n var chromeRef = injects(globalThis.chrome) ? globalThis.chrome : injects(globalThis.browser) ? globalThis.browser : null;\n if (!chromeRef) return;\n // The author may inject through either namespace, and one of them can\n // answer a callback only. The replay asks the one that hands a promise back.\n var replayRef = injects(globalThis.browser) ? globalThis.browser : chromeRef;\n if (globalThis.__extjsScriptsReplayInstalled) return;\n globalThis.__extjsScriptsReplayInstalled = true;\n\n var MAX_TABS = 50;\n var MAX_ENTRIES_PER_TAB = 50;\n var registry = new Map();\n var originalExecuteScript = replayRef.scripting.executeScript.bind(replayRef.scripting);\n var tabsApi = replayRef.tabs && typeof replayRef.tabs.get === \"function\" ? replayRef.tabs : null;\n\n var serialize = function (entry) {\n try {\n return JSON.stringify({\n files: entry && Array.isArray(entry.files) ? entry.files : [],\n world: entry && entry.world ? String(entry.world) : \"\"\n });\n } catch (error) {\n return \"\";\n }\n };\n\n var pageKey = function (url) {\n if (typeof url !== \"string\" || !url) return \"\";\n try {\n var parsed = new URL(url);\n return parsed.origin + parsed.pathname;\n } catch (error) {\n return url;\n }\n };\n\n // Resolves to the page the tab shows now, \"\" when the url is not visible\n // to the extension, and null once the tab is gone.\n var currentPage = function (tabId) {\n if (!tabsApi) return Promise.resolve(\"\");\n try {\n var lookup = tabsApi.get(tabId);\n if (!lookup || typeof lookup.then !== \"function\") return Promise.resolve(\"\");\n return lookup.then(\n function (tab) { return tab ? pageKey(tab.url) : null; },\n function () { return null; }\n );\n } catch (error) {\n return Promise.resolve(\"\");\n }\n };\n\n var remember = function (tabId, entry) {\n var entries = (registry.get(tabId) || []).filter(function (e) { return e.sig !== entry.sig; });\n entries.push(entry);\n registry.delete(tabId);\n registry.set(tabId, entries.slice(-MAX_ENTRIES_PER_TAB));\n while (registry.size > MAX_TABS) {\n registry.delete(registry.keys().next().value);\n }\n };\n\n var track = function (injection) {\n try {\n var tabId = injection && injection.target && injection.target.tabId;\n var files =\n injection && Array.isArray(injection.files) ? injection.files.slice() : null;\n if (typeof tabId !== \"number\") return;\n if (!files || !files.length) return;\n var world = injection.world ? String(injection.world) : undefined;\n var entry = { files: files, world: world, sig: serialize({ files: files, world: world }), page: \"\" };\n remember(tabId, entry);\n currentPage(tabId).then(function (page) {\n entry.page = page || \"\";\n }, function () {});\n } catch (error) {\n // Ignore\n }\n };\n\n var tracked = [];\n var trackCalls = function (root) {\n if (!injects(root) || tracked.indexOf(root.scripting) !== -1) return;\n var scripting = root.scripting;\n var native = scripting.executeScript.bind(scripting);\n scripting.executeScript = function (injection) {\n track(injection);\n return native.apply(null, arguments);\n };\n tracked.push(scripting);\n };\n trackCalls(globalThis.chrome);\n trackCalls(globalThis.browser);\n\n try {\n if (chromeRef.tabs && chromeRef.tabs.onRemoved && typeof chromeRef.tabs.onRemoved.addListener === \"function\") {\n chromeRef.tabs.onRemoved.addListener(function (tabId) {\n registry.delete(tabId);\n });\n }\n } catch (error) {\n // Ignore\n }\n\n var normalizeFile = function (value) {\n return String(value || \"\").replace(/^[/\\\\]+/, \"\");\n };\n\n var fileMatches = function (entryFile, changedNormalized) {\n var fn = normalizeFile(entryFile);\n for (var i = 0; i < changedNormalized.length; i++) {\n var c = changedNormalized[i];\n if (!c) continue;\n if (fn === c) return true;\n if (fn.length > c.length && fn.slice(fn.length - c.length - 1) === \"/\" + c) return true;\n if (c.length > fn.length && c.slice(c.length - fn.length - 1) === \"/\" + fn) return true;\n }\n return false;\n };\n\n var entryMatches = function (entry, changedNormalized) {\n for (var i = 0; i < entry.files.length; i++) {\n if (fileMatches(entry.files[i], changedNormalized)) return true;\n }\n return false;\n };\n\n var replayEntry = function (tabId, entry) {\n try {\n return Promise.resolve(\n originalExecuteScript({\n target: { tabId: tabId },\n files: entry.files,\n world: entry.world\n })\n ).then(\n function () { return { ok: true, tabId: tabId, files: entry.files }; },\n function (error) {\n return {\n ok: false,\n tabId: tabId,\n files: entry.files,\n error: String((error && error.message) || error)\n };\n }\n );\n } catch (error) {\n return Promise.resolve(null);\n }\n };\n\n var replayTab = function (tabId, changedNormalized) {\n return currentPage(tabId).then(function (page) {\n if (page === null) {\n registry.delete(tabId);\n return [];\n }\n // An entry recorded on another page belongs to a document this tab\n // no longer shows, so it is dropped instead of injected into the new one.\n var live = (registry.get(tabId) || []).filter(function (entry) {\n return !(page && entry.page && entry.page !== page);\n });\n if (!live.length) {\n registry.delete(tabId);\n return [];\n }\n registry.set(tabId, live);\n return Promise.all(\n live\n .filter(function (entry) { return entryMatches(entry, changedNormalized); })\n .map(function (entry) { return replayEntry(tabId, entry); })\n );\n }, function () { return []; });\n };\n\n globalThis.__extjsScriptsReplay = function (changedFiles) {\n var changedNormalized = (Array.isArray(changedFiles) ? changedFiles : []).map(normalizeFile);\n var tabReplays = [];\n registry.forEach(function (entries, tabId) {\n if (!entries.some(function (entry) { return entryMatches(entry, changedNormalized); })) return;\n tabReplays.push(replayTab(tabId, changedNormalized));\n });\n return Promise.all(tabReplays).then(function (perTab) {\n var outcomes = [];\n perTab.forEach(function (results) {\n results.forEach(function (result) {\n if (result) outcomes.push(result);\n });\n });\n return outcomes;\n });\n };\n } catch (error) {\n // Best-effort shim; do not break the SW bootstrap on any failure.\n }\n})();\n";
@@ -1,4 +1,10 @@
1
1
  import { type Compiler } from '@rspack/core';
2
+ import { type EmittedCompilation, type EmittedModule } from '../../plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/emitted-evidence.js';
3
+ export declare function readDevBuild(compilation: object | undefined): string;
4
+ export declare function readBootRegistrations(compilation: object | undefined): boolean;
5
+ export declare function backgroundNamesRegistration(compilation: EmittedCompilation & {
6
+ modules?: Iterable<EmittedModule>;
7
+ }): boolean;
2
8
  export declare class InjectBridgeProducer {
3
9
  apply(compiler: Compiler): void;
4
10
  }
@@ -3,6 +3,9 @@ export default class WebExtensionChuckLoaderRuntimePlugin {
3
3
  private readonly options;
4
4
  private readonly contentScriptsMeta;
5
5
  private rspackAutoPublicPath;
6
+ private readonly gecko;
7
+ private readonly baseAttribute;
8
+ private readonly baseScheme;
6
9
  constructor(options: any);
7
10
  apply(compiler: any): void;
8
11
  tap(compiler: any, compilation: any): void;
@@ -1,2 +1,2 @@
1
1
  import type * as webpack from 'webpack';
2
- export default function AutoPublicPathRuntimeModule(webpack: typeof import('webpack')): webpack.RuntimeModule;
2
+ export default function AutoPublicPathRuntimeModule(webpack: typeof import('webpack'), gecko?: boolean, attribute?: string, scheme?: string): webpack.RuntimeModule;
@@ -1,2 +1,2 @@
1
1
  import type * as webpack from 'webpack';
2
- export default function BaseUriRuntimeModule(webpack: typeof import('webpack')): webpack.RuntimeModule;
2
+ export default function BaseUriRuntimeModule(webpack: typeof import('webpack'), gecko?: boolean, attribute?: string, scheme?: string): webpack.RuntimeModule;
@@ -1,4 +1,4 @@
1
1
  export default function LoadScriptRuntimeModule(webpack: typeof import('webpack'), supportDynamicImport: boolean | undefined, classicLoaderEnabled: boolean | undefined, contentScriptsMeta?: Record<string, {
2
2
  world?: 'main' | 'extension';
3
3
  bridgeBundleId?: string;
4
- }>): import('webpack').RuntimeModule;
4
+ }>, gecko?: boolean): import('webpack').RuntimeModule;
@@ -1,2 +1,2 @@
1
1
  import type * as webpack from 'webpack';
2
- export default function PublicPathRuntimeModule(webpack: typeof import('webpack')): webpack.RuntimeModule;
2
+ export default function PublicPathRuntimeModule(webpack: typeof import('webpack'), gecko?: boolean, attribute?: string, scheme?: string): webpack.RuntimeModule;
@@ -4,6 +4,8 @@ import type { FilepathList, SpecialFoldersConfig } from '../types.js';
4
4
  import type { CompanionExtensionsConfig } from './folder-extensions/types.js';
5
5
  import { rememberSpecialFoldersConfig } from './folders-config.js';
6
6
  export { rememberSpecialFoldersConfig };
7
+ export declare function collectReferenceCorpus(projectRoot: string): string;
8
+ export declare function referenceSpellings(relativePath: string): string[];
7
9
  export type CompileMode = 'development' | 'production' | 'none';
8
10
  export declare function getSpecialFoldersDataForCompiler(compiler: Compiler): SpecialFoldersData;
9
11
  export declare function getSpecialFoldersDataForProjectRoot(projectRoot: string, folders?: SpecialFoldersConfig, mode?: CompileMode): SpecialFoldersData;
@@ -0,0 +1,4 @@
1
+ import type { Compiler } from '@rspack/core';
2
+ export declare class HintImportOnlyScripts {
3
+ apply(compiler: Compiler): void;
4
+ }
@@ -9,6 +9,7 @@ type Verdict = {
9
9
  output: string;
10
10
  source: string;
11
11
  isDir: boolean;
12
+ minify: boolean;
12
13
  } | {
13
14
  kind: 'invalid';
14
15
  output: string;
@@ -18,6 +19,7 @@ type Verdict = {
18
19
  output: string;
19
20
  source: string;
20
21
  };
22
+ export declare function minifyIncludedScript(input: Buffer, absoluteFilename: string): Promise<Buffer>;
21
23
  export declare function judgeIncludeFiles(include: IncludeFilesConfig | undefined, projectRoot: string): Verdict[];
22
24
  export declare class IncludeFiles {
23
25
  static readonly name: string;
@@ -13,3 +13,4 @@ export declare function excludeEntryMissing(entry: string, browser: string): str
13
13
  export declare function manifestNamesExcludedFile(relativePath: string, browser: string): string;
14
14
  export declare function includeSourceMissing(outputPath: string, sourcePath: string, projectRoot: string): string;
15
15
  export declare function includeOutputPathInvalid(outputPath: string, reason: string): string;
16
+ export declare function scriptsEntriesOnlyImported(relativePaths: string[], folder: string): string;
@@ -10,7 +10,7 @@ export declare function createScriptTag(src: string, firstScriptAttrs?: Array<{
10
10
  name: string;
11
11
  value: string;
12
12
  }>): ReturnType<typeof parse5utilities.createNode>;
13
- export declare function injectJsScript(bodyNode: Parameters<typeof parse5utilities.append>[0], feature: string, firstScriptAttrs?: Array<{
13
+ export declare function injectJsScript(bodyNode: Parameters<typeof parse5utilities.append>[0], entryScript: string, firstScriptAttrs?: Array<{
14
14
  name: string;
15
15
  value: string;
16
16
  }>, siblingScripts?: string[]): void;
@@ -2,5 +2,6 @@ import { type Compilation } from '@rspack/core';
2
2
  import type { FilepathList } from '../../../types.js';
3
3
  export declare function patchHtml(compilation: Compilation, feature: string, htmlEntry: string, includeList: FilepathList, manifestDir?: string, siblingScripts?: string[], html?: string, options?: {
4
4
  optionsDialogFloor?: boolean;
5
+ entryScript?: string;
5
6
  }): string;
6
7
  export declare function patchHtmlNested(compilation: Compilation, htmlEntry: string, manifestDir?: string): string;
@@ -1,6 +1,7 @@
1
1
  import { Compilation, type Compiler } from '@rspack/core';
2
2
  import type { FilepathList, PluginInterface } from '../../../types.js';
3
3
  export declare function siblingScriptsFor(compilation: Compilation, feature: string): string[];
4
+ export declare function entryScriptFor(compilation: Compilation, feature: string): string | undefined;
4
5
  export declare class UpdateHtmlFile {
5
6
  readonly manifestPath: string;
6
7
  readonly includeList?: FilepathList;
@@ -0,0 +1,21 @@
1
+ import type { DevOptions, Manifest } from '../../../types.js';
2
+ export declare const GECKO_UNSUPPORTED_PERMISSIONS: ReadonlySet<string>;
3
+ export interface GeckoDroppedKey {
4
+ path: string;
5
+ reason: string;
6
+ }
7
+ export interface GeckoReinterpretedKey {
8
+ path: string;
9
+ declared: string;
10
+ effective: string;
11
+ }
12
+ export declare function dropGeckoUnsupportedKeys(manifest: Manifest, browser: DevOptions['browser']): {
13
+ manifest: Manifest;
14
+ dropped: GeckoDroppedKey[];
15
+ reinterpreted: GeckoReinterpretedKey[];
16
+ };
17
+ export declare function reportGeckoUnsupportedKeys(found: {
18
+ dropped: GeckoDroppedKey[];
19
+ reinterpreted: GeckoReinterpretedKey[];
20
+ }, browser: DevOptions['browser']): void;
21
+ export declare function resetGeckoKeyNotices(): void;
@@ -1,9 +1,9 @@
1
1
  import type { DevOptions, Manifest } from '../../../types.js';
2
+ export { WEBKIT_UNSUPPORTED_PERMISSIONS as UNSUPPORTED_PERMISSIONS, type WebkitDroppedPage, type WebkitUnsupportedKey, webkitDroppedSurfacePages, webkitUnsupportedManifestKeys, webkitUnsupportedPermissions } from './webkit-unsupported-keys.js';
2
3
  export interface WebkitDroppedKey {
3
4
  path: string;
4
5
  reason: string;
5
6
  }
6
- export declare const UNSUPPORTED_PERMISSIONS: ReadonlySet<string>;
7
7
  export declare function isWebkitUnsupportedPermission(permission: string, browser?: string): boolean;
8
8
  export declare function dropWebkitUnsupportedKeys(manifest: Manifest, browser: DevOptions['browser']): {
9
9
  manifest: Manifest;
@@ -0,0 +1,15 @@
1
+ export interface WebkitUnsupportedKey {
2
+ key: string;
3
+ reason: string;
4
+ }
5
+ export declare const WEBKIT_UNSUPPORTED_TOP_LEVEL_KEYS: Readonly<Record<string, string>>;
6
+ export declare const WEBKIT_UNSUPPORTED_PERMISSIONS: ReadonlySet<string>;
7
+ export declare const WEBKIT_UNSUPPORTED_OPTIONS_UI_KEYS: Readonly<Record<string, string>>;
8
+ export declare function webkitUnsupportedManifestKeys(): WebkitUnsupportedKey[];
9
+ export declare function webkitUnsupportedPermissions(): string[];
10
+ export interface WebkitDroppedPage {
11
+ path: string;
12
+ key: string;
13
+ reason: string;
14
+ }
15
+ export declare function webkitDroppedSurfacePages(manifest: Record<string, unknown> | undefined): WebkitDroppedPage[];
@@ -44,3 +44,10 @@ export declare function webkitUnsupportedKeysDropped(browser: string, dropped: A
44
44
  path: string;
45
45
  reason: string;
46
46
  }>): string;
47
+ export declare function geckoUnsupportedKeysDropped(browser: string, dropped: Array<{
48
+ path: string;
49
+ reason: string;
50
+ }>): string;
51
+ export declare function geckoIncognitoSplitNotAllowed(browser: string): string;
52
+ export declare function manifestDescriptionOverStoreLimit(browser: string, length: number, limit: number, store: string): string;
53
+ export declare function manifestDescriptionMissingForStore(browser: string, store: string, limit: number): string;
@@ -0,0 +1,8 @@
1
+ import type { DevAddition } from '../../../../lib/dev-additions.js';
2
+ interface ManifestGrants {
3
+ permissions?: unknown;
4
+ host_permissions?: unknown;
5
+ web_accessible_resources?: unknown;
6
+ }
7
+ export declare function listDevManifestAdditions(source: ManifestGrants, dev: ManifestGrants): DevAddition[];
8
+ export {};
@@ -0,0 +1,25 @@
1
+ import { type Compiler } from '@rspack/core';
2
+ import type { DevOptions } from '../../../types.js';
3
+ export declare const APP_STORE_DESCRIPTION_LIMIT = 112;
4
+ export declare const CHROME_DESCRIPTION_LIMIT = 132;
5
+ export interface DescriptionRule {
6
+ limit: number;
7
+ store: string;
8
+ required: boolean;
9
+ }
10
+ export interface DescriptionLimitHit {
11
+ kind: 'missing' | 'over';
12
+ length: number;
13
+ rule: DescriptionRule;
14
+ }
15
+ export declare function descriptionRuleFor(browser: string): DescriptionRule | null;
16
+ export declare function findDescriptionLimitHit(manifest: unknown, browser: string): DescriptionLimitHit | null;
17
+ export declare class WarnDescriptionLength {
18
+ static readonly name: string;
19
+ private readonly browser;
20
+ private reported;
21
+ constructor(options: {
22
+ browser: DevOptions['browser'];
23
+ });
24
+ apply(compiler: Compiler): void;
25
+ }
@@ -120,9 +120,9 @@ export interface GeckoUnsupportedApiUse {
120
120
  emitted: boolean;
121
121
  }
122
122
  export declare function geckoUnsupportedApis(manifestVersion: unknown, engine?: UnsupportedApiEngine): GeckoUnsupportedApi[];
123
- export declare function usesGeckoUnsupportedApi(source: string, api: GeckoUnsupportedApi, engine?: UnsupportedApiEngine, guarded?: Range[]): boolean;
123
+ export declare function usesGeckoUnsupportedApi(source: string, api: GeckoUnsupportedApi, guarded?: Range[]): boolean;
124
124
  export declare function usesWebkitUnsupportedMember(source: string, entry: WebkitUnsupportedMember, guarded?: Range[]): boolean;
125
- export declare function webkitGuardedRangesOf(): (text: string) => Range[];
125
+ export declare function guardedRangesOf(missing?: WebkitMissingApis): (text: string) => Range[];
126
126
  interface ScannableModule {
127
127
  resource?: string;
128
128
  modules?: Iterable<ScannableModule>;
@@ -1,4 +1,7 @@
1
1
  export declare const EXTENSIONJS_CONTENT_SCRIPT_LAYER = "extensionjs-content-script";
2
+ export declare const EXTENSIONJS_MAIN_WORLD_IMPORT_LAYER = "extensionjs-content-script-main-world-import";
3
+ export declare const MAIN_WORLD_COPY_SUFFIX = ".extjs-main-world";
4
+ export declare function mainWorldCopyEntryName(entryName: string): string;
2
5
  export declare const CANONICAL_CONTENT_SCRIPT_ENTRY_PREFIX = "content_scripts/content-";
3
6
  export declare function getCanonicalContentScriptEntryName(index: number): string;
4
7
  export declare function getCanonicalContentScriptJsAssetName(index: number): string;
@@ -3,6 +3,7 @@ import type { DevOptions, FilepathList, PluginInterface } from '../../types.js';
3
3
  export declare class ScriptsPlugin {
4
4
  readonly manifestPath: string;
5
5
  readonly includeList?: FilepathList;
6
+ readonly pageList?: FilepathList;
6
7
  readonly browser?: DevOptions['browser'];
7
8
  readonly devSession?: boolean;
8
9
  readonly define?: Record<string, unknown>;
@@ -28,11 +28,20 @@ declare const PAGE_CONTEXT_SURFACES: {
28
28
  export declare function workerStartedFromPageContext(assetName: string, surface: keyof typeof PAGE_CONTEXT_SURFACES): string;
29
29
  export declare function fetchedFileDependencyMissing(assetName: string, literal: string, expectedPath: string): string;
30
30
  export declare function getURLDependencyMissing(assetName: string, literal: string, expectedPath: string, foundOutside?: string): string;
31
+ export declare function webkitDroppedPageOpened(assetName: string, literal: string, page: {
32
+ path: string;
33
+ key: string;
34
+ reason: string;
35
+ }, browser: string): string;
31
36
  export declare function runtimeSetSurfaceDependencyMissing(assetName: string, literal: string, expectedPath: string, foundOutside?: string): string;
32
37
  export declare function staticImportDependencyMissing(assetName: string, literal: string, expectedPath: string, foundOutside?: string): string;
33
38
  export declare function buildConstantNeverDefined(file: string, name: string, entryName: string): string;
34
39
  export declare function reservedScriptsFolder(relPath: string, indicators: string[]): string;
35
40
  export declare function compiledSourceSpelling(assetName: string, api: string, literal: string, emittedPath: string): string;
36
41
  export declare function runtimeAssetFolderNotShipped(assetName: string, literal: string, folder: string, missing: string[]): string;
42
+ export declare function pageRelativeScriptPath(sourcePath: string, literal: string, requestedPath: string, emittedPath: string): string;
43
+ export declare function movedPageRelativeUrl(sourcePath: string, literal: string, page: string, requestedPath: string, emittedPath: string): string;
44
+ export declare function mainWorldRegistrationChanged(scriptPath: string, registeredBy?: string): string;
45
+ export declare function unknownRegistrationWorld(sourcePath: string, line: number, emittedPaths: string[]): string;
37
46
  export declare function contentScriptWithoutDefaultExport(file: string): string;
38
47
  export {};
@@ -0,0 +1,13 @@
1
+ export declare const COMPLETION_VALUE_SETTER = "__extjsCompletion";
2
+ export declare const INJECTED_CLASSIC_QUERY = "__extensionjs_injected__";
3
+ export declare const COMPLETION_VALUE_HOLDER = "__extjsCompletionValue";
4
+ export declare function keepCompletionValue(source: string, resourcePath: string, options?: {
5
+ importsAnotherScript?: boolean;
6
+ declaresNothing?: boolean;
7
+ }): string;
8
+ export declare function carriesCompletionValue(text: string): boolean;
9
+ export declare function endsOnCompletionValue(text: string): boolean;
10
+ export declare function closeCompletionValueBlock(text: string): {
11
+ open: string;
12
+ closed: string;
13
+ };
@@ -0,0 +1,5 @@
1
+ export declare const CHROMIUM_EXTENSION_ROOT = "chrome-extension://__MSG_@@extension_id__/";
2
+ export declare const GECKO_EXTENSION_ROOT = "moz-extension://__MSG_@@extension_id__/";
3
+ export declare function injectedSheetRoot(browser: string): string | undefined;
4
+ export declare function isInjectedSheet(assetName: string, runtimeEntries: string[]): boolean;
5
+ export declare function rootedAtExtension(css: string, root?: string): string;
@@ -0,0 +1,5 @@
1
+ export declare const MAIN_WORLD_BRIDGE_ENTRY = "scripts/extjs-main-world-bridge";
2
+ export declare const MAIN_WORLD_BRIDGE_PAIR_PREFIX = "extjs-main-world-bridge:";
3
+ export declare const MAIN_WORLD_BRIDGE_PAIRING_MARK = "__extjsMainWorldBridgePaired";
4
+ export declare const REFUSED_SCRIPT_ID = "_extjs-main-world-bridge:";
5
+ export declare function buildMainWorldBridgePairingSource(bridgeFile?: string, baseReaders?: string[] | null, injectable?: string[] | null, baseGlobal?: string): string;
@@ -0,0 +1,2 @@
1
+ export declare const MAIN_WORLD_COPY_ROUTING_MARK = "__extjsMainWorldCopiesRouted";
2
+ export declare function buildMainWorldCopyRoutingSource(copies: Record<string, string>): string;
@@ -0,0 +1,10 @@
1
+ import { type ImportedModuleReader } from '../steps/source-literals.js';
2
+ export type RegisteredWorld = 'MAIN' | 'ISOLATED' | 'UNKNOWN';
3
+ export interface RegisteredFileSighting {
4
+ file: string;
5
+ world: RegisteredWorld;
6
+ index: number;
7
+ kept: boolean;
8
+ }
9
+ export declare function extractRegisteredFileSightings(source: string, readImported?: ImportedModuleReader): RegisteredFileSighting[];
10
+ export declare function extractMainWorldRegisteredFileLiterals(source: string, readImported?: ImportedModuleReader): string[];
@@ -2,9 +2,32 @@ import type { FilepathList } from '../../../types.js';
2
2
  export interface RuntimeMainWorldEntry {
3
3
  entryName: string;
4
4
  files: string[];
5
+ registeredBy: string;
6
+ copyOf?: string;
5
7
  }
6
- export declare function findRuntimeMainWorldEntries(options: {
8
+ export interface RuntimeMainWorldOptions {
7
9
  includeList: FilepathList;
10
+ pageList?: FilepathList;
8
11
  manifestDir: string;
9
12
  projectPath: string;
10
- }): RuntimeMainWorldEntry[];
13
+ }
14
+ export declare function findRuntimeMainWorldEntries(options: RuntimeMainWorldOptions): RuntimeMainWorldEntry[];
15
+ export declare function withMainWorldCopyEntries(options: RuntimeMainWorldOptions): FilepathList;
16
+ export interface UnknownWorldRegistration {
17
+ file: string;
18
+ line: number;
19
+ literal: string;
20
+ emitted: string;
21
+ }
22
+ export declare function findUnknownWorldRegistrations(options: RuntimeMainWorldOptions): UnknownWorldRegistration[];
23
+ export interface PageRelativeScriptPath {
24
+ page: string;
25
+ file: string;
26
+ literal: string;
27
+ requested: string;
28
+ emitted: string;
29
+ }
30
+ export declare function findPageRelativeScriptPaths(options: RuntimeMainWorldOptions & {
31
+ outputHolds?: (distRel: string) => boolean;
32
+ }): PageRelativeScriptPath[];
33
+ export declare function findBridgePairingPages(pageList: FilepathList | undefined, projectPath: string): string[];
@@ -0,0 +1,14 @@
1
+ export declare const SHEET_BLOCK_OPEN = "/*extjs-sheet*/(function(module){";
2
+ export declare const SHEET_BLOCK_CLOSE = "})({});/*extjs-sheet-end*/";
3
+ export declare function runtimeScriptSheetName(entryName: string): string;
4
+ export declare function rootedSheet(css: string): string;
5
+ export declare function runtimeScriptSheetBlock(input: {
6
+ css: string;
7
+ entryName: string;
8
+ devSalt: string;
9
+ gecko: boolean;
10
+ baseAttribute?: string;
11
+ baseScheme?: string;
12
+ }): string;
13
+ export declare function withoutSheetBlock(text: string): string;
14
+ export declare function namesSheet(scriptText: string, sheetName: string): boolean;
@@ -0,0 +1,10 @@
1
+ import type { DevOptions } from '../../../types.js';
2
+ export declare const TAKE_BLOCK_COLUMNS: number;
3
+ export declare function extensionBaseGlobalFor(manifestPath: string, browser?: DevOptions['browser']): string;
4
+ export declare function extensionBaseAttributeFor(manifestPath: string | undefined, browser?: DevOptions['browser']): string;
5
+ export declare function takesExtensionBase(text: string): boolean;
6
+ export declare function closeTakeBlock(text: string, global?: string): {
7
+ open: string;
8
+ closed: string;
9
+ };
10
+ export declare function isEntryFile(assetName: string, entryName: string): boolean;
@@ -1,5 +1,11 @@
1
1
  import type { Compiler } from '@rspack/core';
2
+ import type { DevOptions } from '../../../types.js';
2
3
  export declare class AddBaseUriRuntimeModule {
4
+ private readonly options;
5
+ constructor(options?: {
6
+ browser?: DevOptions['browser'];
7
+ manifestPath?: string;
8
+ });
3
9
  apply(compiler: Compiler): void;
4
10
  }
5
- export declare function baseUriRuntimeSource(baseUriGlobal: string): string[];
11
+ export declare function baseUriRuntimeSource(baseUriGlobal: string, gecko?: boolean, attribute?: string, scheme?: string): string[];
@@ -5,6 +5,8 @@ interface ContentScriptLoaderContext {
5
5
  devSession?: boolean;
6
6
  browser?: string;
7
7
  mainWorldScripts?: string[];
8
+ mainWorldCopies?: string[];
9
+ mainWorldBundle?: boolean;
8
10
  scriptsFolder?: string | false;
9
11
  };
10
12
  _compilation?: unknown;
@@ -1,11 +1,13 @@
1
1
  import { type Compiler } from '@rspack/core';
2
2
  import type { DevOptions, FilepathList, PluginInterface } from '../../../../types.js';
3
3
  export declare function resolveBundleCssProbeMarker(cssPath: string, hasAsset: (name: string) => boolean, assetNames: () => string[]): string;
4
+ export declare function findDeclaredMainWorldFiles(manifestPath: string, browser: DevOptions['browser']): string[];
4
5
  export declare class AddContentScriptWrapper {
5
6
  static getBridgeScripts(manifestPath: string, browser?: DevOptions['browser']): FilepathList;
6
7
  private readonly manifestPath;
7
8
  private readonly browser;
8
9
  private readonly includeList;
10
+ private readonly pageList?;
9
11
  private readonly devSession?;
10
12
  constructor(options: PluginInterface);
11
13
  private resolveLoader;
@@ -1,4 +1,10 @@
1
1
  import type { Compiler } from '@rspack/core';
2
+ import type { DevOptions } from '../../../types.js';
2
3
  export declare class AddPublicPathRuntimeModule {
4
+ private readonly options;
5
+ constructor(options?: {
6
+ browser?: DevOptions['browser'];
7
+ manifestPath?: string;
8
+ });
3
9
  apply(compiler: Compiler): void;
4
10
  }
@@ -1,6 +1,7 @@
1
1
  export declare function collectExposableClassicNames(content: string): string[];
2
2
  interface LoaderContext {
3
3
  resourcePath: string;
4
+ resourceQuery?: string;
4
5
  callback(err: Error | null, content?: string, sourceMap?: unknown): void;
5
6
  }
6
7
  export default function classicTracedGlobalsLoader(this: LoaderContext, source: string, inputSourceMap?: unknown): string | undefined;
@@ -6,11 +6,15 @@ export interface MainWorldGroup {
6
6
  files: string[];
7
7
  }
8
8
  export declare function findMainWorldGroups(manifestPath: string, browser: DevOptions['browser']): MainWorldGroup[];
9
+ type LooseGenerator = Record<string, Record<string, unknown>> | undefined;
10
+ export declare function withOwnClassNames(generator: LooseGenerator, entryName: string): NonNullable<LooseGenerator>;
9
11
  export declare class CompileMainWorldScripts {
10
12
  static readonly name: string;
11
13
  private readonly manifestPath;
12
14
  private readonly browser;
13
15
  private readonly includeList;
16
+ private readonly pageList?;
14
17
  constructor(options: PluginInterface);
15
18
  apply(compiler: Compiler): void;
16
19
  }
20
+ export {};
@@ -0,0 +1,6 @@
1
+ import { type Compiler } from '@rspack/core';
2
+ export declare function keepCompletionValueOf(compilation: object, assetName: string): void;
3
+ export declare class KeepCompletionValue {
4
+ static readonly name: string;
5
+ apply(compiler: Compiler): void;
6
+ }
@@ -0,0 +1,12 @@
1
+ import { Compilation, type Compiler } from '@rspack/core';
2
+ import type { PluginInterface } from '../../../types.js';
3
+ export declare const BACKGROUND_ASSET: RegExp;
4
+ export declare function pageBundleNames(compilation: Compilation, page: string): string[];
5
+ export declare class PairRuntimeMainWorldBridges {
6
+ private readonly manifestPath;
7
+ private readonly browser;
8
+ private readonly includeList;
9
+ private readonly pageList?;
10
+ constructor(options: PluginInterface);
11
+ apply(compiler: Compiler): void;
12
+ }
@@ -0,0 +1,12 @@
1
+ import { type Compiler } from '@rspack/core';
2
+ import type { PluginInterface } from '../../../types.js';
3
+ export declare class PlaceRuntimeScriptSheets {
4
+ static readonly name: string;
5
+ private readonly browser;
6
+ private readonly includeList;
7
+ private readonly manifestPath?;
8
+ constructor(options: Pick<PluginInterface, 'browser' | 'includeList'> & {
9
+ manifestPath?: string;
10
+ });
11
+ apply(compiler: Compiler): void;
12
+ }
@@ -1,5 +1,6 @@
1
1
  import { type Compiler } from '@rspack/core';
2
2
  import type { DevOptions } from '../../../types.js';
3
+ export declare function getBaseReaderRequirements(compiler: Compiler): Set<string>;
3
4
  export declare class PruneMainWorldBridges {
4
5
  private readonly options;
5
6
  constructor(options: {
@@ -0,0 +1,9 @@
1
+ import { type Compiler } from '@rspack/core';
2
+ import type { PluginInterface } from '../../../types.js';
3
+ export declare class RootInjectedSheetUrls {
4
+ static readonly name: string;
5
+ private readonly browser;
6
+ private readonly includeList;
7
+ constructor(options: Pick<PluginInterface, 'browser' | 'includeList'>);
8
+ apply(compiler: Compiler): void;
9
+ }
@@ -0,0 +1,10 @@
1
+ import { type Compiler } from '@rspack/core';
2
+ import type { PluginInterface } from '../../../types.js';
3
+ export declare class RouteMainWorldCopies {
4
+ static readonly name: string;
5
+ private readonly manifestPath;
6
+ private readonly includeList;
7
+ private readonly pageList?;
8
+ constructor(options: PluginInterface);
9
+ apply(compiler: Compiler): void;
10
+ }
@@ -0,0 +1,24 @@
1
+ export declare function forgetBlankedSources(): void;
2
+ export declare function keptBlankedSources(): number;
3
+ export declare function blankComments(source: string): string;
4
+ export declare function readBalancedArgs(code: string, openIndex: number): string | null;
5
+ export declare function readBalancedLiteral(code: string, openIndex: number): string | null;
6
+ export declare function skipString(code: string, start: number, cap: number): number;
7
+ export declare function splitTopLevelArgs(args: string): string[];
8
+ export declare function pureStringLiteral(arg: string): string | null;
9
+ export declare function unescapeStringBody(body: string): string;
10
+ export declare function escapeRegExp(text: string): string;
11
+ export interface ImportedModule {
12
+ source: string;
13
+ file: string;
14
+ }
15
+ export type ImportedModuleReader = (specifier: string, fromFile?: string) => string | ImportedModule | null;
16
+ export type LiteralLookup = (expression: string, useIndex?: number) => ResolvedLiteral | null;
17
+ export interface ResolvedLiteral {
18
+ text: string;
19
+ lookup: LiteralLookup;
20
+ index: number;
21
+ }
22
+ export declare function isConstantReference(text: string): boolean;
23
+ export declare function declaredValueIndex(code: string, name: string, useIndex: number): number | null;
24
+ export declare function literalLookup(code: string, readImported?: ImportedModuleReader): LiteralLookup;
@@ -0,0 +1,11 @@
1
+ import { type Compiler } from '@rspack/core';
2
+ import type { PluginInterface } from '../../../types.js';
3
+ export declare class TakeExtensionBase {
4
+ static readonly name: string;
5
+ private readonly manifestPath;
6
+ private readonly browser;
7
+ private readonly includeList;
8
+ private readonly pageList?;
9
+ constructor(options: PluginInterface);
10
+ apply(compiler: Compiler): void;
11
+ }