@contentful/field-editor-rich-text 2.0.0-next.20 → 2.0.0-next.21
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 +410 -0
- package/dist/field-editor-rich-text.cjs.development.js +231 -256
- package/dist/field-editor-rich-text.cjs.development.js.map +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js.map +1 -1
- package/dist/field-editor-rich-text.esm.js +232 -257
- package/dist/field-editor-rich-text.esm.js.map +1 -1
- package/dist/plugins/Hyperlink/components/EntityHyperlink.d.ts +9 -0
- package/dist/plugins/Hyperlink/components/ToolbarHyperlinkButton.d.ts +5 -0
- package/dist/plugins/Hyperlink/components/UrlHyperlink.d.ts +9 -0
- package/dist/plugins/Hyperlink/components/styles.d.ts +4 -0
- package/dist/plugins/Hyperlink/createHyperlinkPlugin.d.ts +3 -0
- package/dist/plugins/Hyperlink/index.d.ts +2 -8
- package/dist/plugins/Hyperlink/useEntityInfo.d.ts +16 -0
- package/dist/plugins/Hyperlink/utils.d.ts +2 -0
- package/dist/test-utils/jsx.d.ts +1 -1
- package/package.json +1 -1
- package/dist/plugins/Hyperlink/EntryAssetTooltip.d.ts +0 -9
- package/dist/plugins/Hyperlink/truncate.d.ts +0 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Link } from '@contentful/app-sdk';
|
|
2
|
+
import { CustomRenderElementProps } from '../../../types';
|
|
3
|
+
declare type HyperlinkElementProps = CustomRenderElementProps<{
|
|
4
|
+
uri?: string;
|
|
5
|
+
target?: Link;
|
|
6
|
+
onEntityFetchComplete?: VoidFunction;
|
|
7
|
+
}>;
|
|
8
|
+
export declare function EntityHyperlink(props: HyperlinkElementProps): JSX.Element | null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Link } from '@contentful/app-sdk';
|
|
2
|
+
import { CustomRenderElementProps } from '../../../types';
|
|
3
|
+
declare type HyperlinkElementProps = CustomRenderElementProps<{
|
|
4
|
+
uri?: string;
|
|
5
|
+
target?: Link;
|
|
6
|
+
onEntityFetchComplete?: VoidFunction;
|
|
7
|
+
}>;
|
|
8
|
+
export declare function UrlHyperlink(props: HyperlinkElementProps): JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
interface ToolbarHyperlinkButtonProps {
|
|
4
|
-
isDisabled: boolean | undefined;
|
|
5
|
-
}
|
|
6
|
-
export declare function ToolbarHyperlinkButton(props: ToolbarHyperlinkButtonProps): JSX.Element | null;
|
|
7
|
-
export declare const createHyperlinkPlugin: (sdk: FieldExtensionSDK) => RichTextPlugin;
|
|
8
|
-
export {};
|
|
1
|
+
export { ToolbarHyperlinkButton } from './components/ToolbarHyperlinkButton';
|
|
2
|
+
export { createHyperlinkPlugin } from './createHyperlinkPlugin';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FieldExtensionSDK, Link, Entry, Asset, ScheduledAction } from '@contentful/app-sdk';
|
|
2
|
+
import { entityHelpers } from '@contentful/field-editor-shared';
|
|
3
|
+
export declare type FetchedEntityData = {
|
|
4
|
+
jobs: ScheduledAction[];
|
|
5
|
+
entity: Entry | Asset;
|
|
6
|
+
entityTitle: string;
|
|
7
|
+
entityDescription: string;
|
|
8
|
+
entityStatus: ReturnType<typeof entityHelpers.getEntryStatus>;
|
|
9
|
+
contentTypeName: string;
|
|
10
|
+
};
|
|
11
|
+
export declare type EntityInfoProps = {
|
|
12
|
+
target: Link;
|
|
13
|
+
sdk: FieldExtensionSDK;
|
|
14
|
+
onEntityFetchComplete?: VoidFunction;
|
|
15
|
+
};
|
|
16
|
+
export declare function useEntityInfo(props: EntityInfoProps): string;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { NodeEntry, Node } from 'slate';
|
|
2
2
|
import { RichTextEditor } from '../../types';
|
|
3
|
+
import { FetchedEntityData } from './useEntityInfo';
|
|
3
4
|
export declare const hasText: (editor: RichTextEditor, entry: NodeEntry<Node>) => boolean;
|
|
5
|
+
export declare function getEntityInfo(data?: FetchedEntityData): string;
|
package/dist/test-utils/jsx.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Add items as needed. Don't forget to adjust hyperscript.d.ts
|
|
5
5
|
*/
|
|
6
|
-
export declare const jsx: <S extends "
|
|
6
|
+
export declare const jsx: <S extends "selection" | "text" | "element" | "editor" | "focus" | "anchor" | "cursor" | "fragment">(tagName: S, attributes?: Object | undefined, ...children: any[]) => ReturnType<({
|
|
7
7
|
anchor: typeof import("slate-hyperscript/dist/creators").createAnchor;
|
|
8
8
|
cursor: typeof import("slate-hyperscript/dist/creators").createCursor;
|
|
9
9
|
editor: (tagName: string, attributes: {
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ContentEntityType as EntityType } from '@contentful/field-editor-reference/dist/types';
|
|
2
|
-
import { FieldExtensionSDK } from '@contentful/field-editor-shared';
|
|
3
|
-
interface EntryAssetTooltipProps {
|
|
4
|
-
id: string;
|
|
5
|
-
type: EntityType;
|
|
6
|
-
sdk: FieldExtensionSDK;
|
|
7
|
-
}
|
|
8
|
-
export declare function EntryAssetTooltip({ id, type, sdk }: EntryAssetTooltipProps): JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function truncate(str: string, length: number): string;
|