@vitus-labs/attrs 1.3.3 → 1.3.4-alpha.5

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/lib/index.js CHANGED
@@ -156,22 +156,24 @@ const attrsComponent = (options) => {
156
156
  context: AttrsComponent.meta,
157
157
  options: options.statics
158
158
  });
159
- AttrsComponent.attrs = (attrs, { priority, filter } = {}) => {
160
- const result = {};
161
- if (filter) result.filterAttrs = filter;
162
- if (priority) {
163
- result.priorityAttrs = attrs;
159
+ Object.assign(AttrsComponent, {
160
+ attrs: (attrs, { priority, filter } = {}) => {
161
+ const result = {};
162
+ if (filter) result.filterAttrs = filter;
163
+ if (priority) {
164
+ result.priorityAttrs = attrs;
165
+ return cloneAndEnhance(options, result);
166
+ }
167
+ result.attrs = attrs;
164
168
  return cloneAndEnhance(options, result);
165
- }
166
- result.attrs = attrs;
167
- return cloneAndEnhance(options, result);
168
- };
169
- AttrsComponent.config = (opts = {}) => {
170
- return cloneAndEnhance(options, pick(opts));
171
- };
172
- AttrsComponent.compose = (opts) => cloneAndEnhance(options, { compose: opts });
173
- AttrsComponent.statics = (opts) => cloneAndEnhance(options, { statics: opts });
174
- AttrsComponent.getDefaultAttrs = (props) => calculateChainOptions(options.attrs)([props]);
169
+ },
170
+ config: (opts = {}) => {
171
+ return cloneAndEnhance(options, pick(opts));
172
+ },
173
+ compose: (opts) => cloneAndEnhance(options, { compose: opts }),
174
+ statics: (opts) => cloneAndEnhance(options, { statics: opts }),
175
+ getDefaultAttrs: (props) => calculateChainOptions(options.attrs)([props])
176
+ });
175
177
  return AttrsComponent;
176
178
  };
177
179
 
package/package.json CHANGED
@@ -1,18 +1,21 @@
1
1
  {
2
2
  "name": "@vitus-labs/attrs",
3
- "version": "1.3.3",
3
+ "version": "1.3.4-alpha.5+783e260",
4
4
  "license": "MIT",
5
5
  "author": "Vit Bokisch <vit@bokisch.cz>",
6
6
  "maintainers": [
7
7
  "Vit Bokisch <vit@bokisch.cz>"
8
8
  ],
9
9
  "type": "module",
10
+ "sideEffects": false,
10
11
  "exports": {
11
12
  "import": "./lib/index.js",
12
13
  "types": "./lib/index.d.ts"
13
14
  },
14
15
  "files": [
15
- "lib/"
16
+ "lib",
17
+ "!lib/**/*.map",
18
+ "!lib/analysis"
16
19
  ],
17
20
  "homepage": "https://github.com/vitus-labs/ui-system/tree/master/packages/attrs",
18
21
  "description": "Attrs hoc chaining for React components",
@@ -36,6 +39,9 @@
36
39
  "bugs": {
37
40
  "url": "https://github.com/vitus-labs/ui-system/issues"
38
41
  },
42
+ "engines": {
43
+ "node": ">= 18"
44
+ },
39
45
  "scripts": {
40
46
  "dev": "bun run vl_stories",
41
47
  "prepublish": "bun run build",
@@ -49,15 +55,15 @@
49
55
  "typecheck": "tsc --noEmit"
50
56
  },
51
57
  "peerDependencies": {
52
- "@vitus-labs/core": "*",
58
+ "@vitus-labs/core": "workspace:*",
53
59
  "react": ">= 19"
54
60
  },
55
61
  "devDependencies": {
56
- "@vitus-labs/core": "1.3.3",
57
- "@vitus-labs/elements": "1.3.3",
62
+ "@vitus-labs/core": "1.3.4-alpha.5+783e260",
63
+ "@vitus-labs/elements": "1.3.4-alpha.5+783e260",
58
64
  "@vitus-labs/tools-rolldown": "^1.6.0",
59
65
  "@vitus-labs/tools-storybook": "^1.6.0",
60
66
  "@vitus-labs/tools-typescript": "^1.6.0"
61
67
  },
62
- "gitHead": "1f1b5be1389a89c41626db181d28018cc978d3ab"
68
+ "gitHead": "783e2601cc52ef082fc2776863c0cc5bcbdea755"
63
69
  }