@tailor-cms/ce-html-edit 0.2.1 → 2.0.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Studion
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1 +1,54 @@
1
- # Content element `Edit` component
1
+ # @tailor-cms/ce-html-edit
2
+
3
+ Authoring component for the **HTML** content element in [Tailor CMS](https://github.com/tailor-cms/author).
4
+
5
+ Renders the element inside the Tailor authoring interface, where content is created and edited.
6
+
7
+ ## Installation
8
+
9
+ ```sh
10
+ npm install @tailor-cms/ce-html-edit
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ Content elements are normally registered with Tailor through the element
16
+ registry rather than imported directly, but the package can be consumed on its
17
+ own:
18
+
19
+ ```ts
20
+ import { Edit } from '@tailor-cms/ce-html-edit';
21
+ ```
22
+
23
+ ## Element
24
+
25
+ | Property | Value |
26
+ | --- | --- |
27
+ | Name | HTML |
28
+ | Type | `TIPTAP_HTML` |
29
+ | Icon | [`mdi-text-box-outline`](https://pictogrammers.com/library/mdi/) |
30
+ | Composite | No |
31
+
32
+ ## Packages
33
+
34
+ This element ships as four packages, published together from the
35
+ [`ce-html`](https://github.com/tailor-cms/ce_html_default) repository:
36
+
37
+ | Package | Role |
38
+ | --- | --- |
39
+ | [`@tailor-cms/ce-html-manifest`](https://www.npmjs.com/package/@tailor-cms/ce-html-manifest) | Shared element definition |
40
+ | [`@tailor-cms/ce-html-edit`](https://www.npmjs.com/package/@tailor-cms/ce-html-edit) | Authoring component |
41
+ | [`@tailor-cms/ce-html-display`](https://www.npmjs.com/package/@tailor-cms/ce-html-display) | End-user component |
42
+ | [`@tailor-cms/ce-html-server`](https://www.npmjs.com/package/@tailor-cms/ce-html-server) | Server-side module |
43
+
44
+ ## Development
45
+
46
+ ```sh
47
+ pnpm install
48
+ pnpm dev # start the Content Element Kit runtime
49
+ pnpm build # build all packages
50
+ pnpm test # Playwright end-to-end suite
51
+ ```
52
+
53
+ Changes are released with [changesets](https://github.com/changesets/changesets);
54
+ run `pnpm changeset` to record one.
@@ -1,4 +1,4 @@
1
- import { Element } from '@tailor-cms/ce-html-manifest';
1
+ import type { Element, ElementData } from '@tailor-cms/ce-html-manifest';
2
2
  type __VLS_Props = {
3
3
  element: Element;
4
4
  isDragged: boolean;
@@ -6,9 +6,9 @@ type __VLS_Props = {
6
6
  isReadonly: boolean;
7
7
  };
8
8
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
- save: (...args: any[]) => void;
9
+ save: (data: ElementData) => any;
10
10
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
- onSave?: ((...args: any[]) => any) | undefined;
11
+ onSave?: ((data: ElementData) => any) | undefined;
12
12
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
13
  declare const _default: typeof __VLS_export;
14
14
  export default _default;
@@ -1,8 +1,8 @@
1
1
  type __VLS_Props = {
2
2
  active?: boolean;
3
3
  disabled?: boolean;
4
- density?: string;
5
- size?: string;
4
+ density?: 'default' | 'comfortable' | 'compact';
5
+ size?: string | number;
6
6
  label: string;
7
7
  icon: string;
8
8
  };
@@ -1,10 +1,11 @@
1
+ import type { Element, ElementData } from '@tailor-cms/ce-html-manifest';
1
2
  type __VLS_Props = {
2
3
  element: Element;
3
4
  };
4
5
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
- save: (...args: any[]) => void;
6
+ save: (data: ElementData) => any;
6
7
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
7
- onSave?: ((...args: any[]) => any) | undefined;
8
+ onSave?: ((data: ElementData) => any) | undefined;
8
9
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
10
  declare const _default: typeof __VLS_export;
10
11
  export default _default;