codelight.js 1.3.1 → 1.4.0

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.
@@ -1,4 +1,4 @@
1
- /*! codelight.js 1.3.1 | MIT License | https://github.com/codelightjs/codelight.js */
1
+ /*! codelight.js 1.4.0 | MIT License | https://github.com/codelightjs/codelight.js */
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -772,6 +772,413 @@ var yaml_default = defineLanguage({
772
772
  calls: false
773
773
  });
774
774
 
775
+ // src/languages/shellsession.ts
776
+ var PROMPT = /^(?:\([\w.-]+\)\s+)?(?:[\w.-]+@[\w.-]+(?::[^\s$#%>]*)?\s?)?[$#%❯>]\s|^PS [^>]*>\s/;
777
+ var shellsession = {
778
+ tokenizeLine(line, state) {
779
+ const s = state;
780
+ const prompt = s?.continues ? "" : PROMPT.exec(line)?.[0];
781
+ if (prompt === void 0) return { tokens: line ? [{ text: line }] : [], state: null };
782
+ const out = new LineBuilder();
783
+ out.add("meta", prompt);
784
+ const r = bash_default.tokenizeLine(line.slice(prompt.length), s?.bash ?? null);
785
+ for (const t of r.tokens) out.add(t.type, t.text);
786
+ const continues = /\\$/.test(line) || r.state !== null;
787
+ return { tokens: out.tokens, state: continues ? { bash: r.state, continues: true } : null };
788
+ }
789
+ };
790
+ var shellsession_default = shellsession;
791
+
792
+ // src/languages/http.ts
793
+ var METHOD = /^(GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS|CONNECT|TRACE)(\s+)(\S+)(?:(\s+)(HTTP\/[\d.]+))?\s*$/;
794
+ var STATUS = /^(HTTP\/[\d.]+)(\s+)(\d{3})(.*)$/;
795
+ var HEADER = /^([!#$%&'*+.^_`|~\w-]+)(:)(\s*)(.*)$/;
796
+ var http = {
797
+ tokenizeLine(line, state) {
798
+ const s = state ?? { body: false, inner: null };
799
+ const out = new LineBuilder();
800
+ if (/^###/.test(line)) {
801
+ out.add("comment", line);
802
+ return { tokens: out.tokens, state: null };
803
+ }
804
+ if (s.body) {
805
+ const r = json_default.tokenizeLine(line, s.inner);
806
+ return { tokens: r.tokens, state: { body: true, inner: r.state } };
807
+ }
808
+ if (!line.trim()) return { tokens: [], state: { body: true, inner: null } };
809
+ let m;
810
+ if (m = METHOD.exec(line)) {
811
+ out.add("keyword", m[1]);
812
+ out.add(void 0, m[2]);
813
+ out.add("string", m[3]);
814
+ if (m[5]) {
815
+ out.add(void 0, m[4]);
816
+ out.add("meta", m[5]);
817
+ }
818
+ } else if (m = STATUS.exec(line)) {
819
+ out.add("meta", m[1]);
820
+ out.add(void 0, m[2]);
821
+ out.add("number", m[3]);
822
+ out.add("string", m[4]);
823
+ } else if (m = HEADER.exec(line)) {
824
+ out.add("property", m[1]);
825
+ out.add("punctuation", m[2]);
826
+ out.add(void 0, m[3]);
827
+ out.add("string", m[4]);
828
+ } else if (/^\s*#/.test(line)) {
829
+ out.add("comment", line);
830
+ } else {
831
+ out.add(void 0, line);
832
+ }
833
+ return { tokens: out.tokens, state: s.inner === null && !s.body ? null : s };
834
+ }
835
+ };
836
+ var http_default = http;
837
+
838
+ // src/languages/scss.ts
839
+ var scss_default = defineLanguage({
840
+ lineComment: ["//"],
841
+ blockComment: [["/*", "*/"]],
842
+ strings: QUOTES,
843
+ rules: [
844
+ // A URL is text, so the `//` in `url(https://…)` isn't a comment.
845
+ { match: /(?<=url\()[^)'"]*(?=\))/, type: "string" },
846
+ { match: /\$[\w-]+|#\{[^}]*\}/, type: "variable" },
847
+ { match: /@[\w-]+/, type: "keyword" },
848
+ { match: /#[\da-fA-F]{3,8}(?![\w-])/, type: "number" },
849
+ { match: /(?:--|-?[A-Za-z])[\w-]*(?=\s*:(?!:)(?:[^{};#]|#\{[^}]*\}|#(?!\{))*(?:[;})]|$))/, type: "property" },
850
+ { match: /[.#%][A-Za-z_-][\w-]*/, type: "type" },
851
+ { match: /&/, type: "operator" },
852
+ { match: /::?[A-Za-z-]+/, type: "attr" },
853
+ { match: /!\s*(?:important|default|global)/, type: "keyword" }
854
+ ],
855
+ identifier: /-?[A-Za-z_][\w-]*/
856
+ });
857
+
858
+ // src/languages/mermaid.ts
859
+ var mermaid_default = defineLanguage({
860
+ lineComment: ["%%"],
861
+ strings: [{ open: '"' }],
862
+ keywords: "graph flowchart sequenceDiagram classDiagram stateDiagram erDiagram gantt pie journey gitGraph mindmap timeline quadrantChart requirementDiagram C4Context participant actor note Note over loop alt else opt par and critical break end activate deactivate rect autonumber title section class subgraph direction style classDef linkStyle click accTitle accDescr dateFormat axisFormat commit branch checkout merge state",
863
+ constants: "TD TB BT RL LR",
864
+ rules: [
865
+ { match: /\b(?:stateDiagram-v2|sankey-beta|xychart-beta|block-beta|packet-beta)\b/, type: "keyword" },
866
+ // Arrows and links: -->, ---, -.->, ==>, ->>, -->>, --x, --o, <-->
867
+ { match: /<?(?:-{2,}|={2,}|-\.+-?|-)(?:>>?|x|o|\))?(?![\w-])|<<-+/, type: "operator" },
868
+ // Node text: A[Box], B{Decision}, C((Circle)), D>Flag], E[[Sub]]
869
+ { match: /(?<=\w)(?:\[\[|\[\(|\(\(|\[|\(|\{\{|\{|>)[^\]\)\}\n]*?(?:\]\]|\)\]|\)\)|\]|\)|\}\}|\})/, type: "string" },
870
+ // Edge labels: -->|yes|
871
+ { match: /\|[^|\n]*\|/, type: "string" },
872
+ // Message text after a colon in sequence diagrams and notes
873
+ { match: /(?<=:\s*)[^:;\n]+$/, type: "string" }
874
+ ],
875
+ calls: false
876
+ });
877
+
878
+ // src/languages/latex.ts
879
+ var latex_default = defineLanguage({
880
+ lineComment: ["%"],
881
+ strings: [
882
+ // Maths: $$…$$ and \[…\] can span lines; $…$ and \(…\) are inline.
883
+ { open: "$$", multiline: true, escape: false },
884
+ { open: "\\[", close: "\\]", multiline: true, escape: false },
885
+ { open: "\\(", close: "\\)", escape: false },
886
+ { open: "$", escape: false }
887
+ ],
888
+ rules: [
889
+ // Escaped characters first, so \$ and \% aren't maths or a comment.
890
+ { match: /\\[$%&#_{}]/, type: "constant" },
891
+ { match: /(?<=\\(?:begin|end)\{)[^}]*/, type: "type" },
892
+ { match: /\\[A-Za-z@]+\*?/, type: "keyword" },
893
+ { match: /\\\\/, type: "operator" },
894
+ { match: /&/, type: "operator" }
895
+ ],
896
+ calls: false,
897
+ numbers: false,
898
+ operators: false
899
+ });
900
+
901
+ // src/languages/vba.ts
902
+ var vba_default = defineLanguage({
903
+ lineComment: ["'"],
904
+ // "" inside a string is a quote; two adjacent strings merge into one token, so it reads right.
905
+ strings: [{ open: '"', escape: false }],
906
+ keywords: "sub function end if then else elseif for each next do loop while wend until dim as set let private public const option explicit with select case exit call byval byref optional new is not and or xor mod to step resume on error goto property get class module type enum imports namespace inherits implements return try catch finally throw using redim preserve static friend shared overrides overridable handles of in andalso orelse like debug",
907
+ types: "integer long longlong string boolean double single date variant object byte currency decimal char short range worksheet workbook collection dictionary",
908
+ constants: "true false nothing null empty vbnullstring vbcrlf vblf vbtab vbnewline vbyes vbno vbokonly",
909
+ builtins: "msgbox inputbox format len left right mid trim ltrim rtrim ucase lcase replace split join instr cstr cint clng cdbl cbool cdate val isempty isnumeric isnull isarray isobject now date time dateadd datediff year month day ubound lbound array createobject",
910
+ caseInsensitive: true,
911
+ rules: [
912
+ { match: /(?<=^\s*|:\s*)Rem\b.*/i, type: "comment" },
913
+ { match: /#\d{1,2}\/\d{1,2}\/\d{2,4}#/, type: "number" },
914
+ { match: /(?<=^\s*)#(?:If|Else|ElseIf|End If|Const)\b.*/i, type: "meta" },
915
+ { match: /(?<=^\s*)Attribute\b.*/i, type: "meta" },
916
+ { match: /\s_$/, type: "operator" }
917
+ ]
918
+ // VBA capitalises everything (Rows, Value, Range), so capitals don't mean "type" here.
919
+ });
920
+
921
+ // src/languages/lua.ts
922
+ var lua_default = defineLanguage({
923
+ lineComment: ["--"],
924
+ blockComment: [["--[[", "]]"]],
925
+ strings: [{ open: "[[", close: "]]", escape: false, multiline: true }, { open: '"' }, { open: "'" }],
926
+ keywords: "and break do else elseif end for function goto if in local not or repeat return then until while",
927
+ constants: "true false nil",
928
+ builtins: "print pairs ipairs require type tostring tonumber assert error pcall setmetatable getmetatable select next"
929
+ });
930
+
931
+ // src/languages/dart.ts
932
+ var INTERPOLATE4 = ["${", "}"];
933
+ var dart_default = defineLanguage({
934
+ ...C_COMMENTS,
935
+ strings: [
936
+ { open: "r'''", close: "'''", escape: false, multiline: true },
937
+ { open: 'r"""', close: '"""', escape: false, multiline: true },
938
+ { open: "'''", multiline: true, interpolate: INTERPOLATE4 },
939
+ { open: '"""', multiline: true, interpolate: INTERPOLATE4 },
940
+ { open: "r'", close: "'", escape: false },
941
+ { open: 'r"', close: '"', escape: false },
942
+ { open: "'", interpolate: INTERPOLATE4 },
943
+ { open: '"', interpolate: INTERPOLATE4 }
944
+ ],
945
+ keywords: "abstract as assert async await base break case catch class const continue covariant default deferred do dynamic else enum export extends extension external factory final finally for get hide if implements import in interface is late library mixin new on operator part required rethrow return sealed set show static super switch sync this throw try typedef var when while with yield",
946
+ constants: "true false null",
947
+ types: "int double num bool String List Map Set Future Stream void Object Never Iterable Function",
948
+ rules: [{ match: /@[A-Za-z_]\w*/, type: "meta" }],
949
+ classNames: true
950
+ });
951
+
952
+ // src/languages/elixir.ts
953
+ var INTERPOLATE5 = ["#{", "}"];
954
+ var elixir_default = defineLanguage({
955
+ lineComment: ["#"],
956
+ strings: [
957
+ { open: '"""', multiline: true, interpolate: INTERPOLATE5 },
958
+ { open: '"', interpolate: INTERPOLATE5 },
959
+ { open: "'" }
960
+ ],
961
+ keywords: "def defp defmodule defmacro defmacrop defstruct defprotocol defimpl defdelegate defguard do end fn case cond with when if else unless import alias use require quote unquote receive after try catch rescue raise and or not in for",
962
+ constants: "true false nil",
963
+ rules: [
964
+ { match: /@[a-z_]\w*/, type: "meta" },
965
+ { match: /(?<![:\w]):[A-Za-z_]\w*[?!]?/, type: "constant" },
966
+ { match: /\b[a-z_]\w*[?!]?:(?=\s)/, type: "constant" },
967
+ { match: /~[a-zA-Z](?:"[^"]*"|\/[^/]*\/|\([^)]*\)|\[[^\]]*\]|\{[^}]*\})[a-z]*/, type: "regex" }
968
+ ],
969
+ identifier: /[A-Za-z_]\w*[?!]?/,
970
+ classNames: true
971
+ });
972
+
973
+ // src/languages/r.ts
974
+ var r_default = defineLanguage({
975
+ lineComment: ["#"],
976
+ strings: [...QUOTES, { open: "`", escape: false, type: "variable" }],
977
+ keywords: "function if else for while repeat in next break return",
978
+ constants: "TRUE FALSE NULL NA NA_integer_ NA_real_ NA_character_ Inf NaN T F",
979
+ rules: [{ match: /<<-|->>|<-|->|%[^%\s]*%|\|>/, type: "operator" }],
980
+ identifier: /[A-Za-z_.][\w.]*/
981
+ });
982
+
983
+ // src/languages/zig.ts
984
+ var zig_default = defineLanguage({
985
+ lineComment: ["//"],
986
+ strings: [{ open: '"' }, { open: "'" }],
987
+ keywords: "const var fn pub return if else while for switch struct enum union opaque error try catch defer errdefer comptime inline export extern test and or orelse unreachable break continue noreturn align packed threadlocal usingnamespace async await suspend resume nosuspend asm volatile allowzero callconv linksection noalias",
988
+ constants: "true false null undefined",
989
+ types: "i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize f16 f32 f64 f128 bool void anyerror anytype anyopaque type comptime_int comptime_float c_int c_uint",
990
+ rules: [
991
+ { match: /\\\\.*/, type: "string" },
992
+ { match: /@[A-Za-z_]\w*/, type: "function" }
993
+ ],
994
+ classNames: true
995
+ });
996
+
997
+ // src/languages/scala.ts
998
+ var INTERPOLATE6 = ["${", "}"];
999
+ var INTERPOLATED = ["s", "f", "raw"].flatMap((p) => [
1000
+ { open: `${p}"""`, close: '"""', multiline: true, escape: false, interpolate: INTERPOLATE6 },
1001
+ { open: `${p}"`, close: '"', escape: p !== "raw", interpolate: INTERPOLATE6 }
1002
+ ]);
1003
+ var scala_default = defineLanguage({
1004
+ ...C_COMMENTS,
1005
+ strings: [...INTERPOLATED, { open: '"""', multiline: true, escape: false }, { open: '"' }, { open: "'" }],
1006
+ keywords: "abstract case catch class def do else enum export extends final finally for forSome given if implicit import lazy match new object override package private protected return sealed super then this throw trait try type using val var while with yield end",
1007
+ constants: "true false null",
1008
+ types: "Int Long Double Float Boolean String Unit Any AnyRef Nothing Option Some None List Map Seq Vector Future",
1009
+ rules: [{ match: /@[A-Za-z_]\w*/, type: "meta" }],
1010
+ classNames: true
1011
+ });
1012
+
1013
+ // src/languages/haskell.ts
1014
+ var haskell_default = defineLanguage({
1015
+ lineComment: ["--"],
1016
+ blockComment: [["{-", "-}"]],
1017
+ strings: [{ open: '"' }],
1018
+ keywords: "module where import qualified as hiding data type newtype class instance deriving let in case of if then else do forall infixl infixr infix family default",
1019
+ constants: "True False Nothing Just Left Right",
1020
+ rules: [
1021
+ { match: /'(?:[^'\\]|\\.)'/, type: "string" },
1022
+ { match: /(?<=^)[a-z_][\w']*(?=\s*::)/, type: "function" }
1023
+ ],
1024
+ identifier: /[A-Za-z_][\w']*/,
1025
+ calls: false,
1026
+ classNames: true
1027
+ });
1028
+
1029
+ // src/languages/julia.ts
1030
+ var INTERPOLATE7 = ["$(", ")"];
1031
+ var julia_default = defineLanguage({
1032
+ lineComment: ["#"],
1033
+ blockComment: [["#=", "=#"]],
1034
+ strings: [
1035
+ { open: '"""', multiline: true, interpolate: INTERPOLATE7 },
1036
+ { open: '"', interpolate: INTERPOLATE7 },
1037
+ { open: "`", type: "string" }
1038
+ ],
1039
+ keywords: "function end if elseif else for while return module baremodule using import export struct mutable abstract primitive type begin let do try catch finally macro quote local global const where in isa break continue",
1040
+ constants: "true false nothing missing NaN Inf pi",
1041
+ types: "Int Int8 Int16 Int32 Int64 UInt8 Float32 Float64 Bool String Char Vector Matrix Array Dict Tuple Any Nothing",
1042
+ rules: [
1043
+ { match: /@[A-Za-z_]\w*/, type: "meta" },
1044
+ { match: /'(?:[^'\\]|\\.)'/, type: "string" }
1045
+ ],
1046
+ identifier: /[A-Za-z_]\w*!?/,
1047
+ classNames: true
1048
+ });
1049
+
1050
+ // src/languages/nginx.ts
1051
+ var nginx_default = defineLanguage({
1052
+ lineComment: ["#"],
1053
+ strings: [{ open: '"' }, { open: "'" }],
1054
+ constants: "on off",
1055
+ rules: [
1056
+ // Block names are keywords only where a statement starts, so `proxy_pass http://…` stays plain.
1057
+ { match: /(?<=^\s*)(?:http|server|location|upstream|events|stream|map|if|include|types|geo|split_clients|limit_except)\b/, type: "keyword" },
1058
+ { match: /\$[A-Za-z_]\w*/, type: "variable" },
1059
+ { match: /(?<=^\s*)(?!(?:http|server|location|upstream|events|stream|map|if|include|types|geo|split_clients|limit_except)\b)[a-z_]\w*(?=\s)(?!\s*\{)/, type: "property" },
1060
+ { match: /(?<=location\s+)(?:[=~^*]+\s*)?[^\s{]+/, type: "string" }
1061
+ ],
1062
+ identifier: /[A-Za-z_][\w.-]*/,
1063
+ calls: false
1064
+ });
1065
+
1066
+ // src/languages/makefile.ts
1067
+ var makefile_default = defineLanguage({
1068
+ strings: [{ open: '"' }, { open: "'", escape: false }],
1069
+ keywords: "include ifeq ifneq ifdef ifndef else endif define endef export unexport override vpath",
1070
+ rules: [
1071
+ { match: /(?<=^|\s)#.*/, type: "comment" },
1072
+ { match: /\$[({][^)}]*[)}]|\$[@<^?*%+]/, type: "variable" },
1073
+ { match: /^(?:\.PHONY|[\w./%${}()-]+(?:\s+[\w./%${}()-]+)*)(?=\s*::?(?!=))/, type: "function" },
1074
+ { match: /^[A-Za-z_][\w.-]*(?=\s*(?:[:?+!]?=))/, type: "property" }
1075
+ ],
1076
+ identifier: /[A-Za-z_][\w-]*/,
1077
+ calls: false
1078
+ });
1079
+
1080
+ // src/languages/ini.ts
1081
+ var ini_default = defineLanguage({
1082
+ strings: [{ open: '"' }, { open: "'", escape: false }],
1083
+ constants: "true false yes no on off",
1084
+ caseInsensitive: true,
1085
+ rules: [
1086
+ { match: /(?<=^\s*)[;#].*/, type: "comment" },
1087
+ { match: /(?<=^\s*)\[[^\]]*\]/, type: "tag" },
1088
+ { match: /(?<=^\s*)(?:export\s+)?[^\s=:;#[][^=:]*?(?=\s*[=:])/, type: "property" },
1089
+ { match: /\$\{[^}]*\}|\$[A-Za-z_]\w*/, type: "variable" }
1090
+ ],
1091
+ identifier: /[A-Za-z_][\w.-]*/,
1092
+ calls: false
1093
+ });
1094
+
1095
+ // src/languages/protobuf.ts
1096
+ var protobuf_default = defineLanguage({
1097
+ ...C_COMMENTS,
1098
+ strings: QUOTES,
1099
+ keywords: "syntax edition package import public weak message enum service rpc returns option repeated optional required oneof map reserved extensions extend stream to max",
1100
+ types: "double float int32 int64 uint32 uint64 sint32 sint64 fixed32 fixed64 sfixed32 sfixed64 bool string bytes",
1101
+ constants: "true false",
1102
+ calls: false,
1103
+ classNames: true
1104
+ });
1105
+
1106
+ // src/languages/solidity.ts
1107
+ var solidity_default = defineLanguage({
1108
+ ...C_COMMENTS,
1109
+ strings: QUOTES,
1110
+ keywords: "pragma solidity contract interface library abstract function modifier event emit error returns return if else for while do break continue public private internal external view pure payable memory storage calldata constant immutable override virtual mapping struct enum require revert assert using import is new delete try catch unchecked constructor fallback receive anonymous indexed",
1111
+ types: "address bool string bytes byte int uint uint8 uint16 uint32 uint64 uint128 uint256 int8 int16 int32 int64 int128 int256 bytes1 bytes4 bytes8 bytes16 bytes32",
1112
+ constants: "true false wei gwei ether seconds minutes hours days weeks",
1113
+ rules: [{ match: /\b(?:msg|block|tx|abi)\.\w+/, type: "variable" }],
1114
+ classNames: true
1115
+ });
1116
+
1117
+ // src/languages/groovy.ts
1118
+ var INTERPOLATE8 = ["${", "}"];
1119
+ var groovy_default = defineLanguage({
1120
+ ...C_COMMENTS,
1121
+ strings: [
1122
+ { open: '"""', multiline: true, interpolate: INTERPOLATE8 },
1123
+ { open: "'''", multiline: true },
1124
+ { open: '"', interpolate: INTERPOLATE8 },
1125
+ { open: "'" }
1126
+ ],
1127
+ keywords: "def var class interface enum trait import package return if else for while do switch case default break continue new in as instanceof try catch finally throw throws static final abstract private protected public assert extends implements this super",
1128
+ constants: "true false null",
1129
+ types: "int long double float boolean char byte short void String Object List Map",
1130
+ rules: [{ match: /@[A-Za-z_]\w*/, type: "meta" }],
1131
+ classNames: true
1132
+ });
1133
+
1134
+ // src/languages/nix.ts
1135
+ var INTERPOLATE9 = ["${", "}"];
1136
+ var nix_default = defineLanguage({
1137
+ lineComment: ["#"],
1138
+ blockComment: [["/*", "*/"]],
1139
+ strings: [
1140
+ { open: "''", multiline: true, escape: false, interpolate: INTERPOLATE9 },
1141
+ { open: '"', multiline: true, interpolate: INTERPOLATE9 }
1142
+ ],
1143
+ keywords: "let in with rec inherit if then else assert or",
1144
+ constants: "true false null",
1145
+ builtins: "import builtins derivation fetchurl fetchTarball fetchGit toString map throw abort",
1146
+ rules: [
1147
+ { match: /[A-Za-z_][\w'-]*(?:\.[A-Za-z_][\w'-]*)*(?=\s*=(?!=))/, type: "property" },
1148
+ { match: /(?:\.{0,2}\/|~\/)[\w./-]+|<[\w./-]+>/, type: "string" }
1149
+ ],
1150
+ identifier: /[A-Za-z_][\w'-]*/,
1151
+ calls: false
1152
+ });
1153
+
1154
+ // src/languages/cmake.ts
1155
+ var cmake_default = defineLanguage({
1156
+ lineComment: ["#"],
1157
+ blockComment: [["#[[", "]]"]],
1158
+ strings: [{ open: '"', multiline: true }],
1159
+ keywords: "if elseif else endif foreach endforeach while endwhile function endfunction macro endmacro return break continue",
1160
+ caseInsensitive: true,
1161
+ rules: [
1162
+ { match: /\$\{[^}]*\}|\$ENV\{[^}]*\}/, type: "variable" },
1163
+ { match: /\b[A-Z][A-Z0-9_]{1,}\b/, type: "constant" }
1164
+ ]
1165
+ });
1166
+
1167
+ // src/languages/prisma.ts
1168
+ var prisma_default = defineLanguage({
1169
+ lineComment: ["//"],
1170
+ strings: [{ open: '"' }],
1171
+ keywords: "model enum datasource generator type view",
1172
+ types: "String Int BigInt Float Decimal Boolean DateTime Json Bytes Unsupported",
1173
+ constants: "true false null",
1174
+ rules: [
1175
+ { match: /@@?[A-Za-z_][\w.]*/, type: "meta" },
1176
+ { match: /(?<=^\s*)(?!(?:model|enum|datasource|generator|type|view)\b)[a-z_]\w*(?=\s+[A-Za-z])/, type: "property" },
1177
+ { match: /(?<=^\s*)[a-z_]\w*(?=\s*=)/, type: "property" }
1178
+ ],
1179
+ classNames: true
1180
+ });
1181
+
775
1182
  // src/languages/index.ts
776
1183
  var LANGUAGES = {
777
1184
  javascript: javascript_default,
@@ -801,6 +1208,29 @@ var LANGUAGES = {
801
1208
  graphql: graphql_default,
802
1209
  powershell: powershell_default,
803
1210
  hcl: hcl_default,
1211
+ lua: lua_default,
1212
+ dart: dart_default,
1213
+ elixir: elixir_default,
1214
+ r: r_default,
1215
+ zig: zig_default,
1216
+ scala: scala_default,
1217
+ haskell: haskell_default,
1218
+ julia: julia_default,
1219
+ nginx: nginx_default,
1220
+ makefile: makefile_default,
1221
+ ini: ini_default,
1222
+ protobuf: protobuf_default,
1223
+ solidity: solidity_default,
1224
+ groovy: groovy_default,
1225
+ nix: nix_default,
1226
+ cmake: cmake_default,
1227
+ prisma: prisma_default,
1228
+ shellsession: shellsession_default,
1229
+ http: http_default,
1230
+ scss: scss_default,
1231
+ mermaid: mermaid_default,
1232
+ latex: latex_default,
1233
+ vba: vba_default,
804
1234
  plaintext: plain
805
1235
  };
806
1236
 
@@ -824,8 +1254,6 @@ var aliases = new Map(
824
1254
  shell: "bash",
825
1255
  zsh: "bash",
826
1256
  shellscript: "bash",
827
- console: "bash",
828
- terminal: "bash",
829
1257
  rb: "ruby",
830
1258
  golang: "go",
831
1259
  rs: "rust",
@@ -841,8 +1269,6 @@ var aliases = new Map(
841
1269
  mysql: "sql",
842
1270
  sqlite: "sql",
843
1271
  plsql: "sql",
844
- scss: "css",
845
- less: "css",
846
1272
  yml: "yaml",
847
1273
  html: "xml",
848
1274
  xhtml: "xml",
@@ -864,6 +1290,54 @@ var aliases = new Map(
864
1290
  tf: "hcl",
865
1291
  tfvars: "hcl",
866
1292
  opentofu: "hcl",
1293
+ luau: "lua",
1294
+ ex: "elixir",
1295
+ exs: "elixir",
1296
+ heex: "elixir",
1297
+ rscript: "r",
1298
+ jl: "julia",
1299
+ sc: "scala",
1300
+ hs: "haskell",
1301
+ lhs: "haskell",
1302
+ "nginx.conf": "nginx",
1303
+ make: "makefile",
1304
+ mk: "makefile",
1305
+ mak: "makefile",
1306
+ gnumakefile: "makefile",
1307
+ cfg: "ini",
1308
+ properties: "ini",
1309
+ env: "ini",
1310
+ dotenv: "ini",
1311
+ editorconfig: "ini",
1312
+ gitconfig: "ini",
1313
+ proto: "protobuf",
1314
+ proto3: "protobuf",
1315
+ sol: "solidity",
1316
+ gradle: "groovy",
1317
+ gvy: "groovy",
1318
+ jenkinsfile: "groovy",
1319
+ cmakelists: "cmake",
1320
+ "cmakelists.txt": "cmake",
1321
+ console: "shellsession",
1322
+ terminal: "shellsession",
1323
+ "shell-session": "shellsession",
1324
+ "sh-session": "shellsession",
1325
+ pwshsession: "shellsession",
1326
+ https: "http",
1327
+ rest: "http",
1328
+ "rest-client": "http",
1329
+ sass: "scss",
1330
+ less: "scss",
1331
+ mmd: "mermaid",
1332
+ tex: "latex",
1333
+ context: "latex",
1334
+ vb: "vba",
1335
+ vbnet: "vba",
1336
+ "vb.net": "vba",
1337
+ vbscript: "vba",
1338
+ vbs: "vba",
1339
+ "visual-basic": "vba",
1340
+ visualbasic: "vba",
867
1341
  text: "plaintext",
868
1342
  txt: "plaintext",
869
1343
  plain: "plaintext",
package/es/codelight.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! codelight.js 1.3.1 | MIT License | https://github.com/codelightjs/codelight.js */
1
+ /*! codelight.js 1.4.0 | MIT License | https://github.com/codelightjs/codelight.js */
2
2
  import {
3
3
  addCopyButton,
4
4
  createMarkup,
@@ -12,7 +12,7 @@ import {
12
12
  registerLanguage,
13
13
  renderLine,
14
14
  tokenize
15
- } from "./chunk-XG43K62Y.js";
15
+ } from "./chunk-KW6EHF3K.js";
16
16
 
17
17
  // src/lib/auto.ts
18
18
  var MARKDOWN_CLASS = /(?:^|\s)language-(\S+)/;
package/es/react.js CHANGED
@@ -1,9 +1,9 @@
1
- /*! codelight.js 1.3.1 | MIT License | https://github.com/codelightjs/codelight.js */
1
+ /*! codelight.js 1.4.0 | MIT License | https://github.com/codelightjs/codelight.js */
2
2
  import {
3
3
  copyText,
4
4
  highlight,
5
5
  mount
6
- } from "./chunk-XG43K62Y.js";
6
+ } from "./chunk-KW6EHF3K.js";
7
7
 
8
8
  // src/react.ts
9
9
  import { createElement, useEffect, useLayoutEffect, useRef, useState } from "react";