@prismicio/editor-fields 0.4.50 → 0.4.52-jp-onboarding-guide-triggers.1
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/EditorConfig.d.ts +9 -9
- package/dist/GroupEditor.d.ts +2 -2
- package/dist/SliceSelection.d.ts +4 -4
- package/dist/core/MediaLibrary/components/MediaLibraryContext.d.ts +4 -4
- package/dist/core/MediaLibrary/components/MediaLibraryToast.d.ts +7 -7
- package/dist/core/MediaLibrary/components/MediaList.d.ts +2 -2
- package/dist/core/MediaLibrary/components/NewMediaLibraryFeaturesBanner.d.ts +2 -2
- package/dist/core/MediaLibrary/components/Sidepane/components/SidepaneContainer.d.ts +2 -2
- package/dist/core/MediaLibrary/components/Sidepane/components/SidepaneMetadataTags/SingleMediaMetadataTags.d.ts +2 -2
- package/dist/core/MediaLibrary/hooks/mediaLibraryData.d.ts +9 -9
- package/dist/core/MediaLibrary/hooks/uploadersData.d.ts +2 -2
- package/dist/core/MediaLibrary/hooks/useMediaLibraryAnalytics.d.ts +4 -4
- package/dist/core/MediaLibrary/hooks/useMediaLibraryCacheInvalidation.d.ts +2 -2
- package/dist/core/MediaLibrary/hooks/useMediaLibraryUpload.d.ts +6 -6
- package/dist/core/MediaLibrary/hooks/useSelectedMedia.d.ts +1 -1
- package/dist/core/OnboardingGuide/OnboardingGuide.d.ts +6 -3
- package/dist/core/OnboardingGuide/components/OnboardingCard.d.ts +3 -2
- package/dist/core/OnboardingGuide/components/OnboardingProgressStepper.d.ts +3 -2
- package/dist/core/OnboardingGuide/components/OnboardingStepDialog.d.ts +3 -2
- package/dist/core/OnboardingGuide/content.d.ts +1 -1
- package/dist/core/SelectionManager/SelectionManagerTypes.d.ts +8 -8
- package/dist/core/UID.d.ts +6 -6
- package/dist/core/UnsplashLibrary/UnsplashLibrary.d.ts +2 -2
- package/dist/core/document.d.ts +2 -2
- package/dist/core/imageUtils.d.ts +4 -4
- package/dist/core/service/document.d.ts +11 -11
- package/dist/core/service/onboarding.d.ts +4 -2
- package/dist/fields/ImageField/Components/ImageAltControl.d.ts +2 -2
- package/dist/fields/ImageField/Components/ImageFieldTitle.d.ts +2 -2
- package/dist/fields/ImageField/CropperDialog/CropperDialog.d.ts +3 -3
- package/dist/fields/ImageField/CropperDialog/croppedImage.d.ts +10 -10
- package/dist/fields/ImageField/MediaDialog/MediaDialog.d.ts +2 -2
- package/dist/fields/ImageField/useImageField.d.ts +2 -2
- package/dist/fields/IntegrationField/IntegrationInput.d.ts +6 -6
- package/dist/fields/IntegrationField/integrationData.d.ts +4 -4
- package/dist/fields/LinkField/Documents/DocumentsModal.d.ts +4 -4
- package/dist/fields/LinkField/Documents/Filters.d.ts +6 -6
- package/dist/fields/LinkField/LinkDescriptionCard.d.ts +2 -2
- package/dist/fields/LinkField/LinkField.d.ts +7 -7
- package/dist/fields/LinkField/LinkImageCard.d.ts +2 -2
- package/dist/fields/LinkField/useLinkField.d.ts +2 -2
- package/dist/fields/RichTextField/BubbleMenu/Label/LabelItems.d.ts +2 -2
- package/dist/fields/RichTextField/BubbleMenu/Link/DocumentDescriptionCard.d.ts +2 -2
- package/dist/fields/RichTextField/BubbleMenu/Link/LinkItems.d.ts +2 -2
- package/dist/fields/RichTextField/BubbleMenu/Link/LinkPopover.d.ts +4 -4
- package/dist/fields/RichTextField/BubbleMenu/Link/SetMediaLinkModal.d.ts +2 -2
- package/dist/fields/RichTextField/BubbleMenu/Link/SetWebLinkModal.d.ts +2 -2
- package/dist/fields/RichTextField/BubbleMenu/MarkItems.d.ts +2 -2
- package/dist/fields/RichTextField/BubbleMenu/NodeItems.d.ts +2 -2
- package/dist/fields/RichTextField/coreExtensions/ListItem.d.ts +2 -2
- package/dist/fields/RichTextField/extensions/Label/Label.d.ts +4 -4
- package/dist/fields/RichTextField/extensions/Label/LabelModel.d.ts +2 -2
- package/dist/fields/RichTextField/extensions/Link/LinkModel.d.ts +11 -11
- package/dist/fields/RichTextField/globalExtensions/TextDirection.d.ts +2 -2
- package/dist/fields/RichTextField/models/RichTextConfig.d.ts +2 -2
- package/dist/index.cjs.js +31 -32
- package/dist/index.es.js +2802 -2791
- package/dist/slices/LegacySliceEditor.d.ts +2 -2
- package/dist/slices/utils.d.ts +1 -1
- package/dist/zones/Components/LegacyCustomLabelSelect.d.ts +2 -2
- package/dist/zones/NonRepeatableZoneEditor.d.ts +2 -2
- package/dist/zones/SliceZoneEditor.d.ts +2 -2
- package/package.json +4 -4
|
@@ -2,18 +2,20 @@
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { type AuthStrategy } from "../../EditorConfig";
|
|
4
4
|
export interface OnboardingStep {
|
|
5
|
-
id:
|
|
5
|
+
id: OnboardingStepId;
|
|
6
6
|
title: string;
|
|
7
7
|
description: string;
|
|
8
8
|
content?: JSX.Element;
|
|
9
9
|
videoUrl?: string;
|
|
10
10
|
defaultCompleted?: boolean;
|
|
11
11
|
}
|
|
12
|
+
export declare const OnboardingStepId: z.ZodEnum<["createPrismicProject", "chooseLocale", "createProject", "setupSliceMachine", "createPageType", "codePage", "createSlice", "reviewAndPush", "createContent", "renderPage"]>;
|
|
13
|
+
export type OnboardingStepId = z.infer<typeof OnboardingStepId>;
|
|
12
14
|
export declare const onboardingStateSchema: z.ZodObject<{
|
|
13
15
|
completedSteps: z.ZodArray<z.ZodString, "many">;
|
|
14
16
|
isDismissed: z.ZodBoolean;
|
|
15
17
|
context: z.ZodObject<{
|
|
16
|
-
framework: z.
|
|
18
|
+
framework: z.ZodEffects<z.ZodEnum<["next", "nuxt", "sveltekit", "other"]>, "next" | "nuxt" | "sveltekit" | "other", unknown>;
|
|
17
19
|
starterId: z.ZodNullable<z.ZodString>;
|
|
18
20
|
}, "strip", z.ZodTypeAny, {
|
|
19
21
|
framework: "next" | "nuxt" | "sveltekit" | "other";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import type { CropperImage } from "../../../core/imageUtils";
|
|
3
3
|
import { type CroppedImage } from "./croppedImage";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
type CropperDialogProps = {
|
|
5
|
+
trigger: React.ReactNode;
|
|
6
6
|
/** Flattened list of all thumbnails in the field */
|
|
7
7
|
initialImages: CropperImage[];
|
|
8
8
|
/** Index of the initial image displayed in the cropper */
|
|
@@ -10,7 +10,7 @@ interface CropperDialogProps {
|
|
|
10
10
|
onClose: (result: {
|
|
11
11
|
croppedImages: CroppedImages;
|
|
12
12
|
option: number;
|
|
13
|
-
|
|
13
|
+
}) => void;
|
|
14
14
|
renderTooltip: (trigger: ReactNode) => ReactNode;
|
|
15
15
|
}
|
|
16
16
|
export declare function CropperDialog(props: CropperDialogProps): JSX.Element;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { type ImageContent, type ImageContentView } from "@prismicio/types-internal/lib/content";
|
|
2
2
|
import type { Image } from "@prismicio/types-internal/lib/customtypes";
|
|
3
3
|
import { type ImageBlockData } from "../../../core/imageUtils";
|
|
4
|
-
export
|
|
5
|
-
|
|
4
|
+
export type Point = {
|
|
5
|
+
x: number;
|
|
6
6
|
y: number;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
9
|
-
|
|
8
|
+
export type Size = {
|
|
9
|
+
width: number;
|
|
10
10
|
height: number;
|
|
11
11
|
}
|
|
12
|
-
export
|
|
13
|
-
|
|
12
|
+
export type CropArea = {
|
|
13
|
+
x: number;
|
|
14
14
|
y: number;
|
|
15
15
|
width: number;
|
|
16
16
|
height: number;
|
|
17
17
|
}
|
|
18
|
-
export
|
|
19
|
-
|
|
18
|
+
export type CroppedImage = {
|
|
19
|
+
zoom: number;
|
|
20
20
|
/** x coordinate of the crop rect on the original image */
|
|
21
21
|
x: number;
|
|
22
22
|
/** y coordinate of the crop rect on the original image */
|
|
@@ -42,8 +42,8 @@ interface UpdateImageMainThumbnailArgs<T> {
|
|
|
42
42
|
croppedImage: CroppedImage;
|
|
43
43
|
}
|
|
44
44
|
export declare function updateImageMainThumbnail<T extends ImageContent | ImageBlockData>(args: UpdateImageMainThumbnailArgs<T>): T;
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
type BuildCropUrlArgs = {
|
|
46
|
+
origin: ImageContent["origin"];
|
|
47
47
|
/** Image crop parameters */
|
|
48
48
|
croppedImage: CroppedImage;
|
|
49
49
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type MediaAssetType } from "@prismicio/editor-ui";
|
|
3
3
|
import { type MediaAssetOrExternalImage } from "../../../core/MediaLibrary/hooks/mediaLibraryData";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
type MediaDialogProps = {
|
|
5
|
+
assetType: MediaAssetType;
|
|
6
6
|
open: boolean;
|
|
7
7
|
onOpenChange: (open: boolean) => void;
|
|
8
8
|
onMediaSelected: (media: MediaAssetOrExternalImage) => void;
|
|
@@ -2,8 +2,8 @@ import type { ImageContent } from "@prismicio/types-internal/lib/content";
|
|
|
2
2
|
import type { Image } from "@prismicio/types-internal/lib/customtypes";
|
|
3
3
|
import type { MediaAssetOrExternalImage } from "../../core/MediaLibrary/hooks/mediaLibraryData";
|
|
4
4
|
import type { CroppedImages } from "./CropperDialog";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
type useImageFieldProps = {
|
|
6
|
+
content: ImageContent | undefined;
|
|
7
7
|
field: Image;
|
|
8
8
|
onContentChange: (content: ImageContent | undefined) => void;
|
|
9
9
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IntegrationField as IntegrationFieldT } from "@prismicio/types-internal/lib/customtypes";
|
|
3
3
|
import { type IntegrationItem } from "./integrationData";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
type IntegrationSharedInputProps = {
|
|
5
|
+
id: string;
|
|
6
6
|
field: IntegrationFieldT;
|
|
7
7
|
readOnly: boolean;
|
|
8
8
|
onFocus: () => void;
|
|
9
9
|
onClearItem: () => void;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
type IntegrationInputProps = IntegrationSharedInputProps & {
|
|
12
|
+
catalogId: string;
|
|
13
13
|
itemId?: string;
|
|
14
14
|
item?: IntegrationItem;
|
|
15
15
|
}
|
|
16
16
|
export declare function IntegrationInput(props: IntegrationInputProps): JSX.Element;
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
type IntegrationFooterProps = {
|
|
18
|
+
catalogId: string;
|
|
19
19
|
itemId?: string;
|
|
20
20
|
item?: IntegrationItem;
|
|
21
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type IntegrationCatalogSearchArgs = {
|
|
3
|
+
searchTerm: string;
|
|
4
4
|
catalogId: string;
|
|
5
5
|
}
|
|
6
6
|
export declare function useIntegrationCatalogSearch(args: IntegrationCatalogSearchArgs): {
|
|
@@ -40,8 +40,8 @@ declare const integrationItem: z.ZodObject<{
|
|
|
40
40
|
description?: string | undefined;
|
|
41
41
|
}>;
|
|
42
42
|
export type IntegrationItem = z.TypeOf<typeof integrationItem>;
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
type IntegrationCatalogReadArgs = {
|
|
44
|
+
catalogId: string;
|
|
45
45
|
itemId: string;
|
|
46
46
|
}
|
|
47
47
|
export declare function useIntegrationCatalogRead(args: IntegrationCatalogReadArgs): {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type FilterOption } from "@prismicio/editor-ui";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type DocumentsModalProps = {
|
|
4
|
+
open: boolean;
|
|
5
5
|
onOpenChange: (open: boolean) => void;
|
|
6
6
|
onSelectDocument: (documentID: string) => void;
|
|
7
7
|
fixedCustomTypes?: Set<string>;
|
|
8
8
|
fixedTags?: Set<string>;
|
|
9
9
|
}
|
|
10
10
|
export declare function DocumentsModal(props: DocumentsModalProps): JSX.Element;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
type SortTagsByFilteredTagsArgs = {
|
|
12
|
+
tagsFilter: Set<FilterOption>;
|
|
13
13
|
tags: string[];
|
|
14
14
|
}
|
|
15
15
|
export declare function sortTagsByFilteredTags(args: SortTagsByFilteredTagsArgs): string[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type FilterOption } from "@prismicio/editor-ui";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type DocumentsListFiltersProps = {
|
|
4
|
+
filteredLocales: Set<FilterOption>;
|
|
5
5
|
setFilteredLocales: (newValue: Set<FilterOption>) => void;
|
|
6
6
|
filteredTags: Set<FilterOption>;
|
|
7
7
|
setFilteredTags: (newValue: Set<FilterOption>) => void;
|
|
@@ -11,8 +11,8 @@ interface DocumentsListFiltersProps {
|
|
|
11
11
|
fixedTags?: Set<string>;
|
|
12
12
|
}
|
|
13
13
|
export declare function DocumentsListFilters(props: DocumentsListFiltersProps): JSX.Element;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
type FilterProps = {
|
|
15
|
+
onSelectedValuesChange: (selectedValues: Set<FilterOption>) => void;
|
|
16
16
|
fixedSelectedValues?: Set<FilterOption>;
|
|
17
17
|
selectedValues: Set<FilterOption>;
|
|
18
18
|
label: string;
|
|
@@ -21,8 +21,8 @@ interface FilterProps {
|
|
|
21
21
|
multiple?: boolean;
|
|
22
22
|
}
|
|
23
23
|
export declare function Filter(props: FilterProps): JSX.Element;
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
type LocalesFilterProps = {
|
|
25
|
+
selectedValues: Set<FilterOption>;
|
|
26
26
|
onSelectedValuesChange: (selectedValues: Set<FilterOption>) => void;
|
|
27
27
|
}
|
|
28
28
|
export declare function LocalesFilter(props: LocalesFilterProps): JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type IconName } from "@prismicio/editor-ui";
|
|
3
|
-
export
|
|
4
|
-
|
|
3
|
+
export type LinkDescriptionCardProps = {
|
|
4
|
+
url?: URL | string;
|
|
5
5
|
title?: string;
|
|
6
6
|
subTitle?: string;
|
|
7
7
|
description?: string;
|
|
@@ -2,26 +2,26 @@
|
|
|
2
2
|
import { FilledLinkContent, type LinkContent } from "@prismicio/types-internal/lib/content";
|
|
3
3
|
import type { Link } from "@prismicio/types-internal/lib/customtypes";
|
|
4
4
|
import { type FieldSelectType } from "./LinkFieldActions";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
type LinkFieldProps = {
|
|
6
|
+
id?: string;
|
|
7
7
|
field: Link;
|
|
8
8
|
content: LinkContent | undefined;
|
|
9
9
|
condensedButtons?: boolean;
|
|
10
10
|
onContentChange: (content: LinkContent | undefined) => void;
|
|
11
11
|
}
|
|
12
12
|
export declare function LinkField(props: LinkFieldProps): JSX.Element;
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
type GetFieldIconArgs = {
|
|
14
|
+
selectType?: FieldSelectType;
|
|
15
15
|
displayTextEnabled?: boolean;
|
|
16
16
|
}
|
|
17
17
|
export declare function getFieldIcon(args: GetFieldIconArgs): "image" | "description" | "link" | "notes" | "public";
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
type FilledLinkFieldProps = {
|
|
19
|
+
id?: string;
|
|
20
20
|
condensedButtons?: boolean;
|
|
21
21
|
field: Link & {
|
|
22
22
|
config?: {
|
|
23
23
|
allowText?: false;
|
|
24
|
-
|
|
24
|
+
};
|
|
25
25
|
};
|
|
26
26
|
content: FilledLinkContent | undefined;
|
|
27
27
|
onContentChange: (content: FilledLinkContent | undefined) => void;
|
|
@@ -10,8 +10,8 @@ interface useLinkFieldParams {
|
|
|
10
10
|
onContentChange: (content: LinkContent | undefined) => void;
|
|
11
11
|
}
|
|
12
12
|
export declare function useLinkField(params: useLinkFieldParams): {
|
|
13
|
-
contentType: "
|
|
14
|
-
selectType: "document" | "
|
|
13
|
+
contentType: "ImageLink" | "FileLink" | "DocumentLink" | "ExternalLink" | "MediaLink" | "AnyLink" | undefined;
|
|
14
|
+
selectType: "document" | "web" | "media" | "any" | undefined;
|
|
15
15
|
fieldValue: string;
|
|
16
16
|
onDisplayTextChange: (displayText: string) => void;
|
|
17
17
|
onValueChange: (value: string, newTab?: boolean) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { Editor } from "@tiptap/core";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type NodeItemsProps = {
|
|
4
|
+
labels: string[];
|
|
5
5
|
editor: Editor;
|
|
6
6
|
}
|
|
7
7
|
export declare function LabelItems(props: NodeItemsProps): JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { Editor } from "@tiptap/core";
|
|
3
3
|
import type { Modal } from "../BubbleMenu";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
type LinkItemsProps = {
|
|
5
|
+
editor: Editor;
|
|
6
6
|
setModal: (modal: Modal) => void;
|
|
7
7
|
}
|
|
8
8
|
export declare function LinkItems(props: LinkItemsProps): JSX.Element;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { Editor } from "@tiptap/core";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type LinkPopoverProps = {
|
|
4
|
+
editor: Editor;
|
|
5
5
|
onEditWebLink: () => void;
|
|
6
6
|
onEditDocumentLink: () => void;
|
|
7
7
|
onEditMediaLink: () => void;
|
|
8
8
|
}
|
|
9
9
|
export declare function LinkPopover(props: LinkPopoverProps): JSX.Element | null;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
type DocumentLinkPopoverProps = {
|
|
11
|
+
editor: Editor;
|
|
12
12
|
onEditDocumentLink: () => void;
|
|
13
13
|
docId: string;
|
|
14
14
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { Editor } from "@tiptap/core";
|
|
3
3
|
import type { MenuItem } from "../models/MenuItems";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
type MarkItemsProps = {
|
|
5
|
+
items: MenuItem[];
|
|
6
6
|
editor: Editor;
|
|
7
7
|
}
|
|
8
8
|
export declare function MarkItems(props: MarkItemsProps): JSX.Element | null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { Editor } from "@tiptap/core";
|
|
3
3
|
import type { MenuItem } from "../models/MenuItems";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
type NodeItemsProps = {
|
|
5
|
+
items: MenuItem[];
|
|
6
6
|
editor: Editor;
|
|
7
7
|
}
|
|
8
8
|
export declare function NodeItems(props: NodeItemsProps): JSX.Element | null;
|
|
@@ -3,7 +3,7 @@ declare const _default: {
|
|
|
3
3
|
component: import("@tiptap/core").Node<import("@tiptap/extension-list-item").ListItemOptions, any>;
|
|
4
4
|
converter: {
|
|
5
5
|
fromPrismic(schema: Schema<any, any>): (list: {
|
|
6
|
-
type: "image" | "em" | "embed" | "strong" | "
|
|
6
|
+
type: "image" | "em" | "embed" | "strong" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
|
|
7
7
|
content: {
|
|
8
8
|
text: string;
|
|
9
9
|
} & {
|
|
@@ -64,7 +64,7 @@ declare const _default: {
|
|
|
64
64
|
direction?: string | undefined;
|
|
65
65
|
}) => ProsemirrorNode | undefined;
|
|
66
66
|
toPrismic(node: ProsemirrorNode, nodeType: "list-item" | "o-list-item"): readonly ({
|
|
67
|
-
type: "image" | "em" | "embed" | "strong" | "
|
|
67
|
+
type: "image" | "em" | "embed" | "strong" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
|
|
68
68
|
content: {
|
|
69
69
|
text: string;
|
|
70
70
|
} & {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { LabelExtension } from "./LabelModel";
|
|
2
|
-
export
|
|
3
|
-
|
|
2
|
+
export type LabelProtocolOptions = {
|
|
3
|
+
scheme: string;
|
|
4
4
|
optionalSlashes?: boolean;
|
|
5
5
|
}
|
|
6
|
-
export
|
|
7
|
-
|
|
6
|
+
export type LabelOptions = {
|
|
7
|
+
/** These are the values passed into the HTML through the Tiptap extension. */
|
|
8
8
|
htmlAttributes: Record<string, any>;
|
|
9
9
|
}
|
|
10
10
|
declare module "@tiptap/core" {
|
|
@@ -16,8 +16,8 @@ export declare class LabelExtension {
|
|
|
16
16
|
toPrismic(elmt: ProsemirrorMark): LabelElementData;
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
export
|
|
20
|
-
|
|
19
|
+
export type LabelElement = {
|
|
20
|
+
type: "label";
|
|
21
21
|
start: number;
|
|
22
22
|
end: number;
|
|
23
23
|
data: LabelElementData;
|
|
@@ -16,15 +16,15 @@ export declare class LinkExtension {
|
|
|
16
16
|
toPrismic(elmt: ProsemirrorMark): LinkElementData;
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
export
|
|
20
|
-
|
|
19
|
+
export type LinkElement = {
|
|
20
|
+
type: "hyperlink";
|
|
21
21
|
start: number;
|
|
22
22
|
end: number;
|
|
23
23
|
data: LinkElementData;
|
|
24
24
|
}
|
|
25
25
|
export type LinkElementData = ImageLinkData | FileLinkData | DocumentLinkData | ExternalLinkData;
|
|
26
|
-
export
|
|
27
|
-
|
|
26
|
+
export type ImageLinkData = {
|
|
27
|
+
__TYPE__: "ImageLink";
|
|
28
28
|
id: string;
|
|
29
29
|
url: string;
|
|
30
30
|
height: string;
|
|
@@ -34,8 +34,8 @@ export interface ImageLinkData {
|
|
|
34
34
|
kind: string;
|
|
35
35
|
date?: string | null | undefined;
|
|
36
36
|
}
|
|
37
|
-
export
|
|
38
|
-
|
|
37
|
+
export type FileLinkData = {
|
|
38
|
+
__TYPE__: "FileLink";
|
|
39
39
|
id: string;
|
|
40
40
|
url: string;
|
|
41
41
|
name: string;
|
|
@@ -43,17 +43,17 @@ export interface FileLinkData {
|
|
|
43
43
|
size: string;
|
|
44
44
|
date?: string | null | undefined;
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
type DocumentLinkData = {
|
|
47
|
+
__TYPE__: "DocumentLink";
|
|
48
48
|
id: string;
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
type ExternalLinkData = {
|
|
51
|
+
__TYPE__: "ExternalLink";
|
|
52
52
|
url: string;
|
|
53
53
|
kind?: "web";
|
|
54
54
|
target?: string | null | undefined;
|
|
55
55
|
preview?: {
|
|
56
56
|
title?: string;
|
|
57
|
-
|
|
57
|
+
} | null | undefined;
|
|
58
58
|
}
|
|
59
59
|
export {};
|
|
@@ -4,8 +4,8 @@ import type { Node as ProsemirrorNode } from "prosemirror-model";
|
|
|
4
4
|
export type Direction = "ltr" | "rtl";
|
|
5
5
|
export declare const leftToRight: Direction;
|
|
6
6
|
export declare const rightToLeft: Direction;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
type TextDirectionOptions = {
|
|
8
|
+
supportedExtensionNames: string[];
|
|
9
9
|
}
|
|
10
10
|
export declare const attrName = "dir";
|
|
11
11
|
declare module "@tiptap/core" {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RichTextConfig, type RichTextNodeType } from "@prismicio/types-internal/lib/customtypes";
|
|
2
2
|
import { type WidgetExtension } from "./EditorExtension";
|
|
3
3
|
export declare function composeExtensions(config?: RichTextConfig): Extensions;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
type Extensions = {
|
|
5
|
+
extensions: WidgetExtension[];
|
|
6
6
|
nodeTypes: Set<RichTextNodeType>;
|
|
7
7
|
}
|
|
8
8
|
export {};
|