@storybook/csf 0.0.2-next.9 β†’ 0.1.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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,73 @@
1
+ # v0.1.0 (Mon Apr 03 2023)
2
+
3
+ #### πŸš€ Enhancement
4
+
5
+
6
+ #### πŸ› Bug Fix
7
+
8
+ - Turn Args interfaces into types when passed to decorators [#65](https://github.com/ComponentDriven/csf/pull/65) ([@kasperpeulen](https://github.com/kasperpeulen))
9
+ - Improve the startcase implementation to mimick lodash's version more closely [#64](https://github.com/ComponentDriven/csf/pull/64) ([@ndelangen](https://github.com/ndelangen))
10
+ - replace lodash [#62](https://github.com/ComponentDriven/csf/pull/62) ([@ndelangen](https://github.com/ndelangen))
11
+ - Fix bug with meta not working well as generic parameter for StoryObj [#60](https://github.com/ComponentDriven/csf/pull/60) ([@kasperpeulen](https://github.com/kasperpeulen))
12
+ - Make sure that index signatures (used in decorators) don't cause unexpected types [#58](https://github.com/ComponentDriven/csf/pull/58) ([@kasperpeulen](https://github.com/kasperpeulen))
13
+ - Add strict variants for Args and Paramters to CSF [#57](https://github.com/ComponentDriven/csf/pull/57) ([@kasperpeulen](https://github.com/kasperpeulen))
14
+ - Revert stricter parameters [#56](https://github.com/ComponentDriven/csf/pull/56) ([@kasperpeulen](https://github.com/kasperpeulen))
15
+ - Use builtin installation of actions/setup-node [#55](https://github.com/ComponentDriven/csf/pull/55) ([@kasperpeulen](https://github.com/kasperpeulen))
16
+ - Rename Framework to Renderer [#54](https://github.com/ComponentDriven/csf/pull/54) ([@kasperpeulen](https://github.com/kasperpeulen))
17
+ - Rework Framework type to contain `canvasElement` [#53](https://github.com/ComponentDriven/csf/pull/53) ([@tmeasday](https://github.com/tmeasday))
18
+ - Add tags annotation at all levels [#52](https://github.com/ComponentDriven/csf/pull/52) ([@tmeasday](https://github.com/tmeasday))
19
+ - First attempt at bringing new types over [#29](https://github.com/ComponentDriven/csf/pull/29) ([@tmeasday](https://github.com/tmeasday) [@shilman](https://github.com/shilman) [@ghengeveld](https://github.com/ghengeveld) [@wKich](https://github.com/wKich) [@kasperpeulen](https://github.com/kasperpeulen))
20
+ - Revert "Play function can only be set at the story level" [#40](https://github.com/ComponentDriven/csf/pull/40) ([@wKich](https://github.com/wKich) [@shilman](https://github.com/shilman))
21
+ - Add conditional arg types and metadata [#36](https://github.com/ComponentDriven/csf/pull/36) ([@shilman](https://github.com/shilman) [@tmeasday](https://github.com/tmeasday) [@kasperpeulen](https://github.com/kasperpeulen))
22
+ - Re-apply `TArgs` to CSF `render` type [#43](https://github.com/ComponentDriven/csf/pull/43) ([@tmeasday](https://github.com/tmeasday) [@shilman](https://github.com/shilman) [@kasperpeulen](https://github.com/kasperpeulen))
23
+ - Add step to play context and `runStep` to project annotations [#48](https://github.com/ComponentDriven/csf/pull/48) ([@tmeasday](https://github.com/tmeasday) [@shilman](https://github.com/shilman) [@kasperpeulen](https://github.com/kasperpeulen))
24
+ - Sound arg types for CSF3 [#49](https://github.com/ComponentDriven/csf/pull/49) ([@kasperpeulen](https://github.com/kasperpeulen) [@shilman](https://github.com/shilman))
25
+ - ArgsFromMeta utility and generic ArgsStoryFn RT [#51](https://github.com/ComponentDriven/csf/pull/51) ([@kasperpeulen](https://github.com/kasperpeulen))
26
+ - Configure Auto [#50](https://github.com/ComponentDriven/csf/pull/50) ([@shilman](https://github.com/shilman))
27
+ - Only make `TArgs` parameterize `args` and `argTypes` in our default annotations [#33](https://github.com/ComponentDriven/csf/pull/33) ([@tmeasday](https://github.com/tmeasday))
28
+ - Adding Components.studio as a tool using CSF [#13](https://github.com/ComponentDriven/csf/pull/13) ([@georges-gomes](https://github.com/georges-gomes) [@ghengeveld](https://github.com/ghengeveld))
29
+ - Makes name argument for 'toId' optional [#17](https://github.com/ComponentDriven/csf/pull/17) ([@unematiii](https://github.com/unematiii) [@ghengeveld](https://github.com/ghengeveld))
30
+ - use permanent url for the header image [#12](https://github.com/ComponentDriven/csf/pull/12) ([@winkerVSbecks](https://github.com/winkerVSbecks))
31
+ - fix link to image [#10](https://github.com/ComponentDriven/csf/pull/10) ([@winkerVSbecks](https://github.com/winkerVSbecks))
32
+ - Publish under @componentdriven and update README [#8](https://github.com/ComponentDriven/csf/pull/8) ([@winkerVSbecks](https://github.com/winkerVSbecks))
33
+ - Add meta types for CSF [#5](https://github.com/ComponentDriven/csf/pull/5) ([@wKich](https://github.com/wKich))
34
+ - types of csf properties [#3](https://github.com/ComponentDriven/csf/pull/3) ([@atanasster](https://github.com/atanasster) [@ndelangen](https://github.com/ndelangen))
35
+ - Extract @storybook/csf from monorepo [#1](https://github.com/ComponentDriven/csf/pull/1) ([@shilman](https://github.com/shilman))
36
+
37
+ #### ⚠️ Pushed to `master`
38
+
39
+ - First commit ([@shilman](https://github.com/shilman))
40
+
41
+ #### πŸ“ Documentation
42
+
43
+ - added storyNameFromExport(key) in README.md [#2](https://github.com/ComponentDriven/csf/pull/2) ([@georges-gomes](https://github.com/georges-gomes) [@shilman](https://github.com/shilman))
44
+
45
+ #### πŸ”© Dependency Updates
46
+
47
+ - Bump handlebars from 4.5.3 to 4.7.7 [#20](https://github.com/ComponentDriven/csf/pull/20) ([@dependabot[bot]](https://github.com/dependabot[bot]))
48
+ - Bump y18n from 4.0.0 to 4.0.3 [#32](https://github.com/ComponentDriven/csf/pull/32) ([@dependabot[bot]](https://github.com/dependabot[bot]))
49
+ - Bump ini from 1.3.5 to 1.3.8 [#18](https://github.com/ComponentDriven/csf/pull/18) ([@dependabot[bot]](https://github.com/dependabot[bot]))
50
+ - Bump yargs-parser from 13.1.1 to 13.1.2 [#15](https://github.com/ComponentDriven/csf/pull/15) ([@dependabot[bot]](https://github.com/dependabot[bot]))
51
+ - Bump lodash from 4.17.15 to 4.17.21 [#21](https://github.com/ComponentDriven/csf/pull/21) ([@dependabot[bot]](https://github.com/dependabot[bot]))
52
+ - Bump hosted-git-info from 2.8.5 to 2.8.9 [#22](https://github.com/ComponentDriven/csf/pull/22) ([@dependabot[bot]](https://github.com/dependabot[bot]))
53
+ - Bump path-parse from 1.0.6 to 1.0.7 [#25](https://github.com/ComponentDriven/csf/pull/25) ([@dependabot[bot]](https://github.com/dependabot[bot]))
54
+ - Bump browserslist from 4.11.1 to 4.16.6 [#23](https://github.com/ComponentDriven/csf/pull/23) ([@dependabot[bot]](https://github.com/dependabot[bot]))
55
+ - Bump acorn from 5.7.3 to 5.7.4 [#27](https://github.com/ComponentDriven/csf/pull/27) ([@dependabot[bot]](https://github.com/dependabot[bot]))
56
+ - Bump ws from 5.2.2 to 5.2.3 [#28](https://github.com/ComponentDriven/csf/pull/28) ([@dependabot[bot]](https://github.com/dependabot[bot]))
57
+ - Bump tar from 4.4.13 to 4.4.19 [#30](https://github.com/ComponentDriven/csf/pull/30) ([@dependabot[bot]](https://github.com/dependabot[bot]))
58
+ - Bump tmpl from 1.0.4 to 1.0.5 [#31](https://github.com/ComponentDriven/csf/pull/31) ([@dependabot[bot]](https://github.com/dependabot[bot]))
59
+
60
+ #### Authors: 12
61
+
62
+ - [@dependabot[bot]](https://github.com/dependabot[bot])
63
+ - Atanas Stoyanov ([@atanasster](https://github.com/atanasster))
64
+ - Dmitriy Lazarev ([@wKich](https://github.com/wKich))
65
+ - Dominic Nguyen ([@domyen](https://github.com/domyen))
66
+ - Georges Gomes ([@georges-gomes](https://github.com/georges-gomes))
67
+ - Gert Hengeveld ([@ghengeveld](https://github.com/ghengeveld))
68
+ - Kasper Peulen ([@kasperpeulen](https://github.com/kasperpeulen))
69
+ - Mati KΓ€rner ([@unematiii](https://github.com/unematiii))
70
+ - Michael Shilman ([@shilman](https://github.com/shilman))
71
+ - Norbert de Langen ([@ndelangen](https://github.com/ndelangen))
72
+ - Tom Coleman ([@tmeasday](https://github.com/tmeasday))
73
+ - Varun Vachhar ([@winkerVSbecks](https://github.com/winkerVSbecks))
package/dist/index.d.ts CHANGED
@@ -170,7 +170,7 @@ type BaseAnnotations<TRenderer extends Renderer = Renderer, TArgs = Args> = {
170
170
  * Decorators defined in Meta will be applied to every story variation.
171
171
  * @see [Decorators](https://storybook.js.org/docs/addons/introduction/#1-decorators)
172
172
  */
173
- decorators?: DecoratorFunction<TRenderer, TArgs>[];
173
+ decorators?: DecoratorFunction<TRenderer, Simplify<TArgs>>[];
174
174
  /**
175
175
  * Custom metadata for a story.
176
176
  * @see [Parameters](https://storybook.js.org/docs/basics/writing-stories/#parameters)
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
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(/-/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=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var E=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of C(e))!w.call(r,a)&&a!==t&&R(r,a,{get:()=>e[a],enumerable:!(n=b(e,a))||n.enumerable});return r};var P=(r,e,t)=>(t=r!=null?B(h(r)):{},E(e||!r||!r.__esModule?R(t,"default",{value:r,enumerable:!0}):t,r));var x=I(T=>{Object.defineProperty(T,"__esModule",{value:!0}),T.isEqual=function(){var r=Object.prototype.toString,e=Object.getPrototypeOf,t=Object.getOwnPropertySymbols?function(n){return Object.keys(n).concat(Object.getOwnPropertySymbols(n))}:Object.keys;return function(n,a){return function i(o,s,d){var y,g,p,A=r.call(o),F=r.call(s);if(o===s)return !0;if(o==null||s==null)return !1;if(d.indexOf(o)>-1&&d.indexOf(s)>-1)return !0;if(d.push(o,s),A!=F||(y=t(o),g=t(s),y.length!=g.length||y.some(function(l){return !i(o[l],s[l],d)})))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((p=y.next()).value,g.next().value,d))return !1;while(!p.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(p=0;p<o.length;p++)if((p in o||p in s)&&(p in o!=p in s||!i(o[p],s[p],d)))return !1;return !0;case"Object":return i(e(o),e(s),d);default:return !1}}(n,a,[])}}();});function u(r){return r.replace(/_/g," ").replace(/-/g," ").replace(/\./g," ").replace(/([^\n])([A-Z])([a-z])/g,(e,t,n,a)=>`${t} ${n}${a}`).replace(/([a-z])([A-Z])/g,(e,t,n)=>`${t} ${n}`).replace(/([a-z])([0-9])/gi,(e,t,n)=>`${t} ${n}`).replace(/([0-9])([a-z])/gi,(e,t,n)=>`${t} ${n}`).replace(/(\s|^)(\w)/g,(e,t,n)=>`${t}${n.toUpperCase()}`).replace(/ +/g," ").trim()}var c=P(x()),S=r=>r.map(e=>typeof e<"u").filter(Boolean).length,O=(r,e)=>{let{exists:t,eq:n,neq:a,truthy:i}=r;if(S([t,n,a,i])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:t,eq:n,neq:a})}`);if(typeof n<"u")return (0, c.isEqual)(e,n);if(typeof a<"u")return !(0, c.isEqual)(e,a);if(typeof t<"u"){let s=typeof e<"u";return t?s:!s}return (typeof i>"u"?!0:i)?!!e:!e},v=(r,e,t)=>{if(!r.if)return !0;let{arg:n,global:a}=r.if;if(S([n,a])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:n,global:a})}`);let i=n?e[n]:t[a];return O(r.if,i)};var L=r=>r.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),m=(r,e)=>{let t=L(r);if(t==="")throw new Error(`Invalid ${e} '${r}', must include alphanumeric characters`);return t},N=(r,e)=>`${m(r,"kind")}${e?`--${m(e,"name")}`:""}`,M=r=>u(r);function f(r,e){return Array.isArray(e)?e.includes(r):r.match(e)}function G(r,{includeStories:e,excludeStories:t}){return r!=="__esModule"&&(!e||f(r,e))&&(!t||!f(r,t))}var z=(r,{rootSeparator:e,groupSeparator:t})=>{let[n,a]=r.split(e,2),i=(a||r).split(t).filter(o=>!!o);return {root:a?n:null,groups:i}};
4
4
 
5
5
  exports.includeConditionalArg = v;
6
6
  exports.isExportStory = G;
7
- exports.parseKind = V;
7
+ exports.parseKind = z;
8
8
  exports.sanitize = L;
9
9
  exports.storyNameFromExport = M;
10
10
  exports.toId = N;
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(/-/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=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var E=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of C(e))!w.call(r,a)&&a!==t&&R(r,a,{get:()=>e[a],enumerable:!(n=b(e,a))||n.enumerable});return r};var P=(r,e,t)=>(t=r!=null?B(h(r)):{},E(e||!r||!r.__esModule?R(t,"default",{value:r,enumerable:!0}):t,r));var x=I(T=>{Object.defineProperty(T,"__esModule",{value:!0}),T.isEqual=function(){var r=Object.prototype.toString,e=Object.getPrototypeOf,t=Object.getOwnPropertySymbols?function(n){return Object.keys(n).concat(Object.getOwnPropertySymbols(n))}:Object.keys;return function(n,a){return function i(o,s,d){var y,g,p,A=r.call(o),F=r.call(s);if(o===s)return !0;if(o==null||s==null)return !1;if(d.indexOf(o)>-1&&d.indexOf(s)>-1)return !0;if(d.push(o,s),A!=F||(y=t(o),g=t(s),y.length!=g.length||y.some(function(l){return !i(o[l],s[l],d)})))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((p=y.next()).value,g.next().value,d))return !1;while(!p.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(p=0;p<o.length;p++)if((p in o||p in s)&&(p in o!=p in s||!i(o[p],s[p],d)))return !1;return !0;case"Object":return i(e(o),e(s),d);default:return !1}}(n,a,[])}}();});function u(r){return r.replace(/_/g," ").replace(/-/g," ").replace(/\./g," ").replace(/([^\n])([A-Z])([a-z])/g,(e,t,n,a)=>`${t} ${n}${a}`).replace(/([a-z])([A-Z])/g,(e,t,n)=>`${t} ${n}`).replace(/([a-z])([0-9])/gi,(e,t,n)=>`${t} ${n}`).replace(/([0-9])([a-z])/gi,(e,t,n)=>`${t} ${n}`).replace(/(\s|^)(\w)/g,(e,t,n)=>`${t}${n.toUpperCase()}`).replace(/ +/g," ").trim()}var c=P(x()),S=r=>r.map(e=>typeof e<"u").filter(Boolean).length,O=(r,e)=>{let{exists:t,eq:n,neq:a,truthy:i}=r;if(S([t,n,a,i])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:t,eq:n,neq:a})}`);if(typeof n<"u")return (0, c.isEqual)(e,n);if(typeof a<"u")return !(0, c.isEqual)(e,a);if(typeof t<"u"){let s=typeof e<"u";return t?s:!s}return (typeof i>"u"?!0:i)?!!e:!e},v=(r,e,t)=>{if(!r.if)return !0;let{arg:n,global:a}=r.if;if(S([n,a])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:n,global:a})}`);let i=n?e[n]:t[a];return O(r.if,i)};var L=r=>r.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),m=(r,e)=>{let t=L(r);if(t==="")throw new Error(`Invalid ${e} '${r}', must include alphanumeric characters`);return t},N=(r,e)=>`${m(r,"kind")}${e?`--${m(e,"name")}`:""}`,M=r=>u(r);function f(r,e){return Array.isArray(e)?e.includes(r):r.match(e)}function G(r,{includeStories:e,excludeStories:t}){return r!=="__esModule"&&(!e||f(r,e))&&(!t||!f(r,t))}var z=(r,{rootSeparator:e,groupSeparator:t})=>{let[n,a]=r.split(e,2),i=(a||r).split(t).filter(o=>!!o);return {root:a?n:null,groups:i}};
2
2
 
3
- export { v as includeConditionalArg, G as isExportStory, V as parseKind, L as sanitize, M as storyNameFromExport, N as toId };
3
+ export { v as includeConditionalArg, G as isExportStory, z 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-next.9",
3
+ "version": "0.1.0",
4
4
  "description": "Component Story Format (CSF) utilities",
5
5
  "keywords": [
6
6
  "storybook",
@@ -114,6 +114,8 @@
114
114
  "eslint-plugin-jest": "^27.1.4",
115
115
  "expect-type": "^0.14.2",
116
116
  "jest": "^29.3.1",
117
+ "lodash": "^4.17.21",
118
+ "@types/lodash": "^4.14.191",
117
119
  "prettier": "^2.7.1",
118
120
  "ts-jest": "^29.0.3",
119
121
  "tsup": "^6.4.0",