@prismicio/editor-fields 0.4.6 → 0.4.7

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.
Files changed (34) hide show
  1. package/dist/fields/BooleanField.d.ts +4 -5
  2. package/dist/fields/ColorField/ColorField.d.ts +3 -3
  3. package/dist/fields/DateField.d.ts +3 -3
  4. package/dist/fields/ImageField/{EmptyCardContent.d.ts → Components/EmptyCardContent.d.ts} +1 -1
  5. package/dist/fields/ImageField/{ImageFieldCard.d.ts → Components/ImageFieldCard.d.ts} +9 -2
  6. package/dist/fields/ImageField/CropperDialog/CropperDialog.d.ts +2 -8
  7. package/dist/fields/ImageField/CropperDialog/croppedImage.d.ts +19 -1
  8. package/dist/fields/ImageField/ImageField.d.ts +1 -2
  9. package/dist/fields/ImageField/MediaPicker/MediaLibrary/mediaLibraryData.d.ts +8 -8
  10. package/dist/fields/ImageField/imageFieldUtils.d.ts +6 -0
  11. package/dist/fields/ImageField/useImageField.d.ts +101 -0
  12. package/dist/fields/LinkField/Documents/documentsData.d.ts +23 -23
  13. package/dist/fields/LinkField/useLinkField.d.ts +3 -3
  14. package/dist/fields/RichTextField/RichTextField.d.ts +4 -4
  15. package/dist/fields/RichTextField/coreExtensions/ListItem.d.ts +4 -4
  16. package/dist/fields/RichTextField/extensions/Image/useImageView.d.ts +23 -0
  17. package/dist/fields/RichTextField/models/RichTextConfig.d.ts +2 -2
  18. package/dist/fields/SelectField.d.ts +3 -4
  19. package/dist/fields/TimestampField.d.ts +3 -3
  20. package/dist/index.es.js +8145 -8104
  21. package/package.json +3 -3
  22. package/dist/fields/GeoPointField.d.ts +0 -11
  23. package/dist/fields/RichTextField/BubbleMenu.d.ts +0 -8
  24. package/dist/fields/RichTextField/extensions/Bold.d.ts +0 -3
  25. package/dist/fields/RichTextField/extensions/BulletList.d.ts +0 -3
  26. package/dist/fields/RichTextField/extensions/CodeBlock.d.ts +0 -3
  27. package/dist/fields/RichTextField/extensions/Embed/index.d.ts +0 -10
  28. package/dist/fields/RichTextField/extensions/Heading.d.ts +0 -21
  29. package/dist/fields/RichTextField/extensions/Italic.d.ts +0 -3
  30. package/dist/fields/RichTextField/extensions/Link/Link.d.ts +0 -44
  31. package/dist/fields/RichTextField/extensions/OrderedList.d.ts +0 -3
  32. package/dist/fields/RichTextField/extensions/Paragraph.d.ts +0 -3
  33. package/dist/index.umd.js +0 -145
  34. /package/dist/fields/ImageField/{ImageAltControl.d.ts → Components/ImageAltControl.d.ts} +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "dependencies": {
3
3
  "@floating-ui/react-dom-interactions": "0.9.3",
4
- "@prismicio/editor-support": "0.4.6",
4
+ "@prismicio/editor-support": "0.4.7",
5
5
  "@prismicio/richtext": "2.1.1",
6
6
  "@prismicio/types-internal": "2.0.0",
7
7
  "@tiptap/core": "2.0.3",
@@ -63,7 +63,7 @@
63
63
  "module": "./dist/index.es.js",
64
64
  "name": "@prismicio/editor-fields",
65
65
  "peerDependencies": {
66
- "@prismicio/editor-ui": "^0.4.6",
66
+ "@prismicio/editor-ui": "^0.4.7",
67
67
  "react": "18",
68
68
  "react-dom": "18"
69
69
  },
@@ -80,5 +80,5 @@
80
80
  "sideEffects": false,
81
81
  "stableVersion": "0.0.0",
82
82
  "types": "./dist/index.d.ts",
83
- "version": "0.4.6"
83
+ "version": "0.4.7"
84
84
  }
@@ -1,11 +0,0 @@
1
- import type { GeoPointContent } from "@prismicio/types-internal/lib/content";
2
- import type { GeoPoint } from "@prismicio/types-internal/lib/customtypes";
3
- interface GeoPointFieldProps {
4
- content: GeoPointContent | undefined;
5
- field: GeoPoint;
6
- id: string;
7
- onContentChange: (content?: GeoPointContent) => void;
8
- readOnly: boolean;
9
- }
10
- export declare function GeoPointField(props: GeoPointFieldProps): JSX.Element;
11
- export {};
@@ -1,8 +0,0 @@
1
- import type { Editor } from "@tiptap/core";
2
- import { type FC } from "react";
3
- declare type BubbleMenuProps = Readonly<{
4
- editor: Editor;
5
- nodeTypes: readonly string[];
6
- }>;
7
- export declare const BubbleMenu: FC<BubbleMenuProps>;
8
- export {};
@@ -1,3 +0,0 @@
1
- import { MarkExtension } from "../models/EditorExtension";
2
- declare const EditorBold: MarkExtension<unknown>;
3
- export default EditorBold;
@@ -1,3 +0,0 @@
1
- import { ListExtension } from "../models";
2
- declare const EditorBulletList: ListExtension;
3
- export default EditorBulletList;
@@ -1,3 +0,0 @@
1
- import { TextExtension } from "../models";
2
- declare const EditorCodeBlock: TextExtension;
3
- export default EditorCodeBlock;
@@ -1,10 +0,0 @@
1
- import { EmbedExtension } from "../../models";
2
- declare module "@tiptap/core" {
3
- interface Commands<ReturnType> {
4
- embed: {
5
- setEmbed: () => ReturnType;
6
- };
7
- }
8
- }
9
- declare const _default: EmbedExtension;
10
- export default _default;
@@ -1,21 +0,0 @@
1
- import { RichTextNodeType } from "@prismicio/types-internal/lib/customtypes";
2
- import { type Level as TTLevel } from "@tiptap/extension-heading";
3
- import { type ReadonlyNonEmptyArray } from "fp-ts/ReadonlyNonEmptyArray";
4
- import type { Node as ProsemirrorNode } from "prosemirror-model";
5
- import { HeadingTextExtension } from "../models";
6
- export declare type Level = TTLevel;
7
- interface HeadingName {
8
- fullName: RichTextNodeType;
9
- level: Level;
10
- }
11
- export declare const HeadingName: {
12
- byLevel(level: Level): RichTextNodeType;
13
- default(level: Level): HeadingName;
14
- fromPrismic(headingName: string, levels?: ReadonlyNonEmptyArray<Level>): HeadingName | undefined;
15
- fromProsemirror(nodeAttributes: ProsemirrorNode["attrs"], levels: ReadonlyNonEmptyArray<Level>): HeadingName | undefined;
16
- };
17
- declare const _default: {
18
- name: string;
19
- build: (nodeTypes?: Set<RichTextNodeType>) => HeadingTextExtension | undefined;
20
- };
21
- export default _default;
@@ -1,3 +0,0 @@
1
- import { MarkExtension } from "../models/EditorExtension";
2
- declare const EditorItalic: MarkExtension<unknown>;
3
- export default EditorItalic;
@@ -1,44 +0,0 @@
1
- import { MarkExtension } from "../../models";
2
- declare const EditorLink: MarkExtension<{
3
- __TYPE__: "LinkContent";
4
- value: ({
5
- __TYPE__: "ImageLink";
6
- } & {
7
- id: string;
8
- url: string;
9
- height: string;
10
- width: string;
11
- size: string;
12
- name: string;
13
- kind: string;
14
- } & {
15
- date?: string | null | undefined;
16
- }) | ({
17
- id: string;
18
- url: string;
19
- name: string;
20
- kind: string;
21
- size: string;
22
- } & {
23
- date?: string | null | undefined;
24
- } & {
25
- __TYPE__: "FileLink";
26
- } & {
27
- size?: string | undefined;
28
- }) | ({
29
- __TYPE__: "DocumentLink";
30
- } & {
31
- id: string;
32
- }) | ({
33
- __TYPE__: "ExternalLink";
34
- } & {
35
- url: string;
36
- } & {
37
- kind?: "web" | undefined;
38
- target?: string | null | undefined;
39
- preview?: {
40
- title?: string | undefined;
41
- } | null | undefined;
42
- });
43
- }>;
44
- export default EditorLink;
@@ -1,3 +0,0 @@
1
- import { ListExtension } from "../models";
2
- declare const EditorOrderedList: ListExtension;
3
- export default EditorOrderedList;
@@ -1,3 +0,0 @@
1
- import { TextExtension } from "../models";
2
- declare const EditorParagraph: TextExtension;
3
- export default EditorParagraph;