@tailor-cms/ce-accordion-manifest 0.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/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # Content element manifest
2
+
3
+ Exposes shared element definition
package/dist/index.cjs ADDED
@@ -0,0 +1,65 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name2 in all)
7
+ __defProp(target, name2, { get: all[name2], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/index.ts
20
+ var src_exports = {};
21
+ __export(src_exports, {
22
+ default: () => src_default,
23
+ initState: () => initState,
24
+ mocks: () => mocks,
25
+ name: () => name,
26
+ type: () => type,
27
+ version: () => version
28
+ });
29
+ module.exports = __toCommonJS(src_exports);
30
+ var type = "CE_ACCORDION";
31
+ var name = "Accordion";
32
+ var initState = () => ({
33
+ embeds: {},
34
+ items: []
35
+ });
36
+ var version = "1.0";
37
+ var ui = {
38
+ // Display icon, https://pictogrammers.com/library/mdi/
39
+ icon: "mdi-view-sequential",
40
+ // Does element support only full width or can be used within layouts
41
+ // (e.g. 50/50 layout)
42
+ forceFullWidth: true
43
+ };
44
+ var mocks = {
45
+ displayContexts: [{ name: "No selection", data: {} }]
46
+ };
47
+ var manifest = {
48
+ type,
49
+ version: "1.0",
50
+ name,
51
+ isComposite: true,
52
+ ssr: false,
53
+ initState,
54
+ ui,
55
+ mocks
56
+ };
57
+ var src_default = manifest;
58
+ // Annotate the CommonJS export names for ESM import in node:
59
+ 0 && (module.exports = {
60
+ initState,
61
+ mocks,
62
+ name,
63
+ type,
64
+ version
65
+ });
@@ -0,0 +1,68 @@
1
+ interface AccordionItem {
2
+ id: string;
3
+ title?: string;
4
+ elementIds: string[];
5
+ }
6
+ interface ElementData {
7
+ embeds: Record<string, any>;
8
+ items: AccordionItem[];
9
+ }
10
+ interface Element {
11
+ id: number;
12
+ uid: string;
13
+ activityId: number;
14
+ repositoryId: number;
15
+ contentId: string;
16
+ contentSignature: string;
17
+ type: string;
18
+ position: number;
19
+ data: ElementData;
20
+ meta: {
21
+ [key: string]: unknown;
22
+ };
23
+ refs: {
24
+ [key: string]: unknown;
25
+ };
26
+ linked: boolean;
27
+ detached: boolean;
28
+ createdAt: string;
29
+ updatedAt: string;
30
+ deletedAt: string | null;
31
+ }
32
+ type DataInitializer = () => ElementData;
33
+ interface ElementManifest {
34
+ type: string;
35
+ version: string;
36
+ name: string;
37
+ ssr: boolean;
38
+ isComposite: boolean;
39
+ initState: DataInitializer;
40
+ Edit?: object;
41
+ TopToolbar?: object;
42
+ SideToolbar?: object;
43
+ Display?: object;
44
+ ui: {
45
+ icon: string;
46
+ forceFullWidth: boolean;
47
+ };
48
+ mocks?: {
49
+ displayContexts: Array<{
50
+ name: string;
51
+ data: any;
52
+ }>;
53
+ };
54
+ }
55
+
56
+ declare const type = "CE_ACCORDION";
57
+ declare const name = "Accordion";
58
+ declare const initState: DataInitializer;
59
+ declare const version = "1.0";
60
+ declare const mocks: {
61
+ displayContexts: {
62
+ name: string;
63
+ data: {};
64
+ }[];
65
+ };
66
+ declare const manifest: ElementManifest;
67
+
68
+ export { type DataInitializer, type Element, type ElementData, type ElementManifest, manifest as default, initState, mocks, name, type, version };
@@ -0,0 +1,68 @@
1
+ interface AccordionItem {
2
+ id: string;
3
+ title?: string;
4
+ elementIds: string[];
5
+ }
6
+ interface ElementData {
7
+ embeds: Record<string, any>;
8
+ items: AccordionItem[];
9
+ }
10
+ interface Element {
11
+ id: number;
12
+ uid: string;
13
+ activityId: number;
14
+ repositoryId: number;
15
+ contentId: string;
16
+ contentSignature: string;
17
+ type: string;
18
+ position: number;
19
+ data: ElementData;
20
+ meta: {
21
+ [key: string]: unknown;
22
+ };
23
+ refs: {
24
+ [key: string]: unknown;
25
+ };
26
+ linked: boolean;
27
+ detached: boolean;
28
+ createdAt: string;
29
+ updatedAt: string;
30
+ deletedAt: string | null;
31
+ }
32
+ type DataInitializer = () => ElementData;
33
+ interface ElementManifest {
34
+ type: string;
35
+ version: string;
36
+ name: string;
37
+ ssr: boolean;
38
+ isComposite: boolean;
39
+ initState: DataInitializer;
40
+ Edit?: object;
41
+ TopToolbar?: object;
42
+ SideToolbar?: object;
43
+ Display?: object;
44
+ ui: {
45
+ icon: string;
46
+ forceFullWidth: boolean;
47
+ };
48
+ mocks?: {
49
+ displayContexts: Array<{
50
+ name: string;
51
+ data: any;
52
+ }>;
53
+ };
54
+ }
55
+
56
+ declare const type = "CE_ACCORDION";
57
+ declare const name = "Accordion";
58
+ declare const initState: DataInitializer;
59
+ declare const version = "1.0";
60
+ declare const mocks: {
61
+ displayContexts: {
62
+ name: string;
63
+ data: {};
64
+ }[];
65
+ };
66
+ declare const manifest: ElementManifest;
67
+
68
+ export { type DataInitializer, type Element, type ElementData, type ElementManifest, manifest as default, initState, mocks, name, type, version };
package/dist/index.js ADDED
@@ -0,0 +1,37 @@
1
+ // src/index.ts
2
+ var type = "CE_ACCORDION";
3
+ var name = "Accordion";
4
+ var initState = () => ({
5
+ embeds: {},
6
+ items: []
7
+ });
8
+ var version = "1.0";
9
+ var ui = {
10
+ // Display icon, https://pictogrammers.com/library/mdi/
11
+ icon: "mdi-view-sequential",
12
+ // Does element support only full width or can be used within layouts
13
+ // (e.g. 50/50 layout)
14
+ forceFullWidth: true
15
+ };
16
+ var mocks = {
17
+ displayContexts: [{ name: "No selection", data: {} }]
18
+ };
19
+ var manifest = {
20
+ type,
21
+ version: "1.0",
22
+ name,
23
+ isComposite: true,
24
+ ssr: false,
25
+ initState,
26
+ ui,
27
+ mocks
28
+ };
29
+ var src_default = manifest;
30
+ export {
31
+ src_default as default,
32
+ initState,
33
+ mocks,
34
+ name,
35
+ type,
36
+ version
37
+ };
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@tailor-cms/ce-accordion-manifest",
3
+ "description": "Tailor CMS accordion element",
4
+ "author": "Studion <info@gostudion.com> (https://github.com/tailor-cms)",
5
+ "type": "module",
6
+ "version": "0.0.1",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./dist/index.js",
10
+ "require": "./dist/index.cjs"
11
+ }
12
+ },
13
+ "main": "./dist/index.cjs",
14
+ "types": "./dist/index.d.ts",
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "devDependencies": {
19
+ "@tailor-cms/eslint-config": "0.0.2",
20
+ "tsup": "^7.2.0",
21
+ "typescript": "^5.1.6"
22
+ },
23
+ "tsup": {
24
+ "entry": [
25
+ "src/index.ts"
26
+ ],
27
+ "target": [
28
+ "node14",
29
+ "es2022"
30
+ ],
31
+ "format": [
32
+ "cjs",
33
+ "esm"
34
+ ],
35
+ "bundle": true,
36
+ "minify": false,
37
+ "clean": false,
38
+ "dts": true
39
+ },
40
+ "publishConfig": {
41
+ "access": "public"
42
+ },
43
+ "scripts": {
44
+ "dev": "tsup --watch",
45
+ "build": "tsup",
46
+ "lint": "eslint --ext .js,.ts .",
47
+ "lint:fix": "pnpm lint --fix"
48
+ }
49
+ }