rn-shiki 0.0.23 → 0.0.24

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,5 @@
1
- export { SyntaxHighlighter, SyntaxLine } from './components/syntax';
1
+ import SyntaxHighlighter from './components/syntax/SyntaxHighlighter';
2
+ import SyntaxLine from './components/syntax/SyntaxLine';
2
3
  export * from './types/shiki';
4
+ export { SyntaxHighlighter, SyntaxLine };
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACnE,cAAc,eAAe,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,uCAAuC,CAAA;AACrE,OAAO,UAAU,MAAM,gCAAgC,CAAA;AAEvD,cAAc,eAAe,CAAA;AAE7B,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rn-shiki",
3
3
  "type": "module",
4
- "version": "0.0.23",
4
+ "version": "0.0.24",
5
5
  "description": "Shiki syntax highlighter for React Native.",
6
6
  "author": "Ryan Skinner <hello@ryanskinner.com>",
7
7
  "license": "MIT",
package/scripts/build.js CHANGED
@@ -170,6 +170,33 @@ const modules = [
170
170
  ...themeFiles,
171
171
  ]
172
172
 
173
+ function createVendorIndex() {
174
+ const vendorIndexPath = path.join(VENDOR_DIR, 'index.js')
175
+ const vendorIndexContent = `\
176
+ "use strict";
177
+ Object.defineProperty(exports, "__esModule", { value: true });
178
+
179
+ exports.createHighlighterCore = require('./core/core').createHighlighterCore;
180
+ exports.createJavaScriptRegexEngine = require('./core/engine-javascript').createJavaScriptRegexEngine;
181
+
182
+ exports.themes = {};
183
+ exports.languages = {};
184
+ `
185
+ fs.writeFileSync(vendorIndexPath, vendorIndexContent)
186
+
187
+ const vendorDtsPath = path.join(VENDOR_DIR, 'index.d.ts')
188
+ const vendorDtsContent = `\
189
+ import type { ThemeInput, LanguageInput } from 'shiki'
190
+
191
+ export { createHighlighterCore } from './core/core'
192
+ export { createJavaScriptRegexEngine } from './core/engine-javascript'
193
+
194
+ export declare const themes: Record<string, ThemeInput>
195
+ export declare const languages: Record<string, LanguageInput>
196
+ `
197
+ fs.writeFileSync(vendorDtsPath, vendorDtsContent)
198
+ }
199
+
173
200
  // Initialize manifest
174
201
  const manifest = {
175
202
  version: JSON.parse(fs.readFileSync(path.join(__dirname, '../node_modules/shiki/package.json'), 'utf8')).version,
@@ -226,5 +253,7 @@ for (const module of modules) {
226
253
  }
227
254
  }
228
255
 
256
+ createVendorIndex()
257
+
229
258
  // Write manifest
230
259
  fs.writeFileSync(path.join(VENDOR_DIR, 'manifest.json'), JSON.stringify(manifest, null, 2))
@@ -0,0 +1,7 @@
1
+ import type { ThemeInput, LanguageInput } from 'shiki'
2
+
3
+ export { createHighlighterCore } from './core/core'
4
+ export { createJavaScriptRegexEngine } from './core/engine-javascript'
5
+
6
+ export declare const themes: Record<string, ThemeInput>
7
+ export declare const languages: Record<string, LanguageInput>
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+
4
+ exports.createHighlighterCore = require('./core/core').createHighlighterCore;
5
+ exports.createJavaScriptRegexEngine = require('./core/engine-javascript').createJavaScriptRegexEngine;
6
+
7
+ exports.themes = {};
8
+ exports.languages = {};