@draftbit/core 46.9.1-e06549.2 → 46.9.1-f483d0.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/components/Accordion/AccordionItem.js +4 -23
- package/lib/commonjs/components/AnimatedCircularProgress.js +1 -12
- package/lib/commonjs/components/BottomSheet/BottomSheet.js +88 -0
- package/lib/commonjs/components/BottomSheet/BottomSheetComponent.js +464 -0
- package/lib/commonjs/components/BottomSheet/index.js +13 -0
- package/lib/commonjs/components/Container.js +4 -15
- package/lib/commonjs/components/Picker/Picker.js +13 -3
- package/lib/commonjs/components/YotubePlayer.js +38 -0
- package/lib/commonjs/index.js +14 -0
- package/lib/commonjs/mappings/BottomSheet.js +70 -0
- package/lib/commonjs/mappings/YoutubePlayer.js +44 -0
- package/lib/module/components/BottomSheet/BottomSheet.js +80 -0
- package/lib/module/components/BottomSheet/BottomSheetComponent.js +470 -0
- package/lib/module/components/BottomSheet/index.js +1 -0
- package/lib/module/components/Picker/Picker.js +13 -3
- package/lib/module/components/YotubePlayer.js +30 -0
- package/lib/module/index.js +2 -0
- package/lib/module/mappings/BottomSheet.js +63 -0
- package/lib/module/mappings/YoutubePlayer.js +37 -0
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts +20 -0
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/src/components/BottomSheet/BottomSheetComponent.d.ts +170 -0
- package/lib/typescript/src/components/BottomSheet/BottomSheetComponent.d.ts.map +1 -0
- package/lib/typescript/src/components/BottomSheet/index.d.ts +2 -0
- package/lib/typescript/src/components/BottomSheet/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Picker/Picker.d.ts.map +1 -1
- package/lib/typescript/src/components/YotubePlayer.d.ts +12 -0
- package/lib/typescript/src/components/YotubePlayer.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +2 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/{HtmlElements.d.ts → BottomSheet.d.ts} +59 -53
- package/lib/typescript/src/mappings/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/src/mappings/YoutubePlayer.d.ts +37 -0
- package/lib/typescript/src/mappings/YoutubePlayer.d.ts.map +1 -0
- package/package.json +8 -5
- package/src/components/BottomSheet/BottomSheet.js +56 -0
- package/src/components/BottomSheet/BottomSheet.tsx +120 -0
- package/src/components/BottomSheet/BottomSheetComponent.js +437 -0
- package/src/components/BottomSheet/BottomSheetComponent.tsx +895 -0
- package/src/components/BottomSheet/index.js +1 -0
- package/src/components/BottomSheet/index.ts +1 -0
- package/src/components/Picker/Picker.js +12 -3
- package/src/components/Picker/Picker.tsx +12 -3
- package/src/components/YotubePlayer.js +10 -0
- package/src/components/YotubePlayer.tsx +38 -0
- package/src/index.js +2 -0
- package/src/index.tsx +4 -0
- package/src/mappings/BottomSheet.js +63 -0
- package/src/mappings/BottomSheet.ts +77 -0
- package/src/mappings/YoutubePlayer.js +37 -0
- package/src/mappings/YoutubePlayer.ts +43 -0
- package/lib/commonjs/mappings/HtmlElements.js +0 -160
- package/lib/module/mappings/HtmlElements.js +0 -153
- package/lib/typescript/src/mappings/HtmlElements.d.ts.map +0 -1
- package/src/mappings/HtmlElements.js +0 -180
- package/src/mappings/HtmlElements.ts +0 -194
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HtmlElements.d.ts","sourceRoot":"","sources":["../../../../src/mappings/HtmlElements.ts"],"names":[],"mappings":"AAoEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA6HrB,CAAC"}
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createTextProp, FORM_TYPES, PROP_TYPES, GROUPS, StylesPanelSections, BLOCK_STYLES_SECTIONS, } from "@draftbit/types";
|
|
2
|
-
const ELEMENT_SEED_DATA = {
|
|
3
|
-
doc_link: "https://www.npmjs.com/package/@expo/html-elements",
|
|
4
|
-
code_link: "https://github.com/expo/expo/tree/master/packages/html-elements",
|
|
5
|
-
packageName: "@expo/html-elements",
|
|
6
|
-
stylesPanelSections: BLOCK_STYLES_SECTIONS,
|
|
7
|
-
category: COMPONENT_TYPES.webelement,
|
|
8
|
-
};
|
|
9
|
-
const TEXT_SEED_DATA = {
|
|
10
|
-
...ELEMENT_SEED_DATA,
|
|
11
|
-
category: COMPONENT_TYPES.text,
|
|
12
|
-
stylesPanelSections: [
|
|
13
|
-
StylesPanelSections.Typography,
|
|
14
|
-
StylesPanelSections.LayoutSelectedItem,
|
|
15
|
-
StylesPanelSections.MarginsAndPaddings,
|
|
16
|
-
StylesPanelSections.Effects,
|
|
17
|
-
],
|
|
18
|
-
layout: {
|
|
19
|
-
color: "strong",
|
|
20
|
-
},
|
|
21
|
-
props: {
|
|
22
|
-
children: {
|
|
23
|
-
group: GROUPS.data,
|
|
24
|
-
label: "Text",
|
|
25
|
-
description: "Text",
|
|
26
|
-
defaultValue: "Double click me to edit 👀",
|
|
27
|
-
editable: true,
|
|
28
|
-
required: true,
|
|
29
|
-
formType: FORM_TYPES.string,
|
|
30
|
-
propType: PROP_TYPES.STRING,
|
|
31
|
-
},
|
|
32
|
-
accessibilityLabel: {
|
|
33
|
-
group: GROUPS.accessibility,
|
|
34
|
-
name: "accessibilityLabel",
|
|
35
|
-
label: "accessibilityLabel",
|
|
36
|
-
description: "Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the Text nodes separated by space.",
|
|
37
|
-
editable: true,
|
|
38
|
-
required: false,
|
|
39
|
-
formType: FORM_TYPES.string,
|
|
40
|
-
propType: PROP_TYPES.STRING,
|
|
41
|
-
defaultValue: null,
|
|
42
|
-
},
|
|
43
|
-
selectable: {
|
|
44
|
-
group: GROUPS.advanced,
|
|
45
|
-
name: "selectable",
|
|
46
|
-
label: "selectable",
|
|
47
|
-
description: "Lets the user select text, to use the native copy and paste functionality.",
|
|
48
|
-
editable: true,
|
|
49
|
-
required: false,
|
|
50
|
-
formType: FORM_TYPES.boolean,
|
|
51
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
52
|
-
defaultValue: true,
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
export const SEED_DATA = [
|
|
57
|
-
{
|
|
58
|
-
name: "Heading 1",
|
|
59
|
-
tag: "H1",
|
|
60
|
-
...TEXT_SEED_DATA,
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
name: "Heading 2",
|
|
64
|
-
tag: "H2",
|
|
65
|
-
...TEXT_SEED_DATA,
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
name: "Heading 3",
|
|
69
|
-
tag: "H3",
|
|
70
|
-
...TEXT_SEED_DATA,
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
name: "Heading 4",
|
|
74
|
-
tag: "H4",
|
|
75
|
-
...TEXT_SEED_DATA,
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
name: "Heading 5",
|
|
79
|
-
tag: "H5",
|
|
80
|
-
...TEXT_SEED_DATA,
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
name: "Heading 6",
|
|
84
|
-
tag: "H6",
|
|
85
|
-
...TEXT_SEED_DATA,
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
name: "Paragraph",
|
|
89
|
-
tag: "P",
|
|
90
|
-
...TEXT_SEED_DATA,
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
name: "Bold",
|
|
94
|
-
tag: "B",
|
|
95
|
-
...TEXT_SEED_DATA,
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
name: "Strikethrough",
|
|
99
|
-
tag: "S",
|
|
100
|
-
...TEXT_SEED_DATA,
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
name: "Italic",
|
|
104
|
-
tag: "I",
|
|
105
|
-
...TEXT_SEED_DATA,
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
name: "Code",
|
|
109
|
-
tag: "Code",
|
|
110
|
-
...TEXT_SEED_DATA,
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
name: "Preformatted",
|
|
114
|
-
tag: "Pre",
|
|
115
|
-
...TEXT_SEED_DATA,
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
name: "Mark",
|
|
119
|
-
tag: "Mark",
|
|
120
|
-
...TEXT_SEED_DATA,
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
name: "Block Quote",
|
|
124
|
-
tag: "BlockQuote",
|
|
125
|
-
...TEXT_SEED_DATA,
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
name: "Quoted",
|
|
129
|
-
tag: "Q",
|
|
130
|
-
...TEXT_SEED_DATA,
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
name: "Time",
|
|
134
|
-
tag: "Time",
|
|
135
|
-
...TEXT_SEED_DATA,
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
name: "Unordered List",
|
|
139
|
-
tag: "UL",
|
|
140
|
-
...ELEMENT_SEED_DATA,
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
name: "List Item",
|
|
144
|
-
tag: "LI",
|
|
145
|
-
...TEXT_SEED_DATA,
|
|
146
|
-
category: COMPONENT_TYPES.webelement,
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
name: "Line Break",
|
|
150
|
-
tag: "BR",
|
|
151
|
-
...ELEMENT_SEED_DATA,
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
name: "Horizontal Rule",
|
|
155
|
-
tag: "HR",
|
|
156
|
-
...ELEMENT_SEED_DATA,
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
name: "Anchor",
|
|
160
|
-
tag: "A",
|
|
161
|
-
...TEXT_SEED_DATA,
|
|
162
|
-
props: {
|
|
163
|
-
...TEXT_SEED_DATA.props,
|
|
164
|
-
href: createTextProp({
|
|
165
|
-
label: "href",
|
|
166
|
-
description: "Specify the URL",
|
|
167
|
-
defaultValue: "",
|
|
168
|
-
}),
|
|
169
|
-
target: {
|
|
170
|
-
group: GROUPS.basic,
|
|
171
|
-
label: "target",
|
|
172
|
-
description: "decide where link should open",
|
|
173
|
-
formType: FORM_TYPES.flatArray,
|
|
174
|
-
defaultValue: "_blank",
|
|
175
|
-
options: ["_blank", "_self", "_parent", "_top"],
|
|
176
|
-
},
|
|
177
|
-
},
|
|
178
|
-
category: COMPONENT_TYPES.webelement,
|
|
179
|
-
},
|
|
180
|
-
];
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
COMPONENT_TYPES,
|
|
3
|
-
createTextProp,
|
|
4
|
-
FORM_TYPES,
|
|
5
|
-
PROP_TYPES,
|
|
6
|
-
GROUPS,
|
|
7
|
-
StylesPanelSections,
|
|
8
|
-
BLOCK_STYLES_SECTIONS,
|
|
9
|
-
} from "@draftbit/types";
|
|
10
|
-
|
|
11
|
-
const ELEMENT_SEED_DATA = {
|
|
12
|
-
doc_link: "https://www.npmjs.com/package/@expo/html-elements",
|
|
13
|
-
code_link: "https://github.com/expo/expo/tree/master/packages/html-elements",
|
|
14
|
-
packageName: "@expo/html-elements",
|
|
15
|
-
stylesPanelSections: BLOCK_STYLES_SECTIONS,
|
|
16
|
-
category: COMPONENT_TYPES.webelement,
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const TEXT_SEED_DATA = {
|
|
20
|
-
...ELEMENT_SEED_DATA,
|
|
21
|
-
category: COMPONENT_TYPES.text,
|
|
22
|
-
stylesPanelSections: [
|
|
23
|
-
StylesPanelSections.Typography,
|
|
24
|
-
StylesPanelSections.LayoutSelectedItem,
|
|
25
|
-
StylesPanelSections.MarginsAndPaddings,
|
|
26
|
-
StylesPanelSections.Effects,
|
|
27
|
-
],
|
|
28
|
-
layout: {
|
|
29
|
-
color: "strong",
|
|
30
|
-
},
|
|
31
|
-
props: {
|
|
32
|
-
children: {
|
|
33
|
-
group: GROUPS.data,
|
|
34
|
-
label: "Text",
|
|
35
|
-
description: "Text",
|
|
36
|
-
defaultValue: "Double click me to edit 👀",
|
|
37
|
-
editable: true,
|
|
38
|
-
required: true,
|
|
39
|
-
formType: FORM_TYPES.string,
|
|
40
|
-
propType: PROP_TYPES.STRING,
|
|
41
|
-
},
|
|
42
|
-
accessibilityLabel: {
|
|
43
|
-
group: GROUPS.accessibility,
|
|
44
|
-
name: "accessibilityLabel",
|
|
45
|
-
label: "accessibilityLabel",
|
|
46
|
-
description:
|
|
47
|
-
"Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the Text nodes separated by space.",
|
|
48
|
-
editable: true,
|
|
49
|
-
required: false,
|
|
50
|
-
formType: FORM_TYPES.string,
|
|
51
|
-
propType: PROP_TYPES.STRING,
|
|
52
|
-
defaultValue: null,
|
|
53
|
-
},
|
|
54
|
-
selectable: {
|
|
55
|
-
group: GROUPS.advanced,
|
|
56
|
-
name: "selectable",
|
|
57
|
-
label: "selectable",
|
|
58
|
-
description:
|
|
59
|
-
"Lets the user select text, to use the native copy and paste functionality.",
|
|
60
|
-
editable: true,
|
|
61
|
-
required: false,
|
|
62
|
-
formType: FORM_TYPES.boolean,
|
|
63
|
-
propType: PROP_TYPES.BOOLEAN,
|
|
64
|
-
defaultValue: true,
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export const SEED_DATA = [
|
|
70
|
-
{
|
|
71
|
-
name: "Heading 1",
|
|
72
|
-
tag: "H1",
|
|
73
|
-
...TEXT_SEED_DATA,
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
name: "Heading 2",
|
|
77
|
-
tag: "H2",
|
|
78
|
-
...TEXT_SEED_DATA,
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
name: "Heading 3",
|
|
82
|
-
tag: "H3",
|
|
83
|
-
...TEXT_SEED_DATA,
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
name: "Heading 4",
|
|
87
|
-
tag: "H4",
|
|
88
|
-
...TEXT_SEED_DATA,
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
name: "Heading 5",
|
|
92
|
-
tag: "H5",
|
|
93
|
-
...TEXT_SEED_DATA,
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
name: "Heading 6",
|
|
97
|
-
tag: "H6",
|
|
98
|
-
...TEXT_SEED_DATA,
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
name: "Paragraph",
|
|
102
|
-
tag: "P",
|
|
103
|
-
...TEXT_SEED_DATA,
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
name: "Bold",
|
|
107
|
-
tag: "B",
|
|
108
|
-
...TEXT_SEED_DATA,
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
name: "Strikethrough",
|
|
112
|
-
tag: "S",
|
|
113
|
-
...TEXT_SEED_DATA,
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
name: "Italic",
|
|
117
|
-
tag: "I",
|
|
118
|
-
...TEXT_SEED_DATA,
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
name: "Code",
|
|
122
|
-
tag: "Code",
|
|
123
|
-
...TEXT_SEED_DATA,
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
name: "Preformatted",
|
|
127
|
-
tag: "Pre",
|
|
128
|
-
...TEXT_SEED_DATA,
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
name: "Mark",
|
|
132
|
-
tag: "Mark",
|
|
133
|
-
...TEXT_SEED_DATA,
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
name: "Block Quote",
|
|
137
|
-
tag: "BlockQuote",
|
|
138
|
-
...TEXT_SEED_DATA,
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
name: "Quoted",
|
|
142
|
-
tag: "Q",
|
|
143
|
-
...TEXT_SEED_DATA,
|
|
144
|
-
},
|
|
145
|
-
|
|
146
|
-
{
|
|
147
|
-
name: "Time",
|
|
148
|
-
tag: "Time",
|
|
149
|
-
...TEXT_SEED_DATA,
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
name: "Unordered List",
|
|
153
|
-
tag: "UL",
|
|
154
|
-
...ELEMENT_SEED_DATA,
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
name: "List Item",
|
|
158
|
-
tag: "LI",
|
|
159
|
-
...TEXT_SEED_DATA,
|
|
160
|
-
category: COMPONENT_TYPES.webelement,
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
name: "Line Break",
|
|
164
|
-
tag: "BR",
|
|
165
|
-
...ELEMENT_SEED_DATA,
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
name: "Horizontal Rule",
|
|
169
|
-
tag: "HR",
|
|
170
|
-
...ELEMENT_SEED_DATA,
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
name: "Anchor",
|
|
174
|
-
tag: "A",
|
|
175
|
-
...TEXT_SEED_DATA,
|
|
176
|
-
props: {
|
|
177
|
-
...TEXT_SEED_DATA.props,
|
|
178
|
-
href: createTextProp({
|
|
179
|
-
label: "href",
|
|
180
|
-
description: "Specify the URL",
|
|
181
|
-
defaultValue: "",
|
|
182
|
-
}),
|
|
183
|
-
target: {
|
|
184
|
-
group: GROUPS.basic,
|
|
185
|
-
label: "target",
|
|
186
|
-
description: "decide where link should open",
|
|
187
|
-
formType: FORM_TYPES.flatArray,
|
|
188
|
-
defaultValue: "_blank",
|
|
189
|
-
options: ["_blank", "_self", "_parent", "_top"],
|
|
190
|
-
},
|
|
191
|
-
},
|
|
192
|
-
category: COMPONENT_TYPES.webelement,
|
|
193
|
-
},
|
|
194
|
-
];
|