@tailor-cms/ce-accordion-manifest 0.0.13 → 0.0.15

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.cjs CHANGED
@@ -27,11 +27,19 @@ __export(src_exports, {
27
27
  });
28
28
  module.exports = __toCommonJS(src_exports);
29
29
  var import_uuid = require("uuid");
30
- var type = "CE_ACCORDION";
30
+ var id = (0, import_uuid.v4)();
31
+ var type = "ACCORDION";
31
32
  var name = "Accordion";
32
33
  var initState = () => ({
33
34
  embeds: {},
34
- items: [{ id: (0, import_uuid.v4)(), title: "Accordion Item Title", elementIds: [] }]
35
+ items: {
36
+ [id]: {
37
+ id,
38
+ header: "Accordion Item Title",
39
+ body: {},
40
+ position: 1
41
+ }
42
+ }
35
43
  });
36
44
  var version = "1.0";
37
45
  var ui = {
package/dist/index.d.cts CHANGED
@@ -1,11 +1,12 @@
1
1
  interface AccordionItem {
2
2
  id: string;
3
- title: string;
4
- elementIds: string[];
3
+ header: string;
4
+ body: Record<string, any>;
5
+ position: number;
5
6
  }
6
7
  interface ElementData {
7
8
  embeds: Record<string, any>;
8
- items: AccordionItem[];
9
+ items: Record<string, AccordionItem>;
9
10
  }
10
11
  interface Element {
11
12
  id: number;
@@ -53,10 +54,10 @@ interface ElementManifest {
53
54
  };
54
55
  }
55
56
 
56
- declare const type = "CE_ACCORDION";
57
+ declare const type = "ACCORDION";
57
58
  declare const name = "Accordion";
58
59
  declare const initState: DataInitializer;
59
60
  declare const version = "1.0";
60
61
  declare const manifest: ElementManifest;
61
62
 
62
- export { type DataInitializer, type Element, type ElementData, type ElementManifest, manifest as default, initState, name, type, version };
63
+ export { type AccordionItem, type DataInitializer, type Element, type ElementData, type ElementManifest, manifest as default, initState, name, type, version };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  interface AccordionItem {
2
2
  id: string;
3
- title: string;
4
- elementIds: string[];
3
+ header: string;
4
+ body: Record<string, any>;
5
+ position: number;
5
6
  }
6
7
  interface ElementData {
7
8
  embeds: Record<string, any>;
8
- items: AccordionItem[];
9
+ items: Record<string, AccordionItem>;
9
10
  }
10
11
  interface Element {
11
12
  id: number;
@@ -53,10 +54,10 @@ interface ElementManifest {
53
54
  };
54
55
  }
55
56
 
56
- declare const type = "CE_ACCORDION";
57
+ declare const type = "ACCORDION";
57
58
  declare const name = "Accordion";
58
59
  declare const initState: DataInitializer;
59
60
  declare const version = "1.0";
60
61
  declare const manifest: ElementManifest;
61
62
 
62
- export { type DataInitializer, type Element, type ElementData, type ElementManifest, manifest as default, initState, name, type, version };
63
+ export { type AccordionItem, type DataInitializer, type Element, type ElementData, type ElementManifest, manifest as default, initState, name, type, version };
package/dist/index.js CHANGED
@@ -1,10 +1,18 @@
1
1
  // src/index.ts
2
2
  import { v4 as uuid } from "uuid";
3
- var type = "CE_ACCORDION";
3
+ var id = uuid();
4
+ var type = "ACCORDION";
4
5
  var name = "Accordion";
5
6
  var initState = () => ({
6
7
  embeds: {},
7
- items: [{ id: uuid(), title: "Accordion Item Title", elementIds: [] }]
8
+ items: {
9
+ [id]: {
10
+ id,
11
+ header: "Accordion Item Title",
12
+ body: {},
13
+ position: 1
14
+ }
15
+ }
8
16
  });
9
17
  var version = "1.0";
10
18
  var ui = {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Tailor CMS accordion element",
4
4
  "author": "Studion <info@gostudion.com> (https://github.com/tailor-cms)",
5
5
  "type": "module",
6
- "version": "0.0.13",
6
+ "version": "0.0.15",
7
7
  "exports": {
8
8
  ".": {
9
9
  "import": "./dist/index.js",