@eqtylab/equality 3.5.0 → 3.6.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.
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/lib/syntax-language.cjs +82 -0
- package/dist/lib/syntax-language.cjs.map +1 -0
- package/dist/lib/syntax-language.d.cts +27 -0
- package/dist/lib/syntax-language.d.ts +27 -0
- package/dist/lib/syntax-language.js +77 -0
- package/dist/lib/syntax-language.js.map +1 -0
- package/package.json +8 -2
package/dist/index.d.cts
CHANGED
|
@@ -933,7 +933,7 @@ declare const TruncatedDescription: ({ className, description, maxLength, }: Tru
|
|
|
933
933
|
|
|
934
934
|
declare const iconVariants: (props?: ({
|
|
935
935
|
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
936
|
-
background?: "
|
|
936
|
+
background?: "circle" | "square" | "transparent" | null | undefined;
|
|
937
937
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
938
938
|
declare const iconElevationVariants: (props?: ({
|
|
939
939
|
elevation?: string | number | null | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -933,7 +933,7 @@ declare const TruncatedDescription: ({ className, description, maxLength, }: Tru
|
|
|
933
933
|
|
|
934
934
|
declare const iconVariants: (props?: ({
|
|
935
935
|
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
936
|
-
background?: "
|
|
936
|
+
background?: "circle" | "square" | "transparent" | null | undefined;
|
|
937
937
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
938
938
|
declare const iconElevationVariants: (props?: ({
|
|
939
939
|
elevation?: string | number | null | undefined;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/lib/syntax-language.ts
|
|
4
|
+
var GRAMMAR_BY_EXTENSION = {
|
|
5
|
+
as: "assembly",
|
|
6
|
+
asm: "assembly",
|
|
7
|
+
bash: "bash",
|
|
8
|
+
c: "c",
|
|
9
|
+
cc: "cpp",
|
|
10
|
+
cpp: "cpp",
|
|
11
|
+
cs: "csharp",
|
|
12
|
+
css: "css",
|
|
13
|
+
dart: "dart",
|
|
14
|
+
diff: "git-diff",
|
|
15
|
+
ex: "elixir",
|
|
16
|
+
exs: "elixir",
|
|
17
|
+
go: "go",
|
|
18
|
+
gql: "graphql",
|
|
19
|
+
graphql: "graphql",
|
|
20
|
+
h: "c",
|
|
21
|
+
heex: "heex",
|
|
22
|
+
hpp: "cpp",
|
|
23
|
+
htm: "html",
|
|
24
|
+
html: "html",
|
|
25
|
+
java: "java",
|
|
26
|
+
js: "javascript",
|
|
27
|
+
json: "json",
|
|
28
|
+
jsonc: "json",
|
|
29
|
+
jsx: "javascript",
|
|
30
|
+
kt: "kotlin",
|
|
31
|
+
kts: "kotlin",
|
|
32
|
+
lua: "lua",
|
|
33
|
+
m: "objective-c",
|
|
34
|
+
markdown: "markdown",
|
|
35
|
+
md: "markdown",
|
|
36
|
+
mdx: "markdown",
|
|
37
|
+
mjs: "javascript",
|
|
38
|
+
patch: "git-diff",
|
|
39
|
+
php: "php",
|
|
40
|
+
pl: "perl",
|
|
41
|
+
ps1: "powershell",
|
|
42
|
+
py: "python",
|
|
43
|
+
r: "r",
|
|
44
|
+
rb: "ruby",
|
|
45
|
+
rs: "rust",
|
|
46
|
+
sass: "scss",
|
|
47
|
+
scss: "scss",
|
|
48
|
+
sh: "bash",
|
|
49
|
+
sql: "sql",
|
|
50
|
+
svelte: "svelte",
|
|
51
|
+
swift: "swift",
|
|
52
|
+
toml: "toml",
|
|
53
|
+
ts: "typescript",
|
|
54
|
+
tsx: "tsx",
|
|
55
|
+
vue: "vue",
|
|
56
|
+
xml: "html",
|
|
57
|
+
yaml: "yaml",
|
|
58
|
+
yml: "yaml",
|
|
59
|
+
zsh: "bash"
|
|
60
|
+
};
|
|
61
|
+
var GRAMMAR_BY_FILENAME = {
|
|
62
|
+
dockerfile: "dockerfile",
|
|
63
|
+
gemfile: "ruby",
|
|
64
|
+
makefile: "bash",
|
|
65
|
+
procfile: "bash",
|
|
66
|
+
rakefile: "ruby"
|
|
67
|
+
};
|
|
68
|
+
var basenameOf = (fileName) => fileName.split("/").pop()?.toLowerCase() ?? "";
|
|
69
|
+
var extensionOf = (fileName) => {
|
|
70
|
+
const name = basenameOf(fileName);
|
|
71
|
+
const dot = name.lastIndexOf(".");
|
|
72
|
+
return dot > 0 ? name.slice(dot + 1) : "";
|
|
73
|
+
};
|
|
74
|
+
var grammarForFilename = (fileName) => GRAMMAR_BY_FILENAME[basenameOf(fileName)] ?? GRAMMAR_BY_EXTENSION[extensionOf(fileName)];
|
|
75
|
+
var hasFileExtension = (fileName) => extensionOf(fileName) !== "";
|
|
76
|
+
|
|
77
|
+
exports.GRAMMAR_BY_EXTENSION = GRAMMAR_BY_EXTENSION;
|
|
78
|
+
exports.GRAMMAR_BY_FILENAME = GRAMMAR_BY_FILENAME;
|
|
79
|
+
exports.grammarForFilename = grammarForFilename;
|
|
80
|
+
exports.hasFileExtension = hasFileExtension;
|
|
81
|
+
//# sourceMappingURL=syntax-language.cjs.map
|
|
82
|
+
//# sourceMappingURL=syntax-language.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/syntax-language.ts"],"names":[],"mappings":";;;AAQO,IAAM,oBAAA,GAA+C;AAAA,EAC1D,EAAA,EAAI,UAAA;AAAA,EACJ,GAAA,EAAK,UAAA;AAAA,EACL,IAAA,EAAM,MAAA;AAAA,EACN,CAAA,EAAG,GAAA;AAAA,EACH,EAAA,EAAI,KAAA;AAAA,EACJ,GAAA,EAAK,KAAA;AAAA,EACL,EAAA,EAAI,QAAA;AAAA,EACJ,GAAA,EAAK,KAAA;AAAA,EACL,IAAA,EAAM,MAAA;AAAA,EACN,IAAA,EAAM,UAAA;AAAA,EACN,EAAA,EAAI,QAAA;AAAA,EACJ,GAAA,EAAK,QAAA;AAAA,EACL,EAAA,EAAI,IAAA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IAAM,mBAAA,GAA8C;AAAA,EACzD,UAAA,EAAY,YAAA;AAAA,EACZ,OAAA,EAAS,MAAA;AAAA,EACT,QAAA,EAAU,MAAA;AAAA,EACV,QAAA,EAAU,MAAA;AAAA,EACV,QAAA,EAAU;AACZ;AAEA,IAAM,UAAA,GAAa,CAAC,QAAA,KAAqB,QAAA,CAAS,KAAA,CAAM,GAAG,CAAA,CAAE,GAAA,EAAI,EAAG,WAAA,EAAY,IAAK,EAAA;AAGrF,IAAM,WAAA,GAAc,CAAC,QAAA,KAAqB;AACxC,EAAA,MAAM,IAAA,GAAO,WAAW,QAAQ,CAAA;AAChC,EAAA,MAAM,GAAA,GAAM,IAAA,CAAK,WAAA,CAAY,GAAG,CAAA;AAChC,EAAA,OAAO,MAAM,CAAA,GAAI,IAAA,CAAK,KAAA,CAAM,GAAA,GAAM,CAAC,CAAA,GAAI,EAAA;AACzC,CAAA;AAOO,IAAM,kBAAA,GAAqB,CAAC,QAAA,KACjC,mBAAA,CAAoB,UAAA,CAAW,QAAQ,CAAC,CAAA,IAAK,oBAAA,CAAqB,WAAA,CAAY,QAAQ,CAAC;AASlF,IAAM,gBAAA,GAAmB,CAAC,QAAA,KAA8B,WAAA,CAAY,QAAQ,CAAA,KAAM","file":"syntax-language.cjs","sourcesContent":["/**\n * Which grammar highlights which file, keyed by extension.\n *\n * An extension that is absent renders as plain monospace rather than being guessed at: a wrong\n * grammar colours worse than none. Every value has to name a grammar the bundled highlighter\n * ships, which `src/scripts/check-grammars.js` asserts against its grammar directory on every\n * build.\n */\nexport const GRAMMAR_BY_EXTENSION: Record<string, string> = {\n as: 'assembly',\n asm: 'assembly',\n bash: 'bash',\n c: 'c',\n cc: 'cpp',\n cpp: 'cpp',\n cs: 'csharp',\n css: 'css',\n dart: 'dart',\n diff: 'git-diff',\n ex: 'elixir',\n exs: 'elixir',\n go: 'go',\n gql: 'graphql',\n graphql: 'graphql',\n h: 'c',\n heex: 'heex',\n hpp: 'cpp',\n htm: 'html',\n html: 'html',\n java: 'java',\n js: 'javascript',\n json: 'json',\n jsonc: 'json',\n jsx: 'javascript',\n kt: 'kotlin',\n kts: 'kotlin',\n lua: 'lua',\n m: 'objective-c',\n markdown: 'markdown',\n md: 'markdown',\n mdx: 'markdown',\n mjs: 'javascript',\n patch: 'git-diff',\n php: 'php',\n pl: 'perl',\n ps1: 'powershell',\n py: 'python',\n r: 'r',\n rb: 'ruby',\n rs: 'rust',\n sass: 'scss',\n scss: 'scss',\n sh: 'bash',\n sql: 'sql',\n svelte: 'svelte',\n swift: 'swift',\n toml: 'toml',\n ts: 'typescript',\n tsx: 'tsx',\n vue: 'vue',\n xml: 'html',\n yaml: 'yaml',\n yml: 'yaml',\n zsh: 'bash',\n};\n\n/** Files the ecosystem names rather than extends. */\nexport const GRAMMAR_BY_FILENAME: Record<string, string> = {\n dockerfile: 'dockerfile',\n gemfile: 'ruby',\n makefile: 'bash',\n procfile: 'bash',\n rakefile: 'ruby',\n};\n\nconst basenameOf = (fileName: string) => fileName.split('/').pop()?.toLowerCase() ?? '';\n\n// `.` alone is not an extension separator here: `.gitignore` is a name, not an extension.\nconst extensionOf = (fileName: string) => {\n const name = basenameOf(fileName);\n const dot = name.lastIndexOf('.');\n return dot > 0 ? name.slice(dot + 1) : '';\n};\n\n/**\n * The grammar for a file, by its own name first and then its extension.\n *\n * Matches on the basename, so a directory called `json/` cannot stand in for an extension.\n */\nexport const grammarForFilename = (fileName: string): string | undefined =>\n GRAMMAR_BY_FILENAME[basenameOf(fileName)] ?? GRAMMAR_BY_EXTENSION[extensionOf(fileName)];\n\n/**\n * Whether a name carries an extension at all.\n *\n * An extension this map does not cover is still the file's own answer — it says what it is and we\n * do not highlight it — so callers that fall back to sniffing bytes should only do so for a name\n * with nothing to go on. A leading dot is part of the name, so `.eslintrc` reports no extension.\n */\nexport const hasFileExtension = (fileName: string): boolean => extensionOf(fileName) !== '';\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which grammar highlights which file, keyed by extension.
|
|
3
|
+
*
|
|
4
|
+
* An extension that is absent renders as plain monospace rather than being guessed at: a wrong
|
|
5
|
+
* grammar colours worse than none. Every value has to name a grammar the bundled highlighter
|
|
6
|
+
* ships, which `src/scripts/check-grammars.js` asserts against its grammar directory on every
|
|
7
|
+
* build.
|
|
8
|
+
*/
|
|
9
|
+
declare const GRAMMAR_BY_EXTENSION: Record<string, string>;
|
|
10
|
+
/** Files the ecosystem names rather than extends. */
|
|
11
|
+
declare const GRAMMAR_BY_FILENAME: Record<string, string>;
|
|
12
|
+
/**
|
|
13
|
+
* The grammar for a file, by its own name first and then its extension.
|
|
14
|
+
*
|
|
15
|
+
* Matches on the basename, so a directory called `json/` cannot stand in for an extension.
|
|
16
|
+
*/
|
|
17
|
+
declare const grammarForFilename: (fileName: string) => string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Whether a name carries an extension at all.
|
|
20
|
+
*
|
|
21
|
+
* An extension this map does not cover is still the file's own answer — it says what it is and we
|
|
22
|
+
* do not highlight it — so callers that fall back to sniffing bytes should only do so for a name
|
|
23
|
+
* with nothing to go on. A leading dot is part of the name, so `.eslintrc` reports no extension.
|
|
24
|
+
*/
|
|
25
|
+
declare const hasFileExtension: (fileName: string) => boolean;
|
|
26
|
+
|
|
27
|
+
export { GRAMMAR_BY_EXTENSION, GRAMMAR_BY_FILENAME, grammarForFilename, hasFileExtension };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which grammar highlights which file, keyed by extension.
|
|
3
|
+
*
|
|
4
|
+
* An extension that is absent renders as plain monospace rather than being guessed at: a wrong
|
|
5
|
+
* grammar colours worse than none. Every value has to name a grammar the bundled highlighter
|
|
6
|
+
* ships, which `src/scripts/check-grammars.js` asserts against its grammar directory on every
|
|
7
|
+
* build.
|
|
8
|
+
*/
|
|
9
|
+
declare const GRAMMAR_BY_EXTENSION: Record<string, string>;
|
|
10
|
+
/** Files the ecosystem names rather than extends. */
|
|
11
|
+
declare const GRAMMAR_BY_FILENAME: Record<string, string>;
|
|
12
|
+
/**
|
|
13
|
+
* The grammar for a file, by its own name first and then its extension.
|
|
14
|
+
*
|
|
15
|
+
* Matches on the basename, so a directory called `json/` cannot stand in for an extension.
|
|
16
|
+
*/
|
|
17
|
+
declare const grammarForFilename: (fileName: string) => string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Whether a name carries an extension at all.
|
|
20
|
+
*
|
|
21
|
+
* An extension this map does not cover is still the file's own answer — it says what it is and we
|
|
22
|
+
* do not highlight it — so callers that fall back to sniffing bytes should only do so for a name
|
|
23
|
+
* with nothing to go on. A leading dot is part of the name, so `.eslintrc` reports no extension.
|
|
24
|
+
*/
|
|
25
|
+
declare const hasFileExtension: (fileName: string) => boolean;
|
|
26
|
+
|
|
27
|
+
export { GRAMMAR_BY_EXTENSION, GRAMMAR_BY_FILENAME, grammarForFilename, hasFileExtension };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// src/lib/syntax-language.ts
|
|
2
|
+
var GRAMMAR_BY_EXTENSION = {
|
|
3
|
+
as: "assembly",
|
|
4
|
+
asm: "assembly",
|
|
5
|
+
bash: "bash",
|
|
6
|
+
c: "c",
|
|
7
|
+
cc: "cpp",
|
|
8
|
+
cpp: "cpp",
|
|
9
|
+
cs: "csharp",
|
|
10
|
+
css: "css",
|
|
11
|
+
dart: "dart",
|
|
12
|
+
diff: "git-diff",
|
|
13
|
+
ex: "elixir",
|
|
14
|
+
exs: "elixir",
|
|
15
|
+
go: "go",
|
|
16
|
+
gql: "graphql",
|
|
17
|
+
graphql: "graphql",
|
|
18
|
+
h: "c",
|
|
19
|
+
heex: "heex",
|
|
20
|
+
hpp: "cpp",
|
|
21
|
+
htm: "html",
|
|
22
|
+
html: "html",
|
|
23
|
+
java: "java",
|
|
24
|
+
js: "javascript",
|
|
25
|
+
json: "json",
|
|
26
|
+
jsonc: "json",
|
|
27
|
+
jsx: "javascript",
|
|
28
|
+
kt: "kotlin",
|
|
29
|
+
kts: "kotlin",
|
|
30
|
+
lua: "lua",
|
|
31
|
+
m: "objective-c",
|
|
32
|
+
markdown: "markdown",
|
|
33
|
+
md: "markdown",
|
|
34
|
+
mdx: "markdown",
|
|
35
|
+
mjs: "javascript",
|
|
36
|
+
patch: "git-diff",
|
|
37
|
+
php: "php",
|
|
38
|
+
pl: "perl",
|
|
39
|
+
ps1: "powershell",
|
|
40
|
+
py: "python",
|
|
41
|
+
r: "r",
|
|
42
|
+
rb: "ruby",
|
|
43
|
+
rs: "rust",
|
|
44
|
+
sass: "scss",
|
|
45
|
+
scss: "scss",
|
|
46
|
+
sh: "bash",
|
|
47
|
+
sql: "sql",
|
|
48
|
+
svelte: "svelte",
|
|
49
|
+
swift: "swift",
|
|
50
|
+
toml: "toml",
|
|
51
|
+
ts: "typescript",
|
|
52
|
+
tsx: "tsx",
|
|
53
|
+
vue: "vue",
|
|
54
|
+
xml: "html",
|
|
55
|
+
yaml: "yaml",
|
|
56
|
+
yml: "yaml",
|
|
57
|
+
zsh: "bash"
|
|
58
|
+
};
|
|
59
|
+
var GRAMMAR_BY_FILENAME = {
|
|
60
|
+
dockerfile: "dockerfile",
|
|
61
|
+
gemfile: "ruby",
|
|
62
|
+
makefile: "bash",
|
|
63
|
+
procfile: "bash",
|
|
64
|
+
rakefile: "ruby"
|
|
65
|
+
};
|
|
66
|
+
var basenameOf = (fileName) => fileName.split("/").pop()?.toLowerCase() ?? "";
|
|
67
|
+
var extensionOf = (fileName) => {
|
|
68
|
+
const name = basenameOf(fileName);
|
|
69
|
+
const dot = name.lastIndexOf(".");
|
|
70
|
+
return dot > 0 ? name.slice(dot + 1) : "";
|
|
71
|
+
};
|
|
72
|
+
var grammarForFilename = (fileName) => GRAMMAR_BY_FILENAME[basenameOf(fileName)] ?? GRAMMAR_BY_EXTENSION[extensionOf(fileName)];
|
|
73
|
+
var hasFileExtension = (fileName) => extensionOf(fileName) !== "";
|
|
74
|
+
|
|
75
|
+
export { GRAMMAR_BY_EXTENSION, GRAMMAR_BY_FILENAME, grammarForFilename, hasFileExtension };
|
|
76
|
+
//# sourceMappingURL=syntax-language.js.map
|
|
77
|
+
//# sourceMappingURL=syntax-language.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/syntax-language.ts"],"names":[],"mappings":";AAQO,IAAM,oBAAA,GAA+C;AAAA,EAC1D,EAAA,EAAI,UAAA;AAAA,EACJ,GAAA,EAAK,UAAA;AAAA,EACL,IAAA,EAAM,MAAA;AAAA,EACN,CAAA,EAAG,GAAA;AAAA,EACH,EAAA,EAAI,KAAA;AAAA,EACJ,GAAA,EAAK,KAAA;AAAA,EACL,EAAA,EAAI,QAAA;AAAA,EACJ,GAAA,EAAK,KAAA;AAAA,EACL,IAAA,EAAM,MAAA;AAAA,EACN,IAAA,EAAM,UAAA;AAAA,EACN,EAAA,EAAI,QAAA;AAAA,EACJ,GAAA,EAAK,QAAA;AAAA,EACL,EAAA,EAAI,IAAA;AAAA,EACJ,GAAA,EAAK,SAAA;AAAA,EACL,OAAA,EAAS,SAAA;AAAA,EACT,CAAA,EAAG,GAAA;AAAA,EACH,IAAA,EAAM,MAAA;AAAA,EACN,GAAA,EAAK,KAAA;AAAA,EACL,GAAA,EAAK,MAAA;AAAA,EACL,IAAA,EAAM,MAAA;AAAA,EACN,IAAA,EAAM,MAAA;AAAA,EACN,EAAA,EAAI,YAAA;AAAA,EACJ,IAAA,EAAM,MAAA;AAAA,EACN,KAAA,EAAO,MAAA;AAAA,EACP,GAAA,EAAK,YAAA;AAAA,EACL,EAAA,EAAI,QAAA;AAAA,EACJ,GAAA,EAAK,QAAA;AAAA,EACL,GAAA,EAAK,KAAA;AAAA,EACL,CAAA,EAAG,aAAA;AAAA,EACH,QAAA,EAAU,UAAA;AAAA,EACV,EAAA,EAAI,UAAA;AAAA,EACJ,GAAA,EAAK,UAAA;AAAA,EACL,GAAA,EAAK,YAAA;AAAA,EACL,KAAA,EAAO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C,mBAAA,CAAoB,UAAA,CAAW,QAAQ,CAAC,CAAA,IAAK,oBAAA,CAAqB,WAAA,CAAY,QAAQ,CAAC;AASlF,IAAM,gBAAA,GAAmB,CAAC,QAAA,KAA8B,WAAA,CAAY,QAAQ,CAAA,KAAM","file":"syntax-language.js","sourcesContent":["/**\n * Which grammar highlights which file, keyed by extension.\n *\n * An extension that is absent renders as plain monospace rather than being guessed at: a wrong\n * grammar colours worse than none. Every value has to name a grammar the bundled highlighter\n * ships, which `src/scripts/check-grammars.js` asserts against its grammar directory on every\n * build.\n */\nexport const GRAMMAR_BY_EXTENSION: Record<string, string> = {\n as: 'assembly',\n asm: 'assembly',\n bash: 'bash',\n c: 'c',\n cc: 'cpp',\n cpp: 'cpp',\n cs: 'csharp',\n css: 'css',\n dart: 'dart',\n diff: 'git-diff',\n ex: 'elixir',\n exs: 'elixir',\n go: 'go',\n gql: 'graphql',\n graphql: 'graphql',\n h: 'c',\n heex: 'heex',\n hpp: 'cpp',\n htm: 'html',\n html: 'html',\n java: 'java',\n js: 'javascript',\n json: 'json',\n jsonc: 'json',\n jsx: 'javascript',\n kt: 'kotlin',\n kts: 'kotlin',\n lua: 'lua',\n m: 'objective-c',\n markdown: 'markdown',\n md: 'markdown',\n mdx: 'markdown',\n mjs: 'javascript',\n patch: 'git-diff',\n php: 'php',\n pl: 'perl',\n ps1: 'powershell',\n py: 'python',\n r: 'r',\n rb: 'ruby',\n rs: 'rust',\n sass: 'scss',\n scss: 'scss',\n sh: 'bash',\n sql: 'sql',\n svelte: 'svelte',\n swift: 'swift',\n toml: 'toml',\n ts: 'typescript',\n tsx: 'tsx',\n vue: 'vue',\n xml: 'html',\n yaml: 'yaml',\n yml: 'yaml',\n zsh: 'bash',\n};\n\n/** Files the ecosystem names rather than extends. */\nexport const GRAMMAR_BY_FILENAME: Record<string, string> = {\n dockerfile: 'dockerfile',\n gemfile: 'ruby',\n makefile: 'bash',\n procfile: 'bash',\n rakefile: 'ruby',\n};\n\nconst basenameOf = (fileName: string) => fileName.split('/').pop()?.toLowerCase() ?? '';\n\n// `.` alone is not an extension separator here: `.gitignore` is a name, not an extension.\nconst extensionOf = (fileName: string) => {\n const name = basenameOf(fileName);\n const dot = name.lastIndexOf('.');\n return dot > 0 ? name.slice(dot + 1) : '';\n};\n\n/**\n * The grammar for a file, by its own name first and then its extension.\n *\n * Matches on the basename, so a directory called `json/` cannot stand in for an extension.\n */\nexport const grammarForFilename = (fileName: string): string | undefined =>\n GRAMMAR_BY_FILENAME[basenameOf(fileName)] ?? GRAMMAR_BY_EXTENSION[extensionOf(fileName)];\n\n/**\n * Whether a name carries an extension at all.\n *\n * An extension this map does not cover is still the file's own answer — it says what it is and we\n * do not highlight it — so callers that fall back to sniffing bytes should only do so for a name\n * with nothing to go on. A leading dot is part of the name, so `.eslintrc` reports no extension.\n */\nexport const hasFileExtension = (fileName: string): boolean => extensionOf(fileName) !== '';\n"]}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@eqtylab/equality",
|
|
3
3
|
"description": "EQTYLab's component and token-based design system",
|
|
4
4
|
"homepage": "https://equality.eqtylab.io/",
|
|
5
|
-
"version": "3.
|
|
5
|
+
"version": "3.6.0",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"component library",
|
|
@@ -25,6 +25,11 @@
|
|
|
25
25
|
"import": "./dist/scripts.js",
|
|
26
26
|
"require": "./dist/scripts.cjs"
|
|
27
27
|
},
|
|
28
|
+
"./syntax-language": {
|
|
29
|
+
"types": "./dist/lib/syntax-language.d.ts",
|
|
30
|
+
"import": "./dist/lib/syntax-language.js",
|
|
31
|
+
"require": "./dist/lib/syntax-language.cjs"
|
|
32
|
+
},
|
|
28
33
|
"./theme-config.css": "./dist/global-theme-config.css",
|
|
29
34
|
"./preflight.css": "./dist/theme-preflight-global.css",
|
|
30
35
|
"./preflight-scoped.css": "./dist/theme-preflight-scoped.css"
|
|
@@ -95,7 +100,8 @@
|
|
|
95
100
|
"build": "pnpm run build:tokens && pnpm run build:lib",
|
|
96
101
|
"build:tokens": "node src/scripts/build-tokens.js && prettier --write ../tokens/equality-tokens.json",
|
|
97
102
|
"build:preflight": "node src/scripts/build-preflight.js && prettier --write src/theme/theme-preflight-global.css",
|
|
98
|
-
"
|
|
103
|
+
"check:grammars": "node src/scripts/check-grammars.js",
|
|
104
|
+
"build:lib": "pnpm run build:preflight && pnpm run check:grammars && tsup --config tsup.config.ts && cp src/theme/*.css dist/ && mkdir -p dist/generated && cp src/theme/generated/*.css dist/generated/",
|
|
99
105
|
"watch": "tsup --config tsup.config.ts --watch",
|
|
100
106
|
"watch:tokens": "chokidar '../tokens/equality-tokens.json' --debounce 300 --initial=false -c 'pnpm run build:tokens'",
|
|
101
107
|
"release": "pnpm run build && pnpm publish --access public --no-git-checks"
|