@tailor-cms/ce-file-manifest 0.1.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 +31 -56
- package/dist/index.d.cts +13 -10
- package/dist/index.d.mts +24 -0
- package/dist/index.mjs +26 -0
- package/package.json +17 -22
- package/dist/index.d.ts +0 -21
- package/dist/index.js +0 -33
package/dist/index.cjs
CHANGED
|
@@ -1,60 +1,35 @@
|
|
|
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
|
-
name: () => name,
|
|
25
|
-
type: () => type,
|
|
26
|
-
version: () => version
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
27
4
|
});
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
5
|
+
//#region src/index.ts
|
|
6
|
+
const type = "FILE";
|
|
7
|
+
const name = "File";
|
|
8
|
+
const initState = () => ({
|
|
9
|
+
url: null,
|
|
10
|
+
name: null,
|
|
11
|
+
label: null,
|
|
12
|
+
assets: {}
|
|
36
13
|
});
|
|
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
|
|
14
|
+
const version = "1.0";
|
|
15
|
+
const ui = {
|
|
16
|
+
icon: "mdi-file",
|
|
17
|
+
forceFullWidth: false
|
|
44
18
|
};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
19
|
+
const isEmpty = (data) => !data.url;
|
|
20
|
+
const manifest = {
|
|
21
|
+
type,
|
|
22
|
+
version: "1.0",
|
|
23
|
+
name,
|
|
24
|
+
ssr: false,
|
|
25
|
+
initState,
|
|
26
|
+
isEmpty,
|
|
27
|
+
ui
|
|
52
28
|
};
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
});
|
|
29
|
+
//#endregion
|
|
30
|
+
exports.default = manifest;
|
|
31
|
+
exports.initState = initState;
|
|
32
|
+
exports.isEmpty = isEmpty;
|
|
33
|
+
exports.name = name;
|
|
34
|
+
exports.type = type;
|
|
35
|
+
exports.version = version;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
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
|
-
|
|
9
|
-
|
|
5
|
+
url: string | null;
|
|
6
|
+
name: string | null;
|
|
7
|
+
label: string | null;
|
|
8
|
+
assets: {
|
|
9
|
+
url?: string;
|
|
10
|
+
};
|
|
10
11
|
}
|
|
11
12
|
type DataInitializer = common.DataInitializer<ElementData>;
|
|
12
13
|
type Element = common.Element<ElementData>;
|
|
13
14
|
type ElementManifest = common.ElementManifest<ElementData>;
|
|
14
|
-
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/index.d.ts
|
|
15
17
|
declare const type = "FILE";
|
|
16
18
|
declare const name = "File";
|
|
17
19
|
declare const initState: DataInitializer;
|
|
18
20
|
declare const version = "1.0";
|
|
21
|
+
declare const isEmpty: (data: ElementData) => boolean;
|
|
19
22
|
declare const manifest: ElementManifest;
|
|
20
|
-
|
|
21
|
-
export {
|
|
23
|
+
//#endregion
|
|
24
|
+
export { DataInitializer, Element, ElementData, ElementManifest, manifest as default, initState, isEmpty, name, type, version };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as common from "@tailor-cms/cek-common";
|
|
2
|
+
|
|
3
|
+
//#region src/interfaces.d.ts
|
|
4
|
+
interface ElementData extends common.ElementConfig {
|
|
5
|
+
url: string | null;
|
|
6
|
+
name: string | null;
|
|
7
|
+
label: string | null;
|
|
8
|
+
assets: {
|
|
9
|
+
url?: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
type DataInitializer = common.DataInitializer<ElementData>;
|
|
13
|
+
type Element = common.Element<ElementData>;
|
|
14
|
+
type ElementManifest = common.ElementManifest<ElementData>;
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/index.d.ts
|
|
17
|
+
declare const type = "FILE";
|
|
18
|
+
declare const name = "File";
|
|
19
|
+
declare const initState: DataInitializer;
|
|
20
|
+
declare const version = "1.0";
|
|
21
|
+
declare const isEmpty: (data: ElementData) => boolean;
|
|
22
|
+
declare const manifest: ElementManifest;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { DataInitializer, Element, ElementData, ElementManifest, manifest as default, initState, isEmpty, name, type, version };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region src/index.ts
|
|
2
|
+
const type = "FILE";
|
|
3
|
+
const name = "File";
|
|
4
|
+
const initState = () => ({
|
|
5
|
+
url: null,
|
|
6
|
+
name: null,
|
|
7
|
+
label: null,
|
|
8
|
+
assets: {}
|
|
9
|
+
});
|
|
10
|
+
const version = "1.0";
|
|
11
|
+
const ui = {
|
|
12
|
+
icon: "mdi-file",
|
|
13
|
+
forceFullWidth: false
|
|
14
|
+
};
|
|
15
|
+
const isEmpty = (data) => !data.url;
|
|
16
|
+
const manifest = {
|
|
17
|
+
type,
|
|
18
|
+
version: "1.0",
|
|
19
|
+
name,
|
|
20
|
+
ssr: false,
|
|
21
|
+
initState,
|
|
22
|
+
isEmpty,
|
|
23
|
+
ui
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
26
|
+
export { manifest as default, initState, isEmpty, name, type, version };
|
package/package.json
CHANGED
|
@@ -3,47 +3,42 @@
|
|
|
3
3
|
"description": "Tailor CMS file manifest",
|
|
4
4
|
"author": "Studion <info@gostudion.com> (https://github.com/tailor-cms)",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"version": "0.1
|
|
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.8.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.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as common from '@tailor-cms/cek-common';
|
|
2
|
-
|
|
3
|
-
interface ElementData extends common.ElementConfig {
|
|
4
|
-
url: string | null;
|
|
5
|
-
name: string | null;
|
|
6
|
-
label: string | null;
|
|
7
|
-
assets: {
|
|
8
|
-
url?: string;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
type DataInitializer = common.DataInitializer<ElementData>;
|
|
12
|
-
type Element = common.Element<ElementData>;
|
|
13
|
-
type ElementManifest = common.ElementManifest<ElementData>;
|
|
14
|
-
|
|
15
|
-
declare const type = "FILE";
|
|
16
|
-
declare const name = "File";
|
|
17
|
-
declare const initState: DataInitializer;
|
|
18
|
-
declare const version = "1.0";
|
|
19
|
-
declare const manifest: ElementManifest;
|
|
20
|
-
|
|
21
|
-
export { type DataInitializer, type Element, type ElementData, type ElementManifest, manifest as default, initState, name, type, version };
|
package/dist/index.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
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
|
-
};
|