Update npm packages (73 packages including @jqhtml 2.3.36)

Update npm registry domain from privatenpm.hanson.xyz to npm.internal.hanson.xyz

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2026-02-20 11:31:28 +00:00
parent d01a6179aa
commit b5eb27a827
1690 changed files with 47348 additions and 16848 deletions

View File

@@ -100,6 +100,7 @@ const subtractSizeFrom = (total, size) => {
* @returns {Sizes} total size
*/
const sumSize = (nodes) => {
/** @type {Sizes} */
const sum = Object.create(null);
for (const node of nodes) {
addSizeTo(sum, node.size);
@@ -145,7 +146,7 @@ const isTooSmall = (size, minSize) => {
* @returns {Types} set of types that are too small
*/
const getTooSmallTypes = (size, minSize) => {
/** @typedef {Types} */
/** @type {Types} */
const types = new Set();
for (const key of Object.keys(size)) {
const s = size[key];
@@ -223,9 +224,13 @@ class Group {
* @returns {Node<T>[] | undefined} removed nodes
*/
popNodes(filter) {
/** @type {Node<T>[]} */
const newNodes = [];
/** @type {Similarities} */
const newSimilarities = [];
/** @type {Node<T>[]} */
const resultNodes = [];
/** @type {undefined | Node<T>} */
let lastNode;
for (let i = 0; i < this.nodes.length; i++) {
const node = this.nodes[i];
@@ -260,6 +265,7 @@ const getSimilarities = (nodes) => {
// calculate similarities between lexically adjacent nodes
/** @type {Similarities} */
const similarities = [];
/** @type {undefined | Node<T>} */
let last;
for (const node of nodes) {
if (last !== undefined) {
@@ -399,6 +405,7 @@ module.exports = ({ maxSize, minSize, items, getSize, getKey }) => {
// going minSize from left and right
// at least one node need to be included otherwise we get stuck
let left = 1;
/** @type {Sizes} */
const leftSize = Object.create(null);
addSizeTo(leftSize, group.nodes[0].size);
while (left < group.nodes.length && isTooSmall(leftSize, minSize)) {
@@ -406,6 +413,7 @@ module.exports = ({ maxSize, minSize, items, getSize, getKey }) => {
left++;
}
let right = group.nodes.length - 2;
/** @type {Sizes} */
const rightSize = Object.create(null);
addSizeTo(rightSize, group.nodes[group.nodes.length - 1].size);
while (right >= 0 && isTooSmall(rightSize, minSize)) {
@@ -425,6 +433,7 @@ module.exports = ({ maxSize, minSize, items, getSize, getKey }) => {
if (left - 1 > right) {
// We try to remove some problematic nodes to "fix" that
/** @type {Sizes} */
let prevSize;
if (right < group.nodes.length - left) {
subtractSizeFrom(rightSize, group.nodes[right + 1].size);
@@ -490,6 +499,7 @@ module.exports = ({ maxSize, minSize, items, getSize, getKey }) => {
// create two new groups for left and right area
// and queue them up
/** @type {Node<T>[]} */
const rightNodes = [group.nodes[right + 1]];
/** @type {Similarities} */
const rightSimilarities = [];
@@ -501,6 +511,7 @@ module.exports = ({ maxSize, minSize, items, getSize, getKey }) => {
}
queue.push(new Group(rightNodes, rightSimilarities));
/** @type {Node<T>[]} */
const leftNodes = [group.nodes[0]];
/** @type {Similarities} */
const leftSimilarities = [];
@@ -523,6 +534,7 @@ module.exports = ({ maxSize, minSize, items, getSize, getKey }) => {
});
// give every group a name
/** @type {Set<string>} */
const usedNames = new Set();
for (let i = 0; i < result.length; i++) {
const group = result[i];