Files
klz-cables.com/.pnpm-store/v10/files/c7/bc457c78e235f1e5cbe1f6d0523ae4de921913411af0931f70b136846253e23a7f7a8892b4f2f215e9f7d0ff00c0255262d76bd2ea94cabce438a6ff1b19c6
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

63 lines
1.5 KiB
Plaintext

/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
'use strict';
var lexical = require('lexical');
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
/** @noInheritDoc */
class OverflowNode extends lexical.ElementNode {
/** @internal */
$config() {
return this.config('overflow', {
$transform(node) {
if (node.isEmpty()) {
node.remove();
}
},
extends: lexical.ElementNode
});
}
createDOM(config) {
const div = document.createElement('span');
const className = config.theme.characterLimit;
if (typeof className === 'string') {
div.className = className;
}
return div;
}
updateDOM(prevNode, dom) {
return false;
}
insertNewAfter(selection, restoreSelection = true) {
const parent = this.getParentOrThrow();
return parent.insertNewAfter(selection, restoreSelection);
}
excludeFromCopy() {
return true;
}
}
function $createOverflowNode() {
return lexical.$applyNodeReplacement(new OverflowNode());
}
function $isOverflowNode(node) {
return node instanceof OverflowNode;
}
exports.$createOverflowNode = $createOverflowNode;
exports.$isOverflowNode = $isOverflowNode;
exports.OverflowNode = OverflowNode;