@arkitektbedriftene/fe-lib 0.3.18 → 0.3.19
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/{DropdownMenu-cae60146.js → DropdownMenu-1eb444b3.js} +96 -97
- package/dist/rich-text/Editor.d.ts +11 -1
- package/dist/rich-text/Plugins/CheckListPlugin.d.ts +10 -0
- package/dist/rich-text/Plugins/ParsePlugin.d.ts +4 -0
- package/dist/rich-text/Plugins/Plugins.d.ts +2 -0
- package/dist/rich-text/state.d.ts +4 -1
- package/dist/rich-text.es.js +530 -309
- package/dist/ui/components/Alert.d.ts +0 -1
- package/dist/ui/components/Badge.d.ts +0 -1
- package/dist/ui/components/Box.d.ts +0 -1
- package/dist/ui/components/Button.d.ts +0 -1
- package/dist/ui/components/Menu/DropdownMenu.d.ts +0 -3
- package/dist/ui/components/Menu/Menu.d.ts +0 -3
- package/dist/ui/components/OverlayCard.d.ts +0 -1
- package/dist/ui/components/Popover.d.ts +0 -1
- package/dist/ui/components/Spinner.d.ts +0 -1
- package/dist/ui/components/Toolbar.d.ts +0 -4
- package/dist/ui/stitches.config.d.ts +0 -6
- package/dist/ui.es.js +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { type ReactNode, type ReactElement } from "react";
|
|
2
|
+
import { type CSS } from "../ui/ui";
|
|
2
3
|
import { type InitialConfigType } from "@lexical/react/LexicalComposer.js";
|
|
3
|
-
|
|
4
|
+
import type { EditorState, SerializedEditorState } from "lexical";
|
|
5
|
+
export type RichTextEditorState = EditorState | string | SerializedEditorState;
|
|
6
|
+
export declare const RichTextEditor: ({ isLoading, children, placeholderText, nodes, plugins, toolbarContent, content, hideBorder, onBlur, defaultState, css }: {
|
|
4
7
|
isLoading: boolean;
|
|
5
8
|
children: ReactNode;
|
|
6
9
|
placeholderText?: string | undefined;
|
|
@@ -10,4 +13,11 @@ export declare const RichTextEditor: ({ isLoading, children, placeholderText, no
|
|
|
10
13
|
content: ReactElement;
|
|
11
14
|
hideBorder?: boolean | undefined;
|
|
12
15
|
onBlur?: (() => void) | undefined;
|
|
16
|
+
defaultState?: RichTextEditorState | null | undefined;
|
|
17
|
+
css?: CSS<{
|
|
18
|
+
media: {};
|
|
19
|
+
theme: {};
|
|
20
|
+
themeMap: {};
|
|
21
|
+
utils: {};
|
|
22
|
+
}> | undefined;
|
|
13
23
|
}) => JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* From: https://raw.githubusercontent.com/facebook/lexical/main/packages/lexical-react/src/LexicalCheckListPlugin.tsx
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export declare function CheckListPlugin(): null;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { type CreateEditorArgs, type SerializedEditorState } from "lexical";
|
|
1
|
+
import { type EditorState, type CreateEditorArgs, type SerializedEditorState, type LexicalEditor } from "lexical";
|
|
2
2
|
export declare const isJSON: (str: string) => boolean;
|
|
3
|
+
export declare const isEditorState: (state: unknown) => state is EditorState;
|
|
4
|
+
export declare const clearEditorState: (editor: LexicalEditor, tag?: string) => void;
|
|
5
|
+
export declare const setStateFromPlainText: (str: string, editor: LexicalEditor, tag?: string) => void;
|
|
3
6
|
export declare const stateToHTML: (state: SerializedEditorState | string | null | undefined, nodes: CreateEditorArgs["nodes"], options?: {
|
|
4
7
|
maxLines?: number | null;
|
|
5
8
|
onlyMainContent?: boolean;
|