@bigbinary/neeto-editor 1.26.21 → 1.26.22
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/index.cjs.js +188 -56
- package/index.cjs.js.map +1 -1
- package/index.js +188 -56
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -145047,7 +145047,7 @@ var buildMenuOptions = function buildMenuOptions(_ref) {
|
|
|
145047
145047
|
|
|
145048
145048
|
function cov_1jkm4gpx9u() {
|
|
145049
145049
|
var path = "/home/runner/work/neeto-editor/neeto-editor/src/components/Editor/Menu/Headless/index.jsx";
|
|
145050
|
-
var hash = "
|
|
145050
|
+
var hash = "e26da2a7a598b1d1c8029d0f738f1df40b34ee23";
|
|
145051
145051
|
var global = new Function("return this")();
|
|
145052
145052
|
var gcv = "__coverage__";
|
|
145053
145053
|
var coverageData = {
|
|
@@ -145055,83 +145055,103 @@ function cov_1jkm4gpx9u() {
|
|
|
145055
145055
|
statementMap: {
|
|
145056
145056
|
"0": {
|
|
145057
145057
|
start: {
|
|
145058
|
-
line:
|
|
145058
|
+
line: 13,
|
|
145059
145059
|
column: 17
|
|
145060
145060
|
},
|
|
145061
145061
|
end: {
|
|
145062
|
-
line:
|
|
145062
|
+
line: 71,
|
|
145063
145063
|
column: 1
|
|
145064
145064
|
}
|
|
145065
145065
|
},
|
|
145066
145066
|
"1": {
|
|
145067
145067
|
start: {
|
|
145068
|
-
line:
|
|
145068
|
+
line: 29,
|
|
145069
145069
|
column: 2
|
|
145070
145070
|
},
|
|
145071
145071
|
end: {
|
|
145072
|
-
line:
|
|
145072
|
+
line: 31,
|
|
145073
145073
|
column: 3
|
|
145074
145074
|
}
|
|
145075
145075
|
},
|
|
145076
145076
|
"2": {
|
|
145077
145077
|
start: {
|
|
145078
|
-
line:
|
|
145078
|
+
line: 30,
|
|
145079
145079
|
column: 4
|
|
145080
145080
|
},
|
|
145081
145081
|
end: {
|
|
145082
|
-
line:
|
|
145082
|
+
line: 30,
|
|
145083
145083
|
column: 16
|
|
145084
145084
|
}
|
|
145085
145085
|
},
|
|
145086
145086
|
"3": {
|
|
145087
145087
|
start: {
|
|
145088
|
-
line:
|
|
145088
|
+
line: 33,
|
|
145089
|
+
column: 32
|
|
145090
|
+
},
|
|
145091
|
+
end: {
|
|
145092
|
+
line: 35,
|
|
145093
|
+
column: 3
|
|
145094
|
+
}
|
|
145095
|
+
},
|
|
145096
|
+
"4": {
|
|
145097
|
+
start: {
|
|
145098
|
+
line: 37,
|
|
145089
145099
|
column: 22
|
|
145090
145100
|
},
|
|
145091
145101
|
end: {
|
|
145092
|
-
line:
|
|
145102
|
+
line: 46,
|
|
145093
145103
|
column: 4
|
|
145094
145104
|
}
|
|
145095
145105
|
},
|
|
145096
|
-
"
|
|
145106
|
+
"5": {
|
|
145097
145107
|
start: {
|
|
145098
|
-
line:
|
|
145108
|
+
line: 48,
|
|
145099
145109
|
column: 30
|
|
145100
145110
|
},
|
|
145101
145111
|
end: {
|
|
145102
|
-
line:
|
|
145112
|
+
line: 51,
|
|
145103
145113
|
column: 4
|
|
145104
145114
|
}
|
|
145105
145115
|
},
|
|
145106
|
-
"
|
|
145116
|
+
"6": {
|
|
145107
145117
|
start: {
|
|
145108
|
-
line:
|
|
145118
|
+
line: 52,
|
|
145109
145119
|
column: 21
|
|
145110
145120
|
},
|
|
145111
145121
|
end: {
|
|
145112
|
-
line:
|
|
145122
|
+
line: 52,
|
|
145113
145123
|
column: 61
|
|
145114
145124
|
}
|
|
145115
145125
|
},
|
|
145116
|
-
"
|
|
145126
|
+
"7": {
|
|
145117
145127
|
start: {
|
|
145118
|
-
line:
|
|
145128
|
+
line: 54,
|
|
145119
145129
|
column: 2
|
|
145120
145130
|
},
|
|
145121
145131
|
end: {
|
|
145122
|
-
line:
|
|
145132
|
+
line: 70,
|
|
145123
145133
|
column: 4
|
|
145124
145134
|
}
|
|
145125
145135
|
},
|
|
145126
|
-
"
|
|
145136
|
+
"8": {
|
|
145127
145137
|
start: {
|
|
145128
|
-
line:
|
|
145138
|
+
line: 57,
|
|
145129
145139
|
column: 8
|
|
145130
145140
|
},
|
|
145131
145141
|
end: {
|
|
145132
|
-
line:
|
|
145142
|
+
line: 57,
|
|
145133
145143
|
column: 70
|
|
145134
145144
|
}
|
|
145145
|
+
},
|
|
145146
|
+
"9": {
|
|
145147
|
+
start: {
|
|
145148
|
+
line: 66,
|
|
145149
|
+
column: 25
|
|
145150
|
+
},
|
|
145151
|
+
end: {
|
|
145152
|
+
line: 66,
|
|
145153
|
+
column: 73
|
|
145154
|
+
}
|
|
145135
145155
|
}
|
|
145136
145156
|
},
|
|
145137
145157
|
fnMap: {
|
|
@@ -145139,119 +145159,143 @@ function cov_1jkm4gpx9u() {
|
|
|
145139
145159
|
name: "(anonymous_0)",
|
|
145140
145160
|
decl: {
|
|
145141
145161
|
start: {
|
|
145142
|
-
line:
|
|
145162
|
+
line: 13,
|
|
145143
145163
|
column: 17
|
|
145144
145164
|
},
|
|
145145
145165
|
end: {
|
|
145146
|
-
line:
|
|
145166
|
+
line: 13,
|
|
145147
145167
|
column: 18
|
|
145148
145168
|
}
|
|
145149
145169
|
},
|
|
145150
145170
|
loc: {
|
|
145151
145171
|
start: {
|
|
145152
|
-
line:
|
|
145172
|
+
line: 28,
|
|
145153
145173
|
column: 6
|
|
145154
145174
|
},
|
|
145155
145175
|
end: {
|
|
145156
|
-
line:
|
|
145176
|
+
line: 71,
|
|
145157
145177
|
column: 1
|
|
145158
145178
|
}
|
|
145159
145179
|
},
|
|
145160
|
-
line:
|
|
145180
|
+
line: 28
|
|
145161
145181
|
},
|
|
145162
145182
|
"1": {
|
|
145163
145183
|
name: "(anonymous_1)",
|
|
145164
145184
|
decl: {
|
|
145165
145185
|
start: {
|
|
145166
|
-
line:
|
|
145186
|
+
line: 56,
|
|
145167
145187
|
column: 22
|
|
145168
145188
|
},
|
|
145169
145189
|
end: {
|
|
145170
|
-
line:
|
|
145190
|
+
line: 56,
|
|
145171
145191
|
column: 23
|
|
145172
145192
|
}
|
|
145173
145193
|
},
|
|
145174
145194
|
loc: {
|
|
145175
145195
|
start: {
|
|
145176
|
-
line:
|
|
145196
|
+
line: 57,
|
|
145177
145197
|
column: 8
|
|
145178
145198
|
},
|
|
145179
145199
|
end: {
|
|
145180
|
-
line:
|
|
145200
|
+
line: 57,
|
|
145181
145201
|
column: 70
|
|
145182
145202
|
}
|
|
145183
145203
|
},
|
|
145184
|
-
line:
|
|
145204
|
+
line: 57
|
|
145205
|
+
},
|
|
145206
|
+
"2": {
|
|
145207
|
+
name: "(anonymous_2)",
|
|
145208
|
+
decl: {
|
|
145209
|
+
start: {
|
|
145210
|
+
line: 66,
|
|
145211
|
+
column: 19
|
|
145212
|
+
},
|
|
145213
|
+
end: {
|
|
145214
|
+
line: 66,
|
|
145215
|
+
column: 20
|
|
145216
|
+
}
|
|
145217
|
+
},
|
|
145218
|
+
loc: {
|
|
145219
|
+
start: {
|
|
145220
|
+
line: 66,
|
|
145221
|
+
column: 25
|
|
145222
|
+
},
|
|
145223
|
+
end: {
|
|
145224
|
+
line: 66,
|
|
145225
|
+
column: 73
|
|
145226
|
+
}
|
|
145227
|
+
},
|
|
145228
|
+
line: 66
|
|
145185
145229
|
}
|
|
145186
145230
|
},
|
|
145187
145231
|
branchMap: {
|
|
145188
145232
|
"0": {
|
|
145189
145233
|
loc: {
|
|
145190
145234
|
start: {
|
|
145191
|
-
line:
|
|
145235
|
+
line: 16,
|
|
145192
145236
|
column: 2
|
|
145193
145237
|
},
|
|
145194
145238
|
end: {
|
|
145195
|
-
line:
|
|
145239
|
+
line: 16,
|
|
145196
145240
|
column: 15
|
|
145197
145241
|
}
|
|
145198
145242
|
},
|
|
145199
145243
|
type: "default-arg",
|
|
145200
145244
|
locations: [{
|
|
145201
145245
|
start: {
|
|
145202
|
-
line:
|
|
145246
|
+
line: 16,
|
|
145203
145247
|
column: 13
|
|
145204
145248
|
},
|
|
145205
145249
|
end: {
|
|
145206
|
-
line:
|
|
145250
|
+
line: 16,
|
|
145207
145251
|
column: 15
|
|
145208
145252
|
}
|
|
145209
145253
|
}],
|
|
145210
|
-
line:
|
|
145254
|
+
line: 16
|
|
145211
145255
|
},
|
|
145212
145256
|
"1": {
|
|
145213
145257
|
loc: {
|
|
145214
145258
|
start: {
|
|
145215
|
-
line:
|
|
145259
|
+
line: 21,
|
|
145216
145260
|
column: 2
|
|
145217
145261
|
},
|
|
145218
145262
|
end: {
|
|
145219
|
-
line:
|
|
145263
|
+
line: 21,
|
|
145220
145264
|
column: 20
|
|
145221
145265
|
}
|
|
145222
145266
|
},
|
|
145223
145267
|
type: "default-arg",
|
|
145224
145268
|
locations: [{
|
|
145225
145269
|
start: {
|
|
145226
|
-
line:
|
|
145270
|
+
line: 21,
|
|
145227
145271
|
column: 18
|
|
145228
145272
|
},
|
|
145229
145273
|
end: {
|
|
145230
|
-
line:
|
|
145274
|
+
line: 21,
|
|
145231
145275
|
column: 20
|
|
145232
145276
|
}
|
|
145233
145277
|
}],
|
|
145234
|
-
line:
|
|
145278
|
+
line: 21
|
|
145235
145279
|
},
|
|
145236
145280
|
"2": {
|
|
145237
145281
|
loc: {
|
|
145238
145282
|
start: {
|
|
145239
|
-
line:
|
|
145283
|
+
line: 29,
|
|
145240
145284
|
column: 2
|
|
145241
145285
|
},
|
|
145242
145286
|
end: {
|
|
145243
|
-
line:
|
|
145287
|
+
line: 31,
|
|
145244
145288
|
column: 3
|
|
145245
145289
|
}
|
|
145246
145290
|
},
|
|
145247
145291
|
type: "if",
|
|
145248
145292
|
locations: [{
|
|
145249
145293
|
start: {
|
|
145250
|
-
line:
|
|
145294
|
+
line: 29,
|
|
145251
145295
|
column: 2
|
|
145252
145296
|
},
|
|
145253
145297
|
end: {
|
|
145254
|
-
line:
|
|
145298
|
+
line: 31,
|
|
145255
145299
|
column: 3
|
|
145256
145300
|
}
|
|
145257
145301
|
}, {
|
|
@@ -145264,7 +145308,73 @@ function cov_1jkm4gpx9u() {
|
|
|
145264
145308
|
column: undefined
|
|
145265
145309
|
}
|
|
145266
145310
|
}],
|
|
145267
|
-
line:
|
|
145311
|
+
line: 29
|
|
145312
|
+
},
|
|
145313
|
+
"3": {
|
|
145314
|
+
loc: {
|
|
145315
|
+
start: {
|
|
145316
|
+
line: 34,
|
|
145317
|
+
column: 4
|
|
145318
|
+
},
|
|
145319
|
+
end: {
|
|
145320
|
+
line: 34,
|
|
145321
|
+
column: 62
|
|
145322
|
+
}
|
|
145323
|
+
},
|
|
145324
|
+
type: "binary-expr",
|
|
145325
|
+
locations: [{
|
|
145326
|
+
start: {
|
|
145327
|
+
line: 34,
|
|
145328
|
+
column: 4
|
|
145329
|
+
},
|
|
145330
|
+
end: {
|
|
145331
|
+
line: 34,
|
|
145332
|
+
column: 31
|
|
145333
|
+
}
|
|
145334
|
+
}, {
|
|
145335
|
+
start: {
|
|
145336
|
+
line: 34,
|
|
145337
|
+
column: 35
|
|
145338
|
+
},
|
|
145339
|
+
end: {
|
|
145340
|
+
line: 34,
|
|
145341
|
+
column: 62
|
|
145342
|
+
}
|
|
145343
|
+
}],
|
|
145344
|
+
line: 34
|
|
145345
|
+
},
|
|
145346
|
+
"4": {
|
|
145347
|
+
loc: {
|
|
145348
|
+
start: {
|
|
145349
|
+
line: 60,
|
|
145350
|
+
column: 7
|
|
145351
|
+
},
|
|
145352
|
+
end: {
|
|
145353
|
+
line: 68,
|
|
145354
|
+
column: 7
|
|
145355
|
+
}
|
|
145356
|
+
},
|
|
145357
|
+
type: "binary-expr",
|
|
145358
|
+
locations: [{
|
|
145359
|
+
start: {
|
|
145360
|
+
line: 60,
|
|
145361
|
+
column: 7
|
|
145362
|
+
},
|
|
145363
|
+
end: {
|
|
145364
|
+
line: 60,
|
|
145365
|
+
column: 28
|
|
145366
|
+
}
|
|
145367
|
+
}, {
|
|
145368
|
+
start: {
|
|
145369
|
+
line: 61,
|
|
145370
|
+
column: 8
|
|
145371
|
+
},
|
|
145372
|
+
end: {
|
|
145373
|
+
line: 67,
|
|
145374
|
+
column: 10
|
|
145375
|
+
}
|
|
145376
|
+
}],
|
|
145377
|
+
line: 60
|
|
145268
145378
|
}
|
|
145269
145379
|
},
|
|
145270
145380
|
s: {
|
|
@@ -145275,19 +145385,24 @@ function cov_1jkm4gpx9u() {
|
|
|
145275
145385
|
"4": 0,
|
|
145276
145386
|
"5": 0,
|
|
145277
145387
|
"6": 0,
|
|
145278
|
-
"7": 0
|
|
145388
|
+
"7": 0,
|
|
145389
|
+
"8": 0,
|
|
145390
|
+
"9": 0
|
|
145279
145391
|
},
|
|
145280
145392
|
f: {
|
|
145281
145393
|
"0": 0,
|
|
145282
|
-
"1": 0
|
|
145394
|
+
"1": 0,
|
|
145395
|
+
"2": 0
|
|
145283
145396
|
},
|
|
145284
145397
|
b: {
|
|
145285
145398
|
"0": [0],
|
|
145286
145399
|
"1": [0],
|
|
145287
|
-
"2": [0, 0]
|
|
145400
|
+
"2": [0, 0],
|
|
145401
|
+
"3": [0, 0],
|
|
145402
|
+
"4": [0, 0]
|
|
145288
145403
|
},
|
|
145289
145404
|
_coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
|
|
145290
|
-
hash: "
|
|
145405
|
+
hash: "e26da2a7a598b1d1c8029d0f738f1df40b34ee23"
|
|
145291
145406
|
};
|
|
145292
145407
|
var coverage = global[gcv] || (global[gcv] = {});
|
|
145293
145408
|
if (!coverage[path] || coverage[path].hash !== hash) {
|
|
@@ -145310,6 +145425,9 @@ var Headless = function Headless(_ref) {
|
|
|
145310
145425
|
_ref$tooltips = _ref.tooltips,
|
|
145311
145426
|
tooltips = _ref$tooltips === void 0 ? (cov_1jkm4gpx9u().b[0][0]++, {}) : _ref$tooltips,
|
|
145312
145427
|
setMediaUploader = _ref.setMediaUploader,
|
|
145428
|
+
mediaUploader = _ref.mediaUploader,
|
|
145429
|
+
unsplashApiKey = _ref.unsplashApiKey,
|
|
145430
|
+
uploadEndpoint = _ref.uploadEndpoint,
|
|
145313
145431
|
_ref$addonCommands = _ref.addonCommands,
|
|
145314
145432
|
addonCommands = _ref$addonCommands === void 0 ? (cov_1jkm4gpx9u().b[1][0]++, []) : _ref$addonCommands,
|
|
145315
145433
|
children = _ref.children,
|
|
@@ -145327,7 +145445,8 @@ var Headless = function Headless(_ref) {
|
|
|
145327
145445
|
} else {
|
|
145328
145446
|
cov_1jkm4gpx9u().b[2][1]++;
|
|
145329
145447
|
}
|
|
145330
|
-
var
|
|
145448
|
+
var isMediaUploaderActive = (cov_1jkm4gpx9u().s[3]++, options.includes((cov_1jkm4gpx9u().b[3][0]++, EDITOR_OPTIONS.IMAGE_UPLOAD) ));
|
|
145449
|
+
var menuOptions = (cov_1jkm4gpx9u().s[4]++, buildMenuOptions({
|
|
145331
145450
|
tooltips: tooltips,
|
|
145332
145451
|
editor: editor,
|
|
145333
145452
|
options: options,
|
|
@@ -145337,22 +145456,35 @@ var Headless = function Headless(_ref) {
|
|
|
145337
145456
|
setIsEmojiPickerActive: setIsEmojiPickerActive,
|
|
145338
145457
|
setIsEmbedModalOpen: setIsEmbedModalOpen
|
|
145339
145458
|
}));
|
|
145340
|
-
var addonCommandOptions = (cov_1jkm4gpx9u().s[
|
|
145459
|
+
var addonCommandOptions = (cov_1jkm4gpx9u().s[5]++, buildOptionsFromAddonCommands({
|
|
145341
145460
|
editor: editor,
|
|
145342
145461
|
commands: addonCommands
|
|
145343
145462
|
}));
|
|
145344
|
-
var allOptions = (cov_1jkm4gpx9u().s[
|
|
145345
|
-
cov_1jkm4gpx9u().s[
|
|
145463
|
+
var allOptions = (cov_1jkm4gpx9u().s[6]++, [].concat(_toConsumableArray$1(menuOptions), _toConsumableArray$1(addonCommandOptions)));
|
|
145464
|
+
cov_1jkm4gpx9u().s[7]++;
|
|
145346
145465
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
145347
145466
|
className: classnames$2("ne-headless", _defineProperty({}, className, className))
|
|
145348
145467
|
}, allOptions.map(function (option) {
|
|
145349
145468
|
cov_1jkm4gpx9u().f[1]++;
|
|
145350
|
-
cov_1jkm4gpx9u().s[
|
|
145469
|
+
cov_1jkm4gpx9u().s[8]++;
|
|
145351
145470
|
return /*#__PURE__*/React__default.createElement(Option, _extends$2({
|
|
145352
145471
|
editor: editor,
|
|
145353
145472
|
key: option.optionName
|
|
145354
145473
|
}, option));
|
|
145355
|
-
}), children)
|
|
145474
|
+
}), children, (cov_1jkm4gpx9u().b[4][0]++, isMediaUploaderActive) && (cov_1jkm4gpx9u().b[4][1]++, /*#__PURE__*/React__default.createElement(MediaUploader, {
|
|
145475
|
+
editor: editor,
|
|
145476
|
+
mediaUploader: mediaUploader,
|
|
145477
|
+
unsplashApiKey: unsplashApiKey,
|
|
145478
|
+
uploadEndpoint: uploadEndpoint,
|
|
145479
|
+
onClose: function onClose() {
|
|
145480
|
+
cov_1jkm4gpx9u().f[2]++;
|
|
145481
|
+
cov_1jkm4gpx9u().s[9]++;
|
|
145482
|
+
return setMediaUploader({
|
|
145483
|
+
image: false,
|
|
145484
|
+
video: false
|
|
145485
|
+
});
|
|
145486
|
+
}
|
|
145487
|
+
})));
|
|
145356
145488
|
};
|
|
145357
145489
|
|
|
145358
145490
|
function cov_1s6fdrq07c() {
|