@prismicio/editor-fields 0.2.0 → 0.3.0
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/DocumentEditor.d.ts +6 -6
- package/dist/GroupEditor.d.ts +2 -1
- package/dist/NestableWidgetSwitch.d.ts +1 -1
- package/dist/SectionEditor.d.ts +5 -5
- package/dist/fields/BooleanField.d.ts +1 -1
- package/dist/fields/DateField.d.ts +4 -4
- package/dist/{domain/fields/ImageField/CroppedImage.d.ts → fields/ImageField/CroppedDialog/croppedImage.d.ts} +3 -3
- package/dist/fields/ImageField/{CropperDialog.d.ts → CroppedDialog/index.d.ts} +3 -3
- package/dist/{domain/fields/ImageField/ExternalImage.d.ts → fields/ImageField/MediaPicker/externalImage.d.ts} +1 -2
- package/dist/fields/ImageField/MediaPicker/index.d.ts +8 -1
- package/dist/{domain/fields/ImageField/ImageField.d.ts → fields/ImageField/imageField.d.ts} +1 -2
- package/dist/fields/ImageField/index.d.ts +12 -1
- package/dist/fields/KeyTextField.d.ts +5 -5
- package/dist/fields/LinkField/index.d.ts +12 -1
- package/dist/fields/NumberField.d.ts +2 -2
- package/dist/fields/RichTextField/RichTextField.d.ts +1 -1
- package/dist/fields/RichTextField/coreExtensions/ListItem.d.ts +4 -4
- package/dist/fields/RichTextField/coreExtensions/Placeholder.d.ts +1 -1
- package/dist/fields/RichTextField/coreExtensions/Text.d.ts +1 -1
- package/dist/fields/RichTextField/coreExtensions/index.d.ts +1 -1
- package/dist/fields/RichTextField/extensions/Heading.d.ts +1 -1
- package/dist/fields/RichTextField/extensions/Link.d.ts +3 -2
- package/dist/fields/RichTextField/extensions/index.d.ts +1 -1
- package/dist/fields/RichTextField/globalExtensions/TextDirection.d.ts +1 -1
- package/dist/fields/RichTextField/models/EditorExtension.d.ts +2 -3
- package/dist/fields/RichTextField/models/MenuItems.d.ts +1 -1
- package/dist/fields/RichTextField/models/RichTextConfig.d.ts +1 -1
- package/dist/fields/RichTextField/models/Span.d.ts +2 -2
- package/dist/fields/SelectField.d.ts +2 -2
- package/dist/fields/utils.d.ts +6 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.es.js +30784 -28598
- package/dist/index.umd.js +39 -39
- package/dist/slices/CompositeSliceEditor.d.ts +3 -3
- package/dist/slices/LegacySliceEditor.d.ts +4 -4
- package/dist/slices/SharedSliceEditor.d.ts +1 -1
- package/dist/zones/NonRepeatableZoneEditor.d.ts +6 -4
- package/dist/zones/RepeatableZoneEditor.d.ts +4 -4
- package/dist/zones/SliceZoneEditor.d.ts +5 -5
- package/dist/zones/StaticZone.d.ts +4 -0
- package/dist/zones/StaticZoneEditor.d.ts +3 -3
- package/package.json +26 -29
- package/dist/domain/Document.d.ts +0 -8
- package/dist/domain/Field.d.ts +0 -6
- package/dist/domain/Group.d.ts +0 -7
- package/dist/domain/NestableWidget.d.ts +0 -11
- package/dist/domain/Section.d.ts +0 -10
- package/dist/domain/SharedSlices.d.ts +0 -3
- package/dist/domain/StaticWidget.d.ts +0 -7
- package/dist/domain/Widget.d.ts +0 -9
- package/dist/domain/slices/CompositeSlice.d.ts +0 -6
- package/dist/domain/slices/LegacySlice.d.ts +0 -2
- package/dist/domain/slices/SharedSlice.d.ts +0 -9
- package/dist/domain/zones/NonRepeatableZone.d.ts +0 -5
- package/dist/domain/zones/RepeatableZone.d.ts +0 -6
- package/dist/domain/zones/SliceZone.d.ts +0 -5
- package/dist/domain/zones/StaticZone.d.ts +0 -6
- package/dist/fields/ImageField/ImageField.d.ts +0 -12
- package/dist/fields/ImageField/MediaPicker/MediaPicker.d.ts +0 -8
- package/dist/fields/LinkField/LinkField.d.ts +0 -12
package/dist/DocumentEditor.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { Document } from "@prismicio/types-internal/lib/content";
|
|
2
|
+
import { type CustomType, type SharedSlice } from "@prismicio/types-internal/lib/customtypes";
|
|
2
3
|
import { type FC } from "react";
|
|
3
4
|
import { DocumentEditorConfig } from "./DocumentEditorConfig";
|
|
4
|
-
|
|
5
|
-
import { type SharedSlices } from "./domain/SharedSlices";
|
|
5
|
+
declare type SharedSlices = Readonly<Record<string, SharedSlice>>;
|
|
6
6
|
declare type DocumentEditorProps = Readonly<{
|
|
7
|
-
content:
|
|
8
|
-
customType:
|
|
9
|
-
onContentChange: (content:
|
|
7
|
+
content: Document;
|
|
8
|
+
customType: CustomType;
|
|
9
|
+
onContentChange: (content: Document) => void;
|
|
10
10
|
readOnly?: boolean;
|
|
11
11
|
sectionName: string | undefined;
|
|
12
12
|
sharedSlices: SharedSlices;
|
package/dist/GroupEditor.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GroupContent } from "@prismicio/types-internal/lib/content";
|
|
2
|
-
import type { Group } from "@prismicio/types-internal/lib/customtypes
|
|
2
|
+
import type { Group } from "@prismicio/types-internal/lib/customtypes";
|
|
3
3
|
import type { FC } from "react";
|
|
4
4
|
declare type GroupEditorProps = Readonly<{
|
|
5
5
|
content: GroupContent | undefined;
|
|
@@ -9,4 +9,5 @@ declare type GroupEditorProps = Readonly<{
|
|
|
9
9
|
readOnly: boolean;
|
|
10
10
|
}>;
|
|
11
11
|
export declare const GroupEditor: FC<GroupEditorProps>;
|
|
12
|
+
export declare function getGroupLabel(group: Group): string;
|
|
12
13
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NestableContent } from "@prismicio/types-internal/lib/content";
|
|
2
|
-
import type { NestableWidget } from "@prismicio/types-internal/lib/customtypes
|
|
2
|
+
import type { NestableWidget } from "@prismicio/types-internal/lib/customtypes";
|
|
3
3
|
import type { FC } from "react";
|
|
4
4
|
declare type NestableWidgetSwitchProps = Readonly<{
|
|
5
5
|
content: NestableContent | undefined;
|
package/dist/SectionEditor.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type Document } from "@prismicio/types-internal/lib/content";
|
|
2
|
+
import type { StaticSection } from "@prismicio/types-internal/lib/customtypes";
|
|
2
3
|
import { type FC } from "react";
|
|
3
|
-
import { type SectionContent } from "./domain/Section";
|
|
4
4
|
declare type SectionEditorProps = Readonly<{
|
|
5
|
-
content: SectionContent;
|
|
6
5
|
id: string;
|
|
7
|
-
onContentChange: (content: SectionContent) => void;
|
|
8
6
|
readOnly: boolean;
|
|
9
|
-
section:
|
|
7
|
+
section: StaticSection;
|
|
8
|
+
content: Document;
|
|
9
|
+
onContentChange: (content: Document) => void;
|
|
10
10
|
}>;
|
|
11
11
|
export declare const SectionEditor: FC<SectionEditorProps>;
|
|
12
12
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BooleanContent } from "@prismicio/types-internal/lib/content";
|
|
2
|
-
import type { BooleanField as BooleanT } from "@prismicio/types-internal/lib/customtypes
|
|
2
|
+
import type { BooleanField as BooleanT } from "@prismicio/types-internal/lib/customtypes";
|
|
3
3
|
import type { FC } from "react";
|
|
4
4
|
declare type BooleanFieldProps = Readonly<{
|
|
5
5
|
content: BooleanContent | undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { Date as DateT } from "@prismicio/types-internal/lib/customtypes
|
|
1
|
+
import type { DateContent } from "@prismicio/types-internal/lib/content";
|
|
2
|
+
import type { Date as DateT } from "@prismicio/types-internal/lib/customtypes";
|
|
3
3
|
declare type Props = Readonly<{
|
|
4
|
-
content?:
|
|
4
|
+
content?: DateContent;
|
|
5
5
|
field: DateT;
|
|
6
6
|
id: string;
|
|
7
|
-
onContentChange: (content?:
|
|
7
|
+
onContentChange: (content?: DateContent) => void;
|
|
8
8
|
readOnly: boolean;
|
|
9
9
|
}>;
|
|
10
10
|
export declare const DateField: ({ content, field, id, onContentChange, readOnly }: Props) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import { type Thumbnail } from "
|
|
1
|
+
import type { ImageContent, ImageContentView } from "@prismicio/types-internal/lib/content";
|
|
2
|
+
import type { Image } from "@prismicio/types-internal/lib/customtypes";
|
|
3
|
+
import { type Thumbnail } from "../imageField";
|
|
4
4
|
export interface Point {
|
|
5
5
|
x: number;
|
|
6
6
|
y: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ImageContentView } from "@prismicio/types-internal/lib/
|
|
1
|
+
import type { ImageContentView } from "@prismicio/types-internal/lib/content";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
3
|
+
import type { getImageLabel, Thumbnail } from "../imageField";
|
|
4
|
+
import { type CroppedImage } from "./croppedImage";
|
|
5
5
|
export declare type CroppedImages = Record<string, CroppedImage>;
|
|
6
6
|
interface Image {
|
|
7
7
|
thumbnail: Thumbnail;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ImageContent } from "@prismicio/types-internal/lib/content";
|
|
2
|
-
import type { Image } from "@prismicio/types-internal/lib/customtypes
|
|
3
|
-
import type { ImageConstraint } from "@prismicio/types-internal/lib/customtypes/widgets/shared";
|
|
2
|
+
import type { Image, ImageConstraint } from "@prismicio/types-internal/lib/customtypes";
|
|
4
3
|
export interface ExternalImage {
|
|
5
4
|
id: string;
|
|
6
5
|
url: string;
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { FC, ReactNode } from "react";
|
|
2
|
+
import type { ExternalImage } from "./externalImage";
|
|
3
|
+
interface MediaPickerProps {
|
|
4
|
+
trigger: ReactNode;
|
|
5
|
+
onMediaSelected?: (media: ExternalImage) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const MediaPicker: FC<MediaPickerProps>;
|
|
8
|
+
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ImageContent, ImageContentView } from "@prismicio/types-internal/lib/content";
|
|
2
|
-
import type { Image } from "@prismicio/types-internal/lib/customtypes
|
|
3
|
-
import type { ImageConstraint } from "@prismicio/types-internal/lib/customtypes/widgets/shared";
|
|
2
|
+
import type { Image, ImageConstraint } from "@prismicio/types-internal/lib/customtypes";
|
|
4
3
|
export declare type Thumbnail = Readonly<ImageConstraint & {
|
|
5
4
|
name: string;
|
|
6
5
|
}>;
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ImageContent } from "@prismicio/types-internal/lib/content";
|
|
2
|
+
import type { Image } from "@prismicio/types-internal/lib/customtypes";
|
|
3
|
+
import { type FC } from "react";
|
|
4
|
+
interface ImageFieldProps {
|
|
5
|
+
content: ImageContent | undefined;
|
|
6
|
+
field: Image;
|
|
7
|
+
id: string;
|
|
8
|
+
onContentChange: (content: ImageContent | undefined) => void;
|
|
9
|
+
readOnly: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const ImageField: FC<ImageFieldProps>;
|
|
12
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { Text
|
|
1
|
+
import type { TextContent } from "@prismicio/types-internal/lib/content";
|
|
2
|
+
import type { Text } from "@prismicio/types-internal/lib/customtypes";
|
|
3
3
|
import type { FC } from "react";
|
|
4
4
|
declare type KeyTextFieldProps = Readonly<{
|
|
5
|
-
content:
|
|
6
|
-
field:
|
|
5
|
+
content: TextContent | undefined;
|
|
6
|
+
field: Text;
|
|
7
7
|
id: string;
|
|
8
|
-
onContentChange: (content:
|
|
8
|
+
onContentChange: (content: TextContent | undefined) => void;
|
|
9
9
|
readOnly: boolean;
|
|
10
10
|
}>;
|
|
11
11
|
export declare const KeyTextField: FC<KeyTextFieldProps>;
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import type { LinkContent } from "@prismicio/types-internal/lib/content";
|
|
2
|
+
import type { Link } from "@prismicio/types-internal/lib/customtypes";
|
|
3
|
+
import { FC } from "react";
|
|
4
|
+
declare type LinkFieldProps = Readonly<{
|
|
5
|
+
content: LinkContent | undefined;
|
|
6
|
+
field: Link;
|
|
7
|
+
id: string;
|
|
8
|
+
readOnly: boolean;
|
|
9
|
+
onContentChange: (content: LinkContent | undefined) => void;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const LinkField: FC<LinkFieldProps>;
|
|
12
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { Number as NumberT } from "@prismicio/types-internal/lib/customtypes
|
|
1
|
+
import type { NumberContent } from "@prismicio/types-internal/lib/content";
|
|
2
|
+
import type { Number as NumberT } from "@prismicio/types-internal/lib/customtypes";
|
|
3
3
|
import type { FC } from "react";
|
|
4
4
|
declare type NumberFieldProps = Readonly<{
|
|
5
5
|
content: NumberContent | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RichTextContent } from "@prismicio/types-internal/lib/content";
|
|
2
|
-
import type { RichText } from "@prismicio/types-internal/lib/customtypes
|
|
2
|
+
import type { RichText } from "@prismicio/types-internal/lib/customtypes";
|
|
3
3
|
import { type FC } from "react";
|
|
4
4
|
declare type RichTextFieldProps = Readonly<{
|
|
5
5
|
content: RichTextContent | undefined;
|
|
@@ -4,7 +4,7 @@ declare const _default: {
|
|
|
4
4
|
component: import("@tiptap/core").Node<import("@tiptap/extension-list-item").ListItemOptions, any>;
|
|
5
5
|
converter: {
|
|
6
6
|
fromPrismic(schema: Schema<any, any>): (list: {
|
|
7
|
-
type: "
|
|
7
|
+
type: "em" | "embed" | "strong" | "image" | "paragraph" | "list-item" | "o-list-item" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "rtl";
|
|
8
8
|
content: {
|
|
9
9
|
text: string;
|
|
10
10
|
} & {
|
|
@@ -13,7 +13,7 @@ declare const _default: {
|
|
|
13
13
|
} & {
|
|
14
14
|
start: number;
|
|
15
15
|
end: number;
|
|
16
|
-
type: "label" | "
|
|
16
|
+
type: "label" | "em" | "embed" | "strong" | "image" | "paragraph" | "list-item" | "o-list-item" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "rtl";
|
|
17
17
|
})[] | undefined;
|
|
18
18
|
};
|
|
19
19
|
} & {
|
|
@@ -21,7 +21,7 @@ declare const _default: {
|
|
|
21
21
|
direction?: string | undefined;
|
|
22
22
|
}) => ProsemirrorNode | undefined;
|
|
23
23
|
toPrismic(node: ProsemirrorNode, nodeType: "list-item" | "o-list-item"): readonly ({
|
|
24
|
-
type: "
|
|
24
|
+
type: "em" | "embed" | "strong" | "image" | "paragraph" | "list-item" | "o-list-item" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "rtl";
|
|
25
25
|
content: {
|
|
26
26
|
text: string;
|
|
27
27
|
} & {
|
|
@@ -30,7 +30,7 @@ declare const _default: {
|
|
|
30
30
|
} & {
|
|
31
31
|
start: number;
|
|
32
32
|
end: number;
|
|
33
|
-
type: "label" | "
|
|
33
|
+
type: "label" | "em" | "embed" | "strong" | "image" | "paragraph" | "list-item" | "o-list-item" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "rtl";
|
|
34
34
|
})[] | undefined;
|
|
35
35
|
};
|
|
36
36
|
} & {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type ExtensionPlaceholder } from "../models";
|
|
2
|
-
declare const _default: (placeholderByNodeType:
|
|
2
|
+
declare const _default: (placeholderByNodeType: Record<string, ExtensionPlaceholder>) => import("@tiptap/core").Extension<import("@tiptap/extension-placeholder").PlaceholderOptions, any>;
|
|
3
3
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TextBlock } from "@prismicio/types-internal/lib/content";
|
|
2
|
-
import type { RichTextNodeType } from "@prismicio/types-internal/lib/customtypes
|
|
2
|
+
import type { RichTextNodeType } from "@prismicio/types-internal/lib/customtypes";
|
|
3
3
|
import type { Node as ProsemirrorNode, Schema } from "prosemirror-model";
|
|
4
4
|
import type { Direction } from "../globalExtensions/TextDirection";
|
|
5
5
|
declare const EditorText: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type RichText } from "@prismicio/types-internal/lib/customtypes
|
|
1
|
+
import { type RichText } from "@prismicio/types-internal/lib/customtypes";
|
|
2
2
|
import type { Node } from "@tiptap/core";
|
|
3
3
|
import { type NodeExtension } from "../models";
|
|
4
4
|
import { default as Document } from "./Document";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RichTextNodeType } from "@prismicio/types-internal/lib/customtypes
|
|
1
|
+
import { RichTextNodeType } from "@prismicio/types-internal/lib/customtypes";
|
|
2
2
|
import { type Level as TTLevel } from "@tiptap/extension-heading";
|
|
3
3
|
import { type ReadonlyNonEmptyArray } from "fp-ts/ReadonlyNonEmptyArray";
|
|
4
4
|
import type { Node as ProsemirrorNode } from "prosemirror-model";
|
|
@@ -18,12 +18,13 @@ declare const EditorLink: MarkExtension<{
|
|
|
18
18
|
url: string;
|
|
19
19
|
name: string;
|
|
20
20
|
kind: string;
|
|
21
|
+
size: string;
|
|
21
22
|
} & {
|
|
22
23
|
date?: string | null | undefined;
|
|
23
|
-
size?: string | undefined;
|
|
24
24
|
} & {
|
|
25
25
|
__TYPE__: "FileLink";
|
|
26
|
-
|
|
26
|
+
} & {
|
|
27
|
+
size?: string | undefined;
|
|
27
28
|
}) | ({
|
|
28
29
|
__TYPE__: "DocumentLink";
|
|
29
30
|
} & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RichTextNodeType } from "@prismicio/types-internal/lib/customtypes
|
|
1
|
+
import type { RichTextNodeType } from "@prismicio/types-internal/lib/customtypes";
|
|
2
2
|
import type { WidgetExtension } from "../models";
|
|
3
3
|
import { default as Bold } from "./Bold";
|
|
4
4
|
import { default as BulletList } from "./BulletList";
|
|
@@ -28,7 +28,7 @@ declare module "@tiptap/core" {
|
|
|
28
28
|
export declare const richTextNodeType: "rtl";
|
|
29
29
|
export declare const component: Extension<TextDirectionOptions, any>;
|
|
30
30
|
export declare const converter: {
|
|
31
|
-
parseNodeAttrsDirection(attributes:
|
|
31
|
+
parseNodeAttrsDirection(attributes: Record<string, unknown>): Direction;
|
|
32
32
|
fromPrismic(textBlock: TextBlock): {
|
|
33
33
|
[TEXT_DIRECTION_ATTR_NAME]: Direction;
|
|
34
34
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { RichTextContent } from "@prismicio/types-internal/lib/content";
|
|
2
|
-
import type {
|
|
3
|
-
import type { RichTextNodeType } from "@prismicio/types-internal/lib/customtypes/widgets/nestable";
|
|
1
|
+
import type { EmbedBlock, ImageBlock, RichTextContent, TextBlock } from "@prismicio/types-internal/lib/content";
|
|
2
|
+
import type { RichTextNodeType } from "@prismicio/types-internal/lib/customtypes";
|
|
4
3
|
import type { Mark, Node } from "@tiptap/core";
|
|
5
4
|
import type { NonEmptyArray } from "fp-ts/NonEmptyArray";
|
|
6
5
|
import type { ReadonlyNonEmptyArray } from "fp-ts/ReadonlyNonEmptyArray";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RichTextNodeType } from "@prismicio/types-internal/lib/customtypes
|
|
1
|
+
import { RichTextNodeType } from "@prismicio/types-internal/lib/customtypes";
|
|
2
2
|
import type { Editor, Range } from "@tiptap/core";
|
|
3
3
|
import type { ReactNode } from "react";
|
|
4
4
|
export declare type MenuItem = Readonly<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TextBlock } from "@prismicio/types-internal/lib/content";
|
|
2
|
-
import { RichTextConfig } from "@prismicio/types-internal/lib/customtypes
|
|
2
|
+
import { RichTextConfig } from "@prismicio/types-internal/lib/customtypes";
|
|
3
3
|
import type { Node as ProsemirrorNode, Schema } from "prosemirror-model";
|
|
4
4
|
import { type WidgetExtension } from "./EditorExtension";
|
|
5
5
|
declare type TextConverter = (text: TextBlock) => ProsemirrorNode | undefined;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { Span } from "@prismicio/types-internal/lib/
|
|
1
|
+
import type { Span } from "@prismicio/types-internal/lib/content";
|
|
2
2
|
export declare const SpanUtils: {
|
|
3
3
|
groupBy<K extends unknown>(spans: readonly Span[], f: (span: Span) => K): Map<K, readonly ({
|
|
4
4
|
data?: unknown;
|
|
5
5
|
} & {
|
|
6
6
|
start: number;
|
|
7
7
|
end: number;
|
|
8
|
-
type: "label" | "
|
|
8
|
+
type: "label" | "em" | "embed" | "strong" | "image" | "paragraph" | "list-item" | "o-list-item" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "rtl";
|
|
9
9
|
})[]>;
|
|
10
10
|
sort(spans: readonly Span[]): readonly Span[];
|
|
11
11
|
mergeOverlap(spans: readonly Span[]): readonly Span[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { Select as SelectT } from "@prismicio/types-internal/lib/customtypes
|
|
1
|
+
import type { SelectContent } from "@prismicio/types-internal/lib/content";
|
|
2
|
+
import type { Select as SelectT } from "@prismicio/types-internal/lib/customtypes";
|
|
3
3
|
import type { FC } from "react";
|
|
4
4
|
declare type SelectFieldProps = Readonly<{
|
|
5
5
|
content: SelectContent | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { BooleanField, NestableWidget, Separator } from "@prismicio/types-internal/lib/customtypes";
|
|
2
|
+
declare type Field = Exclude<NestableWidget, Separator>;
|
|
3
|
+
export declare function getFieldLabel(field: NestableWidget): string;
|
|
4
|
+
export declare function getFieldPlaceholder(field: Exclude<Field, BooleanField>): string;
|
|
5
|
+
export declare function getFieldPlaceholder(field: BooleanField, value: boolean): string;
|
|
6
|
+
export {};
|
package/dist/index.d.ts
CHANGED