New:Socket for Asana Is Now Available.Learn more
Get Started

@shikijs/core

Package Overview
Dependencies
Maintainers
3
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shikijs/core - npm Package Compare versions

Comparing version
4.3.1
to
4.4.0
+0
-1
dist/index.d.mts

@@ -6,3 +6,2 @@ import { Awaitable, BundledHighlighterOptions, CodeOptionsMultipleThemes, CodeToHastOptions, CodeToHastRenderOptions, CodeToTokensBaseOptions, CodeToTokensOptions, CodeToTokensWithThemesOptions, CreateBundledHighlighterOptions, CreateHighlighterFactory, GrammarState, HighlighterCore, HighlighterCoreOptions, HighlighterGeneric, Position, RequireKeys, ShikiPrimitive, ShikiTransformer, ShikiTransformerContextCommon, ShikiTransformerContextSource, ThemeRegistration, ThemeRegistrationResolved, ThemedToken, ThemedTokenWithVariants, TokenStyles, TokenizeWithThemeOptions, TokensResult } from "@shikijs/types";

export * from "@shikijs/types";
//#region src/constructors/bundle-factory.d.ts

@@ -9,0 +8,0 @@ /**

+5
-1

@@ -29,2 +29,3 @@ import { ShikiError as ShikiError$1 } from "@shikijs/types";

const RE_SCRIPT_LANG = /<script\s+(?:type|lang)=["']([^"']+)["']/gi;
const RE_FRONTMATTER = /^\s*---\r?\n[\s\S]*?\r?\n---(?:\r?\n|\s*$)/;
/**

@@ -104,2 +105,3 @@ * Creates a converter between index and position in a code block.

}
if (RE_FRONTMATTER.test(code)) langs.add("yaml");
if (!highlighter) return [...langs];

@@ -169,3 +171,5 @@ const bundle = highlighter.getBundledLanguages();

if (lightIndex === -1 || darkIndex === -1) throw new ShikiError$1("When using `defaultColor: \"light-dark()\"`, you must provide both `light` and `dark` themes");
mergedStyles[key] = `light-dark(${styles[lightIndex][key] || "inherit"}, ${styles[darkIndex][key] || "inherit"})`;
const lightValue = styles[lightIndex][key] || "inherit";
const darkValue = styles[darkIndex][key] || "inherit";
mergedStyles[key] = `light-dark(${lightValue}, ${darkValue})`;
if (colorsRendering === "css-vars") mergedStyles[varKey(idx, key)] = value;

@@ -172,0 +176,0 @@ } else mergedStyles[key] = value;

{
"name": "@shikijs/core",
"type": "module",
"version": "4.3.1",
"version": "4.4.0",
"description": "Core of Shiki",

@@ -50,6 +50,6 @@ "author": "Pine Wu <octref@gmail.com>; Anthony Fu <anthonyfu117@hotmail.com>",

"@shikijs/vscode-textmate": "^10.0.2",
"@types/hast": "^3.0.4",
"@types/hast": "^3.0.5",
"hast-util-to-html": "^9.0.5",
"@shikijs/primitive": "4.3.1",
"@shikijs/types": "4.3.1"
"@shikijs/primitive": "4.4.0",
"@shikijs/types": "4.4.0"
},

@@ -56,0 +56,0 @@ "scripts": {