@storybook/addon-a11y 10.0.0-beta.4 → 10.0.0-beta.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.
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_qai2xq974up from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_qai2xq974up from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_qai2xq974up from "node:module";
1
+ import CJS_COMPAT_NODE_URL_hs62yqx8j3b from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_hs62yqx8j3b from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_hs62yqx8j3b from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_qai2xq974up.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_qai2xq974up.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_qai2xq974up.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_hs62yqx8j3b.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_hs62yqx8j3b.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_hs62yqx8j3b.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -1205,8 +1205,10 @@ var format = /* @__PURE__ */ __name((open, close) => {
1205
1205
  }
1206
1206
  let result = openCode;
1207
1207
  let lastIndex = 0;
1208
+ const reopenOnNestedClose = close === 22;
1209
+ const replaceCode = (reopenOnNestedClose ? closeCode : "") + openCode;
1208
1210
  while (index !== -1) {
1209
- result += string.slice(lastIndex, index) + openCode;
1211
+ result += string.slice(lastIndex, index) + replaceCode;
1210
1212
  lastIndex = index + closeCode.length;
1211
1213
  index = string.indexOf(closeCode, lastIndex);
1212
1214
  }
@@ -3731,7 +3733,7 @@ function prettyMilliseconds(milliseconds, options) {
3731
3733
  }
3732
3734
  add(Number(parsed.minutes), "minute", "m");
3733
3735
  if (!options.hideSeconds) {
3734
- if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3) {
3736
+ if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3 && !options.subSecondsAsDecimals) {
3735
3737
  const seconds = Number(parsed.seconds);
3736
3738
  const milliseconds2 = Number(parsed.milliseconds);
3737
3739
  const microseconds = Number(parsed.microseconds);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/addon-a11y",
3
- "version": "10.0.0-beta.4",
3
+ "version": "10.0.0-beta.5",
4
4
  "description": "Storybook Addon A11y: Test UI component compliance with WCAG web accessibility standards",
5
5
  "keywords": [
6
6
  "a11y",
@@ -74,7 +74,7 @@
74
74
  "vitest-axe": "^0.1.0"
75
75
  },
76
76
  "peerDependencies": {
77
- "storybook": "^10.0.0-beta.4"
77
+ "storybook": "^10.0.0-beta.5"
78
78
  },
79
79
  "publishConfig": {
80
80
  "access": "public"