@prismicio/editor-fields 0.4.64-alpha.fix-simulator-issue.0 → 0.4.64-alpha.fix-simulator-issue.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.
Files changed (27) hide show
  1. package/dist/core/MediaLibrary/hooks/mediaLibraryData.d.ts +53 -53
  2. package/dist/core/MediaLibrary/hooks/tagData.d.ts +3 -3
  3. package/dist/core/MediaLibrary/hooks/useMediaLibraryUpload.d.ts +5 -5
  4. package/dist/core/MediaLibrary/hooks/useSelectedMedia.d.ts +5 -5
  5. package/dist/core/UnsplashLibrary/unsplashData.d.ts +9 -9
  6. package/dist/core/service/customType.d.ts +21 -21
  7. package/dist/core/service/document.d.ts +112 -112
  8. package/dist/core/service/documentSearch.d.ts +17 -17
  9. package/dist/core/service/onboarding.d.ts +3 -3
  10. package/dist/core/service/repository.d.ts +36 -36
  11. package/dist/core/service/role.d.ts +10 -10
  12. package/dist/fields/ImageField/useImageField.d.ts +5 -5
  13. package/dist/fields/ImageField/useImageFieldImageUpload.d.ts +5 -5
  14. package/dist/fields/LinkField/Documents/documentsData.d.ts +6 -6
  15. package/dist/fields/LinkField/LinkField.d.ts +1 -1
  16. package/dist/fields/LinkField/useLinkField.d.ts +1 -1
  17. package/dist/fields/RichTextField/RichTextField.d.ts +5 -0
  18. package/dist/fields/RichTextField/coreExtensions/ListItem.d.ts +4 -4
  19. package/dist/fields/RichTextField/extensions/Image/useImageView.d.ts +5 -5
  20. package/dist/fields/RichTextField/extensions/Table/TableCell/TableHeaderCell.d.ts +1 -1
  21. package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/TableHandlesPluginView.d.ts +2 -2
  22. package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/utils.d.ts +2 -4
  23. package/dist/fields/RichTextField/extensions/Table/TableView.d.ts +3 -1
  24. package/dist/fields/RichTextField/extensions/Table/utils.d.ts +2 -53
  25. package/dist/index.cjs.js +40 -40
  26. package/dist/index.es.js +17348 -17086
  27. package/package.json +4 -4
@@ -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" | "paragraph" | "embed" | "em" | "strong" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
6
+ type: "image" | "embed" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
7
7
  content: {
8
8
  text: string;
9
9
  } & {
@@ -56,7 +56,7 @@ declare const _default: {
56
56
  } | {
57
57
  start: number;
58
58
  end: number;
59
- type: "em" | "strong" | "list-item";
59
+ type: "strong" | "em" | "list-item";
60
60
  })[] | undefined;
61
61
  };
62
62
  } & {
@@ -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" | "paragraph" | "embed" | "em" | "strong" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
67
+ type: "image" | "embed" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
68
68
  content: {
69
69
  text: string;
70
70
  } & {
@@ -117,7 +117,7 @@ declare const _default: {
117
117
  } | {
118
118
  start: number;
119
119
  end: number;
120
- type: "em" | "strong" | "list-item";
120
+ type: "strong" | "em" | "list-item";
121
121
  })[] | undefined;
122
122
  };
123
123
  } & {
@@ -20,13 +20,13 @@ export declare function useImageView(props: useImageViewProps): {
20
20
  updateContent: (content?: ImageBlockData) => void;
21
21
  onClear: () => void;
22
22
  uploadImage: import("@tanstack/react-query/build/legacy/types").UseMutateFunction<{
23
- id: string;
24
- size: number;
25
23
  kind: string;
24
+ id: string;
26
25
  url: string;
26
+ size: number;
27
27
  tags: {
28
- id: string;
29
28
  name: string;
29
+ id: string;
30
30
  created_at: number;
31
31
  last_modified: number;
32
32
  count: number;
@@ -34,17 +34,17 @@ export declare function useImageView(props: useImageViewProps): {
34
34
  }[];
35
35
  last_modified: number;
36
36
  filename: string;
37
- notes?: string | undefined;
38
37
  height?: number | undefined;
39
38
  width?: number | undefined;
40
39
  credits?: string | undefined;
41
40
  alt?: string | undefined;
41
+ notes?: string | undefined;
42
42
  uploader_id?: string | undefined;
43
43
  extension?: string | undefined;
44
44
  search_highlight?: {
45
- notes?: string | undefined;
46
45
  credits?: string | undefined;
47
46
  alt?: string | undefined;
47
+ notes?: string | undefined;
48
48
  filename?: string | undefined;
49
49
  } | undefined;
50
50
  }, Error, File, unknown>;
@@ -2,7 +2,7 @@ import { TableContent } from "@prismicio/types-internal/lib/content";
2
2
  import type { Node as ProseMirrorNode, Schema } from "@tiptap/pm/model";
3
3
  type TableRowBlock = TableContent["content"][number];
4
4
  type TableCellOrHeaderBlock = TableRowBlock["content"][number];
5
- export declare const TableHeader: import("@tiptap/core").Node<import("@tiptap/extension-table-header").TableHeaderOptions, any>;
5
+ export declare const TableHeader: import("@tiptap/react").Node<import("@tiptap/extension-table-header").TableHeaderOptions, any>;
6
6
  export declare const tableHeaderCellConverter: {
7
7
  fromPrismic(schema: Schema): (header: TableCellOrHeaderBlock) => ProseMirrorNode;
8
8
  toPrismic(node: ProseMirrorNode): TableCellOrHeaderBlock;
@@ -20,15 +20,15 @@ export declare class TableHandlesPluginView implements PluginView {
20
20
  private readonly view;
21
21
  private abortController;
22
22
  private currentRowHandle;
23
- private currentColumnHandle;
24
23
  constructor(view: EditorView);
25
24
  update(view: EditorView): void;
26
25
  destroy(): void;
27
26
  private attachEventListeners;
28
27
  private showCurrentHandles;
29
28
  private hidePreviousHandles;
29
+ private tagNames;
30
+ private closest;
30
31
  private getRowHandle;
31
- private getColumnHandle;
32
32
  private displayHandle;
33
33
  private hideHandle;
34
34
  }
@@ -7,15 +7,13 @@ interface NodePos {
7
7
  node: ProseMirrorNode | null | undefined;
8
8
  }
9
9
  export declare function getCellsInColumn(columnIndex: number | number[]): (selection: Selection) => NodePos[] | null;
10
- export declare function getCellsInRow(rowIndex: number | number[]): (selection: Selection) => NodePos[] | null;
11
10
  /** Finds the table handle element for the given type and element. */
12
11
  export declare function findTableHandleElement(args: {
13
12
  type: "row" | "column";
14
- element: Element;
13
+ element: HTMLElement;
15
14
  }): Element;
16
15
  /** Creates a table handle element for the given type. */
17
- export declare function createTableHandleElement(args: {
18
- type: "row" | "column";
16
+ export declare function createTableHandleElement(type: "row" | "column", args: {
19
17
  editor: Editor;
20
18
  rowIndex: number;
21
19
  columnIndex: number;
@@ -15,6 +15,8 @@ export declare class TableView extends TTTableView implements NodeView {
15
15
  constructor(args: {
16
16
  node: ProseMirrorNode;
17
17
  editor: Editor;
18
- }, options: TableOptions);
18
+ }, options: {
19
+ defaultCellMinWidth: number;
20
+ });
19
21
  ignoreMutation(mutation: ViewMutationRecord): boolean;
20
22
  }
@@ -1,6 +1,5 @@
1
- import { Editor } from "@tiptap/core";
2
- import { type Schema } from "@tiptap/pm/model";
3
- import type { EditorState, Selection, Transaction } from "@tiptap/pm/state";
1
+ import type { Schema } from "@tiptap/pm/model";
2
+ import type { Selection } from "@tiptap/pm/state";
4
3
  export declare function getNodeFromSchema(schema: Schema, name: string): import("prosemirror-model").NodeType;
5
4
  export declare function findTable(selection: Selection): {
6
5
  pos: number;
@@ -8,53 +7,3 @@ export declare function findTable(selection: Selection): {
8
7
  depth: number;
9
8
  node: import("prosemirror-model").Node;
10
9
  } | undefined;
11
- export declare function findRow(selection: Selection): {
12
- pos: number;
13
- start: number;
14
- depth: number;
15
- node: import("prosemirror-model").Node;
16
- } | undefined;
17
- export declare function findCell(selection: Selection): {
18
- pos: number;
19
- start: number;
20
- depth: number;
21
- node: import("prosemirror-model").Node;
22
- } | undefined;
23
- type FindableNodeName = "cell" | "row" | "table";
24
- export declare function findParentNodes<TNodeName extends FindableNodeName>(selection: Selection, ...elements: TNodeName[]): { [key in TNodeName]: {
25
- pos: number;
26
- start: number;
27
- depth: number;
28
- node: import("prosemirror-model").Node;
29
- } | undefined; };
30
- export declare function getTableColumnCount(editor: Editor): number;
31
- export declare function getTableRowCount(editor: Editor): number;
32
- export declare function isTableColumnLimitReached(editor: Editor): boolean;
33
- export declare function isTableRowLimitReached(editor: Editor): boolean;
34
- export declare function select(type: "row" | "column", args: {
35
- index: number;
36
- tr: Transaction;
37
- }): Transaction;
38
- export declare function selectRow(args: {
39
- index: number;
40
- tr: Transaction;
41
- }): Transaction;
42
- export declare function selectColumn(args: {
43
- index: number;
44
- tr: Transaction;
45
- }): Transaction;
46
- export declare function moveRow(args: {
47
- direction: "up" | "down";
48
- state: EditorState;
49
- }): {
50
- tr: Transaction;
51
- index: number;
52
- } | undefined;
53
- export declare function moveColumn(args: {
54
- direction: "left" | "right";
55
- state: EditorState;
56
- }): {
57
- tr: Transaction;
58
- index: number;
59
- } | undefined;
60
- export {};