sykpcomposer 0.0.95 → 0.0.98

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 (35) hide show
  1. package/dist/index.es.js +63704 -4
  2. package/dist/index.es.js.map +1 -1
  3. package/dist/index.umd.js +459 -160
  4. package/dist/index.umd.js.map +1 -1
  5. package/dist/src/components/ExampleTheme.d.ts +3 -0
  6. package/dist/src/components/heading.d.ts +3 -0
  7. package/dist/src/components/plugins/DocxPastePlugin.d.ts +2 -0
  8. package/dist/src/components/plugins/HtmlPlugin.d.ts +6 -0
  9. package/dist/src/{utils/joinClasses.d.ts → components/plugins/TreeViewPlugin.d.ts} +2 -1
  10. package/dist/style.css +1 -1
  11. package/package.json +2 -2
  12. package/dist/ImageComponent-ddf2b888.js +0 -402
  13. package/dist/ImageComponent-ddf2b888.js.map +0 -1
  14. package/dist/InlineImageComponent-46949279.js +0 -249
  15. package/dist/InlineImageComponent-46949279.js.map +0 -1
  16. package/dist/Placeholder-347ad381.js +0 -97
  17. package/dist/Placeholder-347ad381.js.map +0 -1
  18. package/dist/index-3341449c.js +0 -48210
  19. package/dist/index-3341449c.js.map +0 -1
  20. package/dist/src/components/hooks/useModal.d.ts +0 -12
  21. package/dist/src/components/nodes/ImageComponent.d.ts +0 -22
  22. package/dist/src/components/nodes/ImageNode.d.ts +0 -49
  23. package/dist/src/components/nodes/InlineImageComponent.d.ts +0 -18
  24. package/dist/src/components/nodes/InlineImageNode.d.ts +0 -65
  25. package/dist/src/components/plugins/ImagePlugin.d.ts +0 -24
  26. package/dist/src/components/plugins/InlineImagePlugin.d.ts +0 -16
  27. package/dist/src/components/ui/Button.d.ts +0 -17
  28. package/dist/src/components/ui/ContentEditable.d.ts +0 -12
  29. package/dist/src/components/ui/Dialog.d.ts +0 -15
  30. package/dist/src/components/ui/FileInput.d.ts +0 -16
  31. package/dist/src/components/ui/ImageResizer.d.ts +0 -24
  32. package/dist/src/components/ui/Modal.d.ts +0 -14
  33. package/dist/src/components/ui/Placeholder.d.ts +0 -12
  34. package/dist/src/components/ui/Select.d.ts +0 -14
  35. package/dist/src/components/ui/TextInput.d.ts +0 -19
@@ -1,12 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
- /// <reference types="react" />
9
- export default function useModal(): [
10
- JSX.Element | null,
11
- (title: string, showModal: (onClose: () => void) => JSX.Element) => void
12
- ];
@@ -1,22 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
- /// <reference types="react" />
9
- import type { LexicalCommand, LexicalEditor, NodeKey } from "lexical";
10
- export declare const RIGHT_CLICK_IMAGE_COMMAND: LexicalCommand<MouseEvent>;
11
- export default function ImageComponent({ src, altText, nodeKey, width, height, maxWidth, resizable, showCaption, caption, captionsEnabled, }: {
12
- altText: string;
13
- caption: LexicalEditor;
14
- height: "inherit" | number;
15
- maxWidth: number;
16
- nodeKey: NodeKey;
17
- resizable: boolean;
18
- showCaption: boolean;
19
- src: string;
20
- width: "inherit" | number;
21
- captionsEnabled: boolean;
22
- }): JSX.Element;
@@ -1,49 +0,0 @@
1
- /// <reference types="react" />
2
- import type { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalEditor, LexicalNode, NodeKey, SerializedEditor, SerializedLexicalNode, Spread } from 'lexical';
3
- import { DecoratorNode } from 'lexical';
4
- export interface ImagePayload {
5
- altText: string;
6
- caption?: LexicalEditor;
7
- height?: number;
8
- key?: NodeKey;
9
- maxWidth?: number;
10
- showCaption?: boolean;
11
- src: string;
12
- width?: number;
13
- captionsEnabled?: boolean;
14
- }
15
- export type SerializedImageNode = Spread<{
16
- altText: string;
17
- caption: SerializedEditor;
18
- height?: number;
19
- maxWidth: number;
20
- showCaption: boolean;
21
- src: string;
22
- width?: number;
23
- }, SerializedLexicalNode>;
24
- export declare class ImageNode extends DecoratorNode<JSX.Element> {
25
- __src: string;
26
- __altText: string;
27
- __width: 'inherit' | number;
28
- __height: 'inherit' | number;
29
- __maxWidth: number;
30
- __showCaption: boolean;
31
- __caption: LexicalEditor;
32
- __captionsEnabled: boolean;
33
- static getType(): string;
34
- static clone(node: ImageNode): ImageNode;
35
- static importJSON(serializedNode: SerializedImageNode): ImageNode;
36
- exportDOM(): DOMExportOutput;
37
- static importDOM(): DOMConversionMap | null;
38
- constructor(src: string, altText: string, maxWidth: number, width?: 'inherit' | number, height?: 'inherit' | number, showCaption?: boolean, caption?: LexicalEditor, captionsEnabled?: boolean, key?: NodeKey);
39
- exportJSON(): SerializedImageNode;
40
- setWidthAndHeight(width: 'inherit' | number, height: 'inherit' | number): void;
41
- setShowCaption(showCaption: boolean): void;
42
- createDOM(config: EditorConfig): HTMLElement;
43
- updateDOM(): false;
44
- getSrc(): string;
45
- getAltText(): string;
46
- decorate(): JSX.Element;
47
- }
48
- export declare function $createImageNode({ altText, height, maxWidth, captionsEnabled, src, width, showCaption, caption, key, }: ImagePayload): ImageNode;
49
- export declare function $isImageNode(node: LexicalNode | null | undefined): node is ImageNode;
@@ -1,18 +0,0 @@
1
- /// <reference types="react" />
2
- import type { Position } from "./InlineImageNode";
3
- import type { LexicalEditor, NodeKey } from "lexical";
4
- export declare function UpdateInlineImageDialog({ activeEditor, nodeKey, onClose, }: {
5
- activeEditor: LexicalEditor;
6
- nodeKey: NodeKey;
7
- onClose: () => void;
8
- }): JSX.Element;
9
- export default function InlineImageComponent({ src, altText, nodeKey, width, height, showCaption, caption, position, }: {
10
- altText: string;
11
- caption: LexicalEditor;
12
- height: "inherit" | number;
13
- nodeKey: NodeKey;
14
- showCaption: boolean;
15
- src: string;
16
- width: "inherit" | number;
17
- position: Position;
18
- }): JSX.Element;
@@ -1,65 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
- /// <reference types="react" />
9
- import type { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalEditor, LexicalNode, NodeKey, SerializedEditor, SerializedLexicalNode, Spread } from 'lexical';
10
- import { DecoratorNode } from 'lexical';
11
- export type Position = 'left' | 'right' | 'full' | undefined;
12
- export interface InlineImagePayload {
13
- altText: string;
14
- caption?: LexicalEditor;
15
- height?: number;
16
- key?: NodeKey;
17
- showCaption?: boolean;
18
- src: string;
19
- width?: number;
20
- position?: Position;
21
- }
22
- export interface UpdateInlineImagePayload {
23
- altText?: string;
24
- showCaption?: boolean;
25
- position?: Position;
26
- }
27
- export type SerializedInlineImageNode = Spread<{
28
- altText: string;
29
- caption: SerializedEditor;
30
- height?: number;
31
- showCaption: boolean;
32
- src: string;
33
- width?: number;
34
- position?: Position;
35
- }, SerializedLexicalNode>;
36
- export declare class InlineImageNode extends DecoratorNode<JSX.Element> {
37
- __src: string;
38
- __altText: string;
39
- __width: 'inherit' | number;
40
- __height: 'inherit' | number;
41
- __showCaption: boolean;
42
- __caption: LexicalEditor;
43
- __position: Position;
44
- static getType(): string;
45
- static clone(node: InlineImageNode): InlineImageNode;
46
- static importJSON(serializedNode: SerializedInlineImageNode): InlineImageNode;
47
- static importDOM(): DOMConversionMap | null;
48
- constructor(src: string, altText: string, position: Position, width?: 'inherit' | number, height?: 'inherit' | number, showCaption?: boolean, caption?: LexicalEditor, key?: NodeKey);
49
- exportDOM(): DOMExportOutput;
50
- exportJSON(): SerializedInlineImageNode;
51
- getSrc(): string;
52
- getAltText(): string;
53
- setAltText(altText: string): void;
54
- setWidthAndHeight(width: 'inherit' | number, height: 'inherit' | number): void;
55
- getShowCaption(): boolean;
56
- setShowCaption(showCaption: boolean): void;
57
- getPosition(): Position;
58
- setPosition(position: Position): void;
59
- update(payload: UpdateInlineImagePayload): void;
60
- createDOM(config: EditorConfig): HTMLElement;
61
- updateDOM(prevNode: InlineImageNode, dom: HTMLElement, config: EditorConfig): false;
62
- decorate(): JSX.Element;
63
- }
64
- export declare function $createInlineImageNode({ altText, position, height, src, width, showCaption, caption, key, }: InlineImagePayload): InlineImageNode;
65
- export declare function $isInlineImageNode(node: LexicalNode | null | undefined): node is InlineImageNode;
@@ -1,24 +0,0 @@
1
- /// <reference types="react" />
2
- import { LexicalCommand, LexicalEditor } from "lexical";
3
- import { ImagePayload } from "../nodes/ImageNode";
4
- export type InsertImagePayload = Readonly<ImagePayload>;
5
- export declare const INSERT_IMAGE_COMMAND: LexicalCommand<InsertImagePayload>;
6
- export declare function InsertImageUriDialogBody({ onClick, }: {
7
- onClick: (payload: InsertImagePayload) => void;
8
- }): import("react/jsx-runtime").JSX.Element;
9
- export declare function InsertImageUploadedDialogBody({ onClick, }: {
10
- onClick: (payload: InsertImagePayload) => void;
11
- }): import("react/jsx-runtime").JSX.Element;
12
- export declare function InsertImageDialog({ activeEditor, onClose, }: {
13
- activeEditor: LexicalEditor;
14
- onClose: () => void;
15
- }): JSX.Element;
16
- export default function ImagesPlugin({ captionsEnabled, }: {
17
- captionsEnabled?: boolean;
18
- }): JSX.Element | null;
19
- declare global {
20
- interface DragEvent {
21
- rangeOffset?: number;
22
- rangeParent?: Node;
23
- }
24
- }
@@ -1,16 +0,0 @@
1
- /// <reference types="react" />
2
- import { LexicalCommand, LexicalEditor } from "lexical";
3
- import { InlineImagePayload } from "../nodes/InlineImageNode";
4
- export type InsertInlineImagePayload = Readonly<InlineImagePayload>;
5
- export declare const INSERT_INLINE_IMAGE_COMMAND: LexicalCommand<InlineImagePayload>;
6
- export declare function InsertInlineImageDialog({ activeEditor, onClose, }: {
7
- activeEditor: LexicalEditor;
8
- onClose: () => void;
9
- }): JSX.Element;
10
- export default function InlineImagePlugin(): JSX.Element | null;
11
- declare global {
12
- interface DragEvent {
13
- rangeOffset?: number;
14
- rangeParent?: Node;
15
- }
16
- }
@@ -1,17 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
- import { ReactNode } from 'react';
9
- export default function Button({ 'data-test-id': dataTestId, children, className, onClick, disabled, small, title, }: {
10
- 'data-test-id'?: string;
11
- children: ReactNode;
12
- className?: string;
13
- disabled?: boolean;
14
- onClick: () => void;
15
- small?: boolean;
16
- title?: string;
17
- }): JSX.Element;
@@ -1,12 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
- import * as React from 'react';
9
- export default function LexicalContentEditable({ className, style, }: {
10
- className?: string;
11
- style?: React.CSSProperties;
12
- }): JSX.Element;
@@ -1,15 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
- import { ReactNode } from 'react';
9
- type Props = Readonly<{
10
- 'data-test-id'?: string;
11
- children: ReactNode;
12
- }>;
13
- export declare function DialogButtonsList({ children }: Props): JSX.Element;
14
- export declare function DialogActions({ 'data-test-id': dataTestId, children, }: Props): JSX.Element;
15
- export {};
@@ -1,16 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
- /// <reference types="react" />
9
- type Props = Readonly<{
10
- 'data-test-id'?: string;
11
- accept?: string;
12
- label: string;
13
- onChange: (files: FileList | null) => void;
14
- }>;
15
- export default function FileInput({ accept, label, onChange, 'data-test-id': dataTestId, }: Props): JSX.Element;
16
- export {};
@@ -1,24 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
- /// <reference types="react" />
9
- import type { LexicalEditor } from 'lexical';
10
- export default function ImageResizer({ onResizeStart, onResizeEnd, buttonRef, imageRef, maxWidth, editor, showCaption, setShowCaption, captionsEnabled, }: {
11
- editor: LexicalEditor;
12
- buttonRef: {
13
- current: null | HTMLButtonElement;
14
- };
15
- imageRef: {
16
- current: null | HTMLElement;
17
- };
18
- maxWidth?: number;
19
- onResizeEnd: (width: 'inherit' | number, height: 'inherit' | number) => void;
20
- onResizeStart: () => void;
21
- setShowCaption: (show: boolean) => void;
22
- showCaption: boolean;
23
- captionsEnabled: boolean;
24
- }): JSX.Element;
@@ -1,14 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
- import { ReactNode } from 'react';
9
- export default function Modal({ onClose, children, title, closeOnClickOutside, }: {
10
- children: ReactNode;
11
- closeOnClickOutside?: boolean;
12
- onClose: () => void;
13
- title: string;
14
- }): JSX.Element;
@@ -1,12 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
- import { ReactNode } from 'react';
9
- export default function Placeholder({ children, className, }: {
10
- children: ReactNode;
11
- className?: string;
12
- }): JSX.Element;
@@ -1,14 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
- /// <reference types="react" />
9
- type SelectIntrinsicProps = JSX.IntrinsicElements['select'];
10
- interface SelectProps extends SelectIntrinsicProps {
11
- label: string;
12
- }
13
- export default function Select({ children, label, className, ...other }: SelectProps): JSX.Element;
14
- export {};
@@ -1,19 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
- import { HTMLInputTypeAttribute } from 'react';
9
- type Props = Readonly<{
10
- 'data-test-id'?: string;
11
- label: string;
12
- onChange: (val: string, name: string) => void;
13
- placeholder?: string;
14
- value: string;
15
- type?: HTMLInputTypeAttribute;
16
- name?: string;
17
- }>;
18
- export default function TextInput({ label, value, onChange, placeholder, 'data-test-id': dataTestId, type, name, }: Props): JSX.Element;
19
- export {};