@open-commune/editor 0.2.19 → 0.2.21

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/index.d.mts CHANGED
@@ -24,6 +24,22 @@ interface UploadPlaceholderOptions {
24
24
  */
25
25
  declare const UploadPlaceholder: Node<UploadPlaceholderOptions, any>;
26
26
 
27
+ interface ImageNodeOptions {
28
+ upload: ((file: File) => Promise<{
29
+ id: string;
30
+ src: string;
31
+ title: string;
32
+ }>) | null;
33
+ fetch: ((attrs: {
34
+ id: string;
35
+ }) => Promise<{
36
+ src?: string;
37
+ title?: string;
38
+ }>) | null;
39
+ }
40
+ /** Image node: TipTap Image plus the `id` of the backing media. */
41
+ declare const ImageNode: _tiptap_core.Node<ImageNodeOptions, any>;
42
+
27
43
  /** Markdown-style `![title](src)` input rule, kept from the previous editor. */
28
44
  declare const fileInputRegex: RegExp;
29
45
  interface FileNodeOptions {
@@ -80,7 +96,7 @@ interface OpenCommuneEditorMedia {
80
96
  * The parity extension set. UEditor must ALSO receive `:image="false"` and
81
97
  * `:mention="false"`: its defaults collide with our node names.
82
98
  */
83
- declare function openCommuneSchemaExtensions(media?: Partial<OpenCommuneEditorMedia>): (_tiptap_core.Mark<_tiptap_extension_link.LinkOptions, any> | _tiptap_core.Node<_tiptap_extension_list.OrderedListOptions, any> | _tiptap_core.Extension<_tiptap_extension_unique_id.UniqueIDOptions, any> | _tiptap_core.Extension<Omit<_tiptap_extension_file_handler.FileHandlePluginOptions, "key" | "editor">, any> | _tiptap_core.Extension<_tiptap_extension_text_align.TextAlignOptions, any> | _tiptap_core.Mark<_tiptap_extension_text_style.TextStyleOptions, any> | _tiptap_core.Mark<_tiptap_extension_highlight.HighlightOptions, any> | _tiptap_core.Extension<_tiptap_extension_typography.TypographyOptions, any> | _tiptap_core.Node<any, any> | _tiptap_core.Node<UploadPlaceholderOptions, any> | _tiptap_core.Node<FileNodeOptions, any> | _tiptap_core.Node<_tiptap_extension_details.DetailsOptions, any> | _tiptap_core.Node<_tiptap_extension_details.DetailsSummaryOptions, any>)[];
99
+ declare function openCommuneSchemaExtensions(media?: Partial<OpenCommuneEditorMedia>): (_tiptap_core.Node<ImageNodeOptions, any> | _tiptap_core.Mark<_tiptap_extension_link.LinkOptions, any> | _tiptap_core.Node<_tiptap_extension_list.OrderedListOptions, any> | _tiptap_core.Extension<_tiptap_extension_unique_id.UniqueIDOptions, any> | _tiptap_core.Extension<Omit<_tiptap_extension_file_handler.FileHandlePluginOptions, "key" | "editor">, any> | _tiptap_core.Extension<_tiptap_extension_text_align.TextAlignOptions, any> | _tiptap_core.Mark<_tiptap_extension_text_style.TextStyleOptions, any> | _tiptap_core.Mark<_tiptap_extension_highlight.HighlightOptions, any> | _tiptap_core.Extension<_tiptap_extension_typography.TypographyOptions, any> | _tiptap_core.Node<any, any> | _tiptap_core.Node<UploadPlaceholderOptions, any> | _tiptap_core.Node<_tiptap_extension_details.DetailsOptions, any> | _tiptap_core.Node<_tiptap_extension_details.DetailsSummaryOptions, any>)[];
84
100
 
85
101
  /**
86
102
  * Stable block ids matching stored content: attribute `uid`, UUID v4.
@@ -97,22 +113,6 @@ declare const Uid: _tiptap_core.Extension<_tiptap_extension_unique_id.UniqueIDOp
97
113
  */
98
114
  declare const Callout: Node<any, any>;
99
115
 
100
- interface ImageNodeOptions {
101
- upload: ((file: File) => Promise<{
102
- id: string;
103
- src: string;
104
- title: string;
105
- }>) | null;
106
- fetch: ((attrs: {
107
- id: string;
108
- }) => Promise<{
109
- src?: string;
110
- title?: string;
111
- }>) | null;
112
- }
113
- /** Image node: TipTap Image plus the `id` of the backing media. */
114
- declare const ImageNode: _tiptap_core.Node<ImageNodeOptions, any>;
115
-
116
116
  /**
117
117
  * External-service iframe. Attrs mirror stored content exactly: embeds carry
118
118
  * no uid and `frameborder` is a string.
package/dist/index.d.ts CHANGED
@@ -24,6 +24,22 @@ interface UploadPlaceholderOptions {
24
24
  */
25
25
  declare const UploadPlaceholder: Node<UploadPlaceholderOptions, any>;
26
26
 
27
+ interface ImageNodeOptions {
28
+ upload: ((file: File) => Promise<{
29
+ id: string;
30
+ src: string;
31
+ title: string;
32
+ }>) | null;
33
+ fetch: ((attrs: {
34
+ id: string;
35
+ }) => Promise<{
36
+ src?: string;
37
+ title?: string;
38
+ }>) | null;
39
+ }
40
+ /** Image node: TipTap Image plus the `id` of the backing media. */
41
+ declare const ImageNode: _tiptap_core.Node<ImageNodeOptions, any>;
42
+
27
43
  /** Markdown-style `![title](src)` input rule, kept from the previous editor. */
28
44
  declare const fileInputRegex: RegExp;
29
45
  interface FileNodeOptions {
@@ -80,7 +96,7 @@ interface OpenCommuneEditorMedia {
80
96
  * The parity extension set. UEditor must ALSO receive `:image="false"` and
81
97
  * `:mention="false"`: its defaults collide with our node names.
82
98
  */
83
- declare function openCommuneSchemaExtensions(media?: Partial<OpenCommuneEditorMedia>): (_tiptap_core.Mark<_tiptap_extension_link.LinkOptions, any> | _tiptap_core.Node<_tiptap_extension_list.OrderedListOptions, any> | _tiptap_core.Extension<_tiptap_extension_unique_id.UniqueIDOptions, any> | _tiptap_core.Extension<Omit<_tiptap_extension_file_handler.FileHandlePluginOptions, "key" | "editor">, any> | _tiptap_core.Extension<_tiptap_extension_text_align.TextAlignOptions, any> | _tiptap_core.Mark<_tiptap_extension_text_style.TextStyleOptions, any> | _tiptap_core.Mark<_tiptap_extension_highlight.HighlightOptions, any> | _tiptap_core.Extension<_tiptap_extension_typography.TypographyOptions, any> | _tiptap_core.Node<any, any> | _tiptap_core.Node<UploadPlaceholderOptions, any> | _tiptap_core.Node<FileNodeOptions, any> | _tiptap_core.Node<_tiptap_extension_details.DetailsOptions, any> | _tiptap_core.Node<_tiptap_extension_details.DetailsSummaryOptions, any>)[];
99
+ declare function openCommuneSchemaExtensions(media?: Partial<OpenCommuneEditorMedia>): (_tiptap_core.Node<ImageNodeOptions, any> | _tiptap_core.Mark<_tiptap_extension_link.LinkOptions, any> | _tiptap_core.Node<_tiptap_extension_list.OrderedListOptions, any> | _tiptap_core.Extension<_tiptap_extension_unique_id.UniqueIDOptions, any> | _tiptap_core.Extension<Omit<_tiptap_extension_file_handler.FileHandlePluginOptions, "key" | "editor">, any> | _tiptap_core.Extension<_tiptap_extension_text_align.TextAlignOptions, any> | _tiptap_core.Mark<_tiptap_extension_text_style.TextStyleOptions, any> | _tiptap_core.Mark<_tiptap_extension_highlight.HighlightOptions, any> | _tiptap_core.Extension<_tiptap_extension_typography.TypographyOptions, any> | _tiptap_core.Node<any, any> | _tiptap_core.Node<UploadPlaceholderOptions, any> | _tiptap_core.Node<_tiptap_extension_details.DetailsOptions, any> | _tiptap_core.Node<_tiptap_extension_details.DetailsSummaryOptions, any>)[];
84
100
 
85
101
  /**
86
102
  * Stable block ids matching stored content: attribute `uid`, UUID v4.
@@ -97,22 +113,6 @@ declare const Uid: _tiptap_core.Extension<_tiptap_extension_unique_id.UniqueIDOp
97
113
  */
98
114
  declare const Callout: Node<any, any>;
99
115
 
100
- interface ImageNodeOptions {
101
- upload: ((file: File) => Promise<{
102
- id: string;
103
- src: string;
104
- title: string;
105
- }>) | null;
106
- fetch: ((attrs: {
107
- id: string;
108
- }) => Promise<{
109
- src?: string;
110
- title?: string;
111
- }>) | null;
112
- }
113
- /** Image node: TipTap Image plus the `id` of the backing media. */
114
- declare const ImageNode: _tiptap_core.Node<ImageNodeOptions, any>;
115
-
116
116
  /**
117
117
  * External-service iframe. Attrs mirror stored content exactly: embeds carry
118
118
  * no uid and `frameborder` is a string.
package/package.json CHANGED
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "description": "The rich-text editor: document schema, extensions and their sanitisation.",
38
38
  "license": "AGPL-3.0-or-later",
39
- "version": "0.2.19",
39
+ "version": "0.2.21",
40
40
  "sideEffects": false,
41
41
  "files": [
42
42
  "dist"