@prismicio/editor-fields 0.2.0 → 0.2.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/GroupEditor.d.ts +1 -1
- package/dist/domain/Field.d.ts +3 -3
- package/dist/domain/Group.d.ts +1 -1
- package/dist/domain/StaticWidget.d.ts +0 -4
- package/dist/domain/Widget.d.ts +1 -2
- package/dist/domain/fields/ImageField/CroppedImage.d.ts +2 -2
- package/dist/domain/zones/SliceZone.d.ts +1 -4
- package/dist/fields/DateField.d.ts +4 -4
- package/dist/fields/ImageField/CropperDialog.d.ts +1 -1
- package/dist/fields/KeyTextField.d.ts +5 -5
- package/dist/fields/NumberField.d.ts +2 -2
- package/dist/fields/RichTextField/coreExtensions/Text.d.ts +1 -1
- package/dist/fields/RichTextField/extensions/Link.d.ts +2 -1
- package/dist/fields/RichTextField/models/Span.d.ts +1 -1
- package/dist/fields/SelectField.d.ts +2 -2
- package/dist/index.es.js +30834 -28603
- package/dist/index.umd.js +39 -39
- package/dist/slices/LegacySliceEditor.d.ts +2 -2
- package/dist/zones/RepeatableZoneEditor.d.ts +1 -1
- package/dist/zones/SliceZoneEditor.d.ts +1 -1
- package/package.json +24 -27
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;
|
package/dist/domain/Field.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BooleanField
|
|
1
|
+
import type { BooleanField, NestableWidget, Separator } from "@prismicio/types-internal/lib/customtypes";
|
|
2
2
|
declare type Field = Exclude<NestableWidget, Separator>;
|
|
3
3
|
export declare function getFieldLabel(field: Field | Separator): string;
|
|
4
|
-
export declare function getFieldPlaceholder(field: Exclude<Field,
|
|
5
|
-
export declare function getFieldPlaceholder(field:
|
|
4
|
+
export declare function getFieldPlaceholder(field: Exclude<Field, BooleanField>): string;
|
|
5
|
+
export declare function getFieldPlaceholder(field: BooleanField, value: boolean): string;
|
|
6
6
|
export {};
|
package/dist/domain/Group.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GroupContent, GroupItemContent, NestableContent } 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 { RepeatableZone } from "./zones/RepeatableZone";
|
|
4
4
|
export declare function getGroupLabel(group: Group): string;
|
|
5
5
|
export declare function getRepeatableZone(group: Group): RepeatableZone;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { type GroupContent, type NestableContent } from "@prismicio/types-internal/lib/content";
|
|
2
1
|
import type { StaticSlices as SliceZone } from "@prismicio/types-internal/lib/customtypes/widgets/slices/Slices";
|
|
3
2
|
import type { StaticWidget as Widget } from "@prismicio/types-internal/lib/customtypes/widgets/Widget";
|
|
4
|
-
import type { StaticWidgetContent } from "./zones/StaticZone";
|
|
5
3
|
export declare type StaticWidget = Exclude<Widget, SliceZone>;
|
|
6
|
-
export declare function isGroupContent(staticWidgetContent: StaticWidgetContent): staticWidgetContent is GroupContent;
|
|
7
|
-
export declare function isNestableWidgetContent(staticWidgetContent: StaticWidgetContent): staticWidgetContent is NestableContent;
|
package/dist/domain/Widget.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { WidgetContent } from "@prismicio/types-internal/lib/content";
|
|
2
2
|
import type { StaticSlices as SliceZone } from "@prismicio/types-internal/lib/customtypes/widgets/slices/Slices";
|
|
3
3
|
import type { StaticWidget as Widget } from "@prismicio/types-internal/lib/customtypes/widgets/Widget";
|
|
4
4
|
import type { Refinement } from "fp-ts/Refinement";
|
|
5
5
|
export declare function isSliceZone(widget: Widget): widget is SliceZone;
|
|
6
|
-
export declare function isSliceZoneContent(widgetContent: WidgetContent): widgetContent is SlicesContent;
|
|
7
6
|
export declare type Widgets<T> = T extends Record<string, infer V> ? readonly (readonly [string, NonNullable<V>])[] : never;
|
|
8
7
|
export declare function getWidgets<V extends Widget>(record: Readonly<Partial<Record<string, V>>>): Widgets<Readonly<Partial<Record<string, V>>>>;
|
|
9
8
|
export declare function refineWidgetContent<A extends WidgetContent, B extends A>(widgetContent: A | undefined, refinement: Refinement<A, B>): B | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { ImageContent, ImageContentView } from "@prismicio/types-internal/lib/content";
|
|
2
|
+
import type { Image } from "@prismicio/types-internal/lib/customtypes";
|
|
3
3
|
import { type Thumbnail } from "./ImageField";
|
|
4
4
|
export interface Point {
|
|
5
5
|
x: number;
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
import type { CompositeSliceContent, SharedSliceContent, SimpleSliceContent,
|
|
2
|
-
export declare function isSharedSliceContent(sliceContent: SliceContentItem["widget"]): sliceContent is SharedSliceContent;
|
|
3
|
-
export declare function isCompositeSliceContent(sliceContent: SliceContentItem["widget"]): sliceContent is CompositeSliceContent;
|
|
4
|
-
export declare function isLegacySliceContent(sliceContent: SliceContentItem["widget"]): sliceContent is SimpleSliceContent;
|
|
1
|
+
import type { CompositeSliceContent, SharedSliceContent, SimpleSliceContent, SlicesContent } from "@prismicio/types-internal/lib/content";
|
|
5
2
|
export declare function updateSliceContent(sliceZoneContent: SlicesContent, sliceZoneItemContentIndex: number, sliceContent: SharedSliceContent | CompositeSliceContent | SimpleSliceContent | undefined): SlicesContent;
|
|
@@ -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,4 +1,4 @@
|
|
|
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
3
|
import { type CroppedImage } from "../../domain/fields/ImageField/CroppedImage";
|
|
4
4
|
import type { getImageLabel, Thumbnail } from "../../domain/fields/ImageField/ImageField";
|
|
@@ -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,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 { 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 { 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;
|
|
@@ -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;
|