@kg-ui/kg-ui-plus 0.1.30 → 0.1.32
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.
- package/dist/es/KgCopilot/CopiCanvas/FilePreview.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiCanvas/FilePreview.vue2.mjs +81 -0
- package/dist/es/KgCopilot/CopiCanvas/FilePreview.vue3.mjs +4 -0
- package/dist/es/KgCopilot/CopiCanvas/FileSkeletion.vue.mjs +96 -0
- package/dist/es/KgCopilot/CopiCanvas/FileSkeletion.vue2.mjs +4 -0
- package/dist/es/KgCopilot/CopiCanvas/InitWrap.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiCanvas/InitWrap.vue2.mjs +41 -0
- package/dist/es/KgCopilot/CopiCanvas/InitWrap.vue3.mjs +4 -0
- package/dist/es/KgCopilot/CopiCanvas/index.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiCanvas/index.vue2.mjs +52 -0
- package/dist/es/KgCopilot/CopiCanvas/index.vue3.mjs +4 -0
- package/dist/es/KgCopilot/CopiFooter/SearchInput/InputFootTool.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiFooter/SearchInput/InputFootTool.vue2.mjs +61 -0
- package/dist/es/KgCopilot/CopiFooter/SearchInput/InputFootTool.vue3.mjs +4 -0
- package/dist/es/KgCopilot/CopiFooter/SearchInput/SelectPluginByKey.vue2.mjs +1 -1
- package/dist/es/KgCopilot/CopiFooter/SearchInput/index.vue.mjs +1 -1
- package/dist/es/KgCopilot/CopiFooter/SearchInput/index.vue2.mjs +34 -22
- package/dist/es/KgCopilot/CopiFooter/SearchInput/index.vue3.mjs +2 -2
- package/dist/es/KgCopilot/CopiFooter/index.vue.mjs +1 -1
- package/dist/es/KgCopilot/CopiFooter/index.vue3.mjs +2 -2
- package/dist/es/KgCopilot/dialogue/SuggestMessage.vue.mjs +7 -0
- package/dist/es/KgCopilot/dialogue/SuggestMessage.vue2.mjs +50 -0
- package/dist/es/KgCopilot/dialogue/SuggestMessage.vue3.mjs +4 -0
- package/dist/es/KgCopilot/dialogue/index.vue.mjs +1 -1
- package/dist/es/KgCopilot/dialogue/index.vue2.mjs +10 -4
- package/dist/es/KgCopilot/dialogue/index.vue3.mjs +2 -2
- package/dist/es/KgCopilot/dialogue/messageParse/fileBox.vue.mjs +19 -5
- package/dist/es/KgCopilot/dialogue/messageParse/fileBox.vue2.mjs +2 -2
- package/dist/es/KgCopilot/dialogue/messageParse/readMd.vue2.mjs +1 -1
- package/dist/es/KgCopilot/historyRecord/index.vue.mjs +1 -1
- package/dist/es/KgCopilot/historyRecord/index.vue2.mjs +6 -6
- package/dist/es/KgCopilot/historyRecord/index.vue3.mjs +2 -2
- package/dist/es/KgCopilot/index.vue.mjs +1 -1
- package/dist/es/KgCopilot/index.vue2.mjs +62 -39
- package/dist/es/KgCopilot/index.vue3.mjs +2 -2
- package/dist/es/_virtual/_commonjs-dynamic-modules.mjs +6 -0
- package/dist/es/_virtual/jszip.min.mjs +13 -0
- package/dist/es/api/copilot.mjs +8 -0
- package/dist/es/assets/empty.png.mjs +4 -0
- package/dist/es/directives/heighlight/index.mjs +27 -27
- package/dist/es/home/LFilter/FilterHead.vue.mjs +1 -1
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.12/node_modules/@iconify-icons/ep/folder-opened.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.12/node_modules/@iconify-icons/ep/notebook.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.12/node_modules/@iconify-icons/ep/reading.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@vueuse_core@9.13.0_vue@3.2.45/node_modules/@vueuse/core/index.mjs +8 -1
- package/dist/es/node_modules/.pnpm/@vueuse_shared@9.13.0_vue@3.2.45/node_modules/@vueuse/shared/index.mjs +115 -2
- package/dist/es/node_modules/.pnpm/call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/actualApply.mjs +12 -0
- package/dist/es/node_modules/.pnpm/call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/functionApply.mjs +12 -0
- package/dist/es/node_modules/.pnpm/call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/functionCall.mjs +4 -0
- package/dist/es/node_modules/.pnpm/call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/index.mjs +17 -0
- package/dist/es/node_modules/.pnpm/call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/reflectApply.mjs +4 -0
- package/dist/es/node_modules/.pnpm/call-bound@1.0.3/node_modules/call-bound/index.mjs +18 -0
- package/dist/es/node_modules/.pnpm/docx-preview@0.3.3/node_modules/docx-preview/dist/docx-preview.mjs +3877 -0
- package/dist/es/node_modules/.pnpm/{dompurify@3.1.5 → dompurify@3.2.3}/node_modules/dompurify/dist/purify.es.mjs +78 -87
- package/dist/es/node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.mjs +37 -0
- package/dist/es/node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.mjs +12 -0
- package/dist/es/node_modules/.pnpm/es-object-atoms@1.0.0/node_modules/es-object-atoms/index.mjs +4 -0
- package/dist/es/node_modules/.pnpm/{get-intrinsic@1.2.4 → get-intrinsic@1.2.6}/node_modules/get-intrinsic/index.mjs +43 -24
- package/dist/es/node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.mjs +4 -0
- package/dist/es/node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.mjs +13 -0
- package/dist/es/node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.mjs +29 -0
- package/dist/es/node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.mjs +59 -0
- package/dist/es/node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.mjs +13 -5
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/apache.mjs +4 -0
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/bash.mjs +20 -2
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/basic.mjs +7 -1
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/c.mjs +19 -4
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/css.mjs +214 -8
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/dart.mjs +10 -2
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/erlang.mjs +48 -6
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/go.mjs +23 -3
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/java.mjs +3 -1
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/javascript.mjs +15 -11
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/json.mjs +1 -0
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/markdown.mjs +7 -1
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/php.mjs +16 -2
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/python.mjs +3 -1
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/ruby.mjs +1 -1
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/stylus.mjs +214 -8
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/swift.mjs +60 -14
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/typescript.mjs +45 -18
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/lib/core.mjs +8 -8
- package/dist/es/node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/dist/jszip.min.mjs +2649 -0
- package/dist/es/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.mjs +4 -0
- package/dist/es/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.mjs +4 -0
- package/dist/es/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.mjs +4 -0
- package/dist/es/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.mjs +4 -0
- package/dist/es/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.mjs +4 -0
- package/dist/es/node_modules/.pnpm/{object-inspect@1.13.1 → object-inspect@1.13.3}/node_modules/object-inspect/index.mjs +17 -4
- package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/stringify.mjs +1 -1
- package/dist/es/node_modules/.pnpm/side-channel-list@1.0.0/node_modules/side-channel-list/index.mjs +92 -0
- package/dist/es/node_modules/.pnpm/side-channel-map@1.0.1/node_modules/side-channel-map/index.mjs +56 -0
- package/dist/es/node_modules/.pnpm/side-channel-weakmap@1.0.2/node_modules/side-channel-weakmap/index.mjs +74 -0
- package/dist/es/node_modules/.pnpm/side-channel@1.1.0/node_modules/side-channel/index.mjs +40 -0
- package/dist/es/store/modules/copilot.mjs +68 -8
- package/dist/es/style.css +1 -1
- package/dist/es/utils/http/index.mjs +1 -1
- package/package.json +3 -2
- package/dist/es/_virtual/index.mjs +0 -13
- package/dist/es/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.mjs +0 -16
- package/dist/es/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.mjs +0 -36
- package/dist/es/node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.mjs +0 -48
- package/dist/es/node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.mjs +0 -22
- package/dist/es/node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.mjs +0 -14
- package/dist/es/node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.mjs +0 -19
- package/dist/es/node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.mjs +0 -11
- package/dist/es/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.mjs +0 -21
- package/dist/es/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.mjs +0 -48
- package/dist/es/node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.mjs +0 -54
- package/dist/es/node_modules/.pnpm/side-channel@1.0.6/node_modules/side-channel/index.mjs +0 -115
- /package/dist/es/node_modules/.pnpm/{@iconify-icons_ep@1.2.7 → @iconify-icons_ep@1.2.12}/node_modules/@iconify-icons/ep/arrow-left.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{@iconify-icons_ep@1.2.7 → @iconify-icons_ep@1.2.12}/node_modules/@iconify-icons/ep/arrow-right.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{@iconify-icons_ep@1.2.7 → @iconify-icons_ep@1.2.12}/node_modules/@iconify-icons/ep/check.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{@iconify-icons_ep@1.2.7 → @iconify-icons_ep@1.2.12}/node_modules/@iconify-icons/ep/close.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{@iconify-icons_ep@1.2.7 → @iconify-icons_ep@1.2.12}/node_modules/@iconify-icons/ep/delete.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{@iconify-icons_ep@1.2.7 → @iconify-icons_ep@1.2.12}/node_modules/@iconify-icons/ep/edit.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{@iconify-icons_ep@1.2.7 → @iconify-icons_ep@1.2.12}/node_modules/@iconify-icons/ep/promotion.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{@iconify-icons_ep@1.2.7 → @iconify-icons_ep@1.2.12}/node_modules/@iconify-icons/ep/search.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/core.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/django.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/dns.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/dos.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/dust.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/http.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/nginx.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/xml.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/styles/sunburst.css.mjs +0 -0
@@ -134,6 +134,7 @@ const keywords = [
|
|
134
134
|
// contextual
|
135
135
|
"override",
|
136
136
|
// contextual
|
137
|
+
"package",
|
137
138
|
"postfix",
|
138
139
|
// contextual
|
139
140
|
"precedencegroup",
|
@@ -576,7 +577,7 @@ function swift(hljs) {
|
|
576
577
|
};
|
577
578
|
const KEYWORD_ATTRIBUTE = {
|
578
579
|
scope: "keyword",
|
579
|
-
match: concat(/@/, either(...keywordAttributes))
|
580
|
+
match: concat(/@/, either(...keywordAttributes), lookahead(either(/\(/, /\s+/)))
|
580
581
|
};
|
581
582
|
const USER_DEFINED_ATTRIBUTE = {
|
582
583
|
scope: "meta",
|
@@ -763,6 +764,61 @@ function swift(hljs) {
|
|
763
764
|
],
|
764
765
|
end: /}/
|
765
766
|
};
|
767
|
+
const CLASS_FUNC_DECLARATION = {
|
768
|
+
match: [
|
769
|
+
/class\b/,
|
770
|
+
/\s+/,
|
771
|
+
/func\b/,
|
772
|
+
/\s+/,
|
773
|
+
/\b[A-Za-z_][A-Za-z0-9_]*\b/
|
774
|
+
],
|
775
|
+
scope: {
|
776
|
+
1: "keyword",
|
777
|
+
3: "keyword",
|
778
|
+
5: "title.function"
|
779
|
+
}
|
780
|
+
};
|
781
|
+
const CLASS_VAR_DECLARATION = {
|
782
|
+
match: [
|
783
|
+
/class\b/,
|
784
|
+
/\s+/,
|
785
|
+
/var\b/
|
786
|
+
],
|
787
|
+
scope: {
|
788
|
+
1: "keyword",
|
789
|
+
3: "keyword"
|
790
|
+
}
|
791
|
+
};
|
792
|
+
const TYPE_DECLARATION = {
|
793
|
+
begin: [
|
794
|
+
/(struct|protocol|class|extension|enum|actor)/,
|
795
|
+
/\s+/,
|
796
|
+
identifier,
|
797
|
+
/\s*/
|
798
|
+
],
|
799
|
+
beginScope: {
|
800
|
+
1: "keyword",
|
801
|
+
3: "title.class"
|
802
|
+
},
|
803
|
+
keywords: KEYWORDS,
|
804
|
+
contains: [
|
805
|
+
GENERIC_PARAMETERS,
|
806
|
+
...KEYWORD_MODES,
|
807
|
+
{
|
808
|
+
begin: /:/,
|
809
|
+
end: /\{/,
|
810
|
+
keywords: KEYWORDS,
|
811
|
+
contains: [
|
812
|
+
{
|
813
|
+
scope: "title.class.inherited",
|
814
|
+
match: typeIdentifier
|
815
|
+
},
|
816
|
+
...KEYWORD_MODES
|
817
|
+
],
|
818
|
+
relevance: 0
|
819
|
+
}
|
820
|
+
]
|
821
|
+
};
|
766
822
|
for (const variant of STRING.variants) {
|
767
823
|
const interpolation = variant.contains.find((mode) => mode.label === "interpol");
|
768
824
|
interpolation.keywords = KEYWORDS;
|
@@ -793,19 +849,9 @@ function swift(hljs) {
|
|
793
849
|
...COMMENTS,
|
794
850
|
FUNCTION_OR_MACRO,
|
795
851
|
INIT_SUBSCRIPT,
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
excludeEnd: true,
|
800
|
-
keywords: KEYWORDS,
|
801
|
-
contains: [
|
802
|
-
hljs.inherit(hljs.TITLE_MODE, {
|
803
|
-
className: "title.class",
|
804
|
-
begin: /[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/
|
805
|
-
}),
|
806
|
-
...KEYWORD_MODES
|
807
|
-
]
|
808
|
-
},
|
852
|
+
CLASS_FUNC_DECLARATION,
|
853
|
+
CLASS_VAR_DECLARATION,
|
854
|
+
TYPE_DECLARATION,
|
809
855
|
OPERATOR_DECLARATION,
|
810
856
|
PRECEDENCEGROUP,
|
811
857
|
{
|
@@ -41,7 +41,9 @@ const KEYWORDS = [
|
|
41
41
|
"import",
|
42
42
|
"from",
|
43
43
|
"export",
|
44
|
-
"extends"
|
44
|
+
"extends",
|
45
|
+
// It's reached stage 3, which is "recommended for implementation":
|
46
|
+
"using"
|
45
47
|
];
|
46
48
|
const LITERALS = [
|
47
49
|
"true",
|
@@ -239,7 +241,7 @@ function javascript(hljs) {
|
|
239
241
|
// defined later
|
240
242
|
};
|
241
243
|
const HTML_TEMPLATE = {
|
242
|
-
begin: "html`",
|
244
|
+
begin: ".?html`",
|
243
245
|
end: "",
|
244
246
|
starts: {
|
245
247
|
end: "`",
|
@@ -252,7 +254,7 @@ function javascript(hljs) {
|
|
252
254
|
}
|
253
255
|
};
|
254
256
|
const CSS_TEMPLATE = {
|
255
|
-
begin: "css`",
|
257
|
+
begin: ".?css`",
|
256
258
|
end: "",
|
257
259
|
starts: {
|
258
260
|
end: "`",
|
@@ -265,7 +267,7 @@ function javascript(hljs) {
|
|
265
267
|
}
|
266
268
|
};
|
267
269
|
const GRAPHQL_TEMPLATE = {
|
268
|
-
begin: "gql`",
|
270
|
+
begin: ".?gql`",
|
269
271
|
end: "",
|
270
272
|
starts: {
|
271
273
|
end: "`",
|
@@ -361,7 +363,7 @@ function javascript(hljs) {
|
|
361
363
|
const PARAMS_CONTAINS = SUBST_AND_COMMENTS.concat([
|
362
364
|
// eat recursive parens in sub expressions
|
363
365
|
{
|
364
|
-
begin:
|
366
|
+
begin: /(\s*)\(/,
|
365
367
|
end: /\)/,
|
366
368
|
keywords: KEYWORDS$1,
|
367
369
|
contains: ["self"].concat(SUBST_AND_COMMENTS)
|
@@ -369,7 +371,9 @@ function javascript(hljs) {
|
|
369
371
|
]);
|
370
372
|
const PARAMS = {
|
371
373
|
className: "params",
|
372
|
-
|
374
|
+
// convert this to negative lookbehind in v12
|
375
|
+
begin: /(\s*)\(/,
|
376
|
+
// to match the parms with
|
373
377
|
end: /\)/,
|
374
378
|
excludeBegin: true,
|
375
379
|
excludeEnd: true,
|
@@ -482,9 +486,9 @@ function javascript(hljs) {
|
|
482
486
|
...BUILT_IN_GLOBALS,
|
483
487
|
"super",
|
484
488
|
"import"
|
485
|
-
]),
|
489
|
+
].map((x) => `${x}\\s*\\(`)),
|
486
490
|
IDENT_RE$1,
|
487
|
-
regex.lookahead(/\(/)
|
491
|
+
regex.lookahead(/\s*\(/)
|
488
492
|
),
|
489
493
|
className: "title.function",
|
490
494
|
relevance: 0
|
@@ -565,8 +569,8 @@ function javascript(hljs) {
|
|
565
569
|
NUMBER,
|
566
570
|
CLASS_REFERENCE,
|
567
571
|
{
|
568
|
-
|
569
|
-
|
572
|
+
scope: "attr",
|
573
|
+
match: IDENT_RE$1 + regex.lookahead(":"),
|
570
574
|
relevance: 0
|
571
575
|
},
|
572
576
|
FUNCTION_VARIABLE,
|
@@ -600,7 +604,7 @@ function javascript(hljs) {
|
|
600
604
|
skip: true
|
601
605
|
},
|
602
606
|
{
|
603
|
-
begin:
|
607
|
+
begin: /(\s*)\(/,
|
604
608
|
end: /\)/,
|
605
609
|
excludeBegin: true,
|
606
610
|
excludeEnd: true,
|
@@ -694,6 +698,7 @@ function javascript(hljs) {
|
|
694
698
|
};
|
695
699
|
}
|
696
700
|
function typescript(hljs) {
|
701
|
+
const regex = hljs.regex;
|
697
702
|
const tsLanguage = javascript(hljs);
|
698
703
|
const IDENT_RE$1 = IDENT_RE;
|
699
704
|
const TYPES2 = [
|
@@ -709,10 +714,15 @@ function typescript(hljs) {
|
|
709
714
|
"unknown"
|
710
715
|
];
|
711
716
|
const NAMESPACE = {
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
717
|
+
begin: [
|
718
|
+
/namespace/,
|
719
|
+
/\s+/,
|
720
|
+
hljs.IDENT_RE
|
721
|
+
],
|
722
|
+
beginScope: {
|
723
|
+
1: "keyword",
|
724
|
+
3: "title.class"
|
725
|
+
}
|
716
726
|
};
|
717
727
|
const INTERFACE = {
|
718
728
|
beginKeywords: "interface",
|
@@ -731,7 +741,7 @@ function typescript(hljs) {
|
|
731
741
|
};
|
732
742
|
const TS_SPECIFIC_KEYWORDS = [
|
733
743
|
"type",
|
734
|
-
"namespace",
|
744
|
+
// "namespace",
|
735
745
|
"interface",
|
736
746
|
"public",
|
737
747
|
"private",
|
@@ -741,7 +751,8 @@ function typescript(hljs) {
|
|
741
751
|
"abstract",
|
742
752
|
"readonly",
|
743
753
|
"enum",
|
744
|
-
"override"
|
754
|
+
"override",
|
755
|
+
"satisfies"
|
745
756
|
];
|
746
757
|
const KEYWORDS$1 = {
|
747
758
|
$pattern: IDENT_RE,
|
@@ -763,10 +774,26 @@ function typescript(hljs) {
|
|
763
774
|
};
|
764
775
|
Object.assign(tsLanguage.keywords, KEYWORDS$1);
|
765
776
|
tsLanguage.exports.PARAMS_CONTAINS.push(DECORATOR);
|
777
|
+
const ATTRIBUTE_HIGHLIGHT = tsLanguage.contains.find((c) => c.scope === "attr");
|
778
|
+
const OPTIONAL_KEY_OR_ARGUMENT = Object.assign(
|
779
|
+
{},
|
780
|
+
ATTRIBUTE_HIGHLIGHT,
|
781
|
+
{ match: regex.concat(IDENT_RE$1, regex.lookahead(/\s*\?:/)) }
|
782
|
+
);
|
783
|
+
tsLanguage.exports.PARAMS_CONTAINS.push([
|
784
|
+
tsLanguage.exports.CLASS_REFERENCE,
|
785
|
+
// class reference for highlighting the params types
|
786
|
+
ATTRIBUTE_HIGHLIGHT,
|
787
|
+
// highlight the params key
|
788
|
+
OPTIONAL_KEY_OR_ARGUMENT
|
789
|
+
// Added for optional property assignment highlighting
|
790
|
+
]);
|
766
791
|
tsLanguage.contains = tsLanguage.contains.concat([
|
767
792
|
DECORATOR,
|
768
793
|
NAMESPACE,
|
769
|
-
INTERFACE
|
794
|
+
INTERFACE,
|
795
|
+
OPTIONAL_KEY_OR_ARGUMENT
|
796
|
+
// Added for optional property assignment highlighting
|
770
797
|
]);
|
771
798
|
swapMode(tsLanguage, "shebang", hljs.SHEBANG());
|
772
799
|
swapMode(tsLanguage, "use_strict", USE_STRICT);
|
@@ -917,7 +917,7 @@ function expandOrCloneMode(mode) {
|
|
917
917
|
}
|
918
918
|
return mode;
|
919
919
|
}
|
920
|
-
var version = "11.
|
920
|
+
var version = "11.11.1";
|
921
921
|
class HTMLInjectionError extends Error {
|
922
922
|
constructor(reason, html) {
|
923
923
|
super(reason);
|
@@ -1237,6 +1237,7 @@ const HLJS = function(hljs) {
|
|
1237
1237
|
}
|
1238
1238
|
}
|
1239
1239
|
if (match.type === "illegal" && lexeme === "") {
|
1240
|
+
modeBuffer += "\n";
|
1240
1241
|
return 1;
|
1241
1242
|
}
|
1242
1243
|
if (iterations > 1e5 && iterations > match.index * 3) {
|
@@ -1426,20 +1427,19 @@ const HLJS = function(hljs) {
|
|
1426
1427
|
}
|
1427
1428
|
let wantsHighlight = false;
|
1428
1429
|
function highlightAll() {
|
1430
|
+
function boot() {
|
1431
|
+
highlightAll();
|
1432
|
+
}
|
1429
1433
|
if (document.readyState === "loading") {
|
1434
|
+
if (!wantsHighlight) {
|
1435
|
+
window.addEventListener("DOMContentLoaded", boot, false);
|
1436
|
+
}
|
1430
1437
|
wantsHighlight = true;
|
1431
1438
|
return;
|
1432
1439
|
}
|
1433
1440
|
const blocks = document.querySelectorAll(options.cssSelector);
|
1434
1441
|
blocks.forEach(highlightElement);
|
1435
1442
|
}
|
1436
|
-
function boot() {
|
1437
|
-
if (wantsHighlight)
|
1438
|
-
highlightAll();
|
1439
|
-
}
|
1440
|
-
if (typeof window !== "undefined" && window.addEventListener) {
|
1441
|
-
window.addEventListener("DOMContentLoaded", boot, false);
|
1442
|
-
}
|
1443
1443
|
function registerLanguage(languageName, languageDefinition) {
|
1444
1444
|
let lang = null;
|
1445
1445
|
try {
|