routelit-client 0.0.1 → 0.0.2

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/App.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ declare function App(): import("react/jsx-runtime").JSX.Element;
2
+ export default App;
@@ -0,0 +1,2 @@
1
+ import "./index.css";
2
+ export declare function renderApp(rootId?: string): void;
package/dist/client.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { manager, componentStore, RoutelitClient, useDispatcherWith, useDispatcherWithAttr, useFormDispatcherWithAttr, useFormDispatcher, useIsLoading, useError } from "./lib";
2
- export { manager, componentStore, RoutelitClient, useDispatcherWith, useDispatcherWithAttr, useFormDispatcherWithAttr, useFormDispatcher, useIsLoading, useError };
1
+ import { manager, componentStore, RoutelitClient, useDispatcherWith, useDispatcherWithAttr, useFormDispatcherWithAttr, useFormDispatcher, useIsLoading, useError, renderApp } from "./lib";
2
+ export { manager, componentStore, RoutelitClient, useDispatcherWith, useDispatcherWithAttr, useFormDispatcherWithAttr, useFormDispatcher, useIsLoading, useError, renderApp };
@@ -3,5 +3,5 @@ interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
3
3
  text?: string;
4
4
  replace?: boolean;
5
5
  }
6
- declare function Link({ text, children, id, href, replace, ...props }: LinkProps): import("react/jsx-runtime").JSX.Element;
6
+ declare function Link({ text, children, id, href, replace, isExternal, ...props }: LinkProps): import("react/jsx-runtime").JSX.Element;
7
7
  export default Link;
package/dist/lib.d.ts CHANGED
@@ -4,6 +4,7 @@ import * as jsxRuntime from "react/jsx-runtime";
4
4
  import { ComponentStore } from "./core/component-store";
5
5
  import { useDispatcherWith, useDispatcherWithAttr, useFormDispatcherWithAttr, useFormDispatcher, useIsLoading, useError } from "./core/context";
6
6
  import { RouteLitManager } from "./core/manager";
7
+ import { renderApp } from "./app-factory";
7
8
  export interface RoutelitClientType {
8
9
  manager: RouteLitManager;
9
10
  componentStore: ComponentStore;
@@ -13,6 +14,7 @@ export interface RoutelitClientType {
13
14
  useFormDispatcher: typeof useFormDispatcher;
14
15
  useIsLoading: typeof useIsLoading;
15
16
  useError: typeof useError;
17
+ renderApp: (rootId?: string) => void;
16
18
  }
17
19
  declare let manager: RouteLitManager;
18
20
  declare let componentStore: ComponentStore;
@@ -20,11 +22,15 @@ declare global {
20
22
  interface Window {
21
23
  React: typeof React;
22
24
  ReactDOM: typeof ReactDOM;
23
- jsxRuntime: typeof jsxRuntime;
25
+ jsxRuntime: {
26
+ jsx: typeof React.createElement;
27
+ jsxs: typeof React.createElement;
28
+ Fragment: typeof React.Fragment;
29
+ };
24
30
  RoutelitClient?: RoutelitClientType;
25
31
  componentStore?: ComponentStore;
26
32
  }
27
33
  }
28
- export { useDispatcherWith, manager, componentStore, useDispatcherWithAttr, useIsLoading, useError, useFormDispatcherWithAttr, useFormDispatcher, };
34
+ export { useDispatcherWith, manager, componentStore, useDispatcherWithAttr, useIsLoading, useError, useFormDispatcherWithAttr, useFormDispatcher, renderApp, };
29
35
  declare const RoutelitClient: RoutelitClientType;
30
36
  export { React, ReactDOM, jsxRuntime, RoutelitClient };