@blocklet/discuss-kit-ux 1.6.188 → 1.6.191
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/dist/components/hooks/session.d.ts +8 -3
- package/dist/components/posts/post-content.d.ts +1 -2
- package/dist/{editor-1S0suIcX.mjs → editor-E23ceKmd.mjs} +1 -1
- package/dist/{index-q1fCyaqz.mjs → index-OmtAwPz3.mjs} +214 -130
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +59 -58
- package/dist/index.umd.js +154 -70
- package/package.json +4 -4
|
@@ -10,10 +10,15 @@ export interface SessionContextUser {
|
|
|
10
10
|
permissions: string[];
|
|
11
11
|
role: string;
|
|
12
12
|
}
|
|
13
|
+
interface Session {
|
|
14
|
+
initialized: boolean;
|
|
15
|
+
user: SessionContextUser;
|
|
16
|
+
login: (...args: any[]) => void;
|
|
17
|
+
}
|
|
13
18
|
export declare const useSessionContext: () => {
|
|
14
19
|
isAdmin: boolean;
|
|
15
20
|
hasAnyPassport: (passports: string | string[]) => boolean;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
21
|
+
hasAnyPermission: (perms: string | string[]) => boolean;
|
|
22
|
+
session: Session;
|
|
19
23
|
};
|
|
24
|
+
export {};
|
|
@@ -3,11 +3,10 @@ interface Props {
|
|
|
3
3
|
content: string;
|
|
4
4
|
editing?: boolean;
|
|
5
5
|
onExitEditing?: () => void;
|
|
6
|
-
onCancel?: () => void;
|
|
7
6
|
onSubmit?: Send;
|
|
8
7
|
autoCollapse?: boolean;
|
|
9
8
|
enableHeadingsIdPlugin?: boolean;
|
|
10
9
|
onReady?: () => void;
|
|
11
10
|
}
|
|
12
|
-
export default function PostContent({ content, editing, onExitEditing,
|
|
11
|
+
export default function PostContent({ content, editing, onExitEditing, onSubmit, autoCollapse, enableHeadingsIdPlugin, onReady, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
12
|
export {};
|
|
@@ -4,7 +4,7 @@ import { OnContentChangePlugin } from "@blocklet/editor/lib/ext/OnContentChangeP
|
|
|
4
4
|
import { CtrlsShortcutPlugin } from "@blocklet/editor/lib/ext/ShortcutPlugin";
|
|
5
5
|
import { SafeAreaPlugin } from "@blocklet/editor/lib/ext/SafeAreaPlugin";
|
|
6
6
|
import { lazy } from "react";
|
|
7
|
-
import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-
|
|
7
|
+
import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-OmtAwPz3.mjs";
|
|
8
8
|
import "@blocklet/labels";
|
|
9
9
|
import "@mui/material/styles";
|
|
10
10
|
import "@mui/material/Box";
|