rn-shiki 0.0.37-20 → 0.0.37-21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. package/lib/commonjs/components/syntax/SyntaxHighlighter.js +69 -61
  2. package/lib/commonjs/components/syntax/SyntaxHighlighter.js.map +1 -1
  3. package/lib/commonjs/hooks/useSyntaxHighlighter.js +18 -10
  4. package/lib/commonjs/hooks/useSyntaxHighlighter.js.map +1 -1
  5. package/lib/commonjs/index.js +0 -23
  6. package/lib/commonjs/index.js.map +1 -1
  7. package/lib/commonjs/syntax/{highlighter/index.js → highlighter.js} +20 -10
  8. package/lib/commonjs/syntax/highlighter.js.map +1 -0
  9. package/lib/commonjs/utils/style-transformer.js +97 -0
  10. package/lib/commonjs/utils/style-transformer.js.map +1 -0
  11. package/lib/module/components/syntax/SyntaxHighlighter.js +69 -62
  12. package/lib/module/components/syntax/SyntaxHighlighter.js.map +1 -1
  13. package/lib/module/hooks/useSyntaxHighlighter.js +17 -9
  14. package/lib/module/hooks/useSyntaxHighlighter.js.map +1 -1
  15. package/lib/module/index.js +1 -3
  16. package/lib/module/index.js.map +1 -1
  17. package/lib/module/syntax/highlighter.js +44 -0
  18. package/lib/module/syntax/highlighter.js.map +1 -0
  19. package/lib/module/utils/style-transformer.js +91 -0
  20. package/lib/module/utils/style-transformer.js.map +1 -0
  21. package/lib/typescript/components/syntax/SyntaxHighlighter.d.ts +2 -10
  22. package/lib/typescript/components/syntax/SyntaxHighlighter.d.ts.map +1 -1
  23. package/lib/typescript/hooks/useSyntaxHighlighter.d.ts +3 -2
  24. package/lib/typescript/hooks/useSyntaxHighlighter.d.ts.map +1 -1
  25. package/lib/typescript/index.d.ts +1 -3
  26. package/lib/typescript/index.d.ts.map +1 -1
  27. package/lib/typescript/syntax/{highlighter/index.d.ts → highlighter.d.ts} +3 -4
  28. package/lib/typescript/syntax/highlighter.d.ts.map +1 -0
  29. package/lib/typescript/types/shiki.d.ts +10 -8
  30. package/lib/typescript/types/shiki.d.ts.map +1 -1
  31. package/lib/typescript/utils/string.d.ts +1 -1
  32. package/lib/typescript/utils/string.d.ts.map +1 -1
  33. package/lib/typescript/utils/style-transformer.d.ts +8 -0
  34. package/lib/typescript/utils/style-transformer.d.ts.map +1 -0
  35. package/package.json +1 -1
  36. package/src/utils/string.ts +1 -1
  37. package/lib/commonjs/components/syntax/SyntaxLine.js +0 -36
  38. package/lib/commonjs/components/syntax/SyntaxLine.js.map +0 -1
  39. package/lib/commonjs/components/syntax/index.js +0 -21
  40. package/lib/commonjs/components/syntax/index.js.map +0 -1
  41. package/lib/commonjs/syntax/highlighter/index.js.map +0 -1
  42. package/lib/commonjs/syntax/index.js +0 -19
  43. package/lib/commonjs/syntax/index.js.map +0 -1
  44. package/lib/commonjs/types/index.js +0 -2
  45. package/lib/commonjs/types/index.js.map +0 -1
  46. package/lib/commonjs/types/shiki.d.js +0 -6
  47. package/lib/commonjs/types/shiki.d.js.map +0 -1
  48. package/lib/commonjs/utils/index.js +0 -17
  49. package/lib/commonjs/utils/index.js.map +0 -1
  50. package/lib/module/components/syntax/SyntaxLine.js +0 -31
  51. package/lib/module/components/syntax/SyntaxLine.js.map +0 -1
  52. package/lib/module/components/syntax/index.js +0 -5
  53. package/lib/module/components/syntax/index.js.map +0 -1
  54. package/lib/module/syntax/highlighter/index.js +0 -34
  55. package/lib/module/syntax/highlighter/index.js.map +0 -1
  56. package/lib/module/syntax/index.js +0 -4
  57. package/lib/module/syntax/index.js.map +0 -1
  58. package/lib/module/types/index.js +0 -2
  59. package/lib/module/types/index.js.map +0 -1
  60. package/lib/module/types/shiki.d.js +0 -4
  61. package/lib/module/types/shiki.d.js.map +0 -1
  62. package/lib/module/utils/index.js +0 -4
  63. package/lib/module/utils/index.js.map +0 -1
  64. package/lib/typescript/components/syntax/SyntaxLine.d.ts +0 -9
  65. package/lib/typescript/components/syntax/SyntaxLine.d.ts.map +0 -1
  66. package/lib/typescript/components/syntax/index.d.ts +0 -3
  67. package/lib/typescript/components/syntax/index.d.ts.map +0 -1
  68. package/lib/typescript/syntax/highlighter/index.d.ts.map +0 -1
  69. package/lib/typescript/syntax/index.d.ts +0 -2
  70. package/lib/typescript/syntax/index.d.ts.map +0 -1
  71. package/lib/typescript/types/index.d.ts +0 -7
  72. package/lib/typescript/types/index.d.ts.map +0 -1
  73. package/lib/typescript/utils/index.d.ts +0 -2
  74. package/lib/typescript/utils/index.d.ts.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/index.ts"],"mappings":"","ignoreList":[]}
@@ -1,4 +0,0 @@
1
- "use strict";
2
-
3
- export {};
4
- //# sourceMappingURL=shiki.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/shiki.d.ts"],"mappings":"","ignoreList":[]}
@@ -1,4 +0,0 @@
1
- "use strict";
2
-
3
- export * from './string';
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../src","sources":["utils/index.ts"],"mappings":";;AAAA,cAAc,UAAU","ignoreList":[]}
@@ -1,9 +0,0 @@
1
- import type { TokenType } from '../../types';
2
- import React from 'react';
3
- interface SyntaxLineProps {
4
- line: TokenType[];
5
- fontSize?: number;
6
- }
7
- declare function SyntaxLine({ line, fontSize }: SyntaxLineProps): React.JSX.Element;
8
- export default SyntaxLine;
9
- //# sourceMappingURL=SyntaxLine.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SyntaxLine.d.ts","sourceRoot":"","sources":["../../../../src/components/syntax/SyntaxLine.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,UAAU,eAAe;IACvB,IAAI,EAAE,SAAS,EAAE,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,iBAAS,UAAU,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,eAAe,qBAsBtD;AAED,eAAe,UAAU,CAAA"}
@@ -1,3 +0,0 @@
1
- export { default as SyntaxHighlighter } from './SyntaxHighlighter';
2
- export { default as SyntaxLine } from './SyntaxLine';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/syntax/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAA"}
@@ -1 +0,0 @@
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,EAAE,MAAM,YAAY,CAAA;AAWlD,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"}
@@ -1,2 +0,0 @@
1
- export { createHighlighter, processTokens } from './highlighter';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/syntax/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA"}
@@ -1,7 +0,0 @@
1
- export interface TokenType {
2
- content: string;
3
- color: string;
4
- fontStyle?: string;
5
- fontWeight?: string;
6
- }
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB"}
@@ -1,2 +0,0 @@
1
- export * from './string';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA"}