@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,589 +0,0 @@
1
- function php(hljs) {
2
- const regex = hljs.regex;
3
- const NOT_PERL_ETC = /(?![A-Za-z0-9])(?![$])/;
4
- const IDENT_RE = regex.concat(
5
- /[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,
6
- NOT_PERL_ETC
7
- );
8
- const PASCAL_CASE_CLASS_NAME_RE = regex.concat(
9
- /(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,
10
- NOT_PERL_ETC
11
- );
12
- const VARIABLE = {
13
- scope: "variable",
14
- match: "\\$+" + IDENT_RE
15
- };
16
- const PREPROCESSOR = {
17
- scope: "meta",
18
- variants: [
19
- { begin: /<\?php/, relevance: 10 },
20
- // boost for obvious PHP
21
- { begin: /<\?=/ },
22
- // less relevant per PSR-1 which says not to use short-tags
23
- { begin: /<\?/, relevance: 0.1 },
24
- { begin: /\?>/ }
25
- // end php tag
26
- ]
27
- };
28
- const SUBST = {
29
- scope: "subst",
30
- variants: [
31
- { begin: /\$\w+/ },
32
- {
33
- begin: /\{\$/,
34
- end: /\}/
35
- }
36
- ]
37
- };
38
- const SINGLE_QUOTED = hljs.inherit(hljs.APOS_STRING_MODE, { illegal: null });
39
- const DOUBLE_QUOTED = hljs.inherit(hljs.QUOTE_STRING_MODE, {
40
- illegal: null,
41
- contains: hljs.QUOTE_STRING_MODE.contains.concat(SUBST)
42
- });
43
- const HEREDOC = {
44
- begin: /<<<[ \t]*(?:(\w+)|"(\w+)")\n/,
45
- end: /[ \t]*(\w+)\b/,
46
- contains: hljs.QUOTE_STRING_MODE.contains.concat(SUBST),
47
- "on:begin": (m, resp) => {
48
- resp.data._beginMatch = m[1] || m[2];
49
- },
50
- "on:end": (m, resp) => {
51
- if (resp.data._beginMatch !== m[1])
52
- resp.ignoreMatch();
53
- }
54
- };
55
- const NOWDOC = hljs.END_SAME_AS_BEGIN({
56
- begin: /<<<[ \t]*'(\w+)'\n/,
57
- end: /[ \t]*(\w+)\b/
58
- });
59
- const WHITESPACE = "[ \n]";
60
- const STRING = {
61
- scope: "string",
62
- variants: [
63
- DOUBLE_QUOTED,
64
- SINGLE_QUOTED,
65
- HEREDOC,
66
- NOWDOC
67
- ]
68
- };
69
- const NUMBER = {
70
- scope: "number",
71
- variants: [
72
- { begin: `\\b0[bB][01]+(?:_[01]+)*\\b` },
73
- // Binary w/ underscore support
74
- { begin: `\\b0[oO][0-7]+(?:_[0-7]+)*\\b` },
75
- // Octals w/ underscore support
76
- { begin: `\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b` },
77
- // Hex w/ underscore support
78
- // Decimals w/ underscore support, with optional fragments and scientific exponent (e) suffix.
79
- { begin: `(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?` }
80
- ],
81
- relevance: 0
82
- };
83
- const LITERALS = [
84
- "false",
85
- "null",
86
- "true"
87
- ];
88
- const KWS = [
89
- // Magic constants:
90
- // <https://www.php.net/manual/en/language.constants.predefined.php>
91
- "__CLASS__",
92
- "__DIR__",
93
- "__FILE__",
94
- "__FUNCTION__",
95
- "__COMPILER_HALT_OFFSET__",
96
- "__LINE__",
97
- "__METHOD__",
98
- "__NAMESPACE__",
99
- "__TRAIT__",
100
- // Function that look like language construct or language construct that look like function:
101
- // List of keywords that may not require parenthesis
102
- "die",
103
- "echo",
104
- "exit",
105
- "include",
106
- "include_once",
107
- "print",
108
- "require",
109
- "require_once",
110
- // These are not language construct (function) but operate on the currently-executing function and can access the current symbol table
111
- // 'compact extract func_get_arg func_get_args func_num_args get_called_class get_parent_class ' +
112
- // Other keywords:
113
- // <https://www.php.net/manual/en/reserved.php>
114
- // <https://www.php.net/manual/en/language.types.type-juggling.php>
115
- "array",
116
- "abstract",
117
- "and",
118
- "as",
119
- "binary",
120
- "bool",
121
- "boolean",
122
- "break",
123
- "callable",
124
- "case",
125
- "catch",
126
- "class",
127
- "clone",
128
- "const",
129
- "continue",
130
- "declare",
131
- "default",
132
- "do",
133
- "double",
134
- "else",
135
- "elseif",
136
- "empty",
137
- "enddeclare",
138
- "endfor",
139
- "endforeach",
140
- "endif",
141
- "endswitch",
142
- "endwhile",
143
- "enum",
144
- "eval",
145
- "extends",
146
- "final",
147
- "finally",
148
- "float",
149
- "for",
150
- "foreach",
151
- "from",
152
- "global",
153
- "goto",
154
- "if",
155
- "implements",
156
- "instanceof",
157
- "insteadof",
158
- "int",
159
- "integer",
160
- "interface",
161
- "isset",
162
- "iterable",
163
- "list",
164
- "match|0",
165
- "mixed",
166
- "new",
167
- "never",
168
- "object",
169
- "or",
170
- "private",
171
- "protected",
172
- "public",
173
- "readonly",
174
- "real",
175
- "return",
176
- "string",
177
- "switch",
178
- "throw",
179
- "trait",
180
- "try",
181
- "unset",
182
- "use",
183
- "var",
184
- "void",
185
- "while",
186
- "xor",
187
- "yield"
188
- ];
189
- const BUILT_INS = [
190
- // Standard PHP library:
191
- // <https://www.php.net/manual/en/book.spl.php>
192
- "Error|0",
193
- "AppendIterator",
194
- "ArgumentCountError",
195
- "ArithmeticError",
196
- "ArrayIterator",
197
- "ArrayObject",
198
- "AssertionError",
199
- "BadFunctionCallException",
200
- "BadMethodCallException",
201
- "CachingIterator",
202
- "CallbackFilterIterator",
203
- "CompileError",
204
- "Countable",
205
- "DirectoryIterator",
206
- "DivisionByZeroError",
207
- "DomainException",
208
- "EmptyIterator",
209
- "ErrorException",
210
- "Exception",
211
- "FilesystemIterator",
212
- "FilterIterator",
213
- "GlobIterator",
214
- "InfiniteIterator",
215
- "InvalidArgumentException",
216
- "IteratorIterator",
217
- "LengthException",
218
- "LimitIterator",
219
- "LogicException",
220
- "MultipleIterator",
221
- "NoRewindIterator",
222
- "OutOfBoundsException",
223
- "OutOfRangeException",
224
- "OuterIterator",
225
- "OverflowException",
226
- "ParentIterator",
227
- "ParseError",
228
- "RangeException",
229
- "RecursiveArrayIterator",
230
- "RecursiveCachingIterator",
231
- "RecursiveCallbackFilterIterator",
232
- "RecursiveDirectoryIterator",
233
- "RecursiveFilterIterator",
234
- "RecursiveIterator",
235
- "RecursiveIteratorIterator",
236
- "RecursiveRegexIterator",
237
- "RecursiveTreeIterator",
238
- "RegexIterator",
239
- "RuntimeException",
240
- "SeekableIterator",
241
- "SplDoublyLinkedList",
242
- "SplFileInfo",
243
- "SplFileObject",
244
- "SplFixedArray",
245
- "SplHeap",
246
- "SplMaxHeap",
247
- "SplMinHeap",
248
- "SplObjectStorage",
249
- "SplObserver",
250
- "SplPriorityQueue",
251
- "SplQueue",
252
- "SplStack",
253
- "SplSubject",
254
- "SplTempFileObject",
255
- "TypeError",
256
- "UnderflowException",
257
- "UnexpectedValueException",
258
- "UnhandledMatchError",
259
- // Reserved interfaces:
260
- // <https://www.php.net/manual/en/reserved.interfaces.php>
261
- "ArrayAccess",
262
- "BackedEnum",
263
- "Closure",
264
- "Fiber",
265
- "Generator",
266
- "Iterator",
267
- "IteratorAggregate",
268
- "Serializable",
269
- "Stringable",
270
- "Throwable",
271
- "Traversable",
272
- "UnitEnum",
273
- "WeakReference",
274
- "WeakMap",
275
- // Reserved classes:
276
- // <https://www.php.net/manual/en/reserved.classes.php>
277
- "Directory",
278
- "__PHP_Incomplete_Class",
279
- "parent",
280
- "php_user_filter",
281
- "self",
282
- "static",
283
- "stdClass"
284
- ];
285
- const dualCase = (items) => {
286
- const result = [];
287
- items.forEach((item) => {
288
- result.push(item);
289
- if (item.toLowerCase() === item) {
290
- result.push(item.toUpperCase());
291
- } else {
292
- result.push(item.toLowerCase());
293
- }
294
- });
295
- return result;
296
- };
297
- const KEYWORDS = {
298
- keyword: KWS,
299
- literal: dualCase(LITERALS),
300
- built_in: BUILT_INS
301
- };
302
- const normalizeKeywords = (items) => {
303
- return items.map((item) => {
304
- return item.replace(/\|\d+$/, "");
305
- });
306
- };
307
- const CONSTRUCTOR_CALL = { variants: [
308
- {
309
- match: [
310
- /new/,
311
- regex.concat(WHITESPACE, "+"),
312
- // to prevent built ins from being confused as the class constructor call
313
- regex.concat("(?!", normalizeKeywords(BUILT_INS).join("\\b|"), "\\b)"),
314
- PASCAL_CASE_CLASS_NAME_RE
315
- ],
316
- scope: {
317
- 1: "keyword",
318
- 4: "title.class"
319
- }
320
- }
321
- ] };
322
- const CONSTANT_REFERENCE = regex.concat(IDENT_RE, "\\b(?!\\()");
323
- const LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON = { variants: [
324
- {
325
- match: [
326
- regex.concat(
327
- /::/,
328
- regex.lookahead(/(?!class\b)/)
329
- ),
330
- CONSTANT_REFERENCE
331
- ],
332
- scope: { 2: "variable.constant" }
333
- },
334
- {
335
- match: [
336
- /::/,
337
- /class/
338
- ],
339
- scope: { 2: "variable.language" }
340
- },
341
- {
342
- match: [
343
- PASCAL_CASE_CLASS_NAME_RE,
344
- regex.concat(
345
- /::/,
346
- regex.lookahead(/(?!class\b)/)
347
- ),
348
- CONSTANT_REFERENCE
349
- ],
350
- scope: {
351
- 1: "title.class",
352
- 3: "variable.constant"
353
- }
354
- },
355
- {
356
- match: [
357
- PASCAL_CASE_CLASS_NAME_RE,
358
- regex.concat(
359
- "::",
360
- regex.lookahead(/(?!class\b)/)
361
- )
362
- ],
363
- scope: { 1: "title.class" }
364
- },
365
- {
366
- match: [
367
- PASCAL_CASE_CLASS_NAME_RE,
368
- /::/,
369
- /class/
370
- ],
371
- scope: {
372
- 1: "title.class",
373
- 3: "variable.language"
374
- }
375
- }
376
- ] };
377
- const NAMED_ARGUMENT = {
378
- scope: "attr",
379
- match: regex.concat(IDENT_RE, regex.lookahead(":"), regex.lookahead(/(?!::)/))
380
- };
381
- const PARAMS_MODE = {
382
- relevance: 0,
383
- begin: /\(/,
384
- end: /\)/,
385
- keywords: KEYWORDS,
386
- contains: [
387
- NAMED_ARGUMENT,
388
- VARIABLE,
389
- LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,
390
- hljs.C_BLOCK_COMMENT_MODE,
391
- STRING,
392
- NUMBER,
393
- CONSTRUCTOR_CALL
394
- ]
395
- };
396
- const FUNCTION_INVOKE = {
397
- relevance: 0,
398
- match: [
399
- /\b/,
400
- // to prevent keywords from being confused as the function title
401
- regex.concat("(?!fn\\b|function\\b|", normalizeKeywords(KWS).join("\\b|"), "|", normalizeKeywords(BUILT_INS).join("\\b|"), "\\b)"),
402
- IDENT_RE,
403
- regex.concat(WHITESPACE, "*"),
404
- regex.lookahead(/(?=\()/)
405
- ],
406
- scope: { 3: "title.function.invoke" },
407
- contains: [PARAMS_MODE]
408
- };
409
- PARAMS_MODE.contains.push(FUNCTION_INVOKE);
410
- const ATTRIBUTE_CONTAINS = [
411
- NAMED_ARGUMENT,
412
- LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,
413
- hljs.C_BLOCK_COMMENT_MODE,
414
- STRING,
415
- NUMBER,
416
- CONSTRUCTOR_CALL
417
- ];
418
- const ATTRIBUTES = {
419
- begin: regex.concat(/#\[\s*/, PASCAL_CASE_CLASS_NAME_RE),
420
- beginScope: "meta",
421
- end: /]/,
422
- endScope: "meta",
423
- keywords: {
424
- literal: LITERALS,
425
- keyword: [
426
- "new",
427
- "array"
428
- ]
429
- },
430
- contains: [
431
- {
432
- begin: /\[/,
433
- end: /]/,
434
- keywords: {
435
- literal: LITERALS,
436
- keyword: [
437
- "new",
438
- "array"
439
- ]
440
- },
441
- contains: [
442
- "self",
443
- ...ATTRIBUTE_CONTAINS
444
- ]
445
- },
446
- ...ATTRIBUTE_CONTAINS,
447
- {
448
- scope: "meta",
449
- match: PASCAL_CASE_CLASS_NAME_RE
450
- }
451
- ]
452
- };
453
- return {
454
- case_insensitive: false,
455
- keywords: KEYWORDS,
456
- contains: [
457
- ATTRIBUTES,
458
- hljs.HASH_COMMENT_MODE,
459
- hljs.COMMENT("//", "$"),
460
- hljs.COMMENT(
461
- "/\\*",
462
- "\\*/",
463
- { contains: [
464
- {
465
- scope: "doctag",
466
- match: "@[A-Za-z]+"
467
- }
468
- ] }
469
- ),
470
- {
471
- match: /__halt_compiler\(\);/,
472
- keywords: "__halt_compiler",
473
- starts: {
474
- scope: "comment",
475
- end: hljs.MATCH_NOTHING_RE,
476
- contains: [
477
- {
478
- match: /\?>/,
479
- scope: "meta",
480
- endsParent: true
481
- }
482
- ]
483
- }
484
- },
485
- PREPROCESSOR,
486
- {
487
- scope: "variable.language",
488
- match: /\$this\b/
489
- },
490
- VARIABLE,
491
- FUNCTION_INVOKE,
492
- LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,
493
- {
494
- match: [
495
- /const/,
496
- /\s/,
497
- IDENT_RE
498
- ],
499
- scope: {
500
- 1: "keyword",
501
- 3: "variable.constant"
502
- }
503
- },
504
- CONSTRUCTOR_CALL,
505
- {
506
- scope: "function",
507
- relevance: 0,
508
- beginKeywords: "fn function",
509
- end: /[;{]/,
510
- excludeEnd: true,
511
- illegal: "[$%\\[]",
512
- contains: [
513
- { beginKeywords: "use" },
514
- hljs.UNDERSCORE_TITLE_MODE,
515
- {
516
- begin: "=>",
517
- // No markup, just a relevance booster
518
- endsParent: true
519
- },
520
- {
521
- scope: "params",
522
- begin: "\\(",
523
- end: "\\)",
524
- excludeBegin: true,
525
- excludeEnd: true,
526
- keywords: KEYWORDS,
527
- contains: [
528
- "self",
529
- VARIABLE,
530
- LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,
531
- hljs.C_BLOCK_COMMENT_MODE,
532
- STRING,
533
- NUMBER
534
- ]
535
- }
536
- ]
537
- },
538
- {
539
- scope: "class",
540
- variants: [
541
- {
542
- beginKeywords: "enum",
543
- illegal: /[($"]/
544
- },
545
- {
546
- beginKeywords: "class interface trait",
547
- illegal: /[:($"]/
548
- }
549
- ],
550
- relevance: 0,
551
- end: /\{/,
552
- excludeEnd: true,
553
- contains: [
554
- { beginKeywords: "extends implements" },
555
- hljs.UNDERSCORE_TITLE_MODE
556
- ]
557
- },
558
- // both use and namespace still use "old style" rules (vs multi-match)
559
- // because the namespace name can include `\` and we still want each
560
- // element to be treated as its own *individual* title
561
- {
562
- beginKeywords: "namespace",
563
- relevance: 0,
564
- end: ";",
565
- illegal: /[.']/,
566
- contains: [hljs.inherit(hljs.UNDERSCORE_TITLE_MODE, { scope: "title.class" })]
567
- },
568
- {
569
- beginKeywords: "use",
570
- relevance: 0,
571
- end: ";",
572
- contains: [
573
- // TODO: title.function vs title.class
574
- {
575
- match: /\b(as|const|function)\b/,
576
- scope: "keyword"
577
- },
578
- // TODO: could be title.class or title.function
579
- hljs.UNDERSCORE_TITLE_MODE
580
- ]
581
- },
582
- STRING,
583
- NUMBER
584
- ]
585
- };
586
- }
587
- export {
588
- php as default
589
- };