@jchat/addon-sdk 1.0.0-alpha.32 → 1.0.0-alpha.33
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 +11 -0
- package/dist/src.mjs +2 -1
- package/dist/ui.d.mts +0 -5
- package/dist/ui.mjs +2 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @jchat/addon-sdk
|
|
2
2
|
|
|
3
|
+
## 1.0.0-alpha.33
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Remove AddonSettingsLoading in favor of standard Loader component
|
|
8
|
+
|
|
9
|
+
- Configure default query retry for addon queries
|
|
10
|
+
|
|
11
|
+
- Bumped `@jchat/*` dependencies:
|
|
12
|
+
- [`ui@1.0.0-alpha.29`](https://github.com/jchatcloud/jchat/releases/tag/ui@v1.0.0-alpha.29)
|
|
13
|
+
|
|
3
14
|
## 1.0.0-alpha.32
|
|
4
15
|
|
|
5
16
|
No changes in this release.
|
package/dist/src.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import "./i18n.mjs";
|
|
|
2
2
|
import { AbilityBuilder, createMongoAbility, subject } from "@casl/ability";
|
|
3
3
|
import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
4
4
|
//#region package.json
|
|
5
|
-
var version = "1.0.0-alpha.
|
|
5
|
+
var version = "1.0.0-alpha.33";
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/permissions.ts
|
|
8
8
|
/**
|
|
@@ -125,6 +125,7 @@ function useAddonQuery(options) {
|
|
|
125
125
|
return sdk.api.get(path);
|
|
126
126
|
});
|
|
127
127
|
return useQuery({
|
|
128
|
+
retry: 1,
|
|
128
129
|
...queryOptions,
|
|
129
130
|
queryKey: effectiveKey,
|
|
130
131
|
queryFn: effectiveFn
|
package/dist/ui.d.mts
CHANGED
|
@@ -39,10 +39,5 @@ export interface AddonCanProps {
|
|
|
39
39
|
* @param children Content rendered when access is granted
|
|
40
40
|
*/
|
|
41
41
|
export declare function AddonCan({ actor, ownerId, ownPermission, anyPermission, permission, fallback, children }: AddonCanProps): React.ReactElement | null;
|
|
42
|
-
/** Standard loading spinner for addon settings views. */
|
|
43
|
-
export declare function AddonSettingsLoading({ message, className }: {
|
|
44
|
-
message?: string;
|
|
45
|
-
className?: string;
|
|
46
|
-
}): React.ReactElement;
|
|
47
42
|
//#endregion
|
|
48
43
|
export { Can, ui_default as default };
|
package/dist/ui.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { v as hasPermission } from "./src.mjs";
|
|
2
|
-
import
|
|
2
|
+
import "react";
|
|
3
3
|
import ui_default from "@jchat/ui";
|
|
4
4
|
import { Can } from "@casl/react";
|
|
5
5
|
export * from "@jchat/ui";
|
|
@@ -31,9 +31,5 @@ function AddonCan({ actor, ownerId, ownPermission, anyPermission, permission, fa
|
|
|
31
31
|
}
|
|
32
32
|
return children;
|
|
33
33
|
}
|
|
34
|
-
/** Standard loading spinner for addon settings views. */
|
|
35
|
-
function AddonSettingsLoading({ message = "Loading configuration...", className }) {
|
|
36
|
-
return React.createElement("div", { className: "flex items-center justify-center p-8 text-sm text-muted-foreground" + (className ? ` ${className}` : "") }, React.createElement("span", { className: "me-2 inline-block size-4 animate-spin rounded-full border-2 border-primary border-t-transparent" }), message);
|
|
37
|
-
}
|
|
38
34
|
//#endregion
|
|
39
|
-
export { AddonCan,
|
|
35
|
+
export { AddonCan, Can, ui_default as default };
|