@storybook/react-native-ui-lite 9.0.9 → 9.0.14

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/index.d.ts CHANGED
@@ -6,6 +6,7 @@ import { Item, ExpandAction, CombinedDataset, Selection, SBUI } from '@storybook
6
6
  import { State, StoriesHash } from 'storybook/internal/manager-api';
7
7
  import { API_LoadedRefData, API_IndexHash } from 'storybook/internal/types';
8
8
  import * as react_jsx_runtime from 'react/jsx-runtime';
9
+ import { StoryContext, Args } from 'storybook/internal/csf';
9
10
  import { ReactRenderer } from '@storybook/react';
10
11
 
11
12
  interface NodeProps$1 {
@@ -105,271 +106,6 @@ interface SidebarProps extends API_LoadedRefData {
105
106
  }
106
107
  declare const Sidebar: React.NamedExoticComponent<SidebarProps>;
107
108
 
108
- declare global {
109
- interface SymbolConstructor {
110
- readonly observable: symbol;
111
- }
112
- }
113
-
114
- interface SBBaseType {
115
- required?: boolean;
116
- raw?: string;
117
- }
118
- type SBScalarType = SBBaseType & {
119
- name: 'boolean' | 'string' | 'number' | 'function' | 'symbol';
120
- };
121
- type SBArrayType = SBBaseType & {
122
- name: 'array';
123
- value: SBType;
124
- };
125
- type SBObjectType = SBBaseType & {
126
- name: 'object';
127
- value: Record<string, SBType>;
128
- };
129
- type SBEnumType = SBBaseType & {
130
- name: 'enum';
131
- value: (string | number)[];
132
- };
133
- type SBIntersectionType = SBBaseType & {
134
- name: 'intersection';
135
- value: SBType[];
136
- };
137
- type SBUnionType = SBBaseType & {
138
- name: 'union';
139
- value: SBType[];
140
- };
141
- type SBOtherType = SBBaseType & {
142
- name: 'other';
143
- value: string;
144
- };
145
- type SBType = SBScalarType | SBEnumType | SBArrayType | SBObjectType | SBIntersectionType | SBUnionType | SBOtherType;
146
-
147
- type StoryId = string;
148
- type ComponentId = string;
149
- type ComponentTitle = string;
150
- type StoryName = string;
151
- type Tag = string;
152
- interface StoryIdentifier {
153
- componentId: ComponentId;
154
- title: ComponentTitle;
155
- /** @deprecated */
156
- kind: ComponentTitle;
157
- id: StoryId;
158
- name: StoryName;
159
- /** @deprecated */
160
- story: StoryName;
161
- tags: Tag[];
162
- }
163
- interface Parameters {
164
- [name: string]: any;
165
- }
166
- type ControlType = 'object' | 'boolean' | 'check' | 'inline-check' | 'radio' | 'inline-radio' | 'select' | 'multi-select' | 'number' | 'range' | 'file' | 'color' | 'date' | 'text';
167
- type ConditionalTest = {
168
- truthy?: boolean;
169
- } | {
170
- exists: boolean;
171
- } | {
172
- eq: any;
173
- } | {
174
- neq: any;
175
- };
176
- type ConditionalValue = {
177
- arg: string;
178
- } | {
179
- global: string;
180
- };
181
- type Conditional = ConditionalValue & ConditionalTest;
182
- interface ControlBase {
183
- [key: string]: any;
184
- /**
185
- * @see https://storybook.js.org/docs/api/arg-types#controltype
186
- */
187
- type?: ControlType;
188
- disable?: boolean;
189
- }
190
- interface Report {
191
- type: string;
192
- version?: number;
193
- result: unknown;
194
- status: 'failed' | 'passed' | 'warning';
195
- }
196
- interface ReportingAPI {
197
- reports: Report[];
198
- addReport: (report: Report) => void;
199
- }
200
- type Control = ControlType | false | (ControlBase & (ControlBase | {
201
- type: 'color';
202
- /**
203
- * @see https://storybook.js.org/docs/api/arg-types#controlpresetcolors
204
- */
205
- presetColors?: string[];
206
- } | {
207
- type: 'file';
208
- /**
209
- * @see https://storybook.js.org/docs/api/arg-types#controlaccept
210
- */
211
- accept?: string;
212
- } | {
213
- type: 'inline-check' | 'radio' | 'inline-radio' | 'select' | 'multi-select';
214
- /**
215
- * @see https://storybook.js.org/docs/api/arg-types#controllabels
216
- */
217
- labels?: {
218
- [options: string]: string;
219
- };
220
- } | {
221
- type: 'number' | 'range';
222
- /**
223
- * @see https://storybook.js.org/docs/api/arg-types#controlmax
224
- */
225
- max?: number;
226
- /**
227
- * @see https://storybook.js.org/docs/api/arg-types#controlmin
228
- */
229
- min?: number;
230
- /**
231
- * @see https://storybook.js.org/docs/api/arg-types#controlstep
232
- */
233
- step?: number;
234
- }));
235
- interface InputType {
236
- /**
237
- * @see https://storybook.js.org/docs/api/arg-types#control
238
- */
239
- control?: Control;
240
- /**
241
- * @see https://storybook.js.org/docs/api/arg-types#description
242
- */
243
- description?: string;
244
- /**
245
- * @see https://storybook.js.org/docs/api/arg-types#if
246
- */
247
- if?: Conditional;
248
- /**
249
- * @see https://storybook.js.org/docs/api/arg-types#mapping
250
- */
251
- mapping?: {
252
- [key: string]: any;
253
- };
254
- /**
255
- * @see https://storybook.js.org/docs/api/arg-types#name
256
- */
257
- name?: string;
258
- /**
259
- * @see https://storybook.js.org/docs/api/arg-types#options
260
- */
261
- options?: readonly any[];
262
- /**
263
- * @see https://storybook.js.org/docs/api/arg-types#table
264
- */
265
- table?: {
266
- [key: string]: unknown;
267
- /**
268
- * @see https://storybook.js.org/docs/api/arg-types#tablecategory
269
- */
270
- category?: string;
271
- /**
272
- * @see https://storybook.js.org/docs/api/arg-types#tabledefaultvalue
273
- */
274
- defaultValue?: {
275
- summary?: string;
276
- detail?: string;
277
- };
278
- /**
279
- * @see https://storybook.js.org/docs/api/arg-types#tabledisable
280
- */
281
- disable?: boolean;
282
- /**
283
- * @see https://storybook.js.org/docs/api/arg-types#tablesubcategory
284
- */
285
- subcategory?: string;
286
- /**
287
- * @see https://storybook.js.org/docs/api/arg-types#tabletype
288
- */
289
- type?: {
290
- summary?: string;
291
- detail?: string;
292
- };
293
- };
294
- /**
295
- * @see https://storybook.js.org/docs/api/arg-types#type
296
- */
297
- type?: SBType | SBScalarType['name'];
298
- /**
299
- * @see https://storybook.js.org/docs/api/arg-types#defaultvalue
300
- *
301
- * @deprecated Use `table.defaultValue.summary` instead.
302
- */
303
- defaultValue?: any;
304
- [key: string]: any;
305
- }
306
- interface StrictInputType extends InputType {
307
- name: string;
308
- type?: SBType;
309
- }
310
- interface Args {
311
- [name: string]: any;
312
- }
313
- type StrictArgTypes<TArgs = Args> = {
314
- [name in keyof TArgs]: StrictInputType;
315
- };
316
- interface Globals {
317
- [name: string]: any;
318
- }
319
- interface Renderer {
320
- /** What is the type of the `component` annotation in this renderer? */
321
- component: unknown;
322
- /** What does the story function return in this renderer? */
323
- storyResult: unknown;
324
- /** What type of element does this renderer render to? */
325
- canvasElement: unknown;
326
- mount(): Promise<Canvas>;
327
- T?: unknown;
328
- }
329
- interface StoryContextForEnhancers<TRenderer extends Renderer = Renderer, TArgs = Args> extends StoryIdentifier {
330
- component?: (TRenderer & {
331
- T: any;
332
- })['component'];
333
- subcomponents?: Record<string, (TRenderer & {
334
- T: any;
335
- })['component']>;
336
- parameters: Parameters;
337
- initialArgs: TArgs;
338
- argTypes: StrictArgTypes<TArgs>;
339
- }
340
- interface StoryContextUpdate<TArgs = Args> {
341
- args?: TArgs;
342
- globals?: Globals;
343
- [key: string]: any;
344
- }
345
- type ViewMode = 'story' | 'docs';
346
- interface Canvas {
347
- }
348
- interface StoryContext<TRenderer extends Renderer = Renderer, TArgs = Args> extends StoryContextForEnhancers<TRenderer, TArgs>, Required<StoryContextUpdate<TArgs>> {
349
- loaded: Record<string, any>;
350
- abortSignal: AbortSignal;
351
- canvasElement: TRenderer['canvasElement'];
352
- hooks: unknown;
353
- originalStoryFn: StoryFn<TRenderer>;
354
- viewMode: ViewMode;
355
- step: StepFunction<TRenderer, TArgs>;
356
- context: this;
357
- canvas: Canvas;
358
- mount: TRenderer['mount'];
359
- reporting: ReportingAPI;
360
- }
361
- /** @deprecated Use {@link StoryContext} instead. */
362
- interface PlayFunctionContext<TRenderer extends Renderer = Renderer, TArgs = Args> extends StoryContext<TRenderer, TArgs> {
363
- }
364
- type StepLabel = string;
365
- type StepFunction<TRenderer extends Renderer = Renderer, TArgs = Args> = (label: StepLabel, play: PlayFunction<TRenderer, TArgs>) => Promise<void> | void;
366
- type PlayFunction<TRenderer extends Renderer = Renderer, TArgs = Args> = (context: PlayFunctionContext<TRenderer, TArgs>) => Promise<void> | void;
367
- type LegacyStoryFn<TRenderer extends Renderer = Renderer, TArgs = Args> = (context: StoryContext<TRenderer, TArgs>) => TRenderer['storyResult'];
368
- type ArgsStoryFn<TRenderer extends Renderer = Renderer, TArgs = Args> = (args: TArgs, context: StoryContext<TRenderer, TArgs>) => (TRenderer & {
369
- T: TArgs;
370
- })['storyResult'];
371
- type StoryFn<TRenderer extends Renderer = Renderer, TArgs = Args> = LegacyStoryFn<TRenderer, TArgs> | ArgsStoryFn<TRenderer, TArgs>;
372
-
373
109
  declare const LiteUI: SBUI;
374
110
  declare const Layout: ({ storyHash, story, children, }: {
375
111
  storyHash: API_IndexHash | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react-native-ui-lite",
3
- "version": "9.0.9",
3
+ "version": "9.0.14",
4
4
  "description": "lightweight ui components for react native storybook",
5
5
  "keywords": [
6
6
  "react",
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "react-native": "src/index.tsx",
20
20
  "main": "dist/index.js",
21
- "types": "src/index.tsx",
21
+ "types": "dist/index.d.ts",
22
22
  "license": "MIT",
23
23
  "files": [
24
24
  "dist/**/*",
@@ -58,9 +58,9 @@
58
58
  "typescript": "~5.8.3"
59
59
  },
60
60
  "dependencies": {
61
- "@storybook/react": "^9.0.9",
62
- "@storybook/react-native-theming": "^9.0.9",
63
- "@storybook/react-native-ui-common": "^9.0.9",
61
+ "@storybook/react": "9.0.14",
62
+ "@storybook/react-native-theming": "^9.0.14",
63
+ "@storybook/react-native-ui-common": "^9.0.14",
64
64
  "fuse.js": "^7.0.0",
65
65
  "memoizerific": "^1.11.3",
66
66
  "polished": "^4.3.1",
@@ -69,7 +69,7 @@
69
69
  "peerDependencies": {
70
70
  "react": "*",
71
71
  "react-native": ">=0.57.0",
72
- "storybook": "^9.0.9"
72
+ "storybook": "9.0.14"
73
73
  },
74
74
  "engines": {
75
75
  "node": ">=18.0.0"
@@ -77,5 +77,5 @@
77
77
  "publishConfig": {
78
78
  "access": "public"
79
79
  },
80
- "gitHead": "6c247692ee0ede93df4e7df6e27e832e3e40a45d"
80
+ "gitHead": "19bb44781daef1f4bd1c5782c0a00d5b7fa5b943"
81
81
  }
package/src/Layout.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import type { Args, StoryContext } from '@storybook/csf';
1
+ import type { Args, StoryContext } from 'storybook/internal/csf';
2
2
  import type { ReactRenderer } from '@storybook/react';
3
3
  import { styled, ThemeProvider, useTheme } from '@storybook/react-native-theming';
4
4
  import {