ink-highlight
Advanced tools
Comparing version 0.2.1 to 1.0.0
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
27215
1
30
9
25
+ Addedcli-boxes@2.2.1(transitive)
+ Addedcode-excerpt@3.0.0(transitive)
+ Addedconvert-to-spaces@1.0.2(transitive)
+ Addedescape-string-regexp@2.0.0(transitive)
+ Addedindent-string@4.0.0(transitive)
+ Addedink@3.2.0(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedpatch-console@1.0.0(transitive)
+ Addedreact@17.0.2(transitive)
+ Addedreact-devtools-core@4.28.5(transitive)
+ Addedreact-reconciler@0.26.2(transitive)
+ Addedscheduler@0.20.2(transitive)
+ Addedshell-quote@1.8.2(transitive)
+ Addedstack-utils@2.0.6(transitive)
+ Addedtype-fest@0.12.0(transitive)
+ Addedws@7.5.10(transitive)
- Removedansi-escapes@3.2.0(transitive)
- Removedansi-regex@4.1.1(transitive)
- Removedansi-styles@3.2.1(transitive)
- Removedarrify@2.0.1(transitive)
- Removedastral-regex@1.0.0(transitive)
- Removedchalk@3.0.0(transitive)
- Removedcli-cursor@2.1.0(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedemoji-regex@7.0.3(transitive)
- Removedink@2.7.1(transitive)
- Removedis-fullwidth-code-point@2.0.0(transitive)
- Removedlodash.throttle@4.1.1(transitive)
- Removedlog-update@3.4.0(transitive)
- Removedmimic-fn@1.2.0(transitive)
- Removedonetime@2.0.1(transitive)
- Removedreact@16.14.0(transitive)
- Removedreact-reconciler@0.24.0(transitive)
- Removedrestore-cursor@2.0.0(transitive)
- Removedscheduler@0.18.0(transitive)
- Removedstring-length@3.1.0(transitive)
- Removedstring-width@3.1.0(transitive)
- Removedstrip-ansi@5.2.0(transitive)
- Removedwrap-ansi@5.1.0(transitive)
Updatedcli-highlight@^2.1.11
Updatedprop-types@^15.8.1