@storybook/preview 7.6.13 → 7.6.15
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/runtime.js +1 -1
- package/package.json +5 -5
package/dist/runtime.js
CHANGED
|
@@ -22,7 +22,7 @@ More info: ${page}
|
|
|
22
22
|
- Did you remove it from your CSF file?
|
|
23
23
|
- Are you sure a story with the id '${this.data.storyId}' exists?
|
|
24
24
|
- Please check the values in the stories field of your main.js config and see if they would match your CSF File.
|
|
25
|
-
- Also check the browser console and terminal for potential error messages.`}};var has=Object.prototype.hasOwnProperty;function find(iter,tar,key2){for(key2 of iter.keys())if(dequal(key2,tar))return key2}function dequal(foo,bar){var ctor,len,tmp;if(foo===bar)return!0;if(foo&&bar&&(ctor=foo.constructor)===bar.constructor){if(ctor===Date)return foo.getTime()===bar.getTime();if(ctor===RegExp)return foo.toString()===bar.toString();if(ctor===Array){if((len=foo.length)===bar.length)for(;len--&&dequal(foo[len],bar[len]););return len===-1}if(ctor===Set){if(foo.size!==bar.size)return!1;for(len of foo)if(tmp=len,tmp&&typeof tmp=="object"&&(tmp=find(bar,tmp),!tmp)||!bar.has(tmp))return!1;return!0}if(ctor===Map){if(foo.size!==bar.size)return!1;for(len of foo)if(tmp=len[0],tmp&&typeof tmp=="object"&&(tmp=find(bar,tmp),!tmp)||!dequal(len[1],bar.get(tmp)))return!1;return!0}if(ctor===ArrayBuffer)foo=new Uint8Array(foo),bar=new Uint8Array(bar);else if(ctor===DataView){if((len=foo.byteLength)===bar.byteLength)for(;len--&&foo.getInt8(len)===bar.getInt8(len););return len===-1}if(ArrayBuffer.isView(foo)){if((len=foo.byteLength)===bar.byteLength)for(;len--&&foo[len]===bar[len];);return len===-1}if(!ctor||typeof foo=="object"){len=0;for(ctor in foo)if(has.call(foo,ctor)&&++len&&!has.call(bar,ctor)||!(ctor in bar)||!dequal(foo[ctor],bar[ctor]))return!1;return Object.keys(bar).length===len}}return foo!==foo&&bar!==bar}var import_isPlainObject=__toESM(require_isPlainObject(),1);var B=Object.create,R=Object.defineProperty,b=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,h=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,I=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),E=(r,e,n,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of C(e))!w.call(r,a)&&a!==n&&R(r,a,{get:()=>e[a],enumerable:!(t=b(e,a))||t.enumerable});return r},v=(r,e,n)=>(n=r!=null?B(h(r)):{},E(e||!r||!r.__esModule?R(n,"default",{value:r,enumerable:!0}):n,r)),x=I(T=>{Object.defineProperty(T,"__esModule",{value:!0}),T.isEqual=function(){var r=Object.prototype.toString,e=Object.getPrototypeOf,n=Object.getOwnPropertySymbols?function(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}:Object.keys;return function(t,a){return function i(o,s,p){var y,g,d,A=r.call(o),F=r.call(s);if(o===s)return!0;if(o==null||s==null)return!1;if(p.indexOf(o)>-1&&p.indexOf(s)>-1)return!0;if(p.push(o,s),A!=F||(y=n(o),g=n(s),y.length!=g.length||y.some(function(l){return!i(o[l],s[l],p)})))return!1;switch(A.slice(8,-1)){case"Symbol":return o.valueOf()==s.valueOf();case"Date":case"Number":return+o==+s||+o!=+o&&+s!=+s;case"RegExp":case"Function":case"String":case"Boolean":return""+o==""+s;case"Set":case"Map":y=o.entries(),g=s.entries();do if(!i((d=y.next()).value,g.next().value,p))return!1;while(!d.done);return!0;case"ArrayBuffer":o=new Uint8Array(o),s=new Uint8Array(s);case"DataView":o=new Uint8Array(o.buffer),s=new Uint8Array(s.buffer);case"Float32Array":case"Float64Array":case"Int8Array":case"Int16Array":case"Int32Array":case"Uint8Array":case"Uint16Array":case"Uint32Array":case"Uint8ClampedArray":case"Arguments":case"Array":if(o.length!=s.length)return!1;for(d=0;d<o.length;d++)if((d in o||d in s)&&(d in o!=d in s||!i(o[d],s[d],p)))return!1;return!0;case"Object":return i(e(o),e(s),p);default:return!1}}(t,a,[])}}()});function u(r){return r.replace(/_/g," ").replace(/-/g," ").replace(/\./g," ").replace(/([^\n])([A-Z])([a-z])/g,(e,n,t,a)=>`${n} ${t}${a}`).replace(/([a-z])([A-Z])/g,(e,n,t)=>`${n} ${t}`).replace(/([a-z])([0-9])/gi,(e,n,t)=>`${n} ${t}`).replace(/([0-9])([a-z])/gi,(e,n,t)=>`${n} ${t}`).replace(/(\s|^)(\w)/g,(e,n,t)=>`${n}${t.toUpperCase()}`).replace(/ +/g," ").trim()}var c=v(x()),S=r=>r.map(e=>typeof e<"u").filter(Boolean).length,P=(r,e)=>{let{exists:n,eq:t,neq:a,truthy:i}=r;if(S([n,t,a,i])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:n,eq:t,neq:a})}`);if(typeof t<"u")return(0,c.isEqual)(e,t);if(typeof a<"u")return!(0,c.isEqual)(e,a);if(typeof n<"u"){let s=typeof e<"u";return n?s:!s}return typeof i>"u"||i?!!e:!e},O=(r,e,n)=>{if(!r.if)return!0;let{arg:t,global:a}=r.if;if(S([t,a])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:t,global:a})}`);let i=t?e[t]:n[a];return P(r.if,i)},L=r=>r.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),f2=(r,e)=>{let n=L(r);if(n==="")throw new Error(`Invalid ${e} '${r}', must include alphanumeric characters`);return n},N=(r,e)=>`${f2(r,"kind")}${e?`--${f2(e,"name")}`:""}`,M=r=>u(r);function m(r,e){return Array.isArray(e)?e.includes(r):r.match(e)}function G(r,{includeStories:e,excludeStories:n}){return r!=="__esModule"&&(!e||m(r,e))&&(!n||!m(r,n))}var import_util_deprecate=__toESM(require_browser(),1);var import_pickBy=__toESM(require_pickBy(),1);var getImportPathMap=(0,import_memoizerific2.default)(1)(entries=>Object.values(entries).reduce((acc,entry)=>(acc[entry.importPath]=acc[entry.importPath]||entry,acc),{})),StoryIndexStore=class{constructor({entries}={v:4,entries:{}}){this.entries=entries}entryFromSpecifier(specifier){let entries=Object.values(this.entries);if(specifier==="*")return entries[0];if(typeof specifier=="string")return this.entries[specifier]?this.entries[specifier]:entries.find(entry=>entry.id.startsWith(specifier));let{name:name2,title}=specifier;return entries.find(entry=>entry.name===name2&&entry.title===title)}storyIdToEntry(storyId){let storyEntry=this.entries[storyId];if(!storyEntry)throw new MissingStoryAfterHmrError({storyId});return storyEntry}importPathToEntry(importPath){return getImportPathMap(this.entries)[importPath]}},INCOMPATIBLE=Symbol("incompatible"),map=(arg,argType)=>{let type=argType.type;if(arg==null||!type||argType.mapping)return arg;switch(type.name){case"string":return String(arg);case"enum":return arg;case"number":return Number(arg);case"boolean":return arg==="true";case"array":return!type.value||!Array.isArray(arg)?INCOMPATIBLE:arg.reduce((acc,item,index)=>{let mapped=map(item,{type:type.value});return mapped!==INCOMPATIBLE&&(acc[index]=mapped),acc},new Array(arg.length));case"object":return typeof arg=="string"||typeof arg=="number"?arg:!type.value||typeof arg!="object"?INCOMPATIBLE:Object.entries(arg).reduce((acc,[key2,val])=>{let mapped=map(val,{type:type.value[key2]});return mapped===INCOMPATIBLE?acc:Object.assign(acc,{[key2]:mapped})},{});default:return INCOMPATIBLE}},mapArgsToTypes=(args2,argTypes)=>Object.entries(args2).reduce((acc,[key2,value2])=>{if(!argTypes[key2])return acc;let mapped=map(value2,argTypes[key2]);return mapped===INCOMPATIBLE?acc:Object.assign(acc,{[key2]:mapped})},{}),combineArgs=(value2,update)=>Array.isArray(value2)&&Array.isArray(update)?update.reduce((acc,upd,index)=>(acc[index]=combineArgs(value2[index],update[index]),acc),[...value2]).filter(v2=>v2!==void 0):!(0,import_isPlainObject.default)(value2)||!(0,import_isPlainObject.default)(update)?update:Object.keys({...value2,...update}).reduce((acc,key2)=>{if(key2 in update){let combined=combineArgs(value2[key2],update[key2]);combined!==void 0&&(acc[key2]=combined)}else acc[key2]=value2[key2];return acc},{}),validateOptions=(args2,argTypes)=>Object.entries(argTypes).reduce((acc,[key2,{options:options2}])=>{function allowArg(){return key2 in args2&&(acc[key2]=args2[key2]),acc}if(!options2)return allowArg();if(!Array.isArray(options2))return once.error(dedent`
|
|
25
|
+
- Also check the browser console and terminal for potential error messages.`}};var has=Object.prototype.hasOwnProperty;function find(iter,tar,key2){for(key2 of iter.keys())if(dequal(key2,tar))return key2}function dequal(foo,bar){var ctor,len,tmp;if(foo===bar)return!0;if(foo&&bar&&(ctor=foo.constructor)===bar.constructor){if(ctor===Date)return foo.getTime()===bar.getTime();if(ctor===RegExp)return foo.toString()===bar.toString();if(ctor===Array){if((len=foo.length)===bar.length)for(;len--&&dequal(foo[len],bar[len]););return len===-1}if(ctor===Set){if(foo.size!==bar.size)return!1;for(len of foo)if(tmp=len,tmp&&typeof tmp=="object"&&(tmp=find(bar,tmp),!tmp)||!bar.has(tmp))return!1;return!0}if(ctor===Map){if(foo.size!==bar.size)return!1;for(len of foo)if(tmp=len[0],tmp&&typeof tmp=="object"&&(tmp=find(bar,tmp),!tmp)||!dequal(len[1],bar.get(tmp)))return!1;return!0}if(ctor===ArrayBuffer)foo=new Uint8Array(foo),bar=new Uint8Array(bar);else if(ctor===DataView){if((len=foo.byteLength)===bar.byteLength)for(;len--&&foo.getInt8(len)===bar.getInt8(len););return len===-1}if(ArrayBuffer.isView(foo)){if((len=foo.byteLength)===bar.byteLength)for(;len--&&foo[len]===bar[len];);return len===-1}if(!ctor||typeof foo=="object"){len=0;for(ctor in foo)if(has.call(foo,ctor)&&++len&&!has.call(bar,ctor)||!(ctor in bar)||!dequal(foo[ctor],bar[ctor]))return!1;return Object.keys(bar).length===len}}return foo!==foo&&bar!==bar}var import_isPlainObject=__toESM(require_isPlainObject(),1);var B=Object.create,R=Object.defineProperty,b=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,h=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,I=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),E=(r,e,n,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of C(e))!w.call(r,a)&&a!==n&&R(r,a,{get:()=>e[a],enumerable:!(t=b(e,a))||t.enumerable});return r},v=(r,e,n)=>(n=r!=null?B(h(r)):{},E(e||!r||!r.__esModule?R(n,"default",{value:r,enumerable:!0}):n,r)),x=I(T=>{Object.defineProperty(T,"__esModule",{value:!0}),T.isEqual=function(){var r=Object.prototype.toString,e=Object.getPrototypeOf,n=Object.getOwnPropertySymbols?function(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}:Object.keys;return function(t,a){return function i(o,s,p){var y,g,d,A=r.call(o),F=r.call(s);if(o===s)return!0;if(o==null||s==null)return!1;if(p.indexOf(o)>-1&&p.indexOf(s)>-1)return!0;if(p.push(o,s),A!=F||(y=n(o),g=n(s),y.length!=g.length||y.some(function(l){return!i(o[l],s[l],p)})))return!1;switch(A.slice(8,-1)){case"Symbol":return o.valueOf()==s.valueOf();case"Date":case"Number":return+o==+s||+o!=+o&&+s!=+s;case"RegExp":case"Function":case"String":case"Boolean":return""+o==""+s;case"Set":case"Map":y=o.entries(),g=s.entries();do if(!i((d=y.next()).value,g.next().value,p))return!1;while(!d.done);return!0;case"ArrayBuffer":o=new Uint8Array(o),s=new Uint8Array(s);case"DataView":o=new Uint8Array(o.buffer),s=new Uint8Array(s.buffer);case"Float32Array":case"Float64Array":case"Int8Array":case"Int16Array":case"Int32Array":case"Uint8Array":case"Uint16Array":case"Uint32Array":case"Uint8ClampedArray":case"Arguments":case"Array":if(o.length!=s.length)return!1;for(d=0;d<o.length;d++)if((d in o||d in s)&&(d in o!=d in s||!i(o[d],s[d],p)))return!1;return!0;case"Object":return i(e(o),e(s),p);default:return!1}}(t,a,[])}}()});function u(r){return r.replace(/_/g," ").replace(/-/g," ").replace(/\./g," ").replace(/([^\n])([A-Z])([a-z])/g,(e,n,t,a)=>`${n} ${t}${a}`).replace(/([a-z])([A-Z])/g,(e,n,t)=>`${n} ${t}`).replace(/([a-z])([0-9])/gi,(e,n,t)=>`${n} ${t}`).replace(/([0-9])([a-z])/gi,(e,n,t)=>`${n} ${t}`).replace(/(\s|^)(\w)/g,(e,n,t)=>`${n}${t.toUpperCase()}`).replace(/ +/g," ").trim()}var c=v(x()),S=r=>r.map(e=>typeof e<"u").filter(Boolean).length,P=(r,e)=>{let{exists:n,eq:t,neq:a,truthy:i}=r;if(S([n,t,a,i])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:n,eq:t,neq:a})}`);if(typeof t<"u")return(0,c.isEqual)(e,t);if(typeof a<"u")return!(0,c.isEqual)(e,a);if(typeof n<"u"){let s=typeof e<"u";return n?s:!s}return typeof i>"u"||i?!!e:!e},O=(r,e,n)=>{if(!r.if)return!0;let{arg:t,global:a}=r.if;if(S([t,a])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:t,global:a})}`);let i=t?e[t]:n[a];return P(r.if,i)},L=r=>r.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),f2=(r,e)=>{let n=L(r);if(n==="")throw new Error(`Invalid ${e} '${r}', must include alphanumeric characters`);return n},N=(r,e)=>`${f2(r,"kind")}${e?`--${f2(e,"name")}`:""}`,M=r=>u(r);function m(r,e){return Array.isArray(e)?e.includes(r):r.match(e)}function G(r,{includeStories:e,excludeStories:n}){return r!=="__esModule"&&(!e||m(r,e))&&(!n||!m(r,n))}var import_util_deprecate=__toESM(require_browser(),1);var import_pickBy=__toESM(require_pickBy(),1);var getImportPathMap=(0,import_memoizerific2.default)(1)(entries=>Object.values(entries).reduce((acc,entry)=>(acc[entry.importPath]=acc[entry.importPath]||entry,acc),{})),StoryIndexStore=class{constructor({entries}={v:4,entries:{}}){this.entries=entries}entryFromSpecifier(specifier){let entries=Object.values(this.entries);if(specifier==="*")return entries[0];if(typeof specifier=="string")return this.entries[specifier]?this.entries[specifier]:entries.find(entry=>entry.id.startsWith(specifier));let{name:name2,title}=specifier;return entries.find(entry=>entry.name===name2&&entry.title===title)}storyIdToEntry(storyId){let storyEntry=this.entries[storyId];if(!storyEntry)throw new MissingStoryAfterHmrError({storyId});return storyEntry}importPathToEntry(importPath){return getImportPathMap(this.entries)[importPath]}},INCOMPATIBLE=Symbol("incompatible"),map=(arg,argType)=>{let type=argType.type;if(arg==null||!type||argType.mapping)return arg;switch(type.name){case"string":return String(arg);case"enum":return arg;case"number":return Number(arg);case"boolean":return String(arg)==="true";case"array":return!type.value||!Array.isArray(arg)?INCOMPATIBLE:arg.reduce((acc,item,index)=>{let mapped=map(item,{type:type.value});return mapped!==INCOMPATIBLE&&(acc[index]=mapped),acc},new Array(arg.length));case"object":return typeof arg=="string"||typeof arg=="number"?arg:!type.value||typeof arg!="object"?INCOMPATIBLE:Object.entries(arg).reduce((acc,[key2,val])=>{let mapped=map(val,{type:type.value[key2]});return mapped===INCOMPATIBLE?acc:Object.assign(acc,{[key2]:mapped})},{});default:return INCOMPATIBLE}},mapArgsToTypes=(args2,argTypes)=>Object.entries(args2).reduce((acc,[key2,value2])=>{if(!argTypes[key2])return acc;let mapped=map(value2,argTypes[key2]);return mapped===INCOMPATIBLE?acc:Object.assign(acc,{[key2]:mapped})},{}),combineArgs=(value2,update)=>Array.isArray(value2)&&Array.isArray(update)?update.reduce((acc,upd,index)=>(acc[index]=combineArgs(value2[index],update[index]),acc),[...value2]).filter(v2=>v2!==void 0):!(0,import_isPlainObject.default)(value2)||!(0,import_isPlainObject.default)(update)?update:Object.keys({...value2,...update}).reduce((acc,key2)=>{if(key2 in update){let combined=combineArgs(value2[key2],update[key2]);combined!==void 0&&(acc[key2]=combined)}else acc[key2]=value2[key2];return acc},{}),validateOptions=(args2,argTypes)=>Object.entries(argTypes).reduce((acc,[key2,{options:options2}])=>{function allowArg(){return key2 in args2&&(acc[key2]=args2[key2]),acc}if(!options2)return allowArg();if(!Array.isArray(options2))return once.error(dedent`
|
|
26
26
|
Invalid argType: '${key2}.options' should be an array.
|
|
27
27
|
|
|
28
28
|
More info: https://storybook.js.org/docs/react/api/argtypes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/preview",
|
|
3
|
-
"version": "7.6.
|
|
3
|
+
"version": "7.6.15",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
"prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/esm-bundle.ts"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@storybook/channels": "7.6.
|
|
61
|
-
"@storybook/client-logger": "7.6.
|
|
62
|
-
"@storybook/core-events": "7.6.
|
|
60
|
+
"@storybook/channels": "7.6.15",
|
|
61
|
+
"@storybook/client-logger": "7.6.15",
|
|
62
|
+
"@storybook/core-events": "7.6.15",
|
|
63
63
|
"@storybook/global": "^5.0.0",
|
|
64
|
-
"@storybook/preview-api": "7.6.
|
|
64
|
+
"@storybook/preview-api": "7.6.15",
|
|
65
65
|
"browser-dtector": "^3.4.0",
|
|
66
66
|
"fs-extra": "^11.1.0",
|
|
67
67
|
"ts-dedent": "^2.0.0",
|