@knighted/css 1.0.0-rc.1 → 1.0.0-rc.2
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/loader-queries.d.ts +21 -0
- package/package.json +23 -4
- package/types.d.ts +3 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ambient declaration for loader query imports like "./file.js?knighted-css".
|
|
3
|
+
* The loader appends a named export `knightedCss` containing the compiled CSS.
|
|
4
|
+
*/
|
|
5
|
+
declare module '*?knighted-css' {
|
|
6
|
+
export const knightedCss: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Ambient declaration for combined loader imports (e.g. "./file.tsx?knighted-css&combined").
|
|
11
|
+
* These modules behave like the original module with an additional `knightedCss` export.
|
|
12
|
+
* TypeScript cannot infer the underlying module automatically, so consumers can
|
|
13
|
+
* import the default export and narrow it with `KnightedCssCombinedModule<typeof import('./file')>`.
|
|
14
|
+
*/
|
|
15
|
+
type KnightedCssCombinedModule<TModule> = TModule & { knightedCss: string }
|
|
16
|
+
|
|
17
|
+
declare module '*?knighted-css&combined' {
|
|
18
|
+
const combined: KnightedCssCombinedModule<Record<string, unknown>>
|
|
19
|
+
export default combined
|
|
20
|
+
export const knightedCss: string
|
|
21
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knighted/css",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.2",
|
|
4
4
|
"description": "A build-time utility that traverses JavaScript/TypeScript module dependency graphs to extract, compile, and optimize all imported CSS into a single, in-memory string.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/css.js",
|
|
7
|
-
"types": "./
|
|
7
|
+
"types": "./types.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
"*": {
|
|
10
|
+
"loader": [
|
|
11
|
+
"./dist/loader.d.ts"
|
|
12
|
+
],
|
|
13
|
+
"loader-queries": [
|
|
14
|
+
"./loader-queries.d.ts"
|
|
15
|
+
],
|
|
16
|
+
"*": [
|
|
17
|
+
"./types.d.ts"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
},
|
|
8
21
|
"exports": {
|
|
9
22
|
".": {
|
|
10
|
-
"types": "./
|
|
23
|
+
"types": "./types.d.ts",
|
|
11
24
|
"import": "./dist/css.js",
|
|
12
25
|
"require": "./dist/cjs/css.cjs"
|
|
13
26
|
},
|
|
@@ -15,6 +28,10 @@
|
|
|
15
28
|
"types": "./dist/loader.d.ts",
|
|
16
29
|
"import": "./dist/loader.js",
|
|
17
30
|
"require": "./dist/cjs/loader.cjs"
|
|
31
|
+
},
|
|
32
|
+
"./loader-queries": {
|
|
33
|
+
"types": "./loader-queries.d.ts",
|
|
34
|
+
"default": "./loader-queries.d.ts"
|
|
18
35
|
}
|
|
19
36
|
},
|
|
20
37
|
"keywords": [
|
|
@@ -56,7 +73,9 @@
|
|
|
56
73
|
}
|
|
57
74
|
},
|
|
58
75
|
"files": [
|
|
59
|
-
"dist"
|
|
76
|
+
"dist",
|
|
77
|
+
"loader-queries.d.ts",
|
|
78
|
+
"types.d.ts"
|
|
60
79
|
],
|
|
61
80
|
"author": "KCM <knightedcodemonkey@gmail.com>",
|
|
62
81
|
"license": "MIT",
|
package/types.d.ts
ADDED