@tailor-cms/ce-accordion-manifest 0.0.14 → 0.0.16

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
@@ -17,21 +17,29 @@ var __copyProps = (to, from, except, desc) => {
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
19
  // src/index.ts
20
- var src_exports = {};
21
- __export(src_exports, {
22
- default: () => src_default,
20
+ var index_exports = {};
21
+ __export(index_exports, {
22
+ default: () => index_default,
23
23
  initState: () => initState,
24
24
  name: () => name,
25
25
  type: () => type,
26
26
  version: () => version
27
27
  });
28
- module.exports = __toCommonJS(src_exports);
28
+ module.exports = __toCommonJS(index_exports);
29
29
  var import_uuid = require("uuid");
30
+ var id = (0, import_uuid.v4)();
30
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 = {
@@ -50,7 +58,7 @@ var manifest = {
50
58
  initState,
51
59
  ui
52
60
  };
53
- var src_default = manifest;
61
+ var index_default = manifest;
54
62
  // Annotate the CommonJS export names for ESM import in node:
55
63
  0 && (module.exports = {
56
64
  initState,
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;
@@ -59,4 +60,4 @@ 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;
@@ -59,4 +60,4 @@ 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 id = uuid();
3
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 = {
@@ -23,9 +31,9 @@ var manifest = {
23
31
  initState,
24
32
  ui
25
33
  };
26
- var src_default = manifest;
34
+ var index_default = manifest;
27
35
  export {
28
- src_default as default,
36
+ index_default as default,
29
37
  initState,
30
38
  name,
31
39
  type,
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.14",
6
+ "version": "0.0.16",
7
7
  "exports": {
8
8
  ".": {
9
9
  "import": "./dist/index.js",
@@ -17,8 +17,8 @@
17
17
  ],
18
18
  "devDependencies": {
19
19
  "@tailor-cms/eslint-config": "0.0.2",
20
- "tsup": "^7.2.0",
21
- "typescript": "^5.1.6"
20
+ "tsup": "^8.3.6",
21
+ "typescript": "^5.7.3"
22
22
  },
23
23
  "dependencies": {
24
24
  "uuid": "^11.0.5"