flemo 1.1.3 → 1.2.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/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9
9
 
10
- [Documentation](https://flemo-web.vercel.app/docs) • [Examples](https://flemo-web.vercel.app/docs/examples) • [API Reference](https://flemo-web.vercel.app/docs/api)
10
+ [Documentation](https://flemo-dev.lovable.app/docs/introduction) • [API Reference](https://flemo-dev.lovable.app/docs/api/components)
11
11
 
12
12
  </div>
13
13
 
@@ -19,12 +19,10 @@
19
19
 
20
20
  ## 📚 Documentation
21
21
 
22
- Visit our [comprehensive documentation](https://flemo-web.vercel.app/) to learn more:
22
+ Visit our [comprehensive documentation](https://flemo-dev.lovable.app) to learn more:
23
23
 
24
- - [**Getting Started**](https://flemo-web.vercel.app/docs/getting-started) - Installation and basic setup
25
- - [**Core Concepts**](https://flemo-web.vercel.app/docs/concepts) - Understanding transitions, decorators, and screens
26
- - [**API Reference**](https://flemo-web.vercel.app/docs/api) - Complete API documentation
27
- - [**Examples**](https://flemo-web.vercel.app/docs/examples) - Real-world examples and patterns
24
+ - [**Getting Started**](https://flemo-dev.lovable.app/docs/getting-started) - Installation and basic setup
25
+ - [**API Reference**](https://flemo-dev.lovable.app/docs/api/components) - Complete API documentation
28
26
 
29
27
  ## 🛣️ Roadmap
30
28
 
@@ -6,12 +6,31 @@ interface TaskResult<T> {
6
6
  timestamp?: number;
7
7
  instanceId?: string;
8
8
  }
9
+ type TaskStatus = "PENDING" | "MANUAL_PENDING" | "SIGNAL_PENDING" | "PROCESSING" | "COMPLETED" | "FAILED" | "ROLLEDBACK";
9
10
  interface Control {
10
11
  manual?: boolean;
11
12
  delay?: number;
12
13
  condition?: () => Promise<boolean>;
13
14
  signal?: string;
14
15
  }
16
+ interface Task<T> {
17
+ id: string;
18
+ execute: (abortController: AbortController) => Promise<T>;
19
+ validate?: () => Promise<boolean>;
20
+ rollback?: () => Promise<void>;
21
+ control?: Control;
22
+ timestamp: number;
23
+ retryCount: number;
24
+ status: TaskStatus;
25
+ dependencies: string[];
26
+ instanceId: string;
27
+ abortController?: AbortController;
28
+ manualResolver?: {
29
+ resolve: (value: TaskResult<T>) => void;
30
+ reject: (error: Error) => void;
31
+ result: T;
32
+ };
33
+ }
15
34
  declare class TaskManager {
16
35
  private tasks;
17
36
  private readonly instanceId;
@@ -28,7 +47,7 @@ declare class TaskManager {
28
47
  private processPendingTasks;
29
48
  private waitForPendingTasks;
30
49
  private onTaskStatusChange;
31
- addTask<T>(execute: () => Promise<T>, options?: {
50
+ addTask<T>(execute: Task<T>["execute"], options?: {
32
51
  id?: string;
33
52
  delay?: number;
34
53
  validate?: () => Promise<boolean>;
@@ -4,6 +4,7 @@ export interface History {
4
4
  pathname: string;
5
5
  params: object;
6
6
  transitionName: TransitionName;
7
+ layoutId: string | number | null;
7
8
  }
8
9
  interface HistoryStore {
9
10
  index: number;
package/dist/index.d.ts CHANGED
@@ -9,5 +9,6 @@ export { default as createRawTransition } from './transition/createRawTransition
9
9
  export { default as createDecorator } from './transition/decorator/createDecorator';
10
10
  export { default as createRawDecorator } from './transition/decorator/createRawDecorator';
11
11
  export { default as Screen } from './screen/Screen';
12
+ export { default as LayoutScreen } from './screen/LayoutScreen';
12
13
  export type { TransitionName, RegisterTransition } from './transition/typing';
13
14
  export type { DecoratorName, RegisterDecorator } from './transition/decorator/typing';