phx-react 1.3.1793 → 1.3.1795
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/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/cjs/components/Breadcrumb/Breadcrumb.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/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/esm/components/Breadcrumb/Breadcrumb.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
|
@@ -23,7 +23,7 @@ function PHXBreadcrumb({ items, className, separator = react_1.default.createEle
|
|
|
23
23
|
content = react_1.default.createElement("span", { className: (0, types_1.classNames)(isCurrent ? 'text-gray-600' : 'text-gray-600') }, item.label);
|
|
24
24
|
}
|
|
25
25
|
return (react_1.default.createElement("li", { key: index, className: 'flex min-w-0 items-center' },
|
|
26
|
-
react_1.default.createElement("span", { className: 'truncate' }, content),
|
|
26
|
+
react_1.default.createElement("span", { className: 'max-w-48 truncate' }, content),
|
|
27
27
|
index < items.length - 1 && separator));
|
|
28
28
|
}))));
|
|
29
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.js","sourceRoot":"","sources":["../../../../src/components/Breadcrumb/Breadcrumb.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAA;;AAmBZ,sCA4CC;;AA7DD,0DAAyB;AACzB,gEAAkC;AAClC,oCAAqC;AAerC,SAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,SAAS,E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AG,IAAI,CAAC,KAAK,CAAQ,CAAA;YAC3G,CAAC;YAED,OAAO,CACL,sCAAI,GAAG,EAAE,KAAK,EAAE,SAAS,EAAC,2BAA2B;gBACnD,wCAAM,SAAS,EAAC,mBAAmB,IAAE,OAAO,CAAQ;gBACnD,KAAK,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,SAAS,CACnC,CACN,CAAA;QACH,CAAC,CAAC,CACC,CACD,CACP,CAAA;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const styleTag = "\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n.PlaygroundEditorTheme__ltr {\n text-align: left;\n}\n.PlaygroundEditorTheme__rtl {\n text-align: right;\n}\n\n.PlaygroundEditorTheme__quote {\n margin: 0;\n margin-left: 20px;\n font-size: 15px;\n color: rgb(101, 103, 107);\n border-left-color: rgb(206, 208, 212);\n border-left-width: 4px;\n border-left-style: solid;\n padding-left: 16px;\n}\n.PlaygroundEditorTheme__h1 {\n font-size: 34px;\n margin-bottom: 10px;\n}\n.PlaygroundEditorTheme__h2 {\n font-size: 29px;\n margin-bottom: 10px;\n}\n.PlaygroundEditorTheme__h3 {\n font-size: 24px;\n margin-bottom: 10px;\n}\n.PlaygroundEditorTheme__h4 {\n font-size: 21px;\n margin-bottom: 10px;\n}\n.PlaygroundEditorTheme__h5 {\n font-size: 18px;\n margin-bottom: 10px;\n}\n.PlaygroundEditorTheme__h6 {\n font-size: 16px;\n margin-bottom: 10px;\n}\n.PlaygroundEditorTheme__indent {\n --lexical-indent-base-value: 40px;\n}\n.PlaygroundEditorTheme__textBold {\n font-weight: bold;\n}\n.PlaygroundEditorTheme__textItalic {\n font-style: italic;\n}\n.PlaygroundEditorTheme__textUnderline {\n text-decoration: underline;\n}\n.PlaygroundEditorTheme__textStrikethrough {\n text-decoration: line-through;\n}\n.PlaygroundEditorTheme__textUnderlineStrikethrough {\n text-decoration: underline line-through;\n}\n.PlaygroundEditorTheme__textSubscript {\n font-size: 0.8em;\n vertical-align: sub !important;\n}\n.PlaygroundEditorTheme__textSuperscript {\n font-size: 0.8em;\n vertical-align: super;\n}\n.PlaygroundEditorTheme__textCode {\n background-color: rgb(240, 242, 245);\n padding: 1px 0.25rem;\n font-family: Menlo, Consolas, Monaco, monospace;\n font-size: 94%;\n}\n.PlaygroundEditorTheme__hashtag {\n background-color: rgba(88, 144, 255, 0.15);\n border-bottom: 1px solid rgba(88, 144, 255, 0.3);\n}\n.PlaygroundEditorTheme__link {\n color: rgb(33, 111, 219);\n text-decoration: none;\n}\n.PlaygroundEditorTheme__link:hover {\n text-decoration: underline;\n cursor: pointer;\n}\n.PlaygroundEditorTheme__code {\n background-color: rgb(240, 242, 245);\n font-family: Menlo, Consolas, Monaco, monospace;\n display: block;\n padding: 8px 8px 8px 52px;\n line-height: 1.53;\n font-size: 13px;\n margin: 0;\n margin-top: 8px;\n margin-bottom: 8px;\n overflow-x: auto;\n position: relative;\n tab-size: 2;\n}\n.PlaygroundEditorTheme__code:before {\n content: attr(data-gutter);\n position: absolute;\n background-color: #eee;\n left: 0;\n top: 0;\n border-right: 1px solid #ccc;\n padding: 8px;\n color: #777;\n white-space: pre-wrap;\n text-align: right;\n min-width: 25px;\n}\n.PlaygroundEditorTheme__table {\n border-collapse: collapse;\n border-spacing: 0;\n overflow-y: scroll;\n overflow-x: scroll;\n table-layout: fixed;\n width: max-content;\n margin: 30px 0;\n}\n.PlaygroundEditorTheme__tableSelection *::selection {\n background-color: transparent;\n}\n.PlaygroundEditorTheme__tableSelected {\n outline: 2px solid rgb(60, 132, 244);\n}\n.PlaygroundEditorTheme__tableCell {\n border: 1px solid #bbb;\n width: 75px;\n min-width: 75px;\n vertical-align: top;\n text-align: start;\n padding: 6px 8px;\n position: relative;\n outline: none;\n}\n.PlaygroundEditorTheme__tableCellSortedIndicator {\n display: block;\n opacity: 0.5;\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 4px;\n background-color: #999;\n}\n.PlaygroundEditorTheme__tableCellResizer {\n position: absolute;\n right: -4px;\n height: 100%;\n width: 8px;\n cursor: ew-resize;\n z-index: 10;\n top: 0;\n}\n.PlaygroundEditorTheme__tableCellHeader {\n background-color: #f2f3f5;\n text-align: start;\n}\n.PlaygroundEditorTheme__tableCellSelected {\n background-color: #c9dbf0;\n}\n.PlaygroundEditorTheme__tableCellPrimarySelected {\n border: 2px solid rgb(60, 132, 244);\n display: block;\n height: calc(100% - 2px);\n position: absolute;\n width: calc(100% - 2px);\n left: -1px;\n top: -1px;\n z-index: 2;\n}\n.PlaygroundEditorTheme__tableCellEditing {\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);\n border-radius: 3px;\n}\n.PlaygroundEditorTheme__tableAddColumns {\n position: absolute;\n top: 0;\n width: 20px;\n background-color: #eee;\n height: 100%;\n right: -25px;\n animation: table-controls 0.2s ease;\n border: 0;\n cursor: pointer;\n}\n.PlaygroundEditorTheme__tableAddColumns:after {\n background-image: url('/icons/plus.svg');\n background-size: contain;\n background-position: center;\n background-repeat: no-repeat;\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0.4;\n}\n.PlaygroundEditorTheme__tableAddColumns:hover {\n background-color: #c9dbf0;\n}\n.PlaygroundEditorTheme__tableAddRows {\n position: absolute;\n bottom: -25px;\n width: calc(100% - 25px);\n background-color: #eee;\n height: 20px;\n left: 0;\n animation: table-controls 0.2s ease;\n border: 0;\n cursor: pointer;\n}\n.PlaygroundEditorTheme__tableAddRows:after {\n background-image: url(/icons/plus.svg);\n background-size: contain;\n background-position: center;\n background-repeat: no-repeat;\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0.4;\n}\n.PlaygroundEditorTheme__tableAddRows:hover {\n background-color: #c9dbf0;\n}\n@keyframes table-controls {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n.PlaygroundEditorTheme__tableCellResizeRuler {\n display: block;\n position: absolute;\n width: 1px;\n background-color: rgb(60, 132, 244);\n height: 100%;\n top: 0;\n}\n.PlaygroundEditorTheme__tableCellActionButtonContainer {\n display: block;\n right: 5px;\n top: 6px;\n position: absolute;\n z-index: 4;\n width: 20px;\n height: 20px;\n}\n.PlaygroundEditorTheme__tableCellActionButton {\n background-color: #eee;\n display: block;\n border: 0;\n border-radius: 20px;\n width: 20px;\n height: 20px;\n color: #222;\n cursor: pointer;\n}\n.PlaygroundEditorTheme__tableCellActionButton:hover {\n background-color: #ddd;\n}\n.PlaygroundEditorTheme__characterLimit {\n display: inline;\n background-color: #ffbbbb !important;\n}\n.PlaygroundEditorTheme__ol1 {\n padding: 0;\n margin: 0;\n list-style-position: inside;\n list-style-type: decimal;\n margin-left: 20px;\n}\n.PlaygroundEditorTheme__ol2 {\n padding: 0;\n margin: 0;\n list-style-type: upper-alpha;\n list-style-position: inside;\n margin-left: 20px;\n}\n.PlaygroundEditorTheme__ol3 {\n padding: 0;\n margin: 0;\n list-style-type: lower-alpha;\n list-style-position: inside;\n margin-left: 20px;\n}\n.PlaygroundEditorTheme__ol4 {\n padding: 0;\n margin: 0;\n list-style-type: upper-roman;\n list-style-position: inside;\n margin-left: 20px;\n}\n.PlaygroundEditorTheme__ol5 {\n padding: 0;\n margin: 0;\n list-style-type: lower-roman;\n list-style-position: inside;\n margin-left: 20px;\n}\n.PlaygroundEditorTheme__ul {\n padding: 0;\n margin: 0;\n list-style: disc;\n margin-left: 20px;\n list-style-position: inside !important;;\n}\n\n.PlaygroundEditorTheme__listItem {\n font-family: var(--listitem-marker-font-family);\n font-size: var(--listitem-marker-font-size);\n background-color: var(--listitem-marker-background-color);\n}\n\n.PlaygroundEditorTheme__listItem::marker {\n color: var(--listitem-marker-color);\n background-color: var(--listitem-marker-background-color);\n font-family: var(--listitem-marker-font-family);\n font-size: var(--listitem-marker-font-size);\n font-style: var(--listitem-marker-font-style);\n font-weight: var(--listitem-marker-font-weight);\n}\n\n.PlaygroundEditorTheme__listItemChecked,\n.PlaygroundEditorTheme__listItemUnchecked {\n position: relative;\n margin-left: 8px;\n margin-right: 8px;\n padding-left: 24px;\n padding-right: 24px;\n list-style-type: none;\n outline: none;\n}\n.PlaygroundEditorTheme__listItemChecked {\n text-decoration: line-through;\n}\n.PlaygroundEditorTheme__listItemUnchecked:before,\n.PlaygroundEditorTheme__listItemChecked:before {\n content: '';\n width: 16px;\n height: 16px;\n top: 2px;\n left: 0;\n cursor: pointer;\n display: block;\n background-size: cover;\n position: absolute;\n}\n.PlaygroundEditorTheme__listItemUnchecked[dir='rtl']:before,\n.PlaygroundEditorTheme__listItemChecked[dir='rtl']:before {\n left: auto;\n right: 0;\n}\n.PlaygroundEditorTheme__listItemUnchecked:focus:before,\n.PlaygroundEditorTheme__listItemChecked:focus:before {\n box-shadow: 0 0 0 2px #a6cdfe;\n border-radius: 2px;\n}\n.PlaygroundEditorTheme__listItemUnchecked:before {\n border: 1px solid #999;\n border-radius: 2px;\n}\n.PlaygroundEditorTheme__listItemChecked:before {\n border: 1px solid rgb(61, 135, 245);\n border-radius: 2px;\n background-color: #3d87f5;\n background-repeat: no-repeat;\n}\n.PlaygroundEditorTheme__listItemChecked:after {\n content: '';\n cursor: pointer;\n border-color: #fff;\n border-style: solid;\n position: absolute;\n display: block;\n top: 6px;\n width: 3px;\n left: 7px;\n right: 7px;\n height: 6px;\n transform: rotate(45deg);\n border-width: 0 2px 2px 0;\n}\n.PlaygroundEditorTheme__nestedListItem {\n list-style-type: none;\n}\n.PlaygroundEditorTheme__nestedListItem:before,\n.PlaygroundEditorTheme__nestedListItem:after {\n display: none;\n}\n.PlaygroundEditorTheme__tokenComment {\n color: slategray;\n}\n.PlaygroundEditorTheme__tokenPunctuation {\n color: #999;\n}\n.PlaygroundEditorTheme__tokenProperty {\n color: #905;\n}\n.PlaygroundEditorTheme__tokenSelector {\n color: #690;\n}\n.PlaygroundEditorTheme__tokenOperator {\n color: #9a6e3a;\n}\n.PlaygroundEditorTheme__tokenAttr {\n color: #07a;\n}\n.PlaygroundEditorTheme__tokenVariable {\n color: #e90;\n}\n.PlaygroundEditorTheme__tokenFunction {\n color: #dd4a68;\n}\n.PlaygroundEditorTheme__mark {\n background: rgba(255, 212, 0, 0.14);\n border-bottom: 2px solid rgba(255, 212, 0, 0.3);\n padding-bottom: 2px;\n}\n.PlaygroundEditorTheme__markOverlap {\n background: rgba(255, 212, 0, 0.3);\n border-bottom: 2px solid rgba(255, 212, 0, 0.7);\n}\n.PlaygroundEditorTheme__mark.selected {\n background: rgba(255, 212, 0, 0.5);\n border-bottom: 2px solid rgba(255, 212, 0, 1);\n}\n.PlaygroundEditorTheme__markOverlap.selected {\n background: rgba(255, 212, 0, 0.7);\n border-bottom: 2px solid rgba(255, 212, 0, 0.7);\n}\n.PlaygroundEditorTheme__embedBlock {\n user-select: none;\n}\n.PlaygroundEditorTheme__embedBlockFocus {\n outline: 2px solid rgb(60, 132, 244);\n}\n.PlaygroundEditorTheme__layoutContaner {\n display: grid;\n gap: 10px;\n margin: 10px 0;\n}\n.PlaygroundEditorTheme__layoutItem {\n border: 1px dashed #ddd;\n padding: 8px 16px;\n}\n\n.editor-image img {\n margin-left: auto;\n margin-right: auto;\n max-width: 90% !important;\n border: 1px solid #e5e7eb;\n margin-bottom: 10px;\n}\n";
|
|
1
|
+
export declare const styleTag = "\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n.PlaygroundEditorTheme__ltr {\n text-align: left;\n}\n.PlaygroundEditorTheme__rtl {\n text-align: right;\n}\n\n[type='page-break'] {\n position: relative;\n display: block;\n width: calc(100% + var(--editor-input-padding, 28px) * 2);\n overflow: unset;\n margin-left: calc(var(--editor-input-padding, 28px) * -1);\n margin-top: var(--editor-input-padding, 28px);\n margin-bottom: var(--editor-input-padding, 28px);\n\n border: none;\n border-top: 1px dashed var(--editor-color-secondary, #eeeeee);\n border-bottom: 1px dashed var(--editor-color-secondary, #eeeeee);\n background-color: var(--editor-color-secondary, #eeeeee);\n}\n\n[type='page-break']::before {\n content: '';\n\n position: absolute;\n top: 50%;\n left: calc(var(--editor-input-padding, 28px) + 12px);\n transform: translateY(-50%);\n opacity: 0.5;\n\n background-size: cover;\n background-image: url(/icons/scissors.svg);\n width: 16px;\n height: 16px;\n}\n\n[type='page-break']::after {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n\n display: block;\n padding: 2px 6px;\n border: 1px solid #ccc;\n background-color: #fff;\n\n content: 'PAGE BREAK';\n font-size: 12px;\n color: #000;\n font-weight: 600;\n}\n\n.PlaygroundEditorTheme__quote {\n margin: 0;\n margin-left: 20px;\n font-size: 15px;\n color: rgb(101, 103, 107);\n border-left-color: rgb(206, 208, 212);\n border-left-width: 4px;\n border-left-style: solid;\n padding-left: 16px;\n}\n.PlaygroundEditorTheme__h1 {\n font-size: 34px;\n margin-bottom: 10px;\n}\n.PlaygroundEditorTheme__h2 {\n font-size: 29px;\n margin-bottom: 10px;\n}\n.PlaygroundEditorTheme__h3 {\n font-size: 24px;\n margin-bottom: 10px;\n}\n.PlaygroundEditorTheme__h4 {\n font-size: 21px;\n margin-bottom: 10px;\n}\n.PlaygroundEditorTheme__h5 {\n font-size: 18px;\n margin-bottom: 10px;\n}\n.PlaygroundEditorTheme__h6 {\n font-size: 16px;\n margin-bottom: 10px;\n}\n.PlaygroundEditorTheme__indent {\n --lexical-indent-base-value: 40px;\n}\n.PlaygroundEditorTheme__textBold {\n font-weight: bold;\n}\n.PlaygroundEditorTheme__textItalic {\n font-style: italic;\n}\n.PlaygroundEditorTheme__textUnderline {\n text-decoration: underline;\n}\n.PlaygroundEditorTheme__textStrikethrough {\n text-decoration: line-through;\n}\n.PlaygroundEditorTheme__textUnderlineStrikethrough {\n text-decoration: underline line-through;\n}\n.PlaygroundEditorTheme__textSubscript {\n font-size: 0.8em;\n vertical-align: sub !important;\n}\n.PlaygroundEditorTheme__textSuperscript {\n font-size: 0.8em;\n vertical-align: super;\n}\n.PlaygroundEditorTheme__textCode {\n background-color: rgb(240, 242, 245);\n padding: 1px 0.25rem;\n font-family: Menlo, Consolas, Monaco, monospace;\n font-size: 94%;\n}\n.PlaygroundEditorTheme__hashtag {\n background-color: rgba(88, 144, 255, 0.15);\n border-bottom: 1px solid rgba(88, 144, 255, 0.3);\n}\n.PlaygroundEditorTheme__link {\n color: rgb(33, 111, 219);\n text-decoration: none;\n}\n.PlaygroundEditorTheme__link:hover {\n text-decoration: underline;\n cursor: pointer;\n}\n.PlaygroundEditorTheme__code {\n background-color: rgb(240, 242, 245);\n font-family: Menlo, Consolas, Monaco, monospace;\n display: block;\n padding: 8px 8px 8px 52px;\n line-height: 1.53;\n font-size: 13px;\n margin: 0;\n margin-top: 8px;\n margin-bottom: 8px;\n overflow-x: auto;\n position: relative;\n tab-size: 2;\n}\n.PlaygroundEditorTheme__code:before {\n content: attr(data-gutter);\n position: absolute;\n background-color: #eee;\n left: 0;\n top: 0;\n border-right: 1px solid #ccc;\n padding: 8px;\n color: #777;\n white-space: pre-wrap;\n text-align: right;\n min-width: 25px;\n}\n.PlaygroundEditorTheme__table {\n border-collapse: collapse;\n border-spacing: 0;\n overflow-y: scroll;\n overflow-x: scroll;\n table-layout: fixed;\n width: max-content;\n margin: 30px 0;\n}\n.PlaygroundEditorTheme__tableSelection *::selection {\n background-color: transparent;\n}\n.PlaygroundEditorTheme__tableSelected {\n outline: 2px solid rgb(60, 132, 244);\n}\n.PlaygroundEditorTheme__tableCell {\n border: 1px solid #bbb;\n width: 75px;\n min-width: 75px;\n vertical-align: top;\n text-align: start;\n padding: 6px 8px;\n position: relative;\n outline: none;\n}\n.PlaygroundEditorTheme__tableCellSortedIndicator {\n display: block;\n opacity: 0.5;\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 4px;\n background-color: #999;\n}\n.PlaygroundEditorTheme__tableCellResizer {\n position: absolute;\n right: -4px;\n height: 100%;\n width: 8px;\n cursor: ew-resize;\n z-index: 10;\n top: 0;\n}\n.PlaygroundEditorTheme__tableCellHeader {\n background-color: #f2f3f5;\n text-align: start;\n}\n.PlaygroundEditorTheme__tableCellSelected {\n background-color: #c9dbf0;\n}\n.PlaygroundEditorTheme__tableCellPrimarySelected {\n border: 2px solid rgb(60, 132, 244);\n display: block;\n height: calc(100% - 2px);\n position: absolute;\n width: calc(100% - 2px);\n left: -1px;\n top: -1px;\n z-index: 2;\n}\n.PlaygroundEditorTheme__tableCellEditing {\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);\n border-radius: 3px;\n}\n.PlaygroundEditorTheme__tableAddColumns {\n position: absolute;\n top: 0;\n width: 20px;\n background-color: #eee;\n height: 100%;\n right: -25px;\n animation: table-controls 0.2s ease;\n border: 0;\n cursor: pointer;\n}\n.PlaygroundEditorTheme__tableAddColumns:after {\n background-image: url('/icons/plus.svg');\n background-size: contain;\n background-position: center;\n background-repeat: no-repeat;\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0.4;\n}\n.PlaygroundEditorTheme__tableAddColumns:hover {\n background-color: #c9dbf0;\n}\n.PlaygroundEditorTheme__tableAddRows {\n position: absolute;\n bottom: -25px;\n width: calc(100% - 25px);\n background-color: #eee;\n height: 20px;\n left: 0;\n animation: table-controls 0.2s ease;\n border: 0;\n cursor: pointer;\n}\n.PlaygroundEditorTheme__tableAddRows:after {\n background-image: url(/icons/plus.svg);\n background-size: contain;\n background-position: center;\n background-repeat: no-repeat;\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0.4;\n}\n.PlaygroundEditorTheme__tableAddRows:hover {\n background-color: #c9dbf0;\n}\n@keyframes table-controls {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n.PlaygroundEditorTheme__tableCellResizeRuler {\n display: block;\n position: absolute;\n width: 1px;\n background-color: rgb(60, 132, 244);\n height: 100%;\n top: 0;\n}\n.PlaygroundEditorTheme__tableCellActionButtonContainer {\n display: block;\n right: 5px;\n top: 6px;\n position: absolute;\n z-index: 4;\n width: 20px;\n height: 20px;\n}\n.PlaygroundEditorTheme__tableCellActionButton {\n background-color: #eee;\n display: block;\n border: 0;\n border-radius: 20px;\n width: 20px;\n height: 20px;\n color: #222;\n cursor: pointer;\n}\n.PlaygroundEditorTheme__tableCellActionButton:hover {\n background-color: #ddd;\n}\n.PlaygroundEditorTheme__characterLimit {\n display: inline;\n background-color: #ffbbbb !important;\n}\n.PlaygroundEditorTheme__ol1 {\n padding: 0;\n margin: 0;\n list-style-position: inside;\n list-style-type: decimal;\n margin-left: 20px;\n}\n.PlaygroundEditorTheme__ol2 {\n padding: 0;\n margin: 0;\n list-style-type: upper-alpha;\n list-style-position: inside;\n margin-left: 20px;\n}\n.PlaygroundEditorTheme__ol3 {\n padding: 0;\n margin: 0;\n list-style-type: lower-alpha;\n list-style-position: inside;\n margin-left: 20px;\n}\n.PlaygroundEditorTheme__ol4 {\n padding: 0;\n margin: 0;\n list-style-type: upper-roman;\n list-style-position: inside;\n margin-left: 20px;\n}\n.PlaygroundEditorTheme__ol5 {\n padding: 0;\n margin: 0;\n list-style-type: lower-roman;\n list-style-position: inside;\n margin-left: 20px;\n}\n.PlaygroundEditorTheme__ul {\n padding: 0;\n margin: 0;\n list-style: disc;\n margin-left: 20px;\n list-style-position: inside;\n}\n\n.PlaygroundEditorTheme__listItem {\n font-family: var(--listitem-marker-font-family);\n font-size: var(--listitem-marker-font-size);\n background-color: var(--listitem-marker-background-color);\n}\n\n.PlaygroundEditorTheme__listItem::marker {\n color: var(--listitem-marker-color);\n background-color: var(--listitem-marker-background-color);\n font-family: var(--listitem-marker-font-family);\n font-size: var(--listitem-marker-font-size);\n font-style: var(--listitem-marker-font-style);\n font-weight: var(--listitem-marker-font-weight);\n}\n\n.PlaygroundEditorTheme__listItemChecked,\n.PlaygroundEditorTheme__listItemUnchecked {\n position: relative;\n margin-left: 8px;\n margin-right: 8px;\n padding-left: 24px;\n padding-right: 24px;\n list-style-type: none;\n outline: none;\n}\n.PlaygroundEditorTheme__listItemChecked {\n text-decoration: line-through;\n}\n.PlaygroundEditorTheme__listItemUnchecked:before,\n.PlaygroundEditorTheme__listItemChecked:before {\n content: '';\n width: 16px;\n height: 16px;\n top: 2px;\n left: 0;\n cursor: pointer;\n display: block;\n background-size: cover;\n position: absolute;\n}\n.PlaygroundEditorTheme__listItemUnchecked[dir='rtl']:before,\n.PlaygroundEditorTheme__listItemChecked[dir='rtl']:before {\n left: auto;\n right: 0;\n}\n.PlaygroundEditorTheme__listItemUnchecked:focus:before,\n.PlaygroundEditorTheme__listItemChecked:focus:before {\n box-shadow: 0 0 0 2px #a6cdfe;\n border-radius: 2px;\n}\n.PlaygroundEditorTheme__listItemUnchecked:before {\n border: 1px solid #999;\n border-radius: 2px;\n}\n.PlaygroundEditorTheme__listItemChecked:before {\n border: 1px solid rgb(61, 135, 245);\n border-radius: 2px;\n background-color: #3d87f5;\n background-repeat: no-repeat;\n}\n.PlaygroundEditorTheme__listItemChecked:after {\n content: '';\n cursor: pointer;\n border-color: #fff;\n border-style: solid;\n position: absolute;\n display: block;\n top: 6px;\n width: 3px;\n left: 7px;\n right: 7px;\n height: 6px;\n transform: rotate(45deg);\n border-width: 0 2px 2px 0;\n}\n.PlaygroundEditorTheme__nestedListItem {\n list-style-type: none;\n}\n.PlaygroundEditorTheme__nestedListItem:before,\n.PlaygroundEditorTheme__nestedListItem:after {\n display: none;\n}\n.PlaygroundEditorTheme__tokenComment {\n color: slategray;\n}\n.PlaygroundEditorTheme__tokenPunctuation {\n color: #999;\n}\n.PlaygroundEditorTheme__tokenProperty {\n color: #905;\n}\n.PlaygroundEditorTheme__tokenSelector {\n color: #690;\n}\n.PlaygroundEditorTheme__tokenOperator {\n color: #9a6e3a;\n}\n.PlaygroundEditorTheme__tokenAttr {\n color: #07a;\n}\n.PlaygroundEditorTheme__tokenVariable {\n color: #e90;\n}\n.PlaygroundEditorTheme__tokenFunction {\n color: #dd4a68;\n}\n.PlaygroundEditorTheme__mark {\n background: rgba(255, 212, 0, 0.14);\n border-bottom: 2px solid rgba(255, 212, 0, 0.3);\n padding-bottom: 2px;\n}\n.PlaygroundEditorTheme__markOverlap {\n background: rgba(255, 212, 0, 0.3);\n border-bottom: 2px solid rgba(255, 212, 0, 0.7);\n}\n.PlaygroundEditorTheme__mark.selected {\n background: rgba(255, 212, 0, 0.5);\n border-bottom: 2px solid rgba(255, 212, 0, 1);\n}\n.PlaygroundEditorTheme__markOverlap.selected {\n background: rgba(255, 212, 0, 0.7);\n border-bottom: 2px solid rgba(255, 212, 0, 0.7);\n}\n.PlaygroundEditorTheme__embedBlock {\n user-select: none;\n}\n.PlaygroundEditorTheme__embedBlockFocus {\n outline: 2px solid rgb(60, 132, 244);\n}\n.PlaygroundEditorTheme__layoutContaner {\n display: grid;\n gap: 10px;\n margin: 10px 0;\n}\n.PlaygroundEditorTheme__layoutItem {\n border: 1px dashed #ddd;\n padding: 8px 16px;\n}\n\n.image-resizer-wrapper {\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 1;\n}\n\n.image-resizer {\n position: absolute;\n pointer-events: auto;\n background-color: #fff;\n border: 1px solid rgb(60, 132, 244);\n border-radius: 50%;\n box-sizing: border-box;\n width: 10px;\n height: 10px;\n}\n\n.image-resizer-n,\n.image-resizer-s {\n left: 50%;\n transform: translateX(-50%);\n cursor: ns-resize;\n}\n\n.image-resizer-e,\n.image-resizer-w {\n top: 50%;\n transform: translateY(-50%);\n cursor: ew-resize;\n}\n\n.image-resizer-n {\n top: -5px;\n}\n\n.image-resizer-ne {\n top: -5px;\n right: -5px;\n cursor: nesw-resize;\n}\n\n.image-resizer-e {\n right: -5px;\n}\n\n.image-resizer-se {\n right: -5px;\n bottom: -5px;\n cursor: nwse-resize;\n}\n\n.image-resizer-s {\n bottom: -5px;\n}\n\n.image-resizer-sw {\n bottom: -5px;\n left: -5px;\n cursor: nesw-resize;\n}\n\n.image-resizer-w {\n left: -5px;\n}\n\n.image-resizer-nw {\n top: -5px;\n left: -5px;\n cursor: nwse-resize;\n}\n\n.editor-image {\n display: block;\n position: relative;\n width: fit-content;\n max-width: 100%;\n margin-left: auto;\n margin-right: auto;\n}\n\n.editor-image.position-left,\n.inline-editor-image.position-left {\n display: block;\n position: relative;\n width: fit-content;\n max-width: 100%;\n margin-left: 0;\n margin-right: auto;\n}\n\n.editor-image.position-center,\n.inline-editor-image.position-center {\n display: block;\n position: relative;\n width: fit-content;\n max-width: 100%;\n margin-left: auto;\n margin-right: auto;\n}\n\n.editor-image.position-right,\n.inline-editor-image.position-right {\n display: block;\n position: relative;\n width: fit-content;\n max-width: 100%;\n margin-left: auto;\n margin-right: 0;\n}\n\n.editor-image > div,\n.inline-editor-image > div {\n position: relative;\n}\n\n.editor-image img {\n display: block;\n margin-left: auto;\n margin-right: auto;\n max-width: 90% !important;\n border: 1px solid #e5e7eb;\n margin-bottom: 10px;\n}\n\n.inline-editor-image.position-full {\n display: block;\n position: relative;\n width: 100%;\n max-width: 100%;\n}\n\n.inline-editor-image.position-full img {\n width: 100%;\n max-width: 100%;\n}\n\n.inline-editor-image.position-center img {\n max-width: 100%;\n}\n\n.editor-image img.focused,\n.inline-editor-image img.focused {\n outline: 2px solid rgb(60, 132, 244);\n outline-offset: 2px;\n}\n";
|
|
@@ -14,6 +14,53 @@ exports.styleTag = `
|
|
|
14
14
|
text-align: right;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
[type='page-break'] {
|
|
18
|
+
position: relative;
|
|
19
|
+
display: block;
|
|
20
|
+
width: calc(100% + var(--editor-input-padding, 28px) * 2);
|
|
21
|
+
overflow: unset;
|
|
22
|
+
margin-left: calc(var(--editor-input-padding, 28px) * -1);
|
|
23
|
+
margin-top: var(--editor-input-padding, 28px);
|
|
24
|
+
margin-bottom: var(--editor-input-padding, 28px);
|
|
25
|
+
|
|
26
|
+
border: none;
|
|
27
|
+
border-top: 1px dashed var(--editor-color-secondary, #eeeeee);
|
|
28
|
+
border-bottom: 1px dashed var(--editor-color-secondary, #eeeeee);
|
|
29
|
+
background-color: var(--editor-color-secondary, #eeeeee);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
[type='page-break']::before {
|
|
33
|
+
content: '';
|
|
34
|
+
|
|
35
|
+
position: absolute;
|
|
36
|
+
top: 50%;
|
|
37
|
+
left: calc(var(--editor-input-padding, 28px) + 12px);
|
|
38
|
+
transform: translateY(-50%);
|
|
39
|
+
opacity: 0.5;
|
|
40
|
+
|
|
41
|
+
background-size: cover;
|
|
42
|
+
background-image: url(/icons/scissors.svg);
|
|
43
|
+
width: 16px;
|
|
44
|
+
height: 16px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
[type='page-break']::after {
|
|
48
|
+
position: absolute;
|
|
49
|
+
top: 50%;
|
|
50
|
+
left: 50%;
|
|
51
|
+
transform: translate(-50%, -50%);
|
|
52
|
+
|
|
53
|
+
display: block;
|
|
54
|
+
padding: 2px 6px;
|
|
55
|
+
border: 1px solid #ccc;
|
|
56
|
+
background-color: #fff;
|
|
57
|
+
|
|
58
|
+
content: 'PAGE BREAK';
|
|
59
|
+
font-size: 12px;
|
|
60
|
+
color: #000;
|
|
61
|
+
font-weight: 600;
|
|
62
|
+
}
|
|
63
|
+
|
|
17
64
|
.PlaygroundEditorTheme__quote {
|
|
18
65
|
margin: 0;
|
|
19
66
|
margin-left: 20px;
|
|
@@ -322,7 +369,7 @@ exports.styleTag = `
|
|
|
322
369
|
margin: 0;
|
|
323
370
|
list-style: disc;
|
|
324
371
|
margin-left: 20px;
|
|
325
|
-
list-style-position: inside
|
|
372
|
+
list-style-position: inside;
|
|
326
373
|
}
|
|
327
374
|
|
|
328
375
|
.PlaygroundEditorTheme__listItem {
|
|
@@ -464,12 +511,151 @@ exports.styleTag = `
|
|
|
464
511
|
padding: 8px 16px;
|
|
465
512
|
}
|
|
466
513
|
|
|
514
|
+
.image-resizer-wrapper {
|
|
515
|
+
position: absolute;
|
|
516
|
+
inset: 0;
|
|
517
|
+
pointer-events: none;
|
|
518
|
+
z-index: 1;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
.image-resizer {
|
|
522
|
+
position: absolute;
|
|
523
|
+
pointer-events: auto;
|
|
524
|
+
background-color: #fff;
|
|
525
|
+
border: 1px solid rgb(60, 132, 244);
|
|
526
|
+
border-radius: 50%;
|
|
527
|
+
box-sizing: border-box;
|
|
528
|
+
width: 10px;
|
|
529
|
+
height: 10px;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.image-resizer-n,
|
|
533
|
+
.image-resizer-s {
|
|
534
|
+
left: 50%;
|
|
535
|
+
transform: translateX(-50%);
|
|
536
|
+
cursor: ns-resize;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.image-resizer-e,
|
|
540
|
+
.image-resizer-w {
|
|
541
|
+
top: 50%;
|
|
542
|
+
transform: translateY(-50%);
|
|
543
|
+
cursor: ew-resize;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
.image-resizer-n {
|
|
547
|
+
top: -5px;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
.image-resizer-ne {
|
|
551
|
+
top: -5px;
|
|
552
|
+
right: -5px;
|
|
553
|
+
cursor: nesw-resize;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
.image-resizer-e {
|
|
557
|
+
right: -5px;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
.image-resizer-se {
|
|
561
|
+
right: -5px;
|
|
562
|
+
bottom: -5px;
|
|
563
|
+
cursor: nwse-resize;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
.image-resizer-s {
|
|
567
|
+
bottom: -5px;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.image-resizer-sw {
|
|
571
|
+
bottom: -5px;
|
|
572
|
+
left: -5px;
|
|
573
|
+
cursor: nesw-resize;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
.image-resizer-w {
|
|
577
|
+
left: -5px;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
.image-resizer-nw {
|
|
581
|
+
top: -5px;
|
|
582
|
+
left: -5px;
|
|
583
|
+
cursor: nwse-resize;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
.editor-image {
|
|
587
|
+
display: block;
|
|
588
|
+
position: relative;
|
|
589
|
+
width: fit-content;
|
|
590
|
+
max-width: 100%;
|
|
591
|
+
margin-left: auto;
|
|
592
|
+
margin-right: auto;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
.editor-image.position-left,
|
|
596
|
+
.inline-editor-image.position-left {
|
|
597
|
+
display: block;
|
|
598
|
+
position: relative;
|
|
599
|
+
width: fit-content;
|
|
600
|
+
max-width: 100%;
|
|
601
|
+
margin-left: 0;
|
|
602
|
+
margin-right: auto;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
.editor-image.position-center,
|
|
606
|
+
.inline-editor-image.position-center {
|
|
607
|
+
display: block;
|
|
608
|
+
position: relative;
|
|
609
|
+
width: fit-content;
|
|
610
|
+
max-width: 100%;
|
|
611
|
+
margin-left: auto;
|
|
612
|
+
margin-right: auto;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
.editor-image.position-right,
|
|
616
|
+
.inline-editor-image.position-right {
|
|
617
|
+
display: block;
|
|
618
|
+
position: relative;
|
|
619
|
+
width: fit-content;
|
|
620
|
+
max-width: 100%;
|
|
621
|
+
margin-left: auto;
|
|
622
|
+
margin-right: 0;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
.editor-image > div,
|
|
626
|
+
.inline-editor-image > div {
|
|
627
|
+
position: relative;
|
|
628
|
+
}
|
|
629
|
+
|
|
467
630
|
.editor-image img {
|
|
631
|
+
display: block;
|
|
468
632
|
margin-left: auto;
|
|
469
633
|
margin-right: auto;
|
|
470
634
|
max-width: 90% !important;
|
|
471
635
|
border: 1px solid #e5e7eb;
|
|
472
636
|
margin-bottom: 10px;
|
|
473
637
|
}
|
|
638
|
+
|
|
639
|
+
.inline-editor-image.position-full {
|
|
640
|
+
display: block;
|
|
641
|
+
position: relative;
|
|
642
|
+
width: 100%;
|
|
643
|
+
max-width: 100%;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
.inline-editor-image.position-full img {
|
|
647
|
+
width: 100%;
|
|
648
|
+
max-width: 100%;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
.inline-editor-image.position-center img {
|
|
652
|
+
max-width: 100%;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
.editor-image img.focused,
|
|
656
|
+
.inline-editor-image img.focused {
|
|
657
|
+
outline: 2px solid rgb(60, 132, 244);
|
|
658
|
+
outline-offset: 2px;
|
|
659
|
+
}
|
|
474
660
|
`;
|
|
475
661
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/components/TextEditorV2/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,QAAQ,GAAG
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/components/TextEditorV2/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgpBvB,CAAA"}
|
|
@@ -77,7 +77,10 @@ function PHXTextEditorV2({ defaultValue, label, onChange, placeholder, apiCdnUpl
|
|
|
77
77
|
const parser = new DOMParser();
|
|
78
78
|
const doc = parser.parseFromString(html, 'text/html');
|
|
79
79
|
const hasStyle = doc.querySelector('style');
|
|
80
|
-
if (
|
|
80
|
+
if (hasStyle) {
|
|
81
|
+
hasStyle.innerHTML = css;
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
81
84
|
const styleTag = doc.createElement('style');
|
|
82
85
|
styleTag.innerHTML = css;
|
|
83
86
|
doc.head.appendChild(styleTag);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.js","sourceRoot":"","sources":["../../../../src/components/TextEditorV2/editor.tsx"],"names":[],"mappings":";;AA4CA,
|
|
1
|
+
{"version":3,"file":"editor.js","sourceRoot":"","sources":["../../../../src/components/TextEditorV2/editor.tsx"],"names":[],"mappings":";;AA4CA,kCA+IC;;AA3LD,wCAA6E;AAC7E,oEAAgE;AAChE,qCAAyE;AACzE,qDAA8B;AAC9B,iCAA2C;AAC3C,mFAA+E;AAC/E,yEAA8F;AAC9F,+DAA2D;AAC3D,sFAAqD;AACrD,uDAAoD;AACpD,kDAAgD;AAChD,mGAAkE;AAClE,kFAAuE;AACvE,sFAA2E;AAC3E,8EAAmE;AACnE,wEAA6D;AAC7D,gFAAqE;AACrE,gFAAqE;AACrE,4FAAiF;AACjF,kFAAiD;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oBAAC,oCAAa,IAAC,oBAAoB,EAAE,YAAY,GAAI;gCACrD,oBAAC,6BAAmB,OAAG;gCACvB,oBAAC,uCAA6B,OAAG;gCACjC,oBAAC,wCAA8B,OAAG;gCAClC,oBAAC,sCAAc,IACb,eAAe,EACb,oBAAC,yBAAe,IAAC,SAAS,EAAC,qFAAqF,GAAG,EAErH,aAAa,EAAE,2CAAoB,EACnC,WAAW,EACT,2BAAG,SAAS,EAAC,6HAA6H,IACvI,WAAW,CACV,GAEN;gCACF,oBAAC,8BAAU,OAAG;gCACd,oBAAC,wCAAe,OAAG;gCACnB,oBAAC,kCAAwB,IAAC,QAAQ,EAAE,CAAC,GAAI;gCACzC,oBAAC,sBAAY,OAAG;gCAChB,oBAAC,2BAAiB,OAAG;gCACrB,oBAAC,8BAAU,OAAG;gCACd,oBAAC,gDAAmB,IAAC,MAAM,SAAG;gCAC9B,oBAAC,kDAAoB,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;
|