@draftbit/core 46.4.4-04eaf1.2 → 46.4.4-10b0a9.2
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/lib/commonjs/mappings/AudioPlayer.js +28 -2
- package/lib/module/mappings/AudioPlayer.js +29 -3
- package/lib/typescript/src/mappings/AudioPlayer.d.ts +52 -1
- package/package.json +3 -4
- package/src/mappings/AudioPlayer.js +35 -2
- package/src/mappings/AudioPlayer.ts +37 -1
- package/lib/commonjs/mappings/Elements.js +0 -121
- package/lib/module/mappings/Elements.js +0 -112
- package/lib/typescript/src/mappings/Elements.d.ts +0 -30
- package/src/mappings/Elements.js +0 -135
- package/src/mappings/Elements.ts +0 -145
|
@@ -12,7 +12,17 @@ const SEED_DATA = {
|
|
|
12
12
|
tag: "AudioPlayer",
|
|
13
13
|
description: "Given a source URL, plays sounds & audio!",
|
|
14
14
|
category: _types.COMPONENT_TYPES.media,
|
|
15
|
-
|
|
15
|
+
stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position],
|
|
16
|
+
layout: {
|
|
17
|
+
backgroundColor: "#eee",
|
|
18
|
+
paddingLeft: 16,
|
|
19
|
+
paddingRight: 16,
|
|
20
|
+
paddingTop: 8,
|
|
21
|
+
paddingBottom: 8,
|
|
22
|
+
borderRadius: 24,
|
|
23
|
+
flexDirection: "row",
|
|
24
|
+
alignItems: "center"
|
|
25
|
+
},
|
|
16
26
|
props: {
|
|
17
27
|
source: {
|
|
18
28
|
group: _types.GROUPS.data,
|
|
@@ -23,7 +33,23 @@ const SEED_DATA = {
|
|
|
23
33
|
defaultValue: "https://static.draftbit.com/audio/intro-to-draftbit-audio.mp3",
|
|
24
34
|
formType: _types.FORM_TYPES.sourceUrl,
|
|
25
35
|
propType: _types.PROP_TYPES.OBJECT
|
|
26
|
-
}
|
|
36
|
+
},
|
|
37
|
+
sliderColor: (0, _types.createColorProp)({
|
|
38
|
+
label: "Thumb Color",
|
|
39
|
+
defaultValue: "black"
|
|
40
|
+
}),
|
|
41
|
+
completedTrackColor: (0, _types.createColorProp)({
|
|
42
|
+
label: "Completed Track Color",
|
|
43
|
+
defaultValue: "white"
|
|
44
|
+
}),
|
|
45
|
+
remainingTrackColor: (0, _types.createColorProp)({
|
|
46
|
+
label: "Remanining Track Color",
|
|
47
|
+
defaultValue: "#333333"
|
|
48
|
+
}),
|
|
49
|
+
trackThumbSize: (0, _types.createNumberProp)({
|
|
50
|
+
label: "Thumb Size",
|
|
51
|
+
defaultValue: 24
|
|
52
|
+
})
|
|
27
53
|
}
|
|
28
54
|
};
|
|
29
55
|
exports.SEED_DATA = SEED_DATA;
|
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES } from "@draftbit/types";
|
|
1
|
+
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, StylesPanelSections, createColorProp, createNumberProp } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Audio Player",
|
|
4
4
|
tag: "AudioPlayer",
|
|
5
5
|
description: "Given a source URL, plays sounds & audio!",
|
|
6
6
|
category: COMPONENT_TYPES.media,
|
|
7
|
-
|
|
7
|
+
stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Borders, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position],
|
|
8
|
+
layout: {
|
|
9
|
+
backgroundColor: "#eee",
|
|
10
|
+
paddingLeft: 16,
|
|
11
|
+
paddingRight: 16,
|
|
12
|
+
paddingTop: 8,
|
|
13
|
+
paddingBottom: 8,
|
|
14
|
+
borderRadius: 24,
|
|
15
|
+
flexDirection: "row",
|
|
16
|
+
alignItems: "center"
|
|
17
|
+
},
|
|
8
18
|
props: {
|
|
9
19
|
source: {
|
|
10
20
|
group: GROUPS.data,
|
|
@@ -15,6 +25,22 @@ export const SEED_DATA = {
|
|
|
15
25
|
defaultValue: "https://static.draftbit.com/audio/intro-to-draftbit-audio.mp3",
|
|
16
26
|
formType: FORM_TYPES.sourceUrl,
|
|
17
27
|
propType: PROP_TYPES.OBJECT
|
|
18
|
-
}
|
|
28
|
+
},
|
|
29
|
+
sliderColor: createColorProp({
|
|
30
|
+
label: "Thumb Color",
|
|
31
|
+
defaultValue: "black"
|
|
32
|
+
}),
|
|
33
|
+
completedTrackColor: createColorProp({
|
|
34
|
+
label: "Completed Track Color",
|
|
35
|
+
defaultValue: "white"
|
|
36
|
+
}),
|
|
37
|
+
remainingTrackColor: createColorProp({
|
|
38
|
+
label: "Remanining Track Color",
|
|
39
|
+
defaultValue: "#333333"
|
|
40
|
+
}),
|
|
41
|
+
trackThumbSize: createNumberProp({
|
|
42
|
+
label: "Thumb Size",
|
|
43
|
+
defaultValue: 24
|
|
44
|
+
})
|
|
19
45
|
}
|
|
20
46
|
};
|
|
@@ -3,7 +3,17 @@ export declare const SEED_DATA: {
|
|
|
3
3
|
tag: string;
|
|
4
4
|
description: string;
|
|
5
5
|
category: string;
|
|
6
|
-
|
|
6
|
+
stylesPanelSections: string[];
|
|
7
|
+
layout: {
|
|
8
|
+
backgroundColor: string;
|
|
9
|
+
paddingLeft: number;
|
|
10
|
+
paddingRight: number;
|
|
11
|
+
paddingTop: number;
|
|
12
|
+
paddingBottom: number;
|
|
13
|
+
borderRadius: number;
|
|
14
|
+
flexDirection: string;
|
|
15
|
+
alignItems: string;
|
|
16
|
+
};
|
|
7
17
|
props: {
|
|
8
18
|
source: {
|
|
9
19
|
group: string;
|
|
@@ -15,5 +25,46 @@ export declare const SEED_DATA: {
|
|
|
15
25
|
formType: string;
|
|
16
26
|
propType: string;
|
|
17
27
|
};
|
|
28
|
+
sliderColor: {
|
|
29
|
+
group: string;
|
|
30
|
+
label: string;
|
|
31
|
+
description: string;
|
|
32
|
+
editable: boolean;
|
|
33
|
+
required: boolean;
|
|
34
|
+
defaultValue: null;
|
|
35
|
+
formType: string;
|
|
36
|
+
propType: string;
|
|
37
|
+
};
|
|
38
|
+
completedTrackColor: {
|
|
39
|
+
group: string;
|
|
40
|
+
label: string;
|
|
41
|
+
description: string;
|
|
42
|
+
editable: boolean;
|
|
43
|
+
required: boolean;
|
|
44
|
+
defaultValue: null;
|
|
45
|
+
formType: string;
|
|
46
|
+
propType: string;
|
|
47
|
+
};
|
|
48
|
+
remainingTrackColor: {
|
|
49
|
+
group: string;
|
|
50
|
+
label: string;
|
|
51
|
+
description: string;
|
|
52
|
+
editable: boolean;
|
|
53
|
+
required: boolean;
|
|
54
|
+
defaultValue: null;
|
|
55
|
+
formType: string;
|
|
56
|
+
propType: string;
|
|
57
|
+
};
|
|
58
|
+
trackThumbSize: {
|
|
59
|
+
label: string;
|
|
60
|
+
description: string;
|
|
61
|
+
formType: string;
|
|
62
|
+
propType: string;
|
|
63
|
+
group: string;
|
|
64
|
+
defaultValue: null;
|
|
65
|
+
editable: boolean;
|
|
66
|
+
required: boolean;
|
|
67
|
+
step: number;
|
|
68
|
+
};
|
|
18
69
|
};
|
|
19
70
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.4.4-
|
|
3
|
+
"version": "46.4.4-10b0a9.2+10b0a9d",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -41,8 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@date-io/date-fns": "^1.3.13",
|
|
43
43
|
"@draftbit/react-theme-provider": "^2.1.1",
|
|
44
|
-
"@draftbit/types": "^46.4.4-
|
|
45
|
-
"@expo/html-elements": "^0.2.0",
|
|
44
|
+
"@draftbit/types": "^46.4.4-10b0a9.2+10b0a9d",
|
|
46
45
|
"@material-ui/core": "^4.11.0",
|
|
47
46
|
"@material-ui/pickers": "^3.2.10",
|
|
48
47
|
"@react-native-community/slider": "4.2.3",
|
|
@@ -82,5 +81,5 @@
|
|
|
82
81
|
]
|
|
83
82
|
]
|
|
84
83
|
},
|
|
85
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "10b0a9d7ee23dc626f17be8ef74a3605af1fe541"
|
|
86
85
|
}
|
|
@@ -1,10 +1,27 @@
|
|
|
1
|
-
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, } from "@draftbit/types";
|
|
1
|
+
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, StylesPanelSections, createColorProp, createNumberProp, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Audio Player",
|
|
4
4
|
tag: "AudioPlayer",
|
|
5
5
|
description: "Given a source URL, plays sounds & audio!",
|
|
6
6
|
category: COMPONENT_TYPES.media,
|
|
7
|
-
|
|
7
|
+
stylesPanelSections: [
|
|
8
|
+
StylesPanelSections.Typography,
|
|
9
|
+
StylesPanelSections.Background,
|
|
10
|
+
StylesPanelSections.Borders,
|
|
11
|
+
StylesPanelSections.Size,
|
|
12
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
13
|
+
StylesPanelSections.Position,
|
|
14
|
+
],
|
|
15
|
+
layout: {
|
|
16
|
+
backgroundColor: "#eee",
|
|
17
|
+
paddingLeft: 16,
|
|
18
|
+
paddingRight: 16,
|
|
19
|
+
paddingTop: 8,
|
|
20
|
+
paddingBottom: 8,
|
|
21
|
+
borderRadius: 24,
|
|
22
|
+
flexDirection: "row",
|
|
23
|
+
alignItems: "center",
|
|
24
|
+
},
|
|
8
25
|
props: {
|
|
9
26
|
source: {
|
|
10
27
|
group: GROUPS.data,
|
|
@@ -16,5 +33,21 @@ export const SEED_DATA = {
|
|
|
16
33
|
formType: FORM_TYPES.sourceUrl,
|
|
17
34
|
propType: PROP_TYPES.OBJECT,
|
|
18
35
|
},
|
|
36
|
+
sliderColor: createColorProp({
|
|
37
|
+
label: "Thumb Color",
|
|
38
|
+
defaultValue: "black",
|
|
39
|
+
}),
|
|
40
|
+
completedTrackColor: createColorProp({
|
|
41
|
+
label: "Completed Track Color",
|
|
42
|
+
defaultValue: "white",
|
|
43
|
+
}),
|
|
44
|
+
remainingTrackColor: createColorProp({
|
|
45
|
+
label: "Remanining Track Color",
|
|
46
|
+
defaultValue: "#333333",
|
|
47
|
+
}),
|
|
48
|
+
trackThumbSize: createNumberProp({
|
|
49
|
+
label: "Thumb Size",
|
|
50
|
+
defaultValue: 24,
|
|
51
|
+
}),
|
|
19
52
|
},
|
|
20
53
|
};
|
|
@@ -3,6 +3,9 @@ import {
|
|
|
3
3
|
COMPONENT_TYPES,
|
|
4
4
|
FORM_TYPES,
|
|
5
5
|
PROP_TYPES,
|
|
6
|
+
StylesPanelSections,
|
|
7
|
+
createColorProp,
|
|
8
|
+
createNumberProp,
|
|
6
9
|
} from "@draftbit/types";
|
|
7
10
|
|
|
8
11
|
export const SEED_DATA = {
|
|
@@ -10,7 +13,24 @@ export const SEED_DATA = {
|
|
|
10
13
|
tag: "AudioPlayer",
|
|
11
14
|
description: "Given a source URL, plays sounds & audio!",
|
|
12
15
|
category: COMPONENT_TYPES.media,
|
|
13
|
-
|
|
16
|
+
stylesPanelSections: [
|
|
17
|
+
StylesPanelSections.Typography,
|
|
18
|
+
StylesPanelSections.Background,
|
|
19
|
+
StylesPanelSections.Borders,
|
|
20
|
+
StylesPanelSections.Size,
|
|
21
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
22
|
+
StylesPanelSections.Position,
|
|
23
|
+
],
|
|
24
|
+
layout: {
|
|
25
|
+
backgroundColor: "#eee",
|
|
26
|
+
paddingLeft: 16,
|
|
27
|
+
paddingRight: 16,
|
|
28
|
+
paddingTop: 8,
|
|
29
|
+
paddingBottom: 8,
|
|
30
|
+
borderRadius: 24,
|
|
31
|
+
flexDirection: "row",
|
|
32
|
+
alignItems: "center",
|
|
33
|
+
},
|
|
14
34
|
props: {
|
|
15
35
|
source: {
|
|
16
36
|
group: GROUPS.data,
|
|
@@ -23,5 +43,21 @@ export const SEED_DATA = {
|
|
|
23
43
|
formType: FORM_TYPES.sourceUrl,
|
|
24
44
|
propType: PROP_TYPES.OBJECT,
|
|
25
45
|
},
|
|
46
|
+
sliderColor: createColorProp({
|
|
47
|
+
label: "Thumb Color",
|
|
48
|
+
defaultValue: "black",
|
|
49
|
+
}),
|
|
50
|
+
completedTrackColor: createColorProp({
|
|
51
|
+
label: "Completed Track Color",
|
|
52
|
+
defaultValue: "white",
|
|
53
|
+
}),
|
|
54
|
+
remainingTrackColor: createColorProp({
|
|
55
|
+
label: "Remanining Track Color",
|
|
56
|
+
defaultValue: "#333333",
|
|
57
|
+
}),
|
|
58
|
+
trackThumbSize: createNumberProp({
|
|
59
|
+
label: "Thumb Size",
|
|
60
|
+
defaultValue: 24,
|
|
61
|
+
}),
|
|
26
62
|
},
|
|
27
63
|
};
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SEED_DATA = void 0;
|
|
7
|
-
|
|
8
|
-
var _types = require("@draftbit/types");
|
|
9
|
-
|
|
10
|
-
const SEED_DATA_TRIGGERS = [_types.Triggers.OnValueChange];
|
|
11
|
-
const ELEMENT_PROPS = {
|
|
12
|
-
category: _types.COMPONENT_TYPES.element,
|
|
13
|
-
stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
|
|
14
|
-
layout: {
|
|
15
|
-
margin: 0
|
|
16
|
-
},
|
|
17
|
-
triggers: SEED_DATA_TRIGGERS
|
|
18
|
-
};
|
|
19
|
-
const HEADING_PROPS = { ...ELEMENT_PROPS
|
|
20
|
-
};
|
|
21
|
-
const SEED_DATA = [{
|
|
22
|
-
name: "H1",
|
|
23
|
-
tag: "H1",
|
|
24
|
-
...HEADING_PROPS
|
|
25
|
-
}, {
|
|
26
|
-
name: "H2",
|
|
27
|
-
tag: "H2",
|
|
28
|
-
...HEADING_PROPS
|
|
29
|
-
}, {
|
|
30
|
-
name: "H3",
|
|
31
|
-
tag: "H3",
|
|
32
|
-
...HEADING_PROPS
|
|
33
|
-
}, {
|
|
34
|
-
name: "H4",
|
|
35
|
-
tag: "H4",
|
|
36
|
-
...HEADING_PROPS
|
|
37
|
-
}, {
|
|
38
|
-
name: "H5",
|
|
39
|
-
tag: "H5",
|
|
40
|
-
...HEADING_PROPS
|
|
41
|
-
}, {
|
|
42
|
-
name: "H6",
|
|
43
|
-
tag: "H6",
|
|
44
|
-
...HEADING_PROPS
|
|
45
|
-
}, {
|
|
46
|
-
name: "Anchor",
|
|
47
|
-
tag: "A",
|
|
48
|
-
...ELEMENT_PROPS,
|
|
49
|
-
props: {
|
|
50
|
-
href: (0, _types.createTextProp)({
|
|
51
|
-
label: "href",
|
|
52
|
-
description: "Specify the URL",
|
|
53
|
-
defaultValue: ""
|
|
54
|
-
}),
|
|
55
|
-
target: {
|
|
56
|
-
group: _types.GROUPS.basic,
|
|
57
|
-
label: "target",
|
|
58
|
-
description: "decide where link should open",
|
|
59
|
-
formType: _types.FORM_TYPES.flatArray,
|
|
60
|
-
defaultValue: "_blank",
|
|
61
|
-
options: ["_blank", "_self", "_parent", "_top"]
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}, {
|
|
65
|
-
name: "Paragraph",
|
|
66
|
-
tag: "P",
|
|
67
|
-
...ELEMENT_PROPS
|
|
68
|
-
}, {
|
|
69
|
-
name: "Strong",
|
|
70
|
-
tag: "Strong",
|
|
71
|
-
...ELEMENT_PROPS
|
|
72
|
-
}, {
|
|
73
|
-
name: "Strike",
|
|
74
|
-
tag: "S",
|
|
75
|
-
...ELEMENT_PROPS
|
|
76
|
-
}, {
|
|
77
|
-
name: "Italic",
|
|
78
|
-
tag: "I",
|
|
79
|
-
...ELEMENT_PROPS
|
|
80
|
-
}, {
|
|
81
|
-
name: "Code",
|
|
82
|
-
tag: "Code",
|
|
83
|
-
...ELEMENT_PROPS
|
|
84
|
-
}, {
|
|
85
|
-
name: "Pre",
|
|
86
|
-
tag: "Pre",
|
|
87
|
-
...ELEMENT_PROPS
|
|
88
|
-
}, {
|
|
89
|
-
name: "Mark",
|
|
90
|
-
tag: "Mark",
|
|
91
|
-
...ELEMENT_PROPS
|
|
92
|
-
}, {
|
|
93
|
-
name: "BR",
|
|
94
|
-
tag: "BR",
|
|
95
|
-
...ELEMENT_PROPS
|
|
96
|
-
}, {
|
|
97
|
-
name: "Quote",
|
|
98
|
-
tag: "Q",
|
|
99
|
-
...ELEMENT_PROPS
|
|
100
|
-
}, {
|
|
101
|
-
name: "BlockQuote",
|
|
102
|
-
tag: "BlockQuote",
|
|
103
|
-
...ELEMENT_PROPS
|
|
104
|
-
}, {
|
|
105
|
-
name: "Time",
|
|
106
|
-
tag: "Time",
|
|
107
|
-
...ELEMENT_PROPS
|
|
108
|
-
}, {
|
|
109
|
-
name: "UL",
|
|
110
|
-
tag: "UL",
|
|
111
|
-
...ELEMENT_PROPS
|
|
112
|
-
}, {
|
|
113
|
-
name: "LI",
|
|
114
|
-
tag: "LI",
|
|
115
|
-
...ELEMENT_PROPS
|
|
116
|
-
}, {
|
|
117
|
-
name: "HR",
|
|
118
|
-
tag: "HR",
|
|
119
|
-
...ELEMENT_PROPS
|
|
120
|
-
}];
|
|
121
|
-
exports.SEED_DATA = SEED_DATA;
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { BLOCK_STYLES_SECTIONS, COMPONENT_TYPES, createTextProp, FORM_TYPES, GROUPS, Triggers } from "@draftbit/types";
|
|
2
|
-
const SEED_DATA_TRIGGERS = [Triggers.OnValueChange];
|
|
3
|
-
const ELEMENT_PROPS = {
|
|
4
|
-
category: COMPONENT_TYPES.element,
|
|
5
|
-
stylesPanelSections: BLOCK_STYLES_SECTIONS,
|
|
6
|
-
layout: {
|
|
7
|
-
margin: 0
|
|
8
|
-
},
|
|
9
|
-
triggers: SEED_DATA_TRIGGERS
|
|
10
|
-
};
|
|
11
|
-
const HEADING_PROPS = { ...ELEMENT_PROPS
|
|
12
|
-
};
|
|
13
|
-
export const SEED_DATA = [{
|
|
14
|
-
name: "H1",
|
|
15
|
-
tag: "H1",
|
|
16
|
-
...HEADING_PROPS
|
|
17
|
-
}, {
|
|
18
|
-
name: "H2",
|
|
19
|
-
tag: "H2",
|
|
20
|
-
...HEADING_PROPS
|
|
21
|
-
}, {
|
|
22
|
-
name: "H3",
|
|
23
|
-
tag: "H3",
|
|
24
|
-
...HEADING_PROPS
|
|
25
|
-
}, {
|
|
26
|
-
name: "H4",
|
|
27
|
-
tag: "H4",
|
|
28
|
-
...HEADING_PROPS
|
|
29
|
-
}, {
|
|
30
|
-
name: "H5",
|
|
31
|
-
tag: "H5",
|
|
32
|
-
...HEADING_PROPS
|
|
33
|
-
}, {
|
|
34
|
-
name: "H6",
|
|
35
|
-
tag: "H6",
|
|
36
|
-
...HEADING_PROPS
|
|
37
|
-
}, {
|
|
38
|
-
name: "Anchor",
|
|
39
|
-
tag: "A",
|
|
40
|
-
...ELEMENT_PROPS,
|
|
41
|
-
props: {
|
|
42
|
-
href: createTextProp({
|
|
43
|
-
label: "href",
|
|
44
|
-
description: "Specify the URL",
|
|
45
|
-
defaultValue: ""
|
|
46
|
-
}),
|
|
47
|
-
target: {
|
|
48
|
-
group: GROUPS.basic,
|
|
49
|
-
label: "target",
|
|
50
|
-
description: "decide where link should open",
|
|
51
|
-
formType: FORM_TYPES.flatArray,
|
|
52
|
-
defaultValue: "_blank",
|
|
53
|
-
options: ["_blank", "_self", "_parent", "_top"]
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}, {
|
|
57
|
-
name: "Paragraph",
|
|
58
|
-
tag: "P",
|
|
59
|
-
...ELEMENT_PROPS
|
|
60
|
-
}, {
|
|
61
|
-
name: "Strong",
|
|
62
|
-
tag: "Strong",
|
|
63
|
-
...ELEMENT_PROPS
|
|
64
|
-
}, {
|
|
65
|
-
name: "Strike",
|
|
66
|
-
tag: "S",
|
|
67
|
-
...ELEMENT_PROPS
|
|
68
|
-
}, {
|
|
69
|
-
name: "Italic",
|
|
70
|
-
tag: "I",
|
|
71
|
-
...ELEMENT_PROPS
|
|
72
|
-
}, {
|
|
73
|
-
name: "Code",
|
|
74
|
-
tag: "Code",
|
|
75
|
-
...ELEMENT_PROPS
|
|
76
|
-
}, {
|
|
77
|
-
name: "Pre",
|
|
78
|
-
tag: "Pre",
|
|
79
|
-
...ELEMENT_PROPS
|
|
80
|
-
}, {
|
|
81
|
-
name: "Mark",
|
|
82
|
-
tag: "Mark",
|
|
83
|
-
...ELEMENT_PROPS
|
|
84
|
-
}, {
|
|
85
|
-
name: "BR",
|
|
86
|
-
tag: "BR",
|
|
87
|
-
...ELEMENT_PROPS
|
|
88
|
-
}, {
|
|
89
|
-
name: "Quote",
|
|
90
|
-
tag: "Q",
|
|
91
|
-
...ELEMENT_PROPS
|
|
92
|
-
}, {
|
|
93
|
-
name: "BlockQuote",
|
|
94
|
-
tag: "BlockQuote",
|
|
95
|
-
...ELEMENT_PROPS
|
|
96
|
-
}, {
|
|
97
|
-
name: "Time",
|
|
98
|
-
tag: "Time",
|
|
99
|
-
...ELEMENT_PROPS
|
|
100
|
-
}, {
|
|
101
|
-
name: "UL",
|
|
102
|
-
tag: "UL",
|
|
103
|
-
...ELEMENT_PROPS
|
|
104
|
-
}, {
|
|
105
|
-
name: "LI",
|
|
106
|
-
tag: "LI",
|
|
107
|
-
...ELEMENT_PROPS
|
|
108
|
-
}, {
|
|
109
|
-
name: "HR",
|
|
110
|
-
tag: "HR",
|
|
111
|
-
...ELEMENT_PROPS
|
|
112
|
-
}];
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export declare const SEED_DATA: ({
|
|
2
|
-
category: string;
|
|
3
|
-
stylesPanelSections: string[];
|
|
4
|
-
layout: {
|
|
5
|
-
margin: number;
|
|
6
|
-
};
|
|
7
|
-
triggers: string[];
|
|
8
|
-
name: string;
|
|
9
|
-
tag: string;
|
|
10
|
-
} | {
|
|
11
|
-
props: {
|
|
12
|
-
href: any;
|
|
13
|
-
target: {
|
|
14
|
-
group: string;
|
|
15
|
-
label: string;
|
|
16
|
-
description: string;
|
|
17
|
-
formType: string;
|
|
18
|
-
defaultValue: string;
|
|
19
|
-
options: string[];
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
category: string;
|
|
23
|
-
stylesPanelSections: string[];
|
|
24
|
-
layout: {
|
|
25
|
-
margin: number;
|
|
26
|
-
};
|
|
27
|
-
triggers: string[];
|
|
28
|
-
name: string;
|
|
29
|
-
tag: string;
|
|
30
|
-
})[];
|
package/src/mappings/Elements.js
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { BLOCK_STYLES_SECTIONS, COMPONENT_TYPES, createTextProp, FORM_TYPES, GROUPS, Triggers, } from "@draftbit/types";
|
|
2
|
-
const SEED_DATA_TRIGGERS = [Triggers.OnValueChange];
|
|
3
|
-
const ELEMENT_PROPS = {
|
|
4
|
-
category: COMPONENT_TYPES.element,
|
|
5
|
-
stylesPanelSections: BLOCK_STYLES_SECTIONS,
|
|
6
|
-
layout: {
|
|
7
|
-
margin: 0,
|
|
8
|
-
},
|
|
9
|
-
triggers: SEED_DATA_TRIGGERS,
|
|
10
|
-
};
|
|
11
|
-
const HEADING_PROPS = {
|
|
12
|
-
...ELEMENT_PROPS,
|
|
13
|
-
};
|
|
14
|
-
export const SEED_DATA = [
|
|
15
|
-
{
|
|
16
|
-
name: "H1",
|
|
17
|
-
tag: "H1",
|
|
18
|
-
...HEADING_PROPS,
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
name: "H2",
|
|
22
|
-
tag: "H2",
|
|
23
|
-
...HEADING_PROPS,
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
name: "H3",
|
|
27
|
-
tag: "H3",
|
|
28
|
-
...HEADING_PROPS,
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: "H4",
|
|
32
|
-
tag: "H4",
|
|
33
|
-
...HEADING_PROPS,
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
name: "H5",
|
|
37
|
-
tag: "H5",
|
|
38
|
-
...HEADING_PROPS,
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
name: "H6",
|
|
42
|
-
tag: "H6",
|
|
43
|
-
...HEADING_PROPS,
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: "Anchor",
|
|
47
|
-
tag: "A",
|
|
48
|
-
...ELEMENT_PROPS,
|
|
49
|
-
props: {
|
|
50
|
-
href: createTextProp({
|
|
51
|
-
label: "href",
|
|
52
|
-
description: "Specify the URL",
|
|
53
|
-
defaultValue: "",
|
|
54
|
-
}),
|
|
55
|
-
target: {
|
|
56
|
-
group: GROUPS.basic,
|
|
57
|
-
label: "target",
|
|
58
|
-
description: "decide where link should open",
|
|
59
|
-
formType: FORM_TYPES.flatArray,
|
|
60
|
-
defaultValue: "_blank",
|
|
61
|
-
options: ["_blank", "_self", "_parent", "_top"],
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
name: "Paragraph",
|
|
67
|
-
tag: "P",
|
|
68
|
-
...ELEMENT_PROPS,
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
name: "Strong",
|
|
72
|
-
tag: "Strong",
|
|
73
|
-
...ELEMENT_PROPS,
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
name: "Strike",
|
|
77
|
-
tag: "S",
|
|
78
|
-
...ELEMENT_PROPS,
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
name: "Italic",
|
|
82
|
-
tag: "I",
|
|
83
|
-
...ELEMENT_PROPS,
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
name: "Code",
|
|
87
|
-
tag: "Code",
|
|
88
|
-
...ELEMENT_PROPS,
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
name: "Pre",
|
|
92
|
-
tag: "Pre",
|
|
93
|
-
...ELEMENT_PROPS,
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
name: "Mark",
|
|
97
|
-
tag: "Mark",
|
|
98
|
-
...ELEMENT_PROPS,
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
name: "BR",
|
|
102
|
-
tag: "BR",
|
|
103
|
-
...ELEMENT_PROPS,
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
name: "Quote",
|
|
107
|
-
tag: "Q",
|
|
108
|
-
...ELEMENT_PROPS,
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
name: "BlockQuote",
|
|
112
|
-
tag: "BlockQuote",
|
|
113
|
-
...ELEMENT_PROPS,
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
name: "Time",
|
|
117
|
-
tag: "Time",
|
|
118
|
-
...ELEMENT_PROPS,
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
name: "UL",
|
|
122
|
-
tag: "UL",
|
|
123
|
-
...ELEMENT_PROPS,
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
name: "LI",
|
|
127
|
-
tag: "LI",
|
|
128
|
-
...ELEMENT_PROPS,
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
name: "HR",
|
|
132
|
-
tag: "HR",
|
|
133
|
-
...ELEMENT_PROPS,
|
|
134
|
-
},
|
|
135
|
-
];
|
package/src/mappings/Elements.ts
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BLOCK_STYLES_SECTIONS,
|
|
3
|
-
COMPONENT_TYPES,
|
|
4
|
-
createTextProp,
|
|
5
|
-
FORM_TYPES,
|
|
6
|
-
GROUPS,
|
|
7
|
-
Triggers,
|
|
8
|
-
} from "@draftbit/types";
|
|
9
|
-
const SEED_DATA_TRIGGERS = [Triggers.OnValueChange];
|
|
10
|
-
|
|
11
|
-
const ELEMENT_PROPS = {
|
|
12
|
-
category: COMPONENT_TYPES.element,
|
|
13
|
-
stylesPanelSections: BLOCK_STYLES_SECTIONS,
|
|
14
|
-
layout: {
|
|
15
|
-
margin: 0,
|
|
16
|
-
},
|
|
17
|
-
triggers: SEED_DATA_TRIGGERS,
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const HEADING_PROPS = {
|
|
21
|
-
...ELEMENT_PROPS,
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export const SEED_DATA = [
|
|
25
|
-
{
|
|
26
|
-
name: "H1",
|
|
27
|
-
tag: "H1",
|
|
28
|
-
...HEADING_PROPS,
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: "H2",
|
|
32
|
-
tag: "H2",
|
|
33
|
-
...HEADING_PROPS,
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
name: "H3",
|
|
37
|
-
tag: "H3",
|
|
38
|
-
...HEADING_PROPS,
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
name: "H4",
|
|
42
|
-
tag: "H4",
|
|
43
|
-
...HEADING_PROPS,
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: "H5",
|
|
47
|
-
tag: "H5",
|
|
48
|
-
...HEADING_PROPS,
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
name: "H6",
|
|
52
|
-
tag: "H6",
|
|
53
|
-
...HEADING_PROPS,
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
name: "Anchor",
|
|
57
|
-
tag: "A",
|
|
58
|
-
...ELEMENT_PROPS,
|
|
59
|
-
props: {
|
|
60
|
-
href: createTextProp({
|
|
61
|
-
label: "href",
|
|
62
|
-
description: "Specify the URL",
|
|
63
|
-
defaultValue: "",
|
|
64
|
-
}),
|
|
65
|
-
target: {
|
|
66
|
-
group: GROUPS.basic,
|
|
67
|
-
label: "target",
|
|
68
|
-
description: "decide where link should open",
|
|
69
|
-
formType: FORM_TYPES.flatArray,
|
|
70
|
-
defaultValue: "_blank",
|
|
71
|
-
options: ["_blank", "_self", "_parent", "_top"],
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
name: "Paragraph",
|
|
77
|
-
tag: "P",
|
|
78
|
-
...ELEMENT_PROPS,
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
name: "Strong",
|
|
82
|
-
tag: "Strong",
|
|
83
|
-
...ELEMENT_PROPS,
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
name: "Strike",
|
|
87
|
-
tag: "S",
|
|
88
|
-
...ELEMENT_PROPS,
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
name: "Italic",
|
|
92
|
-
tag: "I",
|
|
93
|
-
...ELEMENT_PROPS,
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
name: "Code",
|
|
97
|
-
tag: "Code",
|
|
98
|
-
...ELEMENT_PROPS,
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
name: "Pre",
|
|
102
|
-
tag: "Pre",
|
|
103
|
-
...ELEMENT_PROPS,
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
name: "Mark",
|
|
107
|
-
tag: "Mark",
|
|
108
|
-
...ELEMENT_PROPS,
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
name: "BR",
|
|
112
|
-
tag: "BR",
|
|
113
|
-
...ELEMENT_PROPS,
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
name: "Quote",
|
|
117
|
-
tag: "Q",
|
|
118
|
-
...ELEMENT_PROPS,
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
name: "BlockQuote",
|
|
122
|
-
tag: "BlockQuote",
|
|
123
|
-
...ELEMENT_PROPS,
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
name: "Time",
|
|
127
|
-
tag: "Time",
|
|
128
|
-
...ELEMENT_PROPS,
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
name: "UL",
|
|
132
|
-
tag: "UL",
|
|
133
|
-
...ELEMENT_PROPS,
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
name: "LI",
|
|
137
|
-
tag: "LI",
|
|
138
|
-
...ELEMENT_PROPS,
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
name: "HR",
|
|
142
|
-
tag: "HR",
|
|
143
|
-
...ELEMENT_PROPS,
|
|
144
|
-
},
|
|
145
|
-
];
|