routelit-client 0.0.3 → 0.4.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.
@@ -2,5 +2,6 @@ declare const Checkbox: import("react").NamedExoticComponent<{
2
2
  label: string;
3
3
  checked: boolean;
4
4
  required?: boolean;
5
+ caption?: string;
5
6
  } & Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "onChange">>;
6
7
  export default Checkbox;
@@ -2,5 +2,5 @@ interface ImageProps extends React.HTMLAttributes<HTMLImageElement> {
2
2
  src: string;
3
3
  alt: string;
4
4
  }
5
- declare function Image({ src, alt, ...props }: ImageProps): import("react/jsx-runtime").JSX.Element;
5
+ declare function Image({ src, alt, children: _, ...props }: ImageProps): import("react/jsx-runtime").JSX.Element;
6
6
  export default Image;
@@ -1,4 +1,4 @@
1
- declare function TextInputComponent({ id, label, value, type, ...props }: {
1
+ declare function TextInputComponent({ id, label, value, type, children: _, ...props }: {
2
2
  id: string;
3
3
  label?: string;
4
4
  } & React.InputHTMLAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,8 @@
1
1
  export declare function applyAddAction(componentsTree: RouteLitComponent[], action: AddAction): void;
2
2
  export declare function applyRemoveAction(componentsTree: RouteLitComponent[], action: RemoveAction): void;
3
+ export declare function applySetAction(componentsTree: RouteLitComponent[], action: SetAction): void;
3
4
  export declare function applyUpdateAction(componentsTree: RouteLitComponent[], action: UpdateAction): void;
5
+ export declare function applyFreshBoundaryAction(componentsTree: RouteLitComponent[], action: FreshBoundaryAction): void;
6
+ export declare function removeStaleComponents(componentsTree: RouteLitComponent[]): void;
4
7
  export declare function prependAddressToActions(actionResponse: ActionsResponse, address: number[]): ActionsResponse;
5
8
  export declare function applyActions(componentsTree: RouteLitComponent[], actions: Action[]): void;
@@ -11,18 +11,27 @@ export declare class RouteLitManager {
11
11
  private listeners;
12
12
  private isLoadingListeners;
13
13
  private errorListeners;
14
- private componentsTree?;
14
+ private componentsTree;
15
15
  private _isLoading;
16
16
  private _error?;
17
17
  private fragmentId?;
18
18
  private parentManager?;
19
19
  private address?;
20
20
  private lastURL?;
21
+ private initialized;
22
+ private abortController?;
23
+ private actionAccumulator;
24
+ private currentTarget?;
25
+ private throttleTimer?;
26
+ private lastExecutionTime;
21
27
  constructor(props: RouteLitManagerProps);
22
28
  getLastURL: () => string;
23
29
  handleEvent: (e: CustomEvent<UIEventPayload>) => Promise<void>;
24
30
  handleError: (e: Error) => void;
31
+ batchAction: (action: Action, shouldNotify?: boolean) => void;
32
+ private flushActions;
25
33
  applyActions: (actionsResp: ActionsResponse, shouldNotify?: boolean) => void;
34
+ private initializeDOM;
26
35
  initialize: () => void;
27
36
  handlePopState: () => void;
28
37
  terminate: () => void;
@@ -4,5 +4,5 @@ interface Props {
4
4
  manager: RouteLitManager;
5
5
  componentStore: ComponentStore;
6
6
  }
7
- declare function ReactRenderer({ manager, componentStore }: Props): import("react/jsx-runtime").JSX.Element;
7
+ declare function ReactRenderer({ manager, componentStore }: Props): import("react/jsx-runtime").JSX.Element | null;
8
8
  export default ReactRenderer;
@@ -1 +1,2 @@
1
- export declare function sendEvent(event: CustomEvent<UIEventPayload>, fragmentId?: string): Promise<ActionsResponse>;
1
+ export declare function sendEvent(event: CustomEvent<UIEventPayload>, fragmentId: string | undefined, abortController: AbortController): Promise<ActionsResponse>;
2
+ export declare function sendEventStream(event: CustomEvent<UIEventPayload>, fragmentId: string | undefined, abortController: AbortController): AsyncGenerator<ActionsResponse | Action>;