@apollohg/react-native-rich-text-editor-code-highlighting 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +46 -46
  2. package/src/index.ts +2 -0
package/package.json CHANGED
@@ -1,49 +1,49 @@
1
1
  {
2
- "name": "@apollohg/react-native-rich-text-editor-code-highlighting",
3
- "version": "2.0.0",
4
- "description": "Optional native syntax highlighting for @apollohg/react-native-rich-text-editor",
5
- "license": "Apache-2.0",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "react-native": "src/index.ts",
9
- "exports": {
10
- ".": {
11
- "types": "./dist/index.d.ts",
12
- "react-native": "./src/index.ts",
13
- "default": "./dist/index.js"
14
- },
15
- "./package.json": "./package.json"
2
+ "name": "@apollohg/react-native-rich-text-editor-code-highlighting",
3
+ "version": "2.0.2",
4
+ "description": "Optional native syntax highlighting for @apollohg/react-native-rich-text-editor",
5
+ "license": "Apache-2.0",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "react-native": "src/index.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "react-native": "./src/index.ts",
13
+ "default": "./dist/index.js"
16
14
  },
17
- "files": [
18
- "dist",
19
- "src",
20
- "ios",
21
- "android",
22
- "!android/build",
23
- "expo-module.config.json",
24
- "NativeEditorCodeHighlighting.podspec",
25
- "README.md",
26
- "LICENSE",
27
- "THIRD_PARTY_NOTICES.md",
28
- "RUST-STANDARD-LIBRARY-NOTICES.html",
29
- "scripts/verify-package.mjs"
30
- ],
31
- "peerDependencies": {
32
- "@apollohg/react-native-rich-text-editor": "2.0.0",
33
- "expo": ">=52.0.0"
34
- },
35
- "scripts": {
36
- "build": "tsc -p tsconfig.json",
37
- "test:rust": "cargo test --manifest-path rust/Cargo.toml --release --locked",
38
- "build:native": "bash scripts/build-native.sh",
39
- "prepack": "node scripts/verify-package.mjs"
40
- },
41
- "publishConfig": {
42
- "access": "public"
43
- },
44
- "repository": {
45
- "type": "git",
46
- "url": "git+https://github.com/apollohg/react-native-rich-text-editor.git",
47
- "directory": "packages/code-highlighting"
48
- }
15
+ "./package.json": "./package.json"
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "src",
20
+ "ios",
21
+ "android",
22
+ "!android/build",
23
+ "expo-module.config.json",
24
+ "NativeEditorCodeHighlighting.podspec",
25
+ "README.md",
26
+ "LICENSE",
27
+ "THIRD_PARTY_NOTICES.md",
28
+ "RUST-STANDARD-LIBRARY-NOTICES.html",
29
+ "scripts/verify-package.mjs"
30
+ ],
31
+ "peerDependencies": {
32
+ "@apollohg/react-native-rich-text-editor": "2.0.2",
33
+ "expo": ">=52.0.0"
34
+ },
35
+ "scripts": {
36
+ "build": "tsc -p tsconfig.json",
37
+ "test:rust": "cargo test --manifest-path rust/Cargo.toml --release --locked",
38
+ "build:native": "bash scripts/build-native.sh",
39
+ "prepack": "node scripts/verify-package.mjs"
40
+ },
41
+ "publishConfig": {
42
+ "access": "public"
43
+ },
44
+ "repository": {
45
+ "type": "git",
46
+ "url": "git+https://github.com/apollohg/react-native-rich-text-editor.git",
47
+ "directory": "packages/code-highlighting"
48
+ }
49
49
  }
package/src/index.ts CHANGED
@@ -2,6 +2,7 @@ import { requireNativeModule } from 'expo-modules-core';
2
2
  import type { CodeHighlightingAddon } from '@apollohg/react-native-rich-text-editor';
3
3
 
4
4
  const nativeModule = requireNativeModule<{ initialize(): number }>('NativeCodeHighlighting');
5
+
5
6
  if (nativeModule.initialize() !== 1) {
6
7
  throw new Error(
7
8
  'Code highlighting requires native provider interface version 1. Rebuild the app.'
@@ -32,6 +33,7 @@ export function createCodeHighlightingAddon(
32
33
  'Unsupported code-highlighting theme. Use a name from codeHighlightingThemes.'
33
34
  );
34
35
  }
36
+
35
37
  return Object.freeze({
36
38
  id: 'code-highlighting',
37
39
  version: 1,