@salesforce/platform-sdk 12.8.0 → 12.10.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.
Files changed (116) hide show
  1. package/dist/analytics/analytics.d.ts +19 -15
  2. package/dist/analytics/analytics.d.ts.map +1 -1
  3. package/dist/analytics/error-listener.d.ts +3 -3
  4. package/dist/analytics/index.d.ts.map +1 -1
  5. package/dist/analytics/index.js +1 -1
  6. package/dist/analytics/method-configs.d.ts +8 -4
  7. package/dist/analytics/method-configs.d.ts.map +1 -1
  8. package/dist/analytics/pft.d.ts +22 -16
  9. package/dist/analytics/pft.d.ts.map +1 -1
  10. package/dist/analytics/proxy.d.ts +10 -8
  11. package/dist/analytics/proxy.d.ts.map +1 -1
  12. package/dist/analytics/types.d.ts +57 -43
  13. package/dist/analytics/types.d.ts.map +1 -1
  14. package/dist/{analytics-Dpz22kda.js → analytics-wESbWdca.js} +1 -1
  15. package/dist/app/index.d.ts +18 -13
  16. package/dist/app/index.d.ts.map +1 -1
  17. package/dist/app/index.js +5 -3
  18. package/dist/app/webapp.d.ts +5 -2
  19. package/dist/app/webapp.d.ts.map +1 -1
  20. package/dist/{capabilities-CKe8z6kZ.js → capabilities-B0mU0_G0.js} +1 -1
  21. package/dist/chat/index.js +1 -1
  22. package/dist/core/app.d.ts +31 -22
  23. package/dist/core/app.d.ts.map +1 -1
  24. package/dist/core/capabilities.d.ts +26 -17
  25. package/dist/core/capabilities.d.ts.map +1 -1
  26. package/dist/core/chat.d.ts +155 -125
  27. package/dist/core/chat.d.ts.map +1 -1
  28. package/dist/core/data.d.ts +146 -107
  29. package/dist/core/data.d.ts.map +1 -1
  30. package/dist/core/extension-attach.d.ts +65 -51
  31. package/dist/core/extension-attach.d.ts.map +1 -1
  32. package/dist/core/extension-types.d.ts +214 -153
  33. package/dist/core/extension-types.d.ts.map +1 -1
  34. package/dist/core/index.d.ts.map +1 -1
  35. package/dist/core/index.js +2 -2
  36. package/dist/core/lightning.d.ts +11 -19
  37. package/dist/core/lightning.d.ts.map +1 -1
  38. package/dist/core/mcpapps-session.d.ts +63 -52
  39. package/dist/core/mcpapps-session.d.ts.map +1 -1
  40. package/dist/core/options.d.ts +6 -4
  41. package/dist/core/options.d.ts.map +1 -1
  42. package/dist/core/platforms.d.ts +29 -29
  43. package/dist/core/sdk-promise.d.ts +7 -4
  44. package/dist/core/sdk-promise.d.ts.map +1 -1
  45. package/dist/core/surface.d.ts +89 -67
  46. package/dist/core/surface.d.ts.map +1 -1
  47. package/dist/core/view.d.ts +164 -113
  48. package/dist/core/view.d.ts.map +1 -1
  49. package/dist/data/extensions/index.d.ts +5 -2
  50. package/dist/data/extensions/index.d.ts.map +1 -1
  51. package/dist/data/extensions/labels/index.d.ts +72 -49
  52. package/dist/data/extensions/labels/index.d.ts.map +1 -1
  53. package/dist/data/extensions/labels/query.d.ts +38 -29
  54. package/dist/data/extensions/labels/query.d.ts.map +1 -1
  55. package/dist/data/gql.d.ts +8 -4
  56. package/dist/data/gql.d.ts.map +1 -1
  57. package/dist/data/index.d.ts +67 -48
  58. package/dist/data/index.d.ts.map +1 -1
  59. package/dist/data/index.js +265 -242
  60. package/dist/data/mosaic/fetch.d.ts +24 -15
  61. package/dist/data/mosaic/fetch.d.ts.map +1 -1
  62. package/dist/data/mosaic/index.d.ts +13 -9
  63. package/dist/data/mosaic/index.d.ts.map +1 -1
  64. package/dist/data/openai/index.d.ts +11 -5
  65. package/dist/data/openai/index.d.ts.map +1 -1
  66. package/dist/data/shared/graphql/cache/command.d.ts +60 -46
  67. package/dist/data/shared/graphql/cache/command.d.ts.map +1 -1
  68. package/dist/data/shared/graphql/cache/invoker.d.ts.map +1 -1
  69. package/dist/data/shared/graphql/cache/services.d.ts +21 -11
  70. package/dist/data/shared/graphql/cache/services.d.ts.map +1 -1
  71. package/dist/data/shared/graphql/cached-graphql.d.ts +9 -4
  72. package/dist/data/shared/graphql/cached-graphql.d.ts.map +1 -1
  73. package/dist/data/shared/graphql/graphql-parse.d.ts +6 -3
  74. package/dist/data/shared/graphql/graphql-parse.d.ts.map +1 -1
  75. package/dist/data/shared/graphql/headers.d.ts +34 -27
  76. package/dist/data/shared/graphql/headers.d.ts.map +1 -1
  77. package/dist/data/shared/graphql/parse-response.d.ts +31 -23
  78. package/dist/data/shared/graphql/parse-response.d.ts.map +1 -1
  79. package/dist/data/shared/graphql/uncached-graphql.d.ts +10 -6
  80. package/dist/data/shared/graphql/uncached-graphql.d.ts.map +1 -1
  81. package/dist/data/shared/url-utils.d.ts +1 -1
  82. package/dist/data/shared/url-utils.d.ts.map +1 -1
  83. package/dist/data/webapp/accept-language.interceptor.d.ts +26 -9
  84. package/dist/data/webapp/accept-language.interceptor.d.ts.map +1 -1
  85. package/dist/data/webapp/client-headers.interceptor.d.ts +4 -3
  86. package/dist/data/webapp/client-headers.interceptor.d.ts.map +1 -1
  87. package/dist/data/webapp/csrf/header.interceptor.d.ts +4 -4
  88. package/dist/data/webapp/csrf/header.interceptor.d.ts.map +1 -1
  89. package/dist/data/webapp/csrf/retry.policy.d.ts +12 -11
  90. package/dist/data/webapp/csrf/retry.policy.d.ts.map +1 -1
  91. package/dist/data/webapp/csrf/token-manager.d.ts +18 -12
  92. package/dist/data/webapp/csrf/token-manager.d.ts.map +1 -1
  93. package/dist/data/webapp/fetch.d.ts +12 -8
  94. package/dist/data/webapp/fetch.d.ts.map +1 -1
  95. package/dist/data/webapp/index.d.ts +12 -7
  96. package/dist/data/webapp/index.d.ts.map +1 -1
  97. package/dist/i18n/locale-format.d.ts +23 -21
  98. package/dist/i18n/locale-format.d.ts.map +1 -1
  99. package/dist/i18n/salesforce-backend.d.ts +19 -11
  100. package/dist/i18n/salesforce-backend.d.ts.map +1 -1
  101. package/dist/i18n/salesforce-detector.d.ts +22 -14
  102. package/dist/i18n/salesforce-detector.d.ts.map +1 -1
  103. package/dist/index.js +3 -3
  104. package/dist/lightning/embedding.d.ts.map +1 -1
  105. package/dist/lightning/index.d.ts +4 -4
  106. package/dist/lightning/index.d.ts.map +1 -1
  107. package/dist/lightning/index.js +2 -2
  108. package/dist/{surface-Dd2tqrPi.js → surface-DWDgqdpN.js} +18 -13
  109. package/dist/telemetry/tool-adapter.d.ts.map +1 -1
  110. package/dist/telemetry/uploader/TelemetryUploader.d.ts.map +1 -1
  111. package/dist/ui-embedding/index.d.ts.map +1 -1
  112. package/dist/ui-embedding/session.d.ts +7 -2
  113. package/dist/ui-embedding/session.d.ts.map +1 -1
  114. package/dist/ui-embedding/session.js +1 -1
  115. package/dist/view/index.js +1 -1
  116. package/package.json +2 -2
@@ -4,135 +4,163 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
  /**
7
- * CSS-adjacent styling the host publishes for the embedded surface.
7
+ * The CSS-adjacent styling that the host publishes for the embedded
8
+ * surface.
8
9
  *
9
- * `variables` are CSS custom properties (`--*`) read off the host element's inline
10
- * style; `attributes` are mirrored a11y/i18n/input attributes from the host LWC.
10
+ * @remarks
11
+ * `variables` are CSS custom properties, `--*`, read from the host
12
+ * element's inline style. `attributes` are mirrored accessibility,
13
+ * internationalization, and input attributes from the host LWC.
11
14
  */
12
15
  export interface UiStyles {
13
16
  variables?: Record<string, string>;
14
17
  attributes?: Record<string, string>;
15
18
  }
16
19
  /**
17
- * Host → embedding rendering snapshot exposed to bundles via {@link ViewSDK.getUiState}.
20
+ * The host-to-embedding rendering snapshot exposed to bundles through
21
+ * {@link ViewSDK.getUiState}.
18
22
  *
19
- * `props` are host-configurable inputs (theme, locale, mode, etc.); `styles` are the
20
- * CSS custom properties and attributes the host wants mirrored onto the surface.
23
+ * @remarks
24
+ * `props` are host-configurable inputs, such as theme, locale, and
25
+ * mode. `styles` are the CSS custom properties and attributes that the
26
+ * host wants mirrored onto the surface.
21
27
  *
22
- * Declared locally (not re-exported from `@salesforce/sf-embedding-bridge`) to keep the
23
- * wire-layer package off the SDK's public type graph; the shape mirrors the bridge's, so
24
- * surface-side code assigns without a cast.
28
+ * This interface is declared locally, not re-exported from
29
+ * `@salesforce/sf-embedding-bridge`, to keep the wire-layer package off
30
+ * the SDK's public type graph. Its shape mirrors the bridge's, so
31
+ * surface-side code assigns it without a cast.
25
32
  *
26
- * This is the open, fully-permissive shape. A bundle that knows its host contract can
27
- * declare a narrower type that `extends UiState` (tighter `props`/`styles`) and pass it to
28
- * {@link ViewSDK.getUiState}'s single type parameter for precise typing.
33
+ * This is the open, fully permissive shape. A bundle that knows its
34
+ * host contract can declare a narrower type that extends `UiState`,
35
+ * with tighter `props` and `styles`, and pass it to
36
+ * {@link ViewSDK.getUiState}'s single type parameter for precise
37
+ * typing.
29
38
  */
30
39
  export interface UiState {
31
40
  props: Record<string, unknown>;
32
41
  styles: UiStyles;
33
42
  }
34
43
  /**
35
- * Theme mode
44
+ * The theme mode.
36
45
  */
37
46
  export type ThemeMode = "light" | "dark";
38
47
  /**
39
- * Theme object
48
+ * The theme.
40
49
  */
41
50
  export interface Theme {
42
51
  mode: ThemeMode;
43
52
  }
44
53
  /**
45
- * Message severity level for alerts and toasts
54
+ * The severity level of an alert or a toast.
46
55
  *
47
- * Determines the visual styling and importance of notifications:
48
- * - `info` - Informational messages (blue/neutral)
49
- * - `success` - Successful operations (green)
50
- * - `warning` - Warning messages requiring attention (yellow/orange)
51
- * - `error` - Error messages for failed operations (red)
56
+ * @remarks
57
+ * This type determines the visual styling and importance of a
58
+ * notification.
59
+ * - `info` — an informational message, shown in blue or a neutral color.
60
+ * - `success` — a successful operation, shown in green.
61
+ * - `warning` — a warning that needs attention, shown in yellow or orange.
62
+ * - `error` — an error for a failed operation, shown in red.
52
63
  */
53
64
  export type MessageLevel = "info" | "success" | "warning" | "error";
54
65
  /**
55
- * Configuration options for displaying alerts
66
+ * The configuration for displaying an alert.
56
67
  *
57
- * Alerts are modal notifications that typically require user acknowledgment.
58
- * They block interaction until dismissed and are used for important messages.
68
+ * @remarks
69
+ * An alert is a modal notification that typically requires user
70
+ * acknowledgment. It blocks interaction until the user dismisses it, so
71
+ * use it for important messages.
59
72
  */
60
73
  export interface AlertOptions {
61
74
  /**
62
- * The message content to display in the alert
75
+ * The message content to display in the alert.
63
76
  */
64
77
  message: string;
65
78
  /**
66
- * The severity level of the alert
79
+ * The severity level of the alert.
67
80
  *
68
- * Determines the visual styling and icon. Defaults to "info" if not specified.
81
+ * @remarks
82
+ * This value determines the visual styling and icon. It defaults to
83
+ * `info` when you omit it.
69
84
  */
70
85
  level?: MessageLevel;
71
86
  }
72
87
  /**
73
- * Configuration options for displaying toast notifications
88
+ * The configuration for displaying a toast notification.
74
89
  *
75
- * Toasts are non-blocking, temporary notifications that automatically dismiss
76
- * after a short duration. They're ideal for status updates and confirmations.
90
+ * @remarks
91
+ * A toast is a non-blocking, temporary notification that dismisses
92
+ * automatically after a short duration. Use it for status updates and
93
+ * confirmations.
77
94
  */
78
95
  export interface ToastOptions {
79
96
  /**
80
- * The message content to display in the toast
97
+ * The message content to display in the toast.
81
98
  */
82
99
  message: string;
83
100
  /**
84
- * The severity level of the toast
101
+ * The severity level of the toast.
85
102
  *
86
- * Determines the visual styling and icon. Defaults to "info" if not specified.
103
+ * @remarks
104
+ * This value determines the visual styling and icon. It defaults to
105
+ * `info` when you omit it.
87
106
  */
88
107
  level?: MessageLevel;
89
108
  }
90
109
  /**
91
- * Configuration options for displaying modal dialogs
110
+ * The configuration for displaying a modal dialog.
92
111
  *
93
- * Modals allow custom HTML content to be displayed in an overlay dialog.
94
- * The template is loaded from a UI resource and can receive parameters.
112
+ * @remarks
113
+ * A modal displays custom HTML content in an overlay dialog. The SDK
114
+ * loads the template from a UI resource, and the template can receive
115
+ * parameters.
95
116
  */
96
117
  export interface ModalOptions {
97
118
  /**
98
- * URI of the HTML template to load in the modal
119
+ * The URI of the HTML template to load in the modal, in the form
120
+ * `ui://widget/[name].html`.
99
121
  *
100
- * Format: "ui://widget/[name].html"
101
- * The template file should be included in your application's UI resources.
122
+ * @remarks
123
+ * Include the template file in your application's UI resources.
102
124
  *
103
125
  * @example "ui://widget/confirmation.html"
104
126
  * @example "ui://widget/settings.html"
105
127
  */
106
128
  componentReference: string;
107
129
  /**
108
- * Parameters to pass to the modal template
130
+ * The parameters to pass to the modal template.
109
131
  *
110
- * These parameters are accessible within the modal via the host's API.
111
- * For example, in OpenAI surface: `window.openai.view.params`
132
+ * @remarks
133
+ * The modal can access these parameters through the host's API. For
134
+ * example, on the OpenAI surface, through `window.openai.view.params`.
112
135
  *
113
136
  * @example { userId: "123", mode: "edit" }
114
137
  */
115
138
  params?: Record<string, unknown>;
116
139
  }
117
140
  /**
118
- * ViewSDK API - Provides methods for displaying UI elements and managing view state
141
+ * The View SDK API for displaying UI elements and managing view state.
119
142
  *
120
- * This SDK enables UI Bundles to interact with the host's UI layer by displaying
121
- * alerts, toast notifications, modal dialogs, and managing application state. All methods
122
- * are optional and may not be available depending on the runtime surface.
143
+ * @remarks
144
+ * This SDK lets UI Bundles interact with the host's UI layer. It
145
+ * displays alerts, toast notifications, and modal dialogs, and it
146
+ * manages application state. Every method is optional and may be
147
+ * unavailable, depending on the runtime surface.
123
148
  *
124
149
  * ## Events
125
150
  *
126
- * A ViewSDK is a DOM {@link EventTarget}: the event API is the native
127
- * `addEventListener` / `removeEventListener` / `dispatchEvent`. On surfaces backed by a
128
- * host bridge (e.g. the embedded MicroFrontend surface), `dispatchEvent` both notifies
129
- * local listeners and forwards the event to the host, and events pushed by the host are
130
- * re-dispatched onto the SDK so `addEventListener` hears them too — one unified stream of
131
- * host-pushed and same-document events.
151
+ * A `ViewSDK` is a DOM {@link EventTarget}. Its event API is the native
152
+ * `addEventListener`, `removeEventListener`, and `dispatchEvent`. On
153
+ * surfaces backed by a host bridge, for example the embedded
154
+ * MicroFrontend surface, `dispatchEvent` both notifies local listeners
155
+ * and forwards the event to the host. Events that the host pushes are
156
+ * re-dispatched onto the SDK, so `addEventListener` hears them too.
157
+ * This gives one unified stream of host-pushed and same-document
158
+ * events.
132
159
  *
133
- * The `EventTarget` members are declared via {@link Partial} so that surfaces without an
134
- * event bus (e.g. the WebApp/Mosaic degraded SDK, which is a bare `{}`) still satisfy the
135
- * type. Feature-detect before use: `viewSDK.dispatchEvent?.(...)`.
160
+ * The `EventTarget` members are declared through {@link Partial}, so
161
+ * surfaces without an event bus, for example the WebApp and Mosaic
162
+ * degraded SDK, which is a bare `{}`, still satisfy the type.
163
+ * Feature-detect before use, with `viewSDK.dispatchEvent?.(...)`.
136
164
  *
137
165
  * @example
138
166
  * ```typescript
@@ -156,13 +184,15 @@ export interface ModalOptions {
156
184
  */
157
185
  export type ViewSDK = Partial<EventTarget> & {
158
186
  /**
159
- * Display an alert message in the host environment
187
+ * Displays an alert message in the host environment.
160
188
  *
161
- * Alerts are typically modal and require user acknowledgment before dismissing.
162
- * Use alerts for important messages that require immediate attention.
189
+ * @remarks
190
+ * An alert is typically modal and requires user acknowledgment before
191
+ * it dismisses. Use alerts for important messages that need
192
+ * immediate attention.
163
193
  *
164
- * @param options - Alert configuration options
165
- * @returns Promise that resolves when the alert is displayed
194
+ * @param options - The alert configuration.
195
+ * @returns Resolves once the host displays the alert.
166
196
  *
167
197
  * @example
168
198
  * ```typescript
@@ -174,14 +204,15 @@ export type ViewSDK = Partial<EventTarget> & {
174
204
  */
175
205
  displayAlert?(options: AlertOptions): Promise<void>;
176
206
  /**
177
- * Display a toast notification in the host environment
207
+ * Displays a toast notification in the host environment.
178
208
  *
179
- * Toasts are non-blocking, temporary notifications that auto-dismiss.
180
- * Use toasts for success confirmations, status updates, or informational messages
181
- * that don't require user interaction.
209
+ * @remarks
210
+ * A toast is a non-blocking, temporary notification that dismisses
211
+ * automatically. Use toasts for success confirmations, status
212
+ * updates, and informational messages that need no user interaction.
182
213
  *
183
- * @param options - Toast configuration options
184
- * @returns Promise that resolves when the toast is displayed
214
+ * @param options - The toast configuration.
215
+ * @returns Resolves once the host displays the toast.
185
216
  *
186
217
  * @example
187
218
  * ```typescript
@@ -193,14 +224,15 @@ export type ViewSDK = Partial<EventTarget> & {
193
224
  */
194
225
  displayToast?(options: ToastOptions): Promise<void>;
195
226
  /**
196
- * Display a modal dialog with custom UI in the host environment
227
+ * Displays a modal dialog with custom UI in the host environment.
197
228
  *
198
- * Modals allow you to display custom HTML content in a dialog overlay.
199
- * The template is loaded from a UI resource URI, and parameters can be
200
- * passed to the modal for dynamic content.
229
+ * @remarks
230
+ * A modal displays custom HTML content in a dialog overlay. The SDK
231
+ * loads the template from a UI resource URI, and you can pass
232
+ * parameters to the modal for dynamic content.
201
233
  *
202
- * @param options - Modal configuration options
203
- * @returns Promise that resolves when the modal is displayed
234
+ * @param options - The modal configuration.
235
+ * @returns Resolves once the host displays the modal.
204
236
  *
205
237
  * @example
206
238
  * ```typescript
@@ -215,13 +247,15 @@ export type ViewSDK = Partial<EventTarget> & {
215
247
  */
216
248
  displayModal?(options: ModalOptions): Promise<void>;
217
249
  /**
218
- * Navigate to a different URL within the application
250
+ * Navigates to a different URL within the application.
219
251
  *
220
- * This method triggers navigation in the host environment. The behavior may vary
221
- * depending on the surface (e.g., full page navigation, iframe navigation, etc.).
252
+ * @remarks
253
+ * This method triggers navigation in the host environment. The
254
+ * behavior may vary depending on the surface, through full-page
255
+ * navigation or iframe navigation.
222
256
  *
223
- * @param url - The URL to navigate to (can be relative or absolute)
224
- * @returns Promise that resolves when navigation is initiated
257
+ * @param url - The URL to navigate to, relative or absolute.
258
+ * @returns Resolves once the host starts navigation.
225
259
  *
226
260
  * @example
227
261
  * ```typescript
@@ -231,14 +265,18 @@ export type ViewSDK = Partial<EventTarget> & {
231
265
  */
232
266
  navigateTo?(url: string): Promise<void>;
233
267
  /**
234
- * Mark the application state as "dirty" (having unsaved changes)
268
+ * Marks the application state as dirty, meaning it has unsaved
269
+ * changes.
235
270
  *
236
- * This notifies the host that the application has unsaved changes. The host may
237
- * display a visual indicator (e.g., asterisk in title) and prompt the user before
238
- * navigating away or closing the application.
271
+ * @remarks
272
+ * This method notifies the host that the application has unsaved
273
+ * changes. The host may display a visual indicator, for example an
274
+ * asterisk in the title, and prompt the user before it navigates
275
+ * away or closes the application.
239
276
  *
240
- * @param label - Optional dirty-source id; lets hosts disambiguate multiple concurrent dirty regions.
241
- * @returns Promise that resolves when the dirty state is marked
277
+ * @param label - A dirty-source ID that lets hosts tell apart multiple
278
+ * concurrent dirty regions.
279
+ * @returns Resolves once the host marks the dirty state.
242
280
  *
243
281
  * @example
244
282
  * ```typescript
@@ -253,13 +291,16 @@ export type ViewSDK = Partial<EventTarget> & {
253
291
  */
254
292
  markDirtyState?(label?: string): Promise<void>;
255
293
  /**
256
- * Clear the application's "dirty" state (no unsaved changes)
294
+ * Clears the application's dirty state, meaning it has no unsaved
295
+ * changes.
257
296
  *
258
- * This notifies the host that all changes have been saved. Should be called
259
- * after successfully persisting data to remove unsaved change indicators.
297
+ * @remarks
298
+ * This method notifies the host that the application has saved
299
+ * every change. Call it after you successfully persist data, to
300
+ * remove unsaved-change indicators.
260
301
  *
261
- * @param label - Optional identifier matching the prior `markDirtyState`.
262
- * @returns Promise that resolves when the dirty state is cleared
302
+ * @param label - The identifier that matches the prior `markDirtyState` call.
303
+ * @returns Resolves once the host clears the dirty state.
263
304
  *
264
305
  * @example
265
306
  * ```typescript
@@ -273,24 +314,30 @@ export type ViewSDK = Partial<EventTarget> & {
273
314
  */
274
315
  clearDirtyState?(label?: string): Promise<void>;
275
316
  /**
276
- * Get the current host UI state and a `subscribe` function for future changes.
277
- *
278
- * Returns the latest known snapshot synchronously — the underlying wire subscription is
279
- * opened once, is session-scoped, and is shared across every caller ({@link getTheme} is
280
- * its synchronous sibling). Call `subscribe` with a handler to be notified on every
281
- * subsequent host push; `subscribe` returns an `unsubscribe` function that detaches that
282
- * one handler. Detaching is local fan-out only — the shared wire subscription stays open.
283
- *
284
- * The optional `State` type parameter describes the host contract this caller expects:
285
- * pass a type that `extends UiState` (narrower `props`/`styles`) and both `state` and the
286
- * `subscribe` handler's argument are typed as it. It defaults to the open {@link UiState},
287
- * so `getUiState()` with no type argument is the fully-permissive snapshot. `State` is
288
- * erased at runtime — purely a compile-time convenience, so pin only what the host
317
+ * Gets the current host UI state and a `subscribe` function for
318
+ * future changes.
319
+ *
320
+ * @remarks
321
+ * This method returns the latest known snapshot synchronously. The
322
+ * underlying wire subscription opens once, is session-scoped, and is
323
+ * shared across every caller. {@link getTheme} is its synchronous
324
+ * sibling. Call `subscribe` with a handler to receive every later
325
+ * host push. `subscribe` returns an `unsubscribe` function that
326
+ * detaches that one handler. Detaching only affects local fan-out;
327
+ * the shared wire subscription stays open.
328
+ *
329
+ * The `State` type parameter describes the host contract that this
330
+ * caller expects. Pass a type that extends `UiState`, with narrower
331
+ * `props` and `styles`, and both `state` and the `subscribe`
332
+ * handler's argument are typed as it. It defaults to the open
333
+ * {@link UiState}, so `getUiState()` with no type argument returns
334
+ * the fully permissive snapshot. `State` is erased at runtime. It is
335
+ * purely a compile-time convenience, so pin only what the host
289
336
  * actually guarantees.
290
337
  *
291
- * @typeParam State - The expected snapshot shape; must extend {@link UiState}.
292
- * @returns `{ state, subscribe }` — the current snapshot and a subscribe function whose
293
- * return value is the per-handler `unsubscribe`.
338
+ * @typeParam State - The expected snapshot shape. Must extend {@link UiState}.
339
+ * @returns The current snapshot and a subscribe function. The
340
+ * subscribe function's return value is the per-handler `unsubscribe`.
294
341
  *
295
342
  * @example
296
343
  * ```typescript
@@ -319,14 +366,16 @@ export type ViewSDK = Partial<EventTarget> & {
319
366
  subscribe: (handler: (state: State) => void) => () => void;
320
367
  };
321
368
  /**
322
- * Resize the application viewport
369
+ * Resizes the application viewport.
323
370
  *
324
- * Requests the host to resize the application container to the specified dimensions.
325
- * Useful for adaptive layouts or when content size changes dynamically.
371
+ * @remarks
372
+ * This method requests that the host resize the application
373
+ * container to the specified dimensions. Use it for adaptive
374
+ * layouts or when content size changes dynamically.
326
375
  *
327
- * @param width - The desired width (e.g., "500px", "100%", "auto")
328
- * @param height - The desired height (e.g., "300px", "100%", "auto")
329
- * @returns Promise that resolves when resize is complete
376
+ * @param width - The desired width, for example `500px`, `100%`, or `auto`.
377
+ * @param height - The desired height, for example `300px`, `100%`, or `auto`.
378
+ * @returns Resolves once the resize completes.
330
379
  *
331
380
  * @example
332
381
  * ```typescript
@@ -339,12 +388,14 @@ export type ViewSDK = Partial<EventTarget> & {
339
388
  */
340
389
  resize?(width: string, height: string): Promise<void>;
341
390
  /**
342
- * Get the current theme from the host environment
391
+ * Gets the current theme from the host environment.
343
392
  *
344
- * Returns the current theme (light/dark mode) as reported by the host.
345
- * Returns null if the host has not provided theme information.
393
+ * @remarks
394
+ * This method returns the current theme, light or dark mode, as the
395
+ * host reports it. It returns `null` when the host has not provided
396
+ * theme information.
346
397
  *
347
- * @returns The current theme or null if not available
398
+ * @returns The current theme, or `null` when it is not available.
348
399
  *
349
400
  * @example
350
401
  * ```typescript
@@ -1 +1 @@
1
- {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../src/core/view.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,OAAO;IACvB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,MAAM,EAAE,QAAQ,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,KAAK;IACrB,IAAI,EAAE,SAAS,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC5B;;OAEG;IACH,OAAO,EAAE,MAAM,CA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,CAAC,CAAC,KAAK,SAAS,OAAO,GAAG,OAAO,KAAK;QAC/C,KAAK,EAAE,KAAK,CAAC;QACb,SAAS,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,KAAK,MAAM,IAAI,CAAC;KAC3D,CAAC;IAEF;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtD;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CAAC,IAAI,KAAK,GAAG,IAAI,CAAC;CAC1B,CAAC"}
@@ -4,8 +4,11 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
  /**
7
- * First-party DataSDK extension catalog. Import extensions from this subpath and
8
- * attach them via `createDataSDK({ extensions: [...] })`:
7
+ * The catalog of first-party `DataSDK` extensions.
8
+ *
9
+ * @remarks
10
+ * Import an extension from this subpath, and attach it with
11
+ * `createDataSDK({ extensions: [...] })`.
9
12
  *
10
13
  * ```typescript
11
14
  * import { createDataSDK } from "@salesforce/platform-sdk/data";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/data/extensions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;GAUG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/data/extensions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC"}