@zag-js/types 0.2.6 → 0.3.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/index.js CHANGED
@@ -1,3 +1,29 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ createNormalizer: () => createNormalizer
24
+ });
25
+ module.exports = __toCommonJS(src_exports);
26
+
1
27
  // src/prop-types.ts
2
28
  function createNormalizer(fn) {
3
29
  return new Proxy({}, {
@@ -6,6 +32,7 @@ function createNormalizer(fn) {
6
32
  }
7
33
  });
8
34
  }
9
- export {
35
+ // Annotate the CommonJS export names for ESM import in node:
36
+ 0 && (module.exports = {
10
37
  createNormalizer
11
- };
38
+ });
package/dist/index.mjs ADDED
@@ -0,0 +1,11 @@
1
+ // src/prop-types.ts
2
+ function createNormalizer(fn) {
3
+ return new Proxy({}, {
4
+ get() {
5
+ return fn;
6
+ }
7
+ });
8
+ }
9
+ export {
10
+ createNormalizer
11
+ };
package/package.json CHANGED
@@ -1,7 +1,9 @@
1
1
  {
2
- "type": "module",
3
2
  "name": "@zag-js/types",
4
- "version": "0.2.6",
3
+ "version": "0.3.0",
4
+ "main": "dist/index.js",
5
+ "module": "dist/index.mjs",
6
+ "types": "dist/index.d.ts",
5
7
  "keywords": [
6
8
  "js",
7
9
  "utils",
@@ -10,8 +12,6 @@
10
12
  "author": "Segun Adebayo <sage@adebayosegun.com>",
11
13
  "homepage": "https://github.com/chakra-ui/zag#readme",
12
14
  "license": "MIT",
13
- "main": "dist/index.js",
14
- "types": "dist/index.d.ts",
15
15
  "repository": "https://github.com/chakra-ui/zag/tree/main/packages/utilities/types",
16
16
  "sideEffects": false,
17
17
  "files": [
@@ -24,12 +24,12 @@
24
24
  "url": "https://github.com/chakra-ui/zag/issues"
25
25
  },
26
26
  "dependencies": {
27
- "csstype": "3.1.0"
27
+ "csstype": "3.1.1"
28
28
  },
29
29
  "scripts": {
30
- "build-fast": "tsup src/index.ts --format=esm",
30
+ "build-fast": "tsup src/index.ts --format=esm,cjs",
31
31
  "start": "pnpm build --watch",
32
- "build": "tsup src/index.ts --format=esm --dts",
32
+ "build": "tsup src/index.ts --format=esm,cjs --dts",
33
33
  "test": "jest --config ../../jest.config.js --rootDir . --passWithNoTests",
34
34
  "lint": "eslint src --ext .ts,.tsx",
35
35
  "test-ci": "pnpm test --ci --runInBand",