@storybook/web-components 10.4.4 → 10.4.6

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.
@@ -46,21 +46,9 @@ function mapEvent(item) {
46
46
  return name = `on${name.charAt(0).toUpperCase() + name.substr(1)}`, [{ name, action: { name: item.name }, table: { disable: !0 } }, mapItem(item, "events")];
47
47
  }
48
48
  function mapData(data, category) {
49
- return data && data.filter((item) => item && item.name).reduce((acc, item) => {
50
- if (item.kind === "method")
51
- return acc;
52
- switch (category) {
53
- case "events":
54
- mapEvent(item).forEach((argType) => {
55
- invariant(argType.name, `${argType} should have a name property.`), acc[argType.name] = argType;
56
- });
57
- break;
58
- default:
59
- acc[item.name] = mapItem(item, category);
60
- break;
61
- }
62
- return acc;
63
- }, {});
49
+ return data && data.filter((item) => item && item.name).reduce((acc, item) => (item.kind === "method" || (category === "events" ? mapEvent(item).forEach((argType) => {
50
+ invariant(argType.name, `${argType} should have a name property.`), acc[argType.name] = argType;
51
+ }) : acc[item.name] = mapItem(item, category)), acc), {});
64
52
  }
65
53
  var getMetaDataExperimental = (tagName, customElements) => {
66
54
  if (!isValidComponent(tagName) || !isValidMetaData(customElements))
package/dist/preset.js CHANGED
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_6bd8ouprfm4 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_6bd8ouprfm4 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_6bd8ouprfm4 from "node:module";
1
+ import CJS_COMPAT_NODE_URL_wmkyqy1t90q from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_wmkyqy1t90q from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_wmkyqy1t90q from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_6bd8ouprfm4.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_6bd8ouprfm4.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_6bd8ouprfm4.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_wmkyqy1t90q.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_wmkyqy1t90q.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_wmkyqy1t90q.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/web-components",
3
- "version": "10.4.4",
3
+ "version": "10.4.6",
4
4
  "description": "Storybook Web Components renderer: Develop, document, and test UI components in isolation",
5
5
  "keywords": [
6
6
  "storybook",
@@ -63,7 +63,7 @@
63
63
  },
64
64
  "peerDependencies": {
65
65
  "lit": "^2.0.0 || ^3.0.0",
66
- "storybook": "^10.4.4"
66
+ "storybook": "^10.4.6"
67
67
  },
68
68
  "publishConfig": {
69
69
  "access": "public"