@prismicio/editor-fields 0.4.70 → 0.4.72
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/core/APIExplorer/components/APIExplorerContext.d.ts +74 -31
- package/dist/core/APIExplorer/components/Request/components/RequestRefFieldset.d.ts +5 -0
- package/dist/core/APIExplorer/components/Request/createRequest.d.ts +4 -2
- package/dist/core/APIExplorer/components/Request/index.d.ts +1 -1
- package/dist/core/APIExplorer/components/Request/types.d.ts +1 -0
- package/dist/core/APIExplorer/hooks/useCopy.d.ts +4 -0
- package/dist/core/APIExplorer/hooks/useRequestRepository.d.ts +1 -0
- package/dist/core/APIExplorer/hooks/useRequestRepositoryCustomTypes.d.ts +6 -0
- package/dist/core/service/customType.d.ts +12 -12
- package/dist/core/service/document.d.ts +11 -11
- package/dist/fields/LinkField/useLinkField.d.ts +1 -1
- package/dist/fields/RichTextField/extensions/Table/TableView.d.ts +2 -0
- package/dist/fields/RichTextField/extensions/Table/plugins/index.d.ts +1 -0
- package/dist/fields/RichTextField/extensions/Table/plugins/tableCellFocusPlugin.d.ts +9 -0
- package/dist/index.cjs.js +45 -45
- package/dist/index.es.js +29400 -28931
- package/dist/slices/utils.d.ts +1 -1
- package/package.json +4 -4
- package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/TableHandlesPlugin.d.ts +0 -8
- package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/events.d.ts +0 -19
- package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/index.d.ts +0 -1
- package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/utils.d.ts +0 -23
- package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/index.d.ts +0 -1
- package/dist/fields/RichTextField/extensions/Table/TableControlsWrapper.d.ts +0 -3
- package/dist/fields/RichTextField/extensions/Table/plugins/TableHandles/TableHandlesPluginDef.d.ts +0 -8
- package/dist/fields/RichTextField/extensions/Table/plugins/TableHandles/TableHandlesPluginView.d.ts +0 -34
- package/dist/fields/RichTextField/extensions/Table/plugins/TableHandles/TableHandlesPluginViewClass.d.ts +0 -34
- /package/dist/fields/RichTextField/extensions/Table/plugins/{TableHandles → tableHandles}/index.d.ts +0 -0
- /package/dist/fields/RichTextField/extensions/Table/plugins/{TableHandles/TableHandlesPlugin.d.ts → tableHandles/tableHandlesPlugin.d.ts} +0 -0
- /package/dist/fields/RichTextField/extensions/Table/{TableCell/plugins/TableHandles/TableHandlesPluginView.d.ts → plugins/tableHandles/tableHandlesPluginView.d.ts} +0 -0
- /package/dist/fields/RichTextField/extensions/Table/plugins/{TableHandles → tableHandles}/utils.d.ts +0 -0
package/dist/slices/utils.d.ts
CHANGED
|
@@ -362,7 +362,7 @@ export declare function maybeResetSliceWidget(args: MaybeResetSliceWidgetArgs):
|
|
|
362
362
|
content: ({
|
|
363
363
|
key: string;
|
|
364
364
|
} & {
|
|
365
|
-
type: "
|
|
365
|
+
type: "tableCell" | "tableHeader";
|
|
366
366
|
content: {
|
|
367
367
|
__TYPE__: "StructuredTextContent";
|
|
368
368
|
value: (({
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"dependencies": {
|
|
3
3
|
"@floating-ui/react-dom-interactions": "0.9.3",
|
|
4
4
|
"@prismicio/client": "7.15.1",
|
|
5
|
-
"@prismicio/editor-support": "0.4.
|
|
5
|
+
"@prismicio/editor-support": "0.4.72",
|
|
6
6
|
"@prismicio/richtext": "2.1.1",
|
|
7
7
|
"@prismicio/types-internal": "3.8.0",
|
|
8
8
|
"@tiptap/core": "2.11.5",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"zod": "3.23.8"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@prismicio/editor-ui": "^0.4.
|
|
41
|
+
"@prismicio/editor-ui": "^0.4.72",
|
|
42
42
|
"@testing-library/react": "15.0.7",
|
|
43
43
|
"@types/react": "18.0.18",
|
|
44
44
|
"@types/react-dom": "18.3.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"module": "./dist/index.es.js",
|
|
73
73
|
"name": "@prismicio/editor-fields",
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@prismicio/editor-ui": "^0.4.
|
|
75
|
+
"@prismicio/editor-ui": "^0.4.72",
|
|
76
76
|
"@tanstack/react-query": "5.55.4",
|
|
77
77
|
"react": "18",
|
|
78
78
|
"react-dom": "18"
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"sideEffects": false,
|
|
91
91
|
"stableVersion": "0.0.0",
|
|
92
92
|
"types": "./dist/index.d.ts",
|
|
93
|
-
"version": "0.4.
|
|
93
|
+
"version": "0.4.72"
|
|
94
94
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Editor } from "@tiptap/core";
|
|
2
|
-
import { Plugin } from "@tiptap/pm/state";
|
|
3
|
-
import { DecorationSet } from "@tiptap/pm/view";
|
|
4
|
-
/** Plugin responsible for showing and hiding the row and column handles. */
|
|
5
|
-
export declare function TableHandlesPlugin(this: {
|
|
6
|
-
editor: Editor;
|
|
7
|
-
name: string;
|
|
8
|
-
}): Plugin<DecorationSet>;
|
package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/events.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Editor } from "@tiptap/core";
|
|
2
|
-
export type TableHandleEventDetail = {
|
|
3
|
-
type: "row" | "column";
|
|
4
|
-
referenceElement: HTMLElement;
|
|
5
|
-
};
|
|
6
|
-
export type TableHandleEventType = {
|
|
7
|
-
name: "handleClick";
|
|
8
|
-
detail: TableHandleEventDetail;
|
|
9
|
-
};
|
|
10
|
-
export declare class TableHandleEvent extends CustomEvent<TableHandleEventType["detail"]> {
|
|
11
|
-
constructor({ name, detail }: TableHandleEventType);
|
|
12
|
-
static dispatch<TEvent extends TableHandleEventType>(name: TEvent["name"], args: {
|
|
13
|
-
editor: Editor;
|
|
14
|
-
} & TEvent["detail"]): void;
|
|
15
|
-
static listen<TEvent extends TableHandleEventType>(name: TEvent["name"], args: {
|
|
16
|
-
editor: Editor;
|
|
17
|
-
callback: (detail: TEvent["detail"]) => void;
|
|
18
|
-
}): () => void;
|
|
19
|
-
}
|
package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { TableHandlesPlugin } from "./TableHandlesPlugin";
|
package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/utils.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { type Editor } from "@tiptap/core";
|
|
2
|
-
import type { Node as ProseMirrorNode } from "@tiptap/pm/model";
|
|
3
|
-
import type { Selection } from "@tiptap/pm/state";
|
|
4
|
-
interface NodePos {
|
|
5
|
-
pos: number;
|
|
6
|
-
start: number;
|
|
7
|
-
node: ProseMirrorNode | null | undefined;
|
|
8
|
-
}
|
|
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
|
-
/** Finds the table handle element for the given type and element. */
|
|
12
|
-
export declare function findTableHandleElement(args: {
|
|
13
|
-
type: "row" | "column";
|
|
14
|
-
element: Element;
|
|
15
|
-
}): Element;
|
|
16
|
-
/** Creates a table handle element for the given type. */
|
|
17
|
-
export declare function createTableHandleElement(args: {
|
|
18
|
-
type: "row" | "column";
|
|
19
|
-
editor: Editor;
|
|
20
|
-
rowIndex: number;
|
|
21
|
-
columnIndex: number;
|
|
22
|
-
}): HTMLButtonElement;
|
|
23
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { TableHandlesPlugin } from "./TableHandles";
|
package/dist/fields/RichTextField/extensions/Table/plugins/TableHandles/TableHandlesPluginDef.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Editor } from "@tiptap/core";
|
|
2
|
-
import { Plugin } from "@tiptap/pm/state";
|
|
3
|
-
import { DecorationSet } from "@tiptap/pm/view";
|
|
4
|
-
/** Plugin responsible for showing and hiding the row and column handles. */
|
|
5
|
-
export declare function tableHandlesPlugin(args: {
|
|
6
|
-
editor: Editor;
|
|
7
|
-
name: string;
|
|
8
|
-
}): Plugin<DecorationSet>;
|
package/dist/fields/RichTextField/extensions/Table/plugins/TableHandles/TableHandlesPluginView.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { type PluginView } from "@tiptap/pm/state";
|
|
2
|
-
import type { EditorView } from "@tiptap/pm/view";
|
|
3
|
-
/**
|
|
4
|
-
* This plugin centralizes the logic for showing and hiding the row and column
|
|
5
|
-
* handle buttons (the ones that on click open a floating menu).
|
|
6
|
-
*
|
|
7
|
-
* Ideally, hiding and showing the handles would be handled using only CSS,
|
|
8
|
-
* but identifying the topmost cell in a column is not trivial, as the grouping
|
|
9
|
-
* of cells in a column is not clearly defined in the DOM (only by colgroup),
|
|
10
|
-
* and CSS cannot dynamically select it depending on the hovered cell.
|
|
11
|
-
*
|
|
12
|
-
* Another option was to dynamically generate hardcoded selectors, given that
|
|
13
|
-
* we know the number of rows and cells, but inline styles can only contain
|
|
14
|
-
* property declarations, not pseudo-classes like :hover.
|
|
15
|
-
*
|
|
16
|
-
* That leaves us with handling it solely in JavaScript, which is what this
|
|
17
|
-
* plugin does.
|
|
18
|
-
*/
|
|
19
|
-
export declare class TableHandlesPluginView implements PluginView {
|
|
20
|
-
private readonly view;
|
|
21
|
-
private abortController;
|
|
22
|
-
private currentRowHandle;
|
|
23
|
-
private currentColumnHandle;
|
|
24
|
-
constructor(view: EditorView);
|
|
25
|
-
update(view: EditorView): void;
|
|
26
|
-
destroy(): void;
|
|
27
|
-
private attachEventListeners;
|
|
28
|
-
private showCurrentHandles;
|
|
29
|
-
private hidePreviousHandles;
|
|
30
|
-
private getRowHandle;
|
|
31
|
-
private getColumnHandle;
|
|
32
|
-
private displayHandle;
|
|
33
|
-
private hideHandle;
|
|
34
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { type PluginView } from "@tiptap/pm/state";
|
|
2
|
-
import type { EditorView } from "@tiptap/pm/view";
|
|
3
|
-
/**
|
|
4
|
-
* This plugin centralizes the logic for showing and hiding the row and column
|
|
5
|
-
* handle buttons (the ones that on click open a floating menu).
|
|
6
|
-
*
|
|
7
|
-
* Ideally, hiding and showing the handles would be handled using only CSS,
|
|
8
|
-
* but identifying the topmost cell in a column is not trivial, as the grouping
|
|
9
|
-
* of cells in a column is not clearly defined in the DOM (only by colgroup),
|
|
10
|
-
* and CSS cannot dynamically select it depending on the hovered cell.
|
|
11
|
-
*
|
|
12
|
-
* Another option was to dynamically generate hardcoded selectors, given that
|
|
13
|
-
* we know the number of rows and cells, but inline styles can only contain
|
|
14
|
-
* property declarations, not pseudo-classes like :hover.
|
|
15
|
-
*
|
|
16
|
-
* That leaves us with handling it solely in JavaScript, which is what this
|
|
17
|
-
* plugin does.
|
|
18
|
-
*/
|
|
19
|
-
export declare class TableHandlesPluginView implements PluginView {
|
|
20
|
-
private readonly view;
|
|
21
|
-
private abortController;
|
|
22
|
-
private currentRowHandle;
|
|
23
|
-
private currentColumnHandle;
|
|
24
|
-
constructor(view: EditorView);
|
|
25
|
-
update(view: EditorView): void;
|
|
26
|
-
destroy(): void;
|
|
27
|
-
private attachEventListeners;
|
|
28
|
-
private showCurrentHandles;
|
|
29
|
-
private hidePreviousHandles;
|
|
30
|
-
private getRowHandle;
|
|
31
|
-
private getColumnHandle;
|
|
32
|
-
private displayHandle;
|
|
33
|
-
private hideHandle;
|
|
34
|
-
}
|
/package/dist/fields/RichTextField/extensions/Table/plugins/{TableHandles → tableHandles}/index.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/fields/RichTextField/extensions/Table/plugins/{TableHandles → tableHandles}/utils.d.ts
RENAMED
|
File without changes
|