@tailor-cms/ce-image-manifest 1.0.3 → 1.1.0

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,15 +17,15 @@ 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 type = "IMAGE";
30
30
  var name = "Image";
31
31
  var initState = () => ({
@@ -39,7 +39,7 @@ var ui = {
39
39
  icon: "mdi-image",
40
40
  // Does element support only full width or can be used within layouts
41
41
  // (e.g. 50/50 layout)
42
- forceFullWidth: true
42
+ forceFullWidth: false
43
43
  };
44
44
  var manifest = {
45
45
  type,
@@ -49,7 +49,7 @@ var manifest = {
49
49
  initState,
50
50
  ui
51
51
  };
52
- var src_default = manifest;
52
+ var index_default = manifest;
53
53
  // Annotate the CommonJS export names for ESM import in node:
54
54
  0 && (module.exports = {
55
55
  initState,
package/dist/index.d.cts CHANGED
@@ -1,54 +1,15 @@
1
- interface ElementData {
1
+ import * as common from '@tailor-cms/cek-common';
2
+
3
+ interface ElementData extends common.ElementConfig {
2
4
  url: string | null;
3
5
  alt?: string;
4
6
  assets: {
5
7
  url?: string;
6
8
  };
7
9
  }
8
- interface Element {
9
- id: number;
10
- uid: string;
11
- activityId: number;
12
- repositoryId: number;
13
- contentId: string;
14
- contentSignature: string;
15
- type: string;
16
- position: number;
17
- data: ElementData;
18
- meta: {
19
- [key: string]: unknown;
20
- };
21
- refs: {
22
- [key: string]: unknown;
23
- };
24
- linked: boolean;
25
- detached: boolean;
26
- createdAt: string;
27
- updatedAt: string;
28
- deletedAt: string | null;
29
- }
30
- type DataInitializer = () => ElementData;
31
- interface ElementManifest {
32
- type: string;
33
- version: string;
34
- name: string;
35
- ssr: boolean;
36
- initState: DataInitializer;
37
- Edit?: object;
38
- TopToolbar?: object;
39
- SideToolbar?: object;
40
- Display?: object;
41
- ui: {
42
- icon: string;
43
- forceFullWidth: boolean;
44
- };
45
- mocks?: {
46
- displayContexts: Array<{
47
- name: string;
48
- data: any;
49
- }>;
50
- };
51
- }
10
+ type DataInitializer = common.DataInitializer<ElementData>;
11
+ type Element = common.Element<ElementData>;
12
+ type ElementManifest = common.ElementManifest<ElementData>;
52
13
 
53
14
  declare const type = "IMAGE";
54
15
  declare const name = "Image";
package/dist/index.d.ts CHANGED
@@ -1,54 +1,15 @@
1
- interface ElementData {
1
+ import * as common from '@tailor-cms/cek-common';
2
+
3
+ interface ElementData extends common.ElementConfig {
2
4
  url: string | null;
3
5
  alt?: string;
4
6
  assets: {
5
7
  url?: string;
6
8
  };
7
9
  }
8
- interface Element {
9
- id: number;
10
- uid: string;
11
- activityId: number;
12
- repositoryId: number;
13
- contentId: string;
14
- contentSignature: string;
15
- type: string;
16
- position: number;
17
- data: ElementData;
18
- meta: {
19
- [key: string]: unknown;
20
- };
21
- refs: {
22
- [key: string]: unknown;
23
- };
24
- linked: boolean;
25
- detached: boolean;
26
- createdAt: string;
27
- updatedAt: string;
28
- deletedAt: string | null;
29
- }
30
- type DataInitializer = () => ElementData;
31
- interface ElementManifest {
32
- type: string;
33
- version: string;
34
- name: string;
35
- ssr: boolean;
36
- initState: DataInitializer;
37
- Edit?: object;
38
- TopToolbar?: object;
39
- SideToolbar?: object;
40
- Display?: object;
41
- ui: {
42
- icon: string;
43
- forceFullWidth: boolean;
44
- };
45
- mocks?: {
46
- displayContexts: Array<{
47
- name: string;
48
- data: any;
49
- }>;
50
- };
51
- }
10
+ type DataInitializer = common.DataInitializer<ElementData>;
11
+ type Element = common.Element<ElementData>;
12
+ type ElementManifest = common.ElementManifest<ElementData>;
52
13
 
53
14
  declare const type = "IMAGE";
54
15
  declare const name = "Image";
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ var ui = {
12
12
  icon: "mdi-image",
13
13
  // Does element support only full width or can be used within layouts
14
14
  // (e.g. 50/50 layout)
15
- forceFullWidth: true
15
+ forceFullWidth: false
16
16
  };
17
17
  var manifest = {
18
18
  type,
@@ -22,9 +22,9 @@ var manifest = {
22
22
  initState,
23
23
  ui
24
24
  };
25
- var src_default = manifest;
25
+ var index_default = manifest;
26
26
  export {
27
- src_default as default,
27
+ index_default as default,
28
28
  initState,
29
29
  name,
30
30
  type,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Tailor CMS image element manifest",
4
4
  "author": "Studion <info@gostudion.com> (https://github.com/tailor-cms)",
5
5
  "type": "module",
6
- "version": "1.0.3",
6
+ "version": "1.1.0",
7
7
  "exports": {
8
8
  ".": {
9
9
  "import": "./dist/index.js",
@@ -16,9 +16,10 @@
16
16
  "dist"
17
17
  ],
18
18
  "devDependencies": {
19
- "@tailor-cms/eslint-config": "0.0.2",
20
- "tsup": "^7.2.0",
21
- "typescript": "^5.1.6"
19
+ "@tailor-cms/cek-common": "^1.3.2",
20
+ "@tailor-cms/eslint-config": "1.1.2",
21
+ "tsup": "^8.5.0",
22
+ "typescript": "^5.8.3"
22
23
  },
23
24
  "tsup": {
24
25
  "entry": [
@@ -42,8 +43,11 @@
42
43
  },
43
44
  "scripts": {
44
45
  "dev": "tsup --watch",
45
- "build": "tsup",
46
- "lint": "eslint --ext .js,.ts .",
47
- "lint:fix": "pnpm lint --fix"
46
+ "build": "pnpm nuke:dist && tsup",
47
+ "lint": "eslint .",
48
+ "lint:fix": "pnpm lint --fix",
49
+ "nuke": "pnpm dlx del-cli dist node_modules",
50
+ "nuke:dist": "pnpm dlx del-cli dist",
51
+ "prepublish": "pnpm build"
48
52
  }
49
53
  }