@ox-content/vite-plugin 3.0.0-alpha.8 → 3.0.0-beta.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 (79) hide show
  1. package/dist/index.cjs +8898 -2585
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +2050 -221
  4. package/dist/index.d.cts.map +1 -1
  5. package/dist/index.d.mts +2050 -221
  6. package/dist/index.d.mts.map +1 -1
  7. package/dist/index.mjs +8839 -2531
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/markdown-tables.cjs +70 -0
  10. package/dist/markdown-tables.cjs.map +1 -0
  11. package/dist/markdown-tables.d.cts +22 -0
  12. package/dist/markdown-tables.d.cts.map +1 -0
  13. package/dist/markdown-tables.d.mts +22 -0
  14. package/dist/markdown-tables.d.mts.map +1 -0
  15. package/dist/markdown-tables.mjs +66 -0
  16. package/dist/markdown-tables.mjs.map +1 -0
  17. package/dist/napi.cjs +44 -0
  18. package/dist/napi.cjs.map +1 -0
  19. package/dist/napi.mjs +34 -0
  20. package/dist/napi.mjs.map +1 -0
  21. package/dist/reader-chrome-client.cjs +103 -0
  22. package/dist/reader-chrome-client.d.cts +2 -0
  23. package/dist/reader-chrome-client.d.mts +2 -0
  24. package/dist/reader-chrome-client.mjs +102 -0
  25. package/dist/reader-chrome.cjs +109 -0
  26. package/dist/reader-chrome.cjs.map +1 -0
  27. package/dist/reader-chrome.d.cts +103 -0
  28. package/dist/reader-chrome.d.mts +103 -0
  29. package/dist/reader-chrome.mjs +98 -0
  30. package/dist/reader-chrome.mjs.map +1 -0
  31. package/dist/styles/all.css +15 -0
  32. package/dist/styles/citations.css +62 -0
  33. package/dist/styles/core.css +2261 -0
  34. package/dist/styles/github.css +262 -0
  35. package/dist/styles/graphviz.css +34 -0
  36. package/dist/styles/magic-links.css +33 -0
  37. package/dist/styles/markdown-tables.css +16 -0
  38. package/dist/styles/mermaid.css +151 -0
  39. package/dist/styles/not-by-ai.css +43 -0
  40. package/dist/styles/ogp.css +170 -0
  41. package/dist/styles/reader-chrome.css +163 -0
  42. package/dist/styles/social.css +678 -0
  43. package/dist/styles/tabs.css +210 -0
  44. package/dist/styles/theme-transition.css +37 -0
  45. package/dist/styles/twitter-full.css +598 -0
  46. package/dist/styles/youtube.css +87 -0
  47. package/dist/theme-tokens.cjs +95 -0
  48. package/dist/theme-tokens.cjs.map +1 -0
  49. package/dist/theme-tokens.d.cts +72 -0
  50. package/dist/theme-tokens.d.cts.map +1 -0
  51. package/dist/theme-tokens.d.mts +72 -0
  52. package/dist/theme-tokens.d.mts.map +1 -0
  53. package/dist/theme-tokens.mjs +91 -0
  54. package/dist/theme-tokens.mjs.map +1 -0
  55. package/dist/theme-transition-client.cjs +161 -0
  56. package/dist/theme-transition-client.d.cts +21 -0
  57. package/dist/theme-transition-client.d.mts +21 -0
  58. package/dist/theme-transition-client.mjs +160 -0
  59. package/dist/twitter-client.cjs +84 -0
  60. package/dist/twitter-client.d.cts +11 -0
  61. package/dist/twitter-client.d.mts +11 -0
  62. package/dist/twitter-client.mjs +83 -0
  63. package/dist/vitepress.cjs +614 -77
  64. package/dist/vitepress.cjs.map +1 -1
  65. package/dist/vitepress.mjs +588 -65
  66. package/dist/vitepress.mjs.map +1 -1
  67. package/package.json +89 -4
  68. package/dist/api.cjs +0 -6563
  69. package/dist/api.cjs.map +0 -1
  70. package/dist/api.mjs +0 -6456
  71. package/dist/api.mjs.map +0 -1
  72. package/dist/interop.cjs +0 -31
  73. package/dist/interop.cjs.map +0 -1
  74. package/dist/interop.mjs +0 -26
  75. package/dist/interop.mjs.map +0 -1
  76. package/dist/tabs.cjs +0 -98
  77. package/dist/tabs.cjs.map +0 -1
  78. package/dist/tabs.mjs +0 -99
  79. package/dist/tabs.mjs.map +0 -1
package/dist/interop.cjs DELETED
@@ -1,31 +0,0 @@
1
- //#region src/interop.ts
2
- /**
3
- * Interop helpers for loading ESM-only dependencies from the CommonJS build.
4
- */
5
- /**
6
- * Unwrap the `default` export of an ESM-only dependency.
7
- *
8
- * The CommonJS build (`dist/index.cjs`) loads pure-ESM packages such as
9
- * `rehype-parse` and `rehype-stringify` through `require(esm)`. The bundler's
10
- * interop helper then double-wraps their default export: what should be the
11
- * plugin function arrives as the module namespace `{ default: fn }` instead of
12
- * `fn` itself. Passing that object to `unified().use()` throws
13
- * "Expected usable value but received an empty preset".
14
- *
15
- * Calling `interopDefault` on a default import unwraps one extra level of
16
- * `default` nesting, so the same code works whether the dependency was loaded
17
- * as native ESM (`.mjs`) or through the CommonJS interop (`.cjs`). See #452.
18
- */
19
- function interopDefault(value) {
20
- if (value !== null && typeof value === "object" && "default" in value) return value.default;
21
- return value;
22
- }
23
- //#endregion
24
- Object.defineProperty(exports, "interopDefault", {
25
- enumerable: true,
26
- get: function() {
27
- return interopDefault;
28
- }
29
- });
30
-
31
- //# sourceMappingURL=interop.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interop.cjs","names":[],"sources":["../src/interop.ts"],"sourcesContent":["/**\n * Interop helpers for loading ESM-only dependencies from the CommonJS build.\n */\n\n/**\n * Unwrap the `default` export of an ESM-only dependency.\n *\n * The CommonJS build (`dist/index.cjs`) loads pure-ESM packages such as\n * `rehype-parse` and `rehype-stringify` through `require(esm)`. The bundler's\n * interop helper then double-wraps their default export: what should be the\n * plugin function arrives as the module namespace `{ default: fn }` instead of\n * `fn` itself. Passing that object to `unified().use()` throws\n * \"Expected usable value but received an empty preset\".\n *\n * Calling `interopDefault` on a default import unwraps one extra level of\n * `default` nesting, so the same code works whether the dependency was loaded\n * as native ESM (`.mjs`) or through the CommonJS interop (`.cjs`). See #452.\n */\nexport function interopDefault<T>(value: T): T {\n if (value !== null && typeof value === \"object\" && \"default\" in value) {\n return (value as { default: T }).default;\n }\n return value;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,SAAgB,eAAkB,OAAa;CAC7C,IAAI,UAAU,QAAQ,OAAO,UAAU,YAAY,aAAa,OAC9D,OAAQ,MAAyB;CAEnC,OAAO;AACT"}
package/dist/interop.mjs DELETED
@@ -1,26 +0,0 @@
1
- //#region src/interop.ts
2
- /**
3
- * Interop helpers for loading ESM-only dependencies from the CommonJS build.
4
- */
5
- /**
6
- * Unwrap the `default` export of an ESM-only dependency.
7
- *
8
- * The CommonJS build (`dist/index.cjs`) loads pure-ESM packages such as
9
- * `rehype-parse` and `rehype-stringify` through `require(esm)`. The bundler's
10
- * interop helper then double-wraps their default export: what should be the
11
- * plugin function arrives as the module namespace `{ default: fn }` instead of
12
- * `fn` itself. Passing that object to `unified().use()` throws
13
- * "Expected usable value but received an empty preset".
14
- *
15
- * Calling `interopDefault` on a default import unwraps one extra level of
16
- * `default` nesting, so the same code works whether the dependency was loaded
17
- * as native ESM (`.mjs`) or through the CommonJS interop (`.cjs`). See #452.
18
- */
19
- function interopDefault(value) {
20
- if (value !== null && typeof value === "object" && "default" in value) return value.default;
21
- return value;
22
- }
23
- //#endregion
24
- export { interopDefault as t };
25
-
26
- //# sourceMappingURL=interop.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interop.mjs","names":[],"sources":["../src/interop.ts"],"sourcesContent":["/**\n * Interop helpers for loading ESM-only dependencies from the CommonJS build.\n */\n\n/**\n * Unwrap the `default` export of an ESM-only dependency.\n *\n * The CommonJS build (`dist/index.cjs`) loads pure-ESM packages such as\n * `rehype-parse` and `rehype-stringify` through `require(esm)`. The bundler's\n * interop helper then double-wraps their default export: what should be the\n * plugin function arrives as the module namespace `{ default: fn }` instead of\n * `fn` itself. Passing that object to `unified().use()` throws\n * \"Expected usable value but received an empty preset\".\n *\n * Calling `interopDefault` on a default import unwraps one extra level of\n * `default` nesting, so the same code works whether the dependency was loaded\n * as native ESM (`.mjs`) or through the CommonJS interop (`.cjs`). See #452.\n */\nexport function interopDefault<T>(value: T): T {\n if (value !== null && typeof value === \"object\" && \"default\" in value) {\n return (value as { default: T }).default;\n }\n return value;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,SAAgB,eAAkB,OAAa;CAC7C,IAAI,UAAU,QAAQ,OAAO,UAAU,YAAY,aAAa,OAC9D,OAAQ,MAAyB;CAEnC,OAAO;AACT"}
package/dist/tabs.cjs DELETED
@@ -1,98 +0,0 @@
1
- const require_vitepress = require("./vitepress.cjs");
2
- //#region src/plugins/tabs.ts
3
- /**
4
- * Tabs Plugin - Pure CSS implementation
5
- *
6
- * Transforms <Tabs>/<Tab> components into accessible HTML with CSS :has()
7
- * based tab switching (no JavaScript required).
8
- *
9
- * The HTML rewrite is performed in Rust (`transformTabsEmbeds` in
10
- * @ox-content/napi), replacing the previous rehype parse/stringify round-trip.
11
- * The per-build group counter (consumed by `generateTabsCSS`) stays here and is
12
- * advanced by the number of groups the Rust transform reports, so CSS
13
- * generation still covers exactly the groups that were emitted.
14
- */
15
- var tabs_exports = /* @__PURE__ */ require_vitepress.__exportAll({
16
- generateTabsCSS: () => generateTabsCSS,
17
- getTabGroupCounter: () => getTabGroupCounter,
18
- resetTabGroupCounter: () => resetTabGroupCounter,
19
- setTabGroupCounter: () => setTabGroupCounter,
20
- transformTabs: () => transformTabs
21
- });
22
- let tabGroupCounter = 0;
23
- /**
24
- * Reset tab group counter (for testing and per dev-server request).
25
- */
26
- function resetTabGroupCounter() {
27
- tabGroupCounter = 0;
28
- }
29
- /**
30
- * Read the shared tab group counter. Other tab-like transforms (such as the
31
- * package-manager tabs) share this counter so `data-group` ids and the CSS
32
- * generated by {@link generateTabsCSS} stay unique across a page.
33
- */
34
- function getTabGroupCounter() {
35
- return tabGroupCounter;
36
- }
37
- /** Set the shared tab group counter (advanced by other tab-like transforms). */
38
- function setTabGroupCounter(value) {
39
- tabGroupCounter = value;
40
- }
41
- /**
42
- * Transform Tabs components in HTML.
43
- */
44
- async function transformTabs(html) {
45
- if (!/<tabs/i.test(html)) return html;
46
- const result = (await require_vitepress.importNapiModule()).transformTabsEmbeds(html, tabGroupCounter);
47
- tabGroupCounter += result.groupCount;
48
- return result.html;
49
- }
50
- /**
51
- * Generate dynamic CSS for :has() based tab switching.
52
- * This is needed because :has() selectors need unique IDs.
53
- */
54
- function generateTabsCSS(groupCount) {
55
- if (groupCount === 0) return "";
56
- let css = "/* Dynamic Tabs CSS */\n";
57
- for (let g = 0; g < groupCount; g++) for (let t = 0; t < 8; t++) css += `.ox-tabs[data-group="${g}"]:has(#ox-tab-${g}-${t}:checked) .ox-tab-panel[data-tab="${t}"] { display: block; }\n`;
58
- return css;
59
- }
60
- //#endregion
61
- Object.defineProperty(exports, "generateTabsCSS", {
62
- enumerable: true,
63
- get: function() {
64
- return generateTabsCSS;
65
- }
66
- });
67
- Object.defineProperty(exports, "getTabGroupCounter", {
68
- enumerable: true,
69
- get: function() {
70
- return getTabGroupCounter;
71
- }
72
- });
73
- Object.defineProperty(exports, "resetTabGroupCounter", {
74
- enumerable: true,
75
- get: function() {
76
- return resetTabGroupCounter;
77
- }
78
- });
79
- Object.defineProperty(exports, "setTabGroupCounter", {
80
- enumerable: true,
81
- get: function() {
82
- return setTabGroupCounter;
83
- }
84
- });
85
- Object.defineProperty(exports, "tabs_exports", {
86
- enumerable: true,
87
- get: function() {
88
- return tabs_exports;
89
- }
90
- });
91
- Object.defineProperty(exports, "transformTabs", {
92
- enumerable: true,
93
- get: function() {
94
- return transformTabs;
95
- }
96
- });
97
-
98
- //# sourceMappingURL=tabs.cjs.map
package/dist/tabs.cjs.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"tabs.cjs","names":["importNapiModule"],"sources":["../src/plugins/tabs.ts"],"sourcesContent":["/**\n * Tabs Plugin - Pure CSS implementation\n *\n * Transforms <Tabs>/<Tab> components into accessible HTML with CSS :has()\n * based tab switching (no JavaScript required).\n *\n * The HTML rewrite is performed in Rust (`transformTabsEmbeds` in\n * @ox-content/napi), replacing the previous rehype parse/stringify round-trip.\n * The per-build group counter (consumed by `generateTabsCSS`) stays here and is\n * advanced by the number of groups the Rust transform reports, so CSS\n * generation still covers exactly the groups that were emitted.\n */\n\nimport { importNapiModule } from \"../napi\";\n\nlet tabGroupCounter = 0;\n\n/**\n * Reset tab group counter (for testing and per dev-server request).\n */\nexport function resetTabGroupCounter(): void {\n tabGroupCounter = 0;\n}\n\n/**\n * Read the shared tab group counter. Other tab-like transforms (such as the\n * package-manager tabs) share this counter so `data-group` ids and the CSS\n * generated by {@link generateTabsCSS} stay unique across a page.\n */\nexport function getTabGroupCounter(): number {\n return tabGroupCounter;\n}\n\n/** Set the shared tab group counter (advanced by other tab-like transforms). */\nexport function setTabGroupCounter(value: number): void {\n tabGroupCounter = value;\n}\n\n/**\n * Transform Tabs components in HTML.\n */\nexport async function transformTabs(html: string): Promise<string> {\n // Cheap marker check: skip the NAPI call entirely when there's no `<tabs>`\n // element. The Rust side guards the same way, but short-circuiting here\n // avoids marshalling the whole document across the boundary.\n if (!/<tabs/i.test(html)) {\n return html;\n }\n\n const mod = await importNapiModule();\n const result = mod.transformTabsEmbeds(html, tabGroupCounter);\n tabGroupCounter += result.groupCount;\n return result.html;\n}\n\n/**\n * Generate dynamic CSS for :has() based tab switching.\n * This is needed because :has() selectors need unique IDs.\n */\nexport function generateTabsCSS(groupCount: number): string {\n if (groupCount === 0) return \"\";\n\n let css = \"/* Dynamic Tabs CSS */\\n\";\n\n for (let g = 0; g < groupCount; g++) {\n for (let t = 0; t < 8; t++) {\n css += `.ox-tabs[data-group=\"${g}\"]:has(#ox-tab-${g}-${t}:checked) .ox-tab-panel[data-tab=\"${t}\"] { display: block; }\\n`;\n }\n }\n\n return css;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAeA,IAAI,kBAAkB;;;;AAKtB,SAAgB,uBAA6B;CAC3C,kBAAkB;AACpB;;;;;;AAOA,SAAgB,qBAA6B;CAC3C,OAAO;AACT;;AAGA,SAAgB,mBAAmB,OAAqB;CACtD,kBAAkB;AACpB;;;;AAKA,eAAsB,cAAc,MAA+B;CAIjE,IAAI,CAAC,SAAS,KAAK,IAAI,GACrB,OAAO;CAIT,MAAM,UAAS,MADGA,kBAAAA,iBAAiB,EAAA,CAChB,oBAAoB,MAAM,eAAe;CAC5D,mBAAmB,OAAO;CAC1B,OAAO,OAAO;AAChB;;;;;AAMA,SAAgB,gBAAgB,YAA4B;CAC1D,IAAI,eAAe,GAAG,OAAO;CAE7B,IAAI,MAAM;CAEV,KAAK,IAAI,IAAI,GAAG,IAAI,YAAY,KAC9B,KAAK,IAAI,IAAI,GAAG,IAAI,GAAG,KACrB,OAAO,wBAAwB,EAAE,iBAAiB,EAAE,GAAG,EAAE,oCAAoC,EAAE;CAInG,OAAO;AACT"}
package/dist/tabs.mjs DELETED
@@ -1,99 +0,0 @@
1
- import { h as importNapiModule } from "./vitepress.mjs";
2
- import { createRequire } from "node:module";
3
- //#region \0rolldown/runtime.js
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __esmMin = (fn, res, err) => () => {
9
- if (err) throw err[0];
10
- try {
11
- return fn && (res = fn(fn = 0)), res;
12
- } catch (e) {
13
- throw err = [e], e;
14
- }
15
- };
16
- var __exportAll = (all, no_symbols) => {
17
- let target = {};
18
- for (var name in all) __defProp(target, name, {
19
- get: all[name],
20
- enumerable: true
21
- });
22
- if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
23
- return target;
24
- };
25
- var __copyProps = (to, from, except, desc) => {
26
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
27
- key = keys[i];
28
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
29
- get: ((k) => from[k]).bind(null, key),
30
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
31
- });
32
- }
33
- return to;
34
- };
35
- var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
36
- var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
37
- //#endregion
38
- //#region src/plugins/tabs.ts
39
- /**
40
- * Tabs Plugin - Pure CSS implementation
41
- *
42
- * Transforms <Tabs>/<Tab> components into accessible HTML with CSS :has()
43
- * based tab switching (no JavaScript required).
44
- *
45
- * The HTML rewrite is performed in Rust (`transformTabsEmbeds` in
46
- * @ox-content/napi), replacing the previous rehype parse/stringify round-trip.
47
- * The per-build group counter (consumed by `generateTabsCSS`) stays here and is
48
- * advanced by the number of groups the Rust transform reports, so CSS
49
- * generation still covers exactly the groups that were emitted.
50
- */
51
- var tabs_exports = /* @__PURE__ */ __exportAll({
52
- generateTabsCSS: () => generateTabsCSS,
53
- getTabGroupCounter: () => getTabGroupCounter,
54
- resetTabGroupCounter: () => resetTabGroupCounter,
55
- setTabGroupCounter: () => setTabGroupCounter,
56
- transformTabs: () => transformTabs
57
- });
58
- let tabGroupCounter = 0;
59
- /**
60
- * Reset tab group counter (for testing and per dev-server request).
61
- */
62
- function resetTabGroupCounter() {
63
- tabGroupCounter = 0;
64
- }
65
- /**
66
- * Read the shared tab group counter. Other tab-like transforms (such as the
67
- * package-manager tabs) share this counter so `data-group` ids and the CSS
68
- * generated by {@link generateTabsCSS} stay unique across a page.
69
- */
70
- function getTabGroupCounter() {
71
- return tabGroupCounter;
72
- }
73
- /** Set the shared tab group counter (advanced by other tab-like transforms). */
74
- function setTabGroupCounter(value) {
75
- tabGroupCounter = value;
76
- }
77
- /**
78
- * Transform Tabs components in HTML.
79
- */
80
- async function transformTabs(html) {
81
- if (!/<tabs/i.test(html)) return html;
82
- const result = (await importNapiModule()).transformTabsEmbeds(html, tabGroupCounter);
83
- tabGroupCounter += result.groupCount;
84
- return result.html;
85
- }
86
- /**
87
- * Generate dynamic CSS for :has() based tab switching.
88
- * This is needed because :has() selectors need unique IDs.
89
- */
90
- function generateTabsCSS(groupCount) {
91
- if (groupCount === 0) return "";
92
- let css = "/* Dynamic Tabs CSS */\n";
93
- for (let g = 0; g < groupCount; g++) for (let t = 0; t < 8; t++) css += `.ox-tabs[data-group="${g}"]:has(#ox-tab-${g}-${t}:checked) .ox-tab-panel[data-tab="${t}"] { display: block; }\n`;
94
- return css;
95
- }
96
- //#endregion
97
- export { tabs_exports as a, __exportAll as c, setTabGroupCounter as i, __require as l, getTabGroupCounter as n, transformTabs as o, resetTabGroupCounter as r, __esmMin as s, generateTabsCSS as t, __toCommonJS as u };
98
-
99
- //# sourceMappingURL=tabs.mjs.map
package/dist/tabs.mjs.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"tabs.mjs","names":[],"sources":["../src/plugins/tabs.ts"],"sourcesContent":["/**\n * Tabs Plugin - Pure CSS implementation\n *\n * Transforms <Tabs>/<Tab> components into accessible HTML with CSS :has()\n * based tab switching (no JavaScript required).\n *\n * The HTML rewrite is performed in Rust (`transformTabsEmbeds` in\n * @ox-content/napi), replacing the previous rehype parse/stringify round-trip.\n * The per-build group counter (consumed by `generateTabsCSS`) stays here and is\n * advanced by the number of groups the Rust transform reports, so CSS\n * generation still covers exactly the groups that were emitted.\n */\n\nimport { importNapiModule } from \"../napi\";\n\nlet tabGroupCounter = 0;\n\n/**\n * Reset tab group counter (for testing and per dev-server request).\n */\nexport function resetTabGroupCounter(): void {\n tabGroupCounter = 0;\n}\n\n/**\n * Read the shared tab group counter. Other tab-like transforms (such as the\n * package-manager tabs) share this counter so `data-group` ids and the CSS\n * generated by {@link generateTabsCSS} stay unique across a page.\n */\nexport function getTabGroupCounter(): number {\n return tabGroupCounter;\n}\n\n/** Set the shared tab group counter (advanced by other tab-like transforms). */\nexport function setTabGroupCounter(value: number): void {\n tabGroupCounter = value;\n}\n\n/**\n * Transform Tabs components in HTML.\n */\nexport async function transformTabs(html: string): Promise<string> {\n // Cheap marker check: skip the NAPI call entirely when there's no `<tabs>`\n // element. The Rust side guards the same way, but short-circuiting here\n // avoids marshalling the whole document across the boundary.\n if (!/<tabs/i.test(html)) {\n return html;\n }\n\n const mod = await importNapiModule();\n const result = mod.transformTabsEmbeds(html, tabGroupCounter);\n tabGroupCounter += result.groupCount;\n return result.html;\n}\n\n/**\n * Generate dynamic CSS for :has() based tab switching.\n * This is needed because :has() selectors need unique IDs.\n */\nexport function generateTabsCSS(groupCount: number): string {\n if (groupCount === 0) return \"\";\n\n let css = \"/* Dynamic Tabs CSS */\\n\";\n\n for (let g = 0; g < groupCount; g++) {\n for (let t = 0; t < 8; t++) {\n css += `.ox-tabs[data-group=\"${g}\"]:has(#ox-tab-${g}-${t}:checked) .ox-tab-panel[data-tab=\"${t}\"] { display: block; }\\n`;\n }\n }\n\n return css;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,IAAI,kBAAkB;;;;AAKtB,SAAgB,uBAA6B;CAC3C,kBAAkB;AACpB;;;;;;AAOA,SAAgB,qBAA6B;CAC3C,OAAO;AACT;;AAGA,SAAgB,mBAAmB,OAAqB;CACtD,kBAAkB;AACpB;;;;AAKA,eAAsB,cAAc,MAA+B;CAIjE,IAAI,CAAC,SAAS,KAAK,IAAI,GACrB,OAAO;CAIT,MAAM,UAAS,MADG,iBAAiB,EAAA,CAChB,oBAAoB,MAAM,eAAe;CAC5D,mBAAmB,OAAO;CAC1B,OAAO,OAAO;AAChB;;;;;AAMA,SAAgB,gBAAgB,YAA4B;CAC1D,IAAI,eAAe,GAAG,OAAO;CAE7B,IAAI,MAAM;CAEV,KAAK,IAAI,IAAI,GAAG,IAAI,YAAY,KAC9B,KAAK,IAAI,IAAI,GAAG,IAAI,GAAG,KACrB,OAAO,wBAAwB,EAAE,iBAAiB,EAAE,GAAG,EAAE,oCAAoC,EAAE;CAInG,OAAO;AACT"}