extension-develop 4.1.11 → 4.1.13

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 (110) hide show
  1. package/dist/0~dev-server.mjs +147 -81
  2. package/dist/0~rspack-config.mjs +1096 -694
  3. package/dist/0~zip.mjs +1 -1
  4. package/dist/101.mjs +185 -895
  5. package/dist/129.mjs +89 -0
  6. package/dist/278.mjs +52 -0
  7. package/dist/292.mjs +61 -0
  8. package/dist/372.mjs +87 -0
  9. package/dist/518.mjs +434 -0
  10. package/dist/77.mjs +928 -0
  11. package/dist/839.mjs +178 -40
  12. package/dist/845.mjs +10 -1
  13. package/dist/887.mjs +1 -1
  14. package/dist/bridge-entry.d.ts +2 -1
  15. package/dist/bridge.mjs +56 -7
  16. package/dist/css-parse-guard-loader.mjs +3 -0
  17. package/dist/dead-css-url-loader.mjs +51 -24
  18. package/dist/dev-server/cleanup.d.ts +2 -1
  19. package/dist/dev-server/control-bridge/broker.d.ts +1 -0
  20. package/dist/dev-server/control-bridge/contracts.d.ts +2 -0
  21. package/dist/dev-server/control-bridge/logs-query.d.ts +12 -1
  22. package/dist/dev-server/control-bridge/producer-runtime.d.ts +1 -1
  23. package/dist/dev-server/messages.d.ts +8 -0
  24. package/dist/dev-server/session-restart.d.ts +29 -0
  25. package/dist/ensure-hmr-for-scripts.js +37 -20
  26. package/dist/ensure-hmr-for-scripts.mjs +37 -20
  27. package/dist/extension-js-devtools/chrome/content_scripts/content-0.js +2 -2
  28. package/dist/extension-js-devtools/chrome/scripts/logger-client.js +1 -1
  29. package/dist/extension-js-devtools/chromium/content_scripts/content-0.js +2 -2
  30. package/dist/extension-js-devtools/chromium/scripts/logger-client.js +1 -1
  31. package/dist/extension-js-devtools/edge/content_scripts/content-0.js +2 -2
  32. package/dist/extension-js-devtools/edge/scripts/logger-client.js +1 -1
  33. package/dist/extension-js-devtools/firefox/content_scripts/content-0.js +2 -2
  34. package/dist/extension-js-devtools/firefox/scripts/logger-client.js +1 -1
  35. package/dist/feature-scripts-classic-concat-loader.js +58 -5
  36. package/dist/feature-scripts-classic-concat-loader.mjs +58 -5
  37. package/dist/feature-scripts-content-script-wrapper.js +14 -17
  38. package/dist/feature-scripts-content-script-wrapper.mjs +14 -17
  39. package/dist/feature-scripts-native-geturl-import-loader.mjs +10 -3
  40. package/dist/lib/asset-source-maps.d.ts +7 -0
  41. package/dist/lib/config-loader.d.ts +7 -34
  42. package/dist/lib/loader-source-maps.d.ts +17 -0
  43. package/dist/lib/messages.d.ts +1 -0
  44. package/dist/lib/msg-placeholders.d.ts +2 -0
  45. package/dist/lib/paths.d.ts +2 -0
  46. package/dist/lib/project.d.ts +3 -0
  47. package/dist/lib/session-project-root.d.ts +1 -0
  48. package/dist/minimum-script-file.js +41 -1
  49. package/dist/minimum-script-file.mjs +41 -1
  50. package/dist/module.d.ts +1 -1
  51. package/dist/module.mjs +1 -1
  52. package/dist/plugin-css/css-lib/dead-url-refs.d.ts +5 -0
  53. package/dist/plugin-css/css-lib/inline-content-script-css.d.ts +32 -0
  54. package/dist/plugin-css/css-lib/messages.d.ts +3 -0
  55. package/dist/plugin-css/css-lib/verbatim-css.d.ts +9 -0
  56. package/dist/plugin-css/css-parse-guard-loader.d.ts +3 -0
  57. package/dist/plugin-css/css-tools/postcss.d.ts +1 -0
  58. package/dist/plugin-css/dead-css-url-loader.d.ts +8 -4
  59. package/dist/plugin-css/index.d.ts +1 -0
  60. package/dist/plugin-js-frameworks/js-frameworks-lib/jsx-transform.d.ts +10 -0
  61. package/dist/plugin-js-frameworks/js-tools/solid-jsx-runtime.d.ts +8 -0
  62. package/dist/plugin-js-frameworks/js-tools/solid.d.ts +3 -0
  63. package/dist/plugin-js-frameworks/swc-targets.d.ts +3 -0
  64. package/dist/plugin-reload/classify-reload.d.ts +6 -0
  65. package/dist/plugin-reload/index.d.ts +2 -1
  66. package/dist/plugin-reload/reload-dispatch.d.ts +1 -0
  67. package/dist/plugin-special-folders/folder-extensions/resolve-dirs.d.ts +1 -0
  68. package/dist/plugin-special-folders/folder-extensions/utils.d.ts +3 -0
  69. package/dist/plugin-special-folders/messages.d.ts +2 -0
  70. package/dist/plugin-special-folders/resolve-public-folder.d.ts +13 -0
  71. package/dist/plugin-web-extension/feature-html/html-lib/assets.d.ts +1 -1
  72. package/dist/plugin-web-extension/feature-html/html-lib/base-href.d.ts +11 -0
  73. package/dist/plugin-web-extension/feature-html/html-lib/patch-html.d.ts +2 -2
  74. package/dist/plugin-web-extension/feature-html/html-lib/utils.d.ts +13 -0
  75. package/dist/plugin-web-extension/feature-html/index.d.ts +1 -0
  76. package/dist/plugin-web-extension/feature-html/steps/ensure-hmr-for-scripts.d.ts +1 -1
  77. package/dist/plugin-web-extension/feature-icons/extract-action-theme-icons.d.ts +2 -0
  78. package/dist/plugin-web-extension/feature-icons/omnibox-fields.d.ts +2 -0
  79. package/dist/plugin-web-extension/feature-icons/theme-image-fields.d.ts +2 -0
  80. package/dist/plugin-web-extension/feature-json/json-validation.d.ts +1 -0
  81. package/dist/plugin-web-extension/feature-manifest/index.d.ts +1 -0
  82. package/dist/plugin-web-extension/feature-manifest/manifest-lib/manifest.d.ts +1 -1
  83. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/index.d.ts +1 -1
  84. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/sandbox.d.ts +1 -1
  85. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/storage.d.ts +1 -1
  86. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/common/theme.d.ts +1 -1
  87. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/index.d.ts +1 -1
  88. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv2/chrome_settings_overrides.d.ts +1 -1
  89. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv2/index.d.ts +1 -1
  90. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv2/theme_experiment.d.ts +1 -1
  91. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv3/action.d.ts +2 -1
  92. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv3/declarative_net_request.d.ts +1 -1
  93. package/dist/plugin-web-extension/feature-manifest/manifest-overrides/mv3/index.d.ts +1 -1
  94. package/dist/plugin-web-extension/feature-manifest/messages.d.ts +2 -0
  95. package/dist/plugin-web-extension/feature-manifest/normalize-manifest-path.d.ts +4 -0
  96. package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults-lib/patch-csp.d.ts +1 -1
  97. package/dist/plugin-web-extension/feature-manifest/steps/apply-dev-defaults.d.ts +1 -0
  98. package/dist/plugin-web-extension/feature-scripts/steps/native-geturl-import-loader.d.ts +7 -2
  99. package/dist/plugin-web-extension/feature-web-resources/collect-entry-imports.d.ts +1 -0
  100. package/dist/plugin-web-extension/index.d.ts +1 -0
  101. package/dist/plugin-web-extension/shared/html-surfaces.d.ts +19 -0
  102. package/dist/plugin-web-extension/shared/manifest-fields-change-detector.d.ts +1 -0
  103. package/dist/plugin-web-extension/shared/manifest-fields.d.ts +18 -0
  104. package/dist/plugin-web-extension/shared/manifest-path-assets.d.ts +4 -0
  105. package/dist/plugin-web-extension/shared/paths.d.ts +1 -0
  106. package/dist/solid-jsx-runtime.mjs +15 -0
  107. package/dist/types.d.ts +20 -7
  108. package/package.json +1 -1
  109. package/dist/494.mjs +0 -89
  110. package/dist/86.mjs +0 -36
package/dist/129.mjs ADDED
@@ -0,0 +1,89 @@
1
+ import { createRequire as __extjsCreateRequire } from "node:module"; const require = __extjsCreateRequire(import.meta.url);
2
+ import { sources } from "@rspack/core";
3
+ import * as __rspack_external_node_fs_5ea92f0c from "node:fs";
4
+ import * as __rspack_external_node_path_c5b9b54f from "node:path";
5
+ const REGISTRY_KEY = '__extensionjs_verbatim_css_registry__';
6
+ function registry() {
7
+ const holder = globalThis;
8
+ if (!holder[REGISTRY_KEY]) holder[REGISTRY_KEY] = new Map();
9
+ return holder[REGISTRY_KEY];
10
+ }
11
+ const VERBATIM_CSS_MARKER = /__extjs_verbatim_([a-z0-9]+)__/;
12
+ function registerVerbatimCss(raw, resourcePath) {
13
+ const id = Math.abs(hash(`${resourcePath || ''}\n${raw}`)).toString(36);
14
+ registry().set(id, {
15
+ raw,
16
+ resourcePath
17
+ });
18
+ return id;
19
+ }
20
+ function verbatimCssPlaceholder(id) {
21
+ return `.__extjs_verbatim_${id}__{--extjs-verbatim:1}\n`;
22
+ }
23
+ function cssRelativeRefs(text) {
24
+ const scrubbed = text.replace(/\/\*[\s\S]*?\*\//g, ' ');
25
+ const refs = new Set();
26
+ const add = (value)=>{
27
+ const ref = String(value || '').trim();
28
+ if (!ref || /^(?:[a-z]+:|\/\/|#|data:)/i.test(ref)) return;
29
+ if (ref.startsWith('/')) return;
30
+ refs.add(ref.split(/[?#]/)[0]);
31
+ };
32
+ for (const match of scrubbed.matchAll(/@import\s+(?:url\()?\s*["']?([^"')\s;]+)["']?\)?/gi))add(match[1]);
33
+ for (const match of scrubbed.matchAll(/url\(\s*["']?([^"')]+)["']?\s*\)/gi))add(match[1]);
34
+ return [
35
+ ...refs
36
+ ];
37
+ }
38
+ function hash(text) {
39
+ let value = 0;
40
+ for(let i = 0; i < text.length; i++)value = 31 * value + text.charCodeAt(i) | 0;
41
+ return value;
42
+ }
43
+ function restoreVerbatimCssAssets(compilation) {
44
+ const restored = [];
45
+ for (const asset of compilation.getAssets()){
46
+ if (!asset.name.endsWith('.css')) continue;
47
+ const text = asset.source.source().toString();
48
+ const match = VERBATIM_CSS_MARKER.exec(text);
49
+ if (!match) continue;
50
+ const entry = registry().get(match[1]);
51
+ if (entry) {
52
+ compilation.updateAsset(asset.name, new sources.RawSource(entry.raw));
53
+ restored.push(asset.name);
54
+ if (entry.resourcePath) emitVerbatimCssClosure(compilation, asset.name, entry.raw, entry.resourcePath, new Set());
55
+ }
56
+ }
57
+ return restored;
58
+ }
59
+ function emitVerbatimCssClosure(compilation, assetName, text, resourcePath, seen) {
60
+ if ('function' != typeof compilation.emitAsset) return;
61
+ const sourceDir = __rspack_external_node_path_c5b9b54f.dirname(resourcePath);
62
+ const assetDir = __rspack_external_node_path_c5b9b54f.posix.dirname(assetName);
63
+ for (const ref of cssRelativeRefs(text)){
64
+ const sourceFile = __rspack_external_node_path_c5b9b54f.resolve(sourceDir, ref);
65
+ if (seen.has(sourceFile) || !__rspack_external_node_fs_5ea92f0c.existsSync(sourceFile)) continue;
66
+ seen.add(sourceFile);
67
+ const outName = __rspack_external_node_path_c5b9b54f.posix.normalize(__rspack_external_node_path_c5b9b54f.posix.join(assetDir, ref.split(__rspack_external_node_path_c5b9b54f.sep).join('/')));
68
+ if (outName.startsWith('..')) continue;
69
+ const bytes = __rspack_external_node_fs_5ea92f0c.readFileSync(sourceFile);
70
+ if ('function' != typeof compilation.getAsset || !compilation.getAsset(outName)) compilation.emitAsset(outName, new sources.RawSource(bytes));
71
+ if (sourceFile.endsWith('.css')) emitVerbatimCssClosure(compilation, outName, bytes.toString('utf8'), sourceFile, seen);
72
+ }
73
+ }
74
+ function cssSelectorTokens(text) {
75
+ const tokens = new Set();
76
+ const scrubbed = text.replace(/\/\*[\s\S]*?\*\//g, ' ').replace(/url\([^)]*\)/g, ' ').replace(/"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'/g, ' ');
77
+ for (const match of scrubbed.matchAll(/[.#][A-Za-z_-][\w-]*/g)){
78
+ const token = match[0];
79
+ if (!/^#[0-9a-fA-F]{3,8}$/.test(token)) tokens.add(token);
80
+ }
81
+ return tokens;
82
+ }
83
+ function minifierDroppedTokens(before, after) {
84
+ const kept = cssSelectorTokens(after);
85
+ return [
86
+ ...cssSelectorTokens(before)
87
+ ].filter((token)=>!kept.has(token));
88
+ }
89
+ export { minifierDroppedTokens, registerVerbatimCss, restoreVerbatimCssAssets, verbatimCssPlaceholder };
package/dist/278.mjs ADDED
@@ -0,0 +1,52 @@
1
+ import { createRequire as __extjsCreateRequire } from "node:module"; const require = __extjsCreateRequire(import.meta.url);
2
+ import * as __rspack_external_node_fs_5ea92f0c from "node:fs";
3
+ import * as __rspack_external_node_path_c5b9b54f from "node:path";
4
+ function isUsableDir(candidate) {
5
+ try {
6
+ if (!__rspack_external_node_fs_5ea92f0c.existsSync(candidate)) return false;
7
+ const stat = __rspack_external_node_fs_5ea92f0c.statSync(candidate);
8
+ return 'function' == typeof stat?.isDirectory ? stat.isDirectory() : true;
9
+ } catch {
10
+ return false;
11
+ }
12
+ }
13
+ function inspectPublicFolders(manifestPath, projectRoot) {
14
+ const fromManifest = __rspack_external_node_path_c5b9b54f.join(__rspack_external_node_path_c5b9b54f.dirname(manifestPath), 'public');
15
+ const fromRoot = projectRoot ? __rspack_external_node_path_c5b9b54f.join(projectRoot, 'public') : fromManifest;
16
+ const sameLocation = __rspack_external_node_path_c5b9b54f.resolve(fromRoot) === __rspack_external_node_path_c5b9b54f.resolve(fromManifest);
17
+ const rootOk = isUsableDir(fromRoot);
18
+ const manifestOk = !sameLocation && isUsableDir(fromManifest);
19
+ return {
20
+ publicDir: rootOk ? fromRoot : manifestOk ? fromManifest : void 0,
21
+ fromRoot,
22
+ fromManifest,
23
+ usedFallback: !rootOk && manifestOk,
24
+ bothExist: rootOk && manifestOk
25
+ };
26
+ }
27
+ function resolvePublicFolder(manifestPath, projectRoot) {
28
+ return inspectPublicFolders(manifestPath, projectRoot).publicDir;
29
+ }
30
+ function publicFolderOrDefault(manifestPath, projectRoot) {
31
+ return resolvePublicFolder(manifestPath, projectRoot) || __rspack_external_node_path_c5b9b54f.join(projectRoot, 'public');
32
+ }
33
+ function publicResolveRoots(projectRoot, manifestPath) {
34
+ const manifestDir = __rspack_external_node_path_c5b9b54f.dirname(manifestPath);
35
+ const fromRoot = __rspack_external_node_path_c5b9b54f.join(projectRoot, 'public');
36
+ const fromManifest = __rspack_external_node_path_c5b9b54f.join(manifestDir, 'public');
37
+ const roots = [
38
+ fromRoot,
39
+ manifestDir
40
+ ];
41
+ if (__rspack_external_node_path_c5b9b54f.resolve(fromManifest) !== __rspack_external_node_path_c5b9b54f.resolve(fromRoot)) roots.push(fromManifest);
42
+ return roots;
43
+ }
44
+ const publicRootsByCompiler = new WeakMap();
45
+ function rememberPublicRoots(compiler, roots) {
46
+ publicRootsByCompiler.set(compiler, roots.filter(Boolean).map((root)=>__rspack_external_node_path_c5b9b54f.resolve(root)));
47
+ }
48
+ function publicRootsFor(compiler) {
49
+ if (!compiler) return [];
50
+ return publicRootsByCompiler.get(compiler) || [];
51
+ }
52
+ export { inspectPublicFolders, publicFolderOrDefault, publicResolveRoots, publicRootsFor, rememberPublicRoots };
package/dist/292.mjs ADDED
@@ -0,0 +1,61 @@
1
+ import { createRequire as __extjsCreateRequire } from "node:module"; const require = __extjsCreateRequire(import.meta.url);
2
+ function identityLineMap(resourcePath, source) {
3
+ const lineCount = source.split('\n').length;
4
+ const groups = [];
5
+ for(let line = 0; line < lineCount; line++)groups.push(0 === line ? 'AAAA' : 'AACA');
6
+ return {
7
+ version: 3,
8
+ file: '',
9
+ sources: [
10
+ resourcePath
11
+ ],
12
+ sourcesContent: [
13
+ source
14
+ ],
15
+ names: [],
16
+ mappings: groups.join(';')
17
+ };
18
+ }
19
+ function isLoaderSourceMap(value) {
20
+ return Boolean(value && 'object' == typeof value && 'string' == typeof value.mappings && Array.isArray(value.sources));
21
+ }
22
+ function inputOrIdentityMap(inputSourceMap, resourcePath, source) {
23
+ if (isLoaderSourceMap(inputSourceMap)) return {
24
+ ...inputSourceMap,
25
+ file: inputSourceMap.file || ''
26
+ };
27
+ if ('string' == typeof inputSourceMap) try {
28
+ const parsed = JSON.parse(inputSourceMap);
29
+ if (isLoaderSourceMap(parsed)) return {
30
+ ...parsed,
31
+ file: parsed.file || ''
32
+ };
33
+ } catch {}
34
+ return identityLineMap(resourcePath, source);
35
+ }
36
+ function adjustLoaderSourceMap(map, options) {
37
+ let groups = map.mappings.split(';');
38
+ const beforeLines = options.before.split('\n');
39
+ const afterLines = options.after.split('\n');
40
+ const removed = beforeLines.length - afterLines.length;
41
+ if (removed > 0) {
42
+ let at = 0;
43
+ while(at < afterLines.length && at < beforeLines.length && beforeLines[at] === afterLines[at])at++;
44
+ groups.splice(at, removed);
45
+ }
46
+ const prefixLineCount = options.prefix ? options.prefix.split('\n').length - 1 : 0;
47
+ if (prefixLineCount > 0) groups = [
48
+ ...new Array(prefixLineCount).fill(''),
49
+ ...groups
50
+ ];
51
+ return {
52
+ ...map,
53
+ mappings: groups.join(';')
54
+ };
55
+ }
56
+ function returnWithMap(context, text, map) {
57
+ const callback = context?.callback;
58
+ if ('function' == typeof callback) return void callback.call(context, null, text, map);
59
+ return text;
60
+ }
61
+ export { adjustLoaderSourceMap, inputOrIdentityMap, returnWithMap };
package/dist/372.mjs ADDED
@@ -0,0 +1,87 @@
1
+ import { createRequire as __extjsCreateRequire } from "node:module"; const require = __extjsCreateRequire(import.meta.url);
2
+ import { replaceCssUrlRefs, toPosixPath, htmlStaticAssetOutputName } from "./518.mjs";
3
+ import * as __rspack_external_node_fs_5ea92f0c from "node:fs";
4
+ import * as __rspack_external_node_path_c5b9b54f from "node:path";
5
+ const EXTENSION_ROOT_PLACEHOLDER = '__EXTENSIONJS_EXTENSION_ROOT__/';
6
+ function isFile(candidate) {
7
+ try {
8
+ return __rspack_external_node_fs_5ea92f0c.statSync(candidate).isFile();
9
+ } catch {
10
+ return false;
11
+ }
12
+ }
13
+ function resolveTarget(req, { resourcePath, manifestDir, publicRoot }) {
14
+ if (req.startsWith('/')) {
15
+ const rel = req.slice(1);
16
+ const fromPublic = __rspack_external_node_path_c5b9b54f.join(publicRoot, rel);
17
+ if (isFile(fromPublic)) return {
18
+ absolutePath: fromPublic,
19
+ outputName: toPosixPath(__rspack_external_node_path_c5b9b54f.normalize(rel)),
20
+ publicOwned: true
21
+ };
22
+ const fromManifest = __rspack_external_node_path_c5b9b54f.join(manifestDir, rel);
23
+ if (!isFile(fromManifest)) return;
24
+ return {
25
+ absolutePath: fromManifest,
26
+ outputName: htmlStaticAssetOutputName(manifestDir, resourcePath, fromManifest),
27
+ publicOwned: false
28
+ };
29
+ }
30
+ const absolutePath = __rspack_external_node_path_c5b9b54f.resolve(__rspack_external_node_path_c5b9b54f.dirname(resourcePath), req);
31
+ if (!isFile(absolutePath)) return;
32
+ return {
33
+ absolutePath,
34
+ outputName: htmlStaticAssetOutputName(manifestDir, resourcePath, absolutePath),
35
+ publicOwned: false
36
+ };
37
+ }
38
+ function rewriteInlinedCssUrls(source, context) {
39
+ const targets = [];
40
+ const seen = new Map();
41
+ const css = replaceCssUrlRefs(source, (request)=>{
42
+ const suffixAt = request.search(/[?#]/);
43
+ const req = -1 === suffixAt ? request : request.slice(0, suffixAt);
44
+ const suffix = -1 === suffixAt ? '' : request.slice(suffixAt);
45
+ if (!req || req.startsWith('//') || /^[a-z][a-z0-9+.-]*:/i.test(req)) return;
46
+ if (req.startsWith('~') || req.startsWith('@')) return;
47
+ if (req.startsWith(EXTENSION_ROOT_PLACEHOLDER)) return;
48
+ let outputName = seen.get(req);
49
+ if (!outputName) {
50
+ const target = resolveTarget(req, context);
51
+ if (!target) return;
52
+ outputName = target.outputName;
53
+ seen.set(req, outputName);
54
+ targets.push({
55
+ request: req,
56
+ ...target
57
+ });
58
+ }
59
+ return `${EXTENSION_ROOT_PLACEHOLDER}${outputName}${suffix}`;
60
+ });
61
+ return {
62
+ css,
63
+ targets
64
+ };
65
+ }
66
+ function toRuntimeStylesheetModule(css) {
67
+ return [
68
+ `var __extjsCssText = ${JSON.stringify(css)};`,
69
+ 'function __extjsExtensionRoot() {',
70
+ ' try {',
71
+ ' if (typeof browser === "object" && browser && browser.runtime && typeof browser.runtime.getURL === "function") return String(browser.runtime.getURL("/"));',
72
+ ' } catch (error) {}',
73
+ ' try {',
74
+ ' if (typeof chrome === "object" && chrome && chrome.runtime && typeof chrome.runtime.getURL === "function") return String(chrome.runtime.getURL("/"));',
75
+ ' } catch (error) {}',
76
+ ' try {',
77
+ ' var base = (typeof globalThis === "object" && globalThis && globalThis.__EXTJS_EXTENSION_BASE__) ? String(globalThis.__EXTJS_EXTENSION_BASE__) : "";',
78
+ ' if (!base && typeof document === "object" && document && document.documentElement) base = String(document.documentElement.getAttribute("data-extjs-extension-base") || "");',
79
+ ' if (base) return base.replace(/\\/+$/, "") + "/";',
80
+ ' } catch (error) {}',
81
+ ' return "/";',
82
+ '}',
83
+ `module.exports = "data:text/css;charset=utf-8," + encodeURIComponent(__extjsCssText.split(${JSON.stringify(EXTENSION_ROOT_PLACEHOLDER)}).join(__extjsExtensionRoot()));`,
84
+ ''
85
+ ].join('\n');
86
+ }
87
+ export { EXTENSION_ROOT_PLACEHOLDER, rewriteInlinedCssUrls, toRuntimeStylesheetModule };