1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 02:39:46 +02:00
Daniel Neto 2023-10-25 10:14:46 -03:00
parent b6d47e94c8
commit 65f15c7e46
2882 changed files with 382239 additions and 10785 deletions

View file

@ -1,5 +1,5 @@
/**
* TinyMCE version 6.6.2 (2023-08-09)
* TinyMCE version 6.7.1 (2023-10-19)
*/
(function () {
@ -48,6 +48,12 @@
const tripleEquals = (a, b) => {
return a === b;
};
function curry(fn, ...initialArgs) {
return (...restArgs) => {
const all = initialArgs.concat(restArgs);
return fn.apply(null, all);
};
}
const not = f => t => !f(t);
const never = constant(false);
@ -359,7 +365,7 @@
const firstChild = element => child(element, 0);
const lastChild = element => child(element, element.dom.childNodes.length - 1);
const ancestor = (scope, predicate, isRoot) => {
const ancestor$2 = (scope, predicate, isRoot) => {
let element = scope.dom;
const stop = isFunction(isRoot) ? isRoot : never;
while (element.parentNode) {
@ -375,7 +381,7 @@
};
const closest = (scope, predicate, isRoot) => {
const is = (s, test) => test(s);
return ClosestOrAncestor(is, ancestor, scope, predicate, isRoot);
return ClosestOrAncestor(is, ancestor$2, scope, predicate, isRoot);
};
const before$1 = (marker, element) => {
@ -1028,6 +1034,10 @@
const zeroWidth = '\uFEFF';
const isZwsp = char => char === zeroWidth;
const ancestor$1 = (scope, predicate, isRoot) => ancestor$2(scope, predicate, isRoot).isSome();
const ancestor = (element, target) => ancestor$1(element, curry(eq, target));
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.BookmarkManager');
const DOM$1 = global$3.DOM;
@ -1147,9 +1157,15 @@
if (!start && isBr(container.nextSibling)) {
container = container.nextSibling;
}
const findBlockAncestor = node => {
while (!editor.dom.isBlock(node) && node.parentNode && root !== node) {
node = node.parentNode;
}
return node;
};
const findBetterContainer = (container, forward) => {
var _a;
const walker = new global$5(container, root);
const walker = new global$5(container, findBlockAncestor(container));
const dir = forward ? 'next' : 'prev';
let node;
while (node = walker[dir]()) {
@ -1244,10 +1260,19 @@
detailStyle = detailStyle === null ? '' : detailStyle;
return sibStyle === detailStyle;
};
const getRootSearchStart = (editor, range) => {
const start = editor.selection.getStart(true);
const startPoint = getEndPointNode(editor, range, true, editor.getBody());
if (ancestor(SugarElement.fromDom(startPoint), SugarElement.fromDom(range.commonAncestorContainer))) {
return range.commonAncestorContainer;
} else {
return start;
}
};
const applyList = (editor, listName, detail) => {
const rng = editor.selection.getRng();
let listItemName = 'LI';
const root = getClosestListHost(editor, editor.selection.getStart(true));
const root = getClosestListHost(editor, getRootSearchStart(editor, rng));
const dom = editor.dom;
if (dom.getContentEditable(editor.selection.getNode()) === 'false') {
return;
@ -1334,9 +1359,27 @@
fireListEvent(editor, listToggleActionFromListName(listName), list);
}
};
const updateCustomList = (editor, list, listName, detail) => {
list.classList.forEach((cls, _, classList) => {
if (cls.startsWith('tox-')) {
classList.remove(cls);
if (classList.length === 0) {
list.removeAttribute('class');
}
}
});
if (list.nodeName !== listName) {
const newList = editor.dom.rename(list, listName);
updateListWithDetails(editor.dom, newList, detail);
fireListEvent(editor, listToggleActionFromListName(listName), newList);
} else {
updateListWithDetails(editor.dom, list, detail);
fireListEvent(editor, listToggleActionFromListName(listName), list);
}
};
const toggleMultipleLists = (editor, parentList, lists, listName, detail) => {
const parentIsList = isListNode(parentList);
if (parentIsList && parentList.nodeName === listName && !hasListStyleDetail(detail)) {
if (parentIsList && parentList.nodeName === listName && !hasListStyleDetail(detail) && !isCustomList(parentList)) {
flattenListSelection(editor);
} else {
applyList(editor, listName, detail);
@ -1345,8 +1388,9 @@
parentList,
...lists
] : lists;
const updateFunction = parentIsList && isCustomList(parentList) ? updateCustomList : updateList$1;
global$2.each(allLists, elm => {
updateList$1(editor, elm, listName, detail);
updateFunction(editor, elm, listName, detail);
});
editor.selection.setRng(resolveBookmark(bookmark));
}
@ -1363,6 +1407,16 @@
flattenListSelection(editor);
} else {
const bookmark = createBookmark(editor.selection.getRng());
if (isCustomList(parentList)) {
parentList.classList.forEach((cls, _, classList) => {
if (cls.startsWith('tox-')) {
classList.remove(cls);
if (classList.length === 0) {
parentList.removeAttribute('class');
}
}
});
}
updateListWithDetails(editor.dom, parentList, detail);
const newList = editor.dom.rename(parentList, listName);
mergeWithAdjacentLists(editor.dom, newList);
@ -1585,8 +1639,9 @@
return false;
}
editor.undoManager.transact(() => {
const parentNode = otherLi.parentNode;
removeBlock(dom, block, root);
mergeWithAdjacentLists(dom, otherLi.parentNode);
mergeWithAdjacentLists(dom, parentNode);
editor.selection.select(otherLi, true);
editor.selection.collapse(isForward);
});

File diff suppressed because one or more lines are too long