@cntrl-site/sdk-nextjs 0.2.12 → 0.2.13

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.
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <project version="4">
3
3
  <component name="ChangeListManager">
4
- <list default="true" id="daade3cc-2214-4d1b-a6ad-012b8ae407bf" name="Changes" comment="CNTRL-694 version bump" />
4
+ <list default="true" id="daade3cc-2214-4d1b-a6ad-012b8ae407bf" name="Changes" comment="CNTRL-427: version bump" />
5
5
  <option name="SHOW_DIALOG" value="false" />
6
6
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
7
7
  <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -50,7 +50,7 @@
50
50
  <workItem from="1669630429786" duration="5568000" />
51
51
  <workItem from="1669712625667" duration="100000" />
52
52
  <workItem from="1670846885306" duration="14667000" />
53
- <workItem from="1670922174491" duration="11184000" />
53
+ <workItem from="1670922174491" duration="23095000" />
54
54
  </task>
55
55
  <task id="LOCAL-00001" summary="CNTRL-484 - added embed vimeo video">
56
56
  <created>1667586762678</created>
@@ -220,7 +220,35 @@
220
220
  <option name="project" value="LOCAL" />
221
221
  <updated>1670948708762</updated>
222
222
  </task>
223
- <option name="localTasksCounter" value="25" />
223
+ <task id="LOCAL-00025" summary="CNTRL-427: changed Item w and h params">
224
+ <created>1670952164829</created>
225
+ <option name="number" value="00025" />
226
+ <option name="presentableId" value="LOCAL-00025" />
227
+ <option name="project" value="LOCAL" />
228
+ <updated>1670952164829</updated>
229
+ </task>
230
+ <task id="LOCAL-00026" summary="CNTRL-427: changed white-space prop to normal for all text aligns">
231
+ <created>1671017859114</created>
232
+ <option name="number" value="00026" />
233
+ <option name="presentableId" value="LOCAL-00026" />
234
+ <option name="project" value="LOCAL" />
235
+ <updated>1671017859114</updated>
236
+ </task>
237
+ <task id="LOCAL-00027" summary="CNTRL-427: deleted unused import">
238
+ <created>1671017914825</created>
239
+ <option name="number" value="00027" />
240
+ <option name="presentableId" value="LOCAL-00027" />
241
+ <option name="project" value="LOCAL" />
242
+ <updated>1671017914825</updated>
243
+ </task>
244
+ <task id="LOCAL-00028" summary="CNTRL-427: version bump">
245
+ <created>1671097766100</created>
246
+ <option name="number" value="00028" />
247
+ <option name="presentableId" value="LOCAL-00028" />
248
+ <option name="project" value="LOCAL" />
249
+ <updated>1671097766100</updated>
250
+ </task>
251
+ <option name="localTasksCounter" value="29" />
224
252
  <servers />
225
253
  </component>
226
254
  <component name="TypeScriptGeneratedFilesManager">
@@ -256,6 +284,10 @@
256
284
  <MESSAGE value="CNTRL-694 comments fix" />
257
285
  <MESSAGE value="CNTRL-694 undefined url fix" />
258
286
  <MESSAGE value="CNTRL-694 version bump" />
259
- <option name="LAST_COMMIT_MESSAGE" value="CNTRL-694 version bump" />
287
+ <MESSAGE value="CNTRL-427: changed Item w and h params" />
288
+ <MESSAGE value="CNTRL-427: changed white-space prop to normal for all text aligns" />
289
+ <MESSAGE value="CNTRL-427: deleted unused import" />
290
+ <MESSAGE value="CNTRL-427: version bump" />
291
+ <option name="LAST_COMMIT_MESSAGE" value="CNTRL-427: version bump" />
260
292
  </component>
261
293
  </project>
Binary file
@@ -33,8 +33,8 @@ const Item = ({ item, layouts }) => {
33
33
  position: absolute;
34
34
  top: ${getItemTopStyle(area.top, area.anchorSide)};
35
35
  left: ${area.left * 100}vw;
36
- width: ${sizingAxis.x === sdk_1.ArticleItemSizingType.Manual ? `${area.width * 100}vw` : 'auto'};
37
- height: ${sizingAxis.y === sdk_1.ArticleItemSizingType.Manual ? `${area.height * 100}vw` : 'auto'};
36
+ width: ${sizingAxis.x === sdk_1.ArticleItemSizingType.Manual ? `${area.width * 100}vw` : 'max-content'};
37
+ height: ${sizingAxis.y === sdk_1.ArticleItemSizingType.Manual ? `${area.height * 100}vw` : 'unset'};
38
38
  z-index: ${area.zIndex};
39
39
  transform: rotate(${area.angle}deg);
40
40
  }
@@ -54,13 +54,12 @@ class RichTextConverter {
54
54
  const kids = [];
55
55
  layouts.forEach(l => {
56
56
  const ta = richText.layoutParams[l.id].textAlign;
57
- const whiteSpace = ta === sdk_1.TextAlign.Justify || ta === sdk_1.TextAlign.Right ? 'normal' : 'pre-wrap';
58
57
  styleRules[l.id].push(`
59
58
  .${blockClass} {
60
59
  display: ${group.some(g => g.layout === l.id) ? 'block' : 'none'};
61
60
  text-align: ${ta};
62
61
  line-height: 0;
63
- white-space: ${whiteSpace};
62
+ white-space: normal;
64
63
  overflow-wrap: break-word;
65
64
  }
66
65
  `);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntrl-site/sdk-nextjs",
3
- "version": "0.2.12",
3
+ "version": "0.2.13",
4
4
  "description": "SDK for Next.js",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/index.js",
@@ -50,8 +50,8 @@ export const Item: FC<ItemProps<TArticleItemAny>> = ({ item, layouts }) => {
50
50
  position: absolute;
51
51
  top: ${getItemTopStyle(area.top, area.anchorSide)};
52
52
  left: ${area.left * 100}vw;
53
- width: ${sizingAxis.x === SizingType.Manual ? `${area.width * 100}vw` : 'auto'};
54
- height: ${sizingAxis.y === SizingType.Manual ? `${area.height * 100}vw` : 'auto'};
53
+ width: ${sizingAxis.x === SizingType.Manual ? `${area.width * 100}vw` : 'max-content'};
54
+ height: ${sizingAxis.y === SizingType.Manual ? `${area.height * 100}vw` : 'unset'};
55
55
  z-index: ${area.zIndex};
56
56
  transform: rotate(${area.angle}deg);
57
57
  }
@@ -2,7 +2,6 @@ import { ReactElement, ReactNode } from 'react';
2
2
  import {
3
3
  getLayoutMediaQuery,
4
4
  RichText,
5
- TextAlign,
6
5
  TextTransform,
7
6
  TLayout,
8
7
  TRichTextItem,
@@ -83,13 +82,12 @@ export class RichTextConverter {
83
82
  const kids: ReactNode[] = [];
84
83
  layouts.forEach(l => {
85
84
  const ta = richText.layoutParams[l.id].textAlign;
86
- const whiteSpace = ta === TextAlign.Justify || ta === TextAlign.Right ? 'normal' : 'pre-wrap';
87
85
  styleRules[l.id].push(`
88
86
  .${blockClass} {
89
87
  display: ${group.some(g => g.layout === l.id) ? 'block' : 'none'};
90
88
  text-align: ${ta};
91
89
  line-height: 0;
92
- white-space: ${whiteSpace};
90
+ white-space: normal;
93
91
  overflow-wrap: break-word;
94
92
  }
95
93
  `);
Binary file