@softr/sdk 1.11.1 → 1.12.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @softr/sdk
2
2
 
3
+ ## 1.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - `logo` in `softr.json` is the app's logo: an icon or images, with a file for dark backgrounds. `getLogo()` reads it, with the `layers` icon when the key is missing, and the `Logo` and `LogoFile` types describe it. A field this version does not know is ignored and an unknown `source` shows the icon, so a newer Studio cannot break the build. An image without `onLight`, an icon name that is not kebab case or a file that is not a path or an https URL fails the build.
8
+
3
9
  ## 1.11.1
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -22,4 +22,6 @@ import { PwaInstall, PwaPlatform, SoftrPwaHead, usePwaInstall } from "./pwa.js";
22
22
  import { PushNotifications, PushPrompt, usePushNotifications } from "./push.js";
23
23
  import { DefaultErrorOverlay } from "./default-error-overlay.js";
24
24
  import { Audience } from "./route/audience.js";
25
- export { type ActionPermissions, type AiAnswer, type AiFile, type AiGenerateInit, type AiMessage, type AiUsage, Audience, type AuthOptions, type AuthSettings, AuthSettingsProvider, type DateOptions, type DateParts, type DateSeparator, type DateValue, DefaultErrorOverlay, type EmailErrorCode, type EmailSendInit, type EmailSent, type FieldShape, type FileAttachment, type FileItem, type FixedDateFormat, FormattedDate, type Formatting, FormattingScope, type Page, type PageSettings, type PushNotifications, type PushPrompt, type PwaInstall, type PwaPlatform, type SoftrContext, type SoftrDatasources, type SoftrFieldRegistry, SoftrPwaHead, type SoftrUserGroupId, type SoftrUserGroups, type SoftrUserProperties, type SsoError, type User, type WeekDay, assertRouteAccess, checkAccess, defineAiAction, defineEmailAction, defineIntegration, defineMutation, definePage, defineQuery, defineVisibility, defineWorkflow, fieldShape, formatDate, formatDateTime, formatDuration, formatField, formatNumber, formatValue, getAuthSettings, getSoftrContext, guardRoute, initialSoftrContext, isAccessError, isAlreadyAuthenticatedError, isAuthorized, isForbiddenError, isUnauthenticatedError, pageHead, registerSoftrFields, softrAuthMiddleware, softrMcpMiddleware, ssoSignInHref, toReturnPath, useAuthSettings, useCurrentUser, useFileUpload, useFormatting, useIdleTimeout, useOverrides, usePushNotifications, usePwaInstall, useUserTimezone };
25
+ import { Logo, LogoFile } from "./softr-config.schema.js";
26
+ import { getLogo } from "./softr-config.js";
27
+ export { type ActionPermissions, type AiAnswer, type AiFile, type AiGenerateInit, type AiMessage, type AiUsage, Audience, type AuthOptions, type AuthSettings, AuthSettingsProvider, type DateOptions, type DateParts, type DateSeparator, type DateValue, DefaultErrorOverlay, type EmailErrorCode, type EmailSendInit, type EmailSent, type FieldShape, type FileAttachment, type FileItem, type FixedDateFormat, FormattedDate, type Formatting, FormattingScope, type Logo, type LogoFile, type Page, type PageSettings, type PushNotifications, type PushPrompt, type PwaInstall, type PwaPlatform, type SoftrContext, type SoftrDatasources, type SoftrFieldRegistry, SoftrPwaHead, type SoftrUserGroupId, type SoftrUserGroups, type SoftrUserProperties, type SsoError, type User, type WeekDay, assertRouteAccess, checkAccess, defineAiAction, defineEmailAction, defineIntegration, defineMutation, definePage, defineQuery, defineVisibility, defineWorkflow, fieldShape, formatDate, formatDateTime, formatDuration, formatField, formatNumber, formatValue, getAuthSettings, getLogo, getSoftrContext, guardRoute, initialSoftrContext, isAccessError, isAlreadyAuthenticatedError, isAuthorized, isForbiddenError, isUnauthenticatedError, pageHead, registerSoftrFields, softrAuthMiddleware, softrMcpMiddleware, ssoSignInHref, toReturnPath, useAuthSettings, useCurrentUser, useFileUpload, useFormatting, useIdleTimeout, useOverrides, usePushNotifications, usePwaInstall, useUserTimezone };
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { getLogo } from "./softr-config.js";
1
2
  import { defineAiAction, defineEmailAction, defineIntegration, defineMutation, defineQuery, defineWorkflow } from "./action.js";
2
3
  import { useFileUpload } from "./core/use-file-upload.js";
3
4
  import { checkAccess, defineVisibility, isAuthorized } from "./route/visibility.js";
@@ -17,4 +18,4 @@ import { useUserTimezone } from "./timezone.js";
17
18
  import { DefaultErrorOverlay } from "./default-error-overlay.js";
18
19
  import { Audience } from "./route/audience.js";
19
20
 
20
- export { Audience, AuthSettingsProvider, DefaultErrorOverlay, FormattedDate, FormattingScope, SoftrPwaHead, assertRouteAccess, checkAccess, defineAiAction, defineEmailAction, defineIntegration, defineMutation, definePage, defineQuery, defineVisibility, defineWorkflow, fieldShape, formatDate, formatDateTime, formatDuration, formatField, formatNumber, formatValue, getAuthSettings, getSoftrContext, guardRoute, initialSoftrContext, isAccessError, isAlreadyAuthenticatedError, isAuthorized, isForbiddenError, isUnauthenticatedError, pageHead, registerSoftrFields, softrAuthMiddleware, softrMcpMiddleware, ssoSignInHref, toReturnPath, useAuthSettings, useCurrentUser, useFileUpload, useFormatting, useIdleTimeout, useOverrides, usePushNotifications, usePwaInstall, useUserTimezone };
21
+ export { Audience, AuthSettingsProvider, DefaultErrorOverlay, FormattedDate, FormattingScope, SoftrPwaHead, assertRouteAccess, checkAccess, defineAiAction, defineEmailAction, defineIntegration, defineMutation, definePage, defineQuery, defineVisibility, defineWorkflow, fieldShape, formatDate, formatDateTime, formatDuration, formatField, formatNumber, formatValue, getAuthSettings, getLogo, getSoftrContext, guardRoute, initialSoftrContext, isAccessError, isAlreadyAuthenticatedError, isAuthorized, isForbiddenError, isUnauthenticatedError, pageHead, registerSoftrFields, softrAuthMiddleware, softrMcpMiddleware, ssoSignInHref, toReturnPath, useAuthSettings, useCurrentUser, useFileUpload, useFormatting, useIdleTimeout, useOverrides, usePushNotifications, usePwaInstall, useUserTimezone };
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "1.11.1";
2
+ var version = "1.12.0";
3
3
 
4
4
  //#endregion
5
5
  export { version };
@@ -0,0 +1,8 @@
1
+ import { Logo } from "./softr-config.schema.js";
2
+
3
+ //#region src/softr-config.d.ts
4
+
5
+ /** The app's logo, as `logo` in softr.json sets it. An app without the key gets the "layers" icon. */
6
+ declare function getLogo(): Logo;
7
+ //#endregion
8
+ export { getLogo };
@@ -4,6 +4,10 @@ import { panic } from "./assertions.js";
4
4
  function softrConfig() {
5
5
  return typeof __SOFTR_CONFIG__ === "undefined" ? panic("softr.json is missing") : __SOFTR_CONFIG__;
6
6
  }
7
+ /** The app's logo, as `logo` in softr.json sets it. An app without the key gets the "layers" icon. */
8
+ function getLogo() {
9
+ return softrConfig().logo;
10
+ }
7
11
 
8
12
  //#endregion
9
- export { softrConfig };
13
+ export { getLogo, softrConfig };
@@ -0,0 +1,31 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/softr-config.schema.d.ts
4
+
5
+ declare const LogoFile: z.ZodObject<{
6
+ onLight: z.ZodString;
7
+ onDark: z.ZodOptional<z.ZodString>;
8
+ }, z.core.$strip>;
9
+ /** One logo image: the file for light backgrounds, and optionally one for dark backgrounds. */
10
+ type LogoFile = z.infer<typeof LogoFile>;
11
+ declare const Logo: z.ZodObject<{
12
+ source: z.ZodCatch<z.ZodEnum<{
13
+ image: "image";
14
+ icon: "icon";
15
+ }>>;
16
+ icon: z.ZodString;
17
+ image: z.ZodObject<{
18
+ square: z.ZodOptional<z.ZodObject<{
19
+ onLight: z.ZodString;
20
+ onDark: z.ZodOptional<z.ZodString>;
21
+ }, z.core.$strip>>;
22
+ horizontal: z.ZodOptional<z.ZodObject<{
23
+ onLight: z.ZodString;
24
+ onDark: z.ZodOptional<z.ZodString>;
25
+ }, z.core.$strip>>;
26
+ }, z.core.$strip>;
27
+ }, z.core.$strip>;
28
+ /** The app's logo: `logo` in softr.json, with the default icon when the key is missing. */
29
+ type Logo = z.infer<typeof Logo>;
30
+ //#endregion
31
+ export { Logo, LogoFile };
@@ -20,8 +20,23 @@ const AccessBehaviour = z.union([
20
20
  }),
21
21
  z.object({ strategy: z.literal("throw") })
22
22
  ], { error: "must be a path like \"/login\", { \"strategy\": \"redirect\", \"to\": \"/login\" } or { \"strategy\": \"throw\" }" });
23
- const AppPath = z.string().refine((path$1) => path$1.startsWith("/") && !path$1.includes("?") && !path$1.includes("#") && new URL(path$1, "https://app.invalid").origin === "https://app.invalid", { error: "must be a path on this app like \"/login\", with no \"?\" or \"#\"" });
23
+ const PLACEHOLDER_ORIGIN = "https://app.invalid";
24
+ const isPathOnApp = (path$1) => path$1.startsWith("/") && URL.canParse(path$1, PLACEHOLDER_ORIGIN) && new URL(path$1, PLACEHOLDER_ORIGIN).origin === PLACEHOLDER_ORIGIN;
25
+ const AppPath = z.string().refine((path$1) => isPathOnApp(path$1) && !path$1.includes("?") && !path$1.includes("#"), { error: "must be a path on this app like \"/login\", with no \"?\" or \"#\"" });
24
26
  const Origin = z.union([z.literal("*"), z.string().regex(/^https:\/\/[^/\\?#@\s;,]+$/).refine(URL.canParse).transform((origin) => new URL(origin).origin)], { error: "must be an https origin like \"https://partner.com\", with no path or trailing \"/\", or \"*\" for any site" });
27
+ const LogoUrl = z.string().refine((url) => !/[\\\p{Cc}]/u.test(url) && (url.startsWith("/") ? isPathOnApp(url) : URL.canParse(url) && new URL(url).protocol === "https:"), { error: "must be a path under public/ like \"/logo.svg\", or an https URL, with no backslash or control character" });
28
+ const LogoFile = z.object({
29
+ onLight: LogoUrl,
30
+ onDark: LogoUrl.optional()
31
+ });
32
+ const Logo = z.object({
33
+ source: z.enum(["image", "icon"]).catch("icon"),
34
+ icon: z.string().regex(/^[a-z0-9]+(-[a-z0-9]+)*$/, { error: "must be a Lucide icon name like \"layers\" or \"paw-print\"" }),
35
+ image: z.object({
36
+ square: LogoFile.optional(),
37
+ horizontal: LogoFile.optional()
38
+ })
39
+ });
25
40
  const SoftrConfigSchema = z.object({
26
41
  auth: z.strictObject({
27
42
  routes: z.strictObject({
@@ -50,7 +65,12 @@ const SoftrConfigSchema = z.object({
50
65
  })
51
66
  }),
52
67
  user: z.strictObject({ properties: z.record(z.string(), z.string()) }).optional(),
53
- allowEmbedding: z.array(Origin).optional()
68
+ allowEmbedding: z.array(Origin).optional(),
69
+ logo: Logo.default({
70
+ source: "icon",
71
+ icon: "layers",
72
+ image: {}
73
+ })
54
74
  });
55
75
  function loadSoftrConfig(root) {
56
76
  const file = path.join(root, SOFTR_CONFIG_FILE);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softr/sdk",
3
- "version": "1.11.1",
3
+ "version": "1.12.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": { "types": "./dist/index.d.ts", "import": "./dist/index.js" },
@@ -81,6 +81,29 @@
81
81
  "type": "array",
82
82
  "description": "Sites that may show the published app in an iframe, signed-in pages included, as https origins like \"https://partner.com\", or \"*\" for any site. Any other site is still blocked. With at least one, session cookies use SameSite=None, which drops the browser's CSRF protection. Empty by default.",
83
83
  "items": { "type": "string", "pattern": "^(\\*|https://[^/\\\\?#@\\s;,]+)$" }
84
+ },
85
+ "logo": {
86
+ "type": "object",
87
+ "description": "The app's logo, written by the Logo field in Studio. Every place the app shows its brand reads it. Defaults to the \"layers\" icon.",
88
+ "properties": {
89
+ "source": {
90
+ "enum": ["image", "icon"],
91
+ "description": "Which of the two the app shows. Both are kept, so switching back loses nothing."
92
+ },
93
+ "icon": {
94
+ "type": "string",
95
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
96
+ "description": "A Lucide icon name, like \"layers\". Shown next to the app's name. Also what shows when source is \"image\" and no image fits."
97
+ },
98
+ "image": {
99
+ "type": "object",
100
+ "properties": {
101
+ "square": { "$ref": "#/$defs/logoFile", "description": "The logo without the app name, about square." },
102
+ "horizontal": { "$ref": "#/$defs/logoFile", "description": "The logo with the app name in it, wide." }
103
+ }
104
+ }
105
+ },
106
+ "required": ["source", "icon", "image"]
84
107
  }
85
108
  },
86
109
  "required": ["auth"],
@@ -102,6 +125,19 @@
102
125
  "required": ["path", "tokenParam"],
103
126
  "additionalProperties": false
104
127
  },
128
+ "logoFile": {
129
+ "type": "object",
130
+ "properties": {
131
+ "onLight": { "$ref": "#/$defs/logoUrl", "description": "The file for light backgrounds." },
132
+ "onDark": { "$ref": "#/$defs/logoUrl", "description": "The file for dark backgrounds, such as dark mode. onLight shows there when it is missing." }
133
+ },
134
+ "required": ["onLight"]
135
+ },
136
+ "logoUrl": {
137
+ "type": "string",
138
+ "pattern": "^(/(?!/)|https://)[^\\\\\\u0000-\\u001F\\u007F-\\u009F]*$",
139
+ "description": "A path under public/, like \"/logo.svg\", or an https URL, with no backslash or control character."
140
+ },
105
141
  "accessBehaviour": {
106
142
  "oneOf": [
107
143
  { "type": "string", "description": "A path to redirect to." },
@@ -4,13 +4,14 @@ description: >-
4
4
  Entry point for @softr/sdk: its four entrypoints (@softr/sdk, /server,
5
5
  /client, /vite) and their client-server boundary, softrAuthMiddleware and the
6
6
  Softr context, embedding the app in another site's iframe, the app's favicon,
7
- and which sub-skill covers each task. Load it when unsure which sub-skill
8
- applies, when touching the wiring, when the user wants the app embedded
9
- elsewhere, or when the favicon set in Studio does not show.
7
+ the app's logo in softr.json, and which sub-skill covers each task. Load it
8
+ when unsure which sub-skill applies, when touching the wiring, when the user
9
+ wants the app embedded elsewhere, when the favicon set in Studio does not
10
+ show, or when the app's logo changes.
10
11
  metadata:
11
12
  type: core
12
13
  library: softr-sdk
13
- library_version: 1.11.1
14
+ library_version: 1.12.0
14
15
  ---
15
16
 
16
17
  # Softr SDK core
@@ -33,7 +34,7 @@ Each sub-skill stands alone for its task and repeats the boundary above, so most
33
34
 
34
35
  | Import | Runs | Holds |
35
36
  | --- | --- | --- |
36
- | `@softr/sdk` | Both | `defineQuery`, `defineMutation`, `defineAiAction`, `definePage`, `pageHead`, `defineVisibility`, `guardRoute`, `assertRouteAccess`, `isAuthorized`, `checkAccess`, `Audience`, `useCurrentUser`, `useUserTimezone`, `useIdleTimeout`, `FormattedDate`, `FormattingScope`, `useFormatting`, `formatDate`, `formatDateTime`, `formatNumber`, `formatValue`, `formatField`, `fieldShape`, `registerSoftrFields`, `useOverrides`, `SoftrPwaHead`, `usePwaInstall`, `usePushNotifications`, `getSoftrContext`, `initialSoftrContext`, `softrAuthMiddleware`, the error predicates, and every type |
37
+ | `@softr/sdk` | Both | `defineQuery`, `defineMutation`, `defineAiAction`, `definePage`, `pageHead`, `defineVisibility`, `guardRoute`, `assertRouteAccess`, `isAuthorized`, `checkAccess`, `Audience`, `useCurrentUser`, `useUserTimezone`, `useIdleTimeout`, `FormattedDate`, `FormattingScope`, `useFormatting`, `formatDate`, `formatDateTime`, `formatNumber`, `formatValue`, `formatField`, `fieldShape`, `registerSoftrFields`, `useOverrides`, `SoftrPwaHead`, `usePwaInstall`, `usePushNotifications`, `getSoftrContext`, `getLogo`, `initialSoftrContext`, `softrAuthMiddleware`, the error predicates, and every type |
37
38
  | `@softr/sdk/server` | Server only | `ds`, `auth`, `workflow`, `integration`, `ai` |
38
39
  | `@softr/sdk/client` | Browser only | `useFileUpload` |
39
40
  | `@softr/sdk/vite` | Build | `softr()`, already in `vite.config.ts` |
@@ -108,6 +109,9 @@ Showing a date, a time or a number on a page?
108
109
  The favicon set in Studio does not show?
109
110
  read "The app's favicon" below
110
111
 
112
+ Changing the app's logo, or reading it in code?
113
+ read "The app's logo" below
114
+
111
115
  Writing a server function, loader, or middleware in general?
112
116
  not a Softr concern. Use the TanStack Start skills.
113
117
  ```
@@ -178,3 +182,23 @@ The app's favicon is a Studio setting: Settings → General → Favicon. The app
178
182
  A `rel: 'icon'` link in `head.links` or a `public/favicon.ico` file wins over the setting. While the code has one, the Studio setting has no effect.
179
183
 
180
184
  When the user asks why the Studio favicon does not show, check the code for an icon. When only the published app lacks it, the app needs a new publish. The published app keeps the code, the SDK and the favicon of its last publish.
185
+
186
+ ## The app's logo
187
+
188
+ The app's logo is `logo` in `softr.json`. The Logo field in Studio writes it, and code edits it like any other file. `getLogo()` from `@softr/sdk` reads it, on the server and in the browser. Read it there, never by importing `softr.json`.
189
+
190
+ ```json
191
+ "logo": {
192
+ "source": "image",
193
+ "icon": "paw-print",
194
+ "image": {
195
+ "square": { "onLight": "/logo.png", "onDark": "/logo-dark.png" },
196
+ "horizontal": { "onLight": "/logo-wide.svg" }
197
+ }
198
+ }
199
+ ```
200
+
201
+ - `source` is what the app shows, `"image"` or `"icon"`. The file keeps both, so a switch back loses nothing.
202
+ - `icon` is a Lucide icon name in kebab case, like `"layers"`. It is always set, and it shows when `source` is `"image"` and no image fits.
203
+ - `image.square` is the logo without the app's name, about square. `image.horizontal` is the logo with the name in it, wide. Either may be missing. Each has `onLight`, and `onDark` for dark backgrounds, which falls back to `onLight`. A file is a path under `public/`, like `"/logo.svg"`, or an https URL.
204
+ - An app without the key gets `{ "source": "icon", "icon": "layers", "image": {} }`. A field this SDK does not know is ignored, and an unknown `source` shows the icon. An `icon` that is not a kebab-case name, an image without `onLight` or a file that is neither a path under `public/` nor an https URL fails the build, naming the key.
@@ -13,7 +13,7 @@ description: >-
13
13
  metadata:
14
14
  type: sub-skill
15
15
  library: softr-sdk
16
- library_version: 1.11.1
16
+ library_version: 1.12.0
17
17
  ---
18
18
 
19
19
  **Boundary.** `ai` lives on `@softr/sdk/server` and runs only inside a `createServerFn` handler — importing it into a component fails the build. `defineAiAction` 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.11.1
13
+ library_version: 1.12.0
14
14
  ---
15
15
 
16
16
  **Boundary.** `auth` lives on `@softr/sdk/server` and runs only inside a `createServerFn` handler — importing it into a component fails the build.
@@ -10,7 +10,7 @@ description: >-
10
10
  metadata:
11
11
  type: sub-skill
12
12
  library: softr-sdk
13
- library_version: 1.11.1
13
+ library_version: 1.12.0
14
14
  ---
15
15
 
16
16
  **Boundary.** `ds` lives on `@softr/sdk/server` and runs only inside a `createServerFn` handler — importing it into a component fails the build. A helper that calls `ds` outside a handler goes in `createServerOnlyFn` from `@tanstack/react-start` (the `record-queries` boundary). `defineQuery` and every type come from `@softr/sdk` and can be imported anywhere.
@@ -11,7 +11,7 @@ description: >-
11
11
  metadata:
12
12
  type: sub-skill
13
13
  library: softr-sdk
14
- library_version: 1.11.1
14
+ library_version: 1.12.0
15
15
  ---
16
16
 
17
17
  # The current user
@@ -12,7 +12,7 @@ description: >-
12
12
  metadata:
13
13
  type: sub-skill
14
14
  library: softr-sdk
15
- library_version: 1.11.1
15
+ library_version: 1.12.0
16
16
  ---
17
17
 
18
18
  **Boundary.** `email` and `EmailError` live on `@softr/sdk/server` and run only inside a `createServerFn` handler — importing them into a component fails the build. `defineEmailAction` and every type come from `@softr/sdk` and can be imported anywhere.
@@ -7,7 +7,7 @@ description: >-
7
7
  metadata:
8
8
  type: sub-skill
9
9
  library: softr-sdk
10
- library_version: 1.11.1
10
+ library_version: 1.12.0
11
11
  ---
12
12
 
13
13
  **Boundary.** `upload` lives on `@softr/sdk/server` and runs inside server functions. `useFileUpload` and `FileItem` live on `@softr/sdk` and run in components. `FileAttachment` comes from `@softr/sdk` and can be imported anywhere.
@@ -8,7 +8,7 @@ description: >-
8
8
  metadata:
9
9
  type: sub-skill
10
10
  library: softr-sdk
11
- library_version: 1.11.1
11
+ library_version: 1.12.0
12
12
  ---
13
13
 
14
14
  # Dates, times and numbers
@@ -7,7 +7,7 @@ description: >-
7
7
  metadata:
8
8
  type: sub-skill
9
9
  library: softr-sdk
10
- library_version: 1.11.1
10
+ library_version: 1.12.0
11
11
  ---
12
12
 
13
13
  **Boundary.** `integration` lives on `@softr/sdk/server` and runs only inside a `createServerFn` handler — importing it into a component fails the build. `defineIntegration` 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.11.1
12
+ library_version: 1.12.0
13
13
  ---
14
14
 
15
15
  **Boundary.** `softrMcpMiddleware` lives on `@softr/sdk` and is registered once, in `src/start.ts`. The actions you hand it are the same `defineQuery` / `defineMutation` values the app's own pages use — declared wherever they already live, not duplicated for MCP.
@@ -9,7 +9,7 @@ description: >-
9
9
  metadata:
10
10
  type: sub-skill
11
11
  library: softr-sdk
12
- library_version: 1.11.1
12
+ library_version: 1.12.0
13
13
  ---
14
14
 
15
15
  # Push notifications
@@ -10,7 +10,7 @@ description: >-
10
10
  metadata:
11
11
  type: sub-skill
12
12
  library: softr-sdk
13
- library_version: 1.11.1
13
+ library_version: 1.12.0
14
14
  ---
15
15
 
16
16
  # Installing the app
@@ -10,7 +10,7 @@ description: >-
10
10
  metadata:
11
11
  type: sub-skill
12
12
  library: softr-sdk
13
- library_version: 1.11.1
13
+ library_version: 1.12.0
14
14
  ---
15
15
 
16
16
  **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.
@@ -11,7 +11,7 @@ description: >-
11
11
  metadata:
12
12
  type: sub-skill
13
13
  library: softr-sdk
14
- library_version: 1.11.1
14
+ library_version: 1.12.0
15
15
  ---
16
16
 
17
17
  **Boundary.** `ds` lives on `@softr/sdk/server` and runs only inside a `createServerFn` handler — importing it into a component fails the build. A route `loader` also runs in the browser, so it calls a server function, never `ds`. A helper that calls `ds` outside a handler, in this file or in another one, goes in `createServerOnlyFn` from `@tanstack/react-start`, or inside the handler. An exported helper without it keeps the server-only import in the browser bundle, and every page stops loading until it moves. Do not make such a helper a server function when it takes an id: any visitor can call a server function with any id. `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.11.1
12
+ library_version: 1.12.0
13
13
  ---
14
14
 
15
15
  **Boundary.** `Audience` and `defineVisibility` 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.11.1
12
+ library_version: 1.12.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.11.1
12
+ library_version: 1.12.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.