@tailor-cms/ce-brightcove-video-manifest 0.0.3 → 2.0.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
@@ -1,59 +1,33 @@
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
1
+ Object.defineProperties(exports, {
2
+ __esModule: { value: true },
3
+ [Symbol.toStringTag]: { value: "Module" }
27
4
  });
28
- module.exports = __toCommonJS(index_exports);
29
- var type = "BRIGHTCOVE_VIDEO";
30
- var name = "Brightcove Video";
31
- var initState = () => ({
32
- accountId: "",
33
- playerId: "",
34
- videoId: ""
5
+ //#region src/index.ts
6
+ const type = "BRIGHTCOVE_VIDEO";
7
+ const name = "Brightcove Video";
8
+ const initState = () => ({
9
+ accountId: "",
10
+ playerId: "",
11
+ videoId: ""
35
12
  });
36
- var version = "1.0";
37
- var ui = {
38
- // Display icon, https://pictogrammers.com/library/mdi/
39
- icon: "mdi-video",
40
- // Does element support only full width or can be used within layouts
41
- // (e.g. 50/50 layout)
42
- forceFullWidth: false
13
+ const version = "1.0";
14
+ const isEmpty = (data) => !data.videoId;
15
+ const manifest = {
16
+ type,
17
+ version: "1.0",
18
+ name,
19
+ ssr: false,
20
+ initState,
21
+ isEmpty,
22
+ ui: {
23
+ icon: "mdi-video",
24
+ forceFullWidth: false
25
+ }
43
26
  };
44
- var manifest = {
45
- type,
46
- version: "1.0",
47
- name,
48
- ssr: false,
49
- initState,
50
- ui
51
- };
52
- var index_default = manifest;
53
- // Annotate the CommonJS export names for ESM import in node:
54
- 0 && (module.exports = {
55
- initState,
56
- name,
57
- type,
58
- version
59
- });
27
+ //#endregion
28
+ exports.default = manifest;
29
+ exports.initState = initState;
30
+ exports.isEmpty = isEmpty;
31
+ exports.name = name;
32
+ exports.type = type;
33
+ exports.version = version;
package/dist/index.d.cts CHANGED
@@ -1,57 +1,21 @@
1
- interface ElementData {
2
- accountId?: string;
3
- playerId?: string;
4
- videoId?: string;
5
- }
6
- interface Element {
7
- id: number;
8
- uid: string;
9
- activityId: number;
10
- repositoryId: number;
11
- contentId: string;
12
- contentSignature: string;
13
- type: string;
14
- position: number;
15
- data: ElementData;
16
- meta: {
17
- [key: string]: unknown;
18
- };
19
- refs: {
20
- [key: string]: unknown;
21
- };
22
- linked: boolean;
23
- detached: boolean;
24
- createdAt: string;
25
- updatedAt: string;
26
- deletedAt: string | null;
27
- }
28
- type DataInitializer = () => ElementData;
29
- interface ElementManifest {
30
- type: string;
31
- version: string;
32
- name: string;
33
- ssr: boolean;
34
- initState: DataInitializer;
35
- Edit?: object;
36
- TopToolbar?: object;
37
- SideToolbar?: object;
38
- Display?: object;
39
- ui: {
40
- icon: string;
41
- forceFullWidth: boolean;
42
- };
43
- mocks?: {
44
- displayContexts: Array<{
45
- name: string;
46
- data: any;
47
- }>;
48
- };
49
- }
1
+ import * as common from "@tailor-cms/cek-common";
50
2
 
3
+ //#region src/interfaces.d.ts
4
+ interface ElementData extends common.ElementConfig {
5
+ accountId?: string;
6
+ playerId?: string;
7
+ videoId?: string;
8
+ }
9
+ type DataInitializer = common.DataInitializer<ElementData>;
10
+ type Element = common.Element<ElementData>;
11
+ type ElementManifest = common.ElementManifest<ElementData>;
12
+ //#endregion
13
+ //#region src/index.d.ts
51
14
  declare const type = "BRIGHTCOVE_VIDEO";
52
15
  declare const name = "Brightcove Video";
53
16
  declare const initState: DataInitializer;
54
17
  declare const version = "1.0";
18
+ declare const isEmpty: (data: ElementData) => boolean;
55
19
  declare const manifest: ElementManifest;
56
-
57
- export { type DataInitializer, type Element, type ElementData, type ElementManifest, manifest as default, initState, name, type, version };
20
+ //#endregion
21
+ export { DataInitializer, Element, ElementData, ElementManifest, manifest as default, initState, isEmpty, name, type, version };
@@ -0,0 +1,21 @@
1
+ import * as common from "@tailor-cms/cek-common";
2
+
3
+ //#region src/interfaces.d.ts
4
+ interface ElementData extends common.ElementConfig {
5
+ accountId?: string;
6
+ playerId?: string;
7
+ videoId?: string;
8
+ }
9
+ type DataInitializer = common.DataInitializer<ElementData>;
10
+ type Element = common.Element<ElementData>;
11
+ type ElementManifest = common.ElementManifest<ElementData>;
12
+ //#endregion
13
+ //#region src/index.d.ts
14
+ declare const type = "BRIGHTCOVE_VIDEO";
15
+ declare const name = "Brightcove Video";
16
+ declare const initState: DataInitializer;
17
+ declare const version = "1.0";
18
+ declare const isEmpty: (data: ElementData) => boolean;
19
+ declare const manifest: ElementManifest;
20
+ //#endregion
21
+ export { DataInitializer, Element, ElementData, ElementManifest, manifest as default, initState, isEmpty, name, type, version };
package/dist/index.mjs ADDED
@@ -0,0 +1,24 @@
1
+ //#region src/index.ts
2
+ const type = "BRIGHTCOVE_VIDEO";
3
+ const name = "Brightcove Video";
4
+ const initState = () => ({
5
+ accountId: "",
6
+ playerId: "",
7
+ videoId: ""
8
+ });
9
+ const version = "1.0";
10
+ const isEmpty = (data) => !data.videoId;
11
+ const manifest = {
12
+ type,
13
+ version: "1.0",
14
+ name,
15
+ ssr: false,
16
+ initState,
17
+ isEmpty,
18
+ ui: {
19
+ icon: "mdi-video",
20
+ forceFullWidth: false
21
+ }
22
+ };
23
+ //#endregion
24
+ export { manifest as default, initState, isEmpty, name, type, version };
package/package.json CHANGED
@@ -3,47 +3,46 @@
3
3
  "description": "Tailor CMS Brightcove video manifest",
4
4
  "author": "Studion <info@gostudion.com> (https://github.com/tailor-cms)",
5
5
  "type": "module",
6
- "version": "0.0.3",
6
+ "version": "2.0.0",
7
7
  "exports": {
8
8
  ".": {
9
- "import": "./dist/index.js",
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.ts",
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/eslint-config": "0.0.2",
20
- "tsup": "^8.3.6",
21
- "typescript": "^5.7.3"
22
+ "@tailor-cms/eslint-config": "2.0.1",
23
+ "tsdown": "^0.21.10",
24
+ "typescript": "^6.0.3"
22
25
  },
23
- "tsup": {
24
- "entry": [
25
- "src/index.ts"
26
- ],
27
- "target": [
28
- "node14",
29
- "es2022"
30
- ],
26
+ "tsdown": {
27
+ "target": "node24",
31
28
  "format": [
32
29
  "cjs",
33
30
  "esm"
34
- ],
35
- "bundle": true,
36
- "minify": false,
37
- "clean": false,
38
- "dts": true
31
+ ]
39
32
  },
40
33
  "publishConfig": {
41
34
  "access": "public"
42
35
  },
36
+ "engines": {
37
+ "node": ">=24"
38
+ },
43
39
  "scripts": {
44
- "dev": "tsup --watch",
45
- "build": "tsup",
46
- "lint": "eslint --ext .js,.ts .",
47
- "lint:fix": "pnpm lint --fix"
40
+ "dev": "tsdown --watch",
41
+ "build": "pnpm nuke:dist && tsdown",
42
+ "lint": "eslint .",
43
+ "lint:fix": "pnpm lint --fix",
44
+ "nuke": "pnpm dlx del-cli dist node_modules",
45
+ "nuke:dist": "pnpm dlx del-cli dist",
46
+ "prepublish": "pnpm build"
48
47
  }
49
48
  }
package/dist/index.d.ts DELETED
@@ -1,57 +0,0 @@
1
- interface ElementData {
2
- accountId?: string;
3
- playerId?: string;
4
- videoId?: string;
5
- }
6
- interface Element {
7
- id: number;
8
- uid: string;
9
- activityId: number;
10
- repositoryId: number;
11
- contentId: string;
12
- contentSignature: string;
13
- type: string;
14
- position: number;
15
- data: ElementData;
16
- meta: {
17
- [key: string]: unknown;
18
- };
19
- refs: {
20
- [key: string]: unknown;
21
- };
22
- linked: boolean;
23
- detached: boolean;
24
- createdAt: string;
25
- updatedAt: string;
26
- deletedAt: string | null;
27
- }
28
- type DataInitializer = () => ElementData;
29
- interface ElementManifest {
30
- type: string;
31
- version: string;
32
- name: string;
33
- ssr: boolean;
34
- initState: DataInitializer;
35
- Edit?: object;
36
- TopToolbar?: object;
37
- SideToolbar?: object;
38
- Display?: object;
39
- ui: {
40
- icon: string;
41
- forceFullWidth: boolean;
42
- };
43
- mocks?: {
44
- displayContexts: Array<{
45
- name: string;
46
- data: any;
47
- }>;
48
- };
49
- }
50
-
51
- declare const type = "BRIGHTCOVE_VIDEO";
52
- declare const name = "Brightcove Video";
53
- declare const initState: DataInitializer;
54
- declare const version = "1.0";
55
- declare const manifest: ElementManifest;
56
-
57
- export { type DataInitializer, type Element, type ElementData, type ElementManifest, manifest as default, initState, name, type, version };
package/dist/index.js DELETED
@@ -1,32 +0,0 @@
1
- // src/index.ts
2
- var type = "BRIGHTCOVE_VIDEO";
3
- var name = "Brightcove Video";
4
- var initState = () => ({
5
- accountId: "",
6
- playerId: "",
7
- videoId: ""
8
- });
9
- var version = "1.0";
10
- var ui = {
11
- // Display icon, https://pictogrammers.com/library/mdi/
12
- icon: "mdi-video",
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 manifest = {
18
- type,
19
- version: "1.0",
20
- name,
21
- ssr: false,
22
- initState,
23
- ui
24
- };
25
- var index_default = manifest;
26
- export {
27
- index_default as default,
28
- initState,
29
- name,
30
- type,
31
- version
32
- };