@csszyx/types 0.9.9 → 0.9.10

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.
@@ -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.9.9",
3
+ "version": "0.9.10",
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.9.9"
60
+ "@csszyx/compiler": "0.9.10"
58
61
  },
59
62
  "sideEffects": false,
60
63
  "engines": {