anubis-ui 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,2 @@
1
+ # anubis-ui
2
+ Class-based css generator
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "anubis-ui",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Class-based css generator",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
8
8
  },
9
+ "style": "dist/_anubis.scss",
9
10
  "repository": {
10
11
  "type": "git",
11
12
  "url": "git+https://github.com/HugoLMTY/anubis-ui.git"
@@ -15,5 +16,14 @@
15
16
  "bugs": {
16
17
  "url": "https://github.com/HugoLMTY/anubis-ui/issues"
17
18
  },
18
- "homepage": "https://github.com/HugoLMTY/anubis-ui#readme"
19
+ "homepage": "https://github.com/HugoLMTY/anubis-ui#readme",
20
+ "devDependencies": {
21
+ "@types/node": "^22.14.1",
22
+ "typescript": "^5.8.3",
23
+ "vite": "^6.3.2"
24
+ },
25
+ "dependencies": {
26
+ "fast-glob": "^3.3.3",
27
+ "fs": "^0.0.1-security"
28
+ }
19
29
  }
@@ -0,0 +1,9 @@
1
+ [
2
+ "primary",
3
+ "secondary",
4
+ "accent",
5
+ "neutral",
6
+ "success",
7
+ "warning",
8
+ "danger"
9
+ ]
@@ -0,0 +1,60 @@
1
+ import fs from 'fs'
2
+ import path from 'path'
3
+ import { log } from '../tools/logger'
4
+
5
+ interface IPreset {
6
+ [key: string]: string
7
+ }
8
+ interface IEnvConfig {
9
+ files: {
10
+ targets: string|string[],
11
+ ignore: string[]
12
+ },
13
+ colors: string[],
14
+ selectors: {
15
+ states: string[],
16
+ prefixes: string[]
17
+ },
18
+ presets: {
19
+ 'border': IPreset[],
20
+ 'inner-border': IPreset[],
21
+ 'shadow': IPreset[],
22
+ },
23
+ [key: string]: any
24
+ }
25
+
26
+ const configFolder = path.join(__dirname, '..', 'config')
27
+ const configFiles = [
28
+ 'files',
29
+ 'colors',
30
+ 'presets',
31
+ 'selectors'
32
+ ]
33
+
34
+ const config = {
35
+ files: { targets: [], ignore: [] },
36
+ colors: [],
37
+ selectors: { states: [], prefixes: [] },
38
+ presets: {
39
+ border: [],
40
+ "inner-border": [],
41
+ shadow: [],
42
+ },
43
+ } as IEnvConfig
44
+
45
+ const init = () => {
46
+ for (const file of configFiles) {
47
+ const filePath = path.join(configFolder, `${file}.config.json`)
48
+
49
+ const configContent = fs.readFileSync(filePath, { encoding: 'utf-8' })
50
+
51
+ config[file as keyof typeof config] = JSON.parse(configContent)
52
+ }
53
+
54
+ return config
55
+ }
56
+
57
+ export {
58
+ init,
59
+ config
60
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "targets": [
3
+ "**/*.vue"
4
+ ]
5
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "border": [
3
+ { "default": "4px" },
4
+ { "thinest": "1px" },
5
+ { "thiner": "2px" },
6
+ { "thin": "3px" },
7
+ { "thick": "6px" },
8
+ { "thicker": "8px" },
9
+ { "thickest": "10px" },
10
+ { "node": "0.2rem" }
11
+ ],
12
+
13
+ "innerBorder": [
14
+ { "default": "4px" },
15
+ { "thinest": "1px" },
16
+ { "thiner": "2px" },
17
+ { "thin": "3px" },
18
+ { "thick": "6px" },
19
+ { "thicker": "8px" },
20
+ { "thickest": "10px" },
21
+ { "node": "0.2rem" }
22
+ ],
23
+
24
+ "shadow": [
25
+ { "default": "0px 0px 7px 1px" },
26
+ { "densest": "0px 0px 3px 1px" },
27
+ { "denser": "0px 0px 5px 1px" },
28
+ { "dense": "0px 0px 5px 1px" },
29
+ { "wide": "0px 0px 10px 1px" },
30
+ { "wider": "0px 0px 15px 1px" },
31
+ { "widest": "0px 0px 20px 1px" }
32
+ ]
33
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "states": [
3
+ "hover",
4
+ "not-hover"
5
+ ],
6
+ "prefixes": [
7
+ "bg",
8
+ "text",
9
+ "border",
10
+ "inner-border",
11
+ "shadow"
12
+ ]
13
+ }
@@ -0,0 +1,47 @@
1
+ [
2
+ {
3
+ "defaultBorderRadius": "6px",
4
+ "borderRadiuses": [
5
+ { "lessest": "2px" },
6
+ { "lesser": "3px" },
7
+ { "less": "4px" },
8
+ { "more": "6px" },
9
+ { "morer": "8px" },
10
+ { "morest": "12px" },
11
+ { "half": "25%" },
12
+ { "full": "50%" }
13
+ ],
14
+
15
+ "defaultBorderWidth": "4px",
16
+ "borderWidths": [
17
+ { "thinest": "1px" },
18
+ { "thiner": "2px" },
19
+ { "thin": "3px" },
20
+ { "thick": "6px" },
21
+ { "thicker": "8px" },
22
+ { "thickest": "10px" },
23
+ { "node": "0.2rem" }
24
+ ],
25
+
26
+ "defaultInnerBorderWidth": "4px",
27
+ "innerBorderWidths": [
28
+ { "thinest": "1px" },
29
+ { "thiner": "2px" },
30
+ { "thin": "3px" },
31
+ { "thick": "6px" },
32
+ { "thicker": "8px" },
33
+ { "thickest": "10px" },
34
+ { "node": "0.2rem" }
35
+ ],
36
+
37
+ "defaultShadow": "0px 0px 7px 1px",
38
+ "shadowWidths": [
39
+ { "densest": "0px 0px 3px 1px" },
40
+ { "denser": "0px 0px 5px 1px" },
41
+ { "dense": "0px 0px 5px 1px" },
42
+ { "wide": "0px 0px 10px 1px" },
43
+ { "wider": "0px 0px 15px 1px" },
44
+ { "widest": "0px 0px 20px 1px" }
45
+ ]
46
+ }
47
+ ]
@@ -0,0 +1,30 @@
1
+ {
2
+ "states": [
3
+ {
4
+ "prefix": "hover",
5
+ "selector": ":hover"
6
+ },
7
+ {
8
+ "prefix": "not-hover",
9
+ "selector": ":not(:hover)"
10
+ }
11
+ ],
12
+ "prefixes": [
13
+ {
14
+ "prefix": "bg",
15
+ "selector": "background: ${value} !important"
16
+ },
17
+ {
18
+ "prefix": "border",
19
+ "selector": "border-width: 1px; border-style: solid; border-color: ${value} !important"
20
+ },
21
+ {
22
+ "prefix": "inner-border",
23
+ "selector": "box-shadow: inset ${value} !important"
24
+ },
25
+ {
26
+ "prefix": "shadow",
27
+ "selector": "box-shadow: ${value} !important"
28
+ }
29
+ ]
30
+ }
package/src/index.ts ADDED
@@ -0,0 +1,43 @@
1
+ import { Plugin } from 'vite'
2
+
3
+ import { init as initConfig } from './config/config.tool'
4
+ import { log, logo, logPrefix } from './tools/logger'
5
+ // import { init as initPresets } from './config/'
6
+ import { init as initClassExtraction } from './tools/extract/classes'
7
+
8
+ /** List every imported colors across the projet */
9
+ const colors: string[] = []
10
+
11
+ const init = async () => {
12
+ console.time(`${logPrefix} Config initialized in`)
13
+ initConfig()
14
+ console.timeEnd(`${logPrefix} Config initialized in`)
15
+ log('---')
16
+
17
+ console.time(`${logPrefix} Rules generated in`)
18
+ await initClassExtraction()
19
+ console.timeEnd(`${logPrefix} Rules generated in`)
20
+ log('---')
21
+ }
22
+
23
+ export default function AnubisUI (): Plugin {
24
+ return {
25
+ name: 'anubis-ui',
26
+ configureServer(server: any) {
27
+ server.watcher.on('change', (file: any) => {
28
+ console.log({ file })
29
+ })
30
+ },
31
+ async buildStart() {
32
+ logo()
33
+
34
+ console.time(`${logPrefix} Anubis initialized in`)
35
+ await init()
36
+ console.timeEnd(`${logPrefix} Anubis initialized in`)
37
+ }
38
+ }
39
+ }
40
+
41
+ export {
42
+ colors
43
+ }
@@ -0,0 +1,19 @@
1
+ interface IConfigDeclaration {
2
+ [key: string]: string,
3
+ }
4
+
5
+ export interface IConfigPresets {
6
+ defaultInnerBorderWidth?: string
7
+ innerBorderWidths?: IConfigDeclaration[]
8
+
9
+ defaultBorderWidth?: string
10
+ borderWidths?: IConfigDeclaration[]
11
+
12
+ defaultShadow?: string,
13
+ shadowWidths?: IConfigDeclaration[]
14
+
15
+ defaultBorderRadius?: string
16
+ borderRadiuses?: IConfigDeclaration[]
17
+
18
+ fontWeights?: IConfigDeclaration[]
19
+ }
@@ -0,0 +1,10 @@
1
+ export interface IDeclaration {
2
+ /** Color variable name, defined in the DOM :root */
3
+ name: string
4
+
5
+ /** Hexadecimal color code */
6
+ color: string|number
7
+
8
+ // light?: string
9
+ // dark?: string
10
+ }
@@ -0,0 +1,4 @@
1
+ export interface IFileConfig {
2
+ targets: string|string[]
3
+ ignore: string[]
4
+ }
File without changes
@@ -0,0 +1,4 @@
1
+ import AnubisUI from "..";
2
+
3
+ //@ts-ignore
4
+ AnubisUI()?.buildStart()
@@ -0,0 +1,36 @@
1
+ import fs from 'fs'
2
+ import path from 'path'
3
+ import { log } from './logger'
4
+
5
+ const distDir = path.join(__dirname, '..', '..', 'dist')
6
+ const outputPath = path.join(distDir, '_anubis.scss')
7
+
8
+ const checkCssRuleFilePresence = () => {
9
+ try {
10
+ fs.mkdirSync(distDir, { recursive: true })
11
+
12
+ if (fs.existsSync(outputPath)) { return }
13
+
14
+ log('Output file missing, generating..')
15
+ fs.writeFileSync(outputPath, '')
16
+ } catch (err: any) {
17
+ throw new Error(`Erreur lors de la vérification du fichier CSS: ${err.message}`)
18
+ }
19
+ }
20
+
21
+ const buildCssRuleFile = (classes: string = '') => {
22
+ try {
23
+ checkCssRuleFilePresence()
24
+
25
+ fs.writeFileSync(outputPath, classes)
26
+
27
+ return outputPath
28
+ } catch (err: any) {
29
+ throw new Error(`Erreur lors de l'écriture du fichier CSS: ${err.message}`)
30
+ }
31
+ }
32
+
33
+ export {
34
+ checkCssRuleFilePresence,
35
+ buildCssRuleFile
36
+ }
@@ -0,0 +1,3 @@
1
+ import { IDeclaration } from "../../interfaces/declaration.interface";
2
+
3
+ const declareColor = (options: { name: string, color: string, theme?: string }) => {}
@@ -0,0 +1,67 @@
1
+ import { config } from "../../../config/config.tool"
2
+ import { buildCssRuleFile } from "../../cssFile"
3
+ import { log } from "../../logger"
4
+ import { mapClassIntoRule } from "../../mapping/mapClassIntoRule"
5
+ import { getFiles } from "../extract.tools"
6
+
7
+ import fs from 'fs'
8
+
9
+ /** Fetch vue file based on config target patterns */
10
+ const init = async () => {
11
+ const files = await getFiles(config.files)
12
+ // console.log({ files })
13
+
14
+ const uniqueClasses = await getUniqueClasses(files)
15
+ const mappedRules = mapClassesIntoRules(uniqueClasses)
16
+ // console.log({ uniqueClasses, mappedRules })
17
+
18
+ const file = buildCssRuleFile(mappedRules)
19
+ // console.log({ file })
20
+ }
21
+
22
+ /** Extract detected class and map into a flat set */
23
+ const getUniqueClasses = async (files: string[]): Promise<string[]> => {
24
+ const extractedClasses = (await Promise.all(
25
+ files.map(async file => extractClasses(file))
26
+ ))
27
+ ?.flat()
28
+ ?.sort()
29
+
30
+ const uniqueClasses = Array.from(new Set(extractedClasses))
31
+ // log(`${uniqueClasses?.length} classes found`)
32
+
33
+ return uniqueClasses
34
+ }
35
+
36
+ /** Find matching classes from a given file based on config states and prefixes */
37
+ const extractClasses = async (filePath: string): Promise<string[]> => {
38
+ const file = await fs.promises.readFile(filePath, 'utf-8')
39
+ if (!file) { return [] }
40
+
41
+ const { states, prefixes } = config.selectors
42
+
43
+ const partialStates = `(${states?.map(s => `${s}:`)?.join('|')})`
44
+ const partialPrefixes = `(${prefixes?.map(p => `${p}-`)?.join('|')})`
45
+
46
+ const classDetectionRegex = new RegExp(`${partialStates}?${partialPrefixes}(\\w+(-+)?)+`, 'gi')
47
+
48
+ const matches = file.match(classDetectionRegex)
49
+ if (!matches?.length) { return [] }
50
+
51
+ return matches
52
+ }
53
+
54
+ const mapClassesIntoRules = (classes: string[]) => {
55
+ const mappedRules = classes
56
+ ?.map(cssClass => mapClassIntoRule(cssClass))
57
+ ?.filter(rule => rule)
58
+
59
+ log(`${mappedRules?.length} rules generated`)
60
+
61
+ const rules = mappedRules?.join('\n')
62
+ return rules
63
+ }
64
+
65
+ export {
66
+ init
67
+ }
File without changes
@@ -0,0 +1,16 @@
1
+ import fg from 'fast-glob'
2
+ import fs from 'fs'
3
+
4
+ import { IFileConfig } from '../../interfaces/files.interface'
5
+
6
+ const getFiles = async (routeConfig: IFileConfig) => {
7
+ return await fg(routeConfig.targets || '*.vue', {
8
+ absolute: true,
9
+ onlyFiles: true,
10
+ ignore: routeConfig.ignore || [],
11
+ })
12
+ }
13
+
14
+ export {
15
+ getFiles
16
+ }
File without changes
@@ -0,0 +1,21 @@
1
+ const logPrefix = '☯︎ [ANUBIS]'
2
+ const log = (str: string) => console.log(`${logPrefix} ${str}`)
3
+
4
+ const logo = () => {
5
+ log(' ___ _ ____ ______ _________')
6
+ log(' / | / | / / / / / __ )/ _/ ___/')
7
+ log(' / /| | / |/ / / / / __ |/ / \\__ \\')
8
+ log(' / ___ |/ /| / /_/ / /_/ // / ___/ /')
9
+ log('/_/ |_/_/ |_/\\____/_____/___//____/')
10
+ log('')
11
+ log('Welcome to Anubis 1.0')
12
+ log('Autonomous Nominative Utility Based Intuitive Styler')
13
+ log('---')
14
+ }
15
+
16
+ export {
17
+ logo,
18
+
19
+ log,
20
+ logPrefix
21
+ }
@@ -0,0 +1,155 @@
1
+ import { config } from "../../config/config.tool"
2
+
3
+ const mapClassIntoRule = (stringClass: string) => {
4
+ const colorExists = config.colors?.some(color => stringClass.includes(color))
5
+ if (!colorExists) { return }
6
+
7
+ const params = getClassInfos(stringClass)
8
+ // console.log({ params })
9
+
10
+ const rule = mapIntoRule(params)
11
+ // console.log({ rule })
12
+
13
+ return rule
14
+ }
15
+
16
+ const getClassInfos = (stringClass: string): { state?: string, prefix?: string, color: string, variation?: { key: string, value: string } } => {
17
+ const { cleanedClass, state } = getStateInfos(stringClass)
18
+ const { cleanedColor, prefix } = getPrefixInfos(cleanedClass)
19
+ const { color, variation } = getVariantInfos({ cleanedColor, prefix })
20
+
21
+ // console.log({ state, color, prefix, variation })
22
+ return { state, color, prefix, variation }
23
+ }
24
+
25
+ const getStateInfos = (stringClass: string) => {
26
+ let state = undefined
27
+
28
+ for (const configState of config.selectors?.states) {
29
+ if (!stringClass.startsWith(configState)) { continue }
30
+
31
+ state = configState
32
+ }
33
+
34
+ const cleanedClass = !!state ? stringClass?.slice(state?.length + 1) : stringClass
35
+ return {
36
+ cleanedClass,
37
+ state,
38
+ }
39
+ }
40
+
41
+ const getPrefixInfos = (stringClass: string): { cleanedColor: string, prefix: string } => {
42
+ let prefix = ''
43
+
44
+ for (const configPrefix of config.selectors.prefixes) {
45
+ if (!stringClass.startsWith(configPrefix)) { continue }
46
+
47
+ prefix = configPrefix
48
+ }
49
+
50
+ return {
51
+ cleanedColor: stringClass?.slice(prefix.length + 1),
52
+ prefix,
53
+ }
54
+ }
55
+
56
+ const getVariantInfos = ({ cleanedColor, prefix }: { cleanedColor: string, prefix?: string }): { color: string, variation?: { key: string, value: string } } => {
57
+ // _ Handle opacity | bg-primary-10
58
+ const opacityDetectionRegex = new RegExp(/(?:(\w-?)+)-\d{2}$/, 'gm') // Strings that end with two digits
59
+ const isOpacity = opacityDetectionRegex.test(cleanedColor)
60
+ if (isOpacity) {
61
+ return {
62
+ color: cleanedColor?.slice(0, -3),
63
+ variation: {
64
+ key: 'opacity',
65
+ value: cleanedColor?.slice(-2),
66
+ }
67
+ }
68
+ }
69
+
70
+ // _ Find preset variants matching the prefix from the config
71
+ const variants = config.presets[prefix as keyof typeof config.presets]
72
+ if (!variants) { return { color: cleanedColor } }
73
+
74
+ // _ Map found variants into a key/value object
75
+ const matchingVariants = variants
76
+ ?.map(v => Object.entries(v))
77
+ ?.flat()
78
+ ?.map(([key, value]) => ({ key, value }))
79
+ // ?.filter(({ key }) => key !== 'default')
80
+
81
+ const variation = matchingVariants?.find(({ key }) => cleanedColor.endsWith(key)) || matchingVariants?.find(({ key }) => key === 'default')
82
+ // console.log({ variation })
83
+
84
+ const color = variation && variation.key !== 'default'
85
+ ? cleanedColor?.slice(0, variation.key.length + 1)
86
+ : cleanedColor
87
+
88
+ return {
89
+ color,
90
+ variation
91
+ }
92
+ }
93
+
94
+ function mapIntoRule({ state, prefix, color, variation }: { state?: string, prefix?: string, color: string, variation?: { key: string, value: string } }) {
95
+ const colorVar = `var(--${color})`
96
+
97
+ // _ Set state selector
98
+ let stateSelector = ''
99
+ switch (state) {
100
+ case 'hover':
101
+ stateSelector = ':hover'
102
+ break
103
+
104
+ case 'not-hover':
105
+ stateSelector = ':not(:hover)'
106
+ break
107
+ }
108
+
109
+ let declaration = ''
110
+
111
+ // _ Set prefix declaration
112
+ // ! Don't forget to add the prefix in the selector.config root file
113
+ switch (prefix) {
114
+ case 'bg':
115
+ declaration = `background: ${colorVar} !important`
116
+ break
117
+
118
+ case 'text':
119
+ declaration = `color: ${colorVar} !important`
120
+ break
121
+
122
+ case 'border':
123
+ declaration = `border-width: ${variation?.value} !important; border-color: ${colorVar} !important; border-style: solid`
124
+ break
125
+
126
+ case 'inner-border':
127
+ declaration = `box-shadow: inset ${variation?.value} ${colorVar} !important`
128
+ break
129
+
130
+ case 'shadow':
131
+ declaration = `box-shadow: ${variation?.value} ${colorVar} !important`
132
+ break
133
+
134
+ default:
135
+ // _ custom rule from config file
136
+ const customDeclaration = config.customRules?.find((r: any) => r.prefix === prefix)?.declaration
137
+ if (!customDeclaration) { return }
138
+
139
+ declaration = customDeclaration?.replace('${value}', color) + ' !important'
140
+ break
141
+ }
142
+
143
+ let selector = `${prefix}-${color}`
144
+ if (state) {
145
+ selector = `${state}\\:${selector}${stateSelector}`
146
+ }
147
+
148
+ const rule = `.${selector} { ${declaration} }`
149
+
150
+ return rule
151
+ }
152
+
153
+ export {
154
+ mapClassIntoRule
155
+ }
@@ -0,0 +1,5 @@
1
+ const colors = [
2
+ { name: 'primary', color: '#0f84cb' },
3
+ { name: 'secondary', color: '#3b5161' },
4
+ { name: 'accent', color: '#0f84cb' },
5
+ ]
package/tsconfig.json CHANGED
@@ -1,3 +1,113 @@
1
- "scripts": {
2
- "build": "tsc"
3
- }
1
+ {
2
+ "compilerOptions": {
3
+ /* Visit https://aka.ms/tsconfig to read more about this file */
4
+
5
+ /* Projects */
6
+ // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
7
+ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8
+ // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
9
+ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
10
+ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11
+ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12
+
13
+ /* Language and Environment */
14
+ "target": "ES2017", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
15
+ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
16
+ // "jsx": "preserve", /* Specify what JSX code is generated. */
17
+ // "libReplacement": true, /* Enable lib replacement. */
18
+ // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
19
+ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
20
+ // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
21
+ // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
22
+ // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
23
+ // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
24
+ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
25
+ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
26
+ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
27
+
28
+ /* Modules */
29
+ "module": "commonjs", /* Specify what module code is generated. */
30
+ // "rootDir": "./", /* Specify the root folder within your source files. */
31
+ // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
32
+ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
33
+ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
34
+ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
35
+ // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
36
+ // "types": [], /* Specify type package names to be included without being referenced in a source file. */
37
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
38
+ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
39
+ // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
40
+ // "rewriteRelativeImportExtensions": true, /* Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files. */
41
+ // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
42
+ // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
43
+ // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
44
+ // "noUncheckedSideEffectImports": true, /* Check side effect imports. */
45
+ // "resolveJsonModule": true, /* Enable importing .json files. */
46
+ // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
47
+ // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
48
+
49
+ /* JavaScript Support */
50
+ // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
51
+ // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
52
+ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
53
+
54
+ /* Emit */
55
+ // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
56
+ // "declarationMap": true, /* Create sourcemaps for d.ts files. */
57
+ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
58
+ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
59
+ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
60
+ // "noEmit": true, /* Disable emitting files from a compilation. */
61
+ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
62
+ // "outDir": "./", /* Specify an output folder for all emitted files. */
63
+ // "removeComments": true, /* Disable emitting comments. */
64
+ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
65
+ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
66
+ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
67
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
68
+ // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
69
+ // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
70
+ // "newLine": "crlf", /* Set the newline character for emitting files. */
71
+ // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
72
+ // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
73
+ // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
74
+ // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
75
+ // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
76
+
77
+ /* Interop Constraints */
78
+ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
79
+ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
80
+ // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */
81
+ // "erasableSyntaxOnly": true, /* Do not allow runtime constructs that are not part of ECMAScript. */
82
+ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
83
+ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
84
+ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
85
+ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
86
+
87
+ /* Type Checking */
88
+ "strict": true, /* Enable all strict type-checking options. */
89
+ // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
90
+ // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
91
+ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
92
+ // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
93
+ // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
94
+ // "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */
95
+ // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
96
+ // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
97
+ // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
98
+ // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
99
+ // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
100
+ // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
101
+ // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
102
+ // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
103
+ // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
104
+ // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
105
+ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
106
+ // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
107
+ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
108
+
109
+ /* Completeness */
110
+ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
111
+ "skipLibCheck": true /* Skip type checking all .d.ts files. */
112
+ }
113
+ }