@storybook/csf 0.0.2--canary.62.bf5823f.0 → 0.0.2--canary.62.4a3b146.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var B=Object.create;var R=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var I=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var E=(e,r,n,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of C(r))!w.call(e,a)&&a!==n&&R(e,a,{get:()=>r[a],enumerable:!(o=b(r,a))||o.enumerable});return e};var P=(e,r,n)=>(n=e!=null?B(h(e)):{},E(r||!e||!e.__esModule?R(n,"default",{value:e,enumerable:!0}):n,e));var x=I(T=>{Object.defineProperty(T,"__esModule",{value:!0}),T.isEqual=function(){var e=Object.prototype.toString,r=Object.getPrototypeOf,n=Object.getOwnPropertySymbols?function(o){return Object.keys(o).concat(Object.getOwnPropertySymbols(o))}:Object.keys;return function(o,a){return function i(t,s,d){var y,g,p,A=e.call(t),F=e.call(s);if(t===s)return !0;if(t==null||s==null)return !1;if(d.indexOf(t)>-1&&d.indexOf(s)>-1)return !0;if(d.push(t,s),A!=F||(y=n(t),g=n(s),y.length!=g.length||y.some(function(l){return !i(t[l],s[l],d)})))return !1;switch(A.slice(8,-1)){case"Symbol":return t.valueOf()==s.valueOf();case"Date":case"Number":return +t==+s||+t!=+t&&+s!=+s;case"RegExp":case"Function":case"String":case"Boolean":return ""+t==""+s;case"Set":case"Map":y=t.entries(),g=s.entries();do if(!i((p=y.next()).value,g.next().value,d))return !1;while(!p.done);return !0;case"ArrayBuffer":t=new Uint8Array(t),s=new Uint8Array(s);case"DataView":t=new Uint8Array(t.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(t.length!=s.length)return !1;for(p=0;p<t.length;p++)if((p in t||p in s)&&(p in t!=p in s||!i(t[p],s[p],d)))return !1;return !0;case"Object":return i(r(t),r(s),d);default:return !1}}(o,a,[])}}();});function u(e){return e.replace(/_/g," ").replace(/([a-z])([A-Z])/g,(r,n,o)=>`${n} ${o}`).replace(/([a-z])([0-9])/gi,(r,n,o)=>`${n} ${o}`).replace(/(\s|^)(\w)/g,(r,n,o)=>n+o.toUpperCase()).trim()}var c=P(x()),S=e=>e.map(r=>typeof r<"u").filter(Boolean).length,O=(e,r)=>{let{exists:n,eq:o,neq:a,truthy:i}=e;if(S([n,o,a,i])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:n,eq:o,neq:a})}`);if(typeof o<"u")return (0, c.isEqual)(r,o);if(typeof a<"u")return !(0, c.isEqual)(r,a);if(typeof n<"u"){let s=typeof r<"u";return n?s:!s}return (typeof i>"u"?!0:i)?!!r:!r},v=(e,r,n)=>{if(!e.if)return !0;let{arg:o,global:a}=e.if;if(S([o,a])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:o,global:a})}`);let i=o?r[o]:n[a];return O(e.if,i)};var L=e=>e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),m=(e,r)=>{let n=L(e);if(n==="")throw new Error(`Invalid ${r} '${e}', must include alphanumeric characters`);return n},N=(e,r)=>`${m(e,"kind")}${r?`--${m(r,"name")}`:""}`,M=e=>u(e);function f(e,r){return Array.isArray(r)?r.includes(e):e.match(r)}function G(e,{includeStories:r,excludeStories:n}){return e!=="__esModule"&&(!r||f(e,r))&&(!n||!f(e,n))}var V=(e,{rootSeparator:r,groupSeparator:n})=>{let[o,a]=e.split(r,2),i=(a||e).split(n).filter(t=>!!t);return {root:a?o:null,groups:i}};
3
+ var B=Object.create;var R=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var I=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var E=(e,r,n,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of C(r))!w.call(e,a)&&a!==n&&R(e,a,{get:()=>r[a],enumerable:!(o=b(r,a))||o.enumerable});return e};var P=(e,r,n)=>(n=e!=null?B(h(e)):{},E(r||!e||!e.__esModule?R(n,"default",{value:e,enumerable:!0}):n,e));var x=I(T=>{Object.defineProperty(T,"__esModule",{value:!0}),T.isEqual=function(){var e=Object.prototype.toString,r=Object.getPrototypeOf,n=Object.getOwnPropertySymbols?function(o){return Object.keys(o).concat(Object.getOwnPropertySymbols(o))}:Object.keys;return function(o,a){return function i(t,s,d){var y,g,p,A=e.call(t),F=e.call(s);if(t===s)return !0;if(t==null||s==null)return !1;if(d.indexOf(t)>-1&&d.indexOf(s)>-1)return !0;if(d.push(t,s),A!=F||(y=n(t),g=n(s),y.length!=g.length||y.some(function(l){return !i(t[l],s[l],d)})))return !1;switch(A.slice(8,-1)){case"Symbol":return t.valueOf()==s.valueOf();case"Date":case"Number":return +t==+s||+t!=+t&&+s!=+s;case"RegExp":case"Function":case"String":case"Boolean":return ""+t==""+s;case"Set":case"Map":y=t.entries(),g=s.entries();do if(!i((p=y.next()).value,g.next().value,d))return !1;while(!p.done);return !0;case"ArrayBuffer":t=new Uint8Array(t),s=new Uint8Array(s);case"DataView":t=new Uint8Array(t.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(t.length!=s.length)return !1;for(p=0;p<t.length;p++)if((p in t||p in s)&&(p in t!=p in s||!i(t[p],s[p],d)))return !1;return !0;case"Object":return i(r(t),r(s),d);default:return !1}}(o,a,[])}}();});function u(e){return e.replace(/_/g," ").replace(/-/g," ").replace(/([a-z])([A-Z])/g,(r,n,o)=>`${n} ${o}`).replace(/([a-z])([0-9])/gi,(r,n,o)=>`${n} ${o}`).replace(/(\s|^)(\w)/g,(r,n,o)=>n+o.toUpperCase()).trim()}var c=P(x()),S=e=>e.map(r=>typeof r<"u").filter(Boolean).length,O=(e,r)=>{let{exists:n,eq:o,neq:a,truthy:i}=e;if(S([n,o,a,i])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:n,eq:o,neq:a})}`);if(typeof o<"u")return (0, c.isEqual)(r,o);if(typeof a<"u")return !(0, c.isEqual)(r,a);if(typeof n<"u"){let s=typeof r<"u";return n?s:!s}return (typeof i>"u"?!0:i)?!!r:!r},v=(e,r,n)=>{if(!e.if)return !0;let{arg:o,global:a}=e.if;if(S([o,a])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:o,global:a})}`);let i=o?r[o]:n[a];return O(e.if,i)};var L=e=>e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),m=(e,r)=>{let n=L(e);if(n==="")throw new Error(`Invalid ${r} '${e}', must include alphanumeric characters`);return n},N=(e,r)=>`${m(e,"kind")}${r?`--${m(r,"name")}`:""}`,M=e=>u(e);function f(e,r){return Array.isArray(r)?r.includes(e):e.match(r)}function G(e,{includeStories:r,excludeStories:n}){return e!=="__esModule"&&(!r||f(e,r))&&(!n||!f(e,n))}var V=(e,{rootSeparator:r,groupSeparator:n})=>{let[o,a]=e.split(r,2),i=(a||e).split(n).filter(t=>!!t);return {root:a?o:null,groups:i}};
4
4
 
5
5
  exports.includeConditionalArg = v;
6
6
  exports.isExportStory = G;
package/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
- var B=Object.create;var R=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var I=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var E=(e,r,n,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of C(r))!w.call(e,a)&&a!==n&&R(e,a,{get:()=>r[a],enumerable:!(o=b(r,a))||o.enumerable});return e};var P=(e,r,n)=>(n=e!=null?B(h(e)):{},E(r||!e||!e.__esModule?R(n,"default",{value:e,enumerable:!0}):n,e));var x=I(T=>{Object.defineProperty(T,"__esModule",{value:!0}),T.isEqual=function(){var e=Object.prototype.toString,r=Object.getPrototypeOf,n=Object.getOwnPropertySymbols?function(o){return Object.keys(o).concat(Object.getOwnPropertySymbols(o))}:Object.keys;return function(o,a){return function i(t,s,d){var y,g,p,A=e.call(t),F=e.call(s);if(t===s)return !0;if(t==null||s==null)return !1;if(d.indexOf(t)>-1&&d.indexOf(s)>-1)return !0;if(d.push(t,s),A!=F||(y=n(t),g=n(s),y.length!=g.length||y.some(function(l){return !i(t[l],s[l],d)})))return !1;switch(A.slice(8,-1)){case"Symbol":return t.valueOf()==s.valueOf();case"Date":case"Number":return +t==+s||+t!=+t&&+s!=+s;case"RegExp":case"Function":case"String":case"Boolean":return ""+t==""+s;case"Set":case"Map":y=t.entries(),g=s.entries();do if(!i((p=y.next()).value,g.next().value,d))return !1;while(!p.done);return !0;case"ArrayBuffer":t=new Uint8Array(t),s=new Uint8Array(s);case"DataView":t=new Uint8Array(t.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(t.length!=s.length)return !1;for(p=0;p<t.length;p++)if((p in t||p in s)&&(p in t!=p in s||!i(t[p],s[p],d)))return !1;return !0;case"Object":return i(r(t),r(s),d);default:return !1}}(o,a,[])}}();});function u(e){return e.replace(/_/g," ").replace(/([a-z])([A-Z])/g,(r,n,o)=>`${n} ${o}`).replace(/([a-z])([0-9])/gi,(r,n,o)=>`${n} ${o}`).replace(/(\s|^)(\w)/g,(r,n,o)=>n+o.toUpperCase()).trim()}var c=P(x()),S=e=>e.map(r=>typeof r<"u").filter(Boolean).length,O=(e,r)=>{let{exists:n,eq:o,neq:a,truthy:i}=e;if(S([n,o,a,i])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:n,eq:o,neq:a})}`);if(typeof o<"u")return (0, c.isEqual)(r,o);if(typeof a<"u")return !(0, c.isEqual)(r,a);if(typeof n<"u"){let s=typeof r<"u";return n?s:!s}return (typeof i>"u"?!0:i)?!!r:!r},v=(e,r,n)=>{if(!e.if)return !0;let{arg:o,global:a}=e.if;if(S([o,a])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:o,global:a})}`);let i=o?r[o]:n[a];return O(e.if,i)};var L=e=>e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),m=(e,r)=>{let n=L(e);if(n==="")throw new Error(`Invalid ${r} '${e}', must include alphanumeric characters`);return n},N=(e,r)=>`${m(e,"kind")}${r?`--${m(r,"name")}`:""}`,M=e=>u(e);function f(e,r){return Array.isArray(r)?r.includes(e):e.match(r)}function G(e,{includeStories:r,excludeStories:n}){return e!=="__esModule"&&(!r||f(e,r))&&(!n||!f(e,n))}var V=(e,{rootSeparator:r,groupSeparator:n})=>{let[o,a]=e.split(r,2),i=(a||e).split(n).filter(t=>!!t);return {root:a?o:null,groups:i}};
1
+ var B=Object.create;var R=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var I=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var E=(e,r,n,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of C(r))!w.call(e,a)&&a!==n&&R(e,a,{get:()=>r[a],enumerable:!(o=b(r,a))||o.enumerable});return e};var P=(e,r,n)=>(n=e!=null?B(h(e)):{},E(r||!e||!e.__esModule?R(n,"default",{value:e,enumerable:!0}):n,e));var x=I(T=>{Object.defineProperty(T,"__esModule",{value:!0}),T.isEqual=function(){var e=Object.prototype.toString,r=Object.getPrototypeOf,n=Object.getOwnPropertySymbols?function(o){return Object.keys(o).concat(Object.getOwnPropertySymbols(o))}:Object.keys;return function(o,a){return function i(t,s,d){var y,g,p,A=e.call(t),F=e.call(s);if(t===s)return !0;if(t==null||s==null)return !1;if(d.indexOf(t)>-1&&d.indexOf(s)>-1)return !0;if(d.push(t,s),A!=F||(y=n(t),g=n(s),y.length!=g.length||y.some(function(l){return !i(t[l],s[l],d)})))return !1;switch(A.slice(8,-1)){case"Symbol":return t.valueOf()==s.valueOf();case"Date":case"Number":return +t==+s||+t!=+t&&+s!=+s;case"RegExp":case"Function":case"String":case"Boolean":return ""+t==""+s;case"Set":case"Map":y=t.entries(),g=s.entries();do if(!i((p=y.next()).value,g.next().value,d))return !1;while(!p.done);return !0;case"ArrayBuffer":t=new Uint8Array(t),s=new Uint8Array(s);case"DataView":t=new Uint8Array(t.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(t.length!=s.length)return !1;for(p=0;p<t.length;p++)if((p in t||p in s)&&(p in t!=p in s||!i(t[p],s[p],d)))return !1;return !0;case"Object":return i(r(t),r(s),d);default:return !1}}(o,a,[])}}();});function u(e){return e.replace(/_/g," ").replace(/-/g," ").replace(/([a-z])([A-Z])/g,(r,n,o)=>`${n} ${o}`).replace(/([a-z])([0-9])/gi,(r,n,o)=>`${n} ${o}`).replace(/(\s|^)(\w)/g,(r,n,o)=>n+o.toUpperCase()).trim()}var c=P(x()),S=e=>e.map(r=>typeof r<"u").filter(Boolean).length,O=(e,r)=>{let{exists:n,eq:o,neq:a,truthy:i}=e;if(S([n,o,a,i])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:n,eq:o,neq:a})}`);if(typeof o<"u")return (0, c.isEqual)(r,o);if(typeof a<"u")return !(0, c.isEqual)(r,a);if(typeof n<"u"){let s=typeof r<"u";return n?s:!s}return (typeof i>"u"?!0:i)?!!r:!r},v=(e,r,n)=>{if(!e.if)return !0;let{arg:o,global:a}=e.if;if(S([o,a])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:o,global:a})}`);let i=o?r[o]:n[a];return O(e.if,i)};var L=e=>e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),m=(e,r)=>{let n=L(e);if(n==="")throw new Error(`Invalid ${r} '${e}', must include alphanumeric characters`);return n},N=(e,r)=>`${m(e,"kind")}${r?`--${m(r,"name")}`:""}`,M=e=>u(e);function f(e,r){return Array.isArray(r)?r.includes(e):e.match(r)}function G(e,{includeStories:r,excludeStories:n}){return e!=="__esModule"&&(!r||f(e,r))&&(!n||!f(e,n))}var V=(e,{rootSeparator:r,groupSeparator:n})=>{let[o,a]=e.split(r,2),i=(a||e).split(n).filter(t=>!!t);return {root:a?o:null,groups:i}};
2
2
 
3
3
  export { v as includeConditionalArg, G as isExportStory, V as parseKind, L as sanitize, M as storyNameFromExport, N as toId };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/csf",
3
- "version": "0.0.2--canary.62.bf5823f.0",
3
+ "version": "0.0.2--canary.62.4a3b146.0",
4
4
  "description": "Component Story Format (CSF) utilities",
5
5
  "keywords": [
6
6
  "storybook",