@koordinates/xstate-tree 1.0.0-beta.2 → 1.0.0-beta.3
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/lib/slots/slots.js +4 -1
- package/lib/xstate-tree.d.ts +37 -10
- package/package.json +1 -1
package/lib/slots/slots.js
CHANGED
package/lib/xstate-tree.d.ts
CHANGED
|
@@ -216,7 +216,7 @@ declare type Events = any;
|
|
|
216
216
|
export declare const genericSlotsTestingDummy: any;
|
|
217
217
|
|
|
218
218
|
/**
|
|
219
|
-
* @
|
|
219
|
+
* @public
|
|
220
220
|
*/
|
|
221
221
|
export declare type GetSlotNames<TSlots extends readonly Slot[]> = TSlots[number]["name"];
|
|
222
222
|
|
|
@@ -296,11 +296,17 @@ declare type MakeEmptyObjectPropertiesOptional<T> = Omit<T, EmptyKeys<T>> & Part
|
|
|
296
296
|
*/
|
|
297
297
|
export declare function matchRoute<TRoutes extends Route<any, any, any, any>[]>(routes: TRoutes, basePath: string, path: string, search: string): Return;
|
|
298
298
|
|
|
299
|
-
|
|
299
|
+
/**
|
|
300
|
+
* @public
|
|
301
|
+
*/
|
|
302
|
+
export declare type Meta<T> = T extends {
|
|
300
303
|
meta: infer TMeta;
|
|
301
304
|
} ? TMeta : undefined;
|
|
302
305
|
|
|
303
|
-
|
|
306
|
+
/**
|
|
307
|
+
* @public
|
|
308
|
+
*/
|
|
309
|
+
export declare type MultiSlot<T> = {
|
|
304
310
|
type: SlotType.MultiSlot;
|
|
305
311
|
name: T;
|
|
306
312
|
getId(id: string): string;
|
|
@@ -320,7 +326,10 @@ declare type OmitOptional<T> = {
|
|
|
320
326
|
*/
|
|
321
327
|
export declare function onBroadcast(handler: (event: GlobalEvents) => void): () => void;
|
|
322
328
|
|
|
323
|
-
|
|
329
|
+
/**
|
|
330
|
+
* @public
|
|
331
|
+
*/
|
|
332
|
+
export declare type Options<TParamsSchema extends Z.ZodObject<any>, TQuerySchema extends Z.ZodObject<any>, TMetaSchema> = {
|
|
324
333
|
params?: TParamsSchema;
|
|
325
334
|
query?: TQuerySchema;
|
|
326
335
|
meta?: TMetaSchema;
|
|
@@ -338,7 +347,10 @@ declare type Options_2<TContext> = {
|
|
|
338
347
|
withContext?: () => Partial<TContext>;
|
|
339
348
|
};
|
|
340
349
|
|
|
341
|
-
|
|
350
|
+
/**
|
|
351
|
+
* @public
|
|
352
|
+
*/
|
|
353
|
+
export declare type Params<T> = T extends {
|
|
342
354
|
params: infer TParams;
|
|
343
355
|
} ? TParams : undefined;
|
|
344
356
|
|
|
@@ -355,7 +367,10 @@ export declare type PickEvent<T extends Extract<GlobalEvents, {
|
|
|
355
367
|
|
|
356
368
|
declare type PropsOf<C extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> = JSX.LibraryManagedAttributes<C, ComponentPropsWithRef<C>>;
|
|
357
369
|
|
|
358
|
-
|
|
370
|
+
/**
|
|
371
|
+
* @public
|
|
372
|
+
*/
|
|
373
|
+
export declare type Query<T> = T extends {
|
|
359
374
|
query: infer TQuery;
|
|
360
375
|
} ? TQuery : undefined;
|
|
361
376
|
|
|
@@ -421,7 +436,10 @@ export declare type Route<TParams, TQuery, TEvent, TMeta> = {
|
|
|
421
436
|
querySchema?: Z.ZodObject<any>;
|
|
422
437
|
};
|
|
423
438
|
|
|
424
|
-
|
|
439
|
+
/**
|
|
440
|
+
* @public
|
|
441
|
+
*/
|
|
442
|
+
export declare type RouteArgumentFunctions<TReturn, TParams, TQuery, TMeta, TArgs = RouteArguments<TParams, TQuery, TMeta>> = IsEmptyObject<TArgs> extends true ? () => TReturn : keyof TArgs extends "meta" ? (args?: TArgs) => TReturn : EmptyRouteArguments<TParams, TQuery> extends true ? (args?: Partial<TArgs>) => TReturn : (args: MakeEmptyObjectPropertiesOptional<TArgs>) => TReturn;
|
|
425
443
|
|
|
426
444
|
/**
|
|
427
445
|
* @public
|
|
@@ -481,7 +499,10 @@ export declare type RoutingEvent<T> = T extends Route<infer TParams, infer TQuer
|
|
|
481
499
|
|
|
482
500
|
declare type Selectors<TContext, TEvent extends EventObject, TSelectors, TStates> = (ctx: TContext, canHandleEvent: (e: TEvent) => boolean, inState: (state: TStates) => boolean, __currentState: TStates) => TSelectors;
|
|
483
501
|
|
|
484
|
-
|
|
502
|
+
/**
|
|
503
|
+
* @public
|
|
504
|
+
*/
|
|
505
|
+
export declare type SharedMeta = {
|
|
485
506
|
/**
|
|
486
507
|
* Suppresses this routing change event from being picked up by react-router
|
|
487
508
|
*/
|
|
@@ -496,7 +517,10 @@ declare type SharedMeta = {
|
|
|
496
517
|
replace?: boolean;
|
|
497
518
|
};
|
|
498
519
|
|
|
499
|
-
|
|
520
|
+
/**
|
|
521
|
+
* @public
|
|
522
|
+
*/
|
|
523
|
+
export declare type SingleSlot<T> = {
|
|
500
524
|
type: SlotType.SingleSlot;
|
|
501
525
|
name: T;
|
|
502
526
|
getId(): string;
|
|
@@ -526,7 +550,10 @@ context: unknown;
|
|
|
526
550
|
context: unknown;
|
|
527
551
|
}, any, any, any>;
|
|
528
552
|
|
|
529
|
-
|
|
553
|
+
/**
|
|
554
|
+
* @public
|
|
555
|
+
*/
|
|
556
|
+
export declare enum SlotType {
|
|
530
557
|
SingleSlot = 0,
|
|
531
558
|
MultiSlot = 1
|
|
532
559
|
}
|