@storybook/web-components 8.3.0-alpha.0 → 8.3.0-alpha.1

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.
@@ -1,177 +1,8 @@
1
- import { DecoratorFunction, ArgTypesEnhancer } from 'storybook/internal/types';
1
+ import { DecoratorFunction, InputType, ArgTypesEnhancer } from 'storybook/internal/types';
2
2
  import { SourceType } from 'storybook/internal/docs-tools';
3
3
  import { W as WebComponentsRenderer } from './types-9976a2c9.js';
4
4
  import 'lit';
5
5
 
6
- declare global {
7
- interface SymbolConstructor {
8
- readonly observable: symbol;
9
- }
10
- }
11
-
12
- interface SBBaseType {
13
- required?: boolean;
14
- raw?: string;
15
- }
16
- type SBScalarType = SBBaseType & {
17
- name: 'boolean' | 'string' | 'number' | 'function' | 'symbol';
18
- };
19
- type SBArrayType = SBBaseType & {
20
- name: 'array';
21
- value: SBType;
22
- };
23
- type SBObjectType = SBBaseType & {
24
- name: 'object';
25
- value: Record<string, SBType>;
26
- };
27
- type SBEnumType = SBBaseType & {
28
- name: 'enum';
29
- value: (string | number)[];
30
- };
31
- type SBIntersectionType = SBBaseType & {
32
- name: 'intersection';
33
- value: SBType[];
34
- };
35
- type SBUnionType = SBBaseType & {
36
- name: 'union';
37
- value: SBType[];
38
- };
39
- type SBOtherType = SBBaseType & {
40
- name: 'other';
41
- value: string;
42
- };
43
- type SBType = SBScalarType | SBEnumType | SBArrayType | SBObjectType | SBIntersectionType | SBUnionType | SBOtherType;
44
- type ControlType = 'object' | 'boolean' | 'check' | 'inline-check' | 'radio' | 'inline-radio' | 'select' | 'multi-select' | 'number' | 'range' | 'file' | 'color' | 'date' | 'text';
45
- type ConditionalTest = {
46
- truthy?: boolean;
47
- } | {
48
- exists: boolean;
49
- } | {
50
- eq: any;
51
- } | {
52
- neq: any;
53
- };
54
- type ConditionalValue = {
55
- arg: string;
56
- } | {
57
- global: string;
58
- };
59
- type Conditional = ConditionalValue & ConditionalTest;
60
- interface ControlBase {
61
- [key: string]: any;
62
- /**
63
- * @see https://storybook.js.org/docs/api/arg-types#controltype
64
- */
65
- type?: ControlType;
66
- disable?: boolean;
67
- }
68
- type Control = ControlType | false | (ControlBase & (ControlBase | {
69
- type: 'color';
70
- /**
71
- * @see https://storybook.js.org/docs/api/arg-types#controlpresetcolors
72
- */
73
- presetColors?: string[];
74
- } | {
75
- type: 'file';
76
- /**
77
- * @see https://storybook.js.org/docs/api/arg-types#controlaccept
78
- */
79
- accept?: string;
80
- } | {
81
- type: 'inline-check' | 'radio' | 'inline-radio' | 'select' | 'multi-select';
82
- /**
83
- * @see https://storybook.js.org/docs/api/arg-types#controllabels
84
- */
85
- labels?: {
86
- [options: string]: string;
87
- };
88
- } | {
89
- type: 'number' | 'range';
90
- /**
91
- * @see https://storybook.js.org/docs/api/arg-types#controlmax
92
- */
93
- max?: number;
94
- /**
95
- * @see https://storybook.js.org/docs/api/arg-types#controlmin
96
- */
97
- min?: number;
98
- /**
99
- * @see https://storybook.js.org/docs/api/arg-types#controlstep
100
- */
101
- step?: number;
102
- }));
103
- interface InputType {
104
- /**
105
- * @see https://storybook.js.org/docs/api/arg-types#control
106
- */
107
- control?: Control;
108
- /**
109
- * @see https://storybook.js.org/docs/api/arg-types#description
110
- */
111
- description?: string;
112
- /**
113
- * @see https://storybook.js.org/docs/api/arg-types#if
114
- */
115
- if?: Conditional;
116
- /**
117
- * @see https://storybook.js.org/docs/api/arg-types#mapping
118
- */
119
- mapping?: {
120
- [key: string]: any;
121
- };
122
- /**
123
- * @see https://storybook.js.org/docs/api/arg-types#name
124
- */
125
- name?: string;
126
- /**
127
- * @see https://storybook.js.org/docs/api/arg-types#options
128
- */
129
- options?: readonly any[];
130
- /**
131
- * @see https://storybook.js.org/docs/api/arg-types#table
132
- */
133
- table?: {
134
- [key: string]: unknown;
135
- /**
136
- * @see https://storybook.js.org/docs/api/arg-types#tablecategory
137
- */
138
- category?: string;
139
- /**
140
- * @see https://storybook.js.org/docs/api/arg-types#tabledefaultvalue
141
- */
142
- defaultValue?: {
143
- summary?: string;
144
- detail?: string;
145
- };
146
- /**
147
- * @see https://storybook.js.org/docs/api/arg-types#tabledisable
148
- */
149
- disable?: boolean;
150
- /**
151
- * @see https://storybook.js.org/docs/api/arg-types#tablesubcategory
152
- */
153
- subcategory?: string;
154
- /**
155
- * @see https://storybook.js.org/docs/api/arg-types#tabletype
156
- */
157
- type?: {
158
- summary?: string;
159
- detail?: string;
160
- };
161
- };
162
- /**
163
- * @see https://storybook.js.org/docs/api/arg-types#type
164
- */
165
- type?: SBType | SBScalarType['name'];
166
- /**
167
- * @see https://storybook.js.org/docs/api/arg-types#defaultvalue
168
- *
169
- * @deprecated Use `table.defaultValue.summary` instead.
170
- */
171
- defaultValue?: any;
172
- [key: string]: any;
173
- }
174
-
175
6
  declare const decorators: DecoratorFunction<WebComponentsRenderer>[];
176
7
  declare const parameters: {
177
8
  docs: {
@@ -180,7 +11,7 @@ declare const parameters: {
180
11
  } | null | undefined;
181
12
  extractComponentDescription: (tagName: string) => string | null | undefined;
182
13
  story: {
183
- inline: boolean;
14
+ inline: true;
184
15
  };
185
16
  source: {
186
17
  type: SourceType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/web-components",
3
- "version": "8.3.0-alpha.0",
3
+ "version": "8.3.0-alpha.1",
4
4
  "description": "Storybook web-components renderer",
5
5
  "keywords": [
6
6
  "lit",
@@ -50,7 +50,11 @@
50
50
  "prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts"
51
51
  },
52
52
  "dependencies": {
53
+ "@storybook/components": "^8.3.0-alpha.1",
53
54
  "@storybook/global": "^5.0.0",
55
+ "@storybook/manager-api": "^8.3.0-alpha.1",
56
+ "@storybook/preview-api": "^8.3.0-alpha.1",
57
+ "@storybook/theming": "^8.3.0-alpha.1",
54
58
  "tiny-invariant": "^1.3.1",
55
59
  "ts-dedent": "^2.0.0"
56
60
  },
@@ -64,7 +68,7 @@
64
68
  },
65
69
  "peerDependencies": {
66
70
  "lit": "^2.0.0 || ^3.0.0",
67
- "storybook": "^8.3.0-alpha.0"
71
+ "storybook": "^8.3.0-alpha.1"
68
72
  },
69
73
  "engines": {
70
74
  "node": ">=18.0.0"