rme 0.0.4 → 0.0.6
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/index.cjs.js +160 -106
- package/dist/index.cjs.js.map +2 -2
- package/dist/index.cjs.min.js +37 -37
- package/dist/index.cjs.min.js.map +2 -2
- package/dist/index.esm.js +160 -106
- package/dist/index.esm.js.map +2 -2
- package/dist/index.esm.min.js +39 -39
- package/dist/index.esm.min.js.map +2 -2
- package/dist/index.iife.js +160 -106
- package/dist/index.iife.js.map +2 -2
- package/dist/index.iife.min.js +39 -39
- package/dist/index.iife.min.js.map +2 -2
- package/dist/index.min.js +39 -39
- package/dist/index.min.js.map +2 -2
- package/package.json +2 -2
- package/tsconfig.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -29,6 +29,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
mod
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
33
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
34
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
35
|
+
if (decorator = decorators[i])
|
|
36
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
37
|
+
if (kind && result)
|
|
38
|
+
__defProp(target, key, result);
|
|
39
|
+
return result;
|
|
40
|
+
};
|
|
32
41
|
|
|
33
42
|
// node_modules/escape-string-regexp/index.js
|
|
34
43
|
var require_escape_string_regexp = __commonJS({
|
|
@@ -4740,7 +4749,7 @@ var import_extension_positioner = require("@remirror/extension-positioner");
|
|
|
4740
4749
|
var import_tables2 = require("@remirror/pm/tables");
|
|
4741
4750
|
var __defProp2 = Object.defineProperty;
|
|
4742
4751
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
4743
|
-
var
|
|
4752
|
+
var __decorateClass2 = (decorators, target, key, kind) => {
|
|
4744
4753
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc2(target, key) : target;
|
|
4745
4754
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
4746
4755
|
if (decorator = decorators[i])
|
|
@@ -5128,85 +5137,85 @@ var TableExtension = class extends import_core.NodeExtension {
|
|
|
5128
5137
|
}
|
|
5129
5138
|
}
|
|
5130
5139
|
};
|
|
5131
|
-
|
|
5140
|
+
__decorateClass2([
|
|
5132
5141
|
(0, import_core.command)(createTableOptions)
|
|
5133
5142
|
], TableExtension.prototype, "createTable", 1);
|
|
5134
|
-
|
|
5143
|
+
__decorateClass2([
|
|
5135
5144
|
(0, import_core.command)()
|
|
5136
5145
|
], TableExtension.prototype, "deleteTable", 1);
|
|
5137
|
-
|
|
5146
|
+
__decorateClass2([
|
|
5138
5147
|
(0, import_core.command)()
|
|
5139
5148
|
], TableExtension.prototype, "addTableColumnBefore", 1);
|
|
5140
|
-
|
|
5149
|
+
__decorateClass2([
|
|
5141
5150
|
(0, import_core.command)()
|
|
5142
5151
|
], TableExtension.prototype, "addTableColumnAfter", 1);
|
|
5143
|
-
|
|
5152
|
+
__decorateClass2([
|
|
5144
5153
|
(0, import_core.command)()
|
|
5145
5154
|
], TableExtension.prototype, "deleteTableColumn", 1);
|
|
5146
|
-
|
|
5155
|
+
__decorateClass2([
|
|
5147
5156
|
(0, import_core.command)()
|
|
5148
5157
|
], TableExtension.prototype, "addTableRowBefore", 1);
|
|
5149
|
-
|
|
5158
|
+
__decorateClass2([
|
|
5150
5159
|
(0, import_core.command)()
|
|
5151
5160
|
], TableExtension.prototype, "addTableRowAfter", 1);
|
|
5152
|
-
|
|
5161
|
+
__decorateClass2([
|
|
5153
5162
|
(0, import_core.command)()
|
|
5154
5163
|
], TableExtension.prototype, "deleteTableRow", 1);
|
|
5155
|
-
|
|
5164
|
+
__decorateClass2([
|
|
5156
5165
|
(0, import_core.command)()
|
|
5157
5166
|
], TableExtension.prototype, "toggleTableCellMerge", 1);
|
|
5158
|
-
|
|
5167
|
+
__decorateClass2([
|
|
5159
5168
|
(0, import_core.command)()
|
|
5160
5169
|
], TableExtension.prototype, "mergeTableCells", 1);
|
|
5161
|
-
|
|
5170
|
+
__decorateClass2([
|
|
5162
5171
|
(0, import_core.command)()
|
|
5163
5172
|
], TableExtension.prototype, "splitTableCell", 1);
|
|
5164
|
-
|
|
5173
|
+
__decorateClass2([
|
|
5165
5174
|
(0, import_core.command)()
|
|
5166
5175
|
], TableExtension.prototype, "toggleTableHeader", 1);
|
|
5167
|
-
|
|
5176
|
+
__decorateClass2([
|
|
5168
5177
|
(0, import_core.command)()
|
|
5169
5178
|
], TableExtension.prototype, "toggleTableHeaderColumn", 1);
|
|
5170
|
-
|
|
5179
|
+
__decorateClass2([
|
|
5171
5180
|
(0, import_core.command)()
|
|
5172
5181
|
], TableExtension.prototype, "toggleTableHeaderRow", 1);
|
|
5173
|
-
|
|
5182
|
+
__decorateClass2([
|
|
5174
5183
|
(0, import_core.command)()
|
|
5175
5184
|
], TableExtension.prototype, "toggleTableHeaderCell", 1);
|
|
5176
|
-
|
|
5185
|
+
__decorateClass2([
|
|
5177
5186
|
(0, import_core.command)()
|
|
5178
5187
|
], TableExtension.prototype, "setTableCellAttribute", 1);
|
|
5179
|
-
|
|
5188
|
+
__decorateClass2([
|
|
5180
5189
|
(0, import_core.command)({ disableChaining: true })
|
|
5181
5190
|
], TableExtension.prototype, "fixTables", 1);
|
|
5182
|
-
|
|
5191
|
+
__decorateClass2([
|
|
5183
5192
|
(0, import_core.helper)()
|
|
5184
5193
|
], TableExtension.prototype, "enableTableSupport", 1);
|
|
5185
|
-
|
|
5194
|
+
__decorateClass2([
|
|
5186
5195
|
(0, import_core.helper)()
|
|
5187
5196
|
], TableExtension.prototype, "tableHasHeader", 1);
|
|
5188
|
-
|
|
5197
|
+
__decorateClass2([
|
|
5189
5198
|
(0, import_core.command)()
|
|
5190
5199
|
], TableExtension.prototype, "setTableCellBackground", 1);
|
|
5191
|
-
|
|
5200
|
+
__decorateClass2([
|
|
5192
5201
|
(0, import_core.command)()
|
|
5193
5202
|
], TableExtension.prototype, "selectParentCell", 1);
|
|
5194
|
-
|
|
5203
|
+
__decorateClass2([
|
|
5195
5204
|
(0, import_core.command)()
|
|
5196
5205
|
], TableExtension.prototype, "expandCellSelection", 1);
|
|
5197
|
-
|
|
5206
|
+
__decorateClass2([
|
|
5198
5207
|
(0, import_core.keyBinding)({
|
|
5199
5208
|
shortcut: "Tab",
|
|
5200
5209
|
isActive: (options) => options.tabKeyboardShortcuts
|
|
5201
5210
|
})
|
|
5202
5211
|
], TableExtension.prototype, "goToNextCell", 1);
|
|
5203
|
-
|
|
5212
|
+
__decorateClass2([
|
|
5204
5213
|
(0, import_core.keyBinding)({
|
|
5205
5214
|
shortcut: "Shift-Tab",
|
|
5206
5215
|
isActive: (options) => options.tabKeyboardShortcuts
|
|
5207
5216
|
})
|
|
5208
5217
|
], TableExtension.prototype, "goToPreviousCell", 1);
|
|
5209
|
-
TableExtension =
|
|
5218
|
+
TableExtension = __decorateClass2([
|
|
5210
5219
|
(0, import_core.extension)({
|
|
5211
5220
|
defaultOptions: {
|
|
5212
5221
|
resizable: true,
|
|
@@ -5235,7 +5244,7 @@ var TableRowExtension = class extends import_core.NodeExtension {
|
|
|
5235
5244
|
return createTableNodeSchema(extra, override).tableRow;
|
|
5236
5245
|
}
|
|
5237
5246
|
};
|
|
5238
|
-
TableRowExtension =
|
|
5247
|
+
TableRowExtension = __decorateClass2([
|
|
5239
5248
|
(0, import_core.extension)({ defaultPriority: import_core.ExtensionPriority.Low })
|
|
5240
5249
|
], TableRowExtension);
|
|
5241
5250
|
var TableCellExtension = class extends import_core.NodeExtension {
|
|
@@ -5246,7 +5255,7 @@ var TableCellExtension = class extends import_core.NodeExtension {
|
|
|
5246
5255
|
return createTableNodeSchema(extra, override).tableCell;
|
|
5247
5256
|
}
|
|
5248
5257
|
};
|
|
5249
|
-
TableCellExtension =
|
|
5258
|
+
TableCellExtension = __decorateClass2([
|
|
5250
5259
|
(0, import_core.extension)({ defaultPriority: import_core.ExtensionPriority.Low })
|
|
5251
5260
|
], TableCellExtension);
|
|
5252
5261
|
var TableHeaderCellExtension = class extends import_core.NodeExtension {
|
|
@@ -5257,7 +5266,7 @@ var TableHeaderCellExtension = class extends import_core.NodeExtension {
|
|
|
5257
5266
|
return createTableNodeSchema(extra, override).tableHeaderCell;
|
|
5258
5267
|
}
|
|
5259
5268
|
};
|
|
5260
|
-
TableHeaderCellExtension =
|
|
5269
|
+
TableHeaderCellExtension = __decorateClass2([
|
|
5261
5270
|
(0, import_core.extension)({ defaultPriority: import_core.ExtensionPriority.Low })
|
|
5262
5271
|
], TableHeaderCellExtension);
|
|
5263
5272
|
var TableControllerCellExtension = class extends import_core.NodeExtension {
|
|
@@ -5270,7 +5279,7 @@ var TableControllerCellExtension = class extends import_core.NodeExtension {
|
|
|
5270
5279
|
};
|
|
5271
5280
|
}
|
|
5272
5281
|
};
|
|
5273
|
-
TableControllerCellExtension =
|
|
5282
|
+
TableControllerCellExtension = __decorateClass2([
|
|
5274
5283
|
(0, import_core.extension)({ defaultPriority: import_core.ExtensionPriority.Low })
|
|
5275
5284
|
], TableControllerCellExtension);
|
|
5276
5285
|
function fixTablesCommand(lastGoodState) {
|
|
@@ -6767,14 +6776,7 @@ function deleteTextBlockChild(tr, textBlockNode, textBlockStart, childIndex) {
|
|
|
6767
6776
|
|
|
6768
6777
|
// src/extensions/HtmlNode/html-inline-extension.ts
|
|
6769
6778
|
var import_remirror = require("remirror");
|
|
6770
|
-
var LineHtmlInlineExtension =
|
|
6771
|
-
defaultOptions: {
|
|
6772
|
-
handleViewImgSrcUrl: async (src) => src
|
|
6773
|
-
}
|
|
6774
|
-
})) class extends import_remirror.MarkExtension {
|
|
6775
|
-
static {
|
|
6776
|
-
this.disableExtraAttributes = true;
|
|
6777
|
-
}
|
|
6779
|
+
var LineHtmlInlineExtension = class extends import_remirror.MarkExtension {
|
|
6778
6780
|
get name() {
|
|
6779
6781
|
return "mdHtmlInline";
|
|
6780
6782
|
}
|
|
@@ -6826,6 +6828,14 @@ var LineHtmlInlineExtension = @((0, import_remirror.extension)({
|
|
|
6826
6828
|
};
|
|
6827
6829
|
}
|
|
6828
6830
|
};
|
|
6831
|
+
LineHtmlInlineExtension.disableExtraAttributes = true;
|
|
6832
|
+
LineHtmlInlineExtension = __decorateClass([
|
|
6833
|
+
(0, import_remirror.extension)({
|
|
6834
|
+
defaultOptions: {
|
|
6835
|
+
handleViewImgSrcUrl: async (src) => src
|
|
6836
|
+
}
|
|
6837
|
+
})
|
|
6838
|
+
], LineHtmlInlineExtension);
|
|
6829
6839
|
|
|
6830
6840
|
// src/extensions/Inline/inline-mark-extensions.ts
|
|
6831
6841
|
var commonAttrs = {
|
|
@@ -6883,11 +6893,13 @@ var Emphasis = class extends import_core5.MarkExtension {
|
|
|
6883
6893
|
toDOM: () => ["em", 0]
|
|
6884
6894
|
};
|
|
6885
6895
|
}
|
|
6886
|
-
@((0, import_core5.keyBinding)({ shortcut: "mod-i", command: "toggleEmphasis" }))
|
|
6887
6896
|
shortcut(props) {
|
|
6888
6897
|
return toggleInlineMark(this.name)(props);
|
|
6889
6898
|
}
|
|
6890
6899
|
};
|
|
6900
|
+
__decorateClass([
|
|
6901
|
+
(0, import_core5.keyBinding)({ shortcut: "mod-i", command: "toggleEmphasis" })
|
|
6902
|
+
], Emphasis.prototype, "shortcut", 1);
|
|
6891
6903
|
var Strong = class extends import_core5.MarkExtension {
|
|
6892
6904
|
static {
|
|
6893
6905
|
this.disableExtraAttributes = true;
|
|
@@ -6901,11 +6913,13 @@ var Strong = class extends import_core5.MarkExtension {
|
|
|
6901
6913
|
toDOM: () => ["strong", 0]
|
|
6902
6914
|
};
|
|
6903
6915
|
}
|
|
6904
|
-
@((0, import_core5.keyBinding)({ shortcut: "mod-b", command: "toggleStrong" }))
|
|
6905
6916
|
shortcut(props) {
|
|
6906
6917
|
return toggleInlineMark(this.name)(props);
|
|
6907
6918
|
}
|
|
6908
6919
|
};
|
|
6920
|
+
__decorateClass([
|
|
6921
|
+
(0, import_core5.keyBinding)({ shortcut: "mod-b", command: "toggleStrong" })
|
|
6922
|
+
], Strong.prototype, "shortcut", 1);
|
|
6909
6923
|
var CodeText = class extends import_core5.MarkExtension {
|
|
6910
6924
|
static {
|
|
6911
6925
|
this.disableExtraAttributes = true;
|
|
@@ -6919,11 +6933,13 @@ var CodeText = class extends import_core5.MarkExtension {
|
|
|
6919
6933
|
toDOM: () => ["code", 0]
|
|
6920
6934
|
};
|
|
6921
6935
|
}
|
|
6922
|
-
@((0, import_core5.keyBinding)({ shortcut: "mod-e", command: "toggleCodeText" }))
|
|
6923
6936
|
shortcut(props) {
|
|
6924
6937
|
return toggleInlineMark(this.name)(props);
|
|
6925
6938
|
}
|
|
6926
6939
|
};
|
|
6940
|
+
__decorateClass([
|
|
6941
|
+
(0, import_core5.keyBinding)({ shortcut: "mod-e", command: "toggleCodeText" })
|
|
6942
|
+
], CodeText.prototype, "shortcut", 1);
|
|
6927
6943
|
var CodeSpace = class extends import_core5.MarkExtension {
|
|
6928
6944
|
static {
|
|
6929
6945
|
this.disableExtraAttributes = true;
|
|
@@ -6951,11 +6967,13 @@ var Delete = class extends import_core5.MarkExtension {
|
|
|
6951
6967
|
toDOM: () => ["del", 0]
|
|
6952
6968
|
};
|
|
6953
6969
|
}
|
|
6954
|
-
@((0, import_core5.keyBinding)({ shortcut: "mod-shift-s", command: "toggleDelete" }))
|
|
6955
6970
|
shortcut(props) {
|
|
6956
6971
|
return toggleInlineMark(this.name)(props);
|
|
6957
6972
|
}
|
|
6958
6973
|
};
|
|
6974
|
+
__decorateClass([
|
|
6975
|
+
(0, import_core5.keyBinding)({ shortcut: "mod-shift-s", command: "toggleDelete" })
|
|
6976
|
+
], Delete.prototype, "shortcut", 1);
|
|
6959
6977
|
var LinkText = class extends import_core5.MarkExtension {
|
|
6960
6978
|
static {
|
|
6961
6979
|
this.disableExtraAttributes = true;
|
|
@@ -7011,11 +7029,7 @@ var ImgText = class extends import_core5.MarkExtension {
|
|
|
7011
7029
|
};
|
|
7012
7030
|
}
|
|
7013
7031
|
};
|
|
7014
|
-
var ImgUri =
|
|
7015
|
-
defaultOptions: {
|
|
7016
|
-
handleViewImgSrcUrl: async (src) => src
|
|
7017
|
-
}
|
|
7018
|
-
})) class extends import_core5.MarkExtension {
|
|
7032
|
+
var ImgUri = class extends import_core5.MarkExtension {
|
|
7019
7033
|
constructor() {
|
|
7020
7034
|
super(...arguments);
|
|
7021
7035
|
this.createNodeViews = () => {
|
|
@@ -7037,9 +7051,6 @@ var ImgUri = @((0, import_core5.extension)({
|
|
|
7037
7051
|
};
|
|
7038
7052
|
};
|
|
7039
7053
|
}
|
|
7040
|
-
static {
|
|
7041
|
-
this.disableExtraAttributes = true;
|
|
7042
|
-
}
|
|
7043
7054
|
get name() {
|
|
7044
7055
|
return "mdImgUri";
|
|
7045
7056
|
}
|
|
@@ -7058,6 +7069,14 @@ var ImgUri = @((0, import_core5.extension)({
|
|
|
7058
7069
|
};
|
|
7059
7070
|
}
|
|
7060
7071
|
};
|
|
7072
|
+
ImgUri.disableExtraAttributes = true;
|
|
7073
|
+
ImgUri = __decorateClass([
|
|
7074
|
+
(0, import_core5.extension)({
|
|
7075
|
+
defaultOptions: {
|
|
7076
|
+
handleViewImgSrcUrl: async (src) => src
|
|
7077
|
+
}
|
|
7078
|
+
})
|
|
7079
|
+
], ImgUri);
|
|
7061
7080
|
var autoHideMarks = {
|
|
7062
7081
|
mdMark: true,
|
|
7063
7082
|
mdLinkUri: true,
|
|
@@ -7493,7 +7512,7 @@ var import_core10 = require("@remirror/core");
|
|
|
7493
7512
|
var import_view2 = require("@remirror/pm/view");
|
|
7494
7513
|
var __defProp3 = Object.defineProperty;
|
|
7495
7514
|
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
7496
|
-
var
|
|
7515
|
+
var __decorateClass3 = (decorators, target, key, kind) => {
|
|
7497
7516
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc3(target, key) : target;
|
|
7498
7517
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7499
7518
|
if (decorator = decorators[i])
|
|
@@ -7686,22 +7705,22 @@ var FindExtension = class extends import_core10.PlainExtension {
|
|
|
7686
7705
|
(_a = dom == null ? void 0 : dom.scrollIntoView) == null ? void 0 : _a.call(dom, { block: "nearest", behavior: "smooth" });
|
|
7687
7706
|
}
|
|
7688
7707
|
};
|
|
7689
|
-
|
|
7708
|
+
__decorateClass3([
|
|
7690
7709
|
(0, import_core10.command)()
|
|
7691
7710
|
], FindExtension.prototype, "find", 1);
|
|
7692
|
-
|
|
7711
|
+
__decorateClass3([
|
|
7693
7712
|
(0, import_core10.command)()
|
|
7694
7713
|
], FindExtension.prototype, "stopFind", 1);
|
|
7695
|
-
|
|
7714
|
+
__decorateClass3([
|
|
7696
7715
|
(0, import_core10.command)()
|
|
7697
7716
|
], FindExtension.prototype, "findAndReplace", 1);
|
|
7698
|
-
|
|
7717
|
+
__decorateClass3([
|
|
7699
7718
|
(0, import_core10.command)()
|
|
7700
7719
|
], FindExtension.prototype, "findAndReplaceAll", 1);
|
|
7701
|
-
|
|
7720
|
+
__decorateClass3([
|
|
7702
7721
|
(0, import_core10.helper)()
|
|
7703
7722
|
], FindExtension.prototype, "findRanges", 1);
|
|
7704
|
-
FindExtension =
|
|
7723
|
+
FindExtension = __decorateClass3([
|
|
7705
7724
|
(0, import_core10.extension)({
|
|
7706
7725
|
defaultOptions: {
|
|
7707
7726
|
decoration: { style: "background-color: yellow;" },
|
|
@@ -11506,18 +11525,7 @@ function ImageNodeView(props) {
|
|
|
11506
11525
|
|
|
11507
11526
|
// src/extensions/Image/image-extension.tsx
|
|
11508
11527
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
11509
|
-
var HtmlImageExtension =
|
|
11510
|
-
defaultOptions: {
|
|
11511
|
-
createPlaceholder,
|
|
11512
|
-
handleViewImgSrcUrl: async (src) => src,
|
|
11513
|
-
updatePlaceholder: () => {
|
|
11514
|
-
},
|
|
11515
|
-
destroyPlaceholder: () => {
|
|
11516
|
-
},
|
|
11517
|
-
uploadHandler,
|
|
11518
|
-
preferPastedTextContent: true
|
|
11519
|
-
}
|
|
11520
|
-
})) class extends import_core13.NodeExtension {
|
|
11528
|
+
var HtmlImageExtension = class extends import_core13.NodeExtension {
|
|
11521
11529
|
constructor() {
|
|
11522
11530
|
super(...arguments);
|
|
11523
11531
|
this.ReactComponent = (props) => {
|
|
@@ -11571,7 +11579,6 @@ var HtmlImageExtension = @((0, import_core13.extension)({
|
|
|
11571
11579
|
}
|
|
11572
11580
|
};
|
|
11573
11581
|
}
|
|
11574
|
-
@((0, import_core13.command)())
|
|
11575
11582
|
insertImage(attributes, selection) {
|
|
11576
11583
|
return ({ tr, dispatch }) => {
|
|
11577
11584
|
const { from, to } = (0, import_core13.getTextSelection)(selection ?? tr.selection, tr.doc);
|
|
@@ -11580,7 +11587,6 @@ var HtmlImageExtension = @((0, import_core13.extension)({
|
|
|
11580
11587
|
return true;
|
|
11581
11588
|
};
|
|
11582
11589
|
}
|
|
11583
|
-
@((0, import_core13.command)())
|
|
11584
11590
|
uploadImage(value, onElement) {
|
|
11585
11591
|
const { updatePlaceholder, destroyPlaceholder, createPlaceholder: createPlaceholder2 } = this.options;
|
|
11586
11592
|
return (props) => {
|
|
@@ -11685,6 +11691,26 @@ var HtmlImageExtension = @((0, import_core13.extension)({
|
|
|
11685
11691
|
);
|
|
11686
11692
|
}
|
|
11687
11693
|
};
|
|
11694
|
+
__decorateClass([
|
|
11695
|
+
(0, import_core13.command)()
|
|
11696
|
+
], HtmlImageExtension.prototype, "insertImage", 1);
|
|
11697
|
+
__decorateClass([
|
|
11698
|
+
(0, import_core13.command)()
|
|
11699
|
+
], HtmlImageExtension.prototype, "uploadImage", 1);
|
|
11700
|
+
HtmlImageExtension = __decorateClass([
|
|
11701
|
+
(0, import_core13.extension)({
|
|
11702
|
+
defaultOptions: {
|
|
11703
|
+
createPlaceholder,
|
|
11704
|
+
handleViewImgSrcUrl: async (src) => src,
|
|
11705
|
+
updatePlaceholder: () => {
|
|
11706
|
+
},
|
|
11707
|
+
destroyPlaceholder: () => {
|
|
11708
|
+
},
|
|
11709
|
+
uploadHandler,
|
|
11710
|
+
preferPastedTextContent: true
|
|
11711
|
+
}
|
|
11712
|
+
})
|
|
11713
|
+
], HtmlImageExtension);
|
|
11688
11714
|
function getDimensions(element) {
|
|
11689
11715
|
let { width, height } = element.style;
|
|
11690
11716
|
width = width || element.getAttribute("width") || "";
|
|
@@ -11758,14 +11784,7 @@ function IframeNodeView(props) {
|
|
|
11758
11784
|
|
|
11759
11785
|
// src/extensions/Iframe/iframe-extension.tsx
|
|
11760
11786
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
11761
|
-
var IframeExtension =
|
|
11762
|
-
defaultOptions: {
|
|
11763
|
-
defaultSource: "",
|
|
11764
|
-
class: "remirror-iframe",
|
|
11765
|
-
enableResizing: false
|
|
11766
|
-
},
|
|
11767
|
-
staticKeys: ["defaultSource", "class"]
|
|
11768
|
-
})) class extends import_core14.NodeExtension {
|
|
11787
|
+
var IframeExtension = class extends import_core14.NodeExtension {
|
|
11769
11788
|
constructor() {
|
|
11770
11789
|
super(...arguments);
|
|
11771
11790
|
this.ReactComponent = (props) => {
|
|
@@ -11835,14 +11854,12 @@ var IframeExtension = @((0, import_core14.extension)({
|
|
|
11835
11854
|
}
|
|
11836
11855
|
};
|
|
11837
11856
|
}
|
|
11838
|
-
@((0, import_core14.command)())
|
|
11839
11857
|
addIframe(attributes) {
|
|
11840
11858
|
return ({ tr, dispatch }) => {
|
|
11841
11859
|
dispatch?.(tr.replaceSelectionWith(this.type.create(attributes)));
|
|
11842
11860
|
return true;
|
|
11843
11861
|
};
|
|
11844
11862
|
}
|
|
11845
|
-
@((0, import_core14.command)())
|
|
11846
11863
|
addYouTubeVideo(props) {
|
|
11847
11864
|
return this.addIframe({
|
|
11848
11865
|
src: createYouTubeUrl(props),
|
|
@@ -11851,7 +11868,6 @@ var IframeExtension = @((0, import_core14.extension)({
|
|
|
11851
11868
|
allowFullScreen: "true"
|
|
11852
11869
|
});
|
|
11853
11870
|
}
|
|
11854
|
-
@((0, import_core14.command)())
|
|
11855
11871
|
updateIframeSource(src) {
|
|
11856
11872
|
return ({ tr, dispatch }) => {
|
|
11857
11873
|
const iframeNode = (0, import_core14.findSelectedNodeOfType)({ selection: tr.selection, types: this.type });
|
|
@@ -11862,7 +11878,6 @@ var IframeExtension = @((0, import_core14.extension)({
|
|
|
11862
11878
|
return true;
|
|
11863
11879
|
};
|
|
11864
11880
|
}
|
|
11865
|
-
@((0, import_core14.command)())
|
|
11866
11881
|
updateYouTubeVideo(props) {
|
|
11867
11882
|
return this.updateIframeSource(createYouTubeUrl(props));
|
|
11868
11883
|
}
|
|
@@ -11898,6 +11913,28 @@ var IframeExtension = @((0, import_core14.extension)({
|
|
|
11898
11913
|
);
|
|
11899
11914
|
}
|
|
11900
11915
|
};
|
|
11916
|
+
__decorateClass([
|
|
11917
|
+
(0, import_core14.command)()
|
|
11918
|
+
], IframeExtension.prototype, "addIframe", 1);
|
|
11919
|
+
__decorateClass([
|
|
11920
|
+
(0, import_core14.command)()
|
|
11921
|
+
], IframeExtension.prototype, "addYouTubeVideo", 1);
|
|
11922
|
+
__decorateClass([
|
|
11923
|
+
(0, import_core14.command)()
|
|
11924
|
+
], IframeExtension.prototype, "updateIframeSource", 1);
|
|
11925
|
+
__decorateClass([
|
|
11926
|
+
(0, import_core14.command)()
|
|
11927
|
+
], IframeExtension.prototype, "updateYouTubeVideo", 1);
|
|
11928
|
+
IframeExtension = __decorateClass([
|
|
11929
|
+
(0, import_core14.extension)({
|
|
11930
|
+
defaultOptions: {
|
|
11931
|
+
defaultSource: "",
|
|
11932
|
+
class: "remirror-iframe",
|
|
11933
|
+
enableResizing: false
|
|
11934
|
+
},
|
|
11935
|
+
staticKeys: ["defaultSource", "class"]
|
|
11936
|
+
})
|
|
11937
|
+
], IframeExtension);
|
|
11901
11938
|
function parseUrl(url) {
|
|
11902
11939
|
const parser4 = document.createElement("a");
|
|
11903
11940
|
parser4.href = url;
|
|
@@ -12112,9 +12149,7 @@ var getCase = (state, event, view, ignoredKeys, customConditions, shouldOpenInSe
|
|
|
12112
12149
|
};
|
|
12113
12150
|
|
|
12114
12151
|
// src/extensions/SlashMenu/slashmenu-extension.ts
|
|
12115
|
-
var SlashMenuExtension =
|
|
12116
|
-
defaultOptions: {}
|
|
12117
|
-
})) class extends import_remirror3.PlainExtension {
|
|
12152
|
+
var SlashMenuExtension = class extends import_remirror3.PlainExtension {
|
|
12118
12153
|
get name() {
|
|
12119
12154
|
return "slash-menu";
|
|
12120
12155
|
}
|
|
@@ -12187,20 +12222,17 @@ var SlashMenuExtension = @((0, import_remirror3.extension)({
|
|
|
12187
12222
|
};
|
|
12188
12223
|
}
|
|
12189
12224
|
};
|
|
12225
|
+
SlashMenuExtension = __decorateClass([
|
|
12226
|
+
(0, import_remirror3.extension)({
|
|
12227
|
+
defaultOptions: {}
|
|
12228
|
+
})
|
|
12229
|
+
], SlashMenuExtension);
|
|
12190
12230
|
|
|
12191
12231
|
// src/extensions/Placeholder/index.ts
|
|
12192
12232
|
var import_core15 = require("@remirror/core");
|
|
12193
12233
|
var import_view8 = require("@remirror/pm/view");
|
|
12194
12234
|
var import_theme4 = require("@remirror/theme");
|
|
12195
|
-
var PlaceholderExtension =
|
|
12196
|
-
defaultOptions: {
|
|
12197
|
-
emptyNodeClass: import_theme4.ExtensionPlaceholderTheme.IS_EMPTY,
|
|
12198
|
-
placeholder: ""
|
|
12199
|
-
},
|
|
12200
|
-
staticKeys: [],
|
|
12201
|
-
handlerKeys: [],
|
|
12202
|
-
customHandlerKeys: []
|
|
12203
|
-
})) class extends import_core15.PlainExtension {
|
|
12235
|
+
var PlaceholderExtension = class extends import_core15.PlainExtension {
|
|
12204
12236
|
get name() {
|
|
12205
12237
|
return "placeholder";
|
|
12206
12238
|
}
|
|
@@ -12221,6 +12253,17 @@ var PlaceholderExtension = @((0, import_core15.extension)({
|
|
|
12221
12253
|
}
|
|
12222
12254
|
}
|
|
12223
12255
|
};
|
|
12256
|
+
PlaceholderExtension = __decorateClass([
|
|
12257
|
+
(0, import_core15.extension)({
|
|
12258
|
+
defaultOptions: {
|
|
12259
|
+
emptyNodeClass: import_theme4.ExtensionPlaceholderTheme.IS_EMPTY,
|
|
12260
|
+
placeholder: ""
|
|
12261
|
+
},
|
|
12262
|
+
staticKeys: [],
|
|
12263
|
+
handlerKeys: [],
|
|
12264
|
+
customHandlerKeys: []
|
|
12265
|
+
})
|
|
12266
|
+
], PlaceholderExtension);
|
|
12224
12267
|
function createDecorationSet(props) {
|
|
12225
12268
|
const { extension: ext, state } = props;
|
|
12226
12269
|
const { emptyNodeClass, placeholder } = ext.options;
|
|
@@ -13483,13 +13526,7 @@ var CodeMirror6NodeView = class {
|
|
|
13483
13526
|
// src/extensions/CodeMirror/codemirror-extension.ts
|
|
13484
13527
|
var import_language_data3 = require("@codemirror/language-data");
|
|
13485
13528
|
var fakeIndentedLanguage = "indent-code";
|
|
13486
|
-
var LineCodeMirrorExtension =
|
|
13487
|
-
defaultOptions: {
|
|
13488
|
-
hideDecoration: false,
|
|
13489
|
-
extensions: null,
|
|
13490
|
-
toggleName: "paragraph"
|
|
13491
|
-
}
|
|
13492
|
-
})) class extends import_core18.NodeExtension {
|
|
13529
|
+
var LineCodeMirrorExtension = class extends import_core18.NodeExtension {
|
|
13493
13530
|
get name() {
|
|
13494
13531
|
return "codeMirror";
|
|
13495
13532
|
}
|
|
@@ -13560,7 +13597,6 @@ var LineCodeMirrorExtension = @((0, import_core18.extension)({
|
|
|
13560
13597
|
})
|
|
13561
13598
|
];
|
|
13562
13599
|
}
|
|
13563
|
-
@((0, import_core18.keyBinding)({ shortcut: "Enter" }))
|
|
13564
13600
|
enterKey({ dispatch, tr }) {
|
|
13565
13601
|
if (!((0, import_core18.isTextSelection)(tr.selection) && tr.selection.empty)) {
|
|
13566
13602
|
return false;
|
|
@@ -13590,11 +13626,9 @@ var LineCodeMirrorExtension = @((0, import_core18.extension)({
|
|
|
13590
13626
|
}
|
|
13591
13627
|
return true;
|
|
13592
13628
|
}
|
|
13593
|
-
@((0, import_core18.command)())
|
|
13594
13629
|
createCodeMirror(attributes) {
|
|
13595
13630
|
return (0, import_core18.setBlockType)(this.type, attributes);
|
|
13596
13631
|
}
|
|
13597
|
-
@((0, import_core18.command)())
|
|
13598
13632
|
updateCodeMirror(attributes) {
|
|
13599
13633
|
const type = this.type;
|
|
13600
13634
|
return ({ state, dispatch, tr }) => {
|
|
@@ -13609,7 +13643,6 @@ var LineCodeMirrorExtension = @((0, import_core18.extension)({
|
|
|
13609
13643
|
return true;
|
|
13610
13644
|
};
|
|
13611
13645
|
}
|
|
13612
|
-
@((0, import_core18.command)())
|
|
13613
13646
|
changeCodeMirrorTheme(theme) {
|
|
13614
13647
|
return () => {
|
|
13615
13648
|
changeTheme(theme);
|
|
@@ -13677,6 +13710,27 @@ var LineCodeMirrorExtension = @((0, import_core18.extension)({
|
|
|
13677
13710
|
return import_view9.DecorationSet.create(state.doc, [deco]);
|
|
13678
13711
|
}
|
|
13679
13712
|
};
|
|
13713
|
+
__decorateClass([
|
|
13714
|
+
(0, import_core18.keyBinding)({ shortcut: "Enter" })
|
|
13715
|
+
], LineCodeMirrorExtension.prototype, "enterKey", 1);
|
|
13716
|
+
__decorateClass([
|
|
13717
|
+
(0, import_core18.command)()
|
|
13718
|
+
], LineCodeMirrorExtension.prototype, "createCodeMirror", 1);
|
|
13719
|
+
__decorateClass([
|
|
13720
|
+
(0, import_core18.command)()
|
|
13721
|
+
], LineCodeMirrorExtension.prototype, "updateCodeMirror", 1);
|
|
13722
|
+
__decorateClass([
|
|
13723
|
+
(0, import_core18.command)()
|
|
13724
|
+
], LineCodeMirrorExtension.prototype, "changeCodeMirrorTheme", 1);
|
|
13725
|
+
LineCodeMirrorExtension = __decorateClass([
|
|
13726
|
+
(0, import_core18.extension)({
|
|
13727
|
+
defaultOptions: {
|
|
13728
|
+
hideDecoration: false,
|
|
13729
|
+
extensions: null,
|
|
13730
|
+
toggleName: "paragraph"
|
|
13731
|
+
}
|
|
13732
|
+
})
|
|
13733
|
+
], LineCodeMirrorExtension);
|
|
13680
13734
|
|
|
13681
13735
|
// src/components/SourceEditor/delegate.ts
|
|
13682
13736
|
var import_lang_markdown = require("@codemirror/lang-markdown");
|