@csszyx/types 0.9.9 → 0.10.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/config.d.cts +21 -0
- package/dist/config.d.mts +21 -0
- package/dist/jsx-solid.d.ts +60 -0
- package/package.json +5 -2
package/dist/config.d.cts
CHANGED
|
@@ -334,6 +334,27 @@ type PartialCsszyxConfig = {
|
|
|
334
334
|
* marker and would otherwise hit the AST budget guard.
|
|
335
335
|
*/
|
|
336
336
|
exclude?: FilePattern | FilePattern[];
|
|
337
|
+
/**
|
|
338
|
+
* Opt workspace packages under `/packages/` into compilation.
|
|
339
|
+
*
|
|
340
|
+
* csszyx hard-ignores `/packages/` by default because published libraries
|
|
341
|
+
* are expected to ship pre-extracted CSS. In a monorepo, however, a
|
|
342
|
+
* design-system package is first-class source the developer authors, so its
|
|
343
|
+
* `sz` props must be compiled like app code. List the package directory
|
|
344
|
+
* names here (e.g. `['vui']`) to compile `**\/packages/<name>/**`. Only the
|
|
345
|
+
* `/packages/` rule is relaxed — `node_modules` and `.next` stay ignored.
|
|
346
|
+
*/
|
|
347
|
+
compilePackages?: string[];
|
|
348
|
+
/**
|
|
349
|
+
* Warn when, inside a monorepo, the Tailwind entry imports `tailwindcss`
|
|
350
|
+
* without scoping its content detection (no `source(none)` / `source(...)` /
|
|
351
|
+
* `@source not`). Unscoped, Tailwind v4 climbs to the workspace root and
|
|
352
|
+
* scans sibling packages + docs (`.md`/`.mdx`/`.txt` are not ignored),
|
|
353
|
+
* which can generate phantom or broken `url()` classes and fail the build.
|
|
354
|
+
* The warning prints the one-time fix; set `false` to silence it when a
|
|
355
|
+
* broad scan is intentional. Defaults to `true`.
|
|
356
|
+
*/
|
|
357
|
+
contentScopeCheck?: boolean;
|
|
337
358
|
development?: Partial<DevelopmentConfig>;
|
|
338
359
|
production?: Partial<ProductionConfig>;
|
|
339
360
|
build?: Partial<BuildConfig>;
|
package/dist/config.d.mts
CHANGED
|
@@ -334,6 +334,27 @@ type PartialCsszyxConfig = {
|
|
|
334
334
|
* marker and would otherwise hit the AST budget guard.
|
|
335
335
|
*/
|
|
336
336
|
exclude?: FilePattern | FilePattern[];
|
|
337
|
+
/**
|
|
338
|
+
* Opt workspace packages under `/packages/` into compilation.
|
|
339
|
+
*
|
|
340
|
+
* csszyx hard-ignores `/packages/` by default because published libraries
|
|
341
|
+
* are expected to ship pre-extracted CSS. In a monorepo, however, a
|
|
342
|
+
* design-system package is first-class source the developer authors, so its
|
|
343
|
+
* `sz` props must be compiled like app code. List the package directory
|
|
344
|
+
* names here (e.g. `['vui']`) to compile `**\/packages/<name>/**`. Only the
|
|
345
|
+
* `/packages/` rule is relaxed — `node_modules` and `.next` stay ignored.
|
|
346
|
+
*/
|
|
347
|
+
compilePackages?: string[];
|
|
348
|
+
/**
|
|
349
|
+
* Warn when, inside a monorepo, the Tailwind entry imports `tailwindcss`
|
|
350
|
+
* without scoping its content detection (no `source(none)` / `source(...)` /
|
|
351
|
+
* `@source not`). Unscoped, Tailwind v4 climbs to the workspace root and
|
|
352
|
+
* scans sibling packages + docs (`.md`/`.mdx`/`.txt` are not ignored),
|
|
353
|
+
* which can generate phantom or broken `url()` classes and fail the build.
|
|
354
|
+
* The warning prints the one-time fix; set `false` to silence it when a
|
|
355
|
+
* broad scan is intentional. Defaults to `true`.
|
|
356
|
+
*/
|
|
357
|
+
contentScopeCheck?: boolean;
|
|
337
358
|
development?: Partial<DevelopmentConfig>;
|
|
338
359
|
production?: Partial<ProductionConfig>;
|
|
339
360
|
build?: Partial<BuildConfig>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SolidJS JSX type augmentation for the csszyx sz prop.
|
|
3
|
+
*
|
|
4
|
+
* Solid maintains its own JSX namespace (not React's), so the React
|
|
5
|
+
* augmentation in `@csszyx/types/jsx` does not apply. Reference this
|
|
6
|
+
* module instead in Solid projects:
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* // csszyx-env.d.ts
|
|
10
|
+
* /// <reference types="@csszyx/types/jsx-solid" />
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* Types-only: solid-js is required as a type dependency by consumers of
|
|
14
|
+
* this subpath (every Solid project already has it) and is never imported
|
|
15
|
+
* at runtime.
|
|
16
|
+
*
|
|
17
|
+
* @module @csszyx/types/jsx-solid
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import 'solid-js';
|
|
21
|
+
|
|
22
|
+
import type { RecoveryMode, SzPropValue } from '@csszyx/compiler';
|
|
23
|
+
|
|
24
|
+
export type { RecoveryMode, SzPropValue };
|
|
25
|
+
|
|
26
|
+
declare module 'solid-js' {
|
|
27
|
+
namespace JSX {
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
interface HTMLAttributes<T> {
|
|
32
|
+
/**
|
|
33
|
+
* csszyx styling prop — Tailwind CSS via object syntax or class string.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* <div sz={{ p: 4, bg: 'blue-500', hover: { bg: 'blue-700' } }} />
|
|
38
|
+
* <div sz="p-4 bg-blue-500 hover:bg-blue-700" />
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
sz?: SzPropValue;
|
|
42
|
+
/**
|
|
43
|
+
* Hydration recovery mode for the element. The csszyx unplugin
|
|
44
|
+
* compiles this attribute into a `data-sz-recovery-token` and
|
|
45
|
+
* registers the element in the SSR recovery manifest read by
|
|
46
|
+
* `@csszyx/runtime/verify` at hydration time.
|
|
47
|
+
*
|
|
48
|
+
* - `'csr'` — recovery permitted in both dev and production
|
|
49
|
+
* - `'dev-only'` — recovery permitted in development only;
|
|
50
|
+
* stripped from the production manifest at build time.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```tsx
|
|
54
|
+
* <section szRecover="csr">…</section>
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
szRecover?: RecoveryMode;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@csszyx/types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "TypeScript definitions for csszyx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"csszyx",
|
|
@@ -45,6 +45,9 @@
|
|
|
45
45
|
},
|
|
46
46
|
"./jsx": {
|
|
47
47
|
"types": "./dist/jsx.d.ts"
|
|
48
|
+
},
|
|
49
|
+
"./jsx-solid": {
|
|
50
|
+
"types": "./dist/jsx-solid.d.ts"
|
|
48
51
|
}
|
|
49
52
|
},
|
|
50
53
|
"files": [
|
|
@@ -54,7 +57,7 @@
|
|
|
54
57
|
"@types/node": "^20.11.0",
|
|
55
58
|
"typescript": "^6.0.3",
|
|
56
59
|
"unbuild": "^3.6.1",
|
|
57
|
-
"@csszyx/compiler": "0.
|
|
60
|
+
"@csszyx/compiler": "0.10.0"
|
|
58
61
|
},
|
|
59
62
|
"sideEffects": false,
|
|
60
63
|
"engines": {
|