@prismicio/editor-fields 0.4.83 → 0.4.85
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 +0 -1
- package/dist/EditorConfig.d.ts +15 -3
- package/dist/GroupAndNestableWidgetSwitch.d.ts +0 -1
- package/dist/GroupEditor.d.ts +0 -1
- package/dist/NestableWidgetSwitch.d.ts +0 -1
- package/dist/SectionEditor.d.ts +0 -1
- package/dist/SliceSelection.d.ts +0 -1
- package/dist/core/APIExplorer/APIExplorer.d.ts +0 -1
- package/dist/core/APIExplorer/components/APIExplorerRequest.d.ts +0 -1
- package/dist/core/APIExplorer/components/APIExplorerResponse.d.ts +0 -1
- package/dist/core/APIExplorer/components/Request/components/RequestAPIPathFieldset.d.ts +0 -1
- package/dist/core/APIExplorer/components/Request/components/RequestFiltersFieldset/FilterConfigDialog.d.ts +0 -1
- package/dist/core/APIExplorer/components/Request/components/RequestFiltersFieldset/RequestFiltersFieldset.d.ts +0 -1
- package/dist/core/APIExplorer/components/Request/components/RequestFormInput.d.ts +0 -1
- package/dist/core/APIExplorer/components/Request/components/RequestFormInputBase.d.ts +0 -1
- package/dist/core/APIExplorer/components/Request/components/RequestFormMultiInput.d.ts +0 -1
- package/dist/core/APIExplorer/components/Request/components/RequestFormSelect.d.ts +0 -1
- package/dist/core/APIExplorer/components/Request/components/RequestLangFieldset.d.ts +0 -1
- package/dist/core/APIExplorer/components/Request/components/RequestOrderingsFieldset/OrderingConfigDialog.d.ts +0 -1
- package/dist/core/APIExplorer/components/Request/components/RequestOrderingsFieldset/RequestOrderingsFieldset.d.ts +0 -1
- package/dist/core/APIExplorer/components/Request/components/RequestPaginationFieldset.d.ts +0 -1
- package/dist/core/APIExplorer/components/Request/components/RequestRefFieldset.d.ts +0 -1
- package/dist/core/APIExplorer/components/Request/components/RequestTagFieldset.d.ts +0 -1
- package/dist/core/APIExplorer/components/Request/components/RequestTagsFieldset.d.ts +0 -1
- package/dist/core/APIExplorer/components/Request/components/RequestTypeFieldset.d.ts +0 -1
- package/dist/core/APIExplorer/components/Request/createRequest.d.ts +0 -1
- package/dist/core/EditorErrorBoundary.d.ts +0 -1
- package/dist/core/MediaLibrary/MediaLibrary.d.ts +0 -1
- package/dist/core/MediaLibrary/components/EmptyMediaList.d.ts +0 -1
- package/dist/core/MediaLibrary/components/MediaLibraryRenderError.d.ts +0 -1
- package/dist/core/MediaLibrary/components/MediaLibrarySkeleton.d.ts +0 -1
- package/dist/core/MediaLibrary/components/Sidepane/DefaultSidepaneContent.d.ts +0 -1
- package/dist/core/MediaLibrary/components/Sidepane/Sidepane.d.ts +0 -1
- package/dist/core/MediaLibrary/components/Sidepane/SidepaneContent.d.ts +0 -1
- package/dist/core/MediaLibrary/components/Sidepane/components/SidepaneHeader.d.ts +0 -1
- package/dist/core/MediaLibrary/components/Sidepane/components/SidepaneImage.d.ts +0 -1
- package/dist/core/MediaLibrary/components/Sidepane/components/SidepaneMetadata.d.ts +0 -1
- package/dist/core/MediaLibrary/components/Sidepane/components/SidepaneMetadataTags/MultiMediaMetadataTags.d.ts +0 -1
- package/dist/core/MediaLibrary/components/Sidepane/components/SidepaneMetadataTags/SingleMediaMetadataTags.d.ts +0 -1
- package/dist/core/MediaLibrary/components/Sidepane/components/SidepaneMetadataTags/Tags.d.ts +0 -1
- package/dist/core/MediaLibrary/components/Sidepane/components/SidepaneTagManager.d.ts +0 -1
- package/dist/core/MediaLibrary/components/Toolbar/AssetCount.d.ts +0 -1
- package/dist/core/MediaLibrary/components/Toolbar/Toolbar.d.ts +0 -1
- package/dist/core/MediaLibrary/components/Toolbar/filters/AssetTypeFilter.d.ts +0 -1
- package/dist/core/MediaLibrary/components/Toolbar/filters/TagsFilter.d.ts +0 -1
- package/dist/core/MediaLibrary/components/Toolbar/filters/UploaderFilter.d.ts +0 -1
- package/dist/core/OnboardingGuide/components/OnboardingCard.d.ts +0 -1
- package/dist/core/OnboardingGuide/components/OnboardingProgressStepper.d.ts +0 -1
- package/dist/core/OnboardingGuide/components/OnboardingTutorial.d.ts +0 -1
- package/dist/core/SelectionManager/SelectionManager.d.ts +0 -1
- package/dist/core/SeoMetadata/components/MetadataBadge.d.ts +0 -1
- package/dist/core/SeoMetadata/components/MetadataPreview.d.ts +0 -1
- package/dist/core/UnsplashLibrary/UnsplashLibrary.d.ts +0 -1
- package/dist/core/service/onboarding.d.ts +0 -1
- package/dist/fields/BooleanField.d.ts +0 -1
- package/dist/fields/ColorField/ColorField.d.ts +0 -1
- package/dist/fields/DateField.d.ts +0 -1
- package/dist/fields/EmbedField/EmbedField.d.ts +0 -1
- package/dist/fields/EmbedField/EmbedFooter.d.ts +4 -1
- package/dist/fields/FieldTextInput.d.ts +0 -1
- package/dist/fields/GeoPointField/GeoPointField.d.ts +2 -5
- package/dist/fields/ImageField/Components/EmptyCardContent.d.ts +0 -1
- package/dist/fields/ImageField/Components/ImageAltControl.d.ts +0 -1
- package/dist/fields/ImageField/Components/ImageFieldHeader.d.ts +0 -1
- package/dist/fields/ImageField/Components/ImageFieldTitle.d.ts +0 -1
- package/dist/fields/ImageField/Components/ImageLinkControl.d.ts +0 -1
- package/dist/fields/ImageField/Components/NonEmptyCardContent.d.ts +0 -1
- package/dist/fields/ImageField/CropperDialog/CropperControls.d.ts +1 -2
- package/dist/fields/ImageField/CropperDialog/CropperDialog.d.ts +1 -1
- package/dist/fields/ImageField/CropperDialog/croppedImage.d.ts +1 -27
- package/dist/fields/ImageField/ImageField.d.ts +0 -1
- package/dist/fields/ImageField/MediaDialog/MediaDialog.d.ts +0 -1
- package/dist/fields/IntegrationField/IntegrationDialog.d.ts +0 -1
- package/dist/fields/IntegrationField/IntegrationField.d.ts +0 -1
- package/dist/fields/IntegrationField/IntegrationInput.d.ts +0 -1
- package/dist/fields/IntegrationField/IntegrationPreviewCard.d.ts +0 -1
- package/dist/fields/KeyTextField.d.ts +0 -1
- package/dist/fields/LinkField/Documents/DocumentCard.d.ts +0 -1
- package/dist/fields/LinkField/Documents/DocumentsModal.d.ts +0 -1
- package/dist/fields/LinkField/Documents/Filters.d.ts +0 -1
- package/dist/fields/LinkField/Documents/useFilters.d.ts +0 -1
- package/dist/fields/LinkField/LinkDescriptionCard.d.ts +0 -1
- package/dist/fields/LinkField/LinkField.d.ts +0 -1
- package/dist/fields/LinkField/LinkFieldActions.d.ts +0 -1
- package/dist/fields/LinkField/LinkImageCard.d.ts +0 -1
- package/dist/fields/LinkField/LinkOrRepeatableLinkField.d.ts +0 -1
- package/dist/fields/LinkField/RepeatableLinkField/RepeatableLinkField.d.ts +0 -1
- package/dist/fields/LinkField/RepeatableLinkField/RepeatableLinkFieldActions.d.ts +0 -1
- package/dist/fields/LinkField/WebLinks/WebLinkModal.d.ts +0 -1
- package/dist/fields/LinkField/useLinkField.d.ts +0 -1
- package/dist/fields/MetadataTextField.d.ts +0 -1
- package/dist/fields/RichTextField/BubbleMenu/BubbleMenu.d.ts +0 -1
- package/dist/fields/RichTextField/BubbleMenu/ExtraItems.d.ts +0 -1
- package/dist/fields/RichTextField/BubbleMenu/Label/LabelItems.d.ts +0 -1
- package/dist/fields/RichTextField/BubbleMenu/Label/LabelPopover.d.ts +0 -1
- package/dist/fields/RichTextField/BubbleMenu/Link/DocumentDescriptionCard.d.ts +0 -1
- package/dist/fields/RichTextField/BubbleMenu/Link/LinkItems.d.ts +0 -1
- package/dist/fields/RichTextField/BubbleMenu/Link/LinkPopover.d.ts +0 -1
- package/dist/fields/RichTextField/BubbleMenu/Link/SetDocumentLinkModal.d.ts +0 -1
- package/dist/fields/RichTextField/BubbleMenu/Link/SetMediaLinkModal.d.ts +0 -1
- package/dist/fields/RichTextField/BubbleMenu/Link/SetWebLinkModal.d.ts +0 -1
- package/dist/fields/RichTextField/BubbleMenu/MarkItems.d.ts +0 -1
- package/dist/fields/RichTextField/BubbleMenu/NodeItems.d.ts +0 -1
- package/dist/fields/RichTextField/RichTextField.d.ts +3 -2
- package/dist/fields/RichTextField/coreExtensions/ListItem.d.ts +1 -1
- package/dist/fields/RichTextField/coreExtensions/Text.d.ts +1 -1
- package/dist/fields/RichTextField/extensions/Embed/EmbedView.d.ts +0 -1
- package/dist/fields/RichTextField/extensions/Embed/useEmbedView.d.ts +10 -2
- package/dist/fields/RichTextField/extensions/Image/ImageView.d.ts +0 -1
- package/dist/fields/RichTextField/extensions/Table/TableCell/TableCell.d.ts +1 -1
- package/dist/fields/RichTextField/extensions/Table/TableCell/TableHeaderCell.d.ts +1 -1
- package/dist/fields/RichTextField/extensions/Table/TableCell/utils.d.ts +1 -1
- package/dist/fields/RichTextField/extensions/Table/TableLimitToast.d.ts +0 -1
- package/dist/fields/RichTextField/extensions/Table/TableRow.d.ts +1 -1
- package/dist/fields/RichTextField/extensions/Table/menus/TableFloatingMenus.d.ts +0 -1
- package/dist/fields/RichTextField/extensions/Table/plugins/tableCellFocusPlugin.d.ts +1 -1
- package/dist/fields/RichTextField/extensions/Table/plugins/tableHandles/utils.d.ts +1 -1
- package/dist/fields/RichTextField/extensions/Table/utils.d.ts +1 -1
- package/dist/fields/RichTextField/models/EditorExtension.d.ts +1 -1
- package/dist/fields/SelectField.d.ts +0 -1
- package/dist/fields/TableField/TableField.d.ts +0 -1
- package/dist/fields/TimestampField.d.ts +0 -1
- package/dist/fields/UIDField.d.ts +0 -1
- package/dist/index.cjs.js +50 -43
- package/dist/index.es.js +33693 -25601
- package/dist/slices/SharedSliceEditor.d.ts +0 -1
- package/dist/zones/Components/LegacyCustomLabelSelect.d.ts +0 -1
- package/dist/zones/NonRepeatableZoneEditor.d.ts +0 -1
- package/dist/zones/RepeatableZoneEditor.d.ts +0 -1
- package/dist/zones/SlicePrimaryZoneEditor.d.ts +0 -1
- package/dist/zones/SliceZoneEditor.d.ts +0 -1
- package/dist/zones/StaticZoneEditor.d.ts +0 -1
- package/package.json +10 -65
- package/dist/core/Collaboration/CollaborationPresence.d.ts +0 -7
package/dist/DocumentEditor.d.ts
CHANGED
package/dist/EditorConfig.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import type { BaseMetadata } from "@liveblocks/core";
|
|
1
|
+
import type { BaseMetadata, ThreadData } from "@liveblocks/client";
|
|
3
2
|
import type { useThreads as useLiveblocksThreads, UseThreadsOptions } from "@liveblocks/react";
|
|
4
3
|
import { type MediaAssetType } from "@prismicio/editor-ui";
|
|
5
|
-
import type { Content, Extension } from "@tiptap/core";
|
|
4
|
+
import type { Content, Editor, Extension } from "@tiptap/core";
|
|
5
|
+
import { type ReactNode } from "react";
|
|
6
6
|
import type { APIExplorerEvents } from "./core/APIExplorer/components/APIExplorerContext";
|
|
7
7
|
import type { MetadataType } from "./core/service";
|
|
8
8
|
export type EditorConfig = {
|
|
@@ -12,6 +12,9 @@ export type EditorConfig = {
|
|
|
12
12
|
authStrategy: AuthStrategy;
|
|
13
13
|
useCollaborativeComments?: UseCollaborativeComments;
|
|
14
14
|
useThreads?: UseThreads;
|
|
15
|
+
CustomThreads?: CustomThreads;
|
|
16
|
+
CollaborationPresence?: CollaborationPresence;
|
|
17
|
+
hasSharedCollaborativeHistory?: boolean;
|
|
15
18
|
} & OptionalConfigs;
|
|
16
19
|
type OptionalConfigs = SearchDocuments & MediaLibrary & UIDField & Analytics & ErrorTracking & IntegrationFields & LayoutConfig & UserService & AISeoMetadata;
|
|
17
20
|
type UserService = {
|
|
@@ -119,9 +122,18 @@ interface UseCollaborativeCommentsArgs {
|
|
|
119
122
|
}
|
|
120
123
|
type UseCollaborativeComments = (args: UseCollaborativeCommentsArgs) => Extension;
|
|
121
124
|
type UseThreads = (options?: UseThreadsOptions<BaseMetadata> | undefined) => ReturnType<typeof useLiveblocksThreads>;
|
|
125
|
+
type CustomThreads = (props: {
|
|
126
|
+
editor: Editor;
|
|
127
|
+
threads: ThreadData<BaseMetadata>[] | undefined;
|
|
128
|
+
}) => JSX.Element;
|
|
129
|
+
type CollaborationPresence = (props: {
|
|
130
|
+
children: ReactNode;
|
|
131
|
+
id: string;
|
|
132
|
+
}) => JSX.Element;
|
|
122
133
|
export type AuthStrategy = "cookie" | "token";
|
|
123
134
|
export declare const EditorConfigContext: import("react").Context<EditorConfig | undefined>;
|
|
124
135
|
export declare function useEditorConfig(): EditorConfig;
|
|
136
|
+
export declare function useCollaborationPresenceComponent(): CollaborationPresence;
|
|
125
137
|
export declare function throwConfigError(configKey: string): never;
|
|
126
138
|
export declare function suppressErrors(): void;
|
|
127
139
|
export {};
|
package/dist/GroupEditor.d.ts
CHANGED
package/dist/SectionEditor.d.ts
CHANGED
package/dist/SliceSelection.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type FormInputProps } from "@prismicio/editor-ui";
|
|
3
2
|
import { type RequestFormInputBaseProps } from "./RequestFormInputBase";
|
|
4
3
|
export type RequestFormMultiInputProps = Pick<RequestFormInputBaseProps, "label"> & FormMultiInputProps;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type SelectProps } from "@prismicio/editor-ui";
|
|
3
2
|
import { type RequestFormInputBaseProps } from "./RequestFormInputBase";
|
|
4
3
|
export declare function RequestFormSelect(props: Pick<RequestFormInputBaseProps, "label"> & SelectProps): JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { SelectionManagerProviderProps, SelectionStateListener, UseSelectionManager } from "./SelectionManagerTypes";
|
|
3
2
|
export declare function SelectionManagerProvider(props: SelectionManagerProviderProps): JSX.Element;
|
|
4
3
|
interface useSelectionManagerArgs {
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { ErrorBoundary } from "@prismicio/editor-ui";
|
|
2
2
|
import type { EmbedContent } from "@prismicio/types-internal/lib/content";
|
|
3
|
+
import { type RefObject } from "react";
|
|
3
4
|
interface FooterProps {
|
|
4
5
|
debouncedUrl: string;
|
|
5
6
|
content: EmbedContent | undefined;
|
|
6
7
|
onContentChange: (content?: EmbedContent) => void;
|
|
7
8
|
selected?: boolean;
|
|
9
|
+
errorBoundary: RefObject<ErrorBoundary>;
|
|
10
|
+
onError: () => void;
|
|
8
11
|
}
|
|
9
12
|
export declare function Footer(props: FooterProps): JSX.Element | null;
|
|
10
13
|
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type TextInputProps } from "@prismicio/editor-ui";
|
|
3
2
|
export declare const FieldTextInput: (props: TextInputProps & import("react").RefAttributes<HTMLInputElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
|
|
4
3
|
export declare const fieldInputPadding: {
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { GeoPointContent } from "@prismicio/types-internal/lib/content";
|
|
3
2
|
import type { GeoPoint } from "@prismicio/types-internal/lib/customtypes";
|
|
4
|
-
interface GeoPointFieldProps
|
|
3
|
+
interface GeoPointFieldProps {
|
|
5
4
|
field: GeoPoint;
|
|
6
5
|
id: string;
|
|
7
6
|
readOnly: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare function GeoPointField(props: GeoPointFieldProps): JSX.Element;
|
|
10
|
-
interface useGeoPointFieldProps {
|
|
11
7
|
content: GeoPointContent | undefined;
|
|
12
8
|
onContentChange: (content?: GeoPointContent) => void;
|
|
13
9
|
}
|
|
10
|
+
export declare function GeoPointField(props: GeoPointFieldProps): JSX.Element;
|
|
14
11
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import type { CroppedImage } from "@prismicio/types-internal/lib/content";
|
|
2
2
|
import type { CropperImage } from "../../../core/imageUtils";
|
|
3
|
-
import { type CroppedImage } from "./croppedImage";
|
|
4
3
|
interface Props {
|
|
5
4
|
selectedImage: CropperImage;
|
|
6
5
|
imageCrop: CroppedImage;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { type CroppedImage } from "@prismicio/types-internal/lib/content";
|
|
1
2
|
import { type ReactNode } from "react";
|
|
2
3
|
import type { CropperImage } from "../../../core/imageUtils";
|
|
3
|
-
import { type CroppedImage } from "./croppedImage";
|
|
4
4
|
interface CropperDialogProps {
|
|
5
5
|
trigger: React.ReactNode;
|
|
6
6
|
/** Flattened list of all thumbnails in the field */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type CroppedImage, type ImageContent } 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
4
|
export interface Point {
|
|
@@ -15,21 +15,6 @@ export interface CropArea {
|
|
|
15
15
|
width: number;
|
|
16
16
|
height: number;
|
|
17
17
|
}
|
|
18
|
-
export interface CroppedImage {
|
|
19
|
-
zoom: number;
|
|
20
|
-
/** x coordinate of the crop rect on the original image */
|
|
21
|
-
x: number;
|
|
22
|
-
/** y coordinate of the crop rect on the original image */
|
|
23
|
-
y: number;
|
|
24
|
-
/** The width of the crop rect over the original image */
|
|
25
|
-
cropWidth: number;
|
|
26
|
-
/** The height of the crop rect over the original image */
|
|
27
|
-
cropHeight: number;
|
|
28
|
-
/** Final (user defined via W input) height of the image */
|
|
29
|
-
width: number;
|
|
30
|
-
/** Final (user defined via H input) height of the image */
|
|
31
|
-
height: number;
|
|
32
|
-
}
|
|
33
18
|
interface UpdateImageArgs<ContentType extends ImageContent | ImageBlockData> {
|
|
34
19
|
field: Image;
|
|
35
20
|
content: ContentType;
|
|
@@ -42,15 +27,4 @@ interface UpdateImageMainThumbnailArgs<T> {
|
|
|
42
27
|
croppedImage: CroppedImage;
|
|
43
28
|
}
|
|
44
29
|
export declare function updateImageMainThumbnail<T extends ImageContent | ImageBlockData>(args: UpdateImageMainThumbnailArgs<T>): T;
|
|
45
|
-
interface BuildCropUrlArgs {
|
|
46
|
-
origin: ImageContent["origin"];
|
|
47
|
-
/** Image crop parameters */
|
|
48
|
-
croppedImage: CroppedImage;
|
|
49
|
-
}
|
|
50
|
-
export declare function buildCropUrl(args: BuildCropUrlArgs): string;
|
|
51
|
-
/**
|
|
52
|
-
* Returns the cropped image object from the content view
|
|
53
|
-
* This is used to initialise the cropper state
|
|
54
|
-
*/
|
|
55
|
-
export declare function initCroppedImage(contentView: ImageContentView): CroppedImage;
|
|
56
30
|
export {};
|