@csszyx/core 0.1.0 → 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 csszyx contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@csszyx/core",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "WASM core for csszyx",
5
5
  "keywords": [
6
6
  "csszyx",
@@ -33,14 +33,14 @@
33
33
  "pkg",
34
34
  "pkg-node"
35
35
  ],
36
+ "devDependencies": {
37
+ "vitest": "^1.2.0"
38
+ },
36
39
  "scripts": {
37
40
  "build": "wasm-pack build --target bundler --out-dir pkg && wasm-pack build --target nodejs --out-dir pkg-node && rm -f pkg/.gitignore pkg-node/.gitignore",
38
41
  "build:test": "wasm-pack build --target nodejs --out-dir pkg-node",
39
42
  "test": "npm run build:test && vitest run",
40
43
  "test:watch": "vitest",
41
44
  "clean": "rm -rf pkg pkg-node target"
42
- },
43
- "devDependencies": {
44
- "vitest": "^1.2.0"
45
45
  }
46
- }
46
+ }
@@ -79,20 +79,10 @@ export class WasmCollisionDetector {
79
79
  *
80
80
  * # Examples
81
81
  *
82
- * ```
83
- * use csszyx_core::mangle::{compute_mangle_checksum, MangleMap};
84
- * use std::collections::HashMap;
85
- *
86
- * let mut map = HashMap::new();
87
- * map.insert("p-4".to_string(), "a".to_string());
88
- * map.insert("bg-red-500".to_string(), "b".to_string());
89
- *
90
- * let checksum = compute_mangle_checksum(&map);
91
- * assert_eq!(checksum.len(), 16);
92
- *
93
- * // Same map produces same checksum
94
- * let checksum2 = compute_mangle_checksum(&map);
95
- * assert_eq!(checksum, checksum2);
82
+ * ```ignore
83
+ * // This function is wasm_bindgen — call from JS, not Rust directly.
84
+ * // Use compute_checksum_internal() for pure-Rust usage.
85
+ * let checksum = compute_mangle_checksum(js_map);
96
86
  * ```
97
87
  */
98
88
  export function compute_mangle_checksum(map: any): string;
@@ -113,20 +113,10 @@ if (Symbol.dispose) WasmCollisionDetector.prototype[Symbol.dispose] = WasmCollis
113
113
  *
114
114
  * # Examples
115
115
  *
116
- * ```
117
- * use csszyx_core::mangle::{compute_mangle_checksum, MangleMap};
118
- * use std::collections::HashMap;
119
- *
120
- * let mut map = HashMap::new();
121
- * map.insert("p-4".to_string(), "a".to_string());
122
- * map.insert("bg-red-500".to_string(), "b".to_string());
123
- *
124
- * let checksum = compute_mangle_checksum(&map);
125
- * assert_eq!(checksum.len(), 16);
126
- *
127
- * // Same map produces same checksum
128
- * let checksum2 = compute_mangle_checksum(&map);
129
- * assert_eq!(checksum, checksum2);
116
+ * ```ignore
117
+ * // This function is wasm_bindgen — call from JS, not Rust directly.
118
+ * // Use compute_checksum_internal() for pure-Rust usage.
119
+ * let checksum = compute_mangle_checksum(js_map);
130
120
  * ```
131
121
  * @param {any} map
132
122
  * @returns {string}
Binary file
@@ -79,20 +79,10 @@ export class WasmCollisionDetector {
79
79
  *
80
80
  * # Examples
81
81
  *
82
- * ```
83
- * use csszyx_core::mangle::{compute_mangle_checksum, MangleMap};
84
- * use std::collections::HashMap;
85
- *
86
- * let mut map = HashMap::new();
87
- * map.insert("p-4".to_string(), "a".to_string());
88
- * map.insert("bg-red-500".to_string(), "b".to_string());
89
- *
90
- * let checksum = compute_mangle_checksum(&map);
91
- * assert_eq!(checksum.len(), 16);
92
- *
93
- * // Same map produces same checksum
94
- * let checksum2 = compute_mangle_checksum(&map);
95
- * assert_eq!(checksum, checksum2);
82
+ * ```ignore
83
+ * // This function is wasm_bindgen — call from JS, not Rust directly.
84
+ * // Use compute_checksum_internal() for pure-Rust usage.
85
+ * let checksum = compute_mangle_checksum(js_map);
96
86
  * ```
97
87
  */
98
88
  export function compute_mangle_checksum(map: any): string;
@@ -116,20 +116,10 @@ exports.WasmCollisionDetector = WasmCollisionDetector;
116
116
  *
117
117
  * # Examples
118
118
  *
119
- * ```
120
- * use csszyx_core::mangle::{compute_mangle_checksum, MangleMap};
121
- * use std::collections::HashMap;
122
- *
123
- * let mut map = HashMap::new();
124
- * map.insert("p-4".to_string(), "a".to_string());
125
- * map.insert("bg-red-500".to_string(), "b".to_string());
126
- *
127
- * let checksum = compute_mangle_checksum(&map);
128
- * assert_eq!(checksum.len(), 16);
129
- *
130
- * // Same map produces same checksum
131
- * let checksum2 = compute_mangle_checksum(&map);
132
- * assert_eq!(checksum, checksum2);
119
+ * ```ignore
120
+ * // This function is wasm_bindgen — call from JS, not Rust directly.
121
+ * // Use compute_checksum_internal() for pure-Rust usage.
122
+ * let checksum = compute_mangle_checksum(js_map);
133
123
  * ```
134
124
  * @param {any} map
135
125
  * @returns {string}
Binary file