phx-react 1.3.1792 → 1.3.1794
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/dist/cjs/components/TableV6/TableV6.d.ts +2 -1
- package/dist/cjs/components/TableV6/TableV6.js +13 -5
- package/dist/cjs/components/TableV6/TableV6.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/constants.d.ts +1 -1
- package/dist/cjs/components/TextEditorV2/constants.js +187 -1
- package/dist/cjs/components/TextEditorV2/constants.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/editor.js +4 -1
- package/dist/cjs/components/TextEditorV2/editor.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/nodes/ImageNode.d.ts +99 -3
- package/dist/cjs/components/TextEditorV2/nodes/ImageNode.js +143 -9
- package/dist/cjs/components/TextEditorV2/nodes/ImageNode.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/nodes/InlineImageComponent.d.ts +5 -5
- package/dist/cjs/components/TextEditorV2/nodes/InlineImageComponent.js +66 -66
- package/dist/cjs/components/TextEditorV2/nodes/InlineImageComponent.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/nodes/InlineImageNode.d.ts +90 -1
- package/dist/cjs/components/TextEditorV2/nodes/InlineImageNode.js +128 -5
- package/dist/cjs/components/TextEditorV2/nodes/InlineImageNode.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/nodes/MentionNode.js +2 -0
- package/dist/cjs/components/TextEditorV2/nodes/MentionNode.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/plugins/ImagesPlugin/index.js +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/ImagesPlugin/index.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/plugins/InlineImagePlugin/index.d.ts +9 -0
- package/dist/cjs/components/TextEditorV2/plugins/InlineImagePlugin/index.js +71 -1
- package/dist/cjs/components/TextEditorV2/plugins/InlineImagePlugin/index.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/plugins/PreserveFontSizeOnEnterPlugin/index.d.ts +4 -0
- package/dist/cjs/components/TextEditorV2/plugins/PreserveFontSizeOnEnterPlugin/index.js +37 -0
- package/dist/cjs/components/TextEditorV2/plugins/PreserveFontSizeOnEnterPlugin/index.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.js +8 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.d.ts +11 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js +41 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.js +8 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.d.ts +7 -1
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.js +47 -3
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/index.js +42 -12
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/index.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/style.js +139 -0
- package/dist/cjs/components/TextEditorV2/style.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/ui/ImageResizer.js +1 -1
- package/dist/cjs/components/TextEditorV2/ui/ImageResizer.js.map +1 -1
- package/dist/esm/components/TableV6/TableV6.d.ts +2 -1
- package/dist/esm/components/TableV6/TableV6.js +13 -5
- package/dist/esm/components/TableV6/TableV6.js.map +1 -1
- package/dist/esm/components/TextEditorV2/constants.d.ts +1 -1
- package/dist/esm/components/TextEditorV2/constants.js +187 -1
- package/dist/esm/components/TextEditorV2/constants.js.map +1 -1
- package/dist/esm/components/TextEditorV2/editor.js +4 -1
- package/dist/esm/components/TextEditorV2/editor.js.map +1 -1
- package/dist/esm/components/TextEditorV2/nodes/ImageNode.d.ts +99 -3
- package/dist/esm/components/TextEditorV2/nodes/ImageNode.js +143 -9
- package/dist/esm/components/TextEditorV2/nodes/ImageNode.js.map +1 -1
- package/dist/esm/components/TextEditorV2/nodes/InlineImageComponent.d.ts +5 -5
- package/dist/esm/components/TextEditorV2/nodes/InlineImageComponent.js +66 -65
- package/dist/esm/components/TextEditorV2/nodes/InlineImageComponent.js.map +1 -1
- package/dist/esm/components/TextEditorV2/nodes/InlineImageNode.d.ts +90 -1
- package/dist/esm/components/TextEditorV2/nodes/InlineImageNode.js +128 -5
- package/dist/esm/components/TextEditorV2/nodes/InlineImageNode.js.map +1 -1
- package/dist/esm/components/TextEditorV2/nodes/MentionNode.js +2 -0
- package/dist/esm/components/TextEditorV2/nodes/MentionNode.js.map +1 -1
- package/dist/esm/components/TextEditorV2/plugins/ImagesPlugin/index.js +1 -0
- package/dist/esm/components/TextEditorV2/plugins/ImagesPlugin/index.js.map +1 -1
- package/dist/esm/components/TextEditorV2/plugins/InlineImagePlugin/index.d.ts +9 -0
- package/dist/esm/components/TextEditorV2/plugins/InlineImagePlugin/index.js +71 -1
- package/dist/esm/components/TextEditorV2/plugins/InlineImagePlugin/index.js.map +1 -1
- package/dist/esm/components/TextEditorV2/plugins/PreserveFontSizeOnEnterPlugin/index.d.ts +4 -0
- package/dist/esm/components/TextEditorV2/plugins/PreserveFontSizeOnEnterPlugin/index.js +37 -0
- package/dist/esm/components/TextEditorV2/plugins/PreserveFontSizeOnEnterPlugin/index.js.map +1 -1
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.js +9 -1
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.js.map +1 -1
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.d.ts +11 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js +39 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js.map +1 -1
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.js +9 -1
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.js.map +1 -1
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.d.ts +7 -1
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.js +48 -4
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.js.map +1 -1
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/index.js +43 -13
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/index.js.map +1 -1
- package/dist/esm/components/TextEditorV2/style.js +139 -0
- package/dist/esm/components/TextEditorV2/style.js.map +1 -1
- package/dist/esm/components/TextEditorV2/ui/ImageResizer.js +1 -1
- package/dist/esm/components/TextEditorV2/ui/ImageResizer.js.map +1 -1
- package/package.json +1 -1
|
@@ -11,6 +11,53 @@ export const styleTag = `
|
|
|
11
11
|
text-align: right;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
[type='page-break'] {
|
|
15
|
+
position: relative;
|
|
16
|
+
display: block;
|
|
17
|
+
width: calc(100% + var(--editor-input-padding, 28px) * 2);
|
|
18
|
+
overflow: unset;
|
|
19
|
+
margin-left: calc(var(--editor-input-padding, 28px) * -1);
|
|
20
|
+
margin-top: var(--editor-input-padding, 28px);
|
|
21
|
+
margin-bottom: var(--editor-input-padding, 28px);
|
|
22
|
+
|
|
23
|
+
border: none;
|
|
24
|
+
border-top: 1px dashed var(--editor-color-secondary, #eeeeee);
|
|
25
|
+
border-bottom: 1px dashed var(--editor-color-secondary, #eeeeee);
|
|
26
|
+
background-color: var(--editor-color-secondary, #eeeeee);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
[type='page-break']::before {
|
|
30
|
+
content: '';
|
|
31
|
+
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: 50%;
|
|
34
|
+
left: calc(var(--editor-input-padding, 28px) + 12px);
|
|
35
|
+
transform: translateY(-50%);
|
|
36
|
+
opacity: 0.5;
|
|
37
|
+
|
|
38
|
+
background-size: cover;
|
|
39
|
+
background-image: url(/icons/scissors.svg);
|
|
40
|
+
width: 16px;
|
|
41
|
+
height: 16px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
[type='page-break']::after {
|
|
45
|
+
position: absolute;
|
|
46
|
+
top: 50%;
|
|
47
|
+
left: 50%;
|
|
48
|
+
transform: translate(-50%, -50%);
|
|
49
|
+
|
|
50
|
+
display: block;
|
|
51
|
+
padding: 2px 6px;
|
|
52
|
+
border: 1px solid #ccc;
|
|
53
|
+
background-color: #fff;
|
|
54
|
+
|
|
55
|
+
content: 'PAGE BREAK';
|
|
56
|
+
font-size: 12px;
|
|
57
|
+
color: #000;
|
|
58
|
+
font-weight: 600;
|
|
59
|
+
}
|
|
60
|
+
|
|
14
61
|
.PlaygroundEditorTheme__quote {
|
|
15
62
|
margin: 0;
|
|
16
63
|
margin-left: 20px;
|
|
@@ -319,7 +366,7 @@ export const styleTag = `
|
|
|
319
366
|
margin: 0;
|
|
320
367
|
list-style: disc;
|
|
321
368
|
margin-left: 20px;
|
|
322
|
-
list-style-position: inside
|
|
369
|
+
list-style-position: inside;
|
|
323
370
|
}
|
|
324
371
|
|
|
325
372
|
.PlaygroundEditorTheme__listItem {
|
|
@@ -461,12 +508,151 @@ export const styleTag = `
|
|
|
461
508
|
padding: 8px 16px;
|
|
462
509
|
}
|
|
463
510
|
|
|
511
|
+
.image-resizer-wrapper {
|
|
512
|
+
position: absolute;
|
|
513
|
+
inset: 0;
|
|
514
|
+
pointer-events: none;
|
|
515
|
+
z-index: 1;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
.image-resizer {
|
|
519
|
+
position: absolute;
|
|
520
|
+
pointer-events: auto;
|
|
521
|
+
background-color: #fff;
|
|
522
|
+
border: 1px solid rgb(60, 132, 244);
|
|
523
|
+
border-radius: 50%;
|
|
524
|
+
box-sizing: border-box;
|
|
525
|
+
width: 10px;
|
|
526
|
+
height: 10px;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
.image-resizer-n,
|
|
530
|
+
.image-resizer-s {
|
|
531
|
+
left: 50%;
|
|
532
|
+
transform: translateX(-50%);
|
|
533
|
+
cursor: ns-resize;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
.image-resizer-e,
|
|
537
|
+
.image-resizer-w {
|
|
538
|
+
top: 50%;
|
|
539
|
+
transform: translateY(-50%);
|
|
540
|
+
cursor: ew-resize;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.image-resizer-n {
|
|
544
|
+
top: -5px;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
.image-resizer-ne {
|
|
548
|
+
top: -5px;
|
|
549
|
+
right: -5px;
|
|
550
|
+
cursor: nesw-resize;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
.image-resizer-e {
|
|
554
|
+
right: -5px;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
.image-resizer-se {
|
|
558
|
+
right: -5px;
|
|
559
|
+
bottom: -5px;
|
|
560
|
+
cursor: nwse-resize;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.image-resizer-s {
|
|
564
|
+
bottom: -5px;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
.image-resizer-sw {
|
|
568
|
+
bottom: -5px;
|
|
569
|
+
left: -5px;
|
|
570
|
+
cursor: nesw-resize;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
.image-resizer-w {
|
|
574
|
+
left: -5px;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
.image-resizer-nw {
|
|
578
|
+
top: -5px;
|
|
579
|
+
left: -5px;
|
|
580
|
+
cursor: nwse-resize;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
.editor-image {
|
|
584
|
+
display: block;
|
|
585
|
+
position: relative;
|
|
586
|
+
width: fit-content;
|
|
587
|
+
max-width: 100%;
|
|
588
|
+
margin-left: auto;
|
|
589
|
+
margin-right: auto;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
.editor-image.position-left,
|
|
593
|
+
.inline-editor-image.position-left {
|
|
594
|
+
display: block;
|
|
595
|
+
position: relative;
|
|
596
|
+
width: fit-content;
|
|
597
|
+
max-width: 100%;
|
|
598
|
+
margin-left: 0;
|
|
599
|
+
margin-right: auto;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
.editor-image.position-center,
|
|
603
|
+
.inline-editor-image.position-center {
|
|
604
|
+
display: block;
|
|
605
|
+
position: relative;
|
|
606
|
+
width: fit-content;
|
|
607
|
+
max-width: 100%;
|
|
608
|
+
margin-left: auto;
|
|
609
|
+
margin-right: auto;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
.editor-image.position-right,
|
|
613
|
+
.inline-editor-image.position-right {
|
|
614
|
+
display: block;
|
|
615
|
+
position: relative;
|
|
616
|
+
width: fit-content;
|
|
617
|
+
max-width: 100%;
|
|
618
|
+
margin-left: auto;
|
|
619
|
+
margin-right: 0;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
.editor-image > div,
|
|
623
|
+
.inline-editor-image > div {
|
|
624
|
+
position: relative;
|
|
625
|
+
}
|
|
626
|
+
|
|
464
627
|
.editor-image img {
|
|
628
|
+
display: block;
|
|
465
629
|
margin-left: auto;
|
|
466
630
|
margin-right: auto;
|
|
467
631
|
max-width: 90% !important;
|
|
468
632
|
border: 1px solid #e5e7eb;
|
|
469
633
|
margin-bottom: 10px;
|
|
470
634
|
}
|
|
635
|
+
|
|
636
|
+
.inline-editor-image.position-full {
|
|
637
|
+
display: block;
|
|
638
|
+
position: relative;
|
|
639
|
+
width: 100%;
|
|
640
|
+
max-width: 100%;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
.inline-editor-image.position-full img {
|
|
644
|
+
width: 100%;
|
|
645
|
+
max-width: 100%;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
.inline-editor-image.position-center img {
|
|
649
|
+
max-width: 100%;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
.editor-image img.focused,
|
|
653
|
+
.inline-editor-image img.focused {
|
|
654
|
+
outline: 2px solid rgb(60, 132, 244);
|
|
655
|
+
outline-offset: 2px;
|
|
656
|
+
}
|
|
471
657
|
`;
|
|
472
658
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/components/TextEditorV2/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/components/TextEditorV2/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgpBvB,CAAA"}
|
|
@@ -73,7 +73,10 @@ export default function PHXTextEditorV2({ defaultValue, label, onChange, placeho
|
|
|
73
73
|
const parser = new DOMParser();
|
|
74
74
|
const doc = parser.parseFromString(html, 'text/html');
|
|
75
75
|
const hasStyle = doc.querySelector('style');
|
|
76
|
-
if (
|
|
76
|
+
if (hasStyle) {
|
|
77
|
+
hasStyle.innerHTML = css;
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
77
80
|
const styleTag = doc.createElement('style');
|
|
78
81
|
styleTag.innerHTML = css;
|
|
79
82
|
doc.head.appendChild(styleTag);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.js","sourceRoot":"","sources":["../../../../src/components/TextEditorV2/editor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,EAAE,QAAQ,EAAiB,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACzE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAA;AAC/E,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAA;AAC9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,eAAe,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,WAA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,CACL;QACE,oBAAC,WAAW,OAAG;QACd,KAAK,IAAI,+BAAO,SAAS,EAAC,8CAA8C,IAAE,KAAK,CAAS;QACzF,oBAAC,eAAe,IAAC,aAAa,EAAE,YAAY;YAC1C,oBAAC,oBAAoB;gBACnB,oBAAC,YAAY;oBACX,oBAAC,yBAAyB;wBACxB,6BAAK,SAAS,EAAC,6DAA6D;4BAC1E,oBAAC,aAAa,IAAC,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,GAAI;4BACjE,6BAAK,SAAS,EAAC,UAAU;gCACtB,WAAW,IAAI,oBAAC,eAAe,IAAC,SAAS,EAAE,EAAE,GAAI;gCAClD,oBAAC,iBAAiB,OAAG;gCACrB,oBAAC,cAAc,IAAC,QAAQ,EAAE,YAAY,GAAI;gCAC1C,oBAAC,aAAa,IAAC,oBAAoB,EAAE,YAAY,GAAI;gCACrD,oBAAC,mBAAmB,OAAG;gCACvB,oBAAC,6BAA6B,OAAG;gCACjC,oBAAC,8BAA8B,OAAG;gCAClC,oBAAC,cAAc,IACb,eAAe,EACb,oBAAC,eAAe,IAAC,SAAS,EAAC,qFAAqF,GAAG,EAErH,aAAa,EAAE,oBAAoB,EACnC,WAAW,EACT,2BAAG,SAAS,EAAC,6HAA6H,IACvI,WAAW,CACV,GAEN;gCACF,oBAAC,UAAU,OAAG;gCACd,oBAAC,eAAe,OAAG;gCACnB,oBAAC,wBAAwB,IAAC,QAAQ,EAAE,CAAC,GAAI;gCACzC,oBAAC,YAAY,OAAG;gCAChB,oBAAC,iBAAiB,OAAG;gCACrB,oBAAC,UAAU,OAAG;gCACd,oBAAC,mBAAmB,IAAC,MAAM,SAAG;gCAC9B,oBAAC,oBAAoB,OAAG,CACpB,CACF,CACoB,CACf,CACM,CACP,CACd,CACP,CAAA;AACH,CAAC"}
|
|
@@ -11,6 +11,7 @@ import * as React from 'react';
|
|
|
11
11
|
export interface ImagePayload {
|
|
12
12
|
altText: string;
|
|
13
13
|
caption?: LexicalEditor;
|
|
14
|
+
position?: ImagePosition;
|
|
14
15
|
height?: number;
|
|
15
16
|
key?: NodeKey;
|
|
16
17
|
maxWidth?: number;
|
|
@@ -19,11 +20,13 @@ export interface ImagePayload {
|
|
|
19
20
|
width?: number;
|
|
20
21
|
captionsEnabled?: boolean;
|
|
21
22
|
}
|
|
23
|
+
export type ImagePosition = 'left' | 'right' | 'center' | undefined;
|
|
22
24
|
export type SerializedImageNode = Spread<{
|
|
23
25
|
altText: string;
|
|
24
26
|
caption: SerializedEditor;
|
|
25
27
|
height?: number;
|
|
26
28
|
maxWidth: number;
|
|
29
|
+
position?: ImagePosition;
|
|
27
30
|
showCaption: boolean;
|
|
28
31
|
src: string;
|
|
29
32
|
width?: number;
|
|
@@ -36,21 +39,114 @@ export declare class ImageNode extends DecoratorNode<React.JSX.Element> {
|
|
|
36
39
|
__maxWidth: number;
|
|
37
40
|
__showCaption: boolean;
|
|
38
41
|
__caption: LexicalEditor;
|
|
42
|
+
__position: ImagePosition;
|
|
39
43
|
__captionsEnabled: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Gets the Lexical node type for image nodes.
|
|
46
|
+
* @returns Image node type.
|
|
47
|
+
*/
|
|
40
48
|
static getType(): string;
|
|
49
|
+
/**
|
|
50
|
+
* Clones an existing image node.
|
|
51
|
+
* @param node Image node to clone.
|
|
52
|
+
* @returns Cloned image node.
|
|
53
|
+
*/
|
|
41
54
|
static clone(node: ImageNode): ImageNode;
|
|
55
|
+
/**
|
|
56
|
+
* Imports a serialized image node into the editor state.
|
|
57
|
+
* @param serializedNode Serialized image node payload.
|
|
58
|
+
* @returns Hydrated image node.
|
|
59
|
+
*/
|
|
42
60
|
static importJSON(serializedNode: SerializedImageNode): ImageNode;
|
|
61
|
+
/**
|
|
62
|
+
* Exports this image node to DOM.
|
|
63
|
+
* @returns DOM export output containing the image wrapper.
|
|
64
|
+
*/
|
|
43
65
|
exportDOM(): DOMExportOutput;
|
|
66
|
+
/**
|
|
67
|
+
* Defines DOM import conversions for image elements.
|
|
68
|
+
* @returns DOM conversion map for image imports.
|
|
69
|
+
*/
|
|
44
70
|
static importDOM(): DOMConversionMap | null;
|
|
45
|
-
|
|
71
|
+
/**
|
|
72
|
+
* Creates an image node instance.
|
|
73
|
+
* @param src Image source URL.
|
|
74
|
+
* @param altText Accessible alt text.
|
|
75
|
+
* @param maxWidth Maximum rendered image width.
|
|
76
|
+
* @param width Initial image width.
|
|
77
|
+
* @param height Initial image height.
|
|
78
|
+
* @param showCaption Whether the caption editor is visible.
|
|
79
|
+
* @param caption Nested caption editor.
|
|
80
|
+
* @param position Image alignment position.
|
|
81
|
+
* @param captionsEnabled Whether captions are enabled.
|
|
82
|
+
* @param key Optional Lexical node key.
|
|
83
|
+
*/
|
|
84
|
+
constructor(src: string, altText: string, maxWidth: number, width?: 'inherit' | number, height?: 'inherit' | number, showCaption?: boolean, caption?: LexicalEditor, position?: ImagePosition, captionsEnabled?: boolean, key?: NodeKey);
|
|
85
|
+
/**
|
|
86
|
+
* Serializes this image node.
|
|
87
|
+
* @returns Serialized image node payload.
|
|
88
|
+
*/
|
|
46
89
|
exportJSON(): SerializedImageNode;
|
|
90
|
+
/**
|
|
91
|
+
* Updates the stored image dimensions.
|
|
92
|
+
* @param width Next image width.
|
|
93
|
+
* @param height Next image height.
|
|
94
|
+
*/
|
|
47
95
|
setWidthAndHeight(width: 'inherit' | number, height: 'inherit' | number): void;
|
|
96
|
+
/**
|
|
97
|
+
* Updates caption visibility for this image.
|
|
98
|
+
* @param showCaption Whether the caption should be shown.
|
|
99
|
+
*/
|
|
48
100
|
setShowCaption(showCaption: boolean): void;
|
|
101
|
+
/**
|
|
102
|
+
* Gets the current image alignment position.
|
|
103
|
+
* @returns Current image position.
|
|
104
|
+
*/
|
|
105
|
+
getPosition(): ImagePosition;
|
|
106
|
+
/**
|
|
107
|
+
* Updates the image alignment position.
|
|
108
|
+
* @param position Next image position.
|
|
109
|
+
*/
|
|
110
|
+
setPosition(position: ImagePosition): void;
|
|
111
|
+
/**
|
|
112
|
+
* Creates the DOM wrapper for this image node.
|
|
113
|
+
* @param config Lexical editor config.
|
|
114
|
+
* @returns Image wrapper element.
|
|
115
|
+
*/
|
|
49
116
|
createDOM(config: EditorConfig): HTMLElement;
|
|
50
|
-
|
|
117
|
+
/**
|
|
118
|
+
* Updates the DOM wrapper when node state changes.
|
|
119
|
+
* @param prevNode Previous image node state.
|
|
120
|
+
* @param dom Existing image wrapper element.
|
|
121
|
+
* @param config Lexical editor config.
|
|
122
|
+
* @returns False because the existing DOM element is reused.
|
|
123
|
+
*/
|
|
124
|
+
updateDOM(prevNode: ImageNode, dom: HTMLElement, config: EditorConfig): false;
|
|
125
|
+
/**
|
|
126
|
+
* Gets the image source URL.
|
|
127
|
+
* @returns Image source URL.
|
|
128
|
+
*/
|
|
51
129
|
getSrc(): string;
|
|
130
|
+
/**
|
|
131
|
+
* Gets the image alt text.
|
|
132
|
+
* @returns Image alt text.
|
|
133
|
+
*/
|
|
52
134
|
getAltText(): string;
|
|
135
|
+
/**
|
|
136
|
+
* Renders the React decorator for this image node.
|
|
137
|
+
* @returns Image decorator element.
|
|
138
|
+
*/
|
|
53
139
|
decorate(): React.JSX.Element;
|
|
54
140
|
}
|
|
55
|
-
|
|
141
|
+
/**
|
|
142
|
+
* Creates and inserts a replacement image node.
|
|
143
|
+
* @param payload Image node creation payload.
|
|
144
|
+
* @returns Created image node.
|
|
145
|
+
*/
|
|
146
|
+
export declare function $createImageNode({ altText, caption, captionsEnabled, height, key, maxWidth, position, showCaption, src, width, }: ImagePayload): ImageNode;
|
|
147
|
+
/**
|
|
148
|
+
* Checks whether a Lexical node is an ImageNode.
|
|
149
|
+
* @param node Node to test.
|
|
150
|
+
* @returns True when the node is an ImageNode.
|
|
151
|
+
*/
|
|
56
152
|
export declare function $isImageNode(node: LexicalNode | null | undefined): node is ImageNode;
|
|
@@ -11,27 +11,66 @@ import { Suspense } from 'react';
|
|
|
11
11
|
const ImageComponent = React.lazy(
|
|
12
12
|
// @ts-ignore
|
|
13
13
|
() => import('./ImageComponent'));
|
|
14
|
+
/**
|
|
15
|
+
* Gets the image alignment position encoded in a wrapper class name.
|
|
16
|
+
* @param className Wrapper class name to inspect.
|
|
17
|
+
* @returns Matching image position, or undefined when no position class exists.
|
|
18
|
+
*/
|
|
19
|
+
function getPositionFromClassName(className) {
|
|
20
|
+
if (className.includes('position-left')) {
|
|
21
|
+
return 'left';
|
|
22
|
+
}
|
|
23
|
+
if (className.includes('position-right')) {
|
|
24
|
+
return 'right';
|
|
25
|
+
}
|
|
26
|
+
if (className.includes('position-center')) {
|
|
27
|
+
return 'center';
|
|
28
|
+
}
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Converts an imported DOM image element into an ImageNode.
|
|
33
|
+
* @param domNode DOM node provided by Lexical import.
|
|
34
|
+
* @returns DOM conversion output for image nodes, or null for unsupported nodes.
|
|
35
|
+
*/
|
|
14
36
|
function convertImageElement(domNode) {
|
|
37
|
+
var _a;
|
|
15
38
|
if (domNode instanceof HTMLImageElement) {
|
|
16
39
|
const { alt: altText, height, src, width } = domNode;
|
|
17
|
-
const
|
|
40
|
+
const position = getPositionFromClassName(((_a = domNode.parentElement) === null || _a === void 0 ? void 0 : _a.className) || '');
|
|
41
|
+
const node = $createImageNode({ altText, height, position, src, width });
|
|
18
42
|
return { node };
|
|
19
43
|
}
|
|
20
44
|
return null;
|
|
21
45
|
}
|
|
22
46
|
export class ImageNode extends DecoratorNode {
|
|
47
|
+
/**
|
|
48
|
+
* Gets the Lexical node type for image nodes.
|
|
49
|
+
* @returns Image node type.
|
|
50
|
+
*/
|
|
23
51
|
static getType() {
|
|
24
52
|
return 'image';
|
|
25
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Clones an existing image node.
|
|
56
|
+
* @param node Image node to clone.
|
|
57
|
+
* @returns Cloned image node.
|
|
58
|
+
*/
|
|
26
59
|
static clone(node) {
|
|
27
|
-
return new ImageNode(node.__src, node.__altText, node.__maxWidth, node.__width, node.__height, node.__showCaption, node.__caption, node.__captionsEnabled, node.__key);
|
|
60
|
+
return new ImageNode(node.__src, node.__altText, node.__maxWidth, node.__width, node.__height, node.__showCaption, node.__caption, node.__position, node.__captionsEnabled, node.__key);
|
|
28
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Imports a serialized image node into the editor state.
|
|
64
|
+
* @param serializedNode Serialized image node payload.
|
|
65
|
+
* @returns Hydrated image node.
|
|
66
|
+
*/
|
|
29
67
|
static importJSON(serializedNode) {
|
|
30
|
-
const { altText, caption, height, maxWidth, showCaption, src, width } = serializedNode;
|
|
68
|
+
const { altText, caption, height, maxWidth, position, showCaption, src, width } = serializedNode;
|
|
31
69
|
const node = $createImageNode({
|
|
32
70
|
altText,
|
|
33
71
|
height,
|
|
34
72
|
maxWidth,
|
|
73
|
+
position,
|
|
35
74
|
showCaption,
|
|
36
75
|
src,
|
|
37
76
|
width,
|
|
@@ -43,14 +82,25 @@ export class ImageNode extends DecoratorNode {
|
|
|
43
82
|
}
|
|
44
83
|
return node;
|
|
45
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Exports this image node to DOM.
|
|
87
|
+
* @returns DOM export output containing the image wrapper.
|
|
88
|
+
*/
|
|
46
89
|
exportDOM() {
|
|
90
|
+
const wrapper = document.createElement('span');
|
|
91
|
+
wrapper.className = `editor-image position-${this.__position || 'center'}`;
|
|
47
92
|
const element = document.createElement('img');
|
|
48
93
|
element.setAttribute('src', this.__src);
|
|
49
94
|
element.setAttribute('alt', this.__altText);
|
|
50
95
|
element.setAttribute('width', this.__width.toString());
|
|
51
96
|
element.setAttribute('height', this.__height.toString());
|
|
52
|
-
|
|
97
|
+
wrapper.appendChild(element);
|
|
98
|
+
return { element: wrapper };
|
|
53
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Defines DOM import conversions for image elements.
|
|
102
|
+
* @returns DOM conversion map for image imports.
|
|
103
|
+
*/
|
|
54
104
|
static importDOM() {
|
|
55
105
|
return {
|
|
56
106
|
img: () => ({
|
|
@@ -59,7 +109,20 @@ export class ImageNode extends DecoratorNode {
|
|
|
59
109
|
}),
|
|
60
110
|
};
|
|
61
111
|
}
|
|
62
|
-
|
|
112
|
+
/**
|
|
113
|
+
* Creates an image node instance.
|
|
114
|
+
* @param src Image source URL.
|
|
115
|
+
* @param altText Accessible alt text.
|
|
116
|
+
* @param maxWidth Maximum rendered image width.
|
|
117
|
+
* @param width Initial image width.
|
|
118
|
+
* @param height Initial image height.
|
|
119
|
+
* @param showCaption Whether the caption editor is visible.
|
|
120
|
+
* @param caption Nested caption editor.
|
|
121
|
+
* @param position Image alignment position.
|
|
122
|
+
* @param captionsEnabled Whether captions are enabled.
|
|
123
|
+
* @param key Optional Lexical node key.
|
|
124
|
+
*/
|
|
125
|
+
constructor(src, altText, maxWidth, width, height, showCaption, caption, position, captionsEnabled, key) {
|
|
63
126
|
super(key);
|
|
64
127
|
this.__src = src;
|
|
65
128
|
this.__altText = altText;
|
|
@@ -68,14 +131,20 @@ export class ImageNode extends DecoratorNode {
|
|
|
68
131
|
this.__height = height || 'inherit';
|
|
69
132
|
this.__showCaption = showCaption || false;
|
|
70
133
|
this.__caption = caption || createEditor();
|
|
134
|
+
this.__position = position || 'center';
|
|
71
135
|
this.__captionsEnabled = captionsEnabled || captionsEnabled === undefined;
|
|
72
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* Serializes this image node.
|
|
139
|
+
* @returns Serialized image node payload.
|
|
140
|
+
*/
|
|
73
141
|
exportJSON() {
|
|
74
142
|
return {
|
|
75
143
|
altText: this.getAltText(),
|
|
76
144
|
caption: this.__caption.toJSON(),
|
|
77
145
|
height: this.__height === 'inherit' ? 0 : this.__height,
|
|
78
146
|
maxWidth: this.__maxWidth,
|
|
147
|
+
position: this.__position,
|
|
79
148
|
showCaption: this.__showCaption,
|
|
80
149
|
src: this.getSrc(),
|
|
81
150
|
type: 'image',
|
|
@@ -83,42 +152,107 @@ export class ImageNode extends DecoratorNode {
|
|
|
83
152
|
width: this.__width === 'inherit' ? 0 : this.__width,
|
|
84
153
|
};
|
|
85
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* Updates the stored image dimensions.
|
|
157
|
+
* @param width Next image width.
|
|
158
|
+
* @param height Next image height.
|
|
159
|
+
*/
|
|
86
160
|
setWidthAndHeight(width, height) {
|
|
87
161
|
const writable = this.getWritable();
|
|
88
162
|
writable.__width = width;
|
|
89
163
|
writable.__height = height;
|
|
90
164
|
}
|
|
165
|
+
/**
|
|
166
|
+
* Updates caption visibility for this image.
|
|
167
|
+
* @param showCaption Whether the caption should be shown.
|
|
168
|
+
*/
|
|
91
169
|
setShowCaption(showCaption) {
|
|
92
170
|
const writable = this.getWritable();
|
|
93
171
|
writable.__showCaption = showCaption;
|
|
94
172
|
}
|
|
173
|
+
/**
|
|
174
|
+
* Gets the current image alignment position.
|
|
175
|
+
* @returns Current image position.
|
|
176
|
+
*/
|
|
177
|
+
getPosition() {
|
|
178
|
+
return this.__position;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Updates the image alignment position.
|
|
182
|
+
* @param position Next image position.
|
|
183
|
+
*/
|
|
184
|
+
setPosition(position) {
|
|
185
|
+
const writable = this.getWritable();
|
|
186
|
+
writable.__position = position || 'center';
|
|
187
|
+
}
|
|
95
188
|
// View
|
|
189
|
+
/**
|
|
190
|
+
* Creates the DOM wrapper for this image node.
|
|
191
|
+
* @param config Lexical editor config.
|
|
192
|
+
* @returns Image wrapper element.
|
|
193
|
+
*/
|
|
96
194
|
createDOM(config) {
|
|
97
195
|
const span = document.createElement('span');
|
|
98
196
|
const theme = config.theme;
|
|
99
|
-
const className = theme.image
|
|
197
|
+
const className = `${theme.image} position-${this.__position || 'center'}`;
|
|
100
198
|
if (className !== undefined) {
|
|
101
199
|
span.className = className;
|
|
102
200
|
}
|
|
103
201
|
return span;
|
|
104
202
|
}
|
|
105
|
-
|
|
203
|
+
/**
|
|
204
|
+
* Updates the DOM wrapper when node state changes.
|
|
205
|
+
* @param prevNode Previous image node state.
|
|
206
|
+
* @param dom Existing image wrapper element.
|
|
207
|
+
* @param config Lexical editor config.
|
|
208
|
+
* @returns False because the existing DOM element is reused.
|
|
209
|
+
*/
|
|
210
|
+
updateDOM(prevNode, dom, config) {
|
|
211
|
+
const position = this.__position;
|
|
212
|
+
if (position !== prevNode.__position) {
|
|
213
|
+
const className = `${config.theme.image} position-${position || 'center'}`;
|
|
214
|
+
if (className !== undefined) {
|
|
215
|
+
dom.className = className;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
106
218
|
return false;
|
|
107
219
|
}
|
|
220
|
+
/**
|
|
221
|
+
* Gets the image source URL.
|
|
222
|
+
* @returns Image source URL.
|
|
223
|
+
*/
|
|
108
224
|
getSrc() {
|
|
109
225
|
return this.__src;
|
|
110
226
|
}
|
|
227
|
+
/**
|
|
228
|
+
* Gets the image alt text.
|
|
229
|
+
* @returns Image alt text.
|
|
230
|
+
*/
|
|
111
231
|
getAltText() {
|
|
112
232
|
return this.__altText;
|
|
113
233
|
}
|
|
234
|
+
/**
|
|
235
|
+
* Renders the React decorator for this image node.
|
|
236
|
+
* @returns Image decorator element.
|
|
237
|
+
*/
|
|
114
238
|
decorate() {
|
|
115
239
|
return (React.createElement(Suspense, { fallback: null },
|
|
116
240
|
React.createElement(ImageComponent, { altText: this.__altText, caption: this.__caption, height: this.__height, maxWidth: this.__maxWidth, nodeKey: this.getKey(), resizable: true, showCaption: this.__showCaption, src: this.__src, width: this.__width })));
|
|
117
241
|
}
|
|
118
242
|
}
|
|
119
|
-
|
|
120
|
-
|
|
243
|
+
/**
|
|
244
|
+
* Creates and inserts a replacement image node.
|
|
245
|
+
* @param payload Image node creation payload.
|
|
246
|
+
* @returns Created image node.
|
|
247
|
+
*/
|
|
248
|
+
export function $createImageNode({ altText, caption, captionsEnabled, height, key, maxWidth = 500, position, showCaption, src, width, }) {
|
|
249
|
+
return $applyNodeReplacement(new ImageNode(src, altText, maxWidth, width, height, showCaption, caption, position || 'center', captionsEnabled, key));
|
|
121
250
|
}
|
|
251
|
+
/**
|
|
252
|
+
* Checks whether a Lexical node is an ImageNode.
|
|
253
|
+
* @param node Node to test.
|
|
254
|
+
* @returns True when the node is an ImageNode.
|
|
255
|
+
*/
|
|
122
256
|
export function $isImageNode(node) {
|
|
123
257
|
return node instanceof ImageNode;
|
|
124
258
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageNode.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/nodes/ImageNode.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAcH,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC5E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI;AAC/B,aAAa;AACb,GAAG,EAAE,CAAC,MAAM,CAAC,kBAAkB,CAAC,CACjC,CAAA;
|
|
1
|
+
{"version":3,"file":"ImageNode.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/nodes/ImageNode.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAcH,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC5E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI;AAC/B,aAAa;AACb,GAAG,EAAE,CAAC,MAAM,CAAC,kBAAkB,CAAC,CACjC,CAAA;AAiBD;;;;GAIG;AACH,SAAS,wBAAwB,CAAC,SAAiB;IACjD,IAAI,SAAS,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;QACxC,OAAO,MAAM,CAAA;IACf,CAAC;IACD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