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.8.3 to 0.8.4

11

dist/index.d.ts
import { Annotation, Theme, LanguageAlias, getThemeColorsSync, Lines, Tokens, Token } from '@code-hike/lighter';
import * as react_jsx_runtime from 'react/jsx-runtime';
import { ReactNode, FunctionComponent } from 'react';
declare function Root(props: BrightProps): JSX.Element;
declare function Pre(brightProps: BrightProps): JSX.Element;
declare function Root(props: BrightProps): react_jsx_runtime.JSX.Element;
declare function Pre(brightProps: BrightProps): react_jsx_runtime.JSX.Element;
declare function TitleBarContent(props: BrightProps): JSX.Element;
declare function Tab(props: BrightProps): JSX.Element;
declare function TabContent(props: BrightProps): JSX.Element;
declare function TitleBarContent(props: BrightProps): react_jsx_runtime.JSX.Element;
declare function Tab(props: BrightProps): react_jsx_runtime.JSX.Element;
declare function TabContent(props: BrightProps): react_jsx_runtime.JSX.Element;

@@ -11,0 +12,0 @@ declare const components: {

@@ -527,15 +527,19 @@ "use strict";

}
function trimTrailingNewline(code) {
var _a;
return (_a = code == null ? void 0 : code.replace(/\n$/, "")) != null ? _a : void 0;
}
function parseChildren(children, lang, code) {
var _a, _b, _c;
var _a, _b;
if (typeof children === "object" && (children == null ? void 0 : children.type) === "code") {
return {
code: (_b = (_a = children.props) == null ? void 0 : _a.children) == null ? void 0 : _b.trim(),
...getLanguageAndTitle((_c = children.props) == null ? void 0 : _c.className)
code: trimTrailingNewline((_a = children.props) == null ? void 0 : _a.children),
...getLanguageAndTitle((_b = children.props) == null ? void 0 : _b.className)
};
} else if (typeof children === "object") {
const subProps = import_react.default.Children.toArray(children).map((c) => {
var _a2, _b2, _c2;
var _a2, _b2;
const codeProps = (_b2 = (_a2 = c.props) == null ? void 0 : _a2.children) == null ? void 0 : _b2.props;
return {
code: (_c2 = codeProps.children) == null ? void 0 : _c2.trim(),
code: trimTrailingNewline(codeProps.children),
...getLanguageAndTitle(codeProps.className)

@@ -542,0 +546,0 @@ };

{
"name": "bright",
"version": "0.8.3",
"version": "0.8.4",
"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