@ox-content/vite-plugin 3.0.0-alpha.16 → 3.0.0-alpha.17
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.
- package/dist/index.cjs +98 -69
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -5693
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +3 -5693
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +37 -18
- package/dist/index.mjs.map +1 -1
- package/dist/markdown-tables.d.cts +13 -16
- package/dist/markdown-tables.d.cts.map +1 -1
- package/dist/markdown-tables.d.mts +13 -16
- package/dist/markdown-tables.d.mts.map +1 -1
- package/dist/napi.cjs +44 -0
- package/dist/napi.cjs.map +1 -0
- package/dist/napi.mjs +34 -0
- package/dist/napi.mjs.map +1 -0
- package/dist/reader-chrome-client.cjs +103 -0
- package/dist/reader-chrome-client.d.cts +2 -0
- package/dist/reader-chrome-client.d.mts +2 -0
- package/dist/reader-chrome-client.mjs +102 -0
- package/dist/reader-chrome.cjs +109 -0
- package/dist/reader-chrome.cjs.map +1 -0
- package/dist/reader-chrome.d.cts +5748 -0
- package/dist/reader-chrome.d.cts.map +1 -0
- package/dist/reader-chrome.d.mts +5748 -0
- package/dist/reader-chrome.d.mts.map +1 -0
- package/dist/reader-chrome.mjs +98 -0
- package/dist/reader-chrome.mjs.map +1 -0
- package/dist/reader-chrome2.d.cts +2 -0
- package/dist/reader-chrome2.d.mts +2 -0
- package/dist/styles/all.css +1 -0
- package/dist/styles/reader-chrome.css +160 -0
- package/dist/styles/twitter-full.css +65 -9
- package/dist/theme-tokens.d.cts +18 -21
- package/dist/theme-tokens.d.cts.map +1 -1
- package/dist/theme-tokens.d.mts +18 -21
- package/dist/theme-tokens.d.mts.map +1 -1
- package/dist/theme-tokens2.d.cts +75 -0
- package/dist/theme-tokens2.d.cts.map +1 -0
- package/dist/theme-tokens2.d.mts +75 -0
- package/dist/theme-tokens2.d.mts.map +1 -0
- package/dist/vitepress.cjs +2 -43
- package/dist/vitepress.cjs.map +1 -1
- package/dist/vitepress.mjs +2 -31
- package/dist/vitepress.mjs.map +1 -1
- package/package.json +25 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reader-chrome.d.mts","names":[],"sources":["../src/header-chrome.ts","../src/theme-fonts.ts","../src/theme.ts","../src/plugins/provider-articles.ts","../src/plugins/provider-packages.ts","../src/plugins/provider-playgrounds.ts","../src/plugins/provider-videos.ts","../src/plugins/reddit/types.ts","../src/plugins/twitter/types.ts","../src/plugins/github/types.ts","../src/plugins/ogp/types.ts","../src/plugins/graphviz-renderer.ts","../src/cross-reference-types.ts","../src/citation-types.ts","../src/budoux-types.ts","../src/page-context.ts","../src/theme-renderer.ts","../src/types.ts","../src/reader-chrome.ts"],"mappings":";;;;;;;KAKY,uBAAuB;;UAGlB;EACf,MAAM;EACN;EACA,QAAQ;;;UAIO;EACf;;EAEA;;EAEA;;;UAIe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;;;iBAIc,wBACd,iBAAiB;;iBAMH,qBAAqB,aAAa,0BAA0B;;;;;iBAoB5D,mBACd,MAAM,aACN,iBACA;;UAwBe;EACf;EACA;EACA,QAAQ;;;iBAIM,sBACd,OAAO,6BACP,iBACA,yBACC;;;KChFS;KACA;KACA;;UAGK;;EAEf;;EAEA,WAAW;;EAEX;EACA;EACA,SAAS;EACT;EACA,UAAU;;EAEV;;EAEA;;EAEA;;EAEA;;KAGU,0BAA0B;;;;;;UChBrB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;UAMe;;EAEf;;EAEA;;EAEA;;;;;;;;UASe;;EAEf,OAAO;;EAEP,OAAO;;EAEP,QAAQ,eAAe;;;;;UAMR;;EAEf;;;;;UAMe;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;UAMe;;EAEf;;EAEA;;;KAIU;EAA4B;;;UAGvB;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;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,QAAQ;;;;UCjEO;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,aAAa;;;;;;EAMb;;KAiBU;;;UC3CK;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;IACE;IACA;;;UAIa;EACf;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA,QAAQ;;UAGO;EACf;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,SAAS;;UAmCM;;;;;EAKf;;;;;EAMA;;;;;EAMA;;;;;EAMA;;;;;EAMA;;;;UCxGe;EACf;EACA;EACA;EACA;EACA;EACA;;UAGe;;;;;EAKf;;;;;;EAOA;;;;;EAMA;;;;;;EAOA;;;;;EAMA;;;;;EAMA;;;;;EAMA;;;;KCnDU;UAEK;;EAEf;;EAEA;;EAEA,kBAAkB;;EAElB,eAAe;;EAEf;;EAEA;;EAEA;;UAGe;EACf;EACA;EACA,iBAAiB;EACjB,cAAc;EACd;EACA;EACA;;iBA2Bc;iBAMA,uBACd,mBAAmB,8BAClB;;;KChES;KACA;UAEK;EACf;EACA;EACA;;UAGe;EACf;EACA,UAAU;EACV,aAAa;EACb,aAAa;EACb,SAAS;;UAGM;EACf;EACA,SAAS;EACT,YAAY;EACZ,YAAY;EACZ,QAAQ,SAAS;;UAGF;EACf;EACA,MAAM;EACN;EACA;EACA;EACA;EACA;;;;KChCU;UAEK;EACf;EACA;EACA;EACA;EACA,UAAU;EACV,aAAa;EACb,YAAY;EACZ;;UAGe;EACf;EACA;EACA;EACA;EACA,SAAS;EACT,YAAY;EACZ,WAAW;EACX;;UAGe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;KC5CU;UAEK;EACf,MAAM;;UAGS;;;;;;EAMf;;;;;;EAOA,WA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O,oBAA2B;;;;;;;;iBAqB3D,sBAAsB,cAAc,QAAO;;;;iBAe3C,uBACd,QAAO,oBACN,SAAS;;;;;;iBAmBI,6BAA6B,QAAO;;;;iBASpC,gBAAgB,QAAO;;;;iBASvB,mBAAmB,QAAO;;;;;iBAU1B,2BAA2B,QAAO;;;;;iBASlC,4BAA4B,QAAO;iBAKnC,sBACd,QAAQ,uBACP,UAAU,QAAQ;iBAIL,oBAAoB,QAAQ"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { n as importNapiModuleSync } from "./napi.mjs";
|
|
2
|
+
//#region src/reader-chrome.ts
|
|
3
|
+
const EMPTY_ATTRIBUTES = Object.freeze({});
|
|
4
|
+
/**
|
|
5
|
+
* Resolve the public reader-chrome option shape.
|
|
6
|
+
*
|
|
7
|
+
* `true` mirrors `ssg.readerChrome: true`: copy, outbound-link decoration, and
|
|
8
|
+
* back-to-top are enabled. Object fields default on, so `{ copy: false }`
|
|
9
|
+
* disables only the copy button.
|
|
10
|
+
*/
|
|
11
|
+
function resolveReaderChromeInput(input = true) {
|
|
12
|
+
if (!input) return false;
|
|
13
|
+
if (input === true) return {
|
|
14
|
+
copy: true,
|
|
15
|
+
externalLinks: true,
|
|
16
|
+
backToTop: true
|
|
17
|
+
};
|
|
18
|
+
return {
|
|
19
|
+
copy: input.copy ?? true,
|
|
20
|
+
externalLinks: input.externalLinks ?? true,
|
|
21
|
+
backToTop: input.backToTop ?? true
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Apply the same native reader-chrome HTML transform used by the built-in SSG.
|
|
26
|
+
*
|
|
27
|
+
* This rewrites rendered article HTML. It wraps fenced `<pre>` blocks for copy
|
|
28
|
+
* controls and decorates outbound links when enabled. Back-to-top remains a
|
|
29
|
+
* document-shell control, so it is exposed through the asset helpers.
|
|
30
|
+
*/
|
|
31
|
+
function applyReaderChromeHtml(html, input = true) {
|
|
32
|
+
const chrome = resolveReaderChromeInput(input);
|
|
33
|
+
if (!chrome || !chrome.copy && !chrome.externalLinks) return html;
|
|
34
|
+
return importNapiModuleSync().applySsgReaderChromeHtml(html, {
|
|
35
|
+
copy: chrome.copy,
|
|
36
|
+
externalLinks: chrome.externalLinks,
|
|
37
|
+
backToTop: chrome.backToTop
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Root attributes consumed by the browser runtime.
|
|
42
|
+
*/
|
|
43
|
+
function readerChromeAttributes(input = true) {
|
|
44
|
+
const chrome = resolveReaderChromeInput(input);
|
|
45
|
+
if (!readerChromeIsEnabled(chrome)) return EMPTY_ATTRIBUTES;
|
|
46
|
+
return {
|
|
47
|
+
"data-ox-reader-chrome": "",
|
|
48
|
+
...chrome.copy ? { "data-ox-copy": "" } : {},
|
|
49
|
+
...chrome.externalLinks ? { "data-ox-external-links": "" } : {},
|
|
50
|
+
...chrome.backToTop ? { "data-ox-back-to-top": "" } : {}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Render the root attributes as a leading-space HTML fragment.
|
|
55
|
+
*
|
|
56
|
+
* Useful in template strings: `<article${renderReaderChromeAttributes()}>`.
|
|
57
|
+
*/
|
|
58
|
+
function renderReaderChromeAttributes(input = true) {
|
|
59
|
+
return Object.keys(readerChromeAttributes(input)).map((name) => ` ${name}`).join("");
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* CSS shared by the built-in SSG and custom hosts.
|
|
63
|
+
*/
|
|
64
|
+
function readerChromeCss(input = true) {
|
|
65
|
+
return readerChromeIsEnabled(resolveReaderChromeInput(input)) ? importNapiModuleSync().getSsgReaderChromeCss() : "";
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Auto-initializing script shared by the built-in SSG and custom hosts.
|
|
69
|
+
*/
|
|
70
|
+
function readerChromeScript(input = true) {
|
|
71
|
+
return readerChromeNeedsJs(resolveReaderChromeInput(input)) ? importNapiModuleSync().getSsgReaderChromeScript() : "";
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Inline stylesheet tag for hosts that do not import
|
|
75
|
+
* `@ox-content/vite-plugin/styles/reader-chrome.css`.
|
|
76
|
+
*/
|
|
77
|
+
function renderReaderChromeStyleTag(input = true) {
|
|
78
|
+
const css = readerChromeCss(input);
|
|
79
|
+
return css ? `<style data-ox-style="reader-chrome">\n${css}</style>` : "";
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Inline auto-init script for static hosts that do not bundle
|
|
83
|
+
* `@ox-content/vite-plugin/reader-chrome/client`.
|
|
84
|
+
*/
|
|
85
|
+
function renderReaderChromeScriptTag(input = true) {
|
|
86
|
+
const js = readerChromeScript(input);
|
|
87
|
+
return js ? `<script data-ox-script="reader-chrome">\n${js}<\/script>` : "";
|
|
88
|
+
}
|
|
89
|
+
function readerChromeIsEnabled(chrome) {
|
|
90
|
+
return Boolean(chrome && (chrome.copy || chrome.externalLinks || chrome.backToTop));
|
|
91
|
+
}
|
|
92
|
+
function readerChromeNeedsJs(chrome) {
|
|
93
|
+
return Boolean(chrome && (chrome.copy || chrome.backToTop));
|
|
94
|
+
}
|
|
95
|
+
//#endregion
|
|
96
|
+
export { applyReaderChromeHtml, readerChromeAttributes, readerChromeCss, readerChromeIsEnabled, readerChromeNeedsJs, readerChromeScript, renderReaderChromeAttributes, renderReaderChromeScriptTag, renderReaderChromeStyleTag, resolveReaderChromeInput };
|
|
97
|
+
|
|
98
|
+
//# sourceMappingURL=reader-chrome.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reader-chrome.mjs","names":[],"sources":["../src/reader-chrome.ts"],"sourcesContent":["import { importNapiModuleSync } from \"./napi\";\nimport type { ReaderChromeOptions, ResolvedReaderChrome } from \"./types\";\n\nexport type { ReaderChromeOptions, ResolvedReaderChrome };\n\ntype EnabledReaderChrome = Exclude<ResolvedReaderChrome, false>;\n\nexport type ReaderChromeInput = boolean | ReaderChromeOptions | EnabledReaderChrome | undefined;\n\nconst EMPTY_ATTRIBUTES = Object.freeze({}) as Readonly<Record<string, \"\">>;\n\n/**\n * Resolve the public reader-chrome option shape.\n *\n * `true` mirrors `ssg.readerChrome: true`: copy, outbound-link decoration, and\n * back-to-top are enabled. Object fields default on, so `{ copy: false }`\n * disables only the copy button.\n */\nexport function resolveReaderChromeInput(input: ReaderChromeInput = true): ResolvedReaderChrome {\n if (!input) {\n return false;\n }\n if (input === true) {\n return { copy: true, externalLinks: true, backToTop: true };\n }\n return {\n copy: input.copy ?? true,\n externalLinks: input.externalLinks ?? true,\n backToTop: input.backToTop ?? true,\n };\n}\n\n/**\n * Apply the same native reader-chrome HTML transform used by the built-in SSG.\n *\n * This rewrites rendered article HTML. It wraps fenced `<pre>` blocks for copy\n * controls and decorates outbound links when enabled. Back-to-top remains a\n * document-shell control, so it is exposed through the asset helpers.\n */\nexport function applyReaderChromeHtml(html: string, input: ReaderChromeInput = true): string {\n const chrome = resolveReaderChromeInput(input);\n if (!chrome || (!chrome.copy && !chrome.externalLinks)) {\n return html;\n }\n return importNapiModuleSync().applySsgReaderChromeHtml(html, {\n copy: chrome.copy,\n externalLinks: chrome.externalLinks,\n backToTop: chrome.backToTop,\n });\n}\n\n/**\n * Root attributes consumed by the browser runtime.\n */\nexport function readerChromeAttributes(\n input: ReaderChromeInput = true,\n): Readonly<Record<string, \"\">> {\n const chrome = resolveReaderChromeInput(input);\n if (!readerChromeIsEnabled(chrome)) {\n return EMPTY_ATTRIBUTES;\n }\n\n return {\n \"data-ox-reader-chrome\": \"\",\n ...(chrome.copy ? { \"data-ox-copy\": \"\" as const } : {}),\n ...(chrome.externalLinks ? { \"data-ox-external-links\": \"\" as const } : {}),\n ...(chrome.backToTop ? { \"data-ox-back-to-top\": \"\" as const } : {}),\n };\n}\n\n/**\n * Render the root attributes as a leading-space HTML fragment.\n *\n * Useful in template strings: `<article${renderReaderChromeAttributes()}>`.\n */\nexport function renderReaderChromeAttributes(input: ReaderChromeInput = true): string {\n return Object.keys(readerChromeAttributes(input))\n .map((name) => ` ${name}`)\n .join(\"\");\n}\n\n/**\n * CSS shared by the built-in SSG and custom hosts.\n */\nexport function readerChromeCss(input: ReaderChromeInput = true): string {\n return readerChromeIsEnabled(resolveReaderChromeInput(input))\n ? importNapiModuleSync().getSsgReaderChromeCss()\n : \"\";\n}\n\n/**\n * Auto-initializing script shared by the built-in SSG and custom hosts.\n */\nexport function readerChromeScript(input: ReaderChromeInput = true): string {\n return readerChromeNeedsJs(resolveReaderChromeInput(input))\n ? importNapiModuleSync().getSsgReaderChromeScript()\n : \"\";\n}\n\n/**\n * Inline stylesheet tag for hosts that do not import\n * `@ox-content/vite-plugin/styles/reader-chrome.css`.\n */\nexport function renderReaderChromeStyleTag(input: ReaderChromeInput = true): string {\n const css = readerChromeCss(input);\n return css ? `<style data-ox-style=\"reader-chrome\">\\n${css}</style>` : \"\";\n}\n\n/**\n * Inline auto-init script for static hosts that do not bundle\n * `@ox-content/vite-plugin/reader-chrome/client`.\n */\nexport function renderReaderChromeScriptTag(input: ReaderChromeInput = true): string {\n const js = readerChromeScript(input);\n return js ? `<script data-ox-script=\"reader-chrome\">\\n${js}</script>` : \"\";\n}\n\nexport function readerChromeIsEnabled(\n chrome: ResolvedReaderChrome,\n): chrome is Exclude<ResolvedReaderChrome, false> {\n return Boolean(chrome && (chrome.copy || chrome.externalLinks || chrome.backToTop));\n}\n\nexport function readerChromeNeedsJs(chrome: ResolvedReaderChrome): boolean {\n return Boolean(chrome && (chrome.copy || chrome.backToTop));\n}\n"],"mappings":";;AASA,MAAM,mBAAmB,OAAO,OAAO,CAAC,CAAC;;;;;;;;AASzC,SAAgB,yBAAyB,QAA2B,MAA4B;CAC9F,IAAI,CAAC,OACH,OAAO;CAET,IAAI,UAAU,MACZ,OAAO;EAAE,MAAM;EAAM,eAAe;EAAM,WAAW;CAAK;CAE5D,OAAO;EACL,MAAM,MAAM,QAAQ;EACpB,eAAe,MAAM,iBAAiB;EACtC,W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CAA4C,GAAG,cAAa;AAC1E;AAEA,SAAgB,sBACd,QACgD;CAChD,OAAO,QAAQ,WAAW,OAAO,QAAQ,OAAO,iBAAiB,OAAO,UAAU;AACpF;AAEA,SAAgB,oBAAoB,QAAuC;CACzE,OAAO,QAAQ,WAAW,OAAO,QAAQ,OAAO,UAAU;AAC5D"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as readerChromeIsEnabled, ar as ResolvedReaderChrome, c as renderReaderChromeAttributes, d as resolveReaderChromeInput, i as readerChromeCss, l as renderReaderChromeScriptTag, n as applyReaderChromeHtml, o as readerChromeNeedsJs, r as readerChromeAttributes, s as readerChromeScript, sn as ReaderChromeOptions, t as ReaderChromeInput, u as renderReaderChromeStyleTag } from "./reader-chrome.cjs";
|
|
2
|
+
export { ReaderChromeInput, type ReaderChromeOptions, type ResolvedReaderChrome, applyReaderChromeHtml, readerChromeAttributes, readerChromeCss, readerChromeIsEnabled, readerChromeNeedsJs, readerChromeScript, renderReaderChromeAttributes, renderReaderChromeScriptTag, renderReaderChromeStyleTag, resolveReaderChromeInput };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as readerChromeIsEnabled, ar as ResolvedReaderChrome, c as renderReaderChromeAttributes, d as resolveReaderChromeInput, i as readerChromeCss, l as renderReaderChromeScriptTag, n as applyReaderChromeHtml, o as readerChromeNeedsJs, r as readerChromeAttributes, s as readerChromeScript, sn as ReaderChromeOptions, t as ReaderChromeInput, u as renderReaderChromeStyleTag } from "./reader-chrome.mjs";
|
|
2
|
+
export { ReaderChromeInput, type ReaderChromeOptions, type ResolvedReaderChrome, applyReaderChromeHtml, readerChromeAttributes, readerChromeCss, readerChromeIsEnabled, readerChromeNeedsJs, readerChromeScript, renderReaderChromeAttributes, renderReaderChromeScriptTag, renderReaderChromeStyleTag, resolveReaderChromeInput };
|
package/dist/styles/all.css
CHANGED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
.ox-code {
|
|
2
|
+
--ox-copy-reserved-inline-size: 2rem;
|
|
3
|
+
position: relative;
|
|
4
|
+
margin: 1.25rem 0;
|
|
5
|
+
}
|
|
6
|
+
.content .ox-code > pre,
|
|
7
|
+
.content .ox-code:has(ox-code-play) pre {
|
|
8
|
+
margin: 0;
|
|
9
|
+
padding-inline-end: calc(var(--ox-copy-reserved-inline-size) + 0.45rem);
|
|
10
|
+
}
|
|
11
|
+
.ox-code:has(> ox-code-play) .ox-code-play__toolbar {
|
|
12
|
+
padding-inline-end: calc(var(--ox-copy-reserved-inline-size) + 0.65rem);
|
|
13
|
+
}
|
|
14
|
+
.content .ox-code > pre[data-code-title]::before {
|
|
15
|
+
margin-inline-end: calc(-1 * (var(--ox-copy-reserved-inline-size) + 0.45rem));
|
|
16
|
+
padding-inline-end: calc(var(--ox-copy-reserved-inline-size) + 0.45rem);
|
|
17
|
+
}
|
|
18
|
+
.ox-copy {
|
|
19
|
+
position: absolute;
|
|
20
|
+
inset-block-start: 0.5rem;
|
|
21
|
+
inset-inline-end: 0.5rem;
|
|
22
|
+
z-index: 1;
|
|
23
|
+
display: grid;
|
|
24
|
+
width: 1.75rem;
|
|
25
|
+
height: 1.75rem;
|
|
26
|
+
padding: 0;
|
|
27
|
+
place-items: center;
|
|
28
|
+
border: 1px solid transparent;
|
|
29
|
+
border-radius: 4px;
|
|
30
|
+
background: transparent;
|
|
31
|
+
color: color-mix(in srgb, var(--octc-color-code-text) 70%, transparent);
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
opacity: 0.68;
|
|
34
|
+
transition:
|
|
35
|
+
opacity 0.15s ease,
|
|
36
|
+
color 0.15s ease,
|
|
37
|
+
border-color 0.15s ease,
|
|
38
|
+
background-color 0.15s ease;
|
|
39
|
+
}
|
|
40
|
+
.ox-code > .ox-copy {
|
|
41
|
+
z-index: 2;
|
|
42
|
+
min-width: 0;
|
|
43
|
+
min-height: 0;
|
|
44
|
+
width: 1.75rem;
|
|
45
|
+
height: 1.75rem;
|
|
46
|
+
padding: 0;
|
|
47
|
+
font: inherit;
|
|
48
|
+
line-height: 1;
|
|
49
|
+
}
|
|
50
|
+
.ox-copy::before {
|
|
51
|
+
content: "";
|
|
52
|
+
width: 0.8125rem;
|
|
53
|
+
height: 0.8125rem;
|
|
54
|
+
background-color: currentColor;
|
|
55
|
+
-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='9' y='9' width='11' height='11' rx='2'/><path d='M15 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h3'/></svg>")
|
|
56
|
+
center / contain no-repeat;
|
|
57
|
+
mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='9' y='9' width='11' height='11' rx='2'/><path d='M15 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h3'/></svg>")
|
|
58
|
+
center / contain no-repeat;
|
|
59
|
+
}
|
|
60
|
+
.ox-copy:hover,
|
|
61
|
+
.ox-copy:focus-visible {
|
|
62
|
+
color: var(--octc-color-code-text);
|
|
63
|
+
border-color: color-mix(
|
|
64
|
+
in srgb,
|
|
65
|
+
var(--octc-color-primary) 42%,
|
|
66
|
+
var(--octc-color-code-frame-border)
|
|
67
|
+
);
|
|
68
|
+
background: color-mix(in srgb, var(--octc-color-code-bg) 82%, var(--octc-color-bg) 18%);
|
|
69
|
+
opacity: 0.96;
|
|
70
|
+
}
|
|
71
|
+
.ox-copy[data-copy-state="copied"] {
|
|
72
|
+
color: var(--octc-color-primary);
|
|
73
|
+
border-color: color-mix(in srgb, var(--octc-color-primary) 36%, transparent);
|
|
74
|
+
background: color-mix(in srgb, var(--octc-color-code-bg) 86%, var(--octc-color-bg) 14%);
|
|
75
|
+
opacity: 0.96;
|
|
76
|
+
}
|
|
77
|
+
.ox-copy[data-copy-state="copied"]::before {
|
|
78
|
+
-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='m5 12 4 4L19 6'/></svg>");
|
|
79
|
+
mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='m5 12 4 4L19 6'/></svg>");
|
|
80
|
+
}
|
|
81
|
+
.ox-copy[data-copy-state="failed"] {
|
|
82
|
+
color: var(--octc-color-code-line-error-border);
|
|
83
|
+
}
|
|
84
|
+
.ox-copy-status {
|
|
85
|
+
position: absolute;
|
|
86
|
+
width: 1px;
|
|
87
|
+
height: 1px;
|
|
88
|
+
padding: 0;
|
|
89
|
+
margin: -1px;
|
|
90
|
+
overflow: hidden;
|
|
91
|
+
clip: rect(0, 0, 0, 0);
|
|
92
|
+
clip-path: inset(50%);
|
|
93
|
+
white-space: nowrap;
|
|
94
|
+
border: 0;
|
|
95
|
+
}
|
|
96
|
+
@media (any-hover: hover) and (any-pointer: fine) {
|
|
97
|
+
.ox-copy {
|
|
98
|
+
opacity: 0;
|
|
99
|
+
pointer-events: none;
|
|
100
|
+
}
|
|
101
|
+
.ox-code:hover > .ox-copy,
|
|
102
|
+
.ox-code:focus-within > .ox-copy {
|
|
103
|
+
opacity: 0.86;
|
|
104
|
+
pointer-events: auto;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
.ox-external {
|
|
108
|
+
text-decoration-thickness: from-font;
|
|
109
|
+
}
|
|
110
|
+
.ox-external-icon {
|
|
111
|
+
display: inline-block;
|
|
112
|
+
width: 0.7em;
|
|
113
|
+
height: 0.7em;
|
|
114
|
+
margin-inline-start: 0.2em;
|
|
115
|
+
vertical-align: middle;
|
|
116
|
+
background-color: currentColor;
|
|
117
|
+
-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/><polyline points='15 3 21 3 21 9'/><line x1='10' y1='14' x2='21' y2='3'/></svg>")
|
|
118
|
+
center / contain no-repeat;
|
|
119
|
+
mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/><polyline points='15 3 21 3 21 9'/><line x1='10' y1='14' x2='21' y2='3'/></svg>")
|
|
120
|
+
center / contain no-repeat;
|
|
121
|
+
}
|
|
122
|
+
.content .ox-magic-link .ox-external-icon {
|
|
123
|
+
width: 0.62em;
|
|
124
|
+
height: 0.62em;
|
|
125
|
+
margin-inline-start: 0.02em;
|
|
126
|
+
opacity: 0.72;
|
|
127
|
+
flex: 0 0 auto;
|
|
128
|
+
}
|
|
129
|
+
.ox-back-to-top {
|
|
130
|
+
position: fixed;
|
|
131
|
+
right: 1.25rem;
|
|
132
|
+
bottom: 5.5rem;
|
|
133
|
+
z-index: 8;
|
|
134
|
+
padding: 0.45rem 0.75rem;
|
|
135
|
+
border: 1px solid color-mix(in srgb, var(--octc-color-border) 80%, transparent);
|
|
136
|
+
border-radius: 999px;
|
|
137
|
+
background: color-mix(in srgb, var(--octc-color-bg) 92%, transparent);
|
|
138
|
+
color: var(--octc-color-text);
|
|
139
|
+
font: inherit;
|
|
140
|
+
font-size: 0.75rem;
|
|
141
|
+
cursor: pointer;
|
|
142
|
+
transition:
|
|
143
|
+
opacity 0.2s ease,
|
|
144
|
+
transform 0.2s ease;
|
|
145
|
+
}
|
|
146
|
+
.ox-back-to-top[hidden] {
|
|
147
|
+
display: none;
|
|
148
|
+
}
|
|
149
|
+
.ox-back-to-top:hover,
|
|
150
|
+
.ox-back-to-top:focus-visible {
|
|
151
|
+
color: var(--octc-color-primary);
|
|
152
|
+
border-color: var(--octc-color-primary);
|
|
153
|
+
}
|
|
154
|
+
@media (prefers-reduced-motion: reduce) {
|
|
155
|
+
.ox-reader-chrome--reduced-motion .ox-back-to-top,
|
|
156
|
+
.ox-back-to-top,
|
|
157
|
+
.ox-copy {
|
|
158
|
+
transition: none;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
@@ -25,6 +25,10 @@
|
|
|
25
25
|
margin: var(--ox-tweet-container-margin);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
.ox-tweet.ox-tweet--full * {
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
}
|
|
31
|
+
|
|
28
32
|
.ox-tweet.ox-tweet--full :where(img, video, figure, picture, svg) {
|
|
29
33
|
margin: 0;
|
|
30
34
|
}
|
|
@@ -39,8 +43,13 @@
|
|
|
39
43
|
}
|
|
40
44
|
|
|
41
45
|
.ox-tweet.ox-tweet--full :where(a) {
|
|
46
|
+
padding: 0;
|
|
47
|
+
font-size: inherit;
|
|
42
48
|
font-weight: inherit;
|
|
49
|
+
line-height: inherit;
|
|
43
50
|
text-decoration: none;
|
|
51
|
+
background: transparent;
|
|
52
|
+
border: 0;
|
|
44
53
|
}
|
|
45
54
|
|
|
46
55
|
.ox-tweet.ox-tweet--full :where(code, pre, kbd, samp) {
|
|
@@ -114,7 +123,14 @@
|
|
|
114
123
|
--ox-tweet-body-line-height: 1.5rem;
|
|
115
124
|
--ox-tweet-quoted-body-font-size: 0.938rem;
|
|
116
125
|
--ox-tweet-info-font-size: 0.9375rem;
|
|
117
|
-
--ox-tweet-actions-font-size:
|
|
126
|
+
--ox-tweet-actions-font-size: 1rem;
|
|
127
|
+
--ox-tweet-actions-line-height: 1.25rem;
|
|
128
|
+
--ox-tweet-actions-font-weight: 700;
|
|
129
|
+
--ox-tweet-actions-icon-size: 1.25em;
|
|
130
|
+
--ox-tweet-actions-icon-wrapper-size: 2rem;
|
|
131
|
+
--ox-tweet-replies-font-size: 0.875rem;
|
|
132
|
+
--ox-tweet-replies-line-height: 1rem;
|
|
133
|
+
--ox-tweet-replies-font-weight: 700;
|
|
118
134
|
--ox-tweet-icon-size: 1.25em;
|
|
119
135
|
--ox-tweet-border: 1px solid rgb(207, 217, 222);
|
|
120
136
|
--ox-tweet-font-color: rgb(15, 20, 25);
|
|
@@ -453,22 +469,50 @@
|
|
|
453
469
|
.ox-tweet--full .ox-tweet__action {
|
|
454
470
|
display: flex;
|
|
455
471
|
align-items: center;
|
|
456
|
-
|
|
472
|
+
min-width: var(--ox-tweet-actions-icon-wrapper-size);
|
|
473
|
+
min-height: var(--ox-tweet-actions-icon-wrapper-size);
|
|
474
|
+
padding: 0;
|
|
475
|
+
margin: 0 1.25rem 0 0;
|
|
457
476
|
font-size: var(--ox-tweet-actions-font-size);
|
|
458
|
-
font-weight:
|
|
459
|
-
line-height:
|
|
477
|
+
font-weight: var(--ox-tweet-actions-font-weight);
|
|
478
|
+
line-height: var(--ox-tweet-actions-line-height);
|
|
479
|
+
background: transparent;
|
|
480
|
+
border: 0;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.ox-tweet--full .ox-tweet__action-icon {
|
|
484
|
+
box-sizing: border-box;
|
|
485
|
+
display: flex;
|
|
486
|
+
flex: 0 0 var(--ox-tweet-actions-icon-wrapper-size);
|
|
487
|
+
align-items: center;
|
|
488
|
+
justify-content: center;
|
|
489
|
+
width: var(--ox-tweet-actions-icon-wrapper-size);
|
|
490
|
+
height: var(--ox-tweet-actions-icon-wrapper-size);
|
|
491
|
+
margin: 0 0.25rem 0 -0.25rem;
|
|
492
|
+
border-radius: 9999px;
|
|
460
493
|
}
|
|
461
494
|
|
|
462
495
|
.ox-tweet--full .ox-tweet__action .ox-tweet__icon {
|
|
463
|
-
|
|
496
|
+
width: var(--ox-tweet-actions-icon-size);
|
|
497
|
+
height: var(--ox-tweet-actions-icon-size);
|
|
464
498
|
}
|
|
465
499
|
|
|
466
|
-
.ox-tweet--full .ox-tweet__action--like:hover {
|
|
500
|
+
.ox-tweet--full .ox-tweet__action--like:hover .ox-tweet__action-text {
|
|
467
501
|
color: var(--ox-tweet-color-red);
|
|
502
|
+
text-decoration-line: underline;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
.ox-tweet--full .ox-tweet__action--like:hover .ox-tweet__action-icon {
|
|
506
|
+
background-color: var(--ox-tweet-color-red-hover);
|
|
468
507
|
}
|
|
469
508
|
|
|
470
|
-
.ox-tweet--full .ox-tweet__action--reply:hover {
|
|
509
|
+
.ox-tweet--full .ox-tweet__action--reply:hover .ox-tweet__action-text {
|
|
471
510
|
color: var(--ox-tweet-color-blue-text);
|
|
511
|
+
text-decoration-line: underline;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
.ox-tweet--full .ox-tweet__action--reply:hover .ox-tweet__action-icon {
|
|
515
|
+
background-color: var(--ox-tweet-color-blue-hover);
|
|
472
516
|
}
|
|
473
517
|
|
|
474
518
|
.ox-tweet--full .ox-tweet__action--copy:hover,
|
|
@@ -476,6 +520,17 @@
|
|
|
476
520
|
color: var(--ox-tweet-color-green);
|
|
477
521
|
}
|
|
478
522
|
|
|
523
|
+
.ox-tweet--full .ox-tweet__action--copy:hover .ox-tweet__action-icon,
|
|
524
|
+
.ox-tweet--full .ox-tweet__action--copy[data-ox-tweet-copied] .ox-tweet__action-icon {
|
|
525
|
+
background-color: var(--ox-tweet-color-green-hover);
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
.ox-tweet--full .ox-tweet__action--copy:hover .ox-tweet__action-text,
|
|
529
|
+
.ox-tweet--full .ox-tweet__action--copy[data-ox-tweet-copied] .ox-tweet__action-text {
|
|
530
|
+
color: var(--ox-tweet-color-green);
|
|
531
|
+
text-decoration-line: underline;
|
|
532
|
+
}
|
|
533
|
+
|
|
479
534
|
.ox-tweet--full .ox-tweet__copied-text {
|
|
480
535
|
display: none;
|
|
481
536
|
}
|
|
@@ -501,8 +556,9 @@
|
|
|
501
556
|
width: 100%;
|
|
502
557
|
min-height: 32px;
|
|
503
558
|
padding: 0 1rem;
|
|
504
|
-
font-size:
|
|
505
|
-
font-weight:
|
|
559
|
+
font-size: var(--ox-tweet-replies-font-size);
|
|
560
|
+
font-weight: var(--ox-tweet-replies-font-weight);
|
|
561
|
+
line-height: var(--ox-tweet-replies-line-height);
|
|
506
562
|
color: var(--ox-tweet-color-blue-text);
|
|
507
563
|
border: var(--ox-tweet-border);
|
|
508
564
|
border-radius: 9999px;
|
package/dist/theme-tokens.d.cts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/theme-tokens.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Free-form `--octc-*` custom properties for themes that need more than the
|
|
4
3
|
* typed `colors` / `fonts` / `layout` fields.
|
|
@@ -9,7 +8,7 @@
|
|
|
9
8
|
* accents, and surface textures purely through tokens, while a skin package
|
|
10
9
|
* lays out geometry against those same tokens without knowing any color.
|
|
11
10
|
*/
|
|
12
|
-
type ThemeTokens = Record<string, string>;
|
|
11
|
+
export type ThemeTokens = Record<string, string>;
|
|
13
12
|
/**
|
|
14
13
|
* The token-bearing shape of a theme.
|
|
15
14
|
*
|
|
@@ -20,25 +19,25 @@ type ThemeTokens = Record<string, string>;
|
|
|
20
19
|
* `ThemeConfig` — including the published `@ox-content/theme-color-*` and
|
|
21
20
|
* `@ox-content/theme-*` packages — satisfies it.
|
|
22
21
|
*/
|
|
23
|
-
interface ThemeTokenSource {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
export interface ThemeTokenSource {
|
|
23
|
+
tokens?: ThemeTokens;
|
|
24
|
+
darkTokens?: ThemeTokens;
|
|
25
|
+
extends?: ThemeTokenSource;
|
|
27
26
|
}
|
|
28
27
|
/**
|
|
29
28
|
* Options for {@link renderThemeTokenCss}.
|
|
30
29
|
*/
|
|
31
|
-
interface RenderThemeTokenCssOptions {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
export interface RenderThemeTokenCssOptions {
|
|
31
|
+
/**
|
|
32
|
+
* Keeps only the tokens whose name passes the predicate. Names arrive without
|
|
33
|
+
* the `--octc-` prefix, so `(name) => name.startsWith("syntax-")` reuses a
|
|
34
|
+
* color scheme's highlighter palette without adopting its page colors,
|
|
35
|
+
* typography, or layout policy.
|
|
36
|
+
*
|
|
37
|
+
* Filtering runs per layer, before merging, so a token a later layer would
|
|
38
|
+
* have overridden is dropped along with the override.
|
|
39
|
+
*/
|
|
40
|
+
include?: (name: string) => boolean;
|
|
42
41
|
}
|
|
43
42
|
/**
|
|
44
43
|
* Renders a theme's `--octc-*` tokens as a standalone stylesheet.
|
|
@@ -60,7 +59,7 @@ interface RenderThemeTokenCssOptions {
|
|
|
60
59
|
* Layers compose left to right and each layer's `extends` chain is flattened
|
|
61
60
|
* base-first, matching how `resolveTheme()` stacks a skin and a color scheme.
|
|
62
61
|
*/
|
|
63
|
-
declare function renderThemeTokenCss(theme: ThemeTokenSource | ThemeTokenSource[], options?: RenderThemeTokenCssOptions): string;
|
|
62
|
+
export declare function renderThemeTokenCss(theme: ThemeTokenSource | ThemeTokenSource[], options?: RenderThemeTokenCssOptions): string;
|
|
64
63
|
/**
|
|
65
64
|
* Renders light and dark token records as the three selectors the SSG runtime
|
|
66
65
|
* switches between: an explicit `[data-theme="dark"]` opt-in, the OS
|
|
@@ -69,7 +68,5 @@ declare function renderThemeTokenCss(theme: ThemeTokenSource | ThemeTokenSource[
|
|
|
69
68
|
* Emitted after the typed color variables and before the theme's own `css`, so
|
|
70
69
|
* a token can override a typed color and raw `css` can override a token.
|
|
71
70
|
*/
|
|
72
|
-
declare function tokensToCss(light: ThemeTokens, dark: ThemeTokens): string;
|
|
73
|
-
//#endregion
|
|
74
|
-
export { RenderThemeTokenCssOptions, ThemeTokenSource, ThemeTokens, renderThemeTokenCss, tokensToCss };
|
|
71
|
+
export declare function tokensToCss(light: ThemeTokens, dark: ThemeTokens): string;
|
|
75
72
|
//# sourceMappingURL=theme-tokens.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-tokens.d.cts","
|
|
1
|
+
{"version":3,"file":"theme-tokens.d.cts","sourceRoot":"","sources":["../../../../home/runner/work/ox-content/ox-content/npm/vite-plugin-ox-content/src/theme-tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAKjD;;;;;;;;;GASG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;CACrC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,gBAAgB,GAAG,gBAAgB,EAAE,EAC5C,OAAO,GAAE,0BAA+B,GACvC,MAAM,CAMR;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,GAAG,MAAM,CAgBzE"}
|
package/dist/theme-tokens.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/theme-tokens.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Free-form `--octc-*` custom properties for themes that need more than the
|
|
4
3
|
* typed `colors` / `fonts` / `layout` fields.
|
|
@@ -9,7 +8,7 @@
|
|
|
9
8
|
* accents, and surface textures purely through tokens, while a skin package
|
|
10
9
|
* lays out geometry against those same tokens without knowing any color.
|
|
11
10
|
*/
|
|
12
|
-
type ThemeTokens = Record<string, string>;
|
|
11
|
+
export type ThemeTokens = Record<string, string>;
|
|
13
12
|
/**
|
|
14
13
|
* The token-bearing shape of a theme.
|
|
15
14
|
*
|
|
@@ -20,25 +19,25 @@ type ThemeTokens = Record<string, string>;
|
|
|
20
19
|
* `ThemeConfig` — including the published `@ox-content/theme-color-*` and
|
|
21
20
|
* `@ox-content/theme-*` packages — satisfies it.
|
|
22
21
|
*/
|
|
23
|
-
interface ThemeTokenSource {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
export interface ThemeTokenSource {
|
|
23
|
+
tokens?: ThemeTokens;
|
|
24
|
+
darkTokens?: ThemeTokens;
|
|
25
|
+
extends?: ThemeTokenSource;
|
|
27
26
|
}
|
|
28
27
|
/**
|
|
29
28
|
* Options for {@link renderThemeTokenCss}.
|
|
30
29
|
*/
|
|
31
|
-
interface RenderThemeTokenCssOptions {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
export interface RenderThemeTokenCssOptions {
|
|
31
|
+
/**
|
|
32
|
+
* Keeps only the tokens whose name passes the predicate. Names arrive without
|
|
33
|
+
* the `--octc-` prefix, so `(name) => name.startsWith("syntax-")` reuses a
|
|
34
|
+
* color scheme's highlighter palette without adopting its page colors,
|
|
35
|
+
* typography, or layout policy.
|
|
36
|
+
*
|
|
37
|
+
* Filtering runs per layer, before merging, so a token a later layer would
|
|
38
|
+
* have overridden is dropped along with the override.
|
|
39
|
+
*/
|
|
40
|
+
include?: (name: string) => boolean;
|
|
42
41
|
}
|
|
43
42
|
/**
|
|
44
43
|
* Renders a theme's `--octc-*` tokens as a standalone stylesheet.
|
|
@@ -60,7 +59,7 @@ interface RenderThemeTokenCssOptions {
|
|
|
60
59
|
* Layers compose left to right and each layer's `extends` chain is flattened
|
|
61
60
|
* base-first, matching how `resolveTheme()` stacks a skin and a color scheme.
|
|
62
61
|
*/
|
|
63
|
-
declare function renderThemeTokenCss(theme: ThemeTokenSource | ThemeTokenSource[], options?: RenderThemeTokenCssOptions): string;
|
|
62
|
+
export declare function renderThemeTokenCss(theme: ThemeTokenSource | ThemeTokenSource[], options?: RenderThemeTokenCssOptions): string;
|
|
64
63
|
/**
|
|
65
64
|
* Renders light and dark token records as the three selectors the SSG runtime
|
|
66
65
|
* switches between: an explicit `[data-theme="dark"]` opt-in, the OS
|
|
@@ -69,7 +68,5 @@ declare function renderThemeTokenCss(theme: ThemeTokenSource | ThemeTokenSource[
|
|
|
69
68
|
* Emitted after the typed color variables and before the theme's own `css`, so
|
|
70
69
|
* a token can override a typed color and raw `css` can override a token.
|
|
71
70
|
*/
|
|
72
|
-
declare function tokensToCss(light: ThemeTokens, dark: ThemeTokens): string;
|
|
73
|
-
//#endregion
|
|
74
|
-
export { RenderThemeTokenCssOptions, ThemeTokenSource, ThemeTokens, renderThemeTokenCss, tokensToCss };
|
|
71
|
+
export declare function tokensToCss(light: ThemeTokens, dark: ThemeTokens): string;
|
|
75
72
|
//# sourceMappingURL=theme-tokens.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-tokens.d.mts","
|
|
1
|
+
{"version":3,"file":"theme-tokens.d.mts","sourceRoot":"","sources":["../../../../home/runner/work/ox-content/ox-content/npm/vite-plugin-ox-content/src/theme-tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAKjD;;;;;;;;;GASG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;CACrC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,gBAAgB,GAAG,gBAAgB,EAAE,EAC5C,OAAO,GAAE,0BAA+B,GACvC,MAAM,CAMR;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,GAAG,MAAM,CAgBzE"}
|