@prismicio/editor-fields 0.1.0-rc.2
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/README.md +1 -0
- package/dist/DocumentEditor.d.ts +14 -0
- package/dist/GroupEditor.d.ts +12 -0
- package/dist/NestableWidgetSwitch.d.ts +12 -0
- package/dist/SectionEditor.d.ts +12 -0
- package/dist/domain/Document.d.ts +8 -0
- package/dist/domain/Field.d.ts +5 -0
- package/dist/domain/Group.d.ts +6 -0
- package/dist/domain/NestableWidget.d.ts +12 -0
- package/dist/domain/Section.d.ts +10 -0
- package/dist/domain/SharedSlices.d.ts +3 -0
- package/dist/domain/StaticWidget.d.ts +7 -0
- package/dist/domain/Widget.d.ts +10 -0
- package/dist/domain/slices/CompositeSlice.d.ts +6 -0
- package/dist/domain/slices/LegacySlice.d.ts +4 -0
- package/dist/domain/slices/SharedSlice.d.ts +9 -0
- package/dist/domain/zones/NonRepeatableZone.d.ts +5 -0
- package/dist/domain/zones/RepeatableZone.d.ts +8 -0
- package/dist/domain/zones/SliceZone.d.ts +8 -0
- package/dist/domain/zones/StaticZone.d.ts +5 -0
- package/dist/fields/KeyTextField.d.ts +12 -0
- package/dist/fields/RichTextField/BubbleMenu.d.ts +8 -0
- package/dist/fields/RichTextField/RichTextField.d.ts +12 -0
- package/dist/fields/RichTextField/coreExtensions/Document.d.ts +3 -0
- package/dist/fields/RichTextField/coreExtensions/HardBreak.d.ts +12 -0
- package/dist/fields/RichTextField/coreExtensions/ListItem.d.ts +45 -0
- package/dist/fields/RichTextField/coreExtensions/Placeholder.d.ts +3 -0
- package/dist/fields/RichTextField/coreExtensions/SlashCommands.d.ts +4 -0
- package/dist/fields/RichTextField/coreExtensions/Text.d.ts +15 -0
- package/dist/fields/RichTextField/coreExtensions/index.d.ts +9 -0
- package/dist/fields/RichTextField/extensions/Bold.d.ts +3 -0
- package/dist/fields/RichTextField/extensions/BulletList.d.ts +3 -0
- package/dist/fields/RichTextField/extensions/CodeBlock.d.ts +3 -0
- package/dist/fields/RichTextField/extensions/Embed/EmbedView.d.ts +3 -0
- package/dist/fields/RichTextField/extensions/Embed/index.d.ts +10 -0
- package/dist/fields/RichTextField/extensions/Heading.d.ts +21 -0
- package/dist/fields/RichTextField/extensions/Italic.d.ts +3 -0
- package/dist/fields/RichTextField/extensions/Link.d.ts +4 -0
- package/dist/fields/RichTextField/extensions/OrderedList.d.ts +3 -0
- package/dist/fields/RichTextField/extensions/Paragraph.d.ts +3 -0
- package/dist/fields/RichTextField/extensions/index.d.ts +14 -0
- package/dist/fields/RichTextField/globalExtensions/TextDirection.d.ts +40 -0
- package/dist/fields/RichTextField/globalExtensions/index.d.ts +1 -0
- package/dist/fields/RichTextField/index.d.ts +1 -0
- package/dist/fields/RichTextField/models/EditorExtension.d.ts +109 -0
- package/dist/fields/RichTextField/models/MenuItems.d.ts +24 -0
- package/dist/fields/RichTextField/models/RichTextConfig.d.ts +10 -0
- package/dist/fields/RichTextField/models/Span.d.ts +12 -0
- package/dist/fields/RichTextField/models/helpers/NodeUtils.d.ts +15 -0
- package/dist/fields/RichTextField/models/helpers/index.d.ts +1 -0
- package/dist/fields/RichTextField/models/index.d.ts +3 -0
- package/dist/fields/SelectField.d.ts +12 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.es.js +48794 -0
- package/dist/index.umd.js +121 -0
- package/dist/slices/CompositeSliceEditor.d.ts +12 -0
- package/dist/slices/LegacySliceEditor.d.ts +12 -0
- package/dist/slices/SharedSliceEditor.d.ts +12 -0
- package/dist/zones/NonRepeatableZoneEditor.d.ts +11 -0
- package/dist/zones/RepeatableZoneEditor.d.ts +11 -0
- package/dist/zones/SliceZoneEditor.d.ts +12 -0
- package/dist/zones/StaticZoneEditor.d.ts +11 -0
- package/package.json +82 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CompositeSlice } from "@prismicio/types-internal/lib/customtypes/widgets/slices";
|
|
2
|
+
import type { CompositeSliceContent } from "@prismicio/types-internal/lib/documents/widgets/slices";
|
|
3
|
+
import type { FC } from "react";
|
|
4
|
+
declare type CompositeSliceEditorProps = Readonly<{
|
|
5
|
+
compositeSlice: CompositeSlice;
|
|
6
|
+
content: CompositeSliceContent;
|
|
7
|
+
id: string;
|
|
8
|
+
onContentChange: (content: CompositeSliceContent) => void;
|
|
9
|
+
readOnly: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const CompositeSliceEditor: FC<CompositeSliceEditorProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { LegacySlice } from "@prismicio/types-internal/lib/customtypes/widgets/slices";
|
|
2
|
+
import type { FC } from "react";
|
|
3
|
+
import { type LegacySliceContent } from "../domain/slices/LegacySlice";
|
|
4
|
+
declare type LegacySliceEditorProps = Readonly<{
|
|
5
|
+
content: LegacySliceContent | undefined;
|
|
6
|
+
id: string;
|
|
7
|
+
legacySlice: LegacySlice;
|
|
8
|
+
onContentChange: (content: LegacySliceContent | undefined) => void;
|
|
9
|
+
readOnly: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const LegacySliceEditor: FC<LegacySliceEditorProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SharedSlice } from "@prismicio/types-internal/lib/customtypes/widgets/slices";
|
|
2
|
+
import type { SharedSliceContent } from "@prismicio/types-internal/lib/documents/widgets/slices";
|
|
3
|
+
import { type FC } from "react";
|
|
4
|
+
declare type SharedSliceEditorProps = Readonly<{
|
|
5
|
+
content: SharedSliceContent;
|
|
6
|
+
id?: string | undefined;
|
|
7
|
+
onContentChange: (content: SharedSliceContent) => void;
|
|
8
|
+
readOnly?: boolean | undefined;
|
|
9
|
+
sharedSlice: SharedSlice;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const SharedSliceEditor: FC<SharedSliceEditorProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type FC } from "react";
|
|
2
|
+
import { type NonRepeatableZone, type NonRepeatableZoneContent } from "../domain/zones/NonRepeatableZone";
|
|
3
|
+
declare type NonRepeatableZoneEditorProps = Readonly<{
|
|
4
|
+
content: NonRepeatableZoneContent;
|
|
5
|
+
id: string;
|
|
6
|
+
nonRepeatableZone: NonRepeatableZone;
|
|
7
|
+
onContentChange: (content: NonRepeatableZoneContent) => void;
|
|
8
|
+
readOnly: boolean;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const NonRepeatableZoneEditor: FC<NonRepeatableZoneEditorProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type FC } from "react";
|
|
2
|
+
import { type RepeatableZone, type RepeatableZoneContent } from "../domain/zones/RepeatableZone";
|
|
3
|
+
declare type RepeatableZoneEditorProps = Readonly<{
|
|
4
|
+
content: RepeatableZoneContent | undefined;
|
|
5
|
+
id: string;
|
|
6
|
+
onContentChange: (content: RepeatableZoneContent) => void;
|
|
7
|
+
readOnly: boolean;
|
|
8
|
+
repeatableZone: RepeatableZone;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const RepeatableZoneEditor: FC<RepeatableZoneEditorProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { StaticSlices as SliceZone } from "@prismicio/types-internal/lib/customtypes/widgets/slices/Slices";
|
|
2
|
+
import type { SlicesContent as SliceZoneContent } from "@prismicio/types-internal/lib/documents/widgets/slices";
|
|
3
|
+
import type { FC } from "react";
|
|
4
|
+
declare type SliceZoneEditorProps = Readonly<{
|
|
5
|
+
content: SliceZoneContent | undefined;
|
|
6
|
+
id: string;
|
|
7
|
+
onContentChange: (content: SliceZoneContent) => void;
|
|
8
|
+
readOnly: boolean;
|
|
9
|
+
sliceZone: SliceZone;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const SliceZoneEditor: FC<SliceZoneEditorProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type FC } from "react";
|
|
2
|
+
import { type StaticZone, type StaticZoneContent } from "../domain/zones/StaticZone";
|
|
3
|
+
declare type StaticZoneEditorProps = Readonly<{
|
|
4
|
+
content: StaticZoneContent;
|
|
5
|
+
id: string;
|
|
6
|
+
onContentChange: (content: StaticZoneContent) => void;
|
|
7
|
+
readOnly: boolean;
|
|
8
|
+
staticZone: StaticZone;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const StaticZoneEditor: FC<StaticZoneEditorProps>;
|
|
11
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"dependencies": {
|
|
3
|
+
"@floating-ui/react-dom-interactions": "0.8.1",
|
|
4
|
+
"@prismicio/editor-support": "0.1.0-rc.1",
|
|
5
|
+
"@prismicio/richtext": "2.0.1",
|
|
6
|
+
"@prismicio/types-internal": "0.3.0",
|
|
7
|
+
"@tiptap/core": "2.0.0-beta.174",
|
|
8
|
+
"@tiptap/extension-bold": "2.0.0-beta.26",
|
|
9
|
+
"@tiptap/extension-bullet-list": "2.0.0-beta.26",
|
|
10
|
+
"@tiptap/extension-code-block": "2.0.0-beta.37",
|
|
11
|
+
"@tiptap/extension-document": "2.0.0-beta.15",
|
|
12
|
+
"@tiptap/extension-hard-break": "2.0.0-beta.30",
|
|
13
|
+
"@tiptap/extension-heading": "2.0.0-beta.26",
|
|
14
|
+
"@tiptap/extension-italic": "2.0.0-beta.26",
|
|
15
|
+
"@tiptap/extension-link": "2.0.0-beta.36",
|
|
16
|
+
"@tiptap/extension-list-item": "2.0.0-beta.20",
|
|
17
|
+
"@tiptap/extension-ordered-list": "2.0.0-beta.27",
|
|
18
|
+
"@tiptap/extension-paragraph": "2.0.0-beta.23",
|
|
19
|
+
"@tiptap/extension-placeholder": "2.0.0-beta.48",
|
|
20
|
+
"@tiptap/extension-text": "2.0.0-beta.15",
|
|
21
|
+
"@tiptap/react": "2.0.0-beta.108",
|
|
22
|
+
"@tiptap/suggestion": "2.0.0-beta.90",
|
|
23
|
+
"clsx": "1.1.1",
|
|
24
|
+
"fp-ts": "2.11.8",
|
|
25
|
+
"io-ts": "2.2.16",
|
|
26
|
+
"io-ts-types": "",
|
|
27
|
+
"monocle-ts": "",
|
|
28
|
+
"newtype-ts": "",
|
|
29
|
+
"prosemirror-model": "1.16.1",
|
|
30
|
+
"tslib": "2.3.1"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/prosemirror-model": "1.16.1",
|
|
34
|
+
"@types/react": "17.0.38",
|
|
35
|
+
"@vitejs/plugin-react": "1.1.4",
|
|
36
|
+
"eslint": "8.6.0",
|
|
37
|
+
"eslint-config-prettier": "8.3.0",
|
|
38
|
+
"eslint-plugin-jest-dom": "4.0.1",
|
|
39
|
+
"eslint-plugin-jsx-a11y": "6.5.1",
|
|
40
|
+
"eslint-plugin-react": "7.28.0",
|
|
41
|
+
"eslint-plugin-react-hooks": "4.3.0",
|
|
42
|
+
"eslint-plugin-testing-library": "5.0.5",
|
|
43
|
+
"react": "17.0.2",
|
|
44
|
+
"typescript": "4.5.4",
|
|
45
|
+
"vite": "2.7.10",
|
|
46
|
+
"vitest": "0.2.6"
|
|
47
|
+
},
|
|
48
|
+
"exports": {
|
|
49
|
+
".": {
|
|
50
|
+
"types": "./dist/index.d.ts",
|
|
51
|
+
"import": "./dist/index.es.js",
|
|
52
|
+
"require": "./dist/index.umd.js"
|
|
53
|
+
},
|
|
54
|
+
"./src/index.ts": "./src/index.ts"
|
|
55
|
+
},
|
|
56
|
+
"files": [
|
|
57
|
+
"dist"
|
|
58
|
+
],
|
|
59
|
+
"license": "UNLICENSED",
|
|
60
|
+
"main": "./dist/index.umd.js",
|
|
61
|
+
"module": "./dist/index.es.js",
|
|
62
|
+
"name": "@prismicio/editor-fields",
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"@prismicio/editor-ui": "0.1.0-rc.1",
|
|
65
|
+
"react": "17",
|
|
66
|
+
"react-dom": "17"
|
|
67
|
+
},
|
|
68
|
+
"repository": {
|
|
69
|
+
"type": "git",
|
|
70
|
+
"url": "ssh://git@github.com:prismicio/editor.git",
|
|
71
|
+
"directory": "packages/editor-fields"
|
|
72
|
+
},
|
|
73
|
+
"scripts": {
|
|
74
|
+
"prepack": "yarn vite-build",
|
|
75
|
+
"vite-build": "vite build && tsc --build tsconfig-dist.json",
|
|
76
|
+
"vitest": "vitest",
|
|
77
|
+
"vitest-coverage": "vitest run --coverage"
|
|
78
|
+
},
|
|
79
|
+
"stableVersion": "0.0.0",
|
|
80
|
+
"types": "./dist/index.d.ts",
|
|
81
|
+
"version": "0.1.0-rc.2"
|
|
82
|
+
}
|