@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.
Files changed (127) hide show
  1. package/dist/es/KgCopilot/CopiCanvas/FilePreview.vue.mjs +7 -0
  2. package/dist/es/KgCopilot/CopiCanvas/FilePreview.vue2.mjs +81 -0
  3. package/dist/es/KgCopilot/CopiCanvas/FilePreview.vue3.mjs +4 -0
  4. package/dist/es/KgCopilot/CopiCanvas/FileSkeletion.vue.mjs +96 -0
  5. package/dist/es/KgCopilot/CopiCanvas/FileSkeletion.vue2.mjs +4 -0
  6. package/dist/es/KgCopilot/CopiCanvas/InitWrap.vue.mjs +7 -0
  7. package/dist/es/KgCopilot/CopiCanvas/InitWrap.vue2.mjs +41 -0
  8. package/dist/es/KgCopilot/CopiCanvas/InitWrap.vue3.mjs +4 -0
  9. package/dist/es/KgCopilot/CopiCanvas/index.vue.mjs +7 -0
  10. package/dist/es/KgCopilot/CopiCanvas/index.vue2.mjs +52 -0
  11. package/dist/es/KgCopilot/CopiCanvas/index.vue3.mjs +4 -0
  12. package/dist/es/KgCopilot/CopiFooter/SearchInput/InputFootTool.vue.mjs +7 -0
  13. package/dist/es/KgCopilot/CopiFooter/SearchInput/InputFootTool.vue2.mjs +61 -0
  14. package/dist/es/KgCopilot/CopiFooter/SearchInput/InputFootTool.vue3.mjs +4 -0
  15. package/dist/es/KgCopilot/CopiFooter/SearchInput/SelectPluginByKey.vue2.mjs +1 -1
  16. package/dist/es/KgCopilot/CopiFooter/SearchInput/index.vue.mjs +1 -1
  17. package/dist/es/KgCopilot/CopiFooter/SearchInput/index.vue2.mjs +34 -22
  18. package/dist/es/KgCopilot/CopiFooter/SearchInput/index.vue3.mjs +2 -2
  19. package/dist/es/KgCopilot/CopiFooter/index.vue.mjs +1 -1
  20. package/dist/es/KgCopilot/CopiFooter/index.vue3.mjs +2 -2
  21. package/dist/es/KgCopilot/dialogue/SuggestMessage.vue.mjs +7 -0
  22. package/dist/es/KgCopilot/dialogue/SuggestMessage.vue2.mjs +50 -0
  23. package/dist/es/KgCopilot/dialogue/SuggestMessage.vue3.mjs +4 -0
  24. package/dist/es/KgCopilot/dialogue/index.vue.mjs +1 -1
  25. package/dist/es/KgCopilot/dialogue/index.vue2.mjs +10 -4
  26. package/dist/es/KgCopilot/dialogue/index.vue3.mjs +2 -2
  27. package/dist/es/KgCopilot/dialogue/messageParse/fileBox.vue.mjs +19 -5
  28. package/dist/es/KgCopilot/dialogue/messageParse/fileBox.vue2.mjs +2 -2
  29. package/dist/es/KgCopilot/dialogue/messageParse/readMd.vue2.mjs +1 -1
  30. package/dist/es/KgCopilot/historyRecord/index.vue.mjs +1 -1
  31. package/dist/es/KgCopilot/historyRecord/index.vue2.mjs +6 -6
  32. package/dist/es/KgCopilot/historyRecord/index.vue3.mjs +2 -2
  33. package/dist/es/KgCopilot/index.vue.mjs +1 -1
  34. package/dist/es/KgCopilot/index.vue2.mjs +62 -39
  35. package/dist/es/KgCopilot/index.vue3.mjs +2 -2
  36. package/dist/es/_virtual/_commonjs-dynamic-modules.mjs +6 -0
  37. package/dist/es/_virtual/jszip.min.mjs +13 -0
  38. package/dist/es/api/copilot.mjs +8 -0
  39. package/dist/es/assets/empty.png.mjs +4 -0
  40. package/dist/es/directives/heighlight/index.mjs +27 -27
  41. package/dist/es/home/LFilter/FilterHead.vue.mjs +1 -1
  42. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.12/node_modules/@iconify-icons/ep/folder-opened.mjs +8 -0
  43. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.12/node_modules/@iconify-icons/ep/notebook.mjs +8 -0
  44. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.12/node_modules/@iconify-icons/ep/reading.mjs +8 -0
  45. package/dist/es/node_modules/.pnpm/@vueuse_core@9.13.0_vue@3.2.45/node_modules/@vueuse/core/index.mjs +8 -1
  46. package/dist/es/node_modules/.pnpm/@vueuse_shared@9.13.0_vue@3.2.45/node_modules/@vueuse/shared/index.mjs +115 -2
  47. package/dist/es/node_modules/.pnpm/call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/actualApply.mjs +12 -0
  48. package/dist/es/node_modules/.pnpm/call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/functionApply.mjs +12 -0
  49. package/dist/es/node_modules/.pnpm/call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/functionCall.mjs +4 -0
  50. package/dist/es/node_modules/.pnpm/call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/index.mjs +17 -0
  51. package/dist/es/node_modules/.pnpm/call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/reflectApply.mjs +4 -0
  52. package/dist/es/node_modules/.pnpm/call-bound@1.0.3/node_modules/call-bound/index.mjs +18 -0
  53. package/dist/es/node_modules/.pnpm/docx-preview@0.3.3/node_modules/docx-preview/dist/docx-preview.mjs +3877 -0
  54. package/dist/es/node_modules/.pnpm/{dompurify@3.1.5 → dompurify@3.2.3}/node_modules/dompurify/dist/purify.es.mjs +78 -87
  55. package/dist/es/node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.mjs +37 -0
  56. package/dist/es/node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.mjs +12 -0
  57. package/dist/es/node_modules/.pnpm/es-object-atoms@1.0.0/node_modules/es-object-atoms/index.mjs +4 -0
  58. package/dist/es/node_modules/.pnpm/{get-intrinsic@1.2.4 → get-intrinsic@1.2.6}/node_modules/get-intrinsic/index.mjs +43 -24
  59. package/dist/es/node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.mjs +4 -0
  60. package/dist/es/node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.mjs +13 -0
  61. package/dist/es/node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.mjs +29 -0
  62. package/dist/es/node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.mjs +59 -0
  63. package/dist/es/node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.mjs +13 -5
  64. 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
  65. 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
  66. 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
  67. 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
  68. 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
  69. 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
  70. 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
  71. 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
  72. 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
  73. 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
  74. 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
  75. 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
  76. 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
  77. 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
  78. 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
  79. 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
  80. 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
  81. 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
  82. 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
  83. package/dist/es/node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/dist/jszip.min.mjs +2649 -0
  84. package/dist/es/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.mjs +4 -0
  85. package/dist/es/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.mjs +4 -0
  86. package/dist/es/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.mjs +4 -0
  87. package/dist/es/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.mjs +4 -0
  88. package/dist/es/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.mjs +4 -0
  89. package/dist/es/node_modules/.pnpm/{object-inspect@1.13.1 → object-inspect@1.13.3}/node_modules/object-inspect/index.mjs +17 -4
  90. package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/stringify.mjs +1 -1
  91. package/dist/es/node_modules/.pnpm/side-channel-list@1.0.0/node_modules/side-channel-list/index.mjs +92 -0
  92. package/dist/es/node_modules/.pnpm/side-channel-map@1.0.1/node_modules/side-channel-map/index.mjs +56 -0
  93. package/dist/es/node_modules/.pnpm/side-channel-weakmap@1.0.2/node_modules/side-channel-weakmap/index.mjs +74 -0
  94. package/dist/es/node_modules/.pnpm/side-channel@1.1.0/node_modules/side-channel/index.mjs +40 -0
  95. package/dist/es/store/modules/copilot.mjs +68 -8
  96. package/dist/es/style.css +1 -1
  97. package/dist/es/utils/http/index.mjs +1 -1
  98. package/package.json +3 -2
  99. package/dist/es/_virtual/index.mjs +0 -13
  100. package/dist/es/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.mjs +0 -16
  101. package/dist/es/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.mjs +0 -36
  102. package/dist/es/node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.mjs +0 -48
  103. package/dist/es/node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.mjs +0 -22
  104. package/dist/es/node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.mjs +0 -14
  105. package/dist/es/node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.mjs +0 -19
  106. package/dist/es/node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.mjs +0 -11
  107. package/dist/es/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.mjs +0 -21
  108. package/dist/es/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.mjs +0 -48
  109. package/dist/es/node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.mjs +0 -54
  110. package/dist/es/node_modules/.pnpm/side-channel@1.0.6/node_modules/side-channel/index.mjs +0 -115
  111. /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
  112. /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
  113. /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
  114. /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
  115. /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
  116. /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
  117. /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
  118. /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
  119. /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
  120. /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
  121. /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
  122. /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
  123. /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
  124. /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
  125. /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
  126. /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
  127. /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
@@ -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
- begin: /\(/,
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
- className: "attr",
569
- begin: IDENT_RE$1 + regex.lookahead(":"),
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,
@@ -20,6 +20,7 @@ function json(hljs) {
20
20
  };
21
21
  return {
22
22
  name: "JSON",
23
+ aliases: ["jsonc"],
23
24
  keywords: {
24
25
  literal: LITERALS
25
26
  },
@@ -201,6 +201,11 @@ function markdown(hljs) {
201
201
  contains: CONTAINABLE,
202
202
  end: "$"
203
203
  };
204
+ const ENTITY = {
205
+ //https://spec.commonmark.org/0.31.2/#entity-references
206
+ scope: "literal",
207
+ match: /&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/
208
+ };
204
209
  return {
205
210
  name: "Markdown",
206
211
  aliases: [
@@ -218,7 +223,8 @@ function markdown(hljs) {
218
223
  CODE,
219
224
  HORIZONTAL_RULE,
220
225
  LINK,
221
- LINK_REFERENCE
226
+ LINK_REFERENCE,
227
+ ENTITY
222
228
  ]
223
229
  };
224
230
  }
@@ -9,6 +9,10 @@ function php(hljs) {
9
9
  /(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,
10
10
  NOT_PERL_ETC
11
11
  );
12
+ const UPCASE_NAME_RE = regex.concat(
13
+ /[A-Z]+/,
14
+ NOT_PERL_ETC
15
+ );
12
16
  const VARIABLE = {
13
17
  scope: "variable",
14
18
  match: "\\$+" + IDENT_RE
@@ -416,7 +420,13 @@ function php(hljs) {
416
420
  CONSTRUCTOR_CALL
417
421
  ];
418
422
  const ATTRIBUTES = {
419
- begin: regex.concat(/#\[\s*/, PASCAL_CASE_CLASS_NAME_RE),
423
+ begin: regex.concat(
424
+ /#\[\s*\\?/,
425
+ regex.either(
426
+ PASCAL_CASE_CLASS_NAME_RE,
427
+ UPCASE_NAME_RE
428
+ )
429
+ ),
420
430
  beginScope: "meta",
421
431
  end: /]/,
422
432
  endScope: "meta",
@@ -446,7 +456,10 @@ function php(hljs) {
446
456
  ...ATTRIBUTE_CONTAINS,
447
457
  {
448
458
  scope: "meta",
449
- match: PASCAL_CASE_CLASS_NAME_RE
459
+ variants: [
460
+ { match: PASCAL_CASE_CLASS_NAME_RE },
461
+ { match: UPCASE_NAME_RE }
462
+ ]
450
463
  }
451
464
  ]
452
465
  };
@@ -526,6 +539,7 @@ function php(hljs) {
526
539
  keywords: KEYWORDS,
527
540
  contains: [
528
541
  "self",
542
+ ATTRIBUTES,
529
543
  VARIABLE,
530
544
  LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,
531
545
  hljs.C_BLOCK_COMMENT_MODE,
@@ -346,7 +346,8 @@ function python(hljs) {
346
346
  NUMBER,
347
347
  {
348
348
  // very common convention
349
- begin: /\bself\b/
349
+ scope: "variable.language",
350
+ match: /\bself\b/
350
351
  },
351
352
  {
352
353
  // eat "if" prior to string so that it won't accidentally be
@@ -354,6 +355,7 @@ function python(hljs) {
354
355
  beginKeywords: "if",
355
356
  relevance: 0
356
357
  },
358
+ { match: /\bor\b/, scope: "keyword" },
357
359
  STRING,
358
360
  COMMENT_TYPE,
359
361
  hljs.HASH_COMMENT_MODE,
@@ -324,7 +324,7 @@ function ruby(hljs) {
324
324
  },
325
325
  {
326
326
  className: "params",
327
- begin: /\|/,
327
+ begin: /\|(?!=)/,
328
328
  end: /\|/,
329
329
  excludeBegin: true,
330
330
  excludeEnd: true,
@@ -34,7 +34,7 @@ const MODES = (hljs) => {
34
34
  }
35
35
  };
36
36
  };
37
- const TAGS = [
37
+ const HTML_TAGS = [
38
38
  "a",
39
39
  "abbr",
40
40
  "address",
@@ -86,11 +86,16 @@ const TAGS = [
86
86
  "nav",
87
87
  "object",
88
88
  "ol",
89
+ "optgroup",
90
+ "option",
89
91
  "p",
92
+ "picture",
90
93
  "q",
91
94
  "quote",
92
95
  "samp",
93
96
  "section",
97
+ "select",
98
+ "source",
94
99
  "span",
95
100
  "strong",
96
101
  "summary",
@@ -108,6 +113,53 @@ const TAGS = [
108
113
  "var",
109
114
  "video"
110
115
  ];
116
+ const SVG_TAGS = [
117
+ "defs",
118
+ "g",
119
+ "marker",
120
+ "mask",
121
+ "pattern",
122
+ "svg",
123
+ "switch",
124
+ "symbol",
125
+ "feBlend",
126
+ "feColorMatrix",
127
+ "feComponentTransfer",
128
+ "feComposite",
129
+ "feConvolveMatrix",
130
+ "feDiffuseLighting",
131
+ "feDisplacementMap",
132
+ "feFlood",
133
+ "feGaussianBlur",
134
+ "feImage",
135
+ "feMerge",
136
+ "feMorphology",
137
+ "feOffset",
138
+ "feSpecularLighting",
139
+ "feTile",
140
+ "feTurbulence",
141
+ "linearGradient",
142
+ "radialGradient",
143
+ "stop",
144
+ "circle",
145
+ "ellipse",
146
+ "image",
147
+ "line",
148
+ "path",
149
+ "polygon",
150
+ "polyline",
151
+ "rect",
152
+ "text",
153
+ "use",
154
+ "textPath",
155
+ "tspan",
156
+ "foreignObject",
157
+ "clipPath"
158
+ ];
159
+ const TAGS = [
160
+ ...HTML_TAGS,
161
+ ...SVG_TAGS
162
+ ];
111
163
  const MEDIA_FEATURES = [
112
164
  "any-hover",
113
165
  "any-pointer",
@@ -143,7 +195,7 @@ const MEDIA_FEATURES = [
143
195
  "max-width",
144
196
  "min-height",
145
197
  "max-height"
146
- ];
198
+ ].sort().reverse();
147
199
  const PSEUDO_CLASSES = [
148
200
  "active",
149
201
  "any-link",
@@ -218,7 +270,7 @@ const PSEUDO_CLASSES = [
218
270
  "visited",
219
271
  "where"
220
272
  // where()
221
- ];
273
+ ].sort().reverse();
222
274
  const PSEUDO_ELEMENTS = [
223
275
  "after",
224
276
  "backdrop",
@@ -234,13 +286,17 @@ const PSEUDO_ELEMENTS = [
234
286
  "selection",
235
287
  "slotted",
236
288
  "spelling-error"
237
- ];
289
+ ].sort().reverse();
238
290
  const ATTRIBUTES = [
291
+ "accent-color",
239
292
  "align-content",
240
293
  "align-items",
241
294
  "align-self",
295
+ "alignment-baseline",
242
296
  "all",
297
+ "anchor-name",
243
298
  "animation",
299
+ "animation-composition",
244
300
  "animation-delay",
245
301
  "animation-direction",
246
302
  "animation-duration",
@@ -248,7 +304,14 @@ const ATTRIBUTES = [
248
304
  "animation-iteration-count",
249
305
  "animation-name",
250
306
  "animation-play-state",
307
+ "animation-range",
308
+ "animation-range-end",
309
+ "animation-range-start",
310
+ "animation-timeline",
251
311
  "animation-timing-function",
312
+ "appearance",
313
+ "aspect-ratio",
314
+ "backdrop-filter",
252
315
  "backface-visibility",
253
316
  "background",
254
317
  "background-attachment",
@@ -258,8 +321,11 @@ const ATTRIBUTES = [
258
321
  "background-image",
259
322
  "background-origin",
260
323
  "background-position",
324
+ "background-position-x",
325
+ "background-position-y",
261
326
  "background-repeat",
262
327
  "background-size",
328
+ "baseline-shift",
263
329
  "block-size",
264
330
  "border",
265
331
  "border-block",
@@ -282,6 +348,8 @@ const ATTRIBUTES = [
282
348
  "border-bottom-width",
283
349
  "border-collapse",
284
350
  "border-color",
351
+ "border-end-end-radius",
352
+ "border-end-start-radius",
285
353
  "border-image",
286
354
  "border-image-outset",
287
355
  "border-image-repeat",
@@ -310,6 +378,8 @@ const ATTRIBUTES = [
310
378
  "border-right-style",
311
379
  "border-right-width",
312
380
  "border-spacing",
381
+ "border-start-end-radius",
382
+ "border-start-start-radius",
313
383
  "border-style",
314
384
  "border-top",
315
385
  "border-top-color",
@@ -319,7 +389,15 @@ const ATTRIBUTES = [
319
389
  "border-top-width",
320
390
  "border-width",
321
391
  "bottom",
392
+ "box-align",
322
393
  "box-decoration-break",
394
+ "box-direction",
395
+ "box-flex",
396
+ "box-flex-group",
397
+ "box-lines",
398
+ "box-ordinal-group",
399
+ "box-orient",
400
+ "box-pack",
323
401
  "box-shadow",
324
402
  "box-sizing",
325
403
  "break-after",
@@ -332,6 +410,11 @@ const ATTRIBUTES = [
332
410
  "clip-path",
333
411
  "clip-rule",
334
412
  "color",
413
+ "color-interpolation",
414
+ "color-interpolation-filters",
415
+ "color-profile",
416
+ "color-rendering",
417
+ "color-scheme",
335
418
  "column-count",
336
419
  "column-fill",
337
420
  "column-gap",
@@ -343,17 +426,34 @@ const ATTRIBUTES = [
343
426
  "column-width",
344
427
  "columns",
345
428
  "contain",
429
+ "contain-intrinsic-block-size",
430
+ "contain-intrinsic-height",
431
+ "contain-intrinsic-inline-size",
432
+ "contain-intrinsic-size",
433
+ "contain-intrinsic-width",
434
+ "container",
435
+ "container-name",
436
+ "container-type",
346
437
  "content",
347
438
  "content-visibility",
348
439
  "counter-increment",
349
440
  "counter-reset",
441
+ "counter-set",
350
442
  "cue",
351
443
  "cue-after",
352
444
  "cue-before",
353
445
  "cursor",
446
+ "cx",
447
+ "cy",
354
448
  "direction",
355
449
  "display",
450
+ "dominant-baseline",
356
451
  "empty-cells",
452
+ "enable-background",
453
+ "field-sizing",
454
+ "fill",
455
+ "fill-opacity",
456
+ "fill-rule",
357
457
  "filter",
358
458
  "flex",
359
459
  "flex-basis",
@@ -363,6 +463,8 @@ const ATTRIBUTES = [
363
463
  "flex-shrink",
364
464
  "flex-wrap",
365
465
  "float",
466
+ "flood-color",
467
+ "flood-opacity",
366
468
  "flow",
367
469
  "font",
368
470
  "font-display",
@@ -370,21 +472,32 @@ const ATTRIBUTES = [
370
472
  "font-feature-settings",
371
473
  "font-kerning",
372
474
  "font-language-override",
475
+ "font-optical-sizing",
476
+ "font-palette",
373
477
  "font-size",
374
478
  "font-size-adjust",
479
+ "font-smooth",
375
480
  "font-smoothing",
376
481
  "font-stretch",
377
482
  "font-style",
378
483
  "font-synthesis",
484
+ "font-synthesis-position",
485
+ "font-synthesis-small-caps",
486
+ "font-synthesis-style",
487
+ "font-synthesis-weight",
379
488
  "font-variant",
489
+ "font-variant-alternates",
380
490
  "font-variant-caps",
381
491
  "font-variant-east-asian",
492
+ "font-variant-emoji",
382
493
  "font-variant-ligatures",
383
494
  "font-variant-numeric",
384
495
  "font-variant-position",
385
496
  "font-variation-settings",
386
497
  "font-weight",
498
+ "forced-color-adjust",
387
499
  "gap",
500
+ "glyph-orientation-horizontal",
388
501
  "glyph-orientation-vertical",
389
502
  "grid",
390
503
  "grid-area",
@@ -404,19 +517,36 @@ const ATTRIBUTES = [
404
517
  "grid-template-rows",
405
518
  "hanging-punctuation",
406
519
  "height",
520
+ "hyphenate-character",
521
+ "hyphenate-limit-chars",
407
522
  "hyphens",
408
523
  "icon",
409
524
  "image-orientation",
410
525
  "image-rendering",
411
526
  "image-resolution",
412
527
  "ime-mode",
528
+ "initial-letter",
529
+ "initial-letter-align",
413
530
  "inline-size",
531
+ "inset",
532
+ "inset-area",
533
+ "inset-block",
534
+ "inset-block-end",
535
+ "inset-block-start",
536
+ "inset-inline",
537
+ "inset-inline-end",
538
+ "inset-inline-start",
414
539
  "isolation",
415
540
  "justify-content",
541
+ "justify-items",
542
+ "justify-self",
543
+ "kerning",
416
544
  "left",
417
545
  "letter-spacing",
546
+ "lighting-color",
418
547
  "line-break",
419
548
  "line-height",
549
+ "line-height-step",
420
550
  "list-style",
421
551
  "list-style-image",
422
552
  "list-style-position",
@@ -432,6 +562,11 @@ const ATTRIBUTES = [
432
562
  "margin-left",
433
563
  "margin-right",
434
564
  "margin-top",
565
+ "margin-trim",
566
+ "marker",
567
+ "marker-end",
568
+ "marker-mid",
569
+ "marker-start",
435
570
  "marks",
436
571
  "mask",
437
572
  "mask-border",
@@ -450,6 +585,10 @@ const ATTRIBUTES = [
450
585
  "mask-repeat",
451
586
  "mask-size",
452
587
  "mask-type",
588
+ "masonry-auto-flow",
589
+ "math-depth",
590
+ "math-shift",
591
+ "math-style",
453
592
  "max-block-size",
454
593
  "max-height",
455
594
  "max-inline-size",
@@ -468,6 +607,12 @@ const ATTRIBUTES = [
468
607
  "normal",
469
608
  "object-fit",
470
609
  "object-position",
610
+ "offset",
611
+ "offset-anchor",
612
+ "offset-distance",
613
+ "offset-path",
614
+ "offset-position",
615
+ "offset-rotate",
471
616
  "opacity",
472
617
  "order",
473
618
  "orphans",
@@ -477,9 +622,19 @@ const ATTRIBUTES = [
477
622
  "outline-style",
478
623
  "outline-width",
479
624
  "overflow",
625
+ "overflow-anchor",
626
+ "overflow-block",
627
+ "overflow-clip-margin",
628
+ "overflow-inline",
480
629
  "overflow-wrap",
481
630
  "overflow-x",
482
631
  "overflow-y",
632
+ "overlay",
633
+ "overscroll-behavior",
634
+ "overscroll-behavior-block",
635
+ "overscroll-behavior-inline",
636
+ "overscroll-behavior-x",
637
+ "overscroll-behavior-y",
483
638
  "padding",
484
639
  "padding-block",
485
640
  "padding-block-end",
@@ -491,23 +646,37 @@ const ATTRIBUTES = [
491
646
  "padding-left",
492
647
  "padding-right",
493
648
  "padding-top",
649
+ "page",
494
650
  "page-break-after",
495
651
  "page-break-before",
496
652
  "page-break-inside",
653
+ "paint-order",
497
654
  "pause",
498
655
  "pause-after",
499
656
  "pause-before",
500
657
  "perspective",
501
658
  "perspective-origin",
659
+ "place-content",
660
+ "place-items",
661
+ "place-self",
502
662
  "pointer-events",
503
663
  "position",
664
+ "position-anchor",
665
+ "position-visibility",
666
+ "print-color-adjust",
504
667
  "quotes",
668
+ "r",
505
669
  "resize",
506
670
  "rest",
507
671
  "rest-after",
508
672
  "rest-before",
509
673
  "right",
674
+ "rotate",
510
675
  "row-gap",
676
+ "ruby-align",
677
+ "ruby-position",
678
+ "scale",
679
+ "scroll-behavior",
511
680
  "scroll-margin",
512
681
  "scroll-margin-block",
513
682
  "scroll-margin-block-end",
@@ -533,26 +702,44 @@ const ATTRIBUTES = [
533
702
  "scroll-snap-align",
534
703
  "scroll-snap-stop",
535
704
  "scroll-snap-type",
705
+ "scroll-timeline",
706
+ "scroll-timeline-axis",
707
+ "scroll-timeline-name",
536
708
  "scrollbar-color",
537
709
  "scrollbar-gutter",
538
710
  "scrollbar-width",
539
711
  "shape-image-threshold",
540
712
  "shape-margin",
541
713
  "shape-outside",
714
+ "shape-rendering",
542
715
  "speak",
543
716
  "speak-as",
544
717
  "src",
545
718
  // @font-face
719
+ "stop-color",
720
+ "stop-opacity",
721
+ "stroke",
722
+ "stroke-dasharray",
723
+ "stroke-dashoffset",
724
+ "stroke-linecap",
725
+ "stroke-linejoin",
726
+ "stroke-miterlimit",
727
+ "stroke-opacity",
728
+ "stroke-width",
546
729
  "tab-size",
547
730
  "table-layout",
548
731
  "text-align",
549
732
  "text-align-all",
550
733
  "text-align-last",
734
+ "text-anchor",
551
735
  "text-combine-upright",
552
736
  "text-decoration",
553
737
  "text-decoration-color",
554
738
  "text-decoration-line",
739
+ "text-decoration-skip",
740
+ "text-decoration-skip-ink",
555
741
  "text-decoration-style",
742
+ "text-decoration-thickness",
556
743
  "text-emphasis",
557
744
  "text-emphasis-color",
558
745
  "text-emphasis-position",
@@ -563,20 +750,37 @@ const ATTRIBUTES = [
563
750
  "text-overflow",
564
751
  "text-rendering",
565
752
  "text-shadow",
753
+ "text-size-adjust",
566
754
  "text-transform",
755
+ "text-underline-offset",
567
756
  "text-underline-position",
757
+ "text-wrap",
758
+ "text-wrap-mode",
759
+ "text-wrap-style",
760
+ "timeline-scope",
568
761
  "top",
762
+ "touch-action",
569
763
  "transform",
570
764
  "transform-box",
571
765
  "transform-origin",
572
766
  "transform-style",
573
767
  "transition",
768
+ "transition-behavior",
574
769
  "transition-delay",
575
770
  "transition-duration",
576
771
  "transition-property",
577
772
  "transition-timing-function",
773
+ "translate",
578
774
  "unicode-bidi",
775
+ "user-modify",
776
+ "user-select",
777
+ "vector-effect",
579
778
  "vertical-align",
779
+ "view-timeline",
780
+ "view-timeline-axis",
781
+ "view-timeline-inset",
782
+ "view-timeline-name",
783
+ "view-transition-name",
580
784
  "visibility",
581
785
  "voice-balance",
582
786
  "voice-duration",
@@ -587,6 +791,7 @@ const ATTRIBUTES = [
587
791
  "voice-stress",
588
792
  "voice-volume",
589
793
  "white-space",
794
+ "white-space-collapse",
590
795
  "widows",
591
796
  "width",
592
797
  "will-change",
@@ -594,10 +799,11 @@ const ATTRIBUTES = [
594
799
  "word-spacing",
595
800
  "word-wrap",
596
801
  "writing-mode",
597
- "z-index"
598
- // reverse makes sure longer attributes `font-weight` are matched fully
599
- // instead of getting false positives on say `font`
600
- ].reverse();
802
+ "x",
803
+ "y",
804
+ "z-index",
805
+ "zoom"
806
+ ].sort().reverse();
601
807
  function stylus(hljs) {
602
808
  const modes = MODES(hljs);
603
809
  const AT_MODIFIERS = "and or not only";