vite-plugin-storybook-nextjs 3.0.3--canary.ca2a5b0.0 → 3.0.3--canary.68.2eff9c3.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.
@@ -2,7 +2,6 @@
2
2
 
3
3
  var module$1 = require('module');
4
4
  var moduleAlias = require('module-alias');
5
- var posix = require('path/posix');
6
5
 
7
6
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
8
7
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -486,7 +485,7 @@ var require_semver = __commonJS({
486
485
  var require_parse = __commonJS({
487
486
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js"(exports, module) {
488
487
  var SemVer = require_semver();
489
- var parse = (version, options, throwErrors = false) => {
488
+ var parse2 = (version, options, throwErrors = false) => {
490
489
  if (version instanceof SemVer) {
491
490
  return version;
492
491
  }
@@ -499,16 +498,16 @@ var require_parse = __commonJS({
499
498
  throw er;
500
499
  }
501
500
  };
502
- module.exports = parse;
501
+ module.exports = parse2;
503
502
  }
504
503
  });
505
504
 
506
505
  // node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.js
507
506
  var require_valid = __commonJS({
508
507
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.js"(exports, module) {
509
- var parse = require_parse();
508
+ var parse2 = require_parse();
510
509
  var valid = (version, options) => {
511
- const v = parse(version, options);
510
+ const v = parse2(version, options);
512
511
  return v ? v.version : null;
513
512
  };
514
513
  module.exports = valid;
@@ -518,9 +517,9 @@ var require_valid = __commonJS({
518
517
  // node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.js
519
518
  var require_clean = __commonJS({
520
519
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.js"(exports, module) {
521
- var parse = require_parse();
520
+ var parse2 = require_parse();
522
521
  var clean = (version, options) => {
523
- const s = parse(version.trim().replace(/^[=v]+/, ""), options);
522
+ const s = parse2(version.trim().replace(/^[=v]+/, ""), options);
524
523
  return s ? s.version : null;
525
524
  };
526
525
  module.exports = clean;
@@ -553,10 +552,10 @@ var require_inc = __commonJS({
553
552
  // node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.js
554
553
  var require_diff = __commonJS({
555
554
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.js"(exports, module) {
556
- var parse = require_parse();
555
+ var parse2 = require_parse();
557
556
  var diff = (version1, version2) => {
558
- const v1 = parse(version1, null, true);
559
- const v2 = parse(version2, null, true);
557
+ const v1 = parse2(version1, null, true);
558
+ const v2 = parse2(version2, null, true);
560
559
  const comparison = v1.compare(v2);
561
560
  if (comparison === 0) {
562
561
  return null;
@@ -623,9 +622,9 @@ var require_patch = __commonJS({
623
622
  // node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.js
624
623
  var require_prerelease = __commonJS({
625
624
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.js"(exports, module) {
626
- var parse = require_parse();
625
+ var parse2 = require_parse();
627
626
  var prerelease = (version, options) => {
628
- const parsed = parse(version, options);
627
+ const parsed = parse2(version, options);
629
628
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
630
629
  };
631
630
  module.exports = prerelease;
@@ -797,7 +796,7 @@ var require_cmp = __commonJS({
797
796
  var require_coerce = __commonJS({
798
797
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.js"(exports, module) {
799
798
  var SemVer = require_semver();
800
- var parse = require_parse();
799
+ var parse2 = require_parse();
801
800
  var { safeRe: re, t } = require_re();
802
801
  var coerce = (version, options) => {
803
802
  if (version instanceof SemVer) {
@@ -832,7 +831,7 @@ var require_coerce = __commonJS({
832
831
  const patch = match[4] || "0";
833
832
  const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
834
833
  const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
835
- return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options);
834
+ return parse2(`${major}.${minor}.${patch}${prerelease}${build}`, options);
836
835
  };
837
836
  module.exports = coerce;
838
837
  }
@@ -1833,7 +1832,7 @@ var require_semver2 = __commonJS({
1833
1832
  var constants = require_constants();
1834
1833
  var SemVer = require_semver();
1835
1834
  var identifiers = require_identifiers();
1836
- var parse = require_parse();
1835
+ var parse2 = require_parse();
1837
1836
  var valid = require_valid();
1838
1837
  var clean = require_clean();
1839
1838
  var inc = require_inc();
@@ -1871,7 +1870,7 @@ var require_semver2 = __commonJS({
1871
1870
  var simplifyRange = require_simplify();
1872
1871
  var subset = require_subset();
1873
1872
  module.exports = {
1874
- parse,
1873
+ parse: parse2,
1875
1874
  valid,
1876
1875
  clean,
1877
1876
  inc,
@@ -1919,6 +1918,106 @@ var require_semver2 = __commonJS({
1919
1918
  };
1920
1919
  }
1921
1920
  });
1921
+
1922
+ // node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
1923
+ var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
1924
+ function normalizeWindowsPath(input = "") {
1925
+ if (!input) {
1926
+ return input;
1927
+ }
1928
+ return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
1929
+ }
1930
+ var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
1931
+ var sep = "/";
1932
+ function cwd() {
1933
+ if (typeof process !== "undefined" && typeof process.cwd === "function") {
1934
+ return process.cwd().replace(/\\/g, "/");
1935
+ }
1936
+ return "/";
1937
+ }
1938
+ var resolve = function(...arguments_) {
1939
+ arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
1940
+ let resolvedPath = "";
1941
+ let resolvedAbsolute = false;
1942
+ for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
1943
+ const path = index >= 0 ? arguments_[index] : cwd();
1944
+ if (!path || path.length === 0) {
1945
+ continue;
1946
+ }
1947
+ resolvedPath = `${path}/${resolvedPath}`;
1948
+ resolvedAbsolute = isAbsolute(path);
1949
+ }
1950
+ resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
1951
+ if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
1952
+ return `/${resolvedPath}`;
1953
+ }
1954
+ return resolvedPath.length > 0 ? resolvedPath : ".";
1955
+ };
1956
+ function normalizeString(path, allowAboveRoot) {
1957
+ let res = "";
1958
+ let lastSegmentLength = 0;
1959
+ let lastSlash = -1;
1960
+ let dots = 0;
1961
+ let char = null;
1962
+ for (let index = 0; index <= path.length; ++index) {
1963
+ if (index < path.length) {
1964
+ char = path[index];
1965
+ } else if (char === "/") {
1966
+ break;
1967
+ } else {
1968
+ char = "/";
1969
+ }
1970
+ if (char === "/") {
1971
+ if (lastSlash === index - 1 || dots === 1) ;
1972
+ else if (dots === 2) {
1973
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
1974
+ if (res.length > 2) {
1975
+ const lastSlashIndex = res.lastIndexOf("/");
1976
+ if (lastSlashIndex === -1) {
1977
+ res = "";
1978
+ lastSegmentLength = 0;
1979
+ } else {
1980
+ res = res.slice(0, lastSlashIndex);
1981
+ lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
1982
+ }
1983
+ lastSlash = index;
1984
+ dots = 0;
1985
+ continue;
1986
+ } else if (res.length > 0) {
1987
+ res = "";
1988
+ lastSegmentLength = 0;
1989
+ lastSlash = index;
1990
+ dots = 0;
1991
+ continue;
1992
+ }
1993
+ }
1994
+ if (allowAboveRoot) {
1995
+ res += res.length > 0 ? "/.." : "..";
1996
+ lastSegmentLength = 2;
1997
+ }
1998
+ } else {
1999
+ if (res.length > 0) {
2000
+ res += `/${path.slice(lastSlash + 1, index)}`;
2001
+ } else {
2002
+ res = path.slice(lastSlash + 1, index);
2003
+ }
2004
+ lastSegmentLength = index - lastSlash - 1;
2005
+ }
2006
+ lastSlash = index;
2007
+ dots = 0;
2008
+ } else if (char === "." && dots !== -1) {
2009
+ ++dots;
2010
+ } else {
2011
+ dots = -1;
2012
+ }
2013
+ }
2014
+ return res;
2015
+ }
2016
+ var isAbsolute = function(p) {
2017
+ return _IS_ABSOLUTE_RE.test(p);
2018
+ };
2019
+
2020
+ // src/utils.ts
1922
2021
  var require2 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('storybook.global.cjs', document.baseURI).href)));
1923
2022
  var VITEST_PLUGIN_NAME = "vite-plugin-storybook-nextjs";
1924
2023
  process.env.VITEST === "true";
@@ -1926,11 +2025,11 @@ var getNextjsVersion = () => require2(scopedResolve("next/package.json")).versio
1926
2025
  var scopedResolve = (id) => {
1927
2026
  let scopedModulePath;
1928
2027
  try {
1929
- scopedModulePath = require2.resolve(id, { paths: [posix.resolve()] });
2028
+ scopedModulePath = require2.resolve(id, { paths: [resolve()] });
1930
2029
  } catch (e) {
1931
2030
  scopedModulePath = require2.resolve(id);
1932
2031
  }
1933
- const idWithNativePathSep = id.replace(/\//g, posix.sep);
2032
+ const idWithNativePathSep = id.replace(/\//g, sep);
1934
2033
  if (scopedModulePath.endsWith(idWithNativePathSep)) {
1935
2034
  return scopedModulePath;
1936
2035
  }
@@ -1,6 +1,5 @@
1
1
  import { createRequire } from 'module';
2
2
  import moduleAlias from 'module-alias';
3
- import { resolve, sep } from 'path/posix';
4
3
 
5
4
  var __create = Object.create;
6
5
  var __defProp = Object.defineProperty;
@@ -479,7 +478,7 @@ var require_semver = __commonJS({
479
478
  var require_parse = __commonJS({
480
479
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js"(exports, module) {
481
480
  var SemVer = require_semver();
482
- var parse = (version, options, throwErrors = false) => {
481
+ var parse2 = (version, options, throwErrors = false) => {
483
482
  if (version instanceof SemVer) {
484
483
  return version;
485
484
  }
@@ -492,16 +491,16 @@ var require_parse = __commonJS({
492
491
  throw er;
493
492
  }
494
493
  };
495
- module.exports = parse;
494
+ module.exports = parse2;
496
495
  }
497
496
  });
498
497
 
499
498
  // node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.js
500
499
  var require_valid = __commonJS({
501
500
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.js"(exports, module) {
502
- var parse = require_parse();
501
+ var parse2 = require_parse();
503
502
  var valid = (version, options) => {
504
- const v = parse(version, options);
503
+ const v = parse2(version, options);
505
504
  return v ? v.version : null;
506
505
  };
507
506
  module.exports = valid;
@@ -511,9 +510,9 @@ var require_valid = __commonJS({
511
510
  // node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.js
512
511
  var require_clean = __commonJS({
513
512
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.js"(exports, module) {
514
- var parse = require_parse();
513
+ var parse2 = require_parse();
515
514
  var clean = (version, options) => {
516
- const s = parse(version.trim().replace(/^[=v]+/, ""), options);
515
+ const s = parse2(version.trim().replace(/^[=v]+/, ""), options);
517
516
  return s ? s.version : null;
518
517
  };
519
518
  module.exports = clean;
@@ -546,10 +545,10 @@ var require_inc = __commonJS({
546
545
  // node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.js
547
546
  var require_diff = __commonJS({
548
547
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.js"(exports, module) {
549
- var parse = require_parse();
548
+ var parse2 = require_parse();
550
549
  var diff = (version1, version2) => {
551
- const v1 = parse(version1, null, true);
552
- const v2 = parse(version2, null, true);
550
+ const v1 = parse2(version1, null, true);
551
+ const v2 = parse2(version2, null, true);
553
552
  const comparison = v1.compare(v2);
554
553
  if (comparison === 0) {
555
554
  return null;
@@ -616,9 +615,9 @@ var require_patch = __commonJS({
616
615
  // node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.js
617
616
  var require_prerelease = __commonJS({
618
617
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.js"(exports, module) {
619
- var parse = require_parse();
618
+ var parse2 = require_parse();
620
619
  var prerelease = (version, options) => {
621
- const parsed = parse(version, options);
620
+ const parsed = parse2(version, options);
622
621
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
623
622
  };
624
623
  module.exports = prerelease;
@@ -790,7 +789,7 @@ var require_cmp = __commonJS({
790
789
  var require_coerce = __commonJS({
791
790
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.js"(exports, module) {
792
791
  var SemVer = require_semver();
793
- var parse = require_parse();
792
+ var parse2 = require_parse();
794
793
  var { safeRe: re, t } = require_re();
795
794
  var coerce = (version, options) => {
796
795
  if (version instanceof SemVer) {
@@ -825,7 +824,7 @@ var require_coerce = __commonJS({
825
824
  const patch = match[4] || "0";
826
825
  const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
827
826
  const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
828
- return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options);
827
+ return parse2(`${major}.${minor}.${patch}${prerelease}${build}`, options);
829
828
  };
830
829
  module.exports = coerce;
831
830
  }
@@ -1826,7 +1825,7 @@ var require_semver2 = __commonJS({
1826
1825
  var constants = require_constants();
1827
1826
  var SemVer = require_semver();
1828
1827
  var identifiers = require_identifiers();
1829
- var parse = require_parse();
1828
+ var parse2 = require_parse();
1830
1829
  var valid = require_valid();
1831
1830
  var clean = require_clean();
1832
1831
  var inc = require_inc();
@@ -1864,7 +1863,7 @@ var require_semver2 = __commonJS({
1864
1863
  var simplifyRange = require_simplify();
1865
1864
  var subset = require_subset();
1866
1865
  module.exports = {
1867
- parse,
1866
+ parse: parse2,
1868
1867
  valid,
1869
1868
  clean,
1870
1869
  inc,
@@ -1912,6 +1911,106 @@ var require_semver2 = __commonJS({
1912
1911
  };
1913
1912
  }
1914
1913
  });
1914
+
1915
+ // node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
1916
+ var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
1917
+ function normalizeWindowsPath(input = "") {
1918
+ if (!input) {
1919
+ return input;
1920
+ }
1921
+ return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
1922
+ }
1923
+ var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
1924
+ var sep = "/";
1925
+ function cwd() {
1926
+ if (typeof process !== "undefined" && typeof process.cwd === "function") {
1927
+ return process.cwd().replace(/\\/g, "/");
1928
+ }
1929
+ return "/";
1930
+ }
1931
+ var resolve = function(...arguments_) {
1932
+ arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
1933
+ let resolvedPath = "";
1934
+ let resolvedAbsolute = false;
1935
+ for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
1936
+ const path = index >= 0 ? arguments_[index] : cwd();
1937
+ if (!path || path.length === 0) {
1938
+ continue;
1939
+ }
1940
+ resolvedPath = `${path}/${resolvedPath}`;
1941
+ resolvedAbsolute = isAbsolute(path);
1942
+ }
1943
+ resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
1944
+ if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
1945
+ return `/${resolvedPath}`;
1946
+ }
1947
+ return resolvedPath.length > 0 ? resolvedPath : ".";
1948
+ };
1949
+ function normalizeString(path, allowAboveRoot) {
1950
+ let res = "";
1951
+ let lastSegmentLength = 0;
1952
+ let lastSlash = -1;
1953
+ let dots = 0;
1954
+ let char = null;
1955
+ for (let index = 0; index <= path.length; ++index) {
1956
+ if (index < path.length) {
1957
+ char = path[index];
1958
+ } else if (char === "/") {
1959
+ break;
1960
+ } else {
1961
+ char = "/";
1962
+ }
1963
+ if (char === "/") {
1964
+ if (lastSlash === index - 1 || dots === 1) ;
1965
+ else if (dots === 2) {
1966
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
1967
+ if (res.length > 2) {
1968
+ const lastSlashIndex = res.lastIndexOf("/");
1969
+ if (lastSlashIndex === -1) {
1970
+ res = "";
1971
+ lastSegmentLength = 0;
1972
+ } else {
1973
+ res = res.slice(0, lastSlashIndex);
1974
+ lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
1975
+ }
1976
+ lastSlash = index;
1977
+ dots = 0;
1978
+ continue;
1979
+ } else if (res.length > 0) {
1980
+ res = "";
1981
+ lastSegmentLength = 0;
1982
+ lastSlash = index;
1983
+ dots = 0;
1984
+ continue;
1985
+ }
1986
+ }
1987
+ if (allowAboveRoot) {
1988
+ res += res.length > 0 ? "/.." : "..";
1989
+ lastSegmentLength = 2;
1990
+ }
1991
+ } else {
1992
+ if (res.length > 0) {
1993
+ res += `/${path.slice(lastSlash + 1, index)}`;
1994
+ } else {
1995
+ res = path.slice(lastSlash + 1, index);
1996
+ }
1997
+ lastSegmentLength = index - lastSlash - 1;
1998
+ }
1999
+ lastSlash = index;
2000
+ dots = 0;
2001
+ } else if (char === "." && dots !== -1) {
2002
+ ++dots;
2003
+ } else {
2004
+ dots = -1;
2005
+ }
2006
+ }
2007
+ return res;
2008
+ }
2009
+ var isAbsolute = function(p) {
2010
+ return _IS_ABSOLUTE_RE.test(p);
2011
+ };
2012
+
2013
+ // src/utils.ts
1915
2014
  var require2 = createRequire(import.meta.url);
1916
2015
  var VITEST_PLUGIN_NAME = "vite-plugin-storybook-nextjs";
1917
2016
  process.env.VITEST === "true";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-storybook-nextjs",
3
- "version": "3.0.3--canary.ca2a5b0.0",
3
+ "version": "3.0.3--canary.68.2eff9c3.0",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "vite-plugin",
@@ -75,6 +75,7 @@
75
75
  "auto": "^11.2.0",
76
76
  "lefthook": "^1.6.16",
77
77
  "next": "16.0.0",
78
+ "pathe": "^2.0.3",
78
79
  "react": "19.2.0",
79
80
  "rollup": "^4.18.0",
80
81
  "semver": "^7.6.3",