@draftbit/core 46.4.4-6a9b36.2 → 46.4.4-6ae6f7.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.
Files changed (39) hide show
  1. package/lib/commonjs/components/DeprecatedFAB.js +20 -3
  2. package/lib/commonjs/components/DeprecatedFAB.js.map +1 -1
  3. package/lib/commonjs/components/Header.js.map +1 -1
  4. package/lib/commonjs/components/Youtube.js +67 -0
  5. package/lib/commonjs/components/Youtube.js.map +1 -0
  6. package/lib/commonjs/index.js +7 -82
  7. package/lib/commonjs/index.js.map +1 -1
  8. package/lib/commonjs/mappings/KeyboardAwareScrollView.js.map +1 -1
  9. package/lib/commonjs/mappings/ProgressCircle.js.map +1 -1
  10. package/lib/commonjs/mappings/TextArea.js.map +1 -1
  11. package/lib/commonjs/mappings/Youtube.js +41 -0
  12. package/lib/commonjs/mappings/Youtube.js.map +1 -0
  13. package/lib/module/components/Youtube.js +58 -0
  14. package/lib/module/components/Youtube.js.map +1 -0
  15. package/lib/module/index.js +1 -1
  16. package/lib/module/index.js.map +1 -1
  17. package/lib/module/mappings/Youtube.js +34 -0
  18. package/lib/module/mappings/Youtube.js.map +1 -0
  19. package/lib/typescript/src/components/Youtube.d.ts +45 -0
  20. package/lib/typescript/src/components/Youtube.d.ts.map +1 -0
  21. package/lib/typescript/src/index.d.ts +1 -1
  22. package/lib/typescript/src/index.d.ts.map +1 -1
  23. package/lib/typescript/src/mappings/Youtube.d.ts +37 -0
  24. package/lib/typescript/src/mappings/Youtube.d.ts.map +1 -0
  25. package/package.json +6 -5
  26. package/src/components/Youtube.js +38 -0
  27. package/src/components/Youtube.tsx +66 -0
  28. package/src/index.js +1 -1
  29. package/src/index.tsx +1 -2
  30. package/src/mappings/Youtube.js +33 -0
  31. package/src/mappings/Youtube.ts +39 -0
  32. package/lib/commonjs/mappings/HtmlElements.js +0 -126
  33. package/lib/commonjs/mappings/HtmlElements.js.map +0 -1
  34. package/lib/module/mappings/HtmlElements.js +0 -119
  35. package/lib/module/mappings/HtmlElements.js.map +0 -1
  36. package/lib/typescript/src/mappings/HtmlElements.d.ts +0 -50
  37. package/lib/typescript/src/mappings/HtmlElements.d.ts.map +0 -1
  38. package/src/mappings/HtmlElements.js +0 -141
  39. package/src/mappings/HtmlElements.ts +0 -151
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC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,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,37 @@
1
+ export declare const SEED_DATA: {
2
+ name: string;
3
+ tag: string;
4
+ description: string;
5
+ doc_link: string;
6
+ code_link: string;
7
+ category: string;
8
+ stylesPanelSections: string[];
9
+ layout: {
10
+ height: number;
11
+ };
12
+ props: {
13
+ videoId: any;
14
+ playlist: any;
15
+ mute: {
16
+ label: string;
17
+ description: string;
18
+ formType: string;
19
+ propType: string;
20
+ defaultValue: boolean;
21
+ editable: boolean;
22
+ required: boolean;
23
+ group: string;
24
+ };
25
+ autoplay: {
26
+ label: string;
27
+ description: string;
28
+ formType: string;
29
+ propType: string;
30
+ defaultValue: boolean;
31
+ editable: boolean;
32
+ required: boolean;
33
+ group: string;
34
+ };
35
+ };
36
+ };
37
+ //# sourceMappingURL=Youtube.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Youtube.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Youtube.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.4.4-6a9b36.2+6a9b368",
3
+ "version": "46.4.4-6ae6f7.2+6ae6f70",
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-6a9b36.2+6a9b368",
45
- "@expo/html-elements": "^0.2.0",
44
+ "@draftbit/types": "^46.4.4-6ae6f7.2+6ae6f70",
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",
@@ -57,7 +56,9 @@
57
56
  "react-native-modal-datetime-picker": "^13.0.0",
58
57
  "react-native-svg": "12.3.0",
59
58
  "react-native-typography": "^1.4.1",
60
- "react-native-web-swiper": "^2.2.3"
59
+ "react-native-web-swiper": "^2.2.3",
60
+ "react-native-web-webview": "^1.0.2",
61
+ "react-native-youtube-iframe": "^2.2.2"
61
62
  },
62
63
  "devDependencies": {
63
64
  "@types/color": "^3.0.1",
@@ -82,5 +83,5 @@
82
83
  ]
83
84
  ]
84
85
  },
85
- "gitHead": "6a9b36873c77cd4eb1b88162059e58eb0e3f0c08"
86
+ "gitHead": "6ae6f7088edee2d4e7de0e216b34710ea1e131d5"
86
87
  }
@@ -0,0 +1,38 @@
1
+ import { COMPONENT_TYPES, createBoolProp, createTextProp, } from "@draftbit/types";
2
+ import React from "react";
3
+ import YoutubePlayer from "react-native-youtube-iframe";
4
+ import { extractStyles } from "../utilities";
5
+ const Youtube = ({ videoId, playlist, style, mute, autoplay }) => {
6
+ const { viewStyles: { height, width }, } = extractStyles(style);
7
+ return (React.createElement(YoutubePlayer, { height: height, width: width, play: autoplay, videoId: videoId, playList: playlist, mute: mute }));
8
+ };
9
+ export default Youtube;
10
+ export const SEED_DATA = {
11
+ name: "Youtube",
12
+ tag: "Youtube",
13
+ description: "Youtube Component",
14
+ category: COMPONENT_TYPES.media,
15
+ layout: {
16
+ width: "100%",
17
+ },
18
+ props: {
19
+ videoId: createTextProp({
20
+ label: "VideoId",
21
+ description: "Youtube Video ID",
22
+ }),
23
+ playlist: createTextProp({
24
+ label: "PlayList",
25
+ description: "Playlist ID",
26
+ }),
27
+ mute: createBoolProp({
28
+ label: "Mute",
29
+ description: "Whether to mute video",
30
+ defaultValue: false,
31
+ }),
32
+ autoplay: createBoolProp({
33
+ label: "Autoplay",
34
+ description: "Whether to Autoplay video",
35
+ defaultValue: false,
36
+ }),
37
+ },
38
+ };
@@ -0,0 +1,66 @@
1
+ import {
2
+ COMPONENT_TYPES,
3
+ createBoolProp,
4
+ createTextProp,
5
+ } from "@draftbit/types";
6
+ import React from "react";
7
+ import { StyleProp, ViewStyle } from "react-native";
8
+ import YoutubePlayer from "react-native-youtube-iframe";
9
+ import { extractStyles } from "../utilities";
10
+
11
+ type Props = {
12
+ videoId: string;
13
+ playlist: string;
14
+ style: StyleProp<ViewStyle>;
15
+ mute: boolean;
16
+ autoplay: boolean;
17
+ };
18
+
19
+ const Youtube = ({ videoId, playlist, style, mute, autoplay }: Props) => {
20
+ const {
21
+ viewStyles: { height, width },
22
+ } = extractStyles(style);
23
+
24
+ return (
25
+ <YoutubePlayer
26
+ height={height}
27
+ width={width}
28
+ play={autoplay}
29
+ videoId={videoId}
30
+ playList={playlist}
31
+ mute={mute}
32
+ />
33
+ );
34
+ };
35
+
36
+ export default Youtube;
37
+
38
+ export const SEED_DATA = {
39
+ name: "Youtube",
40
+ tag: "Youtube",
41
+ description: "Youtube Component",
42
+ category: COMPONENT_TYPES.media,
43
+ layout: {
44
+ width: "100%",
45
+ },
46
+ props: {
47
+ videoId: createTextProp({
48
+ label: "VideoId",
49
+ description: "Youtube Video ID",
50
+ }),
51
+ playlist: createTextProp({
52
+ label: "PlayList",
53
+ description: "Playlist ID",
54
+ }),
55
+ mute: createBoolProp({
56
+ label: "Mute",
57
+ description: "Whether to mute video",
58
+ defaultValue: false,
59
+ }),
60
+ autoplay: createBoolProp({
61
+ label: "Autoplay",
62
+ description: "Whether to Autoplay video",
63
+ defaultValue: false,
64
+ }),
65
+ },
66
+ };
package/src/index.js CHANGED
@@ -31,7 +31,6 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/A
31
31
  export { Swiper, SwiperItem } from "./components/Swiper";
32
32
  export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
33
33
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
34
- export * from "@expo/html-elements";
35
34
  /* Deprecated: Fix or Delete! */
36
35
  export { default as CardBlock } from "./components/CardBlock";
37
36
  export { default as CardContainer } from "./components/CardContainer";
@@ -50,4 +49,5 @@ export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIc
50
49
  export { default as Slider } from "./components/Slider";
51
50
  export { default as Stepper } from "./components/Stepper";
52
51
  export { useAuthState } from "./components/useAuthState";
52
+ export { default as Youtube } from "./components/Youtube";
53
53
  // a comment to fix sourcemap comment issue
package/src/index.tsx CHANGED
@@ -51,8 +51,6 @@ export {
51
51
  RadioButtonFieldGroup,
52
52
  } from "./components/RadioButton/index";
53
53
 
54
- export * from "@expo/html-elements";
55
-
56
54
  /* Deprecated: Fix or Delete! */
57
55
  export { default as CardBlock } from "./components/CardBlock";
58
56
  export { default as CardContainer } from "./components/CardContainer";
@@ -71,5 +69,6 @@ export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIc
71
69
  export { default as Slider } from "./components/Slider";
72
70
  export { default as Stepper } from "./components/Stepper";
73
71
  export { useAuthState } from "./components/useAuthState";
72
+ export { default as Youtube } from "./components/Youtube";
74
73
 
75
74
  // a comment to fix sourcemap comment issue
@@ -0,0 +1,33 @@
1
+ import { COMPONENT_TYPES, createStaticBoolProp, createTextProp, StylesPanelSections, } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "Youtube",
4
+ tag: "Youtube",
5
+ description: "Given a VideoId orPlaylist and play Youtube video",
6
+ doc_link: "https://lonelycpp.github.io/react-native-youtube-iframe",
7
+ code_link: "https://github.com/LonelyCpp/react-native-youtube-iframe",
8
+ category: COMPONENT_TYPES.media,
9
+ stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Position],
10
+ layout: {
11
+ height: 250,
12
+ },
13
+ props: {
14
+ videoId: createTextProp({
15
+ label: "Video ID",
16
+ description: "VideoId of the Youtube video.",
17
+ defaultValue: "nwMUpDESXrI",
18
+ }),
19
+ playlist: createTextProp({
20
+ label: "Playlist",
21
+ description: "Playlist of the Youtube videos.",
22
+ defaultValue: "PLUa6TiXzjIrwowt6P-uGCJm8ovm-9S1Ks",
23
+ }),
24
+ mute: createStaticBoolProp({
25
+ label: "Mute Audio",
26
+ description: "Mute the audio of the video.",
27
+ }),
28
+ autoplay: createStaticBoolProp({
29
+ label: "Auto Play",
30
+ description: "Autoplay the video on load.",
31
+ }),
32
+ },
33
+ };
@@ -0,0 +1,39 @@
1
+ import {
2
+ COMPONENT_TYPES,
3
+ createStaticBoolProp,
4
+ createTextProp,
5
+ StylesPanelSections,
6
+ } from "@draftbit/types";
7
+
8
+ export const SEED_DATA = {
9
+ name: "Youtube",
10
+ tag: "Youtube",
11
+ description: "Given a VideoId orPlaylist and play Youtube video",
12
+ doc_link: "https://lonelycpp.github.io/react-native-youtube-iframe",
13
+ code_link: "https://github.com/LonelyCpp/react-native-youtube-iframe",
14
+ category: COMPONENT_TYPES.media,
15
+ stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Position],
16
+ layout: {
17
+ height: 250,
18
+ },
19
+ props: {
20
+ videoId: createTextProp({
21
+ label: "Video ID",
22
+ description: "VideoId of the Youtube video.",
23
+ defaultValue: "nwMUpDESXrI",
24
+ }),
25
+ playlist: createTextProp({
26
+ label: "Playlist",
27
+ description: "Playlist of the Youtube videos.",
28
+ defaultValue: "PLUa6TiXzjIrwowt6P-uGCJm8ovm-9S1Ks",
29
+ }),
30
+ mute: createStaticBoolProp({
31
+ label: "Mute Audio",
32
+ description: "Mute the audio of the video.",
33
+ }),
34
+ autoplay: createStaticBoolProp({
35
+ label: "Auto Play",
36
+ description: "Autoplay the video on load.",
37
+ }),
38
+ },
39
+ };
@@ -1,126 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.SEED_DATA = void 0;
7
- var _types = require("@draftbit/types");
8
- const SEED_DATA_TRIGGERS = [_types.Triggers.OnValueChange];
9
- const ELEMENT_PROPS = {
10
- category: _types.COMPONENT_TYPES.element,
11
- doc_link: "https://www.npmjs.com/package/@expo/html-elements",
12
- code_link: "https://github.com/expo/expo/tree/master/packages/html-elements",
13
- stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.LayoutSelectedItem, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Effects],
14
- layout: {
15
- margin: 0
16
- },
17
- triggers: SEED_DATA_TRIGGERS
18
- };
19
- const HEADING_PROPS = {
20
- ...ELEMENT_PROPS
21
- };
22
- const SEED_DATA = [{
23
- name: "H1",
24
- tag: "H1",
25
- ...HEADING_PROPS
26
- }, {
27
- name: "H2",
28
- tag: "H2",
29
- ...HEADING_PROPS
30
- }, {
31
- name: "H3",
32
- tag: "H3",
33
- ...HEADING_PROPS
34
- }, {
35
- name: "H4",
36
- tag: "H4",
37
- ...HEADING_PROPS
38
- }, {
39
- name: "H5",
40
- tag: "H5",
41
- ...HEADING_PROPS
42
- }, {
43
- name: "H6",
44
- tag: "H6",
45
- ...HEADING_PROPS
46
- }, {
47
- name: "Anchor",
48
- tag: "A",
49
- ...ELEMENT_PROPS,
50
- props: {
51
- href: (0, _types.createTextProp)({
52
- label: "href",
53
- description: "Specify the URL",
54
- defaultValue: ""
55
- }),
56
- target: {
57
- group: _types.GROUPS.basic,
58
- label: "target",
59
- description: "decide where link should open",
60
- formType: _types.FORM_TYPES.flatArray,
61
- defaultValue: "_blank",
62
- options: ["_blank", "_self", "_parent", "_top"]
63
- }
64
- }
65
- }, {
66
- name: "Paragraph",
67
- tag: "P",
68
- ...ELEMENT_PROPS,
69
- props: {
70
- // NOTE - Keeping the props commented until we figure out a way to use this props from draftbit side.
71
- // strong: createBoolProp({
72
- // label: "Strong",
73
- // description: "Strong",
74
- // }),
75
- // strike: createBoolProp({
76
- // label: "Strike",
77
- // description: "Strike through",
78
- // }),
79
- // italic: createBoolProp({
80
- // label: "Italic",
81
- // description: "Italic Fonts",
82
- // }),
83
- // bold: createBoolProp({
84
- // label: "Bold",
85
- // description: "Bold",
86
- // }),
87
- }
88
- }, {
89
- name: "Code",
90
- tag: "Code",
91
- ...ELEMENT_PROPS
92
- }, {
93
- name: "Pre",
94
- tag: "Pre",
95
- ...ELEMENT_PROPS
96
- }, {
97
- name: "Mark",
98
- tag: "Mark",
99
- ...ELEMENT_PROPS
100
- }, {
101
- name: "BR",
102
- tag: "BR",
103
- ...ELEMENT_PROPS
104
- }, {
105
- name: "BlockQuote",
106
- tag: "BlockQuote",
107
- ...ELEMENT_PROPS
108
- }, {
109
- name: "Time",
110
- tag: "Time",
111
- ...ELEMENT_PROPS
112
- }, {
113
- name: "UL",
114
- tag: "UL",
115
- ...ELEMENT_PROPS
116
- }, {
117
- name: "LI",
118
- tag: "LI",
119
- ...ELEMENT_PROPS
120
- }, {
121
- name: "HR",
122
- tag: "HR",
123
- ...ELEMENT_PROPS
124
- }];
125
- exports.SEED_DATA = SEED_DATA;
126
- //# sourceMappingURL=HtmlElements.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["SEED_DATA_TRIGGERS","Triggers","OnValueChange","ELEMENT_PROPS","category","COMPONENT_TYPES","element","doc_link","code_link","stylesPanelSections","StylesPanelSections","Typography","LayoutSelectedItem","MarginsAndPaddings","Effects","layout","margin","triggers","HEADING_PROPS","SEED_DATA","name","tag","props","href","createTextProp","label","description","defaultValue","target","group","GROUPS","basic","formType","FORM_TYPES","flatArray","options"],"sourceRoot":"../../src","sources":["HtmlElements.ts"],"mappings":";;;;;;AAAA;AAQA,MAAMA,kBAAkB,GAAG,CAACC,eAAQ,CAACC,aAAa,CAAC;AAEnD,MAAMC,aAAa,GAAG;EACpBC,QAAQ,EAAEC,sBAAe,CAACC,OAAO;EACjCC,QAAQ,EAAE,mDAAmD;EAC7DC,SAAS,EAAE,iEAAiE;EAC5EC,mBAAmB,EAAE,CACnBC,0BAAmB,CAACC,UAAU,EAC9BD,0BAAmB,CAACE,kBAAkB,EACtCF,0BAAmB,CAACG,kBAAkB,EACtCH,0BAAmB,CAACI,OAAO,CAC5B;EACDC,MAAM,EAAE;IACNC,MAAM,EAAE;EACV,CAAC;EACDC,QAAQ,EAAEjB;AACZ,CAAC;AAED,MAAMkB,aAAa,GAAG;EACpB,GAAGf;AACL,CAAC;AAEM,MAAMgB,SAAS,GAAG,CACvB;EACEC,IAAI,EAAE,IAAI;EACVC,GAAG,EAAE,IAAI;EACT,GAAGH;AACL,CAAC,EACD;EACEE,IAAI,EAAE,IAAI;EACVC,GAAG,EAAE,IAAI;EACT,GAAGH;AACL,CAAC,EACD;EACEE,IAAI,EAAE,IAAI;EACVC,GAAG,EAAE,IAAI;EACT,GAAGH;AACL,CAAC,EACD;EACEE,IAAI,EAAE,IAAI;EACVC,GAAG,EAAE,IAAI;EACT,GAAGH;AACL,CAAC,EACD;EACEE,IAAI,EAAE,IAAI;EACVC,GAAG,EAAE,IAAI;EACT,GAAGH;AACL,CAAC,EACD;EACEE,IAAI,EAAE,IAAI;EACVC,GAAG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AG,EAAE,IAAI;EACT,GAAGlB;AACL,CAAC,EACD;EACEiB,IAAI,EAAE,IAAI;EACVC,GAAG,EAAE,IAAI;EACT,GAAGlB;AACL,CAAC,EACD;EACEiB,IAAI,EAAE,IAAI;EACVC,GAAG,EAAE,IAAI;EACT,GAAGlB;AACL,CAAC,CACF;AAAC"}
@@ -1,119 +0,0 @@
1
- import { COMPONENT_TYPES, createTextProp, FORM_TYPES, GROUPS, StylesPanelSections, Triggers } from "@draftbit/types";
2
- const SEED_DATA_TRIGGERS = [Triggers.OnValueChange];
3
- const ELEMENT_PROPS = {
4
- category: COMPONENT_TYPES.element,
5
- doc_link: "https://www.npmjs.com/package/@expo/html-elements",
6
- code_link: "https://github.com/expo/expo/tree/master/packages/html-elements",
7
- stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.LayoutSelectedItem, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Effects],
8
- layout: {
9
- margin: 0
10
- },
11
- triggers: SEED_DATA_TRIGGERS
12
- };
13
- const HEADING_PROPS = {
14
- ...ELEMENT_PROPS
15
- };
16
- export const SEED_DATA = [{
17
- name: "H1",
18
- tag: "H1",
19
- ...HEADING_PROPS
20
- }, {
21
- name: "H2",
22
- tag: "H2",
23
- ...HEADING_PROPS
24
- }, {
25
- name: "H3",
26
- tag: "H3",
27
- ...HEADING_PROPS
28
- }, {
29
- name: "H4",
30
- tag: "H4",
31
- ...HEADING_PROPS
32
- }, {
33
- name: "H5",
34
- tag: "H5",
35
- ...HEADING_PROPS
36
- }, {
37
- name: "H6",
38
- tag: "H6",
39
- ...HEADING_PROPS
40
- }, {
41
- name: "Anchor",
42
- tag: "A",
43
- ...ELEMENT_PROPS,
44
- props: {
45
- href: createTextProp({
46
- label: "href",
47
- description: "Specify the URL",
48
- defaultValue: ""
49
- }),
50
- target: {
51
- group: GROUPS.basic,
52
- label: "target",
53
- description: "decide where link should open",
54
- formType: FORM_TYPES.flatArray,
55
- defaultValue: "_blank",
56
- options: ["_blank", "_self", "_parent", "_top"]
57
- }
58
- }
59
- }, {
60
- name: "Paragraph",
61
- tag: "P",
62
- ...ELEMENT_PROPS,
63
- props: {
64
- // NOTE - Keeping the props commented until we figure out a way to use this props from draftbit side.
65
- // strong: createBoolProp({
66
- // label: "Strong",
67
- // description: "Strong",
68
- // }),
69
- // strike: createBoolProp({
70
- // label: "Strike",
71
- // description: "Strike through",
72
- // }),
73
- // italic: createBoolProp({
74
- // label: "Italic",
75
- // description: "Italic Fonts",
76
- // }),
77
- // bold: createBoolProp({
78
- // label: "Bold",
79
- // description: "Bold",
80
- // }),
81
- }
82
- }, {
83
- name: "Code",
84
- tag: "Code",
85
- ...ELEMENT_PROPS
86
- }, {
87
- name: "Pre",
88
- tag: "Pre",
89
- ...ELEMENT_PROPS
90
- }, {
91
- name: "Mark",
92
- tag: "Mark",
93
- ...ELEMENT_PROPS
94
- }, {
95
- name: "BR",
96
- tag: "BR",
97
- ...ELEMENT_PROPS
98
- }, {
99
- name: "BlockQuote",
100
- tag: "BlockQuote",
101
- ...ELEMENT_PROPS
102
- }, {
103
- name: "Time",
104
- tag: "Time",
105
- ...ELEMENT_PROPS
106
- }, {
107
- name: "UL",
108
- tag: "UL",
109
- ...ELEMENT_PROPS
110
- }, {
111
- name: "LI",
112
- tag: "LI",
113
- ...ELEMENT_PROPS
114
- }, {
115
- name: "HR",
116
- tag: "HR",
117
- ...ELEMENT_PROPS
118
- }];
119
- //# sourceMappingURL=HtmlElements.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["COMPONENT_TYPES","createTextProp","FORM_TYPES","GROUPS","StylesPanelSections","Triggers","SEED_DATA_TRIGGERS","OnValueChange","ELEMENT_PROPS","category","element","doc_link","code_link","stylesPanelSections","Typography","LayoutSelectedItem","MarginsAndPaddings","Effects","layout","margin","triggers","HEADING_PROPS","SEED_DATA","name","tag","props","href","label","description","defaultValue","target","group","basic","formType","flatArray","options"],"sourceRoot":"../../src","sources":["HtmlElements.ts"],"mappings":"AAAA,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2
- category: string;
3
- doc_link: string;
4
- code_link: string;
5
- stylesPanelSections: string[];
6
- layout: {
7
- margin: number;
8
- };
9
- triggers: string[];
10
- name: string;
11
- tag: string;
12
- } | {
13
- props: {
14
- href: any;
15
- target: {
16
- group: string;
17
- label: string;
18
- description: string;
19
- formType: string;
20
- defaultValue: string;
21
- options: string[];
22
- };
23
- };
24
- category: string;
25
- doc_link: string;
26
- code_link: string;
27
- stylesPanelSections: string[];
28
- layout: {
29
- margin: number;
30
- };
31
- triggers: string[];
32
- name: string;
33
- tag: string;
34
- } | {
35
- props: {
36
- href?: undefined;
37
- target?: undefined;
38
- };
39
- category: string;
40
- doc_link: string;
41
- code_link: string;
42
- stylesPanelSections: string[];
43
- layout: {
44
- margin: number;
45
- };
46
- triggers: string[];
47
- name: string;
48
- tag: string;
49
- })[];
50
- //# sourceMappingURL=HtmlElements.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HtmlElements.d.ts","sourceRoot":"","sources":["../../../../src/mappings/HtmlElements.ts"],"names":[],"mappings":"AA8BA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwHrB,CAAC"}