@appsemble/sdk 0.36.10 → 0.37.1

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 (3) hide show
  1. package/README.md +3 -3
  2. package/index.d.ts +17 -1
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
- # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.36.10/config/assets/logo.svg) Appsemble SDK
1
+ # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.37.1/config/assets/logo.svg) Appsemble SDK
2
2
 
3
3
  > Build your own blocks
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/@appsemble/sdk)](https://www.npmjs.com/package/@appsemble/sdk)
6
- [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.36.10/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.36.10)
6
+ [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.37.1/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.37.1)
7
7
  [![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://prettier.io)
8
8
 
9
9
  ## Table of Contents
@@ -153,5 +153,5 @@ declare module '@appsemble/sdk' {
153
153
 
154
154
  ## License
155
155
 
156
- [LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.36.10/LICENSE.md) ©
156
+ [LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.37.1/LICENSE.md) ©
157
157
  [Appsemble](https://appsemble.com)
package/index.d.ts CHANGED
@@ -90,7 +90,12 @@ export interface EventListeners {
90
90
  */
91
91
  export interface Parameters {
92
92
  }
93
- export type PageParameters = Record<string, string>;
93
+ export interface PageParameters extends Record<string, string | Record<string, string> | undefined> {
94
+ /**
95
+ * Query parameters from the current URL.
96
+ */
97
+ query?: Record<string, string>;
98
+ }
94
99
  /**
95
100
  * A menu item that can be displayed in addition to the normal app menu.
96
101
  */
@@ -143,6 +148,17 @@ export interface Utils {
143
148
  * @returns Whether or not the input is an action error.
144
149
  */
145
150
  isActionError: (input: unknown) => input is ActionError;
151
+ /**
152
+ * Test if the input is an error caused by the action's owner being aborted.
153
+ *
154
+ * An action chain rejects with this when the block, page, or flow page that owns it is unmounted
155
+ * while the chain is in flight, e.g. by navigating away or switching tabs. It signals a
156
+ * cancellation, not a failure, so blocks should treat it as a benign stop rather than an error.
157
+ *
158
+ * @param input The input to test
159
+ * @returns Whether or not the input is an action owner abort error.
160
+ */
161
+ isActionOwnerAbortError: (input: unknown) => boolean;
146
162
  /**
147
163
  * Remap data based in a user defined remapper function.
148
164
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appsemble/sdk",
3
- "version": "0.36.10",
3
+ "version": "0.37.1",
4
4
  "description": "Build your own blocks",
5
5
  "keywords": [
6
6
  "app",
@@ -43,8 +43,8 @@
43
43
  "test": "vitest"
44
44
  },
45
45
  "dependencies": {
46
- "@appsemble/types": "0.36.10",
47
- "@appsemble/lang-sdk": "0.36.10",
46
+ "@appsemble/types": "0.37.1",
47
+ "@appsemble/lang-sdk": "0.37.1",
48
48
  "@fortawesome/fontawesome-common-types": "^6.0.0",
49
49
  "type-fest": "^4.0.0"
50
50
  },