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