@tailor-cms/ce-flashcards-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 +3 -0
- package/dist/index.cjs +42 -0
- package/dist/index.d.cts +19 -0
- package/dist/index.d.mts +19 -0
- package/dist/index.mjs +32 -0
- package/package.json +48 -0
package/README.md
ADDED
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
//#region src/index.ts
|
|
6
|
+
const type = "FLASHCARDS";
|
|
7
|
+
const name = "Flashcards";
|
|
8
|
+
const initState = (_config) => ({});
|
|
9
|
+
const version = "1.0";
|
|
10
|
+
const ui = {
|
|
11
|
+
icon: "mdi-cards-outline",
|
|
12
|
+
forceFullWidth: true
|
|
13
|
+
};
|
|
14
|
+
const isEmpty = (_data) => false;
|
|
15
|
+
const mocks = {
|
|
16
|
+
displayContexts: [{
|
|
17
|
+
name: "Test preset 1",
|
|
18
|
+
data: { state: "I have a value" }
|
|
19
|
+
}, {
|
|
20
|
+
name: "Test preset 2",
|
|
21
|
+
data: { state: "I have a different value" }
|
|
22
|
+
}],
|
|
23
|
+
referencesData: { linked: [{ title: "Mock linked element" }] }
|
|
24
|
+
};
|
|
25
|
+
const manifest = {
|
|
26
|
+
type,
|
|
27
|
+
version: "1.0",
|
|
28
|
+
name,
|
|
29
|
+
ssr: false,
|
|
30
|
+
initState,
|
|
31
|
+
isEmpty,
|
|
32
|
+
ui,
|
|
33
|
+
mocks
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
exports.default = manifest;
|
|
37
|
+
exports.initState = initState;
|
|
38
|
+
exports.isEmpty = isEmpty;
|
|
39
|
+
exports.mocks = mocks;
|
|
40
|
+
exports.name = name;
|
|
41
|
+
exports.type = type;
|
|
42
|
+
exports.version = version;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as common from "@tailor-cms/cek-common";
|
|
2
|
+
import { ElementMocks } from "@tailor-cms/cek-common";
|
|
3
|
+
|
|
4
|
+
//#region src/interfaces.d.ts
|
|
5
|
+
type ElementData = common.ElementConfig;
|
|
6
|
+
type DataInitializer = common.DataInitializer<ElementData>;
|
|
7
|
+
type Element = common.Element<ElementData>;
|
|
8
|
+
type ElementManifest = common.ElementManifest<ElementData>;
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/index.d.ts
|
|
11
|
+
declare const type = "FLASHCARDS";
|
|
12
|
+
declare const name = "Flashcards";
|
|
13
|
+
declare const initState: DataInitializer;
|
|
14
|
+
declare const version = "1.0";
|
|
15
|
+
declare const isEmpty: (_data: ElementData) => boolean;
|
|
16
|
+
declare const mocks: ElementMocks;
|
|
17
|
+
declare const manifest: ElementManifest;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { DataInitializer, Element, ElementData, ElementManifest, manifest as default, initState, isEmpty, mocks, name, type, version };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as common from "@tailor-cms/cek-common";
|
|
2
|
+
import { ElementMocks } from "@tailor-cms/cek-common";
|
|
3
|
+
|
|
4
|
+
//#region src/interfaces.d.ts
|
|
5
|
+
type ElementData = common.ElementConfig;
|
|
6
|
+
type DataInitializer = common.DataInitializer<ElementData>;
|
|
7
|
+
type Element = common.Element<ElementData>;
|
|
8
|
+
type ElementManifest = common.ElementManifest<ElementData>;
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/index.d.ts
|
|
11
|
+
declare const type = "FLASHCARDS";
|
|
12
|
+
declare const name = "Flashcards";
|
|
13
|
+
declare const initState: DataInitializer;
|
|
14
|
+
declare const version = "1.0";
|
|
15
|
+
declare const isEmpty: (_data: ElementData) => boolean;
|
|
16
|
+
declare const mocks: ElementMocks;
|
|
17
|
+
declare const manifest: ElementManifest;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { DataInitializer, Element, ElementData, ElementManifest, manifest as default, initState, isEmpty, mocks, name, type, version };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//#region src/index.ts
|
|
2
|
+
const type = "FLASHCARDS";
|
|
3
|
+
const name = "Flashcards";
|
|
4
|
+
const initState = (_config) => ({});
|
|
5
|
+
const version = "1.0";
|
|
6
|
+
const ui = {
|
|
7
|
+
icon: "mdi-cards-outline",
|
|
8
|
+
forceFullWidth: true
|
|
9
|
+
};
|
|
10
|
+
const isEmpty = (_data) => false;
|
|
11
|
+
const mocks = {
|
|
12
|
+
displayContexts: [{
|
|
13
|
+
name: "Test preset 1",
|
|
14
|
+
data: { state: "I have a value" }
|
|
15
|
+
}, {
|
|
16
|
+
name: "Test preset 2",
|
|
17
|
+
data: { state: "I have a different value" }
|
|
18
|
+
}],
|
|
19
|
+
referencesData: { linked: [{ title: "Mock linked element" }] }
|
|
20
|
+
};
|
|
21
|
+
const manifest = {
|
|
22
|
+
type,
|
|
23
|
+
version: "1.0",
|
|
24
|
+
name,
|
|
25
|
+
ssr: false,
|
|
26
|
+
initState,
|
|
27
|
+
isEmpty,
|
|
28
|
+
ui,
|
|
29
|
+
mocks
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { manifest as default, initState, isEmpty, mocks, name, type, version };
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tailor-cms/ce-flashcards-manifest",
|
|
3
|
+
"description": "Tailor CMS flashcards element 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.mjs",
|
|
10
|
+
"require": "./dist/index.cjs"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"main": "./dist/index.cjs",
|
|
14
|
+
"types": "./dist/index.d.mts",
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@tailor-cms/cek-common": "^2.0.1"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@tailor-cms/eslint-config": "^2.0.1",
|
|
23
|
+
"tsdown": "^0.21.10",
|
|
24
|
+
"typescript": "^6.0.3"
|
|
25
|
+
},
|
|
26
|
+
"tsdown": {
|
|
27
|
+
"target": "node24",
|
|
28
|
+
"format": [
|
|
29
|
+
"cjs",
|
|
30
|
+
"esm"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=24"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"dev": "tsdown --watch",
|
|
41
|
+
"build": "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"
|
|
47
|
+
}
|
|
48
|
+
}
|