@cntrl-site/sdk-nextjs 1.0.14 → 1.0.15

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.
Binary file
@@ -30,7 +30,7 @@ class RichTextConverter {
30
30
  const block = blocks[blockIndex];
31
31
  const content = text.slice(block.start, block.end + 1);
32
32
  const entities = (_a = block.entities.sort((a, b) => a.start - b.start)) !== null && _a !== void 0 ? _a : [];
33
- if (content.length === 0) {
33
+ if (content.length === 1) {
34
34
  const id = `rt_${richText.id}_br_${blockIndex}`;
35
35
  root.push((0, jsx_runtime_1.jsx)("div", { className: id, children: (0, jsx_runtime_1.jsx)("br", {}) }, id));
36
36
  layouts.forEach(l => {
@@ -171,7 +171,7 @@ class RichTextConverter {
171
171
  groupEntities(entities, styleGroups) {
172
172
  var _a, _b, _c, _d, _e, _f, _g, _h;
173
173
  const entitiesGroups = [];
174
- if (!entities.length && (!styleGroups || !styleGroups.length))
174
+ if (!entities.length && !styleGroups)
175
175
  return;
176
176
  if (!styleGroups || styleGroups.length === 0) {
177
177
  const dividersSet = entities.reduce((ds, e) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntrl-site/sdk-nextjs",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "SDK for Next.js",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/index.ts",
@@ -58,7 +58,7 @@ export class RichTextConverter {
58
58
  const block = blocks[blockIndex];
59
59
  const content = text.slice(block.start, block.end + 1);
60
60
  const entities = block.entities!.sort((a, b) => a.start - b.start) ?? [];
61
- if (content.length === 0) {
61
+ if (content.length === 1) {
62
62
  const id = `rt_${richText.id}_br_${blockIndex}`;
63
63
  root.push(<div key={id} className={id}><br /></div>);
64
64
  layouts.forEach(l => {
@@ -202,7 +202,7 @@ export class RichTextConverter {
202
202
 
203
203
  private groupEntities(entities: RichTextEntity[], styleGroups?: StyleGroup[]): EntitiesGroup[] | undefined {
204
204
  const entitiesGroups: EntitiesGroup[] = [];
205
- if (!entities.length && (!styleGroups || !styleGroups.length)) return;
205
+ if (!entities.length && !styleGroups) return;
206
206
  if (!styleGroups || styleGroups.length === 0) {
207
207
  const dividersSet = entities.reduce((ds, e) => {
208
208
  // some entities may have no data, need to filter them out
@@ -1,5 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <state>
3
- <option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
4
- </state>
5
- </component>
@@ -1,15 +0,0 @@
1
- <component name="InspectionProjectProfileManager">
2
- <profile version="1.0">
3
- <option name="myName" value="Project Default" />
4
- <inspection_tool class="HtmlUnknownAttribute" enabled="true" level="WARNING" enabled_by_default="true">
5
- <option name="myValues">
6
- <value>
7
- <list size="1">
8
- <item index="0" class="java.lang.String" itemvalue="jsx" />
9
- </list>
10
- </value>
11
- </option>
12
- <option name="myCustomValuesEnabled" value="true" />
13
- </inspection_tool>
14
- </profile>
15
- </component>