@softr/sdk 1.17.0-alpha.2 → 1.17.0-alpha.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/dist/auth/isomorphic.d.ts +6 -6
- package/dist/mcp.d.ts +2 -2
- package/dist/package.js +1 -1
- package/dist/pwa.d.ts +2 -2
- package/package.json +1 -1
- package/skills/softr-sdk/offline/SKILL.md +2 -2
|
@@ -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 react0 from "react";
|
|
5
5
|
import { ReactNode } from "react";
|
|
6
|
-
import * as
|
|
6
|
+
import * as _tanstack_react_start0 from "@tanstack/react-start";
|
|
7
7
|
|
|
8
8
|
//#region src/auth/isomorphic.d.ts
|
|
9
9
|
|
|
@@ -21,7 +21,7 @@ import * as _tanstack_react_start2 from "@tanstack/react-start";
|
|
|
21
21
|
* requestMiddleware: [softrAuthMiddleware()],
|
|
22
22
|
* }))
|
|
23
23
|
*/
|
|
24
|
-
declare function softrAuthMiddleware():
|
|
24
|
+
declare function softrAuthMiddleware(): _tanstack_react_start0.RequestMiddlewareAfterServer<{}, readonly [_tanstack_react_start0.RequestMiddlewareAfterServer<{}, undefined, undefined>, _tanstack_react_start0.RequestMiddlewareAfterServer<{}, undefined, undefined>, _tanstack_react_start0.RequestMiddlewareAfterServer<{}, undefined, undefined>, _tanstack_react_start0.RequestMiddlewareAfterServer<{}, undefined, undefined>, _tanstack_react_start0.RequestMiddlewareAfterServer<{}, undefined, undefined>, _tanstack_react_start0.RequestMiddlewareAfterServer<{}, undefined, undefined>, _tanstack_react_start0.RequestMiddlewareAfterServer<{}, undefined, undefined>, _tanstack_react_start0.RequestMiddlewareAfterServer<{}, undefined, undefined>], {
|
|
25
25
|
user: User | null;
|
|
26
26
|
permissions: {
|
|
27
27
|
datasources: {};
|
|
@@ -37,7 +37,7 @@ declare function softrAuthMiddleware(): _tanstack_react_start2.RequestMiddleware
|
|
|
37
37
|
* beforeLoad: async () => await getSoftrContext(),
|
|
38
38
|
* })
|
|
39
39
|
*/
|
|
40
|
-
declare const getSoftrContext:
|
|
40
|
+
declare const getSoftrContext: _tanstack_react_start0.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_start0.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
|
+
}): react0.JSX.Element;
|
|
116
116
|
/**
|
|
117
117
|
* Which ways in this app offers. Requires an {@link AuthSettingsProvider}
|
|
118
118
|
* above it.
|
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_start11 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_start11.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 react5 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(): react5.FunctionComponentElement<react5.FragmentProps>;
|
|
28
28
|
type PwaPlatform = "ios" | "android" | "desktop";
|
|
29
29
|
type InstallChoice = "accepted" | "dismissed";
|
|
30
30
|
type PwaInstall = {
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ description: >-
|
|
|
4
4
|
Let the published app open without internet and show the pages and data the
|
|
5
5
|
visitor last loaded, read only: useOfflineMode, the OfflineMode type, the
|
|
6
6
|
offline banner and saves made offline. The service worker is already served,
|
|
7
|
-
never write one.
|
|
7
|
+
never write one. Saving offline is not built in.
|
|
8
8
|
metadata:
|
|
9
9
|
type: sub-skill
|
|
10
10
|
library: softr-sdk
|
|
@@ -17,7 +17,7 @@ With offline mode on, the published app opens without internet and shows the pag
|
|
|
17
17
|
|
|
18
18
|
> **CRITICAL**: Never write a service worker, a `public/sw.js`, or any `navigator.serviceWorker`, `caches` or IndexedDB 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**:
|
|
20
|
+
> **CRITICAL**: `useOfflineMode()` keeps reads only. A save made offline fails; nothing is kept to send later. Saving offline is app code the builder must ask for, and it never goes into a service worker.
|
|
21
21
|
|
|
22
22
|
## Setup
|
|
23
23
|
|