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

ink-highlight

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ink-highlight - npm Package Compare versions

Comparing version 0.2.1 to 1.0.0

lib/index.mjs

21

lib/index.d.ts

@@ -1,5 +0,16 @@

import { Highlight } from './components/Highlight';
import { HighlightOptionsContext, HighlightOptions } from './components/HighlightOptionsContext';
import { HighlightThemeContext } from './components/HighlightThemeContext';
export { Highlight, HighlightOptionsContext, HighlightOptions, HighlightThemeContext };
export default Highlight;
/// <reference types="react" />
import * as react from 'react';
import { FC } from 'react';
import { HighlightOptions as HighlightOptions$1, Theme } from 'cli-highlight';
declare type HighlightOptions = Omit<HighlightOptions$1, 'theme'>;
declare const HighlightOptionsContext: react.Context<HighlightOptions>;
declare type Props = {
code: string;
} & HighlightOptions;
declare const Highlight: FC<Props>;
declare const HighlightThemeContext: react.Context<Theme>;
export { Highlight, HighlightOptions, HighlightOptionsContext, HighlightThemeContext };

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

"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),n=e(t),i=e(require("prop-types")),o=require("cli-highlight");const a=t.createContext({}),g=t.createContext(o.DEFAULT_THEME),l=({code:e,...i})=>{const l=t.useContext(g),u=t.useContext(a),r=void 0!==i.language?i.language:u.language,s=void 0!==i.ignoreIllegals?i.ignoreIllegals:u.ignoreIllegals,c=void 0!==i.continuation?i.continuation:u.continuation,d=void 0!==i.languageSubset?i.languageSubset:u.languageSubset;return n.createElement(n.Fragment,null,o.highlight(e,{language:r,ignoreIllegals:s,continuation:c,languageSubset:d,theme:l}))};l.propTypes={code:i.string.isRequired,language:i.string,ignoreIllegals:i.bool,continuation:i.any,languageSubset:i.arrayOf(i.string.isRequired)},l.defaultProps={language:void 0,ignoreIllegals:void 0,continuation:void 0,languageSubset:void 0},exports.Highlight=l,exports.HighlightOptionsContext=a,exports.HighlightThemeContext=g,exports.default=l;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("ink"),l=require("prop-types"),g=require("cli-highlight");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=a(e),r=a(l);const i=e.createContext({}),n=e.createContext(g.DEFAULT_THEME),o=({code:l,...a})=>{const r=e.useContext(n),o=e.useContext(i),s=void 0!==a.language?a.language:o.language,d=void 0!==a.ignoreIllegals?a.ignoreIllegals:o.ignoreIllegals,h=void 0!==a.languageSubset?a.languageSubset:o.languageSubset;return u.default.createElement(t.Text,null,g.highlight(l,{language:s,ignoreIllegals:d,languageSubset:h,theme:r}))};o.propTypes={code:r.default.string.isRequired,language:r.default.string,ignoreIllegals:r.default.bool,languageSubset:r.default.arrayOf(r.default.string.isRequired)},o.defaultProps={language:void 0,ignoreIllegals:void 0,languageSubset:void 0},exports.Highlight=o,exports.HighlightOptionsContext=i,exports.HighlightThemeContext=n;
{
"name": "ink-highlight",
"version": "0.2.1",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"version": "1.0.0",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"exports": {
"import": "./lib/index.mjs",
"require": "./lib/index.js"
},
"repository": {

@@ -39,3 +43,3 @@ "type": "git",

"test": "jest",
"build": "rollup -c",
"build": "rollup -c && prettier --write './lib/index.d.ts'",
"lint": "eslint -c .eslintrc.json --ext ts,tsx src",

@@ -45,37 +49,41 @@ "format": "yarn lint --fix"

"peerDependencies": {
"ink": "^2.0.0",
"react": "^16.8.0"
"ink": "^3.0.0",
"react": "^17.0.0"
},
"dependencies": {
"cli-highlight": "^2.1.4",
"prop-types": "^15.7.2"
"cli-highlight": "^2.1.11",
"prop-types": "^15.8.1"
},
"devDependencies": {
"@rollup/plugin-typescript": "^4.0.0",
"@types/jest": "^25.1.4",
"@types/prop-types": "^15.7.3",
"@types/react": "^16.9.23",
"@typescript-eslint/eslint-plugin": "^2.22.0",
"@typescript-eslint/parser": "^2.22.0",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-jest": "^23.8.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.19.0",
"ink": "^2.7.1",
"ink-testing-library": "^1.0.3",
"jest": "^25.1.0",
"jest-snapshot-serializer-raw": "^1.1.0",
"prettier": "^1.19.1",
"react": "^16.13.0",
"rollup": "^2.0.2",
"rollup-plugin-terser": "^5.2.0",
"ts-jest": "^25.2.1",
"ts-node": "^8.6.2",
"@rollup/plugin-typescript": "^8.3.1",
"@types/jest": "^27.4.1",
"@types/node": "*",
"@types/prop-types": "^15.7.4",
"@types/react": "^17.0.43",
"@typescript-eslint/eslint-plugin": "^5.18.0",
"@typescript-eslint/parser": "^5.18.0",
"eslint": "^8.12.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^26.1.3",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.3.0",
"ink": "^3.2.0",
"ink-testing-library": "^2.1.0",
"jest": "^27.5.1",
"jest-snapshot-serializer-raw": "^1.2.0",
"prettier": "^2.6.2",
"react": "^17.0.0",
"rollup": "^2.70.1",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-dts": "^4.2.0",
"rollup-plugin-terser": "^7.0.2",
"ts-jest": "^27.1.4",
"ts-node": "^10.7.0",
"tslib": "*",
"typescript": "^3.8.3"
"typescript": "^4.6.3"
}
}

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