@cntrl-site/sdk-nextjs 0.2.11 → 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.
- package/.idea/workspace.xml +71 -14
- package/cntrl-site-sdk-nextjs-0.2.13.tgz +0 -0
- package/lib/components/Item.js +2 -2
- package/lib/components/LinkWrapper.js +1 -1
- package/lib/utils/RichTextConverter.js +1 -2
- package/package.json +1 -1
- package/src/components/Item.tsx +2 -2
- package/src/components/LinkWrapper.tsx +1 -1
- package/src/utils/RichTextConverter.tsx +1 -3
- package/cntrl-site-sdk-nextjs-0.2.10.tgz +0 -0
package/.idea/workspace.xml
CHANGED
|
@@ -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-
|
|
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" />
|
|
@@ -23,17 +23,17 @@
|
|
|
23
23
|
<option name="hideEmptyMiddlePackages" value="true" />
|
|
24
24
|
<option name="showLibraryContents" value="true" />
|
|
25
25
|
</component>
|
|
26
|
-
<component name="PropertiesComponent"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
<component name="PropertiesComponent">{
|
|
27
|
+
"keyToString": {
|
|
28
|
+
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
|
29
|
+
"RunOnceActivity.ShowReadmeOnStart": "true",
|
|
30
|
+
"WebServerToolWindowFactoryState": "false",
|
|
31
|
+
"last_opened_file_path": "/Users/admin/Documents/CNTRL/sdk-nextjs",
|
|
32
|
+
"nodejs_package_manager_path": "npm",
|
|
33
|
+
"ts.external.directory.path": "/Users/admin/Documents/CNTRL/sdk-nextjs/node_modules/typescript/lib",
|
|
34
|
+
"vue.rearranger.settings.migration": "true"
|
|
35
35
|
}
|
|
36
|
-
}
|
|
36
|
+
}</component>
|
|
37
37
|
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
|
38
38
|
<component name="TaskManager">
|
|
39
39
|
<task active="true" id="Default" summary="Default task">
|
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
<workItem from="1669397663981" duration="8121000" />
|
|
50
50
|
<workItem from="1669630429786" duration="5568000" />
|
|
51
51
|
<workItem from="1669712625667" duration="100000" />
|
|
52
|
-
<workItem from="1670846885306" duration="
|
|
52
|
+
<workItem from="1670846885306" duration="14667000" />
|
|
53
|
+
<workItem from="1670922174491" duration="23095000" />
|
|
53
54
|
</task>
|
|
54
55
|
<task id="LOCAL-00001" summary="CNTRL-484 - added embed vimeo video">
|
|
55
56
|
<created>1667586762678</created>
|
|
@@ -198,7 +199,56 @@
|
|
|
198
199
|
<option name="project" value="LOCAL" />
|
|
199
200
|
<updated>1670862883753</updated>
|
|
200
201
|
</task>
|
|
201
|
-
<
|
|
202
|
+
<task id="LOCAL-00022" summary="CNTRL-694 comments fix">
|
|
203
|
+
<created>1670864771128</created>
|
|
204
|
+
<option name="number" value="00022" />
|
|
205
|
+
<option name="presentableId" value="LOCAL-00022" />
|
|
206
|
+
<option name="project" value="LOCAL" />
|
|
207
|
+
<updated>1670864771128</updated>
|
|
208
|
+
</task>
|
|
209
|
+
<task id="LOCAL-00023" summary="CNTRL-694 undefined url fix">
|
|
210
|
+
<created>1670947749514</created>
|
|
211
|
+
<option name="number" value="00023" />
|
|
212
|
+
<option name="presentableId" value="LOCAL-00023" />
|
|
213
|
+
<option name="project" value="LOCAL" />
|
|
214
|
+
<updated>1670947749514</updated>
|
|
215
|
+
</task>
|
|
216
|
+
<task id="LOCAL-00024" summary="CNTRL-694 version bump">
|
|
217
|
+
<created>1670948708761</created>
|
|
218
|
+
<option name="number" value="00024" />
|
|
219
|
+
<option name="presentableId" value="LOCAL-00024" />
|
|
220
|
+
<option name="project" value="LOCAL" />
|
|
221
|
+
<updated>1670948708762</updated>
|
|
222
|
+
</task>
|
|
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" />
|
|
202
252
|
<servers />
|
|
203
253
|
</component>
|
|
204
254
|
<component name="TypeScriptGeneratedFilesManager">
|
|
@@ -231,6 +281,13 @@
|
|
|
231
281
|
<MESSAGE value="CNTRL-617 Version bump" />
|
|
232
282
|
<MESSAGE value="CNTRL-694 added valid url builder" />
|
|
233
283
|
<MESSAGE value="CNTRL-694 added code styling and version bump" />
|
|
234
|
-
<
|
|
284
|
+
<MESSAGE value="CNTRL-694 comments fix" />
|
|
285
|
+
<MESSAGE value="CNTRL-694 undefined url fix" />
|
|
286
|
+
<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" />
|
|
235
292
|
</component>
|
|
236
293
|
</project>
|
|
Binary file
|
package/lib/components/Item.js
CHANGED
|
@@ -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` : '
|
|
37
|
-
height: ${sizingAxis.y === sdk_1.ArticleItemSizingType.Manual ? `${area.height * 100}vw` : '
|
|
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
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.LinkWrapper = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const LinkWrapper = ({ url, children }) => {
|
|
6
|
-
const validUrl = buildValidUrl(url);
|
|
6
|
+
const validUrl = url && buildValidUrl(url);
|
|
7
7
|
return url ? ((0, jsx_runtime_1.jsx)("a", { href: validUrl, target: url.startsWith('/') ? '_self' : '_blank', rel: "noreferrer", children: children })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children }));
|
|
8
8
|
};
|
|
9
9
|
exports.LinkWrapper = LinkWrapper;
|
|
@@ -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:
|
|
62
|
+
white-space: normal;
|
|
64
63
|
overflow-wrap: break-word;
|
|
65
64
|
}
|
|
66
65
|
`);
|
package/package.json
CHANGED
package/src/components/Item.tsx
CHANGED
|
@@ -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` : '
|
|
54
|
-
height: ${sizingAxis.y === SizingType.Manual ? `${area.height * 100}vw` : '
|
|
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:
|
|
90
|
+
white-space: normal;
|
|
93
91
|
overflow-wrap: break-word;
|
|
94
92
|
}
|
|
95
93
|
`);
|
|
Binary file
|