pi-fabric 0.62.1 → 0.62.2
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/chunks/{chunk-DVOJW7LJ.js → chunk-5VLBF2QS.js} +83 -2
- package/dist/chunks/chunk-5VLBF2QS.js.map +7 -0
- package/dist/chunks/{dashboard-B6K3VWQL.js → dashboard-YGCVARPS.js} +2 -2
- package/dist/index.js +2 -2
- package/dist/ui/highlight.d.ts.map +1 -1
- package/dist/ui/shiki-theme.d.ts +7 -0
- package/dist/ui/shiki-theme.d.ts.map +1 -0
- package/package.json +2 -1
- package/dist/chunks/chunk-DVOJW7LJ.js.map +0 -7
- /package/dist/chunks/{dashboard-B6K3VWQL.js.map → dashboard-YGCVARPS.js.map} +0 -0
|
@@ -39,6 +39,83 @@ import { readFileSync, statSync } from "node:fs";
|
|
|
39
39
|
import { basename, extname } from "node:path";
|
|
40
40
|
import { bundledLanguages } from "shiki/langs";
|
|
41
41
|
import { bundledThemesInfo } from "shiki/themes";
|
|
42
|
+
|
|
43
|
+
// src/ui/shiki-theme.ts
|
|
44
|
+
var THEME_IMPORTS = {
|
|
45
|
+
"andromeeda": () => import("@shikijs/themes/andromeeda"),
|
|
46
|
+
"aurora-x": () => import("@shikijs/themes/aurora-x"),
|
|
47
|
+
"ayu-dark": () => import("@shikijs/themes/ayu-dark"),
|
|
48
|
+
"ayu-light": () => import("@shikijs/themes/ayu-light"),
|
|
49
|
+
"ayu-mirage": () => import("@shikijs/themes/ayu-mirage"),
|
|
50
|
+
"catppuccin-frappe": () => import("@shikijs/themes/catppuccin-frappe"),
|
|
51
|
+
"catppuccin-latte": () => import("@shikijs/themes/catppuccin-latte"),
|
|
52
|
+
"catppuccin-macchiato": () => import("@shikijs/themes/catppuccin-macchiato"),
|
|
53
|
+
"catppuccin-mocha": () => import("@shikijs/themes/catppuccin-mocha"),
|
|
54
|
+
"dark-plus": () => import("@shikijs/themes/dark-plus"),
|
|
55
|
+
"dracula": () => import("@shikijs/themes/dracula"),
|
|
56
|
+
"dracula-soft": () => import("@shikijs/themes/dracula-soft"),
|
|
57
|
+
"everforest-dark": () => import("@shikijs/themes/everforest-dark"),
|
|
58
|
+
"everforest-light": () => import("@shikijs/themes/everforest-light"),
|
|
59
|
+
"github-dark": () => import("@shikijs/themes/github-dark"),
|
|
60
|
+
"github-dark-default": () => import("@shikijs/themes/github-dark-default"),
|
|
61
|
+
"github-dark-dimmed": () => import("@shikijs/themes/github-dark-dimmed"),
|
|
62
|
+
"github-dark-high-contrast": () => import("@shikijs/themes/github-dark-high-contrast"),
|
|
63
|
+
"github-light": () => import("@shikijs/themes/github-light"),
|
|
64
|
+
"github-light-default": () => import("@shikijs/themes/github-light-default"),
|
|
65
|
+
"github-light-high-contrast": () => import("@shikijs/themes/github-light-high-contrast"),
|
|
66
|
+
"gruvbox-dark-hard": () => import("@shikijs/themes/gruvbox-dark-hard"),
|
|
67
|
+
"gruvbox-dark-medium": () => import("@shikijs/themes/gruvbox-dark-medium"),
|
|
68
|
+
"gruvbox-dark-soft": () => import("@shikijs/themes/gruvbox-dark-soft"),
|
|
69
|
+
"gruvbox-light-hard": () => import("@shikijs/themes/gruvbox-light-hard"),
|
|
70
|
+
"gruvbox-light-medium": () => import("@shikijs/themes/gruvbox-light-medium"),
|
|
71
|
+
"gruvbox-light-soft": () => import("@shikijs/themes/gruvbox-light-soft"),
|
|
72
|
+
"horizon": () => import("@shikijs/themes/horizon"),
|
|
73
|
+
"horizon-bright": () => import("@shikijs/themes/horizon-bright"),
|
|
74
|
+
"houston": () => import("@shikijs/themes/houston"),
|
|
75
|
+
"kanagawa-dragon": () => import("@shikijs/themes/kanagawa-dragon"),
|
|
76
|
+
"kanagawa-lotus": () => import("@shikijs/themes/kanagawa-lotus"),
|
|
77
|
+
"kanagawa-wave": () => import("@shikijs/themes/kanagawa-wave"),
|
|
78
|
+
"laserwave": () => import("@shikijs/themes/laserwave"),
|
|
79
|
+
"light-plus": () => import("@shikijs/themes/light-plus"),
|
|
80
|
+
"material-theme": () => import("@shikijs/themes/material-theme"),
|
|
81
|
+
"material-theme-darker": () => import("@shikijs/themes/material-theme-darker"),
|
|
82
|
+
"material-theme-lighter": () => import("@shikijs/themes/material-theme-lighter"),
|
|
83
|
+
"material-theme-ocean": () => import("@shikijs/themes/material-theme-ocean"),
|
|
84
|
+
"material-theme-palenight": () => import("@shikijs/themes/material-theme-palenight"),
|
|
85
|
+
"min-dark": () => import("@shikijs/themes/min-dark"),
|
|
86
|
+
"min-light": () => import("@shikijs/themes/min-light"),
|
|
87
|
+
"monokai": () => import("@shikijs/themes/monokai"),
|
|
88
|
+
"night-owl": () => import("@shikijs/themes/night-owl"),
|
|
89
|
+
"night-owl-light": () => import("@shikijs/themes/night-owl-light"),
|
|
90
|
+
"nord": () => import("@shikijs/themes/nord"),
|
|
91
|
+
"one-dark-pro": () => import("@shikijs/themes/one-dark-pro"),
|
|
92
|
+
"one-light": () => import("@shikijs/themes/one-light"),
|
|
93
|
+
"plastic": () => import("@shikijs/themes/plastic"),
|
|
94
|
+
"poimandres": () => import("@shikijs/themes/poimandres"),
|
|
95
|
+
"red": () => import("@shikijs/themes/red"),
|
|
96
|
+
"rose-pine": () => import("@shikijs/themes/rose-pine"),
|
|
97
|
+
"rose-pine-dawn": () => import("@shikijs/themes/rose-pine-dawn"),
|
|
98
|
+
"rose-pine-moon": () => import("@shikijs/themes/rose-pine-moon"),
|
|
99
|
+
"slack-dark": () => import("@shikijs/themes/slack-dark"),
|
|
100
|
+
"slack-ochin": () => import("@shikijs/themes/slack-ochin"),
|
|
101
|
+
"snazzy-light": () => import("@shikijs/themes/snazzy-light"),
|
|
102
|
+
"solarized-dark": () => import("@shikijs/themes/solarized-dark"),
|
|
103
|
+
"solarized-light": () => import("@shikijs/themes/solarized-light"),
|
|
104
|
+
"synthwave-84": () => import("@shikijs/themes/synthwave-84"),
|
|
105
|
+
"tokyo-night": () => import("@shikijs/themes/tokyo-night"),
|
|
106
|
+
"vesper": () => import("@shikijs/themes/vesper"),
|
|
107
|
+
"vitesse-black": () => import("@shikijs/themes/vitesse-black"),
|
|
108
|
+
"vitesse-dark": () => import("@shikijs/themes/vitesse-dark"),
|
|
109
|
+
"vitesse-light": () => import("@shikijs/themes/vitesse-light")
|
|
110
|
+
};
|
|
111
|
+
async function resolveShikiThemeObject(themeId) {
|
|
112
|
+
const loader = THEME_IMPORTS[themeId];
|
|
113
|
+
if (!loader) return void 0;
|
|
114
|
+
const mod = await loader();
|
|
115
|
+
return mod.default;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// src/ui/highlight.ts
|
|
42
119
|
var configuredMaxHighlightChars = Number.parseInt(
|
|
43
120
|
process.env.CODE_PREVIEW_MAX_HIGHLIGHT_CHARS ?? "",
|
|
44
121
|
10
|
|
@@ -306,8 +383,12 @@ async function initHighlighting(theme, syntaxEnabled = true) {
|
|
|
306
383
|
initializingTheme = theme;
|
|
307
384
|
try {
|
|
308
385
|
const { createHighlighter } = await import("shiki");
|
|
386
|
+
const themeObject = await resolveShikiThemeObject(theme);
|
|
387
|
+
if (!themeObject) {
|
|
388
|
+
throw new Error(`Unknown shiki theme: ${theme}`);
|
|
389
|
+
}
|
|
309
390
|
const next = await createHighlighter({
|
|
310
|
-
themes: [
|
|
391
|
+
themes: [themeObject],
|
|
311
392
|
langs: [...PRELOADED_LANGUAGES]
|
|
312
393
|
});
|
|
313
394
|
if (version !== initVersion) {
|
|
@@ -4988,4 +5069,4 @@ export {
|
|
|
4988
5069
|
isActiveStatus,
|
|
4989
5070
|
orderAgentsByCreation
|
|
4990
5071
|
};
|
|
4991
|
-
//# sourceMappingURL=chunk-
|
|
5072
|
+
//# sourceMappingURL=chunk-5VLBF2QS.js.map
|