@sharadox/type-script-configuration-web-library 0.1.0 → 0.2.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/README.md CHANGED
@@ -14,7 +14,7 @@ pnpm add -D typescript @types/node @sharadox/type-script-configuration-web-libra
14
14
  | -------------------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
15
15
  | `base.json` | everything | ES2024, `strict`, `noUncheckedIndexedAccess`, `noImplicitOverride`, `erasableSyntaxOnly`, `verbatimModuleSyntax`, `noEmit`, the `sharadox-source` export condition, Node types; includes `source/**` and root `*.ts`; leaves out `node_modules`, `distribution`, `documentation`, `coverage` and `source/**/test-fixture` |
16
16
  | `node.json` | tools, GitHub actions, server-only libraries | `module`/`moduleResolution: nodenext` |
17
- | `react-library.json` | React libraries consumed by bundlers (Next.js) | DOM types, `moduleResolution: bundler`, `jsx: react-jsx` |
17
+ | `react-library.json` | React libraries consumed by bundlers (Next.js) | DOM types, `moduleResolution: bundler`, `jsx: react-jsx`, and types for CSS and Sass modules (`import styles from "./index.module.css"`) |
18
18
  | `next-js-application.json` | Next.js applications (`src/`) | DOM, bundler resolution, JSX, `incremental`, the `next` plugin, `next-env.d.ts` and `.next/types`; no `sharadox-source` condition (apps use published builds) |
19
19
  | `library-build.json` | the build of any library | emits `source/` to `distribution/` with declarations and source maps, leaving out unit, benchmark and end-to-end tests and fixtures |
20
20
 
@@ -7,8 +7,7 @@
7
7
  "declarationMap": true,
8
8
  "sourceMap": true,
9
9
  "rootDir": "${configDir}/source",
10
- "outDir": "${configDir}/distribution",
11
- "customConditions": []
10
+ "outDir": "${configDir}/distribution"
12
11
  },
13
12
  "include": ["${configDir}/source/**/*.ts", "${configDir}/source/**/*.tsx"],
14
13
  "exclude": [
@@ -7,5 +7,6 @@
7
7
  "module": "esnext",
8
8
  "moduleResolution": "bundler",
9
9
  "jsx": "react-jsx"
10
- }
10
+ },
11
+ "files": ["./style-module.d.ts"]
11
12
  }
@@ -0,0 +1,9 @@
1
+ // CSS and Sass modules: `import styles from "./index.module.css"` gives a map of class names.
2
+ declare module "*.module.css" {
3
+ const classes: Readonly<Record<string, string>>;
4
+ export default classes;
5
+ }
6
+ declare module "*.module.scss" {
7
+ const classes: Readonly<Record<string, string>>;
8
+ export default classes;
9
+ }
package/llms.txt CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  - base.json: ES2024, strict, noUncheckedIndexedAccess, erasableSyntaxOnly, verbatimModuleSyntax, noEmit, customConditions ["sharadox-source"], types node; include source/** and root *.ts; exclude node_modules, distribution, documentation, coverage, source/**/test-fixture.
6
6
  - node.json: + module/moduleResolution nodenext (tools, actions, server libraries).
7
- - react-library.json: + DOM, moduleResolution bundler, jsx react-jsx.
7
+ - react-library.json: + DOM, moduleResolution bundler, jsx react-jsx, and *.module.css / *.module.scss type declarations.
8
8
  - next-js-application.json: + DOM, bundler, jsx, incremental, next plugin; includes src/**, next-env.d.ts, .next/types; customConditions [].
9
9
  - library-build.json: emit source/ → distribution/ with declarations; excludes tests and fixtures. Use `"extends": ["./tsconfig.json", "@sharadox/type-script-configuration-web-library/library-build.json"]`.
10
10
  - Install: `pnpm add -D typescript @types/node @sharadox/type-script-configuration-web-library`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sharadox/type-script-configuration-web-library",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Shared TypeScript configurations for Sharadox projects: Node tools, React libraries, Next.js applications and library builds.",
5
5
  "private": false,
6
6
  "license": "SEE LICENSE IN LICENCA.md",
@@ -42,6 +42,7 @@
42
42
  "devDependencies": {
43
43
  "@eslint/js": "^9.39.5",
44
44
  "@types/node": "^24.19.2",
45
+ "@types/react": "^19.3.0",
45
46
  "@vitest/coverage-v8": "^5.1.0",
46
47
  "eslint": "9.39.5",
47
48
  "eslint-config-prettier": "^10.1.8",