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

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 (156) hide show
  1. package/README.md +2 -38
  2. package/package.json +1 -2
  3. package/dist/es/KgCopilot/CopiContent/AnswerHead.vue.mjs +0 -16
  4. package/dist/es/KgCopilot/CopiContent/AnswerHead.vue2.mjs +0 -4
  5. package/dist/es/KgCopilot/CopiContent/UserHead.vue.mjs +0 -26
  6. package/dist/es/KgCopilot/CopiContent/UserHead.vue2.mjs +0 -4
  7. package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue.mjs +0 -7
  8. package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue2.mjs +0 -49
  9. package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue3.mjs +0 -4
  10. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue.mjs +0 -7
  11. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue2.mjs +0 -94
  12. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue3.mjs +0 -4
  13. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue.mjs +0 -7
  14. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue2.mjs +0 -33
  15. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue3.mjs +0 -4
  16. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue.mjs +0 -7
  17. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue2.mjs +0 -140
  18. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue3.mjs +0 -4
  19. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue.mjs +0 -7
  20. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue2.mjs +0 -131
  21. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue3.mjs +0 -4
  22. package/dist/es/KgCopilot/CopiFooter/index.vue.mjs +0 -7
  23. package/dist/es/KgCopilot/CopiFooter/index.vue2.mjs +0 -21
  24. package/dist/es/KgCopilot/CopiFooter/index.vue3.mjs +0 -4
  25. package/dist/es/KgCopilot/dialogue.vue.mjs +0 -7
  26. package/dist/es/KgCopilot/dialogue.vue2.mjs +0 -131
  27. package/dist/es/KgCopilot/dialogue.vue3.mjs +0 -4
  28. package/dist/es/KgCopilot/index.vue.mjs +0 -7
  29. package/dist/es/KgCopilot/index.vue2.mjs +0 -49
  30. package/dist/es/KgCopilot/index.vue3.mjs +0 -4
  31. package/dist/es/KgCopilot/mdInCode.mjs +0 -56
  32. package/dist/es/KgCopilot/readMd.vue.mjs +0 -7
  33. package/dist/es/KgCopilot/readMd.vue2.mjs +0 -87
  34. package/dist/es/KgCopilot/readMd.vue3.mjs +0 -4
  35. package/dist/es/ReIcon/index.mjs +0 -11
  36. package/dist/es/ReIcon/src/iconfont.mjs +0 -46
  37. package/dist/es/ReIcon/src/iconifyIconOffline.mjs +0 -30
  38. package/dist/es/ReIcon/src/iconifyIconOnline.mjs +0 -29
  39. package/dist/es/_virtual/___vite-browser-external.mjs +0 -6
  40. package/dist/es/_virtual/__vite-browser-external.mjs +0 -4
  41. package/dist/es/_virtual/_commonjsHelpers.mjs +0 -34
  42. package/dist/es/_virtual/_plugin-vue_export-helper.mjs +0 -10
  43. package/dist/es/_virtual/index.mjs +0 -13
  44. package/dist/es/api/project.mjs +0 -51
  45. package/dist/es/directives/heighlight/index.mjs +0 -69
  46. package/dist/es/directives/index.mjs +0 -4
  47. package/dist/es/home/LFilter/FilterArea.vue.mjs +0 -7
  48. package/dist/es/home/LFilter/FilterArea.vue2.mjs +0 -507
  49. package/dist/es/home/LFilter/FilterArea.vue3.mjs +0 -4
  50. package/dist/es/home/LFilter/FilterHead.vue.mjs +0 -129
  51. package/dist/es/home/LFilter/FilterHead.vue2.mjs +0 -4
  52. package/dist/es/home/LFilter/FilterItem.vue.mjs +0 -7
  53. package/dist/es/home/LFilter/FilterItem.vue2.mjs +0 -114
  54. package/dist/es/home/LFilter/FilterItem.vue3.mjs +0 -4
  55. package/dist/es/home/LFilter/FilterItemIcon.vue.mjs +0 -7
  56. package/dist/es/home/LFilter/FilterItemIcon.vue2.mjs +0 -171
  57. package/dist/es/home/LFilter/FilterItemIcon.vue3.mjs +0 -4
  58. package/dist/es/home/LFilter/index.vue.mjs +0 -17
  59. package/dist/es/home/LFilter/index.vue2.mjs +0 -4
  60. package/dist/es/home/LProject/index.vue.mjs +0 -7
  61. package/dist/es/home/LProject/index.vue2.mjs +0 -70
  62. package/dist/es/home/LProject/index.vue3.mjs +0 -4
  63. package/dist/es/home/index.vue.mjs +0 -7
  64. package/dist/es/home/index.vue2.mjs +0 -80
  65. package/dist/es/home/index.vue3.mjs +0 -4
  66. package/dist/es/index.mjs +0 -36
  67. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/check.mjs +0 -8
  68. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/circle-plus.mjs +0 -8
  69. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/close.mjs +0 -8
  70. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/microphone.mjs +0 -8
  71. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/paperclip.mjs +0 -8
  72. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/promotion.mjs +0 -8
  73. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/upload.mjs +0 -8
  74. package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/copy-simple.mjs +0 -8
  75. package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/speaker-high-light.mjs +0 -8
  76. package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/thumbs-down-thin.mjs +0 -8
  77. package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/thumbs-up-thin.mjs +0 -8
  78. package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/warning-bold.mjs +0 -8
  79. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/add-line.mjs +0 -8
  80. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/arrow-down-s-line.mjs +0 -8
  81. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/arrow-up-s-line.mjs +0 -8
  82. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/check-fill.mjs +0 -8
  83. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/download-line.mjs +0 -8
  84. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/more-2-fill.mjs +0 -8
  85. package/dist/es/node_modules/.pnpm/@iconify_vue@4.0.0_vue@3.2.45/node_modules/@iconify/vue/dist/iconify.mjs +0 -1702
  86. package/dist/es/node_modules/.pnpm/@iconify_vue@4.0.0_vue@3.2.45/node_modules/@iconify/vue/dist/offline.mjs +0 -436
  87. package/dist/es/node_modules/.pnpm/@pureadmin_utils@1.8.5_vue@3.2.45/node_modules/@pureadmin/utils/dist/index.mjs +0 -70
  88. package/dist/es/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.mjs +0 -16
  89. package/dist/es/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.mjs +0 -36
  90. package/dist/es/node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.mjs +0 -48
  91. package/dist/es/node_modules/.pnpm/dompurify@3.0.10/node_modules/dompurify/dist/purify.es.mjs +0 -949
  92. package/dist/es/node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.mjs +0 -22
  93. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.mjs +0 -4
  94. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.mjs +0 -4
  95. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.mjs +0 -4
  96. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.mjs +0 -4
  97. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.mjs +0 -4
  98. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.mjs +0 -4
  99. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.mjs +0 -4
  100. package/dist/es/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.mjs +0 -72
  101. package/dist/es/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.mjs +0 -6
  102. package/dist/es/node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.mjs +0 -320
  103. package/dist/es/node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.mjs +0 -14
  104. package/dist/es/node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.mjs +0 -19
  105. package/dist/es/node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.mjs +0 -11
  106. package/dist/es/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.mjs +0 -21
  107. package/dist/es/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.mjs +0 -48
  108. package/dist/es/node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.mjs +0 -8
  109. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/core.mjs +0 -5
  110. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/apache.mjs +0 -91
  111. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/bash.mjs +0 -377
  112. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/basic.mjs +0 -221
  113. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/c.mjs +0 -280
  114. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/css.mjs +0 -732
  115. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dart.mjs +0 -247
  116. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/django.mjs +0 -47
  117. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dns.mjs +0 -71
  118. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dos.mjs +0 -160
  119. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dust.mjs +0 -38
  120. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/erlang.mjs +0 -176
  121. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/go.mjs +0 -135
  122. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/http.mjs +0 -89
  123. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/java.mjs +0 -254
  124. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/javascript.mjs +0 -698
  125. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/json.mjs +0 -40
  126. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/markdown.mjs +0 -227
  127. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/nginx.mjs +0 -144
  128. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/php.mjs +0 -589
  129. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/python.mjs +0 -414
  130. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/ruby.mjs +0 -414
  131. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/stylus.mjs +0 -766
  132. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/swift.mjs +0 -832
  133. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/typescript.mjs +0 -788
  134. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/xml.mjs +0 -227
  135. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/lib/core.mjs +0 -1580
  136. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/styles/paraiso-light.css.mjs +0 -4
  137. package/dist/es/node_modules/.pnpm/marked@12.0.1/node_modules/marked/lib/marked.esm.mjs +0 -2045
  138. package/dist/es/node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/index.mjs +0 -514
  139. package/dist/es/node_modules/.pnpm/pinyin-match@1.2.4/node_modules/pinyin-match/es/main.mjs +0 -124
  140. package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/formats.mjs +0 -22
  141. package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/index.mjs +0 -14
  142. package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/parse.mjs +0 -199
  143. package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/stringify.mjs +0 -262
  144. package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/utils.mjs +0 -196
  145. package/dist/es/node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.mjs +0 -54
  146. package/dist/es/node_modules/.pnpm/side-channel@1.0.6/node_modules/side-channel/index.mjs +0 -115
  147. package/dist/es/store/index.mjs +0 -8
  148. package/dist/es/store/modules/copilot.mjs +0 -108
  149. package/dist/es/store/modules/filters.mjs +0 -346
  150. package/dist/es/store/modules/types.mjs +0 -19
  151. package/dist/es/style/index.scss.mjs +0 -4
  152. package/dist/es/style/tailwind.css.mjs +0 -4
  153. package/dist/es/style.css +0 -1
  154. package/dist/es/utils/home.mjs +0 -129
  155. package/dist/es/utils/http/index.mjs +0 -90
  156. package/dist/es/utils/message.mjs +0 -42
@@ -1,176 +0,0 @@
1
- function erlang(hljs) {
2
- const BASIC_ATOM_RE = "[a-z'][a-zA-Z0-9_']*";
3
- const FUNCTION_NAME_RE = "(" + BASIC_ATOM_RE + ":" + BASIC_ATOM_RE + "|" + BASIC_ATOM_RE + ")";
4
- const ERLANG_RESERVED = {
5
- keyword: "after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let not of orelse|10 query receive rem try when xor",
6
- literal: "false true"
7
- };
8
- const COMMENT = hljs.COMMENT("%", "$");
9
- const NUMBER = {
10
- className: "number",
11
- begin: "\\b(\\d+(_\\d+)*#[a-fA-F0-9]+(_[a-fA-F0-9]+)*|\\d+(_\\d+)*(\\.\\d+(_\\d+)*)?([eE][-+]?\\d+)?)",
12
- relevance: 0
13
- };
14
- const NAMED_FUN = { begin: "fun\\s+" + BASIC_ATOM_RE + "/\\d+" };
15
- const FUNCTION_CALL = {
16
- begin: FUNCTION_NAME_RE + "\\(",
17
- end: "\\)",
18
- returnBegin: true,
19
- relevance: 0,
20
- contains: [
21
- {
22
- begin: FUNCTION_NAME_RE,
23
- relevance: 0
24
- },
25
- {
26
- begin: "\\(",
27
- end: "\\)",
28
- endsWithParent: true,
29
- returnEnd: true,
30
- relevance: 0
31
- // "contains" defined later
32
- }
33
- ]
34
- };
35
- const TUPLE = {
36
- begin: /\{/,
37
- end: /\}/,
38
- relevance: 0
39
- // "contains" defined later
40
- };
41
- const VAR1 = {
42
- begin: "\\b_([A-Z][A-Za-z0-9_]*)?",
43
- relevance: 0
44
- };
45
- const VAR2 = {
46
- begin: "[A-Z][a-zA-Z0-9_]*",
47
- relevance: 0
48
- };
49
- const RECORD_ACCESS = {
50
- begin: "#" + hljs.UNDERSCORE_IDENT_RE,
51
- relevance: 0,
52
- returnBegin: true,
53
- contains: [
54
- {
55
- begin: "#" + hljs.UNDERSCORE_IDENT_RE,
56
- relevance: 0
57
- },
58
- {
59
- begin: /\{/,
60
- end: /\}/,
61
- relevance: 0
62
- // "contains" defined later
63
- }
64
- ]
65
- };
66
- const BLOCK_STATEMENTS = {
67
- beginKeywords: "fun receive if try case",
68
- end: "end",
69
- keywords: ERLANG_RESERVED
70
- };
71
- BLOCK_STATEMENTS.contains = [
72
- COMMENT,
73
- NAMED_FUN,
74
- hljs.inherit(hljs.APOS_STRING_MODE, { className: "" }),
75
- BLOCK_STATEMENTS,
76
- FUNCTION_CALL,
77
- hljs.QUOTE_STRING_MODE,
78
- NUMBER,
79
- TUPLE,
80
- VAR1,
81
- VAR2,
82
- RECORD_ACCESS
83
- ];
84
- const BASIC_MODES = [
85
- COMMENT,
86
- NAMED_FUN,
87
- BLOCK_STATEMENTS,
88
- FUNCTION_CALL,
89
- hljs.QUOTE_STRING_MODE,
90
- NUMBER,
91
- TUPLE,
92
- VAR1,
93
- VAR2,
94
- RECORD_ACCESS
95
- ];
96
- FUNCTION_CALL.contains[1].contains = BASIC_MODES;
97
- TUPLE.contains = BASIC_MODES;
98
- RECORD_ACCESS.contains[1].contains = BASIC_MODES;
99
- const DIRECTIVES = [
100
- "-module",
101
- "-record",
102
- "-undef",
103
- "-export",
104
- "-ifdef",
105
- "-ifndef",
106
- "-author",
107
- "-copyright",
108
- "-doc",
109
- "-vsn",
110
- "-import",
111
- "-include",
112
- "-include_lib",
113
- "-compile",
114
- "-define",
115
- "-else",
116
- "-endif",
117
- "-file",
118
- "-behaviour",
119
- "-behavior",
120
- "-spec"
121
- ];
122
- const PARAMS = {
123
- className: "params",
124
- begin: "\\(",
125
- end: "\\)",
126
- contains: BASIC_MODES
127
- };
128
- return {
129
- name: "Erlang",
130
- aliases: ["erl"],
131
- keywords: ERLANG_RESERVED,
132
- illegal: "(</|\\*=|\\+=|-=|/\\*|\\*/|\\(\\*|\\*\\))",
133
- contains: [
134
- {
135
- className: "function",
136
- begin: "^" + BASIC_ATOM_RE + "\\s*\\(",
137
- end: "->",
138
- returnBegin: true,
139
- illegal: "\\(|#|//|/\\*|\\\\|:|;",
140
- contains: [
141
- PARAMS,
142
- hljs.inherit(hljs.TITLE_MODE, { begin: BASIC_ATOM_RE })
143
- ],
144
- starts: {
145
- end: ";|\\.",
146
- keywords: ERLANG_RESERVED,
147
- contains: BASIC_MODES
148
- }
149
- },
150
- COMMENT,
151
- {
152
- begin: "^-",
153
- end: "\\.",
154
- relevance: 0,
155
- excludeEnd: true,
156
- returnBegin: true,
157
- keywords: {
158
- $pattern: "-" + hljs.IDENT_RE,
159
- keyword: DIRECTIVES.map((x) => `${x}|1.5`).join(" ")
160
- },
161
- contains: [PARAMS]
162
- },
163
- NUMBER,
164
- hljs.QUOTE_STRING_MODE,
165
- RECORD_ACCESS,
166
- VAR1,
167
- VAR2,
168
- TUPLE,
169
- { begin: /\.$/ }
170
- // relevance booster
171
- ]
172
- };
173
- }
174
- export {
175
- erlang as default
176
- };
@@ -1,135 +0,0 @@
1
- function go(hljs) {
2
- const LITERALS = [
3
- "true",
4
- "false",
5
- "iota",
6
- "nil"
7
- ];
8
- const BUILT_INS = [
9
- "append",
10
- "cap",
11
- "close",
12
- "complex",
13
- "copy",
14
- "imag",
15
- "len",
16
- "make",
17
- "new",
18
- "panic",
19
- "print",
20
- "println",
21
- "real",
22
- "recover",
23
- "delete"
24
- ];
25
- const TYPES = [
26
- "bool",
27
- "byte",
28
- "complex64",
29
- "complex128",
30
- "error",
31
- "float32",
32
- "float64",
33
- "int8",
34
- "int16",
35
- "int32",
36
- "int64",
37
- "string",
38
- "uint8",
39
- "uint16",
40
- "uint32",
41
- "uint64",
42
- "int",
43
- "uint",
44
- "uintptr",
45
- "rune"
46
- ];
47
- const KWS = [
48
- "break",
49
- "case",
50
- "chan",
51
- "const",
52
- "continue",
53
- "default",
54
- "defer",
55
- "else",
56
- "fallthrough",
57
- "for",
58
- "func",
59
- "go",
60
- "goto",
61
- "if",
62
- "import",
63
- "interface",
64
- "map",
65
- "package",
66
- "range",
67
- "return",
68
- "select",
69
- "struct",
70
- "switch",
71
- "type",
72
- "var"
73
- ];
74
- const KEYWORDS = {
75
- keyword: KWS,
76
- type: TYPES,
77
- literal: LITERALS,
78
- built_in: BUILT_INS
79
- };
80
- return {
81
- name: "Go",
82
- aliases: ["golang"],
83
- keywords: KEYWORDS,
84
- illegal: "</",
85
- contains: [
86
- hljs.C_LINE_COMMENT_MODE,
87
- hljs.C_BLOCK_COMMENT_MODE,
88
- {
89
- className: "string",
90
- variants: [
91
- hljs.QUOTE_STRING_MODE,
92
- hljs.APOS_STRING_MODE,
93
- {
94
- begin: "`",
95
- end: "`"
96
- }
97
- ]
98
- },
99
- {
100
- className: "number",
101
- variants: [
102
- {
103
- begin: hljs.C_NUMBER_RE + "[i]",
104
- relevance: 1
105
- },
106
- hljs.C_NUMBER_MODE
107
- ]
108
- },
109
- {
110
- begin: /:=/
111
- // relevance booster
112
- },
113
- {
114
- className: "function",
115
- beginKeywords: "func",
116
- end: "\\s*(\\{|$)",
117
- excludeEnd: true,
118
- contains: [
119
- hljs.TITLE_MODE,
120
- {
121
- className: "params",
122
- begin: /\(/,
123
- end: /\)/,
124
- endsParent: true,
125
- keywords: KEYWORDS,
126
- illegal: /["']/
127
- }
128
- ]
129
- }
130
- ]
131
- };
132
- }
133
- export {
134
- go as default
135
- };
@@ -1,89 +0,0 @@
1
- function http(hljs) {
2
- const regex = hljs.regex;
3
- const VERSION = "HTTP/([32]|1\\.[01])";
4
- const HEADER_NAME = /[A-Za-z][A-Za-z0-9-]*/;
5
- const HEADER = {
6
- className: "attribute",
7
- begin: regex.concat("^", HEADER_NAME, "(?=\\:\\s)"),
8
- starts: { contains: [
9
- {
10
- className: "punctuation",
11
- begin: /: /,
12
- relevance: 0,
13
- starts: {
14
- end: "$",
15
- relevance: 0
16
- }
17
- }
18
- ] }
19
- };
20
- const HEADERS_AND_BODY = [
21
- HEADER,
22
- {
23
- begin: "\\n\\n",
24
- starts: {
25
- subLanguage: [],
26
- endsWithParent: true
27
- }
28
- }
29
- ];
30
- return {
31
- name: "HTTP",
32
- aliases: ["https"],
33
- illegal: /\S/,
34
- contains: [
35
- // response
36
- {
37
- begin: "^(?=" + VERSION + " \\d{3})",
38
- end: /$/,
39
- contains: [
40
- {
41
- className: "meta",
42
- begin: VERSION
43
- },
44
- {
45
- className: "number",
46
- begin: "\\b\\d{3}\\b"
47
- }
48
- ],
49
- starts: {
50
- end: /\b\B/,
51
- illegal: /\S/,
52
- contains: HEADERS_AND_BODY
53
- }
54
- },
55
- // request
56
- {
57
- begin: "(?=^[A-Z]+ (.*?) " + VERSION + "$)",
58
- end: /$/,
59
- contains: [
60
- {
61
- className: "string",
62
- begin: " ",
63
- end: " ",
64
- excludeBegin: true,
65
- excludeEnd: true
66
- },
67
- {
68
- className: "meta",
69
- begin: VERSION
70
- },
71
- {
72
- className: "keyword",
73
- begin: "[A-Z]+"
74
- }
75
- ],
76
- starts: {
77
- end: /\b\B/,
78
- illegal: /\S/,
79
- contains: HEADERS_AND_BODY
80
- }
81
- },
82
- // to allow headers to work even without a preamble
83
- hljs.inherit(HEADER, { relevance: 0 })
84
- ]
85
- };
86
- }
87
- export {
88
- http as default
89
- };
@@ -1,254 +0,0 @@
1
- var decimalDigits = "[0-9](_*[0-9])*";
2
- var frac = `\\.(${decimalDigits})`;
3
- var hexDigits = "[0-9a-fA-F](_*[0-9a-fA-F])*";
4
- var NUMERIC = {
5
- className: "number",
6
- variants: [
7
- // DecimalFloatingPointLiteral
8
- // including ExponentPart
9
- { begin: `(\\b(${decimalDigits})((${frac})|\\.)?|(${frac}))[eE][+-]?(${decimalDigits})[fFdD]?\\b` },
10
- // excluding ExponentPart
11
- { begin: `\\b(${decimalDigits})((${frac})[fFdD]?\\b|\\.([fFdD]\\b)?)` },
12
- { begin: `(${frac})[fFdD]?\\b` },
13
- { begin: `\\b(${decimalDigits})[fFdD]\\b` },
14
- // HexadecimalFloatingPointLiteral
15
- { begin: `\\b0[xX]((${hexDigits})\\.?|(${hexDigits})?\\.(${hexDigits}))[pP][+-]?(${decimalDigits})[fFdD]?\\b` },
16
- // DecimalIntegerLiteral
17
- { begin: "\\b(0|[1-9](_*[0-9])*)[lL]?\\b" },
18
- // HexIntegerLiteral
19
- { begin: `\\b0[xX](${hexDigits})[lL]?\\b` },
20
- // OctalIntegerLiteral
21
- { begin: "\\b0(_*[0-7])*[lL]?\\b" },
22
- // BinaryIntegerLiteral
23
- { begin: "\\b0[bB][01](_*[01])*[lL]?\\b" }
24
- ],
25
- relevance: 0
26
- };
27
- function recurRegex(re, substitution, depth) {
28
- if (depth === -1)
29
- return "";
30
- return re.replace(substitution, (_) => {
31
- return recurRegex(re, substitution, depth - 1);
32
- });
33
- }
34
- function java(hljs) {
35
- const regex = hljs.regex;
36
- const JAVA_IDENT_RE = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*";
37
- const GENERIC_IDENT_RE = JAVA_IDENT_RE + recurRegex("(?:<" + JAVA_IDENT_RE + "~~~(?:\\s*,\\s*" + JAVA_IDENT_RE + "~~~)*>)?", /~~~/g, 2);
38
- const MAIN_KEYWORDS = [
39
- "synchronized",
40
- "abstract",
41
- "private",
42
- "var",
43
- "static",
44
- "if",
45
- "const ",
46
- "for",
47
- "while",
48
- "strictfp",
49
- "finally",
50
- "protected",
51
- "import",
52
- "native",
53
- "final",
54
- "void",
55
- "enum",
56
- "else",
57
- "break",
58
- "transient",
59
- "catch",
60
- "instanceof",
61
- "volatile",
62
- "case",
63
- "assert",
64
- "package",
65
- "default",
66
- "public",
67
- "try",
68
- "switch",
69
- "continue",
70
- "throws",
71
- "protected",
72
- "public",
73
- "private",
74
- "module",
75
- "requires",
76
- "exports",
77
- "do",
78
- "sealed",
79
- "yield",
80
- "permits"
81
- ];
82
- const BUILT_INS = [
83
- "super",
84
- "this"
85
- ];
86
- const LITERALS = [
87
- "false",
88
- "true",
89
- "null"
90
- ];
91
- const TYPES = [
92
- "char",
93
- "boolean",
94
- "long",
95
- "float",
96
- "int",
97
- "byte",
98
- "short",
99
- "double"
100
- ];
101
- const KEYWORDS = {
102
- keyword: MAIN_KEYWORDS,
103
- literal: LITERALS,
104
- type: TYPES,
105
- built_in: BUILT_INS
106
- };
107
- const ANNOTATION = {
108
- className: "meta",
109
- begin: "@" + JAVA_IDENT_RE,
110
- contains: [
111
- {
112
- begin: /\(/,
113
- end: /\)/,
114
- contains: ["self"]
115
- // allow nested () inside our annotation
116
- }
117
- ]
118
- };
119
- const PARAMS = {
120
- className: "params",
121
- begin: /\(/,
122
- end: /\)/,
123
- keywords: KEYWORDS,
124
- relevance: 0,
125
- contains: [hljs.C_BLOCK_COMMENT_MODE],
126
- endsParent: true
127
- };
128
- return {
129
- name: "Java",
130
- aliases: ["jsp"],
131
- keywords: KEYWORDS,
132
- illegal: /<\/|#/,
133
- contains: [
134
- hljs.COMMENT(
135
- "/\\*\\*",
136
- "\\*/",
137
- {
138
- relevance: 0,
139
- contains: [
140
- {
141
- // eat up @'s in emails to prevent them to be recognized as doctags
142
- begin: /\w+@/,
143
- relevance: 0
144
- },
145
- {
146
- className: "doctag",
147
- begin: "@[A-Za-z]+"
148
- }
149
- ]
150
- }
151
- ),
152
- // relevance boost
153
- {
154
- begin: /import java\.[a-z]+\./,
155
- keywords: "import",
156
- relevance: 2
157
- },
158
- hljs.C_LINE_COMMENT_MODE,
159
- hljs.C_BLOCK_COMMENT_MODE,
160
- {
161
- begin: /"""/,
162
- end: /"""/,
163
- className: "string",
164
- contains: [hljs.BACKSLASH_ESCAPE]
165
- },
166
- hljs.APOS_STRING_MODE,
167
- hljs.QUOTE_STRING_MODE,
168
- {
169
- match: [
170
- /\b(?:class|interface|enum|extends|implements|new)/,
171
- /\s+/,
172
- JAVA_IDENT_RE
173
- ],
174
- className: {
175
- 1: "keyword",
176
- 3: "title.class"
177
- }
178
- },
179
- {
180
- // Exceptions for hyphenated keywords
181
- match: /non-sealed/,
182
- scope: "keyword"
183
- },
184
- {
185
- begin: [
186
- regex.concat(/(?!else)/, JAVA_IDENT_RE),
187
- /\s+/,
188
- JAVA_IDENT_RE,
189
- /\s+/,
190
- /=(?!=)/
191
- ],
192
- className: {
193
- 1: "type",
194
- 3: "variable",
195
- 5: "operator"
196
- }
197
- },
198
- {
199
- begin: [
200
- /record/,
201
- /\s+/,
202
- JAVA_IDENT_RE
203
- ],
204
- className: {
205
- 1: "keyword",
206
- 3: "title.class"
207
- },
208
- contains: [
209
- PARAMS,
210
- hljs.C_LINE_COMMENT_MODE,
211
- hljs.C_BLOCK_COMMENT_MODE
212
- ]
213
- },
214
- {
215
- // Expression keywords prevent 'keyword Name(...)' from being
216
- // recognized as a function definition
217
- beginKeywords: "new throw return else",
218
- relevance: 0
219
- },
220
- {
221
- begin: [
222
- "(?:" + GENERIC_IDENT_RE + "\\s+)",
223
- hljs.UNDERSCORE_IDENT_RE,
224
- /\s*(?=\()/
225
- ],
226
- className: { 2: "title.function" },
227
- keywords: KEYWORDS,
228
- contains: [
229
- {
230
- className: "params",
231
- begin: /\(/,
232
- end: /\)/,
233
- keywords: KEYWORDS,
234
- relevance: 0,
235
- contains: [
236
- ANNOTATION,
237
- hljs.APOS_STRING_MODE,
238
- hljs.QUOTE_STRING_MODE,
239
- NUMERIC,
240
- hljs.C_BLOCK_COMMENT_MODE
241
- ]
242
- },
243
- hljs.C_LINE_COMMENT_MODE,
244
- hljs.C_BLOCK_COMMENT_MODE
245
- ]
246
- },
247
- NUMERIC,
248
- ANNOTATION
249
- ]
250
- };
251
- }
252
- export {
253
- java as default
254
- };