@kg-ui/kg-ui-plus 0.0.1 → 0.0.3

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 (150) hide show
  1. package/README.md +3 -3
  2. package/dist/es/KgCopilot/CopiContent/AnswerHead.vue.mjs +16 -0
  3. package/dist/es/KgCopilot/CopiContent/AnswerHead.vue2.mjs +4 -0
  4. package/dist/es/KgCopilot/CopiContent/UserHead.vue.mjs +26 -0
  5. package/dist/es/KgCopilot/CopiContent/UserHead.vue2.mjs +4 -0
  6. package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue.mjs +7 -0
  7. package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue2.mjs +49 -0
  8. package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue3.mjs +4 -0
  9. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue.mjs +7 -0
  10. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue2.mjs +94 -0
  11. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue3.mjs +4 -0
  12. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue.mjs +7 -0
  13. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue2.mjs +33 -0
  14. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue3.mjs +4 -0
  15. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue.mjs +7 -0
  16. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue2.mjs +140 -0
  17. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue3.mjs +4 -0
  18. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue.mjs +7 -0
  19. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue2.mjs +131 -0
  20. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue3.mjs +4 -0
  21. package/dist/es/KgCopilot/CopiFooter/index.vue.mjs +7 -0
  22. package/dist/es/KgCopilot/CopiFooter/index.vue2.mjs +21 -0
  23. package/dist/es/KgCopilot/CopiFooter/index.vue3.mjs +4 -0
  24. package/dist/es/KgCopilot/dialogue/index.vue.mjs +7 -0
  25. package/dist/es/KgCopilot/dialogue/index.vue2.mjs +131 -0
  26. package/dist/es/KgCopilot/dialogue/index.vue3.mjs +4 -0
  27. package/dist/es/KgCopilot/dialogue/mdInCode.mjs +56 -0
  28. package/dist/es/KgCopilot/dialogue/readMd.vue.mjs +7 -0
  29. package/dist/es/KgCopilot/dialogue/readMd.vue2.mjs +87 -0
  30. package/dist/es/KgCopilot/dialogue/readMd.vue3.mjs +4 -0
  31. package/dist/es/KgCopilot/index.vue.mjs +7 -0
  32. package/dist/es/KgCopilot/index.vue2.mjs +49 -0
  33. package/dist/es/KgCopilot/index.vue3.mjs +4 -0
  34. package/dist/es/_virtual/___vite-browser-external.mjs +6 -0
  35. package/dist/es/_virtual/__vite-browser-external.mjs +4 -0
  36. package/dist/es/_virtual/_commonjsHelpers.mjs +34 -0
  37. package/dist/es/_virtual/_plugin-vue_export-helper.mjs +10 -0
  38. package/dist/es/_virtual/index.mjs +13 -0
  39. package/dist/es/api/project.mjs +51 -0
  40. package/dist/es/directives/heighlight/index.mjs +69 -0
  41. package/dist/es/directives/index.mjs +4 -0
  42. package/dist/es/home/LFilter/FilterArea.vue.mjs +7 -0
  43. package/dist/es/home/LFilter/FilterArea.vue2.mjs +507 -0
  44. package/dist/es/home/LFilter/FilterArea.vue3.mjs +4 -0
  45. package/dist/es/home/LFilter/FilterHead.vue.mjs +129 -0
  46. package/dist/es/home/LFilter/FilterHead.vue2.mjs +4 -0
  47. package/dist/es/home/LFilter/FilterItem.vue.mjs +7 -0
  48. package/dist/es/home/LFilter/FilterItem.vue2.mjs +114 -0
  49. package/dist/es/home/LFilter/FilterItem.vue3.mjs +4 -0
  50. package/dist/es/home/LFilter/FilterItemIcon.vue.mjs +7 -0
  51. package/dist/es/home/LFilter/FilterItemIcon.vue2.mjs +171 -0
  52. package/dist/es/home/LFilter/FilterItemIcon.vue3.mjs +4 -0
  53. package/dist/es/home/LFilter/index.vue.mjs +17 -0
  54. package/dist/es/home/LFilter/index.vue2.mjs +4 -0
  55. package/dist/es/home/LProject/index.vue.mjs +7 -0
  56. package/dist/es/home/LProject/index.vue2.mjs +70 -0
  57. package/dist/es/home/LProject/index.vue3.mjs +4 -0
  58. package/dist/es/home/index.vue.mjs +7 -0
  59. package/dist/es/home/index.vue2.mjs +80 -0
  60. package/dist/es/home/index.vue3.mjs +4 -0
  61. package/dist/es/index.mjs +26 -0
  62. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/check.mjs +8 -0
  63. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/circle-plus.mjs +8 -0
  64. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/close.mjs +8 -0
  65. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/microphone.mjs +8 -0
  66. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/paperclip.mjs +8 -0
  67. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/promotion.mjs +8 -0
  68. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/upload.mjs +8 -0
  69. package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/copy-simple.mjs +8 -0
  70. package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/speaker-high-light.mjs +8 -0
  71. package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/thumbs-down-thin.mjs +8 -0
  72. package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/thumbs-up-thin.mjs +8 -0
  73. package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/warning-bold.mjs +8 -0
  74. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/add-line.mjs +8 -0
  75. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/arrow-down-s-line.mjs +8 -0
  76. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/arrow-up-s-line.mjs +8 -0
  77. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/check-fill.mjs +8 -0
  78. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/download-line.mjs +8 -0
  79. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/more-2-fill.mjs +8 -0
  80. package/dist/es/node_modules/.pnpm/@pureadmin_utils@1.8.5_vue@3.2.45/node_modules/@pureadmin/utils/dist/index.mjs +70 -0
  81. package/dist/es/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.mjs +16 -0
  82. package/dist/es/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.mjs +36 -0
  83. package/dist/es/node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.mjs +48 -0
  84. package/dist/es/node_modules/.pnpm/dompurify@3.0.10/node_modules/dompurify/dist/purify.es.mjs +949 -0
  85. package/dist/es/node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.mjs +22 -0
  86. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.mjs +4 -0
  87. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.mjs +4 -0
  88. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.mjs +4 -0
  89. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.mjs +4 -0
  90. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.mjs +4 -0
  91. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.mjs +4 -0
  92. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.mjs +4 -0
  93. package/dist/es/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.mjs +72 -0
  94. package/dist/es/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.mjs +6 -0
  95. package/dist/es/node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.mjs +320 -0
  96. package/dist/es/node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.mjs +14 -0
  97. package/dist/es/node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.mjs +19 -0
  98. package/dist/es/node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.mjs +11 -0
  99. package/dist/es/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.mjs +21 -0
  100. package/dist/es/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.mjs +48 -0
  101. package/dist/es/node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.mjs +8 -0
  102. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/core.mjs +5 -0
  103. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/apache.mjs +91 -0
  104. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/bash.mjs +377 -0
  105. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/basic.mjs +221 -0
  106. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/c.mjs +280 -0
  107. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/css.mjs +732 -0
  108. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dart.mjs +247 -0
  109. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/django.mjs +47 -0
  110. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dns.mjs +71 -0
  111. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dos.mjs +160 -0
  112. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dust.mjs +38 -0
  113. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/erlang.mjs +176 -0
  114. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/go.mjs +135 -0
  115. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/http.mjs +89 -0
  116. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/java.mjs +254 -0
  117. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/javascript.mjs +698 -0
  118. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/json.mjs +40 -0
  119. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/markdown.mjs +227 -0
  120. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/nginx.mjs +144 -0
  121. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/php.mjs +589 -0
  122. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/python.mjs +414 -0
  123. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/ruby.mjs +414 -0
  124. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/stylus.mjs +766 -0
  125. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/swift.mjs +832 -0
  126. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/typescript.mjs +788 -0
  127. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/xml.mjs +227 -0
  128. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/lib/core.mjs +1580 -0
  129. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/styles/paraiso-light.css.mjs +4 -0
  130. package/dist/es/node_modules/.pnpm/marked@12.0.1/node_modules/marked/lib/marked.esm.mjs +2045 -0
  131. package/dist/es/node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/index.mjs +514 -0
  132. package/dist/es/node_modules/.pnpm/pinyin-match@1.2.4/node_modules/pinyin-match/es/main.mjs +124 -0
  133. package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/formats.mjs +22 -0
  134. package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/index.mjs +14 -0
  135. package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/parse.mjs +199 -0
  136. package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/stringify.mjs +262 -0
  137. package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/utils.mjs +196 -0
  138. package/dist/es/node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.mjs +54 -0
  139. package/dist/es/node_modules/.pnpm/side-channel@1.0.6/node_modules/side-channel/index.mjs +115 -0
  140. package/dist/es/store/index.mjs +8 -0
  141. package/dist/es/store/modules/copilot.mjs +111 -0
  142. package/dist/es/store/modules/filters.mjs +346 -0
  143. package/dist/es/store/modules/types.mjs +19 -0
  144. package/dist/es/style/index.scss.mjs +4 -0
  145. package/dist/es/style/tailwind.css.mjs +4 -0
  146. package/dist/es/style.css +1 -0
  147. package/dist/es/utils/home.mjs +129 -0
  148. package/dist/es/utils/http/index.mjs +90 -0
  149. package/dist/es/utils/message.mjs +42 -0
  150. package/package.json +23 -32
@@ -0,0 +1,91 @@
1
+ function apache(hljs) {
2
+ const NUMBER_REF = {
3
+ className: "number",
4
+ begin: /[$%]\d+/
5
+ };
6
+ const NUMBER = {
7
+ className: "number",
8
+ begin: /\b\d+/
9
+ };
10
+ const IP_ADDRESS = {
11
+ className: "number",
12
+ begin: /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?/
13
+ };
14
+ const PORT_NUMBER = {
15
+ className: "number",
16
+ begin: /:\d{1,5}/
17
+ };
18
+ return {
19
+ name: "Apache config",
20
+ aliases: ["apacheconf"],
21
+ case_insensitive: true,
22
+ contains: [
23
+ hljs.HASH_COMMENT_MODE,
24
+ {
25
+ className: "section",
26
+ begin: /<\/?/,
27
+ end: />/,
28
+ contains: [
29
+ IP_ADDRESS,
30
+ PORT_NUMBER,
31
+ // low relevance prevents us from claming XML/HTML where this rule would
32
+ // match strings inside of XML tags
33
+ hljs.inherit(hljs.QUOTE_STRING_MODE, { relevance: 0 })
34
+ ]
35
+ },
36
+ {
37
+ className: "attribute",
38
+ begin: /\w+/,
39
+ relevance: 0,
40
+ // keywords aren’t needed for highlighting per se, they only boost relevance
41
+ // for a very generally defined mode (starts with a word, ends with line-end
42
+ keywords: { _: [
43
+ "order",
44
+ "deny",
45
+ "allow",
46
+ "setenv",
47
+ "rewriterule",
48
+ "rewriteengine",
49
+ "rewritecond",
50
+ "documentroot",
51
+ "sethandler",
52
+ "errordocument",
53
+ "loadmodule",
54
+ "options",
55
+ "header",
56
+ "listen",
57
+ "serverroot",
58
+ "servername"
59
+ ] },
60
+ starts: {
61
+ end: /$/,
62
+ relevance: 0,
63
+ keywords: { literal: "on off all deny allow" },
64
+ contains: [
65
+ {
66
+ className: "meta",
67
+ begin: /\s\[/,
68
+ end: /\]$/
69
+ },
70
+ {
71
+ className: "variable",
72
+ begin: /[\$%]\{/,
73
+ end: /\}/,
74
+ contains: [
75
+ "self",
76
+ NUMBER_REF
77
+ ]
78
+ },
79
+ IP_ADDRESS,
80
+ NUMBER,
81
+ hljs.QUOTE_STRING_MODE
82
+ ]
83
+ }
84
+ }
85
+ ],
86
+ illegal: /\S/
87
+ };
88
+ }
89
+ export {
90
+ apache as default
91
+ };
@@ -0,0 +1,377 @@
1
+ function bash(hljs) {
2
+ const regex = hljs.regex;
3
+ const VAR = {};
4
+ const BRACED_VAR = {
5
+ begin: /\$\{/,
6
+ end: /\}/,
7
+ contains: [
8
+ "self",
9
+ {
10
+ begin: /:-/,
11
+ contains: [VAR]
12
+ }
13
+ // default values
14
+ ]
15
+ };
16
+ Object.assign(VAR, {
17
+ className: "variable",
18
+ variants: [
19
+ { begin: regex.concat(
20
+ /\$[\w\d#@][\w\d_]*/,
21
+ // negative look-ahead tries to avoid matching patterns that are not
22
+ // Perl at all like $ident$, @ident@, etc.
23
+ `(?![\\w\\d])(?![$])`
24
+ ) },
25
+ BRACED_VAR
26
+ ]
27
+ });
28
+ const SUBST = {
29
+ className: "subst",
30
+ begin: /\$\(/,
31
+ end: /\)/,
32
+ contains: [hljs.BACKSLASH_ESCAPE]
33
+ };
34
+ const HERE_DOC = {
35
+ begin: /<<-?\s*(?=\w+)/,
36
+ starts: { contains: [
37
+ hljs.END_SAME_AS_BEGIN({
38
+ begin: /(\w+)/,
39
+ end: /(\w+)/,
40
+ className: "string"
41
+ })
42
+ ] }
43
+ };
44
+ const QUOTE_STRING = {
45
+ className: "string",
46
+ begin: /"/,
47
+ end: /"/,
48
+ contains: [
49
+ hljs.BACKSLASH_ESCAPE,
50
+ VAR,
51
+ SUBST
52
+ ]
53
+ };
54
+ SUBST.contains.push(QUOTE_STRING);
55
+ const ESCAPED_QUOTE = {
56
+ match: /\\"/
57
+ };
58
+ const APOS_STRING = {
59
+ className: "string",
60
+ begin: /'/,
61
+ end: /'/
62
+ };
63
+ const ESCAPED_APOS = {
64
+ match: /\\'/
65
+ };
66
+ const ARITHMETIC = {
67
+ begin: /\$?\(\(/,
68
+ end: /\)\)/,
69
+ contains: [
70
+ {
71
+ begin: /\d+#[0-9a-f]+/,
72
+ className: "number"
73
+ },
74
+ hljs.NUMBER_MODE,
75
+ VAR
76
+ ]
77
+ };
78
+ const SH_LIKE_SHELLS = [
79
+ "fish",
80
+ "bash",
81
+ "zsh",
82
+ "sh",
83
+ "csh",
84
+ "ksh",
85
+ "tcsh",
86
+ "dash",
87
+ "scsh"
88
+ ];
89
+ const KNOWN_SHEBANG = hljs.SHEBANG({
90
+ binary: `(${SH_LIKE_SHELLS.join("|")})`,
91
+ relevance: 10
92
+ });
93
+ const FUNCTION = {
94
+ className: "function",
95
+ begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/,
96
+ returnBegin: true,
97
+ contains: [hljs.inherit(hljs.TITLE_MODE, { begin: /\w[\w\d_]*/ })],
98
+ relevance: 0
99
+ };
100
+ const KEYWORDS = [
101
+ "if",
102
+ "then",
103
+ "else",
104
+ "elif",
105
+ "fi",
106
+ "for",
107
+ "while",
108
+ "until",
109
+ "in",
110
+ "do",
111
+ "done",
112
+ "case",
113
+ "esac",
114
+ "function",
115
+ "select"
116
+ ];
117
+ const LITERALS = [
118
+ "true",
119
+ "false"
120
+ ];
121
+ const PATH_MODE = { match: /(\/[a-z._-]+)+/ };
122
+ const SHELL_BUILT_INS = [
123
+ "break",
124
+ "cd",
125
+ "continue",
126
+ "eval",
127
+ "exec",
128
+ "exit",
129
+ "export",
130
+ "getopts",
131
+ "hash",
132
+ "pwd",
133
+ "readonly",
134
+ "return",
135
+ "shift",
136
+ "test",
137
+ "times",
138
+ "trap",
139
+ "umask",
140
+ "unset"
141
+ ];
142
+ const BASH_BUILT_INS = [
143
+ "alias",
144
+ "bind",
145
+ "builtin",
146
+ "caller",
147
+ "command",
148
+ "declare",
149
+ "echo",
150
+ "enable",
151
+ "help",
152
+ "let",
153
+ "local",
154
+ "logout",
155
+ "mapfile",
156
+ "printf",
157
+ "read",
158
+ "readarray",
159
+ "source",
160
+ "type",
161
+ "typeset",
162
+ "ulimit",
163
+ "unalias"
164
+ ];
165
+ const ZSH_BUILT_INS = [
166
+ "autoload",
167
+ "bg",
168
+ "bindkey",
169
+ "bye",
170
+ "cap",
171
+ "chdir",
172
+ "clone",
173
+ "comparguments",
174
+ "compcall",
175
+ "compctl",
176
+ "compdescribe",
177
+ "compfiles",
178
+ "compgroups",
179
+ "compquote",
180
+ "comptags",
181
+ "comptry",
182
+ "compvalues",
183
+ "dirs",
184
+ "disable",
185
+ "disown",
186
+ "echotc",
187
+ "echoti",
188
+ "emulate",
189
+ "fc",
190
+ "fg",
191
+ "float",
192
+ "functions",
193
+ "getcap",
194
+ "getln",
195
+ "history",
196
+ "integer",
197
+ "jobs",
198
+ "kill",
199
+ "limit",
200
+ "log",
201
+ "noglob",
202
+ "popd",
203
+ "print",
204
+ "pushd",
205
+ "pushln",
206
+ "rehash",
207
+ "sched",
208
+ "setcap",
209
+ "setopt",
210
+ "stat",
211
+ "suspend",
212
+ "ttyctl",
213
+ "unfunction",
214
+ "unhash",
215
+ "unlimit",
216
+ "unsetopt",
217
+ "vared",
218
+ "wait",
219
+ "whence",
220
+ "where",
221
+ "which",
222
+ "zcompile",
223
+ "zformat",
224
+ "zftp",
225
+ "zle",
226
+ "zmodload",
227
+ "zparseopts",
228
+ "zprof",
229
+ "zpty",
230
+ "zregexparse",
231
+ "zsocket",
232
+ "zstyle",
233
+ "ztcp"
234
+ ];
235
+ const GNU_CORE_UTILS = [
236
+ "chcon",
237
+ "chgrp",
238
+ "chown",
239
+ "chmod",
240
+ "cp",
241
+ "dd",
242
+ "df",
243
+ "dir",
244
+ "dircolors",
245
+ "ln",
246
+ "ls",
247
+ "mkdir",
248
+ "mkfifo",
249
+ "mknod",
250
+ "mktemp",
251
+ "mv",
252
+ "realpath",
253
+ "rm",
254
+ "rmdir",
255
+ "shred",
256
+ "sync",
257
+ "touch",
258
+ "truncate",
259
+ "vdir",
260
+ "b2sum",
261
+ "base32",
262
+ "base64",
263
+ "cat",
264
+ "cksum",
265
+ "comm",
266
+ "csplit",
267
+ "cut",
268
+ "expand",
269
+ "fmt",
270
+ "fold",
271
+ "head",
272
+ "join",
273
+ "md5sum",
274
+ "nl",
275
+ "numfmt",
276
+ "od",
277
+ "paste",
278
+ "ptx",
279
+ "pr",
280
+ "sha1sum",
281
+ "sha224sum",
282
+ "sha256sum",
283
+ "sha384sum",
284
+ "sha512sum",
285
+ "shuf",
286
+ "sort",
287
+ "split",
288
+ "sum",
289
+ "tac",
290
+ "tail",
291
+ "tr",
292
+ "tsort",
293
+ "unexpand",
294
+ "uniq",
295
+ "wc",
296
+ "arch",
297
+ "basename",
298
+ "chroot",
299
+ "date",
300
+ "dirname",
301
+ "du",
302
+ "echo",
303
+ "env",
304
+ "expr",
305
+ "factor",
306
+ // "false", // keyword literal already
307
+ "groups",
308
+ "hostid",
309
+ "id",
310
+ "link",
311
+ "logname",
312
+ "nice",
313
+ "nohup",
314
+ "nproc",
315
+ "pathchk",
316
+ "pinky",
317
+ "printenv",
318
+ "printf",
319
+ "pwd",
320
+ "readlink",
321
+ "runcon",
322
+ "seq",
323
+ "sleep",
324
+ "stat",
325
+ "stdbuf",
326
+ "stty",
327
+ "tee",
328
+ "test",
329
+ "timeout",
330
+ // "true", // keyword literal already
331
+ "tty",
332
+ "uname",
333
+ "unlink",
334
+ "uptime",
335
+ "users",
336
+ "who",
337
+ "whoami",
338
+ "yes"
339
+ ];
340
+ return {
341
+ name: "Bash",
342
+ aliases: ["sh"],
343
+ keywords: {
344
+ $pattern: /\b[a-z][a-z0-9._-]+\b/,
345
+ keyword: KEYWORDS,
346
+ literal: LITERALS,
347
+ built_in: [
348
+ ...SHELL_BUILT_INS,
349
+ ...BASH_BUILT_INS,
350
+ // Shell modifiers
351
+ "set",
352
+ "shopt",
353
+ ...ZSH_BUILT_INS,
354
+ ...GNU_CORE_UTILS
355
+ ]
356
+ },
357
+ contains: [
358
+ KNOWN_SHEBANG,
359
+ // to catch known shells and boost relevancy
360
+ hljs.SHEBANG(),
361
+ // to catch unknown shells but still highlight the shebang
362
+ FUNCTION,
363
+ ARITHMETIC,
364
+ hljs.HASH_COMMENT_MODE,
365
+ HERE_DOC,
366
+ PATH_MODE,
367
+ QUOTE_STRING,
368
+ ESCAPED_QUOTE,
369
+ APOS_STRING,
370
+ ESCAPED_APOS,
371
+ VAR
372
+ ]
373
+ };
374
+ }
375
+ export {
376
+ bash as default
377
+ };
@@ -0,0 +1,221 @@
1
+ function basic(hljs) {
2
+ const KEYWORDS = [
3
+ "ABS",
4
+ "ASC",
5
+ "AND",
6
+ "ATN",
7
+ "AUTO|0",
8
+ "BEEP",
9
+ "BLOAD|10",
10
+ "BSAVE|10",
11
+ "CALL",
12
+ "CALLS",
13
+ "CDBL",
14
+ "CHAIN",
15
+ "CHDIR",
16
+ "CHR$|10",
17
+ "CINT",
18
+ "CIRCLE",
19
+ "CLEAR",
20
+ "CLOSE",
21
+ "CLS",
22
+ "COLOR",
23
+ "COM",
24
+ "COMMON",
25
+ "CONT",
26
+ "COS",
27
+ "CSNG",
28
+ "CSRLIN",
29
+ "CVD",
30
+ "CVI",
31
+ "CVS",
32
+ "DATA",
33
+ "DATE$",
34
+ "DEFDBL",
35
+ "DEFINT",
36
+ "DEFSNG",
37
+ "DEFSTR",
38
+ "DEF|0",
39
+ "SEG",
40
+ "USR",
41
+ "DELETE",
42
+ "DIM",
43
+ "DRAW",
44
+ "EDIT",
45
+ "END",
46
+ "ENVIRON",
47
+ "ENVIRON$",
48
+ "EOF",
49
+ "EQV",
50
+ "ERASE",
51
+ "ERDEV",
52
+ "ERDEV$",
53
+ "ERL",
54
+ "ERR",
55
+ "ERROR",
56
+ "EXP",
57
+ "FIELD",
58
+ "FILES",
59
+ "FIX",
60
+ "FOR|0",
61
+ "FRE",
62
+ "GET",
63
+ "GOSUB|10",
64
+ "GOTO",
65
+ "HEX$",
66
+ "IF",
67
+ "THEN",
68
+ "ELSE|0",
69
+ "INKEY$",
70
+ "INP",
71
+ "INPUT",
72
+ "INPUT#",
73
+ "INPUT$",
74
+ "INSTR",
75
+ "IMP",
76
+ "INT",
77
+ "IOCTL",
78
+ "IOCTL$",
79
+ "KEY",
80
+ "ON",
81
+ "OFF",
82
+ "LIST",
83
+ "KILL",
84
+ "LEFT$",
85
+ "LEN",
86
+ "LET",
87
+ "LINE",
88
+ "LLIST",
89
+ "LOAD",
90
+ "LOC",
91
+ "LOCATE",
92
+ "LOF",
93
+ "LOG",
94
+ "LPRINT",
95
+ "USING",
96
+ "LSET",
97
+ "MERGE",
98
+ "MID$",
99
+ "MKDIR",
100
+ "MKD$",
101
+ "MKI$",
102
+ "MKS$",
103
+ "MOD",
104
+ "NAME",
105
+ "NEW",
106
+ "NEXT",
107
+ "NOISE",
108
+ "NOT",
109
+ "OCT$",
110
+ "ON",
111
+ "OR",
112
+ "PEN",
113
+ "PLAY",
114
+ "STRIG",
115
+ "OPEN",
116
+ "OPTION",
117
+ "BASE",
118
+ "OUT",
119
+ "PAINT",
120
+ "PALETTE",
121
+ "PCOPY",
122
+ "PEEK",
123
+ "PMAP",
124
+ "POINT",
125
+ "POKE",
126
+ "POS",
127
+ "PRINT",
128
+ "PRINT]",
129
+ "PSET",
130
+ "PRESET",
131
+ "PUT",
132
+ "RANDOMIZE",
133
+ "READ",
134
+ "REM",
135
+ "RENUM",
136
+ "RESET|0",
137
+ "RESTORE",
138
+ "RESUME",
139
+ "RETURN|0",
140
+ "RIGHT$",
141
+ "RMDIR",
142
+ "RND",
143
+ "RSET",
144
+ "RUN",
145
+ "SAVE",
146
+ "SCREEN",
147
+ "SGN",
148
+ "SHELL",
149
+ "SIN",
150
+ "SOUND",
151
+ "SPACE$",
152
+ "SPC",
153
+ "SQR",
154
+ "STEP",
155
+ "STICK",
156
+ "STOP",
157
+ "STR$",
158
+ "STRING$",
159
+ "SWAP",
160
+ "SYSTEM",
161
+ "TAB",
162
+ "TAN",
163
+ "TIME$",
164
+ "TIMER",
165
+ "TROFF",
166
+ "TRON",
167
+ "TO",
168
+ "USR",
169
+ "VAL",
170
+ "VARPTR",
171
+ "VARPTR$",
172
+ "VIEW",
173
+ "WAIT",
174
+ "WHILE",
175
+ "WEND",
176
+ "WIDTH",
177
+ "WINDOW",
178
+ "WRITE",
179
+ "XOR"
180
+ ];
181
+ return {
182
+ name: "BASIC",
183
+ case_insensitive: true,
184
+ illegal: "^.",
185
+ // Support explicitly typed variables that end with $%! or #.
186
+ keywords: {
187
+ $pattern: "[a-zA-Z][a-zA-Z0-9_$%!#]*",
188
+ keyword: KEYWORDS
189
+ },
190
+ contains: [
191
+ hljs.QUOTE_STRING_MODE,
192
+ hljs.COMMENT("REM", "$", { relevance: 10 }),
193
+ hljs.COMMENT("'", "$", { relevance: 0 }),
194
+ {
195
+ // Match line numbers
196
+ className: "symbol",
197
+ begin: "^[0-9]+ ",
198
+ relevance: 10
199
+ },
200
+ {
201
+ // Match typed numeric constants (1000, 12.34!, 1.2e5, 1.5#, 1.2D2)
202
+ className: "number",
203
+ begin: "\\b\\d+(\\.\\d+)?([edED]\\d+)?[#!]?",
204
+ relevance: 0
205
+ },
206
+ {
207
+ // Match hexadecimal numbers (&Hxxxx)
208
+ className: "number",
209
+ begin: "(&[hH][0-9a-fA-F]{1,4})"
210
+ },
211
+ {
212
+ // Match octal numbers (&Oxxxxxx)
213
+ className: "number",
214
+ begin: "(&[oO][0-7]{1,6})"
215
+ }
216
+ ]
217
+ };
218
+ }
219
+ export {
220
+ basic as default
221
+ };