@prismicio/editor-fields 0.4.78 → 0.4.79-alpha.jp-tree-view-title.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.
Files changed (37) hide show
  1. package/dist/EditorConfig.d.ts +11 -0
  2. package/dist/GroupEditor.d.ts +2 -12
  3. package/dist/NestableWidgetSwitch.d.ts +1 -1
  4. package/dist/core/APIExplorer/components/APIExplorerContext.d.ts +39 -20
  5. package/dist/core/APIExplorer/components/Request/components/RequestAPIPathFieldset.d.ts +26 -0
  6. package/dist/core/APIExplorer/components/Request/components/RequestFiltersFieldset/types.d.ts +1 -11
  7. package/dist/core/APIExplorer/components/Request/components/RequestFormMultiInput.d.ts +6 -3
  8. package/dist/core/APIExplorer/components/Request/components/RequestOrderingsFieldset/OrderingConfigDialog.d.ts +8 -0
  9. package/dist/core/APIExplorer/components/Request/components/RequestOrderingsFieldset/RequestOrderingsFieldset.d.ts +5 -0
  10. package/dist/core/APIExplorer/components/Request/components/RequestOrderingsFieldset/constants.d.ts +1 -0
  11. package/dist/core/APIExplorer/components/Request/components/RequestOrderingsFieldset/index.d.ts +2 -0
  12. package/dist/core/APIExplorer/components/Request/components/RequestOrderingsFieldset/queryOrderingsToOrderings.d.ts +2 -0
  13. package/dist/core/APIExplorer/components/Request/components/RequestTagsFieldset.d.ts +11 -0
  14. package/dist/core/APIExplorer/components/Request/components/index.d.ts +1 -0
  15. package/dist/core/APIExplorer/components/Request/createRequest.d.ts +5 -2
  16. package/dist/core/APIExplorer/utils.d.ts +4 -2
  17. package/dist/core/Collaboration/CollaborationPresence.d.ts +7 -0
  18. package/dist/core/document.d.ts +1 -1
  19. package/dist/core/imageUtils.d.ts +0 -2
  20. package/dist/core/service/document.d.ts +30 -12
  21. package/dist/core/service/documentSearch.d.ts +5 -0
  22. package/dist/core/service/onboarding.d.ts +3 -3
  23. package/dist/fields/ImageField/ImageField.d.ts +1 -0
  24. package/dist/fields/LinkField/Documents/documentsData.d.ts +1 -0
  25. package/dist/fields/RichTextField/RichTextField.d.ts +1 -1
  26. package/dist/fields/RichTextField/coreExtensions/ListItem.d.ts +2 -1
  27. package/dist/fields/RichTextField/coreExtensions/Text.d.ts +2 -1
  28. package/dist/fields/RichTextField/extensions/Table/TableCell/TableCell.d.ts +2 -1
  29. package/dist/fields/RichTextField/extensions/Table/TableCell/TableHeaderCell.d.ts +2 -1
  30. package/dist/fields/RichTextField/extensions/Table/TableCell/utils.d.ts +2 -1
  31. package/dist/fields/RichTextField/extensions/Table/TableRow.d.ts +2 -1
  32. package/dist/fields/RichTextField/models/EditorExtension.d.ts +8 -7
  33. package/dist/index.cjs.js +43 -50
  34. package/dist/index.es.js +39753 -47167
  35. package/dist/slices/utils.d.ts +1 -1
  36. package/dist/zones/RepeatableZoneEditor.d.ts +1 -0
  37. package/package.json +65 -7
@@ -54,6 +54,7 @@ export declare function searchDocuments(args: SearchDocumentsArgs): Promise<{
54
54
  preview_image?: string | undefined;
55
55
  preview_summary?: string | undefined;
56
56
  })[];
57
+ ai_abm_thread_id?: string | undefined;
57
58
  }[];
58
59
  } | {
59
60
  results: {
@@ -135,6 +136,7 @@ export declare function searchDocumentsQueryOptions(args: SearchDocumentsQueryOp
135
136
  preview_image?: string | undefined;
136
137
  preview_summary?: string | undefined;
137
138
  })[];
139
+ ai_abm_thread_id?: string | undefined;
138
140
  }[];
139
141
  } | {
140
142
  results: {
@@ -202,6 +204,7 @@ export declare function searchDocumentsQueryOptions(args: SearchDocumentsQueryOp
202
204
  preview_image?: string | undefined;
203
205
  preview_summary?: string | undefined;
204
206
  })[];
207
+ ai_abm_thread_id?: string | undefined;
205
208
  }[];
206
209
  } | {
207
210
  results: {
@@ -285,6 +288,7 @@ export declare function searchDocumentsQueryOptions(args: SearchDocumentsQueryOp
285
288
  preview_image?: string | undefined;
286
289
  preview_summary?: string | undefined;
287
290
  })[];
291
+ ai_abm_thread_id?: string | undefined;
288
292
  }[];
289
293
  } | {
290
294
  results: {
@@ -369,6 +373,7 @@ export declare function searchDocumentsQueryOptions(args: SearchDocumentsQueryOp
369
373
  preview_image?: string | undefined;
370
374
  preview_summary?: string | undefined;
371
375
  })[];
376
+ ai_abm_thread_id?: string | undefined;
372
377
  }[];
373
378
  } | {
374
379
  results: {
@@ -25,19 +25,19 @@ export declare const onboardingStateSchema: z.ZodObject<{
25
25
  starterId?: string | null | undefined;
26
26
  }>;
27
27
  }, "strip", z.ZodTypeAny, {
28
- completedSteps: string[];
29
- isDismissed: boolean;
30
28
  context: {
31
29
  framework: "next" | "nuxt" | "sveltekit" | "other";
32
30
  starterId?: string | null | undefined;
33
31
  };
34
- }, {
35
32
  completedSteps: string[];
36
33
  isDismissed: boolean;
34
+ }, {
37
35
  context: {
38
36
  framework?: unknown;
39
37
  starterId?: string | null | undefined;
40
38
  };
39
+ completedSteps: string[];
40
+ isDismissed: boolean;
41
41
  }>;
42
42
  export type OnboardingState = z.infer<typeof onboardingStateSchema>;
43
43
  export type OnboardingFramework = OnboardingState["context"]["framework"];
@@ -2,6 +2,7 @@
2
2
  import type { ImageContent } from "@prismicio/types-internal/lib/content";
3
3
  import type { Image } from "@prismicio/types-internal/lib/customtypes";
4
4
  export interface ImageFieldProps {
5
+ id: string | undefined;
5
6
  content: ImageContent | undefined;
6
7
  field: Image;
7
8
  readOnly: boolean;
@@ -61,6 +61,7 @@ export declare function useDocuments(params: {
61
61
  id: string;
62
62
  custom_type_id: string;
63
63
  group_lang_id: string;
64
+ ai_abm_thread_id?: string | undefined;
64
65
  } | {
65
66
  versions: ((({
66
67
  status: "unclassified";
@@ -7,9 +7,9 @@ interface Props<TContent extends ExtendedRichTextContent> {
7
7
  content: TContent | undefined;
8
8
  field: RichText;
9
9
  readOnly: boolean;
10
- onContentChange: (content: TContent | undefined) => void;
11
10
  padding?: "normal" | "zero";
12
11
  scroll?: "hidden" | "x-auto";
12
+ onContentChange: (content: TContent | undefined) => void;
13
13
  /** Checks `editor.isEmpty` before calling `onContentChange`.
14
14
  * - When `true`, the current structure of the document will be returned, even if it has no content.
15
15
  * - When `false`, `undefined` will be returned.
@@ -1,8 +1,9 @@
1
+ import type { BaseMetadata, ThreadData } from "@liveblocks/core";
1
2
  import type { Node as ProsemirrorNode, Schema } from "@tiptap/pm/model";
2
3
  declare const _default: {
3
4
  component: import("@tiptap/core").Node<import("@tiptap/extension-list-item").ListItemOptions, any>;
4
5
  converter: {
5
- fromPrismic(schema: Schema<any, any>): (list: {
6
+ fromPrismic(id: string, schema: Schema<any, any>, threads?: ThreadData<BaseMetadata>[] | undefined): (list: {
6
7
  type: "image" | "em" | "embed" | "strong" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
7
8
  content: {
8
9
  text: string;
@@ -1,3 +1,4 @@
1
+ import type { BaseMetadata, ThreadData } from "@liveblocks/core";
1
2
  import type { TextBlock } from "@prismicio/types-internal/lib/content";
2
3
  import type { RichTextNodeType } from "@prismicio/types-internal/lib/customtypes";
3
4
  import type { Node as ProsemirrorNode, Schema } from "@tiptap/pm/model";
@@ -13,7 +14,7 @@ declare const EditorText: {
13
14
  name: string;
14
15
  component: import("@tiptap/core").Node<any, any>;
15
16
  converter: {
16
- fromPrismic(schema: Schema): (extensionName: string, textBlock: TextBlock, preventHardbreaks?: boolean) => ProsemirrorNode[];
17
+ fromPrismic(id: string, schema: Schema, threads?: ThreadData<BaseMetadata>[]): (extensionName: string, textBlock: TextBlock, preventHardbreaks?: boolean) => ProsemirrorNode[];
17
18
  toPrismic(node: ProsemirrorNode, nodeType: RichTextNodeType, attributes?: {
18
19
  direction?: Direction;
19
20
  }): TextBlock;
@@ -1,10 +1,11 @@
1
+ import type { BaseMetadata, ThreadData } from "@liveblocks/core";
1
2
  import { TableContent } from "@prismicio/types-internal/lib/content";
2
3
  import { Node as ProseMirrorNode, type Schema } from "@tiptap/pm/model";
3
4
  type TableRowBlock = TableContent["content"][number];
4
5
  type TableCellOrHeaderBlock = TableRowBlock["content"][number];
5
6
  export declare const TableCell: import("@tiptap/core").Node<import("@tiptap/extension-table-cell").TableCellOptions, any>;
6
7
  export declare const tableCellConverter: {
7
- fromPrismic(schema: Schema): (cell: TableCellOrHeaderBlock) => ProseMirrorNode;
8
+ fromPrismic(id: string, schema: Schema, threads?: ThreadData<BaseMetadata>[]): (cell: TableCellOrHeaderBlock) => ProseMirrorNode;
8
9
  toPrismic(node: ProseMirrorNode): TableCellOrHeaderBlock;
9
10
  };
10
11
  export {};
@@ -1,10 +1,11 @@
1
+ import type { BaseMetadata, ThreadData } from "@liveblocks/core";
1
2
  import { TableContent } from "@prismicio/types-internal/lib/content";
2
3
  import type { Node as ProseMirrorNode, Schema } from "@tiptap/pm/model";
3
4
  type TableRowBlock = TableContent["content"][number];
4
5
  type TableCellOrHeaderBlock = TableRowBlock["content"][number];
5
6
  export declare const TableHeader: import("@tiptap/core").Node<import("@tiptap/extension-table-header").TableHeaderOptions, any>;
6
7
  export declare const tableHeaderCellConverter: {
7
- fromPrismic(schema: Schema): (header: TableCellOrHeaderBlock) => ProseMirrorNode;
8
+ fromPrismic(id: string, schema: Schema, threads?: ThreadData<BaseMetadata>[]): (header: TableCellOrHeaderBlock) => ProseMirrorNode;
8
9
  toPrismic(node: ProseMirrorNode): TableCellOrHeaderBlock;
9
10
  };
10
11
  export {};
@@ -1,6 +1,7 @@
1
+ import type { BaseMetadata, ThreadData } from "@liveblocks/core";
1
2
  import type { Block } from "@prismicio/types-internal/lib/content";
2
3
  import type { Node as ProseMirrorNode, Schema } from "@tiptap/pm/model";
3
- export declare function mapTableCellToParagraph(schema: Schema, block: Block): ProseMirrorNode | undefined;
4
+ export declare function mapTableCellToParagraph(id: string, schema: Schema, block: Block, threads?: ThreadData<BaseMetadata>[]): ProseMirrorNode | undefined;
4
5
  interface CreateButtonElementArgs {
5
6
  title: string;
6
7
  className: string;
@@ -1,9 +1,10 @@
1
+ import type { BaseMetadata, ThreadData } from "@liveblocks/core";
1
2
  import { TableContent } from "@prismicio/types-internal/lib/content";
2
3
  import type { Node as ProseMirrorNode, Schema } from "@tiptap/pm/model";
3
4
  type TableRowBlock = TableContent["content"][number];
4
5
  export declare const TableRow: import("@tiptap/core").Node<import("@tiptap/extension-table-row").TableRowOptions, any>;
5
6
  export declare const tableRowConverter: {
6
- fromPrismic(schema: Schema): (row: TableRowBlock) => ProseMirrorNode;
7
+ fromPrismic(id: string, schema: Schema, threads?: ThreadData<BaseMetadata>[]): (row: TableRowBlock) => ProseMirrorNode;
7
8
  toPrismic(node: ProseMirrorNode): TableRowBlock;
8
9
  };
9
10
  export {};
@@ -1,3 +1,4 @@
1
+ import type { BaseMetadata, ThreadData } from "@liveblocks/core";
1
2
  import type { EmbedBlock, ImageBlock, TextBlock } from "@prismicio/types-internal/lib/content";
2
3
  import type { Node } from "@tiptap/core";
3
4
  import type { Node as ProsemirrorNode, Schema } from "@tiptap/pm/model";
@@ -22,7 +23,7 @@ export type Extension = WidgetExtension | DocumentExtension;
22
23
  export type WidgetExtension = MarkExtension | NodeExtension;
23
24
  export type ExtensionPlaceholder = string | ((nodeAttrs: ProsemirrorNode["attrs"]) => string | undefined) | undefined;
24
25
  export type DocumentConverterReturnType<T extends ExtendedRichTextContent> = {
25
- fromPrismic(schema: Schema, nodeTypes: Set<ExtendedRichTextNodeType>, content: T): ProsemirrorNode | undefined;
26
+ fromPrismic(id: string, schema: Schema, nodeTypes: Set<ExtendedRichTextNodeType>, content: T, threads?: ThreadData<BaseMetadata>[]): ProsemirrorNode | undefined;
26
27
  toPrismic(node: ProsemirrorNode): T | undefined;
27
28
  };
28
29
  export declare class DocumentExtension {
@@ -39,7 +40,7 @@ export declare class TextExtension {
39
40
  readonly name: string;
40
41
  readonly component: Node;
41
42
  readonly converter: {
42
- fromPrismic(schema: Schema): (elmt: TextBlock) => ProsemirrorNode | undefined;
43
+ fromPrismic(id: string, schema: Schema, threads?: ThreadData<BaseMetadata>[]): (elmt: TextBlock) => ProsemirrorNode | undefined;
43
44
  toPrismic(elmt: ProsemirrorNode): TextBlock | readonly TextBlock[] | undefined;
44
45
  };
45
46
  readonly placeholder?: ExtensionPlaceholder;
@@ -47,7 +48,7 @@ export declare class TextExtension {
47
48
  extType: ExtensionType.Node;
48
49
  nodeType: NodeType.Text;
49
50
  constructor(richTextNodeTypes: ExtendedRichTextNodeType[], name: string, component: Node, converter: {
50
- fromPrismic(schema: Schema): (elmt: TextBlock) => ProsemirrorNode | undefined;
51
+ fromPrismic(id: string, schema: Schema, threads?: ThreadData<BaseMetadata>[]): (elmt: TextBlock) => ProsemirrorNode | undefined;
51
52
  toPrismic(elmt: ProsemirrorNode): TextBlock | readonly TextBlock[] | undefined;
52
53
  }, placeholder?: ExtensionPlaceholder, lockedFormat?: boolean);
53
54
  }
@@ -85,13 +86,13 @@ export declare class ImageExtension {
85
86
  export declare class HeadingTextExtension extends TextExtension {
86
87
  readonly levels: readonly Level[];
87
88
  constructor(richTextNodeTypes: ExtendedRichTextNodeType[], Component: Node, levels: readonly Level[], Converter: {
88
- fromPrismic(schema: Schema): (elmt: TextBlock) => ProsemirrorNode | undefined;
89
+ fromPrismic(id: string, schema: Schema, threads?: ThreadData<BaseMetadata>[]): (elmt: TextBlock) => ProsemirrorNode | undefined;
89
90
  toPrismic(elmt: ProsemirrorNode): TextBlock | undefined;
90
91
  }, placeholder?: ExtensionPlaceholder);
91
92
  }
92
93
  export declare class ListExtension extends TextExtension {
93
94
  constructor(richTextNodeTypes: ExtendedRichTextNodeType[], name: string, Component: Node, Converter: {
94
- fromPrismic(schema: Schema): (elmt: TextBlock) => ProsemirrorNode | undefined;
95
+ fromPrismic(id: string, schema: Schema, threads?: ThreadData<BaseMetadata>[]): (elmt: TextBlock) => ProsemirrorNode | undefined;
95
96
  toPrismic(elmt: ProsemirrorNode): readonly TextBlock[];
96
97
  });
97
98
  }
@@ -100,13 +101,13 @@ export declare class TableExtension {
100
101
  readonly name: string;
101
102
  readonly component: Node[];
102
103
  readonly converter: {
103
- fromPrismic(schema: Schema): (elmt: TableBlock) => ProsemirrorNode | undefined;
104
+ fromPrismic(id: string, schema: Schema, threads?: ThreadData<BaseMetadata>[]): (elmt: TableBlock) => ProsemirrorNode | undefined;
104
105
  toPrismic(elmt: ProsemirrorNode): TableBlock | undefined;
105
106
  };
106
107
  extType: ExtensionType.Node;
107
108
  nodeType: NodeType.Table;
108
109
  constructor(richTextNodeTypes: ExtendedRichTextNodeType[], name: string, component: Node[], converter: {
109
- fromPrismic(schema: Schema): (elmt: TableBlock) => ProsemirrorNode | undefined;
110
+ fromPrismic(id: string, schema: Schema, threads?: ThreadData<BaseMetadata>[]): (elmt: TableBlock) => ProsemirrorNode | undefined;
110
111
  toPrismic(elmt: ProsemirrorNode): TableBlock | undefined;
111
112
  });
112
113
  }