@contentful/field-editor-rich-text 2.0.0-next.4 → 2.0.0-next.5
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/field-editor-rich-text.cjs.development.js +673 -686
- package/dist/field-editor-rich-text.cjs.development.js.map +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js.map +1 -1
- package/dist/field-editor-rich-text.esm.js +673 -686
- package/dist/field-editor-rich-text.esm.js.map +1 -1
- package/dist/plugins/Quote/toggleQuote.d.ts +2 -1
- package/package.json +1 -1
|
@@ -348,8 +348,8 @@ var schema = {
|
|
|
348
348
|
function getContentfulEditorId(sdk) {
|
|
349
349
|
var entry = sdk.entry,
|
|
350
350
|
field = sdk.field;
|
|
351
|
-
var
|
|
352
|
-
return "rich-text-editor-" +
|
|
351
|
+
var entrySys = entry.getSys();
|
|
352
|
+
return "rich-text-editor-" + entrySys.id + "-" + field.id + "-" + field.locale + "-v" + entrySys.version;
|
|
353
353
|
}
|
|
354
354
|
|
|
355
355
|
function useContentfulEditorHook(_ref) {
|
|
@@ -1142,198 +1142,201 @@ function createCommonjsModule(fn, module) {
|
|
|
1142
1142
|
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
1143
1143
|
}
|
|
1144
1144
|
|
|
1145
|
-
var runtime_1 =
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
var runtime = function (exports) {
|
|
1153
|
-
|
|
1154
|
-
var Op = Object.prototype;
|
|
1155
|
-
var hasOwn = Op.hasOwnProperty;
|
|
1156
|
-
var undefined$1; // More compressible than void 0.
|
|
1157
|
-
|
|
1158
|
-
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
1159
|
-
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
1160
|
-
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
1161
|
-
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
1162
|
-
|
|
1163
|
-
function define(obj, key, value) {
|
|
1164
|
-
Object.defineProperty(obj, key, {
|
|
1165
|
-
value: value,
|
|
1166
|
-
enumerable: true,
|
|
1167
|
-
configurable: true,
|
|
1168
|
-
writable: true
|
|
1169
|
-
});
|
|
1170
|
-
return obj[key];
|
|
1171
|
-
}
|
|
1145
|
+
var runtime_1 = createCommonjsModule(function (module) {
|
|
1146
|
+
/**
|
|
1147
|
+
* Copyright (c) 2014-present, Facebook, Inc.
|
|
1148
|
+
*
|
|
1149
|
+
* This source code is licensed under the MIT license found in the
|
|
1150
|
+
* LICENSE file in the root directory of this source tree.
|
|
1151
|
+
*/
|
|
1172
1152
|
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1153
|
+
var runtime = (function (exports) {
|
|
1154
|
+
|
|
1155
|
+
var Op = Object.prototype;
|
|
1156
|
+
var hasOwn = Op.hasOwnProperty;
|
|
1157
|
+
var undefined$1; // More compressible than void 0.
|
|
1158
|
+
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
1159
|
+
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
1160
|
+
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
1161
|
+
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
1162
|
+
|
|
1163
|
+
function define(obj, key, value) {
|
|
1164
|
+
Object.defineProperty(obj, key, {
|
|
1165
|
+
value: value,
|
|
1166
|
+
enumerable: true,
|
|
1167
|
+
configurable: true,
|
|
1168
|
+
writable: true
|
|
1169
|
+
});
|
|
1170
|
+
return obj[key];
|
|
1171
|
+
}
|
|
1172
|
+
try {
|
|
1173
|
+
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
|
1174
|
+
define({}, "");
|
|
1175
|
+
} catch (err) {
|
|
1176
|
+
define = function(obj, key, value) {
|
|
1177
|
+
return obj[key] = value;
|
|
1178
|
+
};
|
|
1179
|
+
}
|
|
1181
1180
|
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
// .throw, and .return methods.
|
|
1181
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
1182
|
+
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
1183
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
1184
|
+
var generator = Object.create(protoGenerator.prototype);
|
|
1185
|
+
var context = new Context(tryLocsList || []);
|
|
1188
1186
|
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1187
|
+
// The ._invoke method unifies the implementations of the .next,
|
|
1188
|
+
// .throw, and .return methods.
|
|
1189
|
+
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
1192
1190
|
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
type: "throw",
|
|
1213
|
-
arg: err
|
|
1214
|
-
};
|
|
1215
|
-
}
|
|
1191
|
+
return generator;
|
|
1192
|
+
}
|
|
1193
|
+
exports.wrap = wrap;
|
|
1194
|
+
|
|
1195
|
+
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
1196
|
+
// record like context.tryEntries[i].completion. This interface could
|
|
1197
|
+
// have been (and was previously) designed to take a closure to be
|
|
1198
|
+
// invoked without arguments, but in all the cases we care about we
|
|
1199
|
+
// already have an existing method we want to call, so there's no need
|
|
1200
|
+
// to create a new function object. We can even get away with assuming
|
|
1201
|
+
// the method takes exactly one argument, since that happens to be true
|
|
1202
|
+
// in every case, so we don't have to touch the arguments object. The
|
|
1203
|
+
// only additional allocation required is the completion record, which
|
|
1204
|
+
// has a stable shape and so hopefully should be cheap to allocate.
|
|
1205
|
+
function tryCatch(fn, obj, arg) {
|
|
1206
|
+
try {
|
|
1207
|
+
return { type: "normal", arg: fn.call(obj, arg) };
|
|
1208
|
+
} catch (err) {
|
|
1209
|
+
return { type: "throw", arg: err };
|
|
1216
1210
|
}
|
|
1211
|
+
}
|
|
1217
1212
|
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1213
|
+
var GenStateSuspendedStart = "suspendedStart";
|
|
1214
|
+
var GenStateSuspendedYield = "suspendedYield";
|
|
1215
|
+
var GenStateExecuting = "executing";
|
|
1216
|
+
var GenStateCompleted = "completed";
|
|
1217
|
+
|
|
1218
|
+
// Returning this object from the innerFn has the same effect as
|
|
1219
|
+
// breaking out of the dispatch switch statement.
|
|
1220
|
+
var ContinueSentinel = {};
|
|
1221
|
+
|
|
1222
|
+
// Dummy constructor functions that we use as the .constructor and
|
|
1223
|
+
// .constructor.prototype properties for functions that return Generator
|
|
1224
|
+
// objects. For full spec compliance, you may wish to configure your
|
|
1225
|
+
// minifier not to mangle the names of these two functions.
|
|
1226
|
+
function Generator() {}
|
|
1227
|
+
function GeneratorFunction() {}
|
|
1228
|
+
function GeneratorFunctionPrototype() {}
|
|
1229
|
+
|
|
1230
|
+
// This is a polyfill for %IteratorPrototype% for environments that
|
|
1231
|
+
// don't natively support it.
|
|
1232
|
+
var IteratorPrototype = {};
|
|
1233
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
1234
|
+
return this;
|
|
1235
|
+
});
|
|
1238
1236
|
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1237
|
+
var getProto = Object.getPrototypeOf;
|
|
1238
|
+
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
1239
|
+
if (NativeIteratorPrototype &&
|
|
1240
|
+
NativeIteratorPrototype !== Op &&
|
|
1241
|
+
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
1242
|
+
// This environment has a native %IteratorPrototype%; use it instead
|
|
1243
|
+
// of the polyfill.
|
|
1244
|
+
IteratorPrototype = NativeIteratorPrototype;
|
|
1245
|
+
}
|
|
1242
1246
|
|
|
1243
|
-
|
|
1244
|
-
|
|
1247
|
+
var Gp = GeneratorFunctionPrototype.prototype =
|
|
1248
|
+
Generator.prototype = Object.create(IteratorPrototype);
|
|
1249
|
+
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
|
1250
|
+
define(Gp, "constructor", GeneratorFunctionPrototype);
|
|
1251
|
+
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
|
1252
|
+
GeneratorFunction.displayName = define(
|
|
1253
|
+
GeneratorFunctionPrototype,
|
|
1254
|
+
toStringTagSymbol,
|
|
1255
|
+
"GeneratorFunction"
|
|
1256
|
+
);
|
|
1245
1257
|
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1258
|
+
// Helper for defining the .next, .throw, and .return methods of the
|
|
1259
|
+
// Iterator interface in terms of a single ._invoke method.
|
|
1260
|
+
function defineIteratorMethods(prototype) {
|
|
1261
|
+
["next", "throw", "return"].forEach(function(method) {
|
|
1262
|
+
define(prototype, method, function(arg) {
|
|
1263
|
+
return this._invoke(method, arg);
|
|
1264
|
+
});
|
|
1265
|
+
});
|
|
1266
|
+
}
|
|
1251
1267
|
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1268
|
+
exports.isGeneratorFunction = function(genFun) {
|
|
1269
|
+
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
1270
|
+
return ctor
|
|
1271
|
+
? ctor === GeneratorFunction ||
|
|
1272
|
+
// For the native GeneratorFunction constructor, the best we can
|
|
1273
|
+
// do is to check its .name property.
|
|
1274
|
+
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
1275
|
+
: false;
|
|
1276
|
+
};
|
|
1257
1277
|
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1278
|
+
exports.mark = function(genFun) {
|
|
1279
|
+
if (Object.setPrototypeOf) {
|
|
1280
|
+
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
1281
|
+
} else {
|
|
1282
|
+
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
1283
|
+
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
1264
1284
|
}
|
|
1285
|
+
genFun.prototype = Object.create(Gp);
|
|
1286
|
+
return genFun;
|
|
1287
|
+
};
|
|
1265
1288
|
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
};
|
|
1289
|
+
// Within the body of any async function, `await x` is transformed to
|
|
1290
|
+
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
1291
|
+
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
1292
|
+
// meant to be awaited.
|
|
1293
|
+
exports.awrap = function(arg) {
|
|
1294
|
+
return { __await: arg };
|
|
1295
|
+
};
|
|
1272
1296
|
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1297
|
+
function AsyncIterator(generator, PromiseImpl) {
|
|
1298
|
+
function invoke(method, arg, resolve, reject) {
|
|
1299
|
+
var record = tryCatch(generator[method], generator, arg);
|
|
1300
|
+
if (record.type === "throw") {
|
|
1301
|
+
reject(record.arg);
|
|
1276
1302
|
} else {
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
// meant to be awaited.
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
exports.awrap = function (arg) {
|
|
1290
|
-
return {
|
|
1291
|
-
__await: arg
|
|
1292
|
-
};
|
|
1293
|
-
};
|
|
1294
|
-
|
|
1295
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
1296
|
-
function invoke(method, arg, resolve, reject) {
|
|
1297
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
1298
|
-
|
|
1299
|
-
if (record.type === "throw") {
|
|
1300
|
-
reject(record.arg);
|
|
1301
|
-
} else {
|
|
1302
|
-
var result = record.arg;
|
|
1303
|
-
var value = result.value;
|
|
1304
|
-
|
|
1305
|
-
if (value && typeof value === "object" && hasOwn.call(value, "__await")) {
|
|
1306
|
-
return PromiseImpl.resolve(value.__await).then(function (value) {
|
|
1307
|
-
invoke("next", value, resolve, reject);
|
|
1308
|
-
}, function (err) {
|
|
1309
|
-
invoke("throw", err, resolve, reject);
|
|
1310
|
-
});
|
|
1311
|
-
}
|
|
1312
|
-
|
|
1313
|
-
return PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
1314
|
-
// When a yielded Promise is resolved, its final value becomes
|
|
1315
|
-
// the .value of the Promise<{value,done}> result for the
|
|
1316
|
-
// current iteration.
|
|
1317
|
-
result.value = unwrapped;
|
|
1318
|
-
resolve(result);
|
|
1319
|
-
}, function (error) {
|
|
1320
|
-
// If a rejected Promise was yielded, throw the rejection back
|
|
1321
|
-
// into the async generator function so it can be handled there.
|
|
1322
|
-
return invoke("throw", error, resolve, reject);
|
|
1303
|
+
var result = record.arg;
|
|
1304
|
+
var value = result.value;
|
|
1305
|
+
if (value &&
|
|
1306
|
+
typeof value === "object" &&
|
|
1307
|
+
hasOwn.call(value, "__await")) {
|
|
1308
|
+
return PromiseImpl.resolve(value.__await).then(function(value) {
|
|
1309
|
+
invoke("next", value, resolve, reject);
|
|
1310
|
+
}, function(err) {
|
|
1311
|
+
invoke("throw", err, resolve, reject);
|
|
1323
1312
|
});
|
|
1324
1313
|
}
|
|
1314
|
+
|
|
1315
|
+
return PromiseImpl.resolve(value).then(function(unwrapped) {
|
|
1316
|
+
// When a yielded Promise is resolved, its final value becomes
|
|
1317
|
+
// the .value of the Promise<{value,done}> result for the
|
|
1318
|
+
// current iteration.
|
|
1319
|
+
result.value = unwrapped;
|
|
1320
|
+
resolve(result);
|
|
1321
|
+
}, function(error) {
|
|
1322
|
+
// If a rejected Promise was yielded, throw the rejection back
|
|
1323
|
+
// into the async generator function so it can be handled there.
|
|
1324
|
+
return invoke("throw", error, resolve, reject);
|
|
1325
|
+
});
|
|
1325
1326
|
}
|
|
1327
|
+
}
|
|
1326
1328
|
|
|
1327
|
-
|
|
1329
|
+
var previousPromise;
|
|
1328
1330
|
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1331
|
+
function enqueue(method, arg) {
|
|
1332
|
+
function callInvokeWithMethodAndArg() {
|
|
1333
|
+
return new PromiseImpl(function(resolve, reject) {
|
|
1334
|
+
invoke(method, arg, resolve, reject);
|
|
1335
|
+
});
|
|
1336
|
+
}
|
|
1335
1337
|
|
|
1336
|
-
|
|
1338
|
+
return previousPromise =
|
|
1339
|
+
// If enqueue has been called before, then we want to wait until
|
|
1337
1340
|
// all previous Promises have been resolved before calling invoke,
|
|
1338
1341
|
// so that results are always delivered in the correct order. If
|
|
1339
1342
|
// enqueue has not been called before, then it is important to
|
|
@@ -1345,525 +1348,554 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
1345
1348
|
// execute code before the first await. Since we implement simple
|
|
1346
1349
|
// async functions in terms of async generators, it is especially
|
|
1347
1350
|
// important to get this right, even though it requires care.
|
|
1348
|
-
previousPromise ? previousPromise.then(
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
this._invoke = enqueue;
|
|
1351
|
+
previousPromise ? previousPromise.then(
|
|
1352
|
+
callInvokeWithMethodAndArg,
|
|
1353
|
+
// Avoid propagating failures to Promises returned by later
|
|
1354
|
+
// invocations of the iterator.
|
|
1355
|
+
callInvokeWithMethodAndArg
|
|
1356
|
+
) : callInvokeWithMethodAndArg();
|
|
1356
1357
|
}
|
|
1357
1358
|
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
};
|
|
1363
|
-
|
|
1364
|
-
exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
|
|
1365
|
-
// AsyncIterator objects; they just return a Promise for the value of
|
|
1366
|
-
// the final result produced by the iterator.
|
|
1367
|
-
|
|
1368
|
-
exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
1369
|
-
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
1370
|
-
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
1371
|
-
return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
|
|
1372
|
-
: iter.next().then(function (result) {
|
|
1373
|
-
return result.done ? result.value : iter.next();
|
|
1374
|
-
});
|
|
1375
|
-
};
|
|
1359
|
+
// Define the unified helper method that is used to implement .next,
|
|
1360
|
+
// .throw, and .return (see defineIteratorMethods).
|
|
1361
|
+
this._invoke = enqueue;
|
|
1362
|
+
}
|
|
1376
1363
|
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1364
|
+
defineIteratorMethods(AsyncIterator.prototype);
|
|
1365
|
+
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
1366
|
+
return this;
|
|
1367
|
+
});
|
|
1368
|
+
exports.AsyncIterator = AsyncIterator;
|
|
1369
|
+
|
|
1370
|
+
// Note that simple async functions are implemented on top of
|
|
1371
|
+
// AsyncIterator objects; they just return a Promise for the value of
|
|
1372
|
+
// the final result produced by the iterator.
|
|
1373
|
+
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
1374
|
+
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
1375
|
+
|
|
1376
|
+
var iter = new AsyncIterator(
|
|
1377
|
+
wrap(innerFn, outerFn, self, tryLocsList),
|
|
1378
|
+
PromiseImpl
|
|
1379
|
+
);
|
|
1380
|
+
|
|
1381
|
+
return exports.isGeneratorFunction(outerFn)
|
|
1382
|
+
? iter // If outerFn is a generator, return the full iterator.
|
|
1383
|
+
: iter.next().then(function(result) {
|
|
1384
|
+
return result.done ? result.value : iter.next();
|
|
1385
|
+
});
|
|
1386
|
+
};
|
|
1383
1387
|
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
throw arg;
|
|
1387
|
-
} // Be forgiving, per 25.3.3.3.3 of the spec:
|
|
1388
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
1388
|
+
function makeInvokeMethod(innerFn, self, context) {
|
|
1389
|
+
var state = GenStateSuspendedStart;
|
|
1389
1390
|
|
|
1391
|
+
return function invoke(method, arg) {
|
|
1392
|
+
if (state === GenStateExecuting) {
|
|
1393
|
+
throw new Error("Generator is already running");
|
|
1394
|
+
}
|
|
1390
1395
|
|
|
1391
|
-
|
|
1396
|
+
if (state === GenStateCompleted) {
|
|
1397
|
+
if (method === "throw") {
|
|
1398
|
+
throw arg;
|
|
1392
1399
|
}
|
|
1393
1400
|
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
var delegate = context.delegate;
|
|
1401
|
+
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
1402
|
+
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
1403
|
+
return doneResult();
|
|
1404
|
+
}
|
|
1399
1405
|
|
|
1400
|
-
|
|
1401
|
-
|
|
1406
|
+
context.method = method;
|
|
1407
|
+
context.arg = arg;
|
|
1402
1408
|
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1409
|
+
while (true) {
|
|
1410
|
+
var delegate = context.delegate;
|
|
1411
|
+
if (delegate) {
|
|
1412
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
1413
|
+
if (delegateResult) {
|
|
1414
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
1415
|
+
return delegateResult;
|
|
1407
1416
|
}
|
|
1417
|
+
}
|
|
1408
1418
|
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
} else if (context.method === "throw") {
|
|
1414
|
-
if (state === GenStateSuspendedStart) {
|
|
1415
|
-
state = GenStateCompleted;
|
|
1416
|
-
throw context.arg;
|
|
1417
|
-
}
|
|
1419
|
+
if (context.method === "next") {
|
|
1420
|
+
// Setting context._sent for legacy support of Babel's
|
|
1421
|
+
// function.sent implementation.
|
|
1422
|
+
context.sent = context._sent = context.arg;
|
|
1418
1423
|
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1424
|
+
} else if (context.method === "throw") {
|
|
1425
|
+
if (state === GenStateSuspendedStart) {
|
|
1426
|
+
state = GenStateCompleted;
|
|
1427
|
+
throw context.arg;
|
|
1422
1428
|
}
|
|
1423
1429
|
|
|
1424
|
-
|
|
1425
|
-
var record = tryCatch(innerFn, self, context);
|
|
1430
|
+
context.dispatchException(context.arg);
|
|
1426
1431
|
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
state = context.done ? GenStateCompleted : GenStateSuspendedYield;
|
|
1432
|
+
} else if (context.method === "return") {
|
|
1433
|
+
context.abrupt("return", context.arg);
|
|
1434
|
+
}
|
|
1431
1435
|
|
|
1432
|
-
|
|
1433
|
-
continue;
|
|
1434
|
-
}
|
|
1436
|
+
state = GenStateExecuting;
|
|
1435
1437
|
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1438
|
+
var record = tryCatch(innerFn, self, context);
|
|
1439
|
+
if (record.type === "normal") {
|
|
1440
|
+
// If an exception is thrown from innerFn, we leave state ===
|
|
1441
|
+
// GenStateExecuting and loop back for another invocation.
|
|
1442
|
+
state = context.done
|
|
1443
|
+
? GenStateCompleted
|
|
1444
|
+
: GenStateSuspendedYield;
|
|
1443
1445
|
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
}
|
|
1447
|
-
}
|
|
1448
|
-
};
|
|
1449
|
-
} // Call delegate.iterator[context.method](context.arg) and handle the
|
|
1450
|
-
// result, either by returning a { value, done } result from the
|
|
1451
|
-
// delegate iterator, or by modifying context.method and context.arg,
|
|
1452
|
-
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
1456
|
-
var method = delegate.iterator[context.method];
|
|
1457
|
-
|
|
1458
|
-
if (method === undefined$1) {
|
|
1459
|
-
// A .throw or .return when the delegate iterator has no .throw
|
|
1460
|
-
// method always terminates the yield* loop.
|
|
1461
|
-
context.delegate = null;
|
|
1462
|
-
|
|
1463
|
-
if (context.method === "throw") {
|
|
1464
|
-
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
1465
|
-
if (delegate.iterator["return"]) {
|
|
1466
|
-
// If the delegate iterator has a return method, give it a
|
|
1467
|
-
// chance to clean up.
|
|
1468
|
-
context.method = "return";
|
|
1469
|
-
context.arg = undefined$1;
|
|
1470
|
-
maybeInvokeDelegate(delegate, context);
|
|
1471
|
-
|
|
1472
|
-
if (context.method === "throw") {
|
|
1473
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
|
1474
|
-
// "return" to "throw", let that override the TypeError below.
|
|
1475
|
-
return ContinueSentinel;
|
|
1476
|
-
}
|
|
1446
|
+
if (record.arg === ContinueSentinel) {
|
|
1447
|
+
continue;
|
|
1477
1448
|
}
|
|
1478
1449
|
|
|
1450
|
+
return {
|
|
1451
|
+
value: record.arg,
|
|
1452
|
+
done: context.done
|
|
1453
|
+
};
|
|
1454
|
+
|
|
1455
|
+
} else if (record.type === "throw") {
|
|
1456
|
+
state = GenStateCompleted;
|
|
1457
|
+
// Dispatch the exception by looping back around to the
|
|
1458
|
+
// context.dispatchException(context.arg) call above.
|
|
1479
1459
|
context.method = "throw";
|
|
1480
|
-
context.arg =
|
|
1460
|
+
context.arg = record.arg;
|
|
1481
1461
|
}
|
|
1482
|
-
|
|
1483
|
-
return ContinueSentinel;
|
|
1484
1462
|
}
|
|
1463
|
+
};
|
|
1464
|
+
}
|
|
1485
1465
|
|
|
1486
|
-
|
|
1466
|
+
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
1467
|
+
// result, either by returning a { value, done } result from the
|
|
1468
|
+
// delegate iterator, or by modifying context.method and context.arg,
|
|
1469
|
+
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
1470
|
+
function maybeInvokeDelegate(delegate, context) {
|
|
1471
|
+
var method = delegate.iterator[context.method];
|
|
1472
|
+
if (method === undefined$1) {
|
|
1473
|
+
// A .throw or .return when the delegate iterator has no .throw
|
|
1474
|
+
// method always terminates the yield* loop.
|
|
1475
|
+
context.delegate = null;
|
|
1487
1476
|
|
|
1488
|
-
if (
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1477
|
+
if (context.method === "throw") {
|
|
1478
|
+
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
1479
|
+
if (delegate.iterator["return"]) {
|
|
1480
|
+
// If the delegate iterator has a return method, give it a
|
|
1481
|
+
// chance to clean up.
|
|
1482
|
+
context.method = "return";
|
|
1483
|
+
context.arg = undefined$1;
|
|
1484
|
+
maybeInvokeDelegate(delegate, context);
|
|
1494
1485
|
|
|
1495
|
-
|
|
1486
|
+
if (context.method === "throw") {
|
|
1487
|
+
// If maybeInvokeDelegate(context) changed context.method from
|
|
1488
|
+
// "return" to "throw", let that override the TypeError below.
|
|
1489
|
+
return ContinueSentinel;
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1496
1492
|
|
|
1497
|
-
if (!info) {
|
|
1498
1493
|
context.method = "throw";
|
|
1499
|
-
context.arg = new TypeError(
|
|
1500
|
-
|
|
1501
|
-
return ContinueSentinel;
|
|
1494
|
+
context.arg = new TypeError(
|
|
1495
|
+
"The iterator does not provide a 'throw' method");
|
|
1502
1496
|
}
|
|
1503
1497
|
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
// variable specified by delegate.resultName (see delegateYield).
|
|
1507
|
-
context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).
|
|
1498
|
+
return ContinueSentinel;
|
|
1499
|
+
}
|
|
1508
1500
|
|
|
1509
|
-
|
|
1510
|
-
// exception, let the outer generator proceed normally. If
|
|
1511
|
-
// context.method was "next", forget context.arg since it has been
|
|
1512
|
-
// "consumed" by the delegate iterator. If context.method was
|
|
1513
|
-
// "return", allow the original .return call to continue in the
|
|
1514
|
-
// outer generator.
|
|
1501
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
1515
1502
|
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
return info;
|
|
1523
|
-
} // The delegate iterator is finished, so forget it and continue with
|
|
1524
|
-
// the outer generator.
|
|
1503
|
+
if (record.type === "throw") {
|
|
1504
|
+
context.method = "throw";
|
|
1505
|
+
context.arg = record.arg;
|
|
1506
|
+
context.delegate = null;
|
|
1507
|
+
return ContinueSentinel;
|
|
1508
|
+
}
|
|
1525
1509
|
|
|
1510
|
+
var info = record.arg;
|
|
1526
1511
|
|
|
1512
|
+
if (! info) {
|
|
1513
|
+
context.method = "throw";
|
|
1514
|
+
context.arg = new TypeError("iterator result is not an object");
|
|
1527
1515
|
context.delegate = null;
|
|
1528
1516
|
return ContinueSentinel;
|
|
1529
|
-
}
|
|
1530
|
-
// unified ._invoke helper method.
|
|
1517
|
+
}
|
|
1531
1518
|
|
|
1519
|
+
if (info.done) {
|
|
1520
|
+
// Assign the result of the finished delegate to the temporary
|
|
1521
|
+
// variable specified by delegate.resultName (see delegateYield).
|
|
1522
|
+
context[delegate.resultName] = info.value;
|
|
1523
|
+
|
|
1524
|
+
// Resume execution at the desired location (see delegateYield).
|
|
1525
|
+
context.next = delegate.nextLoc;
|
|
1526
|
+
|
|
1527
|
+
// If context.method was "throw" but the delegate handled the
|
|
1528
|
+
// exception, let the outer generator proceed normally. If
|
|
1529
|
+
// context.method was "next", forget context.arg since it has been
|
|
1530
|
+
// "consumed" by the delegate iterator. If context.method was
|
|
1531
|
+
// "return", allow the original .return call to continue in the
|
|
1532
|
+
// outer generator.
|
|
1533
|
+
if (context.method !== "return") {
|
|
1534
|
+
context.method = "next";
|
|
1535
|
+
context.arg = undefined$1;
|
|
1536
|
+
}
|
|
1532
1537
|
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
// object to not be returned from this call. This ensures that doesn't happen.
|
|
1538
|
-
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
1538
|
+
} else {
|
|
1539
|
+
// Re-yield the result returned by the delegate method.
|
|
1540
|
+
return info;
|
|
1541
|
+
}
|
|
1539
1542
|
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
+
// The delegate iterator is finished, so forget it and continue with
|
|
1544
|
+
// the outer generator.
|
|
1545
|
+
context.delegate = null;
|
|
1546
|
+
return ContinueSentinel;
|
|
1547
|
+
}
|
|
1543
1548
|
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1549
|
+
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
1550
|
+
// unified ._invoke helper method.
|
|
1551
|
+
defineIteratorMethods(Gp);
|
|
1547
1552
|
|
|
1548
|
-
|
|
1549
|
-
var entry = {
|
|
1550
|
-
tryLoc: locs[0]
|
|
1551
|
-
};
|
|
1553
|
+
define(Gp, toStringTagSymbol, "Generator");
|
|
1552
1554
|
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1555
|
+
// A Generator should always return itself as the iterator object when the
|
|
1556
|
+
// @@iterator function is called on it. Some browsers' implementations of the
|
|
1557
|
+
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
1558
|
+
// object to not be returned from this call. This ensures that doesn't happen.
|
|
1559
|
+
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
1560
|
+
define(Gp, iteratorSymbol, function() {
|
|
1561
|
+
return this;
|
|
1562
|
+
});
|
|
1556
1563
|
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
}
|
|
1564
|
+
define(Gp, "toString", function() {
|
|
1565
|
+
return "[object Generator]";
|
|
1566
|
+
});
|
|
1561
1567
|
|
|
1562
|
-
|
|
1563
|
-
}
|
|
1568
|
+
function pushTryEntry(locs) {
|
|
1569
|
+
var entry = { tryLoc: locs[0] };
|
|
1564
1570
|
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
record.type = "normal";
|
|
1568
|
-
delete record.arg;
|
|
1569
|
-
entry.completion = record;
|
|
1571
|
+
if (1 in locs) {
|
|
1572
|
+
entry.catchLoc = locs[1];
|
|
1570
1573
|
}
|
|
1571
1574
|
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
// locations where there is no enclosing try statement.
|
|
1576
|
-
this.tryEntries = [{
|
|
1577
|
-
tryLoc: "root"
|
|
1578
|
-
}];
|
|
1579
|
-
tryLocsList.forEach(pushTryEntry, this);
|
|
1580
|
-
this.reset(true);
|
|
1575
|
+
if (2 in locs) {
|
|
1576
|
+
entry.finallyLoc = locs[2];
|
|
1577
|
+
entry.afterLoc = locs[3];
|
|
1581
1578
|
}
|
|
1582
1579
|
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
for (var key in object) {
|
|
1587
|
-
keys.push(key);
|
|
1588
|
-
}
|
|
1589
|
-
|
|
1590
|
-
keys.reverse(); // Rather than returning an object with a next method, we keep
|
|
1591
|
-
// things simple and return the next function itself.
|
|
1580
|
+
this.tryEntries.push(entry);
|
|
1581
|
+
}
|
|
1592
1582
|
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1583
|
+
function resetTryEntry(entry) {
|
|
1584
|
+
var record = entry.completion || {};
|
|
1585
|
+
record.type = "normal";
|
|
1586
|
+
delete record.arg;
|
|
1587
|
+
entry.completion = record;
|
|
1588
|
+
}
|
|
1596
1589
|
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1590
|
+
function Context(tryLocsList) {
|
|
1591
|
+
// The root entry object (effectively a try statement without a catch
|
|
1592
|
+
// or a finally block) gives us a place to store values thrown from
|
|
1593
|
+
// locations where there is no enclosing try statement.
|
|
1594
|
+
this.tryEntries = [{ tryLoc: "root" }];
|
|
1595
|
+
tryLocsList.forEach(pushTryEntry, this);
|
|
1596
|
+
this.reset(true);
|
|
1597
|
+
}
|
|
1605
1598
|
|
|
1599
|
+
exports.keys = function(object) {
|
|
1600
|
+
var keys = [];
|
|
1601
|
+
for (var key in object) {
|
|
1602
|
+
keys.push(key);
|
|
1603
|
+
}
|
|
1604
|
+
keys.reverse();
|
|
1605
|
+
|
|
1606
|
+
// Rather than returning an object with a next method, we keep
|
|
1607
|
+
// things simple and return the next function itself.
|
|
1608
|
+
return function next() {
|
|
1609
|
+
while (keys.length) {
|
|
1610
|
+
var key = keys.pop();
|
|
1611
|
+
if (key in object) {
|
|
1612
|
+
next.value = key;
|
|
1613
|
+
next.done = false;
|
|
1614
|
+
return next;
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1606
1617
|
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1618
|
+
// To avoid creating an additional object, we just hang the .value
|
|
1619
|
+
// and .done properties off the next function object itself. This
|
|
1620
|
+
// also ensures that the minifier will not anonymize the function.
|
|
1621
|
+
next.done = true;
|
|
1622
|
+
return next;
|
|
1610
1623
|
};
|
|
1624
|
+
};
|
|
1611
1625
|
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
}
|
|
1626
|
+
function values(iterable) {
|
|
1627
|
+
if (iterable) {
|
|
1628
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
|
1629
|
+
if (iteratorMethod) {
|
|
1630
|
+
return iteratorMethod.call(iterable);
|
|
1631
|
+
}
|
|
1619
1632
|
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1633
|
+
if (typeof iterable.next === "function") {
|
|
1634
|
+
return iterable;
|
|
1635
|
+
}
|
|
1623
1636
|
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
return next;
|
|
1632
|
-
}
|
|
1637
|
+
if (!isNaN(iterable.length)) {
|
|
1638
|
+
var i = -1, next = function next() {
|
|
1639
|
+
while (++i < iterable.length) {
|
|
1640
|
+
if (hasOwn.call(iterable, i)) {
|
|
1641
|
+
next.value = iterable[i];
|
|
1642
|
+
next.done = false;
|
|
1643
|
+
return next;
|
|
1633
1644
|
}
|
|
1645
|
+
}
|
|
1634
1646
|
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
return next;
|
|
1638
|
-
};
|
|
1639
|
-
|
|
1640
|
-
return next.next = next;
|
|
1641
|
-
}
|
|
1642
|
-
} // Return an iterator with no values.
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
return {
|
|
1646
|
-
next: doneResult
|
|
1647
|
-
};
|
|
1648
|
-
}
|
|
1647
|
+
next.value = undefined$1;
|
|
1648
|
+
next.done = true;
|
|
1649
1649
|
|
|
1650
|
-
|
|
1650
|
+
return next;
|
|
1651
|
+
};
|
|
1651
1652
|
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
value: undefined$1,
|
|
1655
|
-
done: true
|
|
1656
|
-
};
|
|
1653
|
+
return next.next = next;
|
|
1654
|
+
}
|
|
1657
1655
|
}
|
|
1658
1656
|
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
this.next = 0; // Resetting context._sent for legacy support of Babel's
|
|
1664
|
-
// function.sent implementation.
|
|
1657
|
+
// Return an iterator with no values.
|
|
1658
|
+
return { next: doneResult };
|
|
1659
|
+
}
|
|
1660
|
+
exports.values = values;
|
|
1665
1661
|
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
this.method = "next";
|
|
1670
|
-
this.arg = undefined$1;
|
|
1671
|
-
this.tryEntries.forEach(resetTryEntry);
|
|
1662
|
+
function doneResult() {
|
|
1663
|
+
return { value: undefined$1, done: true };
|
|
1664
|
+
}
|
|
1672
1665
|
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1666
|
+
Context.prototype = {
|
|
1667
|
+
constructor: Context,
|
|
1668
|
+
|
|
1669
|
+
reset: function(skipTempReset) {
|
|
1670
|
+
this.prev = 0;
|
|
1671
|
+
this.next = 0;
|
|
1672
|
+
// Resetting context._sent for legacy support of Babel's
|
|
1673
|
+
// function.sent implementation.
|
|
1674
|
+
this.sent = this._sent = undefined$1;
|
|
1675
|
+
this.done = false;
|
|
1676
|
+
this.delegate = null;
|
|
1677
|
+
|
|
1678
|
+
this.method = "next";
|
|
1679
|
+
this.arg = undefined$1;
|
|
1680
|
+
|
|
1681
|
+
this.tryEntries.forEach(resetTryEntry);
|
|
1682
|
+
|
|
1683
|
+
if (!skipTempReset) {
|
|
1684
|
+
for (var name in this) {
|
|
1685
|
+
// Not sure about the optimal order of these conditions:
|
|
1686
|
+
if (name.charAt(0) === "t" &&
|
|
1687
|
+
hasOwn.call(this, name) &&
|
|
1688
|
+
!isNaN(+name.slice(1))) {
|
|
1689
|
+
this[name] = undefined$1;
|
|
1679
1690
|
}
|
|
1680
1691
|
}
|
|
1681
|
-
}
|
|
1682
|
-
|
|
1683
|
-
this.done = true;
|
|
1684
|
-
var rootEntry = this.tryEntries[0];
|
|
1685
|
-
var rootRecord = rootEntry.completion;
|
|
1692
|
+
}
|
|
1693
|
+
},
|
|
1686
1694
|
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
}
|
|
1695
|
+
stop: function() {
|
|
1696
|
+
this.done = true;
|
|
1690
1697
|
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
}
|
|
1698
|
+
var rootEntry = this.tryEntries[0];
|
|
1699
|
+
var rootRecord = rootEntry.completion;
|
|
1700
|
+
if (rootRecord.type === "throw") {
|
|
1701
|
+
throw rootRecord.arg;
|
|
1702
|
+
}
|
|
1697
1703
|
|
|
1698
|
-
|
|
1704
|
+
return this.rval;
|
|
1705
|
+
},
|
|
1699
1706
|
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1707
|
+
dispatchException: function(exception) {
|
|
1708
|
+
if (this.done) {
|
|
1709
|
+
throw exception;
|
|
1710
|
+
}
|
|
1704
1711
|
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
}
|
|
1712
|
+
var context = this;
|
|
1713
|
+
function handle(loc, caught) {
|
|
1714
|
+
record.type = "throw";
|
|
1715
|
+
record.arg = exception;
|
|
1716
|
+
context.next = loc;
|
|
1711
1717
|
|
|
1712
|
-
|
|
1718
|
+
if (caught) {
|
|
1719
|
+
// If the dispatched exception was caught by a catch block,
|
|
1720
|
+
// then let that catch block handle the exception normally.
|
|
1721
|
+
context.method = "next";
|
|
1722
|
+
context.arg = undefined$1;
|
|
1713
1723
|
}
|
|
1714
1724
|
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
var record = entry.completion;
|
|
1725
|
+
return !! caught;
|
|
1726
|
+
}
|
|
1718
1727
|
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
// throw the exception.
|
|
1723
|
-
return handle("end");
|
|
1724
|
-
}
|
|
1728
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
1729
|
+
var entry = this.tryEntries[i];
|
|
1730
|
+
var record = entry.completion;
|
|
1725
1731
|
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1732
|
+
if (entry.tryLoc === "root") {
|
|
1733
|
+
// Exception thrown outside of any try block that could handle
|
|
1734
|
+
// it, so set the completion value of the entire function to
|
|
1735
|
+
// throw the exception.
|
|
1736
|
+
return handle("end");
|
|
1737
|
+
}
|
|
1729
1738
|
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
}
|
|
1740
|
-
} else if (hasFinally) {
|
|
1741
|
-
if (this.prev < entry.finallyLoc) {
|
|
1742
|
-
return handle(entry.finallyLoc);
|
|
1743
|
-
}
|
|
1744
|
-
} else {
|
|
1745
|
-
throw new Error("try statement without catch or finally");
|
|
1739
|
+
if (entry.tryLoc <= this.prev) {
|
|
1740
|
+
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
1741
|
+
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
1742
|
+
|
|
1743
|
+
if (hasCatch && hasFinally) {
|
|
1744
|
+
if (this.prev < entry.catchLoc) {
|
|
1745
|
+
return handle(entry.catchLoc, true);
|
|
1746
|
+
} else if (this.prev < entry.finallyLoc) {
|
|
1747
|
+
return handle(entry.finallyLoc);
|
|
1746
1748
|
}
|
|
1747
|
-
}
|
|
1748
|
-
}
|
|
1749
|
-
},
|
|
1750
|
-
abrupt: function abrupt(type, arg) {
|
|
1751
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
1752
|
-
var entry = this.tryEntries[i];
|
|
1753
1749
|
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1750
|
+
} else if (hasCatch) {
|
|
1751
|
+
if (this.prev < entry.catchLoc) {
|
|
1752
|
+
return handle(entry.catchLoc, true);
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
} else if (hasFinally) {
|
|
1756
|
+
if (this.prev < entry.finallyLoc) {
|
|
1757
|
+
return handle(entry.finallyLoc);
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
} else {
|
|
1761
|
+
throw new Error("try statement without catch or finally");
|
|
1757
1762
|
}
|
|
1758
1763
|
}
|
|
1764
|
+
}
|
|
1765
|
+
},
|
|
1759
1766
|
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1767
|
+
abrupt: function(type, arg) {
|
|
1768
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
1769
|
+
var entry = this.tryEntries[i];
|
|
1770
|
+
if (entry.tryLoc <= this.prev &&
|
|
1771
|
+
hasOwn.call(entry, "finallyLoc") &&
|
|
1772
|
+
this.prev < entry.finallyLoc) {
|
|
1773
|
+
var finallyEntry = entry;
|
|
1774
|
+
break;
|
|
1764
1775
|
}
|
|
1776
|
+
}
|
|
1765
1777
|
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1778
|
+
if (finallyEntry &&
|
|
1779
|
+
(type === "break" ||
|
|
1780
|
+
type === "continue") &&
|
|
1781
|
+
finallyEntry.tryLoc <= arg &&
|
|
1782
|
+
arg <= finallyEntry.finallyLoc) {
|
|
1783
|
+
// Ignore the finally entry if control is not jumping to a
|
|
1784
|
+
// location outside the try/catch block.
|
|
1785
|
+
finallyEntry = null;
|
|
1786
|
+
}
|
|
1769
1787
|
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
return ContinueSentinel;
|
|
1774
|
-
}
|
|
1788
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
|
1789
|
+
record.type = type;
|
|
1790
|
+
record.arg = arg;
|
|
1775
1791
|
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
}
|
|
1792
|
+
if (finallyEntry) {
|
|
1793
|
+
this.method = "next";
|
|
1794
|
+
this.next = finallyEntry.finallyLoc;
|
|
1795
|
+
return ContinueSentinel;
|
|
1796
|
+
}
|
|
1782
1797
|
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
} else if (record.type === "return") {
|
|
1786
|
-
this.rval = this.arg = record.arg;
|
|
1787
|
-
this.method = "return";
|
|
1788
|
-
this.next = "end";
|
|
1789
|
-
} else if (record.type === "normal" && afterLoc) {
|
|
1790
|
-
this.next = afterLoc;
|
|
1791
|
-
}
|
|
1798
|
+
return this.complete(record);
|
|
1799
|
+
},
|
|
1792
1800
|
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
var entry = this.tryEntries[i];
|
|
1801
|
+
complete: function(record, afterLoc) {
|
|
1802
|
+
if (record.type === "throw") {
|
|
1803
|
+
throw record.arg;
|
|
1804
|
+
}
|
|
1798
1805
|
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
"
|
|
1807
|
-
|
|
1808
|
-
|
|
1806
|
+
if (record.type === "break" ||
|
|
1807
|
+
record.type === "continue") {
|
|
1808
|
+
this.next = record.arg;
|
|
1809
|
+
} else if (record.type === "return") {
|
|
1810
|
+
this.rval = this.arg = record.arg;
|
|
1811
|
+
this.method = "return";
|
|
1812
|
+
this.next = "end";
|
|
1813
|
+
} else if (record.type === "normal" && afterLoc) {
|
|
1814
|
+
this.next = afterLoc;
|
|
1815
|
+
}
|
|
1809
1816
|
|
|
1810
|
-
|
|
1811
|
-
|
|
1817
|
+
return ContinueSentinel;
|
|
1818
|
+
},
|
|
1812
1819
|
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1820
|
+
finish: function(finallyLoc) {
|
|
1821
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
1822
|
+
var entry = this.tryEntries[i];
|
|
1823
|
+
if (entry.finallyLoc === finallyLoc) {
|
|
1824
|
+
this.complete(entry.completion, entry.afterLoc);
|
|
1825
|
+
resetTryEntry(entry);
|
|
1826
|
+
return ContinueSentinel;
|
|
1827
|
+
}
|
|
1828
|
+
}
|
|
1829
|
+
},
|
|
1817
1830
|
|
|
1818
|
-
|
|
1831
|
+
"catch": function(tryLoc) {
|
|
1832
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
1833
|
+
var entry = this.tryEntries[i];
|
|
1834
|
+
if (entry.tryLoc === tryLoc) {
|
|
1835
|
+
var record = entry.completion;
|
|
1836
|
+
if (record.type === "throw") {
|
|
1837
|
+
var thrown = record.arg;
|
|
1838
|
+
resetTryEntry(entry);
|
|
1819
1839
|
}
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1840
|
+
return thrown;
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1823
1843
|
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
iterator: values(iterable),
|
|
1829
|
-
resultName: resultName,
|
|
1830
|
-
nextLoc: nextLoc
|
|
1831
|
-
};
|
|
1844
|
+
// The context.catch method must only be called with a location
|
|
1845
|
+
// argument that corresponds to a known catch block.
|
|
1846
|
+
throw new Error("illegal catch attempt");
|
|
1847
|
+
},
|
|
1832
1848
|
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1849
|
+
delegateYield: function(iterable, resultName, nextLoc) {
|
|
1850
|
+
this.delegate = {
|
|
1851
|
+
iterator: values(iterable),
|
|
1852
|
+
resultName: resultName,
|
|
1853
|
+
nextLoc: nextLoc
|
|
1854
|
+
};
|
|
1838
1855
|
|
|
1839
|
-
|
|
1856
|
+
if (this.method === "next") {
|
|
1857
|
+
// Deliberately forget the last sent value so that we don't
|
|
1858
|
+
// accidentally pass it on to the delegate.
|
|
1859
|
+
this.arg = undefined$1;
|
|
1840
1860
|
}
|
|
1841
|
-
}; // Regardless of whether this script is executing as a CommonJS module
|
|
1842
|
-
// or not, return the runtime object so that we can declare the variable
|
|
1843
|
-
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
1844
|
-
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
1845
1861
|
|
|
1846
|
-
|
|
1847
|
-
|
|
1862
|
+
return ContinueSentinel;
|
|
1863
|
+
}
|
|
1864
|
+
};
|
|
1865
|
+
|
|
1866
|
+
// Regardless of whether this script is executing as a CommonJS module
|
|
1867
|
+
// or not, return the runtime object so that we can declare the variable
|
|
1868
|
+
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
1869
|
+
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
1870
|
+
return exports;
|
|
1871
|
+
|
|
1872
|
+
}(
|
|
1873
|
+
// If this script is executing as a CommonJS module, use module.exports
|
|
1848
1874
|
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
1849
1875
|
// object. Either way, the resulting object will be used to initialize
|
|
1850
1876
|
// the regeneratorRuntime variable at the top of this file.
|
|
1851
|
-
module.exports
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1877
|
+
module.exports
|
|
1878
|
+
));
|
|
1879
|
+
|
|
1880
|
+
try {
|
|
1881
|
+
regeneratorRuntime = runtime;
|
|
1882
|
+
} catch (accidentalStrictMode) {
|
|
1883
|
+
// This module should not be running in strict mode, so the above
|
|
1884
|
+
// assignment should always work unless something is misconfigured. Just
|
|
1885
|
+
// in case runtime.js accidentally runs in strict mode, in modern engines
|
|
1886
|
+
// we can explicitly access globalThis. In older engines we can escape
|
|
1887
|
+
// strict mode using a global Function call. This could conceivably fail
|
|
1888
|
+
// if a Content Security Policy forbids using Function, but in that case
|
|
1889
|
+
// the proper solution is to fix the accidental strict mode problem. If
|
|
1890
|
+
// you've misconfigured your bundler to force strict mode and applied a
|
|
1891
|
+
// CSP to forbid Function, and you're not willing to fix either of those
|
|
1892
|
+
// problems, please detail your unique predicament in a GitHub issue.
|
|
1893
|
+
if (typeof globalThis === "object") {
|
|
1894
|
+
globalThis.regeneratorRuntime = runtime;
|
|
1895
|
+
} else {
|
|
1865
1896
|
Function("r", "regeneratorRuntime = r")(runtime);
|
|
1866
1897
|
}
|
|
1898
|
+
}
|
|
1867
1899
|
});
|
|
1868
1900
|
|
|
1869
1901
|
/* eslint-disable you-dont-need-lodash-underscore/find */
|
|
@@ -3410,37 +3442,11 @@ function UrlHyperlink(props) {
|
|
|
3410
3442
|
var sdk = useSdkContext();
|
|
3411
3443
|
var uri = props.element.data.uri;
|
|
3412
3444
|
|
|
3413
|
-
function handleClick(
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
_handleClick = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(event) {
|
|
3419
|
-
return runtime_1.wrap(function _callee$(_context) {
|
|
3420
|
-
while (1) {
|
|
3421
|
-
switch (_context.prev = _context.next) {
|
|
3422
|
-
case 0:
|
|
3423
|
-
event.preventDefault();
|
|
3424
|
-
event.stopPropagation();
|
|
3425
|
-
|
|
3426
|
-
if (editor) {
|
|
3427
|
-
_context.next = 4;
|
|
3428
|
-
break;
|
|
3429
|
-
}
|
|
3430
|
-
|
|
3431
|
-
return _context.abrupt("return");
|
|
3432
|
-
|
|
3433
|
-
case 4:
|
|
3434
|
-
addOrEditLink(editor, sdk);
|
|
3435
|
-
|
|
3436
|
-
case 5:
|
|
3437
|
-
case "end":
|
|
3438
|
-
return _context.stop();
|
|
3439
|
-
}
|
|
3440
|
-
}
|
|
3441
|
-
}, _callee);
|
|
3442
|
-
}));
|
|
3443
|
-
return _handleClick.apply(this, arguments);
|
|
3445
|
+
function handleClick(event) {
|
|
3446
|
+
event.preventDefault();
|
|
3447
|
+
event.stopPropagation();
|
|
3448
|
+
if (!editor) return;
|
|
3449
|
+
addOrEditLink(editor, sdk);
|
|
3444
3450
|
}
|
|
3445
3451
|
|
|
3446
3452
|
return /*#__PURE__*/React.createElement(f36Components.Tooltip, {
|
|
@@ -3465,37 +3471,11 @@ function EntityHyperlink(props) {
|
|
|
3465
3471
|
var target = props.element.data.target;
|
|
3466
3472
|
if (!target) return null;
|
|
3467
3473
|
|
|
3468
|
-
function handleClick(
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
_handleClick2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(event) {
|
|
3474
|
-
return runtime_1.wrap(function _callee2$(_context2) {
|
|
3475
|
-
while (1) {
|
|
3476
|
-
switch (_context2.prev = _context2.next) {
|
|
3477
|
-
case 0:
|
|
3478
|
-
event.preventDefault();
|
|
3479
|
-
event.stopPropagation();
|
|
3480
|
-
|
|
3481
|
-
if (editor) {
|
|
3482
|
-
_context2.next = 4;
|
|
3483
|
-
break;
|
|
3484
|
-
}
|
|
3485
|
-
|
|
3486
|
-
return _context2.abrupt("return");
|
|
3487
|
-
|
|
3488
|
-
case 4:
|
|
3489
|
-
addOrEditLink(editor, sdk);
|
|
3490
|
-
|
|
3491
|
-
case 5:
|
|
3492
|
-
case "end":
|
|
3493
|
-
return _context2.stop();
|
|
3494
|
-
}
|
|
3495
|
-
}
|
|
3496
|
-
}, _callee2);
|
|
3497
|
-
}));
|
|
3498
|
-
return _handleClick2.apply(this, arguments);
|
|
3474
|
+
function handleClick(event) {
|
|
3475
|
+
event.preventDefault();
|
|
3476
|
+
event.stopPropagation();
|
|
3477
|
+
if (!editor) return;
|
|
3478
|
+
addOrEditLink(editor, sdk);
|
|
3499
3479
|
}
|
|
3500
3480
|
|
|
3501
3481
|
return /*#__PURE__*/React.createElement(f36Components.Tooltip, {
|
|
@@ -3508,7 +3488,7 @@ function EntityHyperlink(props) {
|
|
|
3508
3488
|
placement: "bottom",
|
|
3509
3489
|
maxWidth: "auto"
|
|
3510
3490
|
}, /*#__PURE__*/React.createElement(f36Components.TextLink, {
|
|
3511
|
-
as: "
|
|
3491
|
+
as: "a",
|
|
3512
3492
|
onClick: handleClick,
|
|
3513
3493
|
isDisabled: isReadOnly,
|
|
3514
3494
|
className: styles$c.hyperlink,
|
|
@@ -3523,21 +3503,21 @@ function ToolbarHyperlinkButton(props) {
|
|
|
3523
3503
|
var sdk = useSdkContext();
|
|
3524
3504
|
|
|
3525
3505
|
function handleClick() {
|
|
3526
|
-
return
|
|
3506
|
+
return _handleClick.apply(this, arguments);
|
|
3527
3507
|
}
|
|
3528
3508
|
|
|
3529
|
-
function
|
|
3530
|
-
|
|
3531
|
-
return runtime_1.wrap(function
|
|
3509
|
+
function _handleClick() {
|
|
3510
|
+
_handleClick = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
|
|
3511
|
+
return runtime_1.wrap(function _callee$(_context) {
|
|
3532
3512
|
while (1) {
|
|
3533
|
-
switch (
|
|
3513
|
+
switch (_context.prev = _context.next) {
|
|
3534
3514
|
case 0:
|
|
3535
3515
|
if (editor) {
|
|
3536
|
-
|
|
3516
|
+
_context.next = 2;
|
|
3537
3517
|
break;
|
|
3538
3518
|
}
|
|
3539
3519
|
|
|
3540
|
-
return
|
|
3520
|
+
return _context.abrupt("return");
|
|
3541
3521
|
|
|
3542
3522
|
case 2:
|
|
3543
3523
|
if (isActive) {
|
|
@@ -3548,12 +3528,12 @@ function ToolbarHyperlinkButton(props) {
|
|
|
3548
3528
|
|
|
3549
3529
|
case 3:
|
|
3550
3530
|
case "end":
|
|
3551
|
-
return
|
|
3531
|
+
return _context.stop();
|
|
3552
3532
|
}
|
|
3553
3533
|
}
|
|
3554
|
-
},
|
|
3534
|
+
}, _callee);
|
|
3555
3535
|
}));
|
|
3556
|
-
return
|
|
3536
|
+
return _handleClick.apply(this, arguments);
|
|
3557
3537
|
}
|
|
3558
3538
|
|
|
3559
3539
|
if (!editor) return null;
|
|
@@ -4521,6 +4501,38 @@ function Quote(props) {
|
|
|
4521
4501
|
}), props.children);
|
|
4522
4502
|
}
|
|
4523
4503
|
|
|
4504
|
+
function toggleQuote(editor) {
|
|
4505
|
+
if (!editor.selection) return;
|
|
4506
|
+
var isActive = isBlockSelected(editor, Contentful.BLOCKS.QUOTE);
|
|
4507
|
+
slate.Editor.withoutNormalizing(editor, function () {
|
|
4508
|
+
slate.Transforms.unwrapNodes(editor, {
|
|
4509
|
+
match: function match(node) {
|
|
4510
|
+
return slate.Element.isElement(node) && node.type === Contentful.BLOCKS.QUOTE;
|
|
4511
|
+
},
|
|
4512
|
+
split: true
|
|
4513
|
+
});
|
|
4514
|
+
|
|
4515
|
+
if (!isActive) {
|
|
4516
|
+
var quote = {
|
|
4517
|
+
type: Contentful.BLOCKS.QUOTE,
|
|
4518
|
+
data: {},
|
|
4519
|
+
children: []
|
|
4520
|
+
};
|
|
4521
|
+
slate.Transforms.wrapNodes(editor, quote);
|
|
4522
|
+
}
|
|
4523
|
+
});
|
|
4524
|
+
}
|
|
4525
|
+
var onKeyDownToggleQuote = function onKeyDownToggleQuote(editor, plugin) {
|
|
4526
|
+
return function (event) {
|
|
4527
|
+
var hotkey = plugin.options.hotkey;
|
|
4528
|
+
|
|
4529
|
+
if (hotkey && isHotkey(hotkey, event)) {
|
|
4530
|
+
event.preventDefault();
|
|
4531
|
+
toggleQuote(editor);
|
|
4532
|
+
}
|
|
4533
|
+
};
|
|
4534
|
+
};
|
|
4535
|
+
|
|
4524
4536
|
function createQuotePlugin() {
|
|
4525
4537
|
var _transform;
|
|
4526
4538
|
|
|
@@ -4533,7 +4545,7 @@ function createQuotePlugin() {
|
|
|
4533
4545
|
hotkey: 'mod+shift+1'
|
|
4534
4546
|
},
|
|
4535
4547
|
handlers: {
|
|
4536
|
-
onKeyDown:
|
|
4548
|
+
onKeyDown: onKeyDownToggleQuote
|
|
4537
4549
|
},
|
|
4538
4550
|
deserializeHtml: {
|
|
4539
4551
|
rules: [{
|
|
@@ -4547,31 +4559,6 @@ function createQuotePlugin() {
|
|
|
4547
4559
|
};
|
|
4548
4560
|
}
|
|
4549
4561
|
|
|
4550
|
-
function toggleQuote(editor) {
|
|
4551
|
-
if (!editor.selection) return;
|
|
4552
|
-
var isActive = isBlockSelected(editor, Contentful.BLOCKS.QUOTE);
|
|
4553
|
-
slate.Editor.withoutNormalizing(editor, function () {
|
|
4554
|
-
slate.Transforms.unwrapNodes(editor, {
|
|
4555
|
-
match: function match(node) {
|
|
4556
|
-
return slate.Element.isElement(node) && node.type === Contentful.BLOCKS.QUOTE;
|
|
4557
|
-
},
|
|
4558
|
-
split: true
|
|
4559
|
-
});
|
|
4560
|
-
slate.Transforms.setNodes(editor, {
|
|
4561
|
-
type: isActive ? Contentful.BLOCKS.PARAGRAPH : Contentful.BLOCKS.QUOTE
|
|
4562
|
-
});
|
|
4563
|
-
|
|
4564
|
-
if (!isActive) {
|
|
4565
|
-
var quote = {
|
|
4566
|
-
type: Contentful.BLOCKS.QUOTE,
|
|
4567
|
-
data: {},
|
|
4568
|
-
children: []
|
|
4569
|
-
};
|
|
4570
|
-
slate.Transforms.wrapNodes(editor, quote);
|
|
4571
|
-
}
|
|
4572
|
-
});
|
|
4573
|
-
}
|
|
4574
|
-
|
|
4575
4562
|
function ToolbarQuoteButton(props) {
|
|
4576
4563
|
var editor = useContentfulEditor();
|
|
4577
4564
|
|