New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@code-hike/smooth-code

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@code-hike/smooth-code - npm Package Compare versions

Comparing version 0.3.0--canary.77.c58a10a.0 to 0.3.0--canary.77.c8f7b29.0

dist/code-spring.d.ts

26

dist/code-tween.d.ts

@@ -1,1 +0,25 @@

export declare function CodeTween(): null;
import React from "react";
import { IRawTheme } from "vscode-textmate";
import { FullTween, Code, FocusString } from "@code-hike/utils";
import { CodeAnnotation } from "./partial-step-parser";
declare type HTMLProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLPreElement>, HTMLPreElement>;
export declare type CodeTweenProps = {
tween: FullTween<CodeStep>;
progress: number;
config: CodeConfig;
} & HTMLProps;
export declare type CodeStep = {
code: Code;
focus: FocusString;
annotations?: CodeAnnotation[];
};
export declare type CodeConfig = {
parentHeight?: any;
minColumns?: number;
minZoom?: number;
maxZoom?: number;
horizontalCenter?: boolean;
theme: IRawTheme;
};
export declare function CodeTween({ tween, progress, config, ...preProps }: CodeTweenProps): JSX.Element;
export {};

@@ -17,2 +17,24 @@ import { IThemedToken } from "shiki";

export declare function highlightOrPlaceholder(code: string, lang: string, theme: EditorTheme): CodeLine[];
export declare function highlightCode(code: string, lang: string, theme: EditorTheme): Promise<{
tokens: {
content: string;
props: {
className?: string | undefined;
style?: {
color: string | undefined;
} | undefined;
};
}[];
}[]>;
export declare function highlightTween(code: Tween<string>, lang: string, theme: EditorTheme): Promise<FullTween<{
tokens: {
content: string;
props: {
className?: string | undefined;
style?: {
color: string | undefined;
} | undefined;
};
}[];
}[]>>;
declare type ThemedCode = {

@@ -19,0 +41,0 @@ lines: IThemedToken[][];

9

dist/index.d.ts

@@ -1,4 +0,7 @@

import { Code, CodeProps } from "./code";
import { CodeTween } from "./code-tween";
import { HeavyCode, CodeProps } from "./heavy-code";
import { CodeTween, CodeStep, CodeConfig } from "./code-tween";
import { CodeAnnotation } from "./step-parser";
export { Code, CodeProps, CodeTween, CodeAnnotation };
import { highlightTween, highlightCode } from "./highlighter";
import { Code } from "./oldcode";
import { CodeSpring } from "./code-spring";
export { CodeTween, CodeSpring, CodeAnnotation, CodeStep, CodeConfig, HeavyCode, Code, CodeProps, highlightCode, highlightTween, };

@@ -1,2 +0,1 @@

/// <reference types="react" />
import { Dimensions } from "./use-dimensions";

@@ -3,0 +2,0 @@ import { CodeStep } from "./step-parser";

@@ -1,3 +0,2 @@

import { FullTween } from "@code-hike/utils";
import { FocusString, ColumnExtremes } from "./focus-parser";
import { FullTween, FocusString, ColumnExtremes } from "@code-hike/utils";
import { MergedCode, FocusedCode, MergedLine, LineGroup, AnnotatedLine, MultiLineAnnotation, InlineAnnotation } from "./step-parser";

@@ -4,0 +3,0 @@ import React from "react";

@@ -1,3 +0,2 @@

import { Tween, FullTween } from "@code-hike/utils";
import { FocusString } from "./focus-parser";
import { Tween, FocusString, FullTween } from "@code-hike/utils";
import { EditorTheme } from "./themes";

@@ -12,2 +11,3 @@ import React from "react";

data: any;
theme: EditorTheme;
}) => React.ReactElement;

@@ -52,2 +52,3 @@ data?: any;

data: any;
theme: EditorTheme;
Component: (props: {

@@ -57,2 +58,3 @@ style: React.CSSProperties;

data: any;
theme: EditorTheme;
}) => React.ReactElement;

@@ -66,2 +68,3 @@ };

data: any;
theme: EditorTheme;
Component: (props: {

@@ -71,2 +74,3 @@ style?: React.CSSProperties;

data: any;
theme: EditorTheme;
}) => React.ReactElement;

@@ -73,0 +77,0 @@ };

import { IRawTheme } from "vscode-textmate";
import DEFAULT_THEME from "shiki/themes/dark-plus.json";
interface EditorTheme extends IRawTheme {
type?: string;
}
export { getThemeDefaultColors, EditorTheme };
export { getThemeDefaultColors, EditorTheme, DEFAULT_THEME };
declare function getThemeDefaultColors(theme: EditorTheme): {

@@ -7,0 +8,0 @@ fg: string;

import React from "react";
import { FocusString } from "./focus-parser";
import { Tween } from "@code-hike/utils";
import { FocusString, Tween } from "@code-hike/utils";
declare type Dimensions = {

@@ -5,0 +4,0 @@ containerWidth: number;

{
"name": "@code-hike/smooth-code",
"version": "0.3.0--canary.77.c58a10a.0",
"version": "0.3.0--canary.77.c8f7b29.0",
"main": "dist/index.cjs.js",
"typings": "dist/index.d.ts",
"module": "dist/index.esm.js",
"sideEffects": false,
"style": "dist/index.css",

@@ -17,19 +18,18 @@ "files": [

"devDependencies": {
"@code-hike/script": "0.3.0--canary.77.c58a10a.0",
"@code-hike/script": "0.3.0--canary.77.c8f7b29.0",
"@types/diff": "^4.0.2",
"@types/jest": "^24.0.15",
"@types/react": "^16.9.38",
"@types/react": "^17.0.2",
"jest": "^26.5.3",
"react": "^16.13.1",
"react": "^17.0.2",
"ts-jest": "^26.4.1"
},
"dependencies": {
"@code-hike/code-diff": "0.3.0--canary.77.c58a10a.0",
"@code-hike/smooth-lines": "0.3.0--canary.77.c58a10a.0",
"@code-hike/utils": "0.3.0--canary.77.c58a10a.0",
"@code-hike/highlighter": "0.3.0--canary.77.c8f7b29.0",
"@code-hike/utils": "0.3.0--canary.77.c8f7b29.0",
"diff": "^4.0.2",
"shiki": "^0.9.5"
"use-spring": "^0.2.3"
},
"peerDependencies": {
"react": ">=16.8"
"react": "^16.8.3 || ^17 || ^18"
},

@@ -50,3 +50,3 @@ "keywords": [

},
"gitHead": "c58a10af94bfbb73197c59ff8331d2b2635c9c29"
"gitHead": "c8f7b2929ddc229854ed919b6427e77291be9cbd"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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