@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.
@@ -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,5 @@
1
+ interface ToolbarHyperlinkButtonProps {
2
+ isDisabled: boolean | undefined;
3
+ }
4
+ export declare function ToolbarHyperlinkButton(props: ToolbarHyperlinkButtonProps): JSX.Element | null;
5
+ 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 {};
@@ -0,0 +1,4 @@
1
+ export declare const styles: {
2
+ hyperlinkWrapper: string;
3
+ hyperlink: string;
4
+ };
@@ -0,0 +1,3 @@
1
+ import { FieldExtensionSDK } from '@contentful/app-sdk';
2
+ import { RichTextPlugin } from '../../types';
3
+ export declare const createHyperlinkPlugin: (sdk: FieldExtensionSDK) => RichTextPlugin;
@@ -1,8 +1,2 @@
1
- import { FieldExtensionSDK } from '@contentful/app-sdk';
2
- import { RichTextPlugin } from '../../types';
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;
@@ -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 "editor" | "text" | "selection" | "element" | "focus" | "anchor" | "cursor" | "fragment">(tagName: S, attributes?: Object | undefined, ...children: any[]) => ReturnType<({
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-rich-text",
3
- "version": "2.0.0-next.20",
3
+ "version": "2.0.0-next.21",
4
4
  "publishConfig": {
5
5
  "tag": "next"
6
6
  },
@@ -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;