@tailor-cms/ce-file-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,60 @@
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 index_exports = {};
21
+ __export(index_exports, {
22
+ default: () => index_default,
23
+ initState: () => initState,
24
+ name: () => name,
25
+ type: () => type,
26
+ version: () => version
27
+ });
28
+ module.exports = __toCommonJS(index_exports);
29
+ var type = "FILE";
30
+ var name = "File";
31
+ var initState = () => ({
32
+ url: null,
33
+ name: null,
34
+ label: null,
35
+ assets: {}
36
+ });
37
+ var version = "1.0";
38
+ var ui = {
39
+ // Display icon, https://pictogrammers.com/library/mdi/
40
+ icon: "mdi-file",
41
+ // Does element support only full width or can be used within layouts
42
+ // (e.g. 50/50 layout)
43
+ forceFullWidth: false
44
+ };
45
+ var manifest = {
46
+ type,
47
+ version: "1.0",
48
+ name,
49
+ ssr: false,
50
+ initState,
51
+ ui
52
+ };
53
+ var index_default = manifest;
54
+ // Annotate the CommonJS export names for ESM import in node:
55
+ 0 && (module.exports = {
56
+ initState,
57
+ name,
58
+ type,
59
+ version
60
+ });
@@ -0,0 +1,60 @@
1
+ interface ElementData {
2
+ url: string | null;
3
+ name: string | null;
4
+ label: string | null;
5
+ assets: {
6
+ url?: string;
7
+ };
8
+ }
9
+ interface Element {
10
+ id: number;
11
+ uid: string;
12
+ activityId: number;
13
+ repositoryId: number;
14
+ contentId: string;
15
+ contentSignature: string;
16
+ type: string;
17
+ position: number;
18
+ data: ElementData;
19
+ meta: {
20
+ [key: string]: unknown;
21
+ };
22
+ refs: {
23
+ [key: string]: unknown;
24
+ };
25
+ linked: boolean;
26
+ detached: boolean;
27
+ createdAt: string;
28
+ updatedAt: string;
29
+ deletedAt: string | null;
30
+ }
31
+ type DataInitializer = () => ElementData;
32
+ interface ElementManifest {
33
+ type: string;
34
+ version: string;
35
+ name: string;
36
+ ssr: boolean;
37
+ initState: DataInitializer;
38
+ Edit?: object;
39
+ TopToolbar?: object;
40
+ SideToolbar?: object;
41
+ Display?: object;
42
+ ui: {
43
+ icon: string;
44
+ forceFullWidth: boolean;
45
+ };
46
+ mocks?: {
47
+ displayContexts: Array<{
48
+ name: string;
49
+ data: any;
50
+ }>;
51
+ };
52
+ }
53
+
54
+ declare const type = "FILE";
55
+ declare const name = "File";
56
+ declare const initState: DataInitializer;
57
+ declare const version = "1.0";
58
+ declare const manifest: ElementManifest;
59
+
60
+ export { type DataInitializer, type Element, type ElementData, type ElementManifest, manifest as default, initState, name, type, version };
@@ -0,0 +1,60 @@
1
+ interface ElementData {
2
+ url: string | null;
3
+ name: string | null;
4
+ label: string | null;
5
+ assets: {
6
+ url?: string;
7
+ };
8
+ }
9
+ interface Element {
10
+ id: number;
11
+ uid: string;
12
+ activityId: number;
13
+ repositoryId: number;
14
+ contentId: string;
15
+ contentSignature: string;
16
+ type: string;
17
+ position: number;
18
+ data: ElementData;
19
+ meta: {
20
+ [key: string]: unknown;
21
+ };
22
+ refs: {
23
+ [key: string]: unknown;
24
+ };
25
+ linked: boolean;
26
+ detached: boolean;
27
+ createdAt: string;
28
+ updatedAt: string;
29
+ deletedAt: string | null;
30
+ }
31
+ type DataInitializer = () => ElementData;
32
+ interface ElementManifest {
33
+ type: string;
34
+ version: string;
35
+ name: string;
36
+ ssr: boolean;
37
+ initState: DataInitializer;
38
+ Edit?: object;
39
+ TopToolbar?: object;
40
+ SideToolbar?: object;
41
+ Display?: object;
42
+ ui: {
43
+ icon: string;
44
+ forceFullWidth: boolean;
45
+ };
46
+ mocks?: {
47
+ displayContexts: Array<{
48
+ name: string;
49
+ data: any;
50
+ }>;
51
+ };
52
+ }
53
+
54
+ declare const type = "FILE";
55
+ declare const name = "File";
56
+ declare const initState: DataInitializer;
57
+ declare const version = "1.0";
58
+ declare const manifest: ElementManifest;
59
+
60
+ export { type DataInitializer, type Element, type ElementData, type ElementManifest, manifest as default, initState, name, type, version };
package/dist/index.js ADDED
@@ -0,0 +1,33 @@
1
+ // src/index.ts
2
+ var type = "FILE";
3
+ var name = "File";
4
+ var initState = () => ({
5
+ url: null,
6
+ name: null,
7
+ label: null,
8
+ assets: {}
9
+ });
10
+ var version = "1.0";
11
+ var ui = {
12
+ // Display icon, https://pictogrammers.com/library/mdi/
13
+ icon: "mdi-file",
14
+ // Does element support only full width or can be used within layouts
15
+ // (e.g. 50/50 layout)
16
+ forceFullWidth: false
17
+ };
18
+ var manifest = {
19
+ type,
20
+ version: "1.0",
21
+ name,
22
+ ssr: false,
23
+ initState,
24
+ ui
25
+ };
26
+ var index_default = manifest;
27
+ export {
28
+ index_default as default,
29
+ initState,
30
+ name,
31
+ type,
32
+ version
33
+ };
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@tailor-cms/ce-file-manifest",
3
+ "description": "Tailor CMS file manifest",
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": "^8.3.6",
21
+ "typescript": "^5.7.3"
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
+ }