phx-react 1.3.1793 → 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.
Files changed (81) hide show
  1. package/dist/cjs/components/TextEditorV2/constants.d.ts +1 -1
  2. package/dist/cjs/components/TextEditorV2/constants.js +187 -1
  3. package/dist/cjs/components/TextEditorV2/constants.js.map +1 -1
  4. package/dist/cjs/components/TextEditorV2/editor.js +4 -1
  5. package/dist/cjs/components/TextEditorV2/editor.js.map +1 -1
  6. package/dist/cjs/components/TextEditorV2/nodes/ImageNode.d.ts +99 -3
  7. package/dist/cjs/components/TextEditorV2/nodes/ImageNode.js +143 -9
  8. package/dist/cjs/components/TextEditorV2/nodes/ImageNode.js.map +1 -1
  9. package/dist/cjs/components/TextEditorV2/nodes/InlineImageComponent.d.ts +5 -5
  10. package/dist/cjs/components/TextEditorV2/nodes/InlineImageComponent.js +66 -66
  11. package/dist/cjs/components/TextEditorV2/nodes/InlineImageComponent.js.map +1 -1
  12. package/dist/cjs/components/TextEditorV2/nodes/InlineImageNode.d.ts +90 -1
  13. package/dist/cjs/components/TextEditorV2/nodes/InlineImageNode.js +128 -5
  14. package/dist/cjs/components/TextEditorV2/nodes/InlineImageNode.js.map +1 -1
  15. package/dist/cjs/components/TextEditorV2/nodes/MentionNode.js +2 -0
  16. package/dist/cjs/components/TextEditorV2/nodes/MentionNode.js.map +1 -1
  17. package/dist/cjs/components/TextEditorV2/plugins/ImagesPlugin/index.js +1 -0
  18. package/dist/cjs/components/TextEditorV2/plugins/ImagesPlugin/index.js.map +1 -1
  19. package/dist/cjs/components/TextEditorV2/plugins/InlineImagePlugin/index.d.ts +9 -0
  20. package/dist/cjs/components/TextEditorV2/plugins/InlineImagePlugin/index.js +71 -1
  21. package/dist/cjs/components/TextEditorV2/plugins/InlineImagePlugin/index.js.map +1 -1
  22. package/dist/cjs/components/TextEditorV2/plugins/PreserveFontSizeOnEnterPlugin/index.d.ts +4 -0
  23. package/dist/cjs/components/TextEditorV2/plugins/PreserveFontSizeOnEnterPlugin/index.js +37 -0
  24. package/dist/cjs/components/TextEditorV2/plugins/PreserveFontSizeOnEnterPlugin/index.js.map +1 -1
  25. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.js +8 -0
  26. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.js.map +1 -1
  27. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.d.ts +11 -0
  28. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js +41 -0
  29. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js.map +1 -1
  30. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.js +8 -0
  31. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.js.map +1 -1
  32. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.d.ts +7 -1
  33. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.js +47 -3
  34. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.js.map +1 -1
  35. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/index.js +42 -12
  36. package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/index.js.map +1 -1
  37. package/dist/cjs/components/TextEditorV2/style.js +139 -0
  38. package/dist/cjs/components/TextEditorV2/style.js.map +1 -1
  39. package/dist/cjs/components/TextEditorV2/ui/ImageResizer.js +1 -1
  40. package/dist/cjs/components/TextEditorV2/ui/ImageResizer.js.map +1 -1
  41. package/dist/esm/components/TextEditorV2/constants.d.ts +1 -1
  42. package/dist/esm/components/TextEditorV2/constants.js +187 -1
  43. package/dist/esm/components/TextEditorV2/constants.js.map +1 -1
  44. package/dist/esm/components/TextEditorV2/editor.js +4 -1
  45. package/dist/esm/components/TextEditorV2/editor.js.map +1 -1
  46. package/dist/esm/components/TextEditorV2/nodes/ImageNode.d.ts +99 -3
  47. package/dist/esm/components/TextEditorV2/nodes/ImageNode.js +143 -9
  48. package/dist/esm/components/TextEditorV2/nodes/ImageNode.js.map +1 -1
  49. package/dist/esm/components/TextEditorV2/nodes/InlineImageComponent.d.ts +5 -5
  50. package/dist/esm/components/TextEditorV2/nodes/InlineImageComponent.js +66 -65
  51. package/dist/esm/components/TextEditorV2/nodes/InlineImageComponent.js.map +1 -1
  52. package/dist/esm/components/TextEditorV2/nodes/InlineImageNode.d.ts +90 -1
  53. package/dist/esm/components/TextEditorV2/nodes/InlineImageNode.js +128 -5
  54. package/dist/esm/components/TextEditorV2/nodes/InlineImageNode.js.map +1 -1
  55. package/dist/esm/components/TextEditorV2/nodes/MentionNode.js +2 -0
  56. package/dist/esm/components/TextEditorV2/nodes/MentionNode.js.map +1 -1
  57. package/dist/esm/components/TextEditorV2/plugins/ImagesPlugin/index.js +1 -0
  58. package/dist/esm/components/TextEditorV2/plugins/ImagesPlugin/index.js.map +1 -1
  59. package/dist/esm/components/TextEditorV2/plugins/InlineImagePlugin/index.d.ts +9 -0
  60. package/dist/esm/components/TextEditorV2/plugins/InlineImagePlugin/index.js +71 -1
  61. package/dist/esm/components/TextEditorV2/plugins/InlineImagePlugin/index.js.map +1 -1
  62. package/dist/esm/components/TextEditorV2/plugins/PreserveFontSizeOnEnterPlugin/index.d.ts +4 -0
  63. package/dist/esm/components/TextEditorV2/plugins/PreserveFontSizeOnEnterPlugin/index.js +37 -0
  64. package/dist/esm/components/TextEditorV2/plugins/PreserveFontSizeOnEnterPlugin/index.js.map +1 -1
  65. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.js +9 -1
  66. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.js.map +1 -1
  67. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.d.ts +11 -0
  68. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js +39 -0
  69. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js.map +1 -1
  70. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.js +9 -1
  71. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.js.map +1 -1
  72. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.d.ts +7 -1
  73. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.js +48 -4
  74. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.js.map +1 -1
  75. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/index.js +43 -13
  76. package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/index.js.map +1 -1
  77. package/dist/esm/components/TextEditorV2/style.js +139 -0
  78. package/dist/esm/components/TextEditorV2/style.js.map +1 -1
  79. package/dist/esm/components/TextEditorV2/ui/ImageResizer.js +1 -1
  80. package/dist/esm/components/TextEditorV2/ui/ImageResizer.js.map +1 -1
  81. package/package.json +1 -1
@@ -153,6 +153,78 @@ function EditorStyle() {
153
153
  touch-action: none;
154
154
  }
155
155
 
156
+ .image-resizer-wrapper {
157
+ position: absolute;
158
+ inset: 0;
159
+ pointer-events: none;
160
+ z-index: 1;
161
+ }
162
+
163
+ .image-resizer {
164
+ position: absolute;
165
+ pointer-events: auto;
166
+ background-color: #fff;
167
+ border: 1px solid rgb(60, 132, 244);
168
+ border-radius: 50%;
169
+ box-sizing: border-box;
170
+ width: 10px;
171
+ height: 10px;
172
+ }
173
+
174
+ .image-resizer-n,
175
+ .image-resizer-s {
176
+ left: 50%;
177
+ transform: translateX(-50%);
178
+ cursor: ns-resize;
179
+ }
180
+
181
+ .image-resizer-e,
182
+ .image-resizer-w {
183
+ top: 50%;
184
+ transform: translateY(-50%);
185
+ cursor: ew-resize;
186
+ }
187
+
188
+ .image-resizer-n {
189
+ top: -5px;
190
+ }
191
+
192
+ .image-resizer-ne {
193
+ top: -5px;
194
+ right: -5px;
195
+ cursor: nesw-resize;
196
+ }
197
+
198
+ .image-resizer-e {
199
+ right: -5px;
200
+ }
201
+
202
+ .image-resizer-se {
203
+ right: -5px;
204
+ bottom: -5px;
205
+ cursor: nwse-resize;
206
+ }
207
+
208
+ .image-resizer-s {
209
+ bottom: -5px;
210
+ }
211
+
212
+ .image-resizer-sw {
213
+ bottom: -5px;
214
+ left: -5px;
215
+ cursor: nesw-resize;
216
+ }
217
+
218
+ .image-resizer-w {
219
+ left: -5px;
220
+ }
221
+
222
+ .image-resizer-nw {
223
+ top: -5px;
224
+ left: -5px;
225
+ cursor: nwse-resize;
226
+ }
227
+
156
228
 
157
229
  .InlineImageNode__contentEditable {
158
230
  min-height: 20px;
@@ -1252,7 +1324,52 @@ function EditorStyle() {
1252
1324
  padding: 8px 16px;
1253
1325
  }
1254
1326
 
1327
+ .editor-image {
1328
+ display: block;
1329
+ position: relative;
1330
+ width: fit-content;
1331
+ max-width: 100%;
1332
+ margin-left: auto;
1333
+ margin-right: auto;
1334
+ }
1335
+
1336
+ .editor-image.position-left,
1337
+ .inline-editor-image.position-left {
1338
+ display: block;
1339
+ position: relative;
1340
+ width: fit-content;
1341
+ max-width: 100%;
1342
+ margin-left: 0;
1343
+ margin-right: auto;
1344
+ }
1345
+
1346
+ .editor-image.position-center,
1347
+ .inline-editor-image.position-center {
1348
+ display: block;
1349
+ position: relative;
1350
+ width: fit-content;
1351
+ max-width: 100%;
1352
+ margin-left: auto;
1353
+ margin-right: auto;
1354
+ }
1355
+
1356
+ .editor-image.position-right,
1357
+ .inline-editor-image.position-right {
1358
+ display: block;
1359
+ position: relative;
1360
+ width: fit-content;
1361
+ max-width: 100%;
1362
+ margin-left: auto;
1363
+ margin-right: 0;
1364
+ }
1365
+
1366
+ .editor-image > div,
1367
+ .inline-editor-image > div {
1368
+ position: relative;
1369
+ }
1370
+
1255
1371
  .editor-image img {
1372
+ display: block;
1256
1373
  margin-left: auto;
1257
1374
  margin-right: auto;
1258
1375
  max-width: 90% !important;
@@ -1260,6 +1377,28 @@ function EditorStyle() {
1260
1377
  margin-bottom: 10px;
1261
1378
  }
1262
1379
 
1380
+ .inline-editor-image.position-full {
1381
+ display: block;
1382
+ position: relative;
1383
+ width: 100%;
1384
+ max-width: 100%;
1385
+ }
1386
+
1387
+ .inline-editor-image.position-full img {
1388
+ width: 100%;
1389
+ max-width: 100%;
1390
+ }
1391
+
1392
+ .inline-editor-image.position-center img {
1393
+ max-width: 100%;
1394
+ }
1395
+
1396
+ .editor-image img.focused,
1397
+ .inline-editor-image img.focused {
1398
+ outline: 2px solid rgb(60, 132, 244);
1399
+ outline-offset: 2px;
1400
+ }
1401
+
1263
1402
  .StickyEditorTheme__paragraph {
1264
1403
  margin: 0;
1265
1404
  position: relative;
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","sourceRoot":"","sources":["../../../../src/components/TextEditorV2/style.tsx"],"names":[],"mappings":";;AAEA,8BAkjDC;;AApjDD,0DAAyB;AAEzB,SAAwB,WAAW;IACjC,OAAO,CACL,6CACG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ePointerUp);
149
149
  }
150
150
  };
151
- return (React.createElement("div", { ref: controlWrapperRef },
151
+ return (React.createElement("div", { className: 'image-resizer-wrapper', ref: controlWrapperRef },
152
152
  React.createElement("div", { className: 'image-resizer image-resizer-n', onPointerDown: (event) => {
153
153
  handlePointerDown(event, Direction.north);
154
154
  } }),
@@ -1 +1 @@
1
- {"version":3,"file":"ImageResizer.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/ui/ImageResizer.tsx"],"names":[],"mappings":";;AAeA,+BAoPC;;AAlQD,qDAA8B;AAC9B,iCAA8B;AAE9B,SAAS,KAAK,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW;IACpD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,CAAA;AAC5C,CAAC;AAED,MAAM,SAAS,GAAG;IAChB,IAAI,EAAE,CAAC,IAAI,CAAC;IACZ,KAAK,EAAE,CAAC,IAAI,CAAC;IACb,KAAK,EAAE,CAAC,IAAI,CAAC;IACb,IAAI,EAAE,CAAC,IAAI,CAAC;CACb,CAAA;AAED,SAAwB,YAAY,CAAC,EACnC,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,aAAa,GAOd;IACC,MAAM,iBAAiB,GAAG,IAAA,cAAM,EAAiB,IAAI,CAAC,CAAA;IACtD,MAAM,UAAU,GAAG,IAAA,cAAM,EAAC;QACxB,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,SAAS;KACjB,CAAC,CAAA;IACF,MAAM,cAAc,GAAG,IAAA,cAAM,EAU1B;QACD,aAAa,EAAE,CAAC;QAChB,YAAY,EAAE,CAAC;QACf,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,KAAK;QACjB,KAAK,EAAE,CAAC;QACR,WAAW,EAAE,CAAC;QACd,UAAU,EAAE,CAAC;QACb,MAAM,EAAE,CAAC;QACT,MAAM,EAAE,CAAC;KACV,CAAC,C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,CAAC,IAAI,CAAC,CAAA;YAC5D,CAAC,GACD;QACF,6BACE,SAAS,EAAC,+BAA+B,EACzC,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE;gBACvB,iBAAiB,CAAC,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,CAAA;YAC3C,CAAC,GACD;QACF,6BACE,SAAS,EAAC,gCAAgC,EAC1C,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE;gBACvB,iBAAiB,CAAC,KAAK,EAAE,SAAS,CAAC,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,CAAA;YAC5D,CAAC,GACD;QACF,6BACE,SAAS,EAAC,+BAA+B,EACzC,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE;gBACvB,iBAAiB,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;YAC1C,CAAC,GACD;QACF,6BACE,SAAS,EAAC,gCAAgC,EAC1C,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE;gBACvB,iBAAiB,CAAC,KAAK,EAAE,SAAS,CAAC,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,CAAA;YAC5D,CAAC,GACD,CACE,CACP,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"ImageResizer.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/ui/ImageResizer.tsx"],"names":[],"mappings":";;AAeA,+BAoPC;;AAlQD,qDAA8B;AAC9B,iCAA8B;AAE9B,SAAS,KAAK,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW;IACpD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,CAAA;AAC5C,CAAC;AAED,MAAM,SAAS,GAAG;IAChB,IAAI,EAAE,CAAC,IAAI,CAAC;IACZ,KAAK,EAAE,CAAC,IAAI,CAAC;IACb,KAAK,EAAE,CAAC,IAAI,CAAC;IACb,IAAI,EAAE,CAAC,IAAI,CAAC;CACb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AAC,IAAI,CAAC,CAAA;YAC5D,CAAC,GACD,CACE,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";
@@ -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 !important;;
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsdvB,CAAA"}
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 (!hasStyle) {
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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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
- constructor(src: string, altText: string, maxWidth: number, width?: 'inherit' | number, height?: 'inherit' | number, showCaption?: boolean, caption?: LexicalEditor, captionsEnabled?: boolean, key?: NodeKey);
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
- updateDOM(): false;
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
- export declare function $createImageNode({ altText, caption, captionsEnabled, height, key, maxWidth, showCaption, src, width, }: ImagePayload): ImageNode;
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;