@happeouikit/content-renderer 3.1.2 → 3.1.4

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/CHANGELOG.md ADDED
@@ -0,0 +1,231 @@
1
+ # Changelog
2
+
3
+ ## 3.1.4
4
+
5
+ - [Fixed] styles for custom-emoji
6
+
7
+ ## 3.1.3
8
+
9
+ - [Add] styles for custom-emoji
10
+
11
+ ## 3.1.2
12
+
13
+ - [Add] img type data attribute
14
+
15
+ ## 3.1.1
16
+
17
+ - [Remove] @universe dependencies
18
+
19
+ ## 3.0.10
20
+
21
+ - [Fixed] paragraph styles
22
+
23
+ ## 3.0.9
24
+
25
+ - [Fixed] paragraph styles
26
+
27
+ ## 3.0.8
28
+
29
+ - Publish
30
+
31
+ ## 3.0.7
32
+
33
+ - Publish
34
+
35
+ ## 3.0.6
36
+
37
+ - [Added] Support for user defined font families and weights
38
+
39
+ ## 3.0.5
40
+
41
+ - Publish
42
+
43
+ ## 3.0.4
44
+
45
+ - [Fixed] ContentRenderer should now render content without applying links to domain-like text.
46
+ - [Updated] Updated ContentRenderer unit test with Testing Linkify hyper-link Features.
47
+
48
+ ## 3.0.3
49
+
50
+ - [Added] Added prop `forceDefaultLinkTarget` that will force external links with `target="_blank"` and removes `target` from internal links.
51
+
52
+ ## 3.0.2
53
+
54
+ - [Fixed] ContentRenderer now applies styling options from Pages
55
+
56
+ ## 3.0.1
57
+
58
+ - [Fixed] ContentRenderer should now deal with all kinds of xss
59
+
60
+ ## 3.0.0
61
+
62
+ - [Fixed] the xss converter now accepts a whiteList for CSS properties that includes vertical-align
63
+ - [Updated] new dependencies updates: React 17 and and Styled Components 5
64
+
65
+ ## 2.0.1
66
+
67
+ - [Added] Changed type to uppercase and to handle both upper and lowercase. Add warning if lowecase is used.
68
+ - [Added] Handle widgetType=`page` by removing forced styles from component.
69
+
70
+ ## 2.0.0
71
+
72
+ - [Breaking change] Links rendered from markdown content now always open in a new tab (not configurable).
73
+
74
+ ## 1.0.48
75
+
76
+ - [Fixed] Decode HTML entites causing crashes
77
+
78
+ ## 1.0.46
79
+
80
+ - [Fixed] Use correct font-family for all the tags inside paragraphs and list elements etc.
81
+
82
+ ## 1.0.45
83
+
84
+ - [Fixed] Removed some padding for tables without borders
85
+
86
+ ## 1.0.44
87
+
88
+ - [Fixed] Removed special characteds from content copying
89
+
90
+ ## 1.0.43
91
+
92
+ - [Fixed] Moved to ReactDOM for rendering extra buttons
93
+ - [Added] Ability to include anchor links & buttons
94
+ - [Added] Ability to auto-scroll to anchors
95
+
96
+ ## 1.0.42
97
+
98
+ - [Fixed] Remove bolding from links
99
+
100
+ ## 1.0.37
101
+
102
+ - [Fixed] Get correct parent for copy button
103
+
104
+ ## 1.0.36
105
+
106
+ - [Fixed] Improved code block styles
107
+
108
+ ## 1.0.35
109
+
110
+ - [Fixed] important fonts
111
+
112
+ ## 1.0.34
113
+
114
+ - [Fixed] use custom fonts for all tags inside h1, h2, h3
115
+
116
+ ## 1.0.33
117
+
118
+ - [Fixed] Code block
119
+
120
+ ## 1.0.30
121
+
122
+ - [Fixed] enforce font style to content
123
+
124
+ ## 1.0.29
125
+
126
+ - [Fixed] Modify blockquote styles to match froala's
127
+
128
+ ## 1.0.28
129
+
130
+ - [Fixed] Default image placement is now left aligned and not centered
131
+ - [Fixed] Update frontend-utils dependency
132
+
133
+ ## 1.0.27
134
+
135
+ - [Add] Rendering of code blocks + adding copy button to code blocks
136
+
137
+ ## 1.0.26
138
+
139
+ - [Fixed] Embeded videos styles
140
+
141
+ ## 1.0.25
142
+
143
+ - [Fixed] Removed a href urls
144
+
145
+ ## 1.0.24
146
+
147
+ - [Fixed] fixed article CSS styles.
148
+
149
+ ## 1.0.23
150
+
151
+ - [Fixed] update dependencies
152
+
153
+ ## 1.0.22
154
+
155
+ - [Add] add some props for article content
156
+
157
+ ## 1.0.21
158
+
159
+ - [Fixed] stop publishing the docs
160
+
161
+ ## 1.0.20
162
+
163
+ - [Add] Changed some css for @channel and @editor
164
+
165
+ ## 1.0.19
166
+
167
+ - [Fixed] Changed @team into @channel mentioning
168
+
169
+ ## 1.0.18
170
+
171
+ - [Add] Support for @team and @editors mentioning.
172
+
173
+ ## 1.0.17
174
+
175
+ - [Fixed] Styles for heading text.
176
+
177
+ ## 1.0.15
178
+
179
+ - [Fixed] Type error in the mentions Showdown plugin
180
+
181
+ ## 1.0.14
182
+
183
+ - [Fixed] Links converted from markdown will now open in a new tab.
184
+
185
+ ## 1.0.13
186
+
187
+ - [Fixed] Pre element styles are now also applied to Code elements.
188
+
189
+ ## 1.0.11
190
+
191
+ - [Fixed] Ordered and unordered lists are now aligned, and have correct line-height.
192
+
193
+ ## 1.0.10
194
+
195
+ - [Fixed] List font size is now 16px.
196
+
197
+ ## 1.0.8
198
+
199
+ - [Added] CSS styles to mention tags.
200
+
201
+ ## 1.0.7
202
+
203
+ - [Fixed] Adds class to safe tags for anchor elements.
204
+
205
+ ## 1.0.6
206
+
207
+ - [Fixed] font stylings of p tags.
208
+
209
+ ## 1.0.5
210
+
211
+ - [Fixed] Missing dist
212
+
213
+ ## 1.0.4
214
+
215
+ - [Fixed] Package not updated
216
+
217
+ ## 1.0.3
218
+
219
+ - [Added] Handle user-mentio html tag
220
+
221
+ ## 1.0.2
222
+
223
+ - Publish
224
+
225
+ ## 1.0.1
226
+
227
+ - [Fixed] All children elements will now use the sans-serif font family.
228
+
229
+ ## 1.0.0
230
+
231
+ - Initial copy from the private kit
@@ -179,7 +179,7 @@ var Wrapper = styled(BodyUI).attrs({
179
179
  }, lighten(warn, 0.8), gray09, padding200, function (_ref3) {
180
180
  var widgetType = _ref3.widgetType,
181
181
  inheritBrandingStyles = _ref3.inheritBrandingStyles;
182
- return widgetType === "page" ? "" : "\n * {\n font-family: ".concat(sansFamily, ";\n }\n\n h1 {\n font-family: ").concat(inheritBrandingStyles ? "var(--channels-h1-font-family, revert)" : "revert", "; \n font-weight: ").concat(inheritBrandingStyles ? "var(--channels-h1-font-weight, 500)" : "500", ";\n font-size: 24px;\n letter-spacing: -0.5px;\n line-height: 32px;\n + h1,\n + h2,\n + h3,\n + h4,\n + p {\n margin-top: 16px;\n }\n & * {\n font-family: ").concat(inheritBrandingStyles ? "var(--channels-h1-font-family, revert)" : "revert", "; \n }\n }\n h2 {\n font-family: ").concat(inheritBrandingStyles ? "var(--channels-h2-font-family, revert)" : "revert", "; \n font-weight: ").concat(inheritBrandingStyles ? "var(--channels-h2-font-weight, 500)" : "500", ";\n font-size: 20px;\n line-height: 28px;\n + h1,\n + h2,\n + h3,\n + h4,\n + p {\n margin-top: 14px;\n }\n & * {\n font-family: ").concat(inheritBrandingStyles ? "var(--channels-h2-font-family, revert)" : "revert", "; \n }\n }\n h3 {\n font-family: ").concat(inheritBrandingStyles ? "var(--channels-h3-font-family, revert)" : "revert", "; \n font-weight: ").concat(inheritBrandingStyles ? "var(--channels-h3-font-weight, 500)" : "500", ";\n font-size: 16px;\n line-height: 24px;\n + h1,\n + h2,\n + h3,\n + h4,\n + p {\n margin-top: 12px;\n }\n & * {\n font-family: ").concat(inheritBrandingStyles ? "var(--channels-h3-font-family, revert);" : "revert", " \n }\n }\n h4 {\n font-size: 16px;\n line-height: 24px;\n + h1,\n + h2,\n + h3,\n + h4,\n + p {\n margin-top: 12px;\n }\n }\n p {\n font-family: ").concat(inheritBrandingStyles ? "var(--channels-body-font-family, revert)" : "revert", "; \n font-weight: ").concat(inheritBrandingStyles ? "var(--channels-body-font-weight, revert)" : "revert", ";\n font-size: 16px;\n line-height: 24px;\n letter-spacing: 0px;\n + h1,\n + h2,\n + h3,\n + h4,\n + p {\n margin-top: 12px;\n }\n\n & * {\n font-family: ").concat(inheritBrandingStyles ? "var(--channels-body-font-family, revert)" : "revert", "; \n }\n }\n }\n a {\n color: ").concat(active, ";\n text-decoration: none;\n :hover {\n text-decoration: underline;\n }\n }\n ul {\n list-style-type: disc;\n }\n ol {\n list-style-type: decimal;\n counter-reset: item;\n li {\n padding-left: 12px;\n text-indent: -33px;\n list-style-type: none;\n counter-increment: item;\n &:before {\n display: inline-block;\n width: 13px;\n padding-right: 15px;\n padding-left: 5px;\n font-weight: bold;\n text-align: right;\n content: counter(item) \".\";\n }\n font-family: ").concat(inheritBrandingStyles ? "var(--channels-body-font-family, revert)" : "revert", "; \n font-weight: ").concat(inheritBrandingStyles ? "var(--channels-body-font-weight, revert)" : "revert", ";\n }\n }\n ol,\n ul {\n font-size: 16px;\n line-height: 24px;\n margin: 18px 16px;\n display: block;\n -webkit-margin-before: 0.5em;\n -webkit-margin-after: 0.5em;\n -webkit-padding-start: 0.5em;\n li,\n li {\n margin-bottom: 5px;\n padding-left: 10px;\n > ul,\n > ol {\n -webkit-margin-before: 8px !important;\n -webkit-margin-after: 8px !important;\n }\n\n font-family: ").concat(inheritBrandingStyles ? "var(--channels-body-font-family, revert);" : "revert", ";\n font-weight: ").concat(inheritBrandingStyles ? "var(--channels-body-font-weight, revert)" : "revert", ";\n }\n\n &:first-child,\n &:first-child {\n -webkit-margin-before: 0;\n }\n &:last-child,\n &:last-child {\n -webkit-margin-after: 0;\n }\n }\n hr {\n -webkit-margin-before: 16px;\n -webkit-margin-after: 13px;\n border-color: @border-color;\n border-style: solid;\n height: 0px;\n border-width: 1px 0 0 0;\n }\n table {\n width: 100%;\n margin: 15px 0;\n text-align: left;\n thead th {\n background: @white;\n }\n th,\n td {\n border-width: 1px;\n border-style: solid;\n border-color: @border-color;\n padding: 0.5em;\n }\n tr:nth-child(even) {\n background: @almost-white;\n }\n tr:nth-child(odd) {\n background: @white;\n }\n }\n table.no-borders {\n th,\n td {\n border: none;\n }\n }\n table.padded-2 {\n th,\n td {\n padding: 2em;\n }\n }\n table.padded-1 {\n th,\n td {\n padding: 1em;\n }\n }\n img {\n max-width: 100%;\n margin: 15px 0;\n & + img {\n margin-top: 0;\n }\n }\n .xl-emoji * {\n font-size: 40px;\n line-height: 1.2;\n }\n \n blockquote {\n border-top: 2px solid ").concat(gray07, ";\n border-bottom: 2px solid ").concat(gray07, ";\n font-size: 18px;\n padding: 24px 48px;\n position: relative;\n text-align: center;\n margin: 48px 0;\n }\n ");
182
+ return widgetType === "page" ? "" : "\n * {\n font-family: ".concat(sansFamily, ";\n }\n\n h1 {\n font-family: ").concat(inheritBrandingStyles ? "var(--channels-h1-font-family, revert)" : "revert", "; \n font-weight: ").concat(inheritBrandingStyles ? "var(--channels-h1-font-weight, 500)" : "500", ";\n font-size: 24px;\n letter-spacing: -0.5px;\n line-height: 32px;\n + h1,\n + h2,\n + h3,\n + h4,\n + p {\n margin-top: 16px;\n }\n & * {\n font-family: ").concat(inheritBrandingStyles ? "var(--channels-h1-font-family, revert)" : "revert", "; \n }\n }\n h2 {\n font-family: ").concat(inheritBrandingStyles ? "var(--channels-h2-font-family, revert)" : "revert", "; \n font-weight: ").concat(inheritBrandingStyles ? "var(--channels-h2-font-weight, 500)" : "500", ";\n font-size: 20px;\n line-height: 28px;\n + h1,\n + h2,\n + h3,\n + h4,\n + p {\n margin-top: 14px;\n }\n & * {\n font-family: ").concat(inheritBrandingStyles ? "var(--channels-h2-font-family, revert)" : "revert", "; \n }\n }\n h3 {\n font-family: ").concat(inheritBrandingStyles ? "var(--channels-h3-font-family, revert)" : "revert", "; \n font-weight: ").concat(inheritBrandingStyles ? "var(--channels-h3-font-weight, 500)" : "500", ";\n font-size: 16px;\n line-height: 24px;\n + h1,\n + h2,\n + h3,\n + h4,\n + p {\n margin-top: 12px;\n }\n & * {\n font-family: ").concat(inheritBrandingStyles ? "var(--channels-h3-font-family, revert);" : "revert", " \n }\n }\n h4 {\n font-size: 16px;\n line-height: 24px;\n + h1,\n + h2,\n + h3,\n + h4,\n + p {\n margin-top: 12px;\n }\n }\n p {\n font-family: ").concat(inheritBrandingStyles ? "var(--channels-body-font-family, revert)" : "revert", "; \n font-weight: ").concat(inheritBrandingStyles ? "var(--channels-body-font-weight, revert)" : "revert", ";\n font-size: 16px;\n line-height: 24px;\n letter-spacing: 0px;\n + h1,\n + h2,\n + h3,\n + h4,\n + p {\n margin-top: 12px;\n }\n\n & * {\n font-family: ").concat(inheritBrandingStyles ? "var(--channels-body-font-family, revert)" : "revert", "; \n }\n }\n }\n a {\n color: ").concat(active, ";\n text-decoration: none;\n :hover {\n text-decoration: underline;\n }\n }\n ul {\n list-style-type: disc;\n }\n ol {\n list-style-type: decimal;\n counter-reset: item;\n li {\n padding-left: 12px;\n text-indent: -33px;\n list-style-type: none;\n counter-increment: item;\n &:before {\n display: inline-block;\n width: 13px;\n padding-right: 15px;\n padding-left: 5px;\n font-weight: bold;\n text-align: right;\n content: counter(item) \".\";\n }\n font-family: ").concat(inheritBrandingStyles ? "var(--channels-body-font-family, revert)" : "revert", "; \n font-weight: ").concat(inheritBrandingStyles ? "var(--channels-body-font-weight, revert)" : "revert", ";\n }\n }\n ol,\n ul {\n font-size: 16px;\n line-height: 24px;\n margin: 18px 16px;\n display: block;\n -webkit-margin-before: 0.5em;\n -webkit-margin-after: 0.5em;\n -webkit-padding-start: 0.5em;\n li,\n li {\n margin-bottom: 5px;\n padding-left: 10px;\n > ul,\n > ol {\n -webkit-margin-before: 8px !important;\n -webkit-margin-after: 8px !important;\n }\n\n font-family: ").concat(inheritBrandingStyles ? "var(--channels-body-font-family, revert);" : "revert", ";\n font-weight: ").concat(inheritBrandingStyles ? "var(--channels-body-font-weight, revert)" : "revert", ";\n }\n\n &:first-child,\n &:first-child {\n -webkit-margin-before: 0;\n }\n &:last-child,\n &:last-child {\n -webkit-margin-after: 0;\n }\n }\n hr {\n -webkit-margin-before: 16px;\n -webkit-margin-after: 13px;\n border-color: @border-color;\n border-style: solid;\n height: 0px;\n border-width: 1px 0 0 0;\n }\n table {\n width: 100%;\n margin: 15px 0;\n text-align: left;\n thead th {\n background: @white;\n }\n th,\n td {\n border-width: 1px;\n border-style: solid;\n border-color: @border-color;\n padding: 0.5em;\n }\n tr:nth-child(even) {\n background: @almost-white;\n }\n tr:nth-child(odd) {\n background: @white;\n }\n }\n table.no-borders {\n th,\n td {\n border: none;\n }\n }\n table.padded-2 {\n th,\n td {\n padding: 2em;\n }\n }\n table.padded-1 {\n th,\n td {\n padding: 1em;\n }\n }\n img {\n max-width: 100%;\n margin: 15px 0;\n & + img {\n margin-top: 0;\n }\n\n &[type=\"custom-emoji\"] {\n height: 1em;\n display: inline;\n vertical-align: middle;\n }\n }\n .xl-emoji * {\n font-size: 40px;\n line-height: 1.2;\n }\n \n blockquote {\n border-top: 2px solid ").concat(gray07, ";\n border-bottom: 2px solid ").concat(gray07, ";\n font-size: 18px;\n padding: 24px 48px;\n position: relative;\n text-align: center;\n margin: 48px 0;\n }\n ");
183
183
  }, function (_ref4) {
184
184
  var widgetType = _ref4.widgetType,
185
185
  inheritBrandingStyles = _ref4.inheritBrandingStyles;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happeouikit/content-renderer",
3
- "version": "3.1.2",
3
+ "version": "3.1.4",
4
4
  "description": "Rendering html and markdown content",
5
5
  "main": "dist/index.js",
6
6
  "module": "src/index.js",