@softr/sdk 1.17.0-alpha.3 → 1.17.0-alpha.4
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.
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { User } from "./user.js";
|
|
2
2
|
import { Formatting } from "../formatting.js";
|
|
3
3
|
import { SoftrContext } from "./context.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react7 from "react";
|
|
5
5
|
import { ReactNode } from "react";
|
|
6
|
-
import * as
|
|
6
|
+
import * as _tanstack_react_start3 from "@tanstack/react-start";
|
|
7
7
|
|
|
8
8
|
//#region src/auth/isomorphic.d.ts
|
|
9
9
|
|
|
@@ -21,7 +21,7 @@ import * as _tanstack_react_start0 from "@tanstack/react-start";
|
|
|
21
21
|
* requestMiddleware: [softrAuthMiddleware()],
|
|
22
22
|
* }))
|
|
23
23
|
*/
|
|
24
|
-
declare function softrAuthMiddleware():
|
|
24
|
+
declare function softrAuthMiddleware(): _tanstack_react_start3.RequestMiddlewareAfterServer<{}, readonly [_tanstack_react_start3.RequestMiddlewareAfterServer<{}, undefined, undefined>, _tanstack_react_start3.RequestMiddlewareAfterServer<{}, undefined, undefined>, _tanstack_react_start3.RequestMiddlewareAfterServer<{}, undefined, undefined>, _tanstack_react_start3.RequestMiddlewareAfterServer<{}, undefined, undefined>, _tanstack_react_start3.RequestMiddlewareAfterServer<{}, undefined, undefined>, _tanstack_react_start3.RequestMiddlewareAfterServer<{}, undefined, undefined>, _tanstack_react_start3.RequestMiddlewareAfterServer<{}, undefined, undefined>, _tanstack_react_start3.RequestMiddlewareAfterServer<{}, undefined, undefined>], {
|
|
25
25
|
user: User | null;
|
|
26
26
|
permissions: {
|
|
27
27
|
datasources: {};
|
|
@@ -37,7 +37,7 @@ declare function softrAuthMiddleware(): _tanstack_react_start0.RequestMiddleware
|
|
|
37
37
|
* beforeLoad: async () => await getSoftrContext(),
|
|
38
38
|
* })
|
|
39
39
|
*/
|
|
40
|
-
declare const getSoftrContext:
|
|
40
|
+
declare const getSoftrContext: _tanstack_react_start3.OptionalFetcher<undefined, undefined, Promise<SoftrContext>>;
|
|
41
41
|
/**
|
|
42
42
|
* The context to hand `createRouter`, before any request has resolved one.
|
|
43
43
|
*
|
|
@@ -92,7 +92,7 @@ type AuthOptions = {
|
|
|
92
92
|
* staleTime: 60_000,
|
|
93
93
|
* })
|
|
94
94
|
*/
|
|
95
|
-
declare const getAuthSettings:
|
|
95
|
+
declare const getAuthSettings: _tanstack_react_start3.OptionalFetcher<undefined, undefined, Promise<AuthOptions>>;
|
|
96
96
|
/**
|
|
97
97
|
* Makes the auth options readable with {@link useAuthSettings} anywhere below.
|
|
98
98
|
*
|
|
@@ -112,7 +112,7 @@ declare function AuthSettingsProvider({
|
|
|
112
112
|
}: {
|
|
113
113
|
value: AuthOptions;
|
|
114
114
|
children?: ReactNode;
|
|
115
|
-
}):
|
|
115
|
+
}): react7.JSX.Element;
|
|
116
116
|
/**
|
|
117
117
|
* Which ways in this app offers. Requires an {@link AuthSettingsProvider}
|
|
118
118
|
* above it.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react6 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/default-error-overlay.d.ts
|
|
4
4
|
type Props = {
|
|
@@ -8,6 +8,6 @@ type Props = {
|
|
|
8
8
|
declare function DefaultErrorOverlay({
|
|
9
9
|
error,
|
|
10
10
|
reset
|
|
11
|
-
}: Props):
|
|
11
|
+
}: Props): react6.JSX.Element;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { DefaultErrorOverlay };
|
package/dist/mcp.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatasourceAction } from "./action.js";
|
|
2
2
|
import { Tool } from "./tool.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _tanstack_react_start0 from "@tanstack/react-start";
|
|
4
4
|
|
|
5
5
|
//#region src/mcp.d.ts
|
|
6
6
|
|
|
@@ -38,6 +38,6 @@ type SoftrMcpOptions = {
|
|
|
38
38
|
* ],
|
|
39
39
|
* }))
|
|
40
40
|
*/
|
|
41
|
-
declare function softrMcpMiddleware(options?: SoftrMcpOptions):
|
|
41
|
+
declare function softrMcpMiddleware(options?: SoftrMcpOptions): _tanstack_react_start0.RequestMiddlewareAfterServer<{}, undefined, undefined>;
|
|
42
42
|
//#endregion
|
|
43
43
|
export { softrMcpMiddleware };
|
package/dist/package.js
CHANGED
package/dist/pwa.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react4 from "react";
|
|
2
2
|
import "@tanstack/react-start";
|
|
3
3
|
|
|
4
4
|
//#region src/pwa.d.ts
|
|
@@ -24,7 +24,7 @@ import "@tanstack/react-start";
|
|
|
24
24
|
* )
|
|
25
25
|
* }
|
|
26
26
|
*/
|
|
27
|
-
declare function SoftrPwaHead():
|
|
27
|
+
declare function SoftrPwaHead(): react4.FunctionComponentElement<react4.FragmentProps>;
|
|
28
28
|
type PwaPlatform = "ios" | "android" | "desktop";
|
|
29
29
|
type InstallChoice = "accepted" | "dismissed";
|
|
30
30
|
type PwaInstall = {
|
package/package.json
CHANGED
|
@@ -13,11 +13,11 @@ metadata:
|
|
|
13
13
|
|
|
14
14
|
# Offline mode
|
|
15
15
|
|
|
16
|
-
With offline mode on, the published app opens without internet and shows the pages and data the visitor already loaded while online, as they were then, sometimes a little older. Pages the visitor never opened are not there: a link to one shows the app's error page.
|
|
16
|
+
With offline mode on, the published app opens without internet and shows the pages and data the visitor already loaded while online, as they were then, sometimes a little older. Pages the visitor never opened are not there: a link to one shows the app's error page. Offline mode keeps nothing to save later: a save made offline fails as it would on any network error, and the app tells the visitor, unless the app has its own offline saving.
|
|
17
17
|
|
|
18
|
-
> **CRITICAL**: Never write a service worker, a `public/sw.js`, or any `navigator.serviceWorker
|
|
18
|
+
> **CRITICAL**: Never write a service worker, a `public/sw.js`, or any `navigator.serviceWorker` or `caches` code for offline. The app already serves its service worker, shared with push notifications, and `useOfflineMode()` turns offline mode on. A worker of the app's own replaces it, and push notifications stop arriving.
|
|
19
19
|
>
|
|
20
|
-
> **CRITICAL**: `useOfflineMode()` keeps reads only.
|
|
20
|
+
> **CRITICAL**: `useOfflineMode()` keeps reads only. Saving offline is app code, built only when the builder asks for it: the changes wait in IndexedDB in the page and are sent when the connection is back. It never goes into a service worker.
|
|
21
21
|
|
|
22
22
|
## Setup
|
|
23
23
|
|