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

codehike

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codehike - npm Package Compare versions

Comparing version 1.0.0-beta.0 to 1.0.0-beta.1

LICENSE

2

dist/code/inner.js

@@ -29,3 +29,3 @@ import { jsx as _jsx } from "react/jsx-runtime";

else {
const { lineNumber, indentation, data, ...props } = result;
const { lineNumber, totalLines, indentation, data, ...props } = result;
return _jsx("div", { ...props });

@@ -32,0 +32,0 @@ }

@@ -34,8 +34,8 @@ import { jsx as _jsx } from "react/jsx-runtime";

const merge = { _stack: stack, _ref: ref };
return (_jsx(InnerPre, { merge: merge, "data-theme": themeName, "data-lang": lang, className: className, ...rest, children: _jsx(RenderLines, { linesOrGroups: groups, annotationNames: annotationNames, handlers: handlers, inlineAnnotations: inlineAnnotations, indentations: indentations }) }));
return (_jsx(InnerPre, { merge: merge, "data-theme": themeName, "data-lang": lang, className: className, ...rest, children: _jsx(RenderLines, { linesOrGroups: groups, annotationNames: annotationNames, handlers: handlers, inlineAnnotations: inlineAnnotations, indentations: indentations, totalLines: lines.length }) }));
});
function RenderLines({ linesOrGroups, handlers, inlineAnnotations, indentations, annotationStack = [], annotationNames, }) {
function RenderLines({ linesOrGroups, handlers, inlineAnnotations, indentations, annotationStack = [], annotationNames, totalLines, }) {
return linesOrGroups.map((group) => {
if (isGroup(group)) {
return (_jsx(AnnotatedLines, { group: group, handlers: handlers, inlineAnnotations: inlineAnnotations, annotationStack: annotationStack, indentations: indentations, annotationNames: annotationNames }, group.range[0]));
return (_jsx(AnnotatedLines, { group: group, handlers: handlers, inlineAnnotations: inlineAnnotations, annotationStack: annotationStack, indentations: indentations, annotationNames: annotationNames, totalLines: totalLines }, group.range[0]));
}

@@ -61,7 +61,7 @@ const lineNumber = group.range[0];

let children = (_jsx(RenderLineContent, { lineContent: lineContent, handlers: handlers, lineNumber: lineNumber }));
const merge = { lineNumber, indentation, _stack: stack };
const merge = { lineNumber, indentation, totalLines, _stack: stack };
return (_jsx(InnerLine, { merge: merge, children: children }, lineNumber));
});
}
function AnnotatedLines({ group, handlers, inlineAnnotations, annotationStack, indentations, annotationNames, }) {
function AnnotatedLines({ group, handlers, inlineAnnotations, annotationStack, indentations, annotationNames, totalLines, }) {
var _a;

@@ -72,5 +72,5 @@ const { annotation, lines } = group;

if (!Component) {
return (_jsx(RenderLines, { linesOrGroups: lines, handlers: handlers, inlineAnnotations: inlineAnnotations, annotationStack: [annotation, ...annotationStack], indentations: indentations, annotationNames: annotationNames }));
return (_jsx(RenderLines, { linesOrGroups: lines, handlers: handlers, inlineAnnotations: inlineAnnotations, annotationStack: [annotation, ...annotationStack], indentations: indentations, annotationNames: annotationNames, totalLines: totalLines }));
}
return (_jsx(Component, { annotation: annotation, children: _jsx(RenderLines, { linesOrGroups: lines, handlers: handlers, inlineAnnotations: inlineAnnotations, annotationStack: [annotation, ...annotationStack], indentations: indentations, annotationNames: annotationNames }) }));
return (_jsx(Component, { annotation: annotation, children: _jsx(RenderLines, { linesOrGroups: lines, handlers: handlers, inlineAnnotations: inlineAnnotations, annotationStack: [annotation, ...annotationStack], indentations: indentations, annotationNames: annotationNames, totalLines: totalLines }) }));
}

@@ -77,0 +77,0 @@ function toLines(tokens) {

@@ -104,2 +104,3 @@ /// <reference types="react" />

lineNumber: number;
totalLines: number;
indentation: number;

@@ -106,0 +107,0 @@ data?: Record<string, any>;

{
"name": "codehike",
"version": "1.0.0-beta.0",
"version": "1.0.0-beta.1",
"type": "module",

@@ -5,0 +5,0 @@ "sideEffects": false,

Sorry, the diff of this file is not supported yet

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