@squiz/formatted-text-editor 1.35.1-alpha.14 → 1.35.1-alpha.16

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.
@@ -24,7 +24,7 @@ let UnsupportedNodeExtension = class UnsupportedNodeExtension extends core_1.Nod
24
24
  createNodeSpec(extra, override) {
25
25
  return {
26
26
  selectable: false,
27
- draggable: true,
27
+ draggable: false,
28
28
  atom: true,
29
29
  inline: true,
30
30
  ...override,
package/lib/index.css CHANGED
@@ -1064,6 +1064,7 @@
1064
1064
  .squiz-fte-scope .collapse-box__label {
1065
1065
  margin-left: 0.5rem;
1066
1066
  margin-right: auto;
1067
+ text-align: left;
1067
1068
  }
1068
1069
  .squiz-fte-scope .collapse-box__icon {
1069
1070
  --tw-text-opacity: 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squiz/formatted-text-editor",
3
- "version": "1.35.1-alpha.14",
3
+ "version": "1.35.1-alpha.16",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "scripts": {
@@ -20,8 +20,8 @@
20
20
  "@headlessui/react": "1.7.11",
21
21
  "@mui/icons-material": "5.11.16",
22
22
  "@remirror/react": "2.0.25",
23
- "@squiz/dx-json-schema-lib": "1.35.1-alpha.14",
24
- "@squiz/resource-browser": "1.35.1-alpha.14",
23
+ "@squiz/dx-json-schema-lib": "1.35.1-alpha.16",
24
+ "@squiz/resource-browser": "1.35.1-alpha.16",
25
25
  "clsx": "1.2.1",
26
26
  "react-hook-form": "7.43.2",
27
27
  "react-image-size": "2.0.0",
@@ -75,5 +75,5 @@
75
75
  "volta": {
76
76
  "node": "18.15.0"
77
77
  },
78
- "gitHead": "c36a9ce7ed37fa251d0f9237e6bb92220c1ca898"
78
+ "gitHead": "6c749a75fb12934f4e92e804a0bc7de0fbe32786"
79
79
  }
@@ -35,7 +35,7 @@ describe('UnsupportedNodeExtension', () => {
35
35
  const nodeSpec = extension.createNodeSpec(extra, override);
36
36
 
37
37
  expect(nodeSpec.selectable).toBe(true);
38
- expect(nodeSpec.draggable).toBe(true);
38
+ expect(nodeSpec.draggable).toBe(false);
39
39
  expect(nodeSpec.atom).toBe(true);
40
40
  expect(nodeSpec.inline).toBe(true);
41
41
  expect(nodeSpec.attrs).toEqual({ originalNode: {}, errorMessage: {} });
@@ -131,7 +131,7 @@ describe('UnsupportedNodeExtension', () => {
131
131
  });
132
132
 
133
133
  expect(getHtmlContent()).toBe(
134
- '<span class="unsupported-node-node-view-wrapper" originalnode="null" errormessage="null" data-unsupported-node="{&quot;originalNode&quot;:null,&quot;errorMessage&quot;:null}" draggable="true"><div class="collapse-box" contenteditable="false"><button class="collapse-box__header" type="button"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium collapse-box__icon--warning css-i4bv87-MuiSvgIcon-root" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="MotionPhotosOffOutlinedIcon"><path d="M2.81 2.81 1.39 4.22l2.27 2.27C2.61 8.07 2 9.96 2 12c0 5.52 4.48 10 10 10 2.04 0 3.93-.61 5.51-1.66l2.27 2.27 1.41-1.42L2.81 2.81zM12 20c-4.41 0-8-3.59-8-8 0-1.48.41-2.86 1.12-4.06l10.93 10.94C14.86 19.59 13.48 20 12 20zm0-16c4.41 0 8 3.59 8 8 0 1.48-.41 2.86-1.12 4.05l1.45 1.45C21.39 15.93 22 14.04 22 12c0-5.52-4.48-10-10-10-2.04 0-3.93.61-5.51 1.66l1.45 1.45C9.14 4.41 10.52 4 12 4z"></path></svg><div class="collapse-box__label">This section cannot be displayed here due to unsupported HTML elements. The front-end view of your page won’t be affected.</div><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-i4bv87-MuiSvgIcon-root" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="UnfoldLessOutlinedIcon"><path d="M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14l-4.59 4.59zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10l4.59-4.59z"></path></svg></button><div class="collapse-box__content" hidden="" data-testid="content"><br>null</div></div></span>',
134
+ '<span class="unsupported-node-node-view-wrapper" originalnode="null" errormessage="null" data-unsupported-node="{&quot;originalNode&quot;:null,&quot;errorMessage&quot;:null}"><div class="collapse-box" contenteditable="false"><button class="collapse-box__header" type="button"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium collapse-box__icon--warning css-i4bv87-MuiSvgIcon-root" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="MotionPhotosOffOutlinedIcon"><path d="M2.81 2.81 1.39 4.22l2.27 2.27C2.61 8.07 2 9.96 2 12c0 5.52 4.48 10 10 10 2.04 0 3.93-.61 5.51-1.66l2.27 2.27 1.41-1.42L2.81 2.81zM12 20c-4.41 0-8-3.59-8-8 0-1.48.41-2.86 1.12-4.06l10.93 10.94C14.86 19.59 13.48 20 12 20zm0-16c4.41 0 8 3.59 8 8 0 1.48-.41 2.86-1.12 4.05l1.45 1.45C21.39 15.93 22 14.04 22 12c0-5.52-4.48-10-10-10-2.04 0-3.93.61-5.51 1.66l1.45 1.45C9.14 4.41 10.52 4 12 4z"></path></svg><div class="collapse-box__label">This section cannot be displayed here due to unsupported HTML elements. The front-end view of your page won’t be affected.</div><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-i4bv87-MuiSvgIcon-root" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="UnfoldLessOutlinedIcon"><path d="M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14l-4.59 4.59zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10l4.59-4.59z"></path></svg></button><div class="collapse-box__content" hidden="" data-testid="content"><br>null</div></div></span>',
135
135
  );
136
136
  });
137
137
  });
@@ -30,7 +30,7 @@ export class UnsupportedNodeExtension extends NodeExtension {
30
30
  createNodeSpec(extra: ApplySchemaAttributes, override: NodeSpecOverride): NodeExtensionSpec {
31
31
  return {
32
32
  selectable: false,
33
- draggable: true,
33
+ draggable: false,
34
34
  atom: true,
35
35
  inline: true,
36
36
  ...override,
@@ -6,7 +6,7 @@
6
6
  }
7
7
 
8
8
  &__label {
9
- @apply ml-2 mr-auto;
9
+ @apply ml-2 mr-auto text-left;
10
10
  }
11
11
 
12
12
  &__icon {