@colixsystems/widget-sdk 0.238.0 → 0.239.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/README.md +19 -3
- package/dist/contract.cjs +6 -1
- package/dist/contract.js +6 -1
- package/dist/index.d.ts +7 -0
- package/dist/property-schema.js +6 -0
- package/package.json +1 -1
- package/src/contract.js +6 -1
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ The data layer lives in **four separate domain-client packages**, each instantia
|
|
|
24
24
|
| **CORE** | `useUser()` | `{ id, email, displayName, photoUrl, roles, groupIds }` | `ctx.user` (host-built context, **camelCase** — not a wire payload; `id` null when anonymous) — no scope. `photoUrl` is the user's own profile photo as an absolute URL, or `null`. |
|
|
25
25
|
| **CORE** | `useUserPhoto()` | `{ url, canEdit, upload, remove, uploading, error }` | `ctx.user` + the optional `ctx.account` — no scope. Changes the signed-in user's OWN profile photo. `canEdit` is false when nobody is signed in or the host cannot change it; `upload` / `remove` then reject. |
|
|
26
26
|
| **CORE** | `useAnonymousAccount()` | `{ supported, canCreate, creating, error, create }` | The optional `ctx.account.anonymous` — no scope. Offers an account with a generated login code and password and no email. `create()` opens the app's own dialog, which confirms, creates the account, shows the pair once and signs the visitor in; the widget never receives the pair and `create()` resolves `{ created: true }`. `supported` is false where the workspace has not turned anonymous accounts on, on the Builder canvas, in a preview and for a badge counter; `canCreate` is false while someone is signed in. |
|
|
27
|
-
| **CORE** | `useNavigation()` | `{ goTo, goToStartPage, goBack, push, replace, back, currentRoute, openLink }` | `ctx.navigation` — no scope. `goTo(pageIdOrSlug, params?)` accepts a page UUID (a `pageRef` prop) **or its slug** (a row's page-key field) — both hosts resolve either; `goToStartPage()` opens the signed-in user's own start page (`openLink` for a link of unknown shape; a known external URL can also use the `Linking` primitive) |
|
|
27
|
+
| **CORE** | `useNavigation()` | `{ goTo, goToStartPage, scrollToSection, goBack, push, replace, back, currentRoute, openLink }` | `ctx.navigation` — no scope. `goTo(pageIdOrSlug, params?)` accepts a page UUID (a `pageRef` prop) **or its slug** (a row's page-key field) — both hosts resolve either; `goToStartPage()` opens the signed-in user's own start page; `scrollToSection(id)` scrolls this page to a section picked with a `sectionRef` prop (`openLink` for a link of unknown shape; a known external URL can also use the `Linking` primitive) |
|
|
28
28
|
| **CORE** | `useFilePreview(file)` | `{ uri }` | No scope. A temporary address an `<Image>` can show for a file the person picked but has not uploaded yet (a photo in a composer). Native picks use their own uri; on the web the SDK creates and releases an object URL, which widgets may not do themselves. `uri` is null for no file. |
|
|
29
29
|
| **CORE** | `usePageBadge(count)` | `{ supported }` | `ctx.navigation.setBadge` — no scope. Puts `count` on the menu entry or tab of the page the widget is on (a chat's unread messages). The host sums the page's widgets and keeps the last count after the widget leaves the screen, until it reports again; `0` clears this widget's share. `supported` is false where the host draws no page badges (the Builder canvas). |
|
|
30
30
|
| **CORE** | `useRouteParams()` | `{ [paramKey]: value }` | `ctx.navigation.currentRoute.params` — no scope. The nav params the previous page passed via `goTo(pageId, params)`; the flat accessor for master→detail (read `recordId` on a detail page). Empty object when none. |
|
|
@@ -84,7 +84,23 @@ See the design reference for the full architecture: [`docs/architecture/widget-m
|
|
|
84
84
|
|
|
85
85
|
## Status
|
|
86
86
|
|
|
87
|
-
`v0.
|
|
87
|
+
`v0.239.0` — pre-publish. The package surface (types, function names, export paths) is the v1 contract; runtime behaviour for some hooks is stubbed (each hook documents what's wired and what isn't). It is **not yet published to npm**.
|
|
88
|
+
|
|
89
|
+
### What's new in 0.239.0 (contract 1.193.0)
|
|
90
|
+
|
|
91
|
+
**A widget can scroll its page to a section — `useNavigation().scrollToSection(sectionId)`.** A one-page site jumps from "See pricing" to the pricing section further down. Bind the target with a `sectionRef` property: the Studio renders a picker of the page's sections (its root sections and every layout container), and the value is the id you pass to `scrollToSection`.
|
|
92
|
+
|
|
93
|
+
```jsx
|
|
94
|
+
import { useNavigation, Button } from "@colixsystems/widget-sdk";
|
|
95
|
+
|
|
96
|
+
export default function JumpButton({ label, target }) {
|
|
97
|
+
const { scrollToSection } = useNavigation();
|
|
98
|
+
return <Button title={label} onPress={() => scrollToSection(target)} />;
|
|
99
|
+
}
|
|
100
|
+
// propertySchema: { target: { type: "sectionRef", label: "Section" } }
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
The web Player and the exported app both scroll smoothly (instantly under reduced motion) and stop with the section just below a pinned site header. An unknown, deleted or hidden section does nothing, and so does the Studio canvas. Additive.
|
|
88
104
|
|
|
89
105
|
### What's new in 0.238.0 (contract 1.192.0)
|
|
90
106
|
|
|
@@ -2933,7 +2949,7 @@ import { defineWidget, validateManifest, useDatastoreQuery, Text, View } from "@
|
|
|
2933
2949
|
|
|
2934
2950
|
- `defineWidget({ manifest, component })` — validates the manifest and produces a widget module the host can register.
|
|
2935
2951
|
- `validateManifest(m)` / `validatePropertySchema(s)` / `validateProps(schema, props)` — shape validation; no third-party deps.
|
|
2936
|
-
- `useDatastoreQuery`, `useDatastoreRecord`, `useDatastoreSchema`, `useDatastoreMutation`, `useDirectory`, `useUsers`, `useGroups`, `useRecordPermissions`, `useAsset`, `useWidgetEvent`, `useWidgetInput`, `usePayments`, `useSendNotification`, `useTheme`, `useI18n`, `useUser`, `useNavigation`, `useRouteParams`, `usePageContext`, `useWidgetRoute`, `useChildRenderer`, `useClipboard`, `useToast` — hooks that read from the host-provided `WidgetContext` (or, for `useClipboard`, the platform clipboard API directly). `useDirectory(query?)` returns `{ users, loading, error, refetch }` (each user `{ id, name, role }`) and requires the `directory.read:users` scope. `useUsers(query?)` returns `{ users, loading, error, refetch, invite, deactivate, reactivate, remove }` and requires `users.read:*` (mutations also need `users.write:*`); rejections are a `DirectoryError`. `useGroups(query?)` returns `{ groups, loading, error, refetch, create, remove, addMember, removeMember }` and requires `groups.read:*` (mutations also need `groups.write:*`). `usePayments()` returns `{ requestPayment, getPayment }` and requires the `payments.charge:appUser` scope; `requestPayment(...)` rejects with a `PaymentError` carrying `code`, the server's user-safe `message`, and `retryable` (`false` = this charge cannot succeed until the workspace, manifest, or amount changes — show the message, not a retry). `useSendNotification()` returns `{ send, sending, error }` and requires the `notifications.send:appUser` scope; `send({ recipient_user_id, title, body, link?, payload? })` notifies one app user in the same workspace (cross-workspace `recipient_user_id` is rejected), must be called from an event handler rather than render, and rejects with a `NotificationError`. `useUser()` returns the active end-user identity `{ id, email, displayName, roles, groupIds }` (camelCase — the host-built context object, not a wire payload; `id` is `null` for anonymous / preview). `useNavigation()` returns `{ goTo, goToStartPage, goBack, push, replace, back, currentRoute, openLink }` for internal page navigation; `goToStartPage()` opens the signed-in user's own start page (the page the app opens on for them); `openLink(link)` follows an author- or data-supplied link of unknown shape through the host's shared resolver (in-app page → internal route, off-app http(s) → opened outside, unsafe → refused) and is the safe choice for any value your code did not construct, while `Linking.openURL(url)` is for an external URL you built yourself. `useRouteParams()` returns the current route's params object (`currentRoute.params`) — the flat master→detail accessor; read a param off it (e.g. `recordId`), never call it. `useDatastoreRecord(tableId, recordId)` returns `{ data, loading, error, refetch }` for a single record (data is one row or null). `useDatastoreSchema(tableId)` returns `{ schema, loading, error, refetch }` where `schema` is `{ id, name, columns: [{ id, name, data_type, required, relation_type, target_table_id, is_identification }] }` (structure only, no row data; snake_case verbatim) — use it to resolve a stored `columnId` to its column type at runtime; requires the `datastore.read:<table>` scope. `useAsset(fileId)` returns `{ url, file, loading, error, refetch }` — the `url` is an absolute URL composed against the host's API base. `useChildRenderer()` returns `{ renderNode(node) }` — container widgets call it to render arbitrary child page-tree nodes (prefer the `WidgetTree` component for the common case). `useWidgetInput(inputName)` returns the latest payload a sibling widget published on the event the page author wired to this widget's declared `inputs` entry (`undefined` when unwired or not yet published).
|
|
2952
|
+
- `useDatastoreQuery`, `useDatastoreRecord`, `useDatastoreSchema`, `useDatastoreMutation`, `useDirectory`, `useUsers`, `useGroups`, `useRecordPermissions`, `useAsset`, `useWidgetEvent`, `useWidgetInput`, `usePayments`, `useSendNotification`, `useTheme`, `useI18n`, `useUser`, `useNavigation`, `useRouteParams`, `usePageContext`, `useWidgetRoute`, `useChildRenderer`, `useClipboard`, `useToast` — hooks that read from the host-provided `WidgetContext` (or, for `useClipboard`, the platform clipboard API directly). `useDirectory(query?)` returns `{ users, loading, error, refetch }` (each user `{ id, name, role }`) and requires the `directory.read:users` scope. `useUsers(query?)` returns `{ users, loading, error, refetch, invite, deactivate, reactivate, remove }` and requires `users.read:*` (mutations also need `users.write:*`); rejections are a `DirectoryError`. `useGroups(query?)` returns `{ groups, loading, error, refetch, create, remove, addMember, removeMember }` and requires `groups.read:*` (mutations also need `groups.write:*`). `usePayments()` returns `{ requestPayment, getPayment }` and requires the `payments.charge:appUser` scope; `requestPayment(...)` rejects with a `PaymentError` carrying `code`, the server's user-safe `message`, and `retryable` (`false` = this charge cannot succeed until the workspace, manifest, or amount changes — show the message, not a retry). `useSendNotification()` returns `{ send, sending, error }` and requires the `notifications.send:appUser` scope; `send({ recipient_user_id, title, body, link?, payload? })` notifies one app user in the same workspace (cross-workspace `recipient_user_id` is rejected), must be called from an event handler rather than render, and rejects with a `NotificationError`. `useUser()` returns the active end-user identity `{ id, email, displayName, roles, groupIds }` (camelCase — the host-built context object, not a wire payload; `id` is `null` for anonymous / preview). `useNavigation()` returns `{ goTo, goToStartPage, scrollToSection, goBack, push, replace, back, currentRoute, openLink }` for internal page navigation; `goToStartPage()` opens the signed-in user's own start page (the page the app opens on for them); `scrollToSection(sectionId)` scrolls the current page to one of its sections (bind the id with a `sectionRef` prop); `openLink(link)` follows an author- or data-supplied link of unknown shape through the host's shared resolver (in-app page → internal route, off-app http(s) → opened outside, unsafe → refused) and is the safe choice for any value your code did not construct, while `Linking.openURL(url)` is for an external URL you built yourself. `useRouteParams()` returns the current route's params object (`currentRoute.params`) — the flat master→detail accessor; read a param off it (e.g. `recordId`), never call it. `useDatastoreRecord(tableId, recordId)` returns `{ data, loading, error, refetch }` for a single record (data is one row or null). `useDatastoreSchema(tableId)` returns `{ schema, loading, error, refetch }` where `schema` is `{ id, name, columns: [{ id, name, data_type, required, relation_type, target_table_id, is_identification }] }` (structure only, no row data; snake_case verbatim) — use it to resolve a stored `columnId` to its column type at runtime; requires the `datastore.read:<table>` scope. `useAsset(fileId)` returns `{ url, file, loading, error, refetch }` — the `url` is an absolute URL composed against the host's API base. `useChildRenderer()` returns `{ renderNode(node) }` — container widgets call it to render arbitrary child page-tree nodes (prefer the `WidgetTree` component for the common case). `useWidgetInput(inputName)` returns the latest payload a sibling widget published on the event the page author wired to this widget's declared `inputs` entry (`undefined` when unwired or not yet published).
|
|
2937
2953
|
- `WidgetTree({ node })` — component that renders an author-authored child node through the host's renderer; used by Tabs / Card / custom containers to host arbitrary child widgets.
|
|
2938
2954
|
- `Text`, `View`, `Pressable`, `Image`, `ScrollView`, `TextInput`, `FlatList`, `SectionList`, `ActivityIndicator`, `Switch`, `StyleSheet`, `Linking`, `Icon`, `DateTimePicker` — re-exported from `react-native` (the RN primitives) or implemented in the SDK (`Icon` wraps `lucide-react-native`; `DateTimePicker` wraps `@react-native-community/datetimepicker` on native and renders `<input type="date|time|datetime-local">` directly on web because the RN library has no react-native-web mapping). The web build aliases `react-native` to `react-native-web` so the RN-re-exported primitives render in the browser without any per-platform code; the exported Expo app's Metro bundler resolves the real `react-native` library. `Linking` is a static API (`Linking.openURL(url)`) — use it for external URLs, and use `useNavigation().goTo(pageId)` for internal page navigation. See https://reactnative.dev/docs/ for per-component props.
|
|
2939
2955
|
- `Overlay` — the screen-level overlay (sc-6607). `<Overlay visible={!!preview} onRequestClose={() => setPreview(null)} size="full">…</Overlay>` renders its children OUTSIDE the widget's layout box on both hosts (web portals it to the document root, native uses the OS modal), so no clipping card, `ScrollView` or neighbouring widget can cut off a document/media preview, lightbox or confirm dialog — which absolute positioning inside the widget cannot achieve on either platform. Children stay in your own React tree, so state and hooks work normally. `onRequestClose` carries the backdrop press, Escape on web, and the Android back button; `size` is `sm` | `md` (default) | `lg` | `full`; the scrim, surface, radius, padding and elevation come from the workspace theme. An anchored dropdown still belongs inside your own root.
|
package/dist/contract.cjs
CHANGED
|
@@ -1203,6 +1203,8 @@ const HOOKS = [
|
|
|
1203
1203
|
openLink: "(link: string) => boolean",
|
|
1204
1204
|
goToStartPage:
|
|
1205
1205
|
"() => void — opens the signed-in user's own start page, the page the app opens on for them (it can differ per user, since page access is restricted per group). Use it for a 'back to start' or 'home' button instead of hard-coding a page. A no-op where there is no live router (the Studio canvas, a badge counter).",
|
|
1206
|
+
scrollToSection:
|
|
1207
|
+
"(sectionId: string) => void — scrolls THIS page to one of its sections (a root section or a layout container), landing its top just below any pinned site header; smooth unless the visitor prefers reduced motion. Take the id from a `sectionRef` prop the author picks; never hard-code a node id. An unknown, deleted or hidden section is a no-op, and so is the Studio canvas.",
|
|
1206
1208
|
goBack: "() => void",
|
|
1207
1209
|
push: "(pageIdOrSlug: string, params?: object) => void",
|
|
1208
1210
|
replace: "(pageIdOrSlug: string, params?: object) => void",
|
|
@@ -6085,7 +6087,10 @@ const CONTRACT = deepFreeze({
|
|
|
6085
6087
|
// on `<FilePicker>` (which gains onFocus/onBlur; `muted` lists it).
|
|
6086
6088
|
// `<List variant="card">`, `<ListRow actions>`, `defaults` on both.
|
|
6087
6089
|
// `<Select multiple values onValuesChange>`.
|
|
6088
|
-
|
|
6090
|
+
// 1.193.0: additive (sc-11821) — `useNavigation().scrollToSection(id)`
|
|
6091
|
+
// scrolls the page to one of its sections on both hosts, and the
|
|
6092
|
+
// `sectionRef` propertySchema type gives the author a section picker.
|
|
6093
|
+
version: "1.193.0",
|
|
6089
6094
|
sharedTranslationKeys: SHARED_TRANSLATION_KEYS,
|
|
6090
6095
|
hooks: HOOKS,
|
|
6091
6096
|
primitives: PRIMITIVES,
|
package/dist/contract.js
CHANGED
|
@@ -1203,6 +1203,8 @@ const HOOKS = [
|
|
|
1203
1203
|
openLink: "(link: string) => boolean",
|
|
1204
1204
|
goToStartPage:
|
|
1205
1205
|
"() => void — opens the signed-in user's own start page, the page the app opens on for them (it can differ per user, since page access is restricted per group). Use it for a 'back to start' or 'home' button instead of hard-coding a page. A no-op where there is no live router (the Studio canvas, a badge counter).",
|
|
1206
|
+
scrollToSection:
|
|
1207
|
+
"(sectionId: string) => void — scrolls THIS page to one of its sections (a root section or a layout container), landing its top just below any pinned site header; smooth unless the visitor prefers reduced motion. Take the id from a `sectionRef` prop the author picks; never hard-code a node id. An unknown, deleted or hidden section is a no-op, and so is the Studio canvas.",
|
|
1206
1208
|
goBack: "() => void",
|
|
1207
1209
|
push: "(pageIdOrSlug: string, params?: object) => void",
|
|
1208
1210
|
replace: "(pageIdOrSlug: string, params?: object) => void",
|
|
@@ -6081,7 +6083,10 @@ const CONTRACT = deepFreeze({
|
|
|
6081
6083
|
// on `<FilePicker>` (which gains onFocus/onBlur; `muted` lists it).
|
|
6082
6084
|
// `<List variant="card">`, `<ListRow actions>`, `defaults` on both.
|
|
6083
6085
|
// `<Select multiple values onValuesChange>`.
|
|
6084
|
-
|
|
6086
|
+
// 1.193.0: additive (sc-11821) — `useNavigation().scrollToSection(id)`
|
|
6087
|
+
// scrolls the page to one of its sections on both hosts, and the
|
|
6088
|
+
// `sectionRef` propertySchema type gives the author a section picker.
|
|
6089
|
+
version: "1.193.0",
|
|
6085
6090
|
sharedTranslationKeys: SHARED_TRANSLATION_KEYS,
|
|
6086
6091
|
hooks: HOOKS,
|
|
6087
6092
|
primitives: PRIMITIVES,
|
package/dist/index.d.ts
CHANGED
|
@@ -39,6 +39,9 @@ export type WidgetPropertyType =
|
|
|
39
39
|
// REQ-WDG-PAGEREF: page picker that emits a bare AppPage UUID; a widget
|
|
40
40
|
// reads it and navigates via useNavigation().goTo(pageId, params).
|
|
41
41
|
| "pageRef"
|
|
42
|
+
// REQ-BLD-19: section picker for the widget's own page → bare node id; a
|
|
43
|
+
// widget scrolls to it via useNavigation().scrollToSection(id).
|
|
44
|
+
| "sectionRef"
|
|
42
45
|
// REQ-WDG-RICHTEXT: rich-text (HTML string) edited via a Tiptap editor.
|
|
43
46
|
| "richText"
|
|
44
47
|
// REQ-WDG-ASSET: file/asset picker → bare File UUID (Asset Manager picker).
|
|
@@ -841,6 +844,7 @@ export interface WidgetContext<TProps = unknown> {
|
|
|
841
844
|
navigation: {
|
|
842
845
|
goTo(pageId: string, params?: Record<string, string>): void;
|
|
843
846
|
goToStartPage(): void;
|
|
847
|
+
scrollToSection(sectionId: string): void;
|
|
844
848
|
goBack(): void;
|
|
845
849
|
push(pageId: string, params?: Record<string, unknown>): void;
|
|
846
850
|
replace(pageId: string, params?: Record<string, unknown>): void;
|
|
@@ -2210,12 +2214,15 @@ export function useFitScreenInsets(): FitScreenInsets;
|
|
|
2210
2214
|
* The host-provided navigation surface. `goTo(pageId, params?)` navigates
|
|
2211
2215
|
* to an internal app page; `goBack()` pops the stack. `goToStartPage()`
|
|
2212
2216
|
* opens the signed-in user's own start page, which can differ per user.
|
|
2217
|
+
* `scrollToSection(sectionId)` scrolls this page to one of its sections (the
|
|
2218
|
+
* id comes from a `sectionRef` prop); an unknown section is a no-op.
|
|
2213
2219
|
* Missing methods degrade to no-ops on the Studio canvas preview where no
|
|
2214
2220
|
* live router is mounted. For external URLs use the `Linking` primitive.
|
|
2215
2221
|
*/
|
|
2216
2222
|
export function useNavigation(): {
|
|
2217
2223
|
goTo(pageId: string, params?: Record<string, unknown>): void;
|
|
2218
2224
|
goToStartPage(): void;
|
|
2225
|
+
scrollToSection(sectionId: string): void;
|
|
2219
2226
|
goBack(): void;
|
|
2220
2227
|
push(pageId: string, params?: Record<string, unknown>): void;
|
|
2221
2228
|
replace(pageId: string, params?: Record<string, unknown>): void;
|
package/dist/property-schema.js
CHANGED
|
@@ -34,6 +34,11 @@ const VALID_TYPES = new Set([
|
|
|
34
34
|
// `useNavigation().goTo(pageId, params)`. Bare uuid string — tenant-copy
|
|
35
35
|
// remaps it through the layout walk's pageId map (see tenant-copy.service.js).
|
|
36
36
|
"pageRef",
|
|
37
|
+
// REQ-BLD-19: `sectionRef` is a section picker for the widget's OWN page,
|
|
38
|
+
// emitting a bare layout node id; a widget scrolls to it via
|
|
39
|
+
// `useNavigation().scrollToSection(id)`. Node ids survive Copy Workspace
|
|
40
|
+
// unchanged, and page duplication remaps them, so no per-prop hook.
|
|
41
|
+
"sectionRef",
|
|
37
42
|
// REQ-WDG-RICHTEXT: `richText` is a rich-text (HTML) string. Renders a
|
|
38
43
|
// Tiptap editor in the Studio Properties Panel; the widget renders the
|
|
39
44
|
// sanitised HTML. Stored as a string, so no tenant-copy remap is needed.
|
|
@@ -153,6 +158,7 @@ function coerceLeaf(def, value, path, errors) {
|
|
|
153
158
|
case "recordBinding":
|
|
154
159
|
case "groupRef":
|
|
155
160
|
case "pageRef":
|
|
161
|
+
case "sectionRef":
|
|
156
162
|
case "agentRef":
|
|
157
163
|
case "richText":
|
|
158
164
|
case "asset":
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colixsystems/widget-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.239.0",
|
|
4
4
|
"description": "Common widget interface for AppStudio. Implements WidgetManifest, WidgetContext, property schema, and helper hooks.",
|
|
5
5
|
"homepage": "https://github.com/Colix-AB/AppStudio",
|
|
6
6
|
"type": "module",
|
package/src/contract.js
CHANGED
|
@@ -1203,6 +1203,8 @@ const HOOKS = [
|
|
|
1203
1203
|
openLink: "(link: string) => boolean",
|
|
1204
1204
|
goToStartPage:
|
|
1205
1205
|
"() => void — opens the signed-in user's own start page, the page the app opens on for them (it can differ per user, since page access is restricted per group). Use it for a 'back to start' or 'home' button instead of hard-coding a page. A no-op where there is no live router (the Studio canvas, a badge counter).",
|
|
1206
|
+
scrollToSection:
|
|
1207
|
+
"(sectionId: string) => void — scrolls THIS page to one of its sections (a root section or a layout container), landing its top just below any pinned site header; smooth unless the visitor prefers reduced motion. Take the id from a `sectionRef` prop the author picks; never hard-code a node id. An unknown, deleted or hidden section is a no-op, and so is the Studio canvas.",
|
|
1206
1208
|
goBack: "() => void",
|
|
1207
1209
|
push: "(pageIdOrSlug: string, params?: object) => void",
|
|
1208
1210
|
replace: "(pageIdOrSlug: string, params?: object) => void",
|
|
@@ -6081,7 +6083,10 @@ const CONTRACT = deepFreeze({
|
|
|
6081
6083
|
// on `<FilePicker>` (which gains onFocus/onBlur; `muted` lists it).
|
|
6082
6084
|
// `<List variant="card">`, `<ListRow actions>`, `defaults` on both.
|
|
6083
6085
|
// `<Select multiple values onValuesChange>`.
|
|
6084
|
-
|
|
6086
|
+
// 1.193.0: additive (sc-11821) — `useNavigation().scrollToSection(id)`
|
|
6087
|
+
// scrolls the page to one of its sections on both hosts, and the
|
|
6088
|
+
// `sectionRef` propertySchema type gives the author a section picker.
|
|
6089
|
+
version: "1.193.0",
|
|
6085
6090
|
sharedTranslationKeys: SHARED_TRANSLATION_KEYS,
|
|
6086
6091
|
hooks: HOOKS,
|
|
6087
6092
|
primitives: PRIMITIVES,
|