@tailor-cms/ce-image-manifest 1.1.1-beta.0 → 2.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/dist/index.cjs +30 -59
- package/dist/index.d.cts +11 -9
- package/dist/{index.d.ts → index.d.mts} +11 -9
- package/dist/index.mjs +25 -0
- package/package.json +17 -22
- package/dist/index.js +0 -35
package/dist/index.cjs
CHANGED
|
@@ -1,63 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
isEmpty: () => isEmpty,
|
|
25
|
-
name: () => name,
|
|
26
|
-
type: () => type,
|
|
27
|
-
version: () => version
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
28
4
|
});
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
5
|
+
//#region src/index.ts
|
|
6
|
+
const type = "IMAGE";
|
|
7
|
+
const name = "Image";
|
|
8
|
+
const initState = () => ({
|
|
9
|
+
url: null,
|
|
10
|
+
alt: "",
|
|
11
|
+
assets: {}
|
|
36
12
|
});
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
// Does element support only full width or can be used within layouts
|
|
42
|
-
// (e.g. 50/50 layout)
|
|
43
|
-
forceFullWidth: false
|
|
13
|
+
const version = "1.0";
|
|
14
|
+
const ui = {
|
|
15
|
+
icon: "mdi-image",
|
|
16
|
+
forceFullWidth: false
|
|
44
17
|
};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
18
|
+
const isEmpty = (data) => !data.url;
|
|
19
|
+
const manifest = {
|
|
20
|
+
type,
|
|
21
|
+
version: "1.0",
|
|
22
|
+
name,
|
|
23
|
+
ssr: false,
|
|
24
|
+
initState,
|
|
25
|
+
isEmpty,
|
|
26
|
+
ui
|
|
54
27
|
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
version
|
|
63
|
-
});
|
|
28
|
+
//#endregion
|
|
29
|
+
exports.default = manifest;
|
|
30
|
+
exports.initState = initState;
|
|
31
|
+
exports.isEmpty = isEmpty;
|
|
32
|
+
exports.name = name;
|
|
33
|
+
exports.type = type;
|
|
34
|
+
exports.version = version;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import * as common from
|
|
1
|
+
import * as common from "@tailor-cms/cek-common";
|
|
2
2
|
|
|
3
|
+
//#region src/interfaces.d.ts
|
|
3
4
|
interface ElementData extends common.ElementConfig {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
url: string | null;
|
|
6
|
+
alt?: string;
|
|
7
|
+
assets: {
|
|
8
|
+
url?: string;
|
|
9
|
+
};
|
|
9
10
|
}
|
|
10
11
|
type DataInitializer = common.DataInitializer<ElementData>;
|
|
11
12
|
type Element = common.Element<ElementData>;
|
|
12
13
|
type ElementManifest = common.ElementManifest<ElementData>;
|
|
13
|
-
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/index.d.ts
|
|
14
16
|
declare const type = "IMAGE";
|
|
15
17
|
declare const name = "Image";
|
|
16
18
|
declare const initState: DataInitializer;
|
|
17
19
|
declare const version = "1.0";
|
|
18
20
|
declare const isEmpty: (data: ElementData) => boolean;
|
|
19
21
|
declare const manifest: ElementManifest;
|
|
20
|
-
|
|
21
|
-
export {
|
|
22
|
+
//#endregion
|
|
23
|
+
export { DataInitializer, Element, ElementData, ElementManifest, manifest as default, initState, isEmpty, name, type, version };
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import * as common from
|
|
1
|
+
import * as common from "@tailor-cms/cek-common";
|
|
2
2
|
|
|
3
|
+
//#region src/interfaces.d.ts
|
|
3
4
|
interface ElementData extends common.ElementConfig {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
url: string | null;
|
|
6
|
+
alt?: string;
|
|
7
|
+
assets: {
|
|
8
|
+
url?: string;
|
|
9
|
+
};
|
|
9
10
|
}
|
|
10
11
|
type DataInitializer = common.DataInitializer<ElementData>;
|
|
11
12
|
type Element = common.Element<ElementData>;
|
|
12
13
|
type ElementManifest = common.ElementManifest<ElementData>;
|
|
13
|
-
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/index.d.ts
|
|
14
16
|
declare const type = "IMAGE";
|
|
15
17
|
declare const name = "Image";
|
|
16
18
|
declare const initState: DataInitializer;
|
|
17
19
|
declare const version = "1.0";
|
|
18
20
|
declare const isEmpty: (data: ElementData) => boolean;
|
|
19
21
|
declare const manifest: ElementManifest;
|
|
20
|
-
|
|
21
|
-
export {
|
|
22
|
+
//#endregion
|
|
23
|
+
export { DataInitializer, Element, ElementData, ElementManifest, manifest as default, initState, isEmpty, name, type, version };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/index.ts
|
|
2
|
+
const type = "IMAGE";
|
|
3
|
+
const name = "Image";
|
|
4
|
+
const initState = () => ({
|
|
5
|
+
url: null,
|
|
6
|
+
alt: "",
|
|
7
|
+
assets: {}
|
|
8
|
+
});
|
|
9
|
+
const version = "1.0";
|
|
10
|
+
const ui = {
|
|
11
|
+
icon: "mdi-image",
|
|
12
|
+
forceFullWidth: false
|
|
13
|
+
};
|
|
14
|
+
const isEmpty = (data) => !data.url;
|
|
15
|
+
const manifest = {
|
|
16
|
+
type,
|
|
17
|
+
version: "1.0",
|
|
18
|
+
name,
|
|
19
|
+
ssr: false,
|
|
20
|
+
initState,
|
|
21
|
+
isEmpty,
|
|
22
|
+
ui
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { manifest as default, initState, isEmpty, name, type, version };
|
package/package.json
CHANGED
|
@@ -3,47 +3,42 @@
|
|
|
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": "
|
|
6
|
+
"version": "2.0.1",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
|
-
"import": "./dist/index.
|
|
9
|
+
"import": "./dist/index.mjs",
|
|
10
10
|
"require": "./dist/index.cjs"
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"main": "./dist/index.cjs",
|
|
14
|
-
"types": "./dist/index.d.
|
|
14
|
+
"types": "./dist/index.d.mts",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@tailor-cms/cek-common": "^2.0.1"
|
|
20
|
+
},
|
|
18
21
|
"devDependencies": {
|
|
19
|
-
"@tailor-cms/
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"typescript": "^5.9.3"
|
|
22
|
+
"@tailor-cms/eslint-config": "^2.0.1",
|
|
23
|
+
"tsdown": "^0.21.10",
|
|
24
|
+
"typescript": "^6.0.3"
|
|
23
25
|
},
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"src/index.ts"
|
|
27
|
-
],
|
|
28
|
-
"target": [
|
|
29
|
-
"node14",
|
|
30
|
-
"es2022"
|
|
31
|
-
],
|
|
26
|
+
"tsdown": {
|
|
27
|
+
"target": "node24",
|
|
32
28
|
"format": [
|
|
33
29
|
"cjs",
|
|
34
30
|
"esm"
|
|
35
|
-
]
|
|
36
|
-
"bundle": true,
|
|
37
|
-
"minify": false,
|
|
38
|
-
"clean": false,
|
|
39
|
-
"dts": true
|
|
31
|
+
]
|
|
40
32
|
},
|
|
41
33
|
"publishConfig": {
|
|
42
34
|
"access": "public"
|
|
43
35
|
},
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=24"
|
|
38
|
+
},
|
|
44
39
|
"scripts": {
|
|
45
|
-
"dev": "
|
|
46
|
-
"build": "pnpm nuke:dist &&
|
|
40
|
+
"dev": "tsdown --watch",
|
|
41
|
+
"build": "pnpm nuke:dist && tsdown",
|
|
47
42
|
"lint": "eslint .",
|
|
48
43
|
"lint:fix": "pnpm lint --fix",
|
|
49
44
|
"nuke": "pnpm dlx del-cli dist node_modules",
|
package/dist/index.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
// src/index.ts
|
|
2
|
-
var type = "IMAGE";
|
|
3
|
-
var name = "Image";
|
|
4
|
-
var initState = () => ({
|
|
5
|
-
url: null,
|
|
6
|
-
alt: "",
|
|
7
|
-
assets: {}
|
|
8
|
-
});
|
|
9
|
-
var version = "1.0";
|
|
10
|
-
var ui = {
|
|
11
|
-
// Display icon, https://pictogrammers.com/library/mdi/
|
|
12
|
-
icon: "mdi-image",
|
|
13
|
-
// Does element support only full width or can be used within layouts
|
|
14
|
-
// (e.g. 50/50 layout)
|
|
15
|
-
forceFullWidth: false
|
|
16
|
-
};
|
|
17
|
-
var isEmpty = (data) => !data.url;
|
|
18
|
-
var manifest = {
|
|
19
|
-
type,
|
|
20
|
-
version,
|
|
21
|
-
name,
|
|
22
|
-
ssr: false,
|
|
23
|
-
initState,
|
|
24
|
-
isEmpty,
|
|
25
|
-
ui
|
|
26
|
-
};
|
|
27
|
-
var index_default = manifest;
|
|
28
|
-
export {
|
|
29
|
-
index_default as default,
|
|
30
|
-
initState,
|
|
31
|
-
isEmpty,
|
|
32
|
-
name,
|
|
33
|
-
type,
|
|
34
|
-
version
|
|
35
|
-
};
|