npm package diff

Package: @storybook/types

Versions: 8.0.8 - 8.0.9

Modified:package/dist/index.d.ts

Index: package/dist/index.d.ts
===================================================================
--- package/dist/index.d.ts
+++ package/dist/index.d.ts
@@ -1023,8 +1023,9 @@
 }
 interface Parameters {
     [name: string]: any;
 }
+type ControlType = 'object' | 'boolean' | 'check' | 'inline-check' | 'radio' | 'inline-radio' | 'select' | 'multi-select' | 'number' | 'range' | 'file' | 'color' | 'date' | 'text';
 type ConditionalTest = {
     truthy?: boolean;
 } | {
     exists: boolean;
@@ -1038,14 +1039,120 @@
 } | {
     global: string;
 };
 type Conditional = ConditionalValue & ConditionalTest;
+interface ControlBase {
+    [key: string]: any;
+    /**
+     * @see https://storybook.js.org/docs/api/arg-types#controltype
+     */
+    type?: ControlType;
+    disable?: boolean;
+}
+type Control = ControlType | false | (ControlBase & (ControlBase | {
+    type: 'color';
+    /**
+     * @see https://storybook.js.org/docs/api/arg-types#controlpresetcolors
+     */
+    presetColors?: string[];
+} | {
+    type: 'file';
+    /**
+     * @see https://storybook.js.org/docs/api/arg-types#controlaccept
+     */
+    accept?: string;
+} | {
+    type: 'inline-check' | 'radio' | 'inline-radio' | 'select' | 'multi-select';
+    /**
+     * @see https://storybook.js.org/docs/api/arg-types#controllabels
+     */
+    labels?: {
+        [options: string]: string;
+    };
+} | {
+    type: 'number' | 'range';
+    /**
+     * @see https://storybook.js.org/docs/api/arg-types#controlmax
+     */
+    max?: number;
+    /**
+     * @see https://storybook.js.org/docs/api/arg-types#controlmin
+     */
+    min?: number;
+    /**
+     * @see https://storybook.js.org/docs/api/arg-types#controlstep
+     */
+    step?: number;
+}));
 interface InputType {
+    /**
+     * @see https://storybook.js.org/docs/api/arg-types#control
+     */
+    control?: Control;
+    /**
+     * @see https://storybook.js.org/docs/api/arg-types#description
+     */
+    description?: string;
+    /**
+     * @see https://storybook.js.org/docs/api/arg-types#if
+     */
+    if?: Conditional;
+    /**
+     * @see https://storybook.js.org/docs/api/arg-types#mapping
+     */
+    mapping?: {
+        [key: string]: any;
+    };
+    /**
+     * @see https://storybook.js.org/docs/api/arg-types#name
+     */
     name?: string;
-    description?: string;
+    /**
+     * @see https://storybook.js.org/docs/api/arg-types#options
+     */
+    options?: any[];
+    /**
+     * @see https://storybook.js.org/docs/api/arg-types#table
+     */
+    table?: {
+        [key: string]: unknown;
+        /**
+         * @see https://storybook.js.org/docs/api/arg-types#tablecategory
+         */
+        category?: string;
+        /**
+         * @see https://storybook.js.org/docs/api/arg-types#tabledefaultvalue
+         */
+        defaultValue?: {
+            summary?: string;
+            detail?: string;
+        };
+        /**
+         * @see https://storybook.js.org/docs/api/arg-types#tabledisable
+         */
+        disable?: boolean;
+        /**
+         * @see https://storybook.js.org/docs/api/arg-types#tablesubcategory
+         */
+        subcategory?: string;
+        /**
+         * @see https://storybook.js.org/docs/api/arg-types#tabletype
+         */
+        type?: {
+            summary?: string;
+            detail?: string;
+        };
+    };
+    /**
+     * @see https://storybook.js.org/docs/api/arg-types#type
+     */
+    type?: SBType | SBScalarType['name'];
+    /**
+     * @see https://storybook.js.org/docs/api/arg-types#defaultvalue
+     *
+     * @deprecated Use `table.defaultValue.summary` instead.
+     */
     defaultValue?: any;
-    type?: SBType | SBScalarType['name'];
-    if?: Conditional;
     [key: string]: any;
 }
 interface StrictInputType extends InputType {
     name: string;
@@ -1056,8 +1163,11 @@
 }
 interface StrictArgs {
     [name: string]: unknown;
 }
+/**
+ * @see https://storybook.js.org/docs/api/arg-types#argtypes
+ */
 type ArgTypes<TArgs = Args> = {
     [name in keyof TArgs]: InputType;
 };
 type StrictArgTypes<TArgs = Args> = {

Modified:package/package.json

Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,7 +1,7 @@
 {
   "name": "@storybook/types",
-  "version": "8.0.8",
+  "version": "8.0.9",
   "description": "Core Storybook TS Types",
   "keywords": [
     "storybook"
   ],
@@ -43,14 +43,14 @@
     "check": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/check.ts",
     "prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts"
   },
   "dependencies": {
-    "@storybook/channels": "8.0.8",
+    "@storybook/channels": "8.0.9",
     "@types/express": "^4.7.0",
     "file-system-cache": "2.3.0"
   },
   "devDependencies": {
-    "@storybook/csf": "^0.1.2",
+    "@storybook/csf": "^0.1.4",
     "@types/fs-extra": "^11.0.1",
     "@types/node": "^18.0.0",
     "typescript": "^5.3.2"
   },