@uniflowed/vite 0.8.0 → 0.10.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.
- package/index.js +5 -1
- package/internal/highlight.js +7 -2
- package/package.json +5 -5
package/index.js
CHANGED
|
@@ -1341,7 +1341,11 @@ function mdxPlugin(markdown) {
|
|
|
1341
1341
|
return {
|
|
1342
1342
|
enforce: "pre",
|
|
1343
1343
|
...mdx({
|
|
1344
|
-
jsxImportSource
|
|
1344
|
+
// `app.builtins.markdown.mdx.jsxImportSource`: React's runtime unless a
|
|
1345
|
+
// project names another. `uf` refuses `@uniflowed/jsx-runtime` — the
|
|
1346
|
+
// key's old default, which has no runtime in it — where the config is
|
|
1347
|
+
// read, so it never arrives here.
|
|
1348
|
+
jsxImportSource: mdxConfig.jsxImportSource ?? "react",
|
|
1345
1349
|
remarkPlugins: [remarkGfm, remarkFrontmatter, remarkFrontmatterExport],
|
|
1346
1350
|
rehypePlugins,
|
|
1347
1351
|
}),
|
package/internal/highlight.js
CHANGED
|
@@ -155,14 +155,19 @@ function flowSyntax() {
|
|
|
155
155
|
* because a page follows the reader's light or dark preference and a build-time
|
|
156
156
|
* highlighter cannot know it. The stylesheet picks between them.
|
|
157
157
|
*
|
|
158
|
-
* @param {{enabled?: boolean, themes?: {light
|
|
158
|
+
* @param {{enabled?: boolean, themes?: {light?: string, dark?: string}, langs?: string[]}} options
|
|
159
159
|
*/
|
|
160
160
|
export function highlightPlugin(options) {
|
|
161
161
|
const config = options ?? {};
|
|
162
162
|
if (config.enabled === false) {
|
|
163
163
|
return null;
|
|
164
164
|
}
|
|
165
|
-
|
|
165
|
+
// Each theme on its own, so a project that names one keeps uf's other
|
|
166
|
+
// rather than handing Shiki half a pair.
|
|
167
|
+
const themes = {
|
|
168
|
+
light: config.themes?.light ?? "github-light",
|
|
169
|
+
dark: config.themes?.dark ?? "github-dark-dimmed",
|
|
170
|
+
};
|
|
166
171
|
const langs = [...new Set([...DEFAULT_LANGS, ...(config.langs ?? [])])];
|
|
167
172
|
|
|
168
173
|
return [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniflowed/vite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Vite, driven by uf.config.js: every Flow module through `uf transform`, MDX, the file-system router and static rendering as Vite plugins.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"@babel/core": "^7.29.7",
|
|
36
36
|
"@mdx-js/rollup": "^3.1.1",
|
|
37
37
|
"@shikijs/rehype": "^3.23.0",
|
|
38
|
-
"@uniflowed/host": "0.
|
|
39
|
-
"@uniflowed/router": "0.
|
|
40
|
-
"@uniflowed/server": "0.
|
|
41
|
-
"@uniflowed/validator": "0.
|
|
38
|
+
"@uniflowed/host": "0.10.0",
|
|
39
|
+
"@uniflowed/router": "0.10.0",
|
|
40
|
+
"@uniflowed/server": "0.10.0",
|
|
41
|
+
"@uniflowed/validator": "0.10.0",
|
|
42
42
|
"babel-plugin-relay": "^21.0.1",
|
|
43
43
|
"estree-util-value-to-estree": "^3.5.0",
|
|
44
44
|
"rehype-slug": "^6.0.0",
|