rn-shiki 0.0.24 → 0.0.25
Sign up to get free protection for your applications and to get access to all the features.
- package/babel.config.js +22 -0
- package/lib/commonjs/components/syntax/SyntaxHighlighter.js +2 -2
- package/lib/commonjs/components/syntax/SyntaxHighlighter.js.map +1 -1
- package/lib/commonjs/syntax/highlighter/index.js +3 -5
- package/lib/commonjs/syntax/highlighter/index.js.map +1 -1
- package/lib/commonjs/vendor/shiki/manifest.json +365 -365
- package/lib/typescript/components/syntax/SyntaxHighlighter.d.ts.map +1 -1
- package/lib/typescript/syntax/highlighter/index.d.ts +1 -1
- package/lib/typescript/syntax/highlighter/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/syntax/SyntaxHighlighter.tsx +2 -2
- package/src/syntax/highlighter/index.ts +1 -3
- package/src/vendor/shiki/manifest.json +365 -365
- package/tsconfig.json +2 -3
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SyntaxHighlighter.d.ts","sourceRoot":"","sources":["../../../../src/components/syntax/SyntaxHighlighter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;
|
1
|
+
{"version":3,"file":"SyntaxHighlighter.d.ts","sourceRoot":"","sources":["../../../../src/components/syntax/SyntaxHighlighter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGtD,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,UAAU,sBAAsB;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,iBAAS,iBAAiB,CAAC,EACzB,IAAI,EACJ,IAAiB,EACjB,QAAuB,EACvB,KAAkB,EAClB,SAAyB,EACzB,QAAQ,GACT,EAAE,sBAAsB,qBA6CxB;AAED,eAAe,iBAAiB,CAAA"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { LanguageInput, ThemedToken, ThemeInput } from 'shiki';
|
2
2
|
import type { TokenType } from '../../types';
|
3
|
-
import { createHighlighterCore } from 'vendor/shiki
|
3
|
+
import { createHighlighterCore } from '@vendor/shiki';
|
4
4
|
export declare function createHighlighter({ langs, themes }: {
|
5
5
|
langs: LanguageInput[];
|
6
6
|
themes: ThemeInput[];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/syntax/highlighter/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,qBAAqB,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/syntax/highlighter/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,qBAAqB,EAA+B,MAAM,eAAe,CAAA;AAUlF,wBAAsB,iBAAiB,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;IAAE,KAAK,EAAE,aAAa,EAAE,CAAC;IAAC,MAAM,EAAE,UAAU,EAAE,CAAA;CAAE,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC,CAAC,CAavK;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,SAAS,EAAE,CAMhE"}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "rn-shiki",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.0.
|
4
|
+
"version": "0.0.25",
|
5
5
|
"description": "Shiki syntax highlighter for React Native.",
|
6
6
|
"author": "Ryan Skinner <hello@ryanskinner.com>",
|
7
7
|
"license": "MIT",
|
@@ -41,6 +41,7 @@
|
|
41
41
|
"@eslint-react/eslint-plugin": "^1.15.0",
|
42
42
|
"@types/react": "^18.2.0",
|
43
43
|
"@types/react-native": "^0.73.0",
|
44
|
+
"babel-plugin-module-resolver": "^5.0.2",
|
44
45
|
"eslint": "^9.13.0",
|
45
46
|
"eslint-plugin-react-hooks": "^5.0.0",
|
46
47
|
"eslint-plugin-react-refresh": "^0.4.13",
|
@@ -54,8 +55,7 @@
|
|
54
55
|
"output": "lib",
|
55
56
|
"targets": [
|
56
57
|
[
|
57
|
-
"commonjs"
|
58
|
-
"module"
|
58
|
+
"commonjs"
|
59
59
|
],
|
60
60
|
[
|
61
61
|
"typescript",
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { LanguageInput, ThemeInput } from 'shiki'
|
2
|
+
import typescript from '@vendor/shiki/langs/typescript'
|
3
|
+
import githubDark from '@vendor/shiki/themes/github-dark'
|
2
4
|
import React from 'react'
|
3
5
|
import { Text, View } from 'react-native'
|
4
6
|
import { useSyntaxHighlighter } from '../../hooks/useSyntaxHighlighter'
|
5
|
-
import typescript from '../../vendor/shiki/langs/typescript'
|
6
|
-
import githubDark from '../../vendor/shiki/themes/github-dark'
|
7
7
|
|
8
8
|
interface SyntaxHighlighterProps {
|
9
9
|
text: string
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import type { LanguageInput, ThemedToken, ThemeInput } from 'shiki'
|
2
2
|
import type { TokenType } from '../../types'
|
3
|
-
import { createHighlighterCore } from 'vendor/shiki
|
4
|
-
import { createJavaScriptRegexEngine } from 'vendor/shiki/core/engine-javascript'
|
3
|
+
import { createHighlighterCore, createJavaScriptRegexEngine } from '@vendor/shiki'
|
5
4
|
|
6
5
|
async function initializeHighlighter(langs: LanguageInput[], themes: ThemeInput[]): Promise<Awaited<ReturnType<typeof createHighlighterCore>>> {
|
7
6
|
return createHighlighterCore({
|
@@ -18,7 +17,6 @@ export async function createHighlighter({ langs, themes }: { langs: LanguageInpu
|
|
18
17
|
|
19
18
|
try {
|
20
19
|
const highlighter = await initializeHighlighter(langs, themes)
|
21
|
-
console.log('Initialized highlighter:', highlighter)
|
22
20
|
return highlighter
|
23
21
|
}
|
24
22
|
catch (error) {
|