@softr/sdk 1.0.1-alpha.0 → 1.1.1-alpha.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/CHANGELOG.md +8 -2
- package/dist/action.d.ts +34 -2
- package/dist/action.js +9 -2
- package/dist/auth/context.js +13 -0
- package/dist/auth/isomorphic.d.ts +6 -6
- package/dist/auth/isomorphic.js +6 -9
- package/dist/auth/methods/authenticator.js +1 -1
- package/dist/auth/methods/code.js +1 -1
- package/dist/auth/methods/emailCode2fa.js +1 -1
- package/dist/auth/methods/magicLink.js +1 -1
- package/dist/auth/methods/password.js +1 -1
- package/dist/auth/methods/passwordLink.js +1 -1
- package/dist/auth/methods/profile.js +1 -1
- package/dist/auth/methods/signup.js +1 -1
- package/dist/auth/methods/social.js +1 -1
- package/dist/auth/session.js +19 -6
- package/dist/datasource/chart.d.ts +1 -1
- package/dist/datasource/chart.js +27 -19
- package/dist/datasource/enforced-filter.d.ts +56 -0
- package/dist/datasource/enforced-filter.js +127 -0
- package/dist/datasource/fields.d.ts +2 -2
- package/dist/datasource/filter.d.ts +9 -2
- package/dist/datasource/filter.js +17 -1
- package/dist/datasource/record.d.ts +1 -1
- package/dist/datasource/record.js +58 -10
- package/dist/default-error-overlay.d.ts +2 -2
- package/dist/fetch.js +1 -15
- package/dist/formatting.d.ts +3 -3
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +1 -1
- package/dist/package.js +1 -1
- package/dist/pwa.d.ts +5 -4
- package/dist/pwa.js +36 -5
- package/package.json +1 -1
- package/skills/softr-sdk/SKILL.md +1 -1
- package/skills/softr-sdk/ai/SKILL.md +1 -1
- package/skills/softr-sdk/auth/SKILL.md +1 -1
- package/skills/softr-sdk/charts-and-metrics/SKILL.md +1 -1
- package/skills/softr-sdk/current-user/SKILL.md +1 -1
- package/skills/softr-sdk/file-uploads/SKILL.md +1 -1
- package/skills/softr-sdk/formatting/SKILL.md +1 -1
- package/skills/softr-sdk/integrations/SKILL.md +1 -1
- package/skills/softr-sdk/mcp/SKILL.md +1 -1
- package/skills/softr-sdk/push-notifications/SKILL.md +1 -1
- package/skills/softr-sdk/pwa/SKILL.md +7 -7
- package/skills/softr-sdk/record-mutations/SKILL.md +1 -1
- package/skills/softr-sdk/record-queries/SKILL.md +1 -1
- package/skills/softr-sdk/region-visibility/SKILL.md +1 -1
- package/skills/softr-sdk/routes-and-visibility/SKILL.md +1 -1
- package/skills/softr-sdk/workflows/SKILL.md +1 -1
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
name: pwa
|
|
3
3
|
description: >-
|
|
4
4
|
Let visitors install the app on their home screen: SoftrPwaHead for the
|
|
5
|
-
manifest and
|
|
6
|
-
button and which platform's steps to show, the
|
|
7
|
-
types, and how to check that the app is
|
|
8
|
-
already served; never write them.
|
|
5
|
+
manifest, icon, iOS name and launch screen tags, usePwaInstall to decide
|
|
6
|
+
whether to show an install button and which platform's steps to show, the
|
|
7
|
+
PwaInstall and PwaPlatform types, and how to check that the app is
|
|
8
|
+
installable. The manifest and icon are already served; never write them.
|
|
9
9
|
metadata:
|
|
10
10
|
type: sub-skill
|
|
11
11
|
library: softr-sdk
|
|
12
|
-
library_version: 1.
|
|
12
|
+
library_version: 1.1.1-alpha.0
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
# Installing the app
|
|
16
16
|
|
|
17
17
|
The builder turns installing on in Studio, under Settings → Mobile app, and sets the name, colour and icon there. The app already answers with its manifest and icon once they do. What the app adds is two things: the links that point the browser at them, and a button that tells visitors how to install.
|
|
18
18
|
|
|
19
|
-
> **CRITICAL**: Never write a web app manifest, icon files, a service worker, or `manifest` / `apple-touch-icon` links of your own, in `public/` or in `head()`. The app already serves them from Studio's settings, and a file of your own shadows those settings.
|
|
19
|
+
> **CRITICAL**: Never write a web app manifest, icon files, a service worker, or `manifest` / `apple-touch-icon` / `apple-touch-startup-image` links or an `apple-mobile-web-app-title` meta of your own, in `public/` or in `head()`. The app already serves them from Studio's settings, and a file or tag of your own shadows those settings.
|
|
20
20
|
>
|
|
21
21
|
> **CRITICAL**: Render an install button only while `usePwaInstall()` returns `available: true`. Never show it unconditionally, never cache the answer, never replace the check with your own. Softr can switch installing off for an app, and this check is the only way that reaches the button.
|
|
22
22
|
|
|
@@ -48,7 +48,7 @@ The builder switches installing on in Studio, and `usePwaInstall()` reads that s
|
|
|
48
48
|
|
|
49
49
|
### The links: `<SoftrPwaHead />`
|
|
50
50
|
|
|
51
|
-
Render it once, in `<head>` next to `<HeadContent />`, in `RootDocument` in `src/routes/__root.tsx`.
|
|
51
|
+
Render it once, in `<head>` next to `<HeadContent />`, in `RootDocument` in `src/routes/__root.tsx`. While the app is installable it also renders the name iOS puts under the home screen icon and the iOS launch screens, so an installed app opens on its own splash screen instead of white.
|
|
52
52
|
|
|
53
53
|
```tsx
|
|
54
54
|
function RootDocument({ children }: { children: React.ReactNode }) {
|
|
@@ -9,7 +9,7 @@ description: >-
|
|
|
9
9
|
metadata:
|
|
10
10
|
type: sub-skill
|
|
11
11
|
library: softr-sdk
|
|
12
|
-
library_version: 1.
|
|
12
|
+
library_version: 1.1.1-alpha.0
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
**Boundary.** `ds` lives on `@softr/sdk/server` and runs only inside a `createServerFn` handler — importing it into a component fails the build. `defineMutation` and every type come from `@softr/sdk` and can be imported anywhere.
|
|
@@ -10,7 +10,7 @@ description: >-
|
|
|
10
10
|
metadata:
|
|
11
11
|
type: sub-skill
|
|
12
12
|
library: softr-sdk
|
|
13
|
-
library_version: 1.
|
|
13
|
+
library_version: 1.1.1-alpha.0
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
**Boundary.** `ds` lives on `@softr/sdk/server` and runs only inside a `createServerFn` handler or a server-side route hook — importing it into a component fails the build. The same holds for any helper that calls `ds`: declare it inside the handler. A function at module level that calls `ds` keeps the server-only import in the browser bundle, and every page stops loading until it moves. `defineQuery` and every type come from `@softr/sdk` and can be imported anywhere.
|
|
@@ -9,7 +9,7 @@ description: >-
|
|
|
9
9
|
metadata:
|
|
10
10
|
type: sub-skill
|
|
11
11
|
library: softr-sdk
|
|
12
|
-
library_version: 1.
|
|
12
|
+
library_version: 1.1.1-alpha.0
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
**Boundary.** `definePage`, `pageHead`, the access functions and the error predicates come from `@softr/sdk` and work anywhere.
|
|
@@ -9,7 +9,7 @@ description: >-
|
|
|
9
9
|
metadata:
|
|
10
10
|
type: sub-skill
|
|
11
11
|
library: softr-sdk
|
|
12
|
-
library_version: 1.
|
|
12
|
+
library_version: 1.1.1-alpha.0
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
**Boundary.** `workflow` lives on `@softr/sdk/server` and runs only inside a `createServerFn` handler — importing it into a component fails the build. `defineWorkflow` and every type come from `@softr/sdk` and can be imported anywhere.
|