@open-commune/editor 0.1.3 → 0.1.4

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
@@ -1,11 +1,11 @@
1
+ import * as _tiptap_extension_details from '@tiptap/extension-details';
2
+ import * as _tiptap_core from '@tiptap/core';
3
+ import { Node } from '@tiptap/core';
1
4
  import * as _tiptap_extension_typography from '@tiptap/extension-typography';
2
5
  import * as _tiptap_extension_highlight from '@tiptap/extension-highlight';
3
6
  import * as _tiptap_extension_text_style from '@tiptap/extension-text-style';
4
7
  import * as _tiptap_extension_text_align from '@tiptap/extension-text-align';
5
8
  import * as _tiptap_extension_file_handler from '@tiptap/extension-file-handler';
6
- import * as _tiptap_core from '@tiptap/core';
7
- import { Node } from '@tiptap/core';
8
- import * as _tiptap_extension_details from '@tiptap/extension-details';
9
9
  import * as _tiptap_extension_unique_id from '@tiptap/extension-unique-id';
10
10
  import * as _tiptap_extension_list from '@tiptap/extension-list';
11
11
  import * as _tiptap_extension_link from '@tiptap/extension-link';
@@ -24,22 +24,6 @@ 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
-
43
27
  /** Markdown-style `![title](src)` input rule, kept from the previous editor. */
44
28
  declare const fileInputRegex: RegExp;
45
29
  interface FileNodeOptions {
@@ -96,7 +80,7 @@ interface CommunEditorMedia {
96
80
  * The parity extension set. UEditor must ALSO receive `:image="false"` and
97
81
  * `:mention="false"`: its defaults collide with our node names.
98
82
  */
99
- declare function communSchemaExtensions(media?: Partial<CommunEditorMedia>): (_tiptap_core.Extension<_tiptap_extension_unique_id.UniqueIDOptions, any> | _tiptap_core.Node<_tiptap_extension_details.DetailsOptions, any> | _tiptap_core.Node<_tiptap_extension_details.DetailsSummaryOptions, any> | _tiptap_core.Node<ImageNodeOptions, any> | _tiptap_core.Node<UploadPlaceholderOptions, any> | _tiptap_core.Mark<_tiptap_extension_link.LinkOptions, any> | _tiptap_core.Node<_tiptap_extension_list.OrderedListOptions, 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>)[];
83
+ declare function communSchemaExtensions(media?: Partial<CommunEditorMedia>): (_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>)[];
100
84
 
101
85
  /**
102
86
  * Stable block ids matching stored content: attribute `uid`, UUID v4.
@@ -113,6 +97,22 @@ declare const Uid: _tiptap_core.Extension<_tiptap_extension_unique_id.UniqueIDOp
113
97
  */
114
98
  declare const Callout: Node<any, any>;
115
99
 
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
@@ -1,11 +1,11 @@
1
+ import * as _tiptap_extension_details from '@tiptap/extension-details';
2
+ import * as _tiptap_core from '@tiptap/core';
3
+ import { Node } from '@tiptap/core';
1
4
  import * as _tiptap_extension_typography from '@tiptap/extension-typography';
2
5
  import * as _tiptap_extension_highlight from '@tiptap/extension-highlight';
3
6
  import * as _tiptap_extension_text_style from '@tiptap/extension-text-style';
4
7
  import * as _tiptap_extension_text_align from '@tiptap/extension-text-align';
5
8
  import * as _tiptap_extension_file_handler from '@tiptap/extension-file-handler';
6
- import * as _tiptap_core from '@tiptap/core';
7
- import { Node } from '@tiptap/core';
8
- import * as _tiptap_extension_details from '@tiptap/extension-details';
9
9
  import * as _tiptap_extension_unique_id from '@tiptap/extension-unique-id';
10
10
  import * as _tiptap_extension_list from '@tiptap/extension-list';
11
11
  import * as _tiptap_extension_link from '@tiptap/extension-link';
@@ -24,22 +24,6 @@ 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
-
43
27
  /** Markdown-style `![title](src)` input rule, kept from the previous editor. */
44
28
  declare const fileInputRegex: RegExp;
45
29
  interface FileNodeOptions {
@@ -96,7 +80,7 @@ interface CommunEditorMedia {
96
80
  * The parity extension set. UEditor must ALSO receive `:image="false"` and
97
81
  * `:mention="false"`: its defaults collide with our node names.
98
82
  */
99
- declare function communSchemaExtensions(media?: Partial<CommunEditorMedia>): (_tiptap_core.Extension<_tiptap_extension_unique_id.UniqueIDOptions, any> | _tiptap_core.Node<_tiptap_extension_details.DetailsOptions, any> | _tiptap_core.Node<_tiptap_extension_details.DetailsSummaryOptions, any> | _tiptap_core.Node<ImageNodeOptions, any> | _tiptap_core.Node<UploadPlaceholderOptions, any> | _tiptap_core.Mark<_tiptap_extension_link.LinkOptions, any> | _tiptap_core.Node<_tiptap_extension_list.OrderedListOptions, 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>)[];
83
+ declare function communSchemaExtensions(media?: Partial<CommunEditorMedia>): (_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>)[];
100
84
 
101
85
  /**
102
86
  * Stable block ids matching stored content: attribute `uid`, UUID v4.
@@ -113,6 +97,22 @@ declare const Uid: _tiptap_core.Extension<_tiptap_extension_unique_id.UniqueIDOp
113
97
  */
114
98
  declare const Callout: Node<any, any>;
115
99
 
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.1.3",
39
+ "version": "0.1.4",
40
40
  "sideEffects": false,
41
41
  "files": [
42
42
  "dist"