mirror of
https://github.com/sern-handler/website
synced 2026-06-22 15:52:30 +00:00
feat: migrate to starlight
This commit is contained in:
1
node_modules/expressive-code/dist/hast.d.ts
generated
vendored
Normal file
1
node_modules/expressive-code/dist/hast.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@expressive-code/core/hast';
|
||||
3
node_modules/expressive-code/dist/hast.js
generated
vendored
Normal file
3
node_modules/expressive-code/dist/hast.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
// src/hast.ts
|
||||
export * from "@expressive-code/core/hast";
|
||||
//# sourceMappingURL=hast.js.map
|
||||
1
node_modules/expressive-code/dist/hast.js.map
generated
vendored
Normal file
1
node_modules/expressive-code/dist/hast.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../src/hast.ts"],"sourcesContent":["export * from '@expressive-code/core/hast'\n"],"mappings":";AAAA,cAAc;","names":[]}
|
||||
37
node_modules/expressive-code/dist/index.d.ts
generated
vendored
Normal file
37
node_modules/expressive-code/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
import { ExpressiveCodeEngineConfig, ExpressiveCodeEngine } from '@expressive-code/core';
|
||||
export * from '@expressive-code/core';
|
||||
import { PluginFramesOptions } from '@expressive-code/plugin-frames';
|
||||
export * from '@expressive-code/plugin-frames';
|
||||
import { PluginShikiOptions } from '@expressive-code/plugin-shiki';
|
||||
export * from '@expressive-code/plugin-shiki';
|
||||
export * from '@expressive-code/plugin-text-markers';
|
||||
|
||||
interface ExpressiveCodeConfig extends ExpressiveCodeEngineConfig {
|
||||
/**
|
||||
* The Shiki plugin adds syntax highlighting to code blocks.
|
||||
*
|
||||
* This plugin is enabled by default. Set this to `false` to disable it.
|
||||
* You can also configure the plugin by setting this to an options object.
|
||||
*/
|
||||
shiki?: PluginShikiOptions | boolean | undefined;
|
||||
/**
|
||||
* The Text Markers plugin allows to highlight lines and inline ranges
|
||||
* in code blocks in various styles (e.g. marked, inserted, deleted).
|
||||
*
|
||||
* This plugin is enabled by default. Set this to `false` to disable it.
|
||||
*/
|
||||
textMarkers?: boolean | undefined;
|
||||
/**
|
||||
* The Frames plugin adds an editor or terminal frame around code blocks,
|
||||
* including an optional title displayed as a tab or window caption.
|
||||
*
|
||||
* This plugin is enabled by default. Set this to `false` to disable it.
|
||||
* You can also configure the plugin by setting this to an options object.
|
||||
*/
|
||||
frames?: PluginFramesOptions | boolean | undefined;
|
||||
}
|
||||
declare class ExpressiveCode extends ExpressiveCodeEngine {
|
||||
constructor({ shiki, textMarkers, frames, ...baseConfig }?: ExpressiveCodeConfig);
|
||||
}
|
||||
|
||||
export { ExpressiveCode, ExpressiveCodeConfig };
|
||||
45
node_modules/expressive-code/dist/index.js
generated
vendored
Normal file
45
node_modules/expressive-code/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
// src/index.ts
|
||||
import { ExpressiveCodeEngine } from "@expressive-code/core";
|
||||
import { pluginFrames } from "@expressive-code/plugin-frames";
|
||||
import { pluginShiki } from "@expressive-code/plugin-shiki";
|
||||
import { pluginTextMarkers } from "@expressive-code/plugin-text-markers";
|
||||
export * from "@expressive-code/core";
|
||||
export * from "@expressive-code/plugin-frames";
|
||||
export * from "@expressive-code/plugin-shiki";
|
||||
export * from "@expressive-code/plugin-text-markers";
|
||||
var ExpressiveCode = class extends ExpressiveCodeEngine {
|
||||
constructor({ shiki, textMarkers, frames, ...baseConfig } = {}) {
|
||||
const pluginsToPrepend = [];
|
||||
const baseConfigPlugins = baseConfig.plugins?.flat() || [];
|
||||
const notPresentInPlugins = (name) => baseConfigPlugins.every((plugin) => plugin.name !== name);
|
||||
if (shiki !== false && notPresentInPlugins("Shiki")) {
|
||||
pluginsToPrepend.push(pluginShiki(shiki !== true ? shiki : void 0));
|
||||
}
|
||||
if (textMarkers !== false && notPresentInPlugins("TextMarkers")) {
|
||||
if (typeof textMarkers === "object" && textMarkers.styleOverrides) {
|
||||
throw new Error(
|
||||
`The Expressive Code config option "textMarkers" can no longer be an object,
|
||||
but only undefined or a boolean. Please move any style settings into the
|
||||
top-level "styleOverrides" object below the new "textMarkers" key.`.replace(/\s+/g, " ")
|
||||
);
|
||||
}
|
||||
pluginsToPrepend.push(pluginTextMarkers());
|
||||
}
|
||||
if (frames !== false && notPresentInPlugins("Frames")) {
|
||||
if (typeof frames === "object" && frames.styleOverrides) {
|
||||
throw new Error(
|
||||
`The config option "frames" no longer has its own "styleOverrides" object.
|
||||
Please move any style settings into the top-level "styleOverrides" object
|
||||
below the new "frames" key.`.replace(/\s+/g, " ")
|
||||
);
|
||||
}
|
||||
pluginsToPrepend.push(pluginFrames(frames !== true ? frames : void 0));
|
||||
}
|
||||
const pluginsWithDefaults = [...pluginsToPrepend, ...baseConfig.plugins || []];
|
||||
super({ ...baseConfig, plugins: pluginsWithDefaults });
|
||||
}
|
||||
};
|
||||
export {
|
||||
ExpressiveCode
|
||||
};
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/expressive-code/dist/index.js.map
generated
vendored
Normal file
1
node_modules/expressive-code/dist/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { ExpressiveCodeEngine, ExpressiveCodeEngineConfig, ExpressiveCodePlugin } from '@expressive-code/core'\nimport { PluginFramesOptions, pluginFrames } from '@expressive-code/plugin-frames'\nimport { PluginShikiOptions } from '@expressive-code/plugin-shiki'\nimport { pluginShiki } from '@expressive-code/plugin-shiki'\nimport { pluginTextMarkers } from '@expressive-code/plugin-text-markers'\n\nexport * from '@expressive-code/core'\nexport * from '@expressive-code/plugin-frames'\nexport * from '@expressive-code/plugin-shiki'\nexport * from '@expressive-code/plugin-text-markers'\n\nexport interface ExpressiveCodeConfig extends ExpressiveCodeEngineConfig {\n\t/**\n\t * The Shiki plugin adds syntax highlighting to code blocks.\n\t *\n\t * This plugin is enabled by default. Set this to `false` to disable it.\n\t * You can also configure the plugin by setting this to an options object.\n\t */\n\tshiki?: PluginShikiOptions | boolean | undefined\n\t/**\n\t * The Text Markers plugin allows to highlight lines and inline ranges\n\t * in code blocks in various styles (e.g. marked, inserted, deleted).\n\t *\n\t * This plugin is enabled by default. Set this to `false` to disable it.\n\t */\n\ttextMarkers?: boolean | undefined\n\t/**\n\t * The Frames plugin adds an editor or terminal frame around code blocks,\n\t * including an optional title displayed as a tab or window caption.\n\t *\n\t * This plugin is enabled by default. Set this to `false` to disable it.\n\t * You can also configure the plugin by setting this to an options object.\n\t */\n\tframes?: PluginFramesOptions | boolean | undefined\n}\n\nexport class ExpressiveCode extends ExpressiveCodeEngine {\n\tconstructor({ shiki, textMarkers, frames, ...baseConfig }: ExpressiveCodeConfig = {}) {\n\t\t// Collect all default plugins with their configuration,\n\t\t// but skip those that were disabled or already added to plugins\n\t\tconst pluginsToPrepend: ExpressiveCodePlugin[] = []\n\t\tconst baseConfigPlugins = baseConfig.plugins?.flat() || []\n\t\tconst notPresentInPlugins = (name: string) => baseConfigPlugins.every((plugin) => plugin.name !== name)\n\t\tif (shiki !== false && notPresentInPlugins('Shiki')) {\n\t\t\tpluginsToPrepend.push(pluginShiki(shiki !== true ? shiki : undefined))\n\t\t}\n\t\tif (textMarkers !== false && notPresentInPlugins('TextMarkers')) {\n\t\t\tif (typeof textMarkers === 'object' && (textMarkers as { styleOverrides: unknown }).styleOverrides) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`The Expressive Code config option \"textMarkers\" can no longer be an object,\n\t\t\t\t\tbut only undefined or a boolean. Please move any style settings into the\n\t\t\t\t\ttop-level \"styleOverrides\" object below the new \"textMarkers\" key.`.replace(/\\s+/g, ' ')\n\t\t\t\t)\n\t\t\t}\n\t\t\tpluginsToPrepend.push(pluginTextMarkers())\n\t\t}\n\t\tif (frames !== false && notPresentInPlugins('Frames')) {\n\t\t\tif (typeof frames === 'object' && (frames as { styleOverrides: unknown }).styleOverrides) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`The config option \"frames\" no longer has its own \"styleOverrides\" object.\n\t\t\t\t\tPlease move any style settings into the top-level \"styleOverrides\" object\n\t\t\t\t\tbelow the new \"frames\" key.`.replace(/\\s+/g, ' ')\n\t\t\t\t)\n\t\t\t}\n\t\t\tpluginsToPrepend.push(pluginFrames(frames !== true ? frames : undefined))\n\t\t}\n\t\t// Create a new plugins array with the default plugins prepended\n\t\tconst pluginsWithDefaults = [...pluginsToPrepend, ...(baseConfig.plugins || [])]\n\t\t// Call the base constructor with the new plugins array\n\t\tsuper({ ...baseConfig, plugins: pluginsWithDefaults })\n\t}\n}\n"],"mappings":";AAAA,SAAS,4BAA8E;AACvF,SAA8B,oBAAoB;AAElD,SAAS,mBAAmB;AAC5B,SAAS,yBAAyB;AAElC,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AA2BP,IAAM,iBAAN,cAA6B,qBAAqB;AAAA,EACxD,YAAY,EAAE,OAAO,aAAa,QAAQ,GAAG,WAAW,IAA0B,CAAC,GAAG;AAGrF,UAAM,mBAA2C,CAAC;AAClD,UAAM,oBAAoB,WAAW,SAAS,KAAK,KAAK,CAAC;AACzD,UAAM,sBAAsB,CAAC,SAAiB,kBAAkB,MAAM,CAAC,WAAW,OAAO,SAAS,IAAI;AACtG,QAAI,UAAU,SAAS,oBAAoB,OAAO,GAAG;AACpD,uBAAiB,KAAK,YAAY,UAAU,OAAO,QAAQ,MAAS,CAAC;AAAA,IACtE;AACA,QAAI,gBAAgB,SAAS,oBAAoB,aAAa,GAAG;AAChE,UAAI,OAAO,gBAAgB,YAAa,YAA4C,gBAAgB;AACnG,cAAM,IAAI;AAAA,UACT;AAAA;AAAA,yEAEoE,QAAQ,QAAQ,GAAG;AAAA,QACxF;AAAA,MACD;AACA,uBAAiB,KAAK,kBAAkB,CAAC;AAAA,IAC1C;AACA,QAAI,WAAW,SAAS,oBAAoB,QAAQ,GAAG;AACtD,UAAI,OAAO,WAAW,YAAa,OAAuC,gBAAgB;AACzF,cAAM,IAAI;AAAA,UACT;AAAA;AAAA,kCAE6B,QAAQ,QAAQ,GAAG;AAAA,QACjD;AAAA,MACD;AACA,uBAAiB,KAAK,aAAa,WAAW,OAAO,SAAS,MAAS,CAAC;AAAA,IACzE;AAEA,UAAM,sBAAsB,CAAC,GAAG,kBAAkB,GAAI,WAAW,WAAW,CAAC,CAAE;AAE/E,UAAM,EAAE,GAAG,YAAY,SAAS,oBAAoB,CAAC;AAAA,EACtD;AACD;","names":[]}
|
||||
Reference in New Issue
Block a user