Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bright

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bright - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

11

dist/index.d.ts
import React from 'react';
import { Theme, Lang } from '@code-hike/lighter';
type MdCodeText = {
type: "code";
props: {
className: string;
children: string;
};
};
type CodeText = string | MdCodeText;
type DoubleTheme = {

@@ -12,3 +21,3 @@ dark: Theme;

lang: Lang;
children: string;
children: CodeText;
style?: React.CSSProperties;

@@ -15,0 +24,0 @@ className?: string;

@@ -75,2 +75,11 @@ "use strict";

}) {
var _a, _b;
let language = lang;
let text;
if (typeof code === "object") {
text = (_a = code.props) == null ? void 0 : _a.children;
language = (_b = code.props) == null ? void 0 : _b.className.replace("language-", "");
} else {
text = code;
}
const {

@@ -83,3 +92,3 @@ lines,

lineNumberForeground
} = yield (0, import_lighter.highlight)(code, lang, theme);
} = yield (0, import_lighter.highlight)(text.trim(), language, theme);
const lineCount = lines.length;

@@ -118,3 +127,4 @@ const digits = lineCount.toString().length;

borderRadius: "4px",
colorScheme
colorScheme,
overflow: "auto"
}, style),

@@ -121,0 +131,0 @@ children: [

2

package.json
{
"name": "bright",
"version": "0.5.0",
"version": "0.5.1",
"main": "./dist/index.js",

@@ -5,0 +5,0 @@ "module": "./dist/index.mjs",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc