rn-shiki 0.0.9 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. package/lib/commonjs/index.js +0 -14
  2. package/lib/commonjs/index.js.map +1 -1
  3. package/lib/commonjs/syntax/highlighter/index.js +4 -3
  4. package/lib/commonjs/syntax/highlighter/index.js.map +1 -1
  5. package/lib/commonjs/types/shiki.d.js +2 -0
  6. package/lib/commonjs/types/shiki.d.js.map +1 -0
  7. package/lib/module/index.js +0 -2
  8. package/lib/module/index.js.map +1 -1
  9. package/lib/module/syntax/highlighter/index.js +2 -1
  10. package/lib/module/syntax/highlighter/index.js.map +1 -1
  11. package/lib/module/types/shiki.d.js +2 -0
  12. package/lib/module/types/shiki.d.js.map +1 -0
  13. package/lib/typescript/components/syntax/SyntaxHighlighter.d.ts.map +1 -0
  14. package/lib/typescript/components/syntax/SyntaxLine.d.ts.map +1 -0
  15. package/lib/typescript/components/syntax/index.d.ts.map +1 -0
  16. package/lib/typescript/hooks/useSyntaxHighlighter.d.ts.map +1 -0
  17. package/lib/typescript/index.d.ts +2 -0
  18. package/lib/typescript/index.d.ts.map +1 -0
  19. package/lib/typescript/{src/syntax → syntax}/highlighter/index.d.ts +1 -1
  20. package/lib/typescript/syntax/highlighter/index.d.ts.map +1 -0
  21. package/lib/typescript/syntax/index.d.ts.map +1 -0
  22. package/lib/typescript/types/index.d.ts.map +1 -0
  23. package/lib/typescript/utils/index.d.ts.map +1 -0
  24. package/lib/typescript/utils/string.d.ts.map +1 -0
  25. package/package.json +2 -2
  26. package/src/index.ts +0 -2
  27. package/src/syntax/highlighter/index.ts +2 -1
  28. package/src/types/shiki.d.ts +7 -0
  29. package/vendor/shiki/manifest.json +365 -365
  30. package/lib/commonjs/langs.js +0 -28
  31. package/lib/commonjs/langs.js.map +0 -1
  32. package/lib/commonjs/themes.js +0 -28
  33. package/lib/commonjs/themes.js.map +0 -1
  34. package/lib/module/langs.js +0 -20
  35. package/lib/module/langs.js.map +0 -1
  36. package/lib/module/themes.js +0 -20
  37. package/lib/module/themes.js.map +0 -1
  38. package/lib/typescript/src/components/syntax/SyntaxHighlighter.d.ts.map +0 -1
  39. package/lib/typescript/src/components/syntax/SyntaxLine.d.ts.map +0 -1
  40. package/lib/typescript/src/components/syntax/index.d.ts.map +0 -1
  41. package/lib/typescript/src/hooks/useSyntaxHighlighter.d.ts.map +0 -1
  42. package/lib/typescript/src/index.d.ts +0 -4
  43. package/lib/typescript/src/index.d.ts.map +0 -1
  44. package/lib/typescript/src/langs.d.ts +0 -6
  45. package/lib/typescript/src/langs.d.ts.map +0 -1
  46. package/lib/typescript/src/syntax/highlighter/index.d.ts.map +0 -1
  47. package/lib/typescript/src/syntax/index.d.ts.map +0 -1
  48. package/lib/typescript/src/themes.d.ts +0 -6
  49. package/lib/typescript/src/themes.d.ts.map +0 -1
  50. package/lib/typescript/src/types/index.d.ts.map +0 -1
  51. package/lib/typescript/src/utils/index.d.ts.map +0 -1
  52. package/lib/typescript/src/utils/string.d.ts.map +0 -1
  53. package/src/langs.ts +0 -20
  54. package/src/themes.ts +0 -20
  55. /package/lib/typescript/{src/components → components}/syntax/SyntaxHighlighter.d.ts +0 -0
  56. /package/lib/typescript/{src/components → components}/syntax/SyntaxLine.d.ts +0 -0
  57. /package/lib/typescript/{src/components → components}/syntax/index.d.ts +0 -0
  58. /package/lib/typescript/{src/hooks → hooks}/useSyntaxHighlighter.d.ts +0 -0
  59. /package/lib/typescript/{src/syntax → syntax}/index.d.ts +0 -0
  60. /package/lib/typescript/{src/types → types}/index.d.ts +0 -0
  61. /package/lib/typescript/{src/utils → utils}/index.d.ts +0 -0
  62. /package/lib/typescript/{src/utils → utils}/string.d.ts +0 -0
@@ -1,28 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.Languages = void 0;
7
- exports.getLanguage = getLanguage;
8
- var _manifest = _interopRequireDefault(require("../vendor/shiki/manifest.json"));
9
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
11
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
12
- const Languages = exports.Languages = Object.keys(_manifest.default.langs).reduce((acc, lang) => {
13
- const key = lang.replace(/-/g, '_').toUpperCase();
14
- return {
15
- ...acc,
16
- [key]: lang
17
- };
18
- }, {});
19
- async function getLanguage(langName) {
20
- try {
21
- const lang = await (specifier => new Promise(r => r(specifier)).then(s => _interopRequireWildcard(require(s))))(`../vendor/shiki/langs/${String(langName)}.js`);
22
- return lang.default;
23
- } catch (err) {
24
- const error = err instanceof Error ? err.message : String(err);
25
- throw new Error(`Language '${String(langName)}' failed to load: ${error}`);
26
- }
27
- }
28
- //# sourceMappingURL=langs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_manifest","_interopRequireDefault","require","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","_interopRequireWildcard","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Languages","exports","keys","manifest","langs","reduce","acc","lang","key","replace","toUpperCase","getLanguage","langName","specifier","Promise","then","s","String","err","error","Error","message"],"sourceRoot":"../../src","sources":["langs.ts"],"mappings":";;;;;;;AACA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoD,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,U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AAM,CAAC,CAACC,GAAG,EAAEC,IAAI,KAAK;EACzE,MAAMC,GAAG,GAAGD,IAAI,CAACE,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAACC,WAAW,CAAC,CAAC;EACjD,OAAO;IAAE,GAAGJ,GAAG;IAAE,CAACE,GAAG,GAAGD;EAA0B,CAAC;AACrD,CAAC,EAAE,CAAC,CAAsC,CAAC;AAEpC,eAAeI,WAAWA,CAACC,QAA2B,EAA0B;EACrF,IAAI;IACF,MAAML,IAAI,GAAG,OAAAM,SAAA,QAAAC,OAAA,CAAA9B,CAAA,IAAAA,CAAA,CAAA6B,SAAA,GAAAE,IAAA,CAAAC,CAAA,IAAA9B,uBAAA,CAAAR,OAAA,CAAAsC,CAAA,KAAa,yBAAyBC,MAAM,CAACL,QAAQ,CAAC,KAAK,CAAC;IACzE,OAAOL,IAAI,CAAC1B,OAAO;EACrB,CAAC,CACD,OAAOqC,GAAG,EAAE;IACV,MAAMC,KAAK,GAAGD,GAAG,YAAYE,KAAK,GAAGF,GAAG,CAACG,OAAO,GAAGJ,MAAM,CAACC,GAAG,CAAC;IAC9D,MAAM,IAAIE,KAAK,CAAC,aAAaH,MAAM,CAACL,QAAQ,CAAC,qBAAqBO,KAAK,EAAE,CAAC;EAC5E;AACF","ignoreList":[]}
@@ -1,28 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.Themes = void 0;
7
- exports.getTheme = getTheme;
8
- var _manifest = _interopRequireDefault(require("../vendor/shiki/manifest.json"));
9
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
11
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
12
- const Themes = exports.Themes = Object.keys(_manifest.default.themes).reduce((acc, theme) => {
13
- const key = theme.replace(/-/g, '_').toUpperCase();
14
- return {
15
- ...acc,
16
- [key]: theme
17
- };
18
- }, {});
19
- async function getTheme(themeName) {
20
- try {
21
- const theme = await (specifier => new Promise(r => r(specifier)).then(s => _interopRequireWildcard(require(s))))(`../vendor/shiki/themes/${String(themeName)}.js`);
22
- return theme.default;
23
- } catch (err) {
24
- const error = err instanceof Error ? err.message : String(err);
25
- throw new Error(`Theme '${String(themeName)}' failed to load: ${error}`);
26
- }
27
- }
28
- //# sourceMappingURL=themes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_manifest","_interopRequireDefault","require","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","_interopRequireWildcard","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Themes","exports","keys","manifest","themes","reduce","acc","theme","key","replace","toUpperCase","getTheme","themeName","specifier","Promise","then","s","String","err","error","Error","message"],"sourceRoot":"../../src","sources":["themes.ts"],"mappings":";;;;;;;AACA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoD,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA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AAE,CAAC,CAAmC,CAAC;AAEjC,eAAeI,QAAQA,CAACC,SAAyB,EAAuB;EAC7E,IAAI;IACF,MAAML,KAAK,GAAG,OAAAM,SAAA,QAAAC,OAAA,CAAA9B,CAAA,IAAAA,CAAA,CAAA6B,SAAA,GAAAE,IAAA,CAAAC,CAAA,IAAA9B,uBAAA,CAAAR,OAAA,CAAAsC,CAAA,KAAa,0BAA0BC,MAAM,CAACL,SAAS,CAAC,KAAK,CAAC;IAC5E,OAAOL,KAAK,CAAC1B,OAAO;EACtB,CAAC,CACD,OAAOqC,GAAG,EAAE;IACV,MAAMC,KAAK,GAAGD,GAAG,YAAYE,KAAK,GAAGF,GAAG,CAACG,OAAO,GAAGJ,MAAM,CAACC,GAAG,CAAC;IAC9D,MAAM,IAAIE,KAAK,CAAC,UAAUH,MAAM,CAACL,SAAS,CAAC,qBAAqBO,KAAK,EAAE,CAAC;EAC1E;AACF","ignoreList":[]}
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- import manifest from '../vendor/shiki/manifest.json';
4
- export const Languages = Object.keys(manifest.langs).reduce((acc, lang) => {
5
- const key = lang.replace(/-/g, '_').toUpperCase();
6
- return {
7
- ...acc,
8
- [key]: lang
9
- };
10
- }, {});
11
- export async function getLanguage(langName) {
12
- try {
13
- const lang = await import(`../vendor/shiki/langs/${String(langName)}.js`);
14
- return lang.default;
15
- } catch (err) {
16
- const error = err instanceof Error ? err.message : String(err);
17
- throw new Error(`Language '${String(langName)}' failed to load: ${error}`);
18
- }
19
- }
20
- //# sourceMappingURL=langs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["manifest","Languages","Object","keys","langs","reduce","acc","lang","key","replace","toUpperCase","getLanguage","langName","String","default","err","error","Error","message"],"sourceRoot":"../../src","sources":["langs.ts"],"mappings":";;AACA,OAAOA,QAAQ,MAAM,+BAA+B;AAIpD,OAAO,MAAMC,SAAS,GAAGC,MAAM,CAACC,IAAI,CAACH,QAAQ,CAACI,KAAK,CAAC,CAACC,MAAM,CAAC,CAACC,GAAG,EAAEC,IAAI,KAAK;EACzE,MAAMC,GAAG,GAAGD,IAAI,CAACE,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAACC,WAAW,CAAC,CAAC;EACjD,OAAO;IAAE,GAAGJ,GAAG;IAAE,CAACE,GAAG,GAAGD;EAA0B,CAAC;AACrD,CAAC,EAAE,CAAC,CAAsC,CAAC;AAE3C,OAAO,eAAeI,WAAWA,CAACC,QAA2B,EAA0B;EACrF,IAAI;IACF,MAAML,IAAI,GAAG,MAAM,MAAM,CAAC,yBAAyBM,MAAM,CAACD,QAAQ,CAAC,KAAK,CAAC;IACzE,OAAOL,IAAI,CAACO,OAAO;EACrB,CAAC,CACD,OAAOC,GAAG,EAAE;IACV,MAAMC,KAAK,GAAGD,GAAG,YAAYE,KAAK,GAAGF,GAAG,CAACG,OAAO,GAAGL,MAAM,CAACE,GAAG,CAAC;IAC9D,MAAM,IAAIE,KAAK,CAAC,aAAaJ,MAAM,CAACD,QAAQ,CAAC,qBAAqBI,KAAK,EAAE,CAAC;EAC5E;AACF","ignoreList":[]}
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- import manifest from '../vendor/shiki/manifest.json';
4
- export const Themes = Object.keys(manifest.themes).reduce((acc, theme) => {
5
- const key = theme.replace(/-/g, '_').toUpperCase();
6
- return {
7
- ...acc,
8
- [key]: theme
9
- };
10
- }, {});
11
- export async function getTheme(themeName) {
12
- try {
13
- const theme = await import(`../vendor/shiki/themes/${String(themeName)}.js`);
14
- return theme.default;
15
- } catch (err) {
16
- const error = err instanceof Error ? err.message : String(err);
17
- throw new Error(`Theme '${String(themeName)}' failed to load: ${error}`);
18
- }
19
- }
20
- //# sourceMappingURL=themes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["manifest","Themes","Object","keys","themes","reduce","acc","theme","key","replace","toUpperCase","getTheme","themeName","String","default","err","error","Error","message"],"sourceRoot":"../../src","sources":["themes.ts"],"mappings":";;AACA,OAAOA,QAAQ,MAAM,+BAA+B;AAIpD,OAAO,MAAMC,MAAM,GAAGC,MAAM,CAACC,IAAI,CAACH,QAAQ,CAACI,MAAM,CAAC,CAACC,MAAM,CAAiC,CAACC,GAAG,EAAEC,KAAK,KAAK;EACxG,MAAMC,GAAG,GAAID,KAAK,CAAoBE,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAACC,WAAW,CAAC,CAAC;EACtE,OAAO;IAAE,GAAGJ,GAAG;IAAE,CAACE,GAAG,GAAGD;EAAwB,CAAC;AACnD,CAAC,EAAE,CAAC,CAAmC,CAAC;AAExC,OAAO,eAAeI,QAAQA,CAACC,SAAyB,EAAuB;EAC7E,IAAI;IACF,MAAML,KAAK,GAAG,MAAM,MAAM,CAAC,0BAA0BM,MAAM,CAACD,SAAS,CAAC,KAAK,CAAC;IAC5E,OAAOL,KAAK,CAACO,OAAO;EACtB,CAAC,CACD,OAAOC,GAAG,EAAE;IACV,MAAMC,KAAK,GAAGD,GAAG,YAAYE,KAAK,GAAGF,GAAG,CAACG,OAAO,GAAGL,MAAM,CAACE,GAAG,CAAC;IAC9D,MAAM,IAAIE,KAAK,CAAC,UAAUJ,MAAM,CAACD,SAAS,CAAC,qBAAqBI,KAAK,EAAE,CAAC;EAC1E;AACF","ignoreList":[]}
@@ -1 +0,0 @@
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;AACtD,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,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,qBA4CxB;AAED,eAAe,iBAAiB,CAAA"}
@@ -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 +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":"useSyntaxHighlighter.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useSyntaxHighlighter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAUnE,UAAU,sBAAsB;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,aAAa,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,UAAU,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,wBAAgB,oBAAoB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,sBAAsB;;;;EAqDtG"}
@@ -1,4 +0,0 @@
1
- export { SyntaxHighlighter, SyntaxLine } from './components/syntax';
2
- export { getLanguage } from './langs';
3
- export { getTheme } from './themes';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
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,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA"}
@@ -1,6 +0,0 @@
1
- import type { LanguageInput } from 'shiki';
2
- import manifest from '../vendor/shiki/manifest.json';
3
- export type AvailableLanguage = keyof typeof manifest.langs;
4
- export declare const Languages: Record<string, "typescript" | "abap" | "actionscript-3" | "ada" | "adoc" | "angular-expression" | "angular-html" | "angular-inline-style" | "angular-inline-template" | "angular-let-declaration" | "angular-template-blocks" | "angular-template" | "angular-ts" | "apache" | "apex" | "apl" | "applescript" | "ara" | "asciidoc" | "asm" | "astro" | "awk" | "ballerina" | "bash" | "bat" | "batch" | "be" | "beancount" | "berry" | "bibtex" | "bicep" | "blade" | "c" | "cadence" | "cdc" | "clarity" | "clj" | "clojure" | "closure-templates" | "cmake" | "cmd" | "cobol" | "codeowners" | "codeql" | "coffee" | "coffeescript" | "common-lisp" | "console" | "coq" | "cpp-macro" | "cpp" | "cql" | "crystal" | "cs" | "csharp" | "css" | "csv" | "cue" | "cypher" | "d" | "dart" | "dax" | "desktop" | "diff" | "docker" | "dockerfile" | "dotenv" | "dream-maker" | "edge" | "elisp" | "elixir" | "elm" | "emacs-lisp" | "erb" | "erl" | "erlang" | "es-tag-css" | "es-tag-glsl" | "es-tag-html" | "es-tag-sql" | "es-tag-xml" | "f" | "f03" | "f08" | "f18" | "f77" | "f90" | "f95" | "fennel" | "fish" | "fluent" | "for" | "fortran-fixed-form" | "fortran-free-form" | "fs" | "fsharp" | "fsl" | "ftl" | "gdresource" | "gdscript" | "gdshader" | "genie" | "gherkin" | "git-commit" | "git-rebase" | "gjs" | "gleam" | "glimmer-js" | "glimmer-ts" | "glsl" | "gnuplot" | "go" | "gql" | "graphql" | "groovy" | "gts" | "hack" | "haml" | "handlebars" | "haskell" | "haxe" | "hbs" | "hcl" | "hjson" | "hlsl" | "hs" | "html-derivative" | "html" | "http" | "hxml" | "hy" | "imba" | "ini" | "jade" | "java" | "javascript" | "jinja-html" | "jinja" | "jison" | "jl" | "js" | "json" | "json5" | "jsonc" | "jsonl" | "jsonnet" | "jssm" | "jsx" | "julia" | "kotlin" | "kql" | "kt" | "kts" | "kusto" | "latex" | "lean" | "lean4" | "less" | "liquid" | "lisp" | "lit" | "log" | "logo" | "lua" | "luau" | "make" | "makefile" | "markdown-vue" | "markdown" | "marko" | "matlab" | "md" | "mdc" | "mdx" | "mediawiki" | "mermaid" | "mips" | "mipsasm" | "mmd" | "mojo" | "move" | "nar" | "narrat" | "nextflow" | "nf" | "nginx" | "nim" | "nix" | "nu" | "nushell" | "objc" | "objective-c" | "objective-cpp" | "ocaml" | "pascal" | "perl" | "perl6" | "php" | "plsql" | "po" | "postcss" | "pot" | "potx" | "powerquery" | "powershell" | "prisma" | "prolog" | "properties" | "proto" | "protobuf" | "ps" | "ps1" | "pug" | "puppet" | "purescript" | "py" | "python" | "ql" | "qml" | "qmldir" | "qss" | "r" | "racket" | "raku" | "razor" | "rb" | "reg" | "regex" | "regexp" | "rel" | "riscv" | "rs" | "rst" | "ruby" | "rust" | "sas" | "sass" | "scala" | "scheme" | "scss" | "sh" | "shader" | "shaderlab" | "shell" | "shellscript" | "shellsession" | "smalltalk" | "solidity" | "soy" | "sparql" | "spl" | "splunk" | "sql" | "ssh-config" | "stata" | "styl" | "stylus" | "svelte" | "swift" | "system-verilog" | "systemd" | "tasl" | "tcl" | "templ" | "terraform" | "tex" | "tf" | "tfvars" | "toml" | "ts-tags" | "ts" | "tsp" | "tsv" | "tsx" | "turtle" | "twig" | "typ" | "typespec" | "typst" | "v" | "vala" | "vb" | "verilog" | "vhdl" | "vim" | "viml" | "vimscript" | "vue-directives" | "vue-html" | "vue-interpolations" | "vue-sfc-style-variable-injection" | "vue" | "vy" | "vyper" | "wasm" | "wenyan" | "wgsl" | "wiki" | "wikitext" | "wl" | "wolfram" | "xml" | "xsl" | "yaml" | "yml" | "zenscript" | "zig" | "zsh">;
5
- export declare function getLanguage(langName: AvailableLanguage): Promise<LanguageInput>;
6
- //# sourceMappingURL=langs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"langs.d.ts","sourceRoot":"","sources":["../../../src/langs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,QAAQ,MAAM,+BAA+B,CAAA;AAEpD,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,QAAQ,CAAC,KAAK,CAAA;AAE3D,eAAO,MAAM,SAAS,8wGAGqB,CAAA;AAE3C,wBAAsB,WAAW,CAAC,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC,CASrF"}
@@ -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,EAA+B,MAAM,OAAO,CAAA;AAU1E,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 +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,6 +0,0 @@
1
- import type { ThemeInput } from 'shiki';
2
- import manifest from '../vendor/shiki/manifest.json';
3
- export type AvailableTheme = keyof typeof manifest.themes;
4
- export declare const Themes: Record<string, "github-dark" | "andromeeda" | "aurora-x" | "ayu-dark" | "catppuccin-frappe" | "catppuccin-latte" | "catppuccin-macchiato" | "catppuccin-mocha" | "dark-plus" | "dracula-soft" | "dracula" | "everforest-dark" | "everforest-light" | "github-dark-default" | "github-dark-dimmed" | "github-dark-high-contrast" | "github-light-default" | "github-light-high-contrast" | "github-light" | "houston" | "kanagawa-dragon" | "kanagawa-lotus" | "kanagawa-wave" | "laserwave" | "light-plus" | "material-theme-darker" | "material-theme-lighter" | "material-theme-ocean" | "material-theme-palenight" | "material-theme" | "min-dark" | "min-light" | "monokai" | "night-owl" | "nord" | "one-dark-pro" | "one-light" | "plastic" | "poimandres" | "red" | "rose-pine-dawn" | "rose-pine-moon" | "rose-pine" | "slack-dark" | "slack-ochin" | "snazzy-light" | "solarized-dark" | "solarized-light" | "synthwave-84" | "tokyo-night" | "vesper" | "vitesse-black" | "vitesse-dark" | "vitesse-light">;
5
- export declare function getTheme(themeName: AvailableTheme): Promise<ThemeInput>;
6
- //# sourceMappingURL=themes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../../src/themes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,QAAQ,MAAM,+BAA+B,CAAA;AAEpD,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,QAAQ,CAAC,MAAM,CAAA;AAEzD,eAAO,MAAM,MAAM,u9BAGqB,CAAA;AAExC,wBAAsB,QAAQ,CAAC,SAAS,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC,CAS7E"}
@@ -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 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../../src/utils/string.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEzC,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,SAAS,GAAE,MAAW,GAAG,MAAM,CAMxF;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,MAAM,UAG7D;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAqB3D"}
package/src/langs.ts DELETED
@@ -1,20 +0,0 @@
1
- import type { LanguageInput } from 'shiki'
2
- import manifest from '../vendor/shiki/manifest.json'
3
-
4
- export type AvailableLanguage = keyof typeof manifest.langs
5
-
6
- export const Languages = Object.keys(manifest.langs).reduce((acc, lang) => {
7
- const key = lang.replace(/-/g, '_').toUpperCase()
8
- return { ...acc, [key]: lang as AvailableLanguage }
9
- }, {} as Record<string, AvailableLanguage>)
10
-
11
- export async function getLanguage(langName: AvailableLanguage): Promise<LanguageInput> {
12
- try {
13
- const lang = await import(`../vendor/shiki/langs/${String(langName)}.js`)
14
- return lang.default
15
- }
16
- catch (err) {
17
- const error = err instanceof Error ? err.message : String(err)
18
- throw new Error(`Language '${String(langName)}' failed to load: ${error}`)
19
- }
20
- }
package/src/themes.ts DELETED
@@ -1,20 +0,0 @@
1
- import type { ThemeInput } from 'shiki'
2
- import manifest from '../vendor/shiki/manifest.json'
3
-
4
- export type AvailableTheme = keyof typeof manifest.themes
5
-
6
- export const Themes = Object.keys(manifest.themes).reduce<Record<string, AvailableTheme>>((acc, theme) => {
7
- const key = (theme as AvailableTheme).replace(/-/g, '_').toUpperCase()
8
- return { ...acc, [key]: theme as AvailableTheme }
9
- }, {} as Record<string, AvailableTheme>)
10
-
11
- export async function getTheme(themeName: AvailableTheme): Promise<ThemeInput> {
12
- try {
13
- const theme = await import(`../vendor/shiki/themes/${String(themeName)}.js`)
14
- return theme.default
15
- }
16
- catch (err) {
17
- const error = err instanceof Error ? err.message : String(err)
18
- throw new Error(`Theme '${String(themeName)}' failed to load: ${error}`)
19
- }
20
- }
File without changes
File without changes
File without changes