+
@@ -350,8 +350,8 @@ var require_pickr_min = __commonJS({
- `), u3 = p3.interaction;
- return u3.options.find((t5) => !t5.hidden && !t5.classList.add("active")), u3.type = () => u3.options.find((t5) => t5.classList.contains("active")), p3;
+ `), u3 = p4.interaction;
+ return u3.options.find((t5) => !t5.hidden && !t5.classList.add("active")), u3.type = () => u3.options.find((t5) => t5.classList.contains("active")), p4;
})(this), t3.useAsButton && (this._root.button = t3.el), t3.container.appendChild(this._root.root);
}
_finalBuild() {
@@ -364,29 +364,29 @@ var require_pickr_min = __commonJS({
t3.useAsButton ? t3.inline && t3.el.remove() : t3.el.parentNode.replaceChild(e3.root, t3.el), t3.disabled && this.disable(), t3.comparison || (e3.button.style.transition = "none", t3.useAsButton || (e3.preview.lastColor.style.transition = "none")), this.hide();
}
_buildComponents() {
- const t3 = this, e3 = this.options.components, o3 = (t3.options.sliders || "v").repeat(2), [n3, i3] = o3.match(/^[vh]+$/g) ? o3 : [], s3 = () => this._color || (this._color = this._lastColor.clone()), r3 = { palette: $2({ element: t3._root.palette.picker, wrapper: t3._root.palette.palette, onstop: () => t3._emit("changestop", "slider", t3), onchange(o4, n4) {
+ const t3 = this, e3 = this.options.components, o3 = (t3.options.sliders || "v").repeat(2), [n3, i3] = o3.match(/^[vh]+$/g) ? o3 : [], s4 = () => this._color || (this._color = this._lastColor.clone()), r3 = { palette: $3({ element: t3._root.palette.picker, wrapper: t3._root.palette.palette, onstop: () => t3._emit("changestop", "slider", t3), onchange(o4, n4) {
if (!e3.palette)
return;
- const i4 = s3(), { _root: r4, options: a3 } = t3, { lastColor: l3, currentColor: c3 } = r4.preview;
+ const i4 = s4(), { _root: r4, options: a3 } = t3, { lastColor: l3, currentColor: c3 } = r4.preview;
t3._recalc && (i4.s = 100 * o4, i4.v = 100 - 100 * n4, i4.v < 0 && (i4.v = 0), t3._updateOutput("slider"));
- const p3 = i4.toRGBA().toString(0);
- this.element.style.background = p3, this.wrapper.style.background = `
+ const p4 = i4.toRGBA().toString(0);
+ this.element.style.background = p4, this.wrapper.style.background = `
linear-gradient(to top, rgba(0, 0, 0, ${i4.a}), transparent),
linear-gradient(to left, hsla(${i4.h}, 100%, 50%, ${i4.a}), rgba(255, 255, 255, ${i4.a}))
- `, a3.comparison ? a3.useAsButton || t3._lastColor || l3.style.setProperty("--pcr-color", p3) : (r4.button.style.setProperty("--pcr-color", p3), r4.button.classList.remove("clear"));
+ `, a3.comparison ? a3.useAsButton || t3._lastColor || l3.style.setProperty("--pcr-color", p4) : (r4.button.style.setProperty("--pcr-color", p4), r4.button.classList.remove("clear"));
const u3 = i4.toHEXA().toString();
for (const { el: e4, color: o5 } of t3._swatchColors)
e4.classList[u3 === o5.toHEXA().toString() ? "add" : "remove"]("pcr-active");
- c3.style.setProperty("--pcr-color", p3);
- } }), hue: $2({ lock: "v" === i3 ? "h" : "v", element: t3._root.hue.picker, wrapper: t3._root.hue.slider, onstop: () => t3._emit("changestop", "slider", t3), onchange(o4) {
+ c3.style.setProperty("--pcr-color", p4);
+ } }), hue: $3({ lock: "v" === i3 ? "h" : "v", element: t3._root.hue.picker, wrapper: t3._root.hue.slider, onstop: () => t3._emit("changestop", "slider", t3), onchange(o4) {
if (!e3.hue || !e3.palette)
return;
- const n4 = s3();
+ const n4 = s4();
t3._recalc && (n4.h = 360 * o4), this.element.style.backgroundColor = `hsl(${n4.h}, 100%, 50%)`, r3.palette.trigger();
- } }), opacity: $2({ lock: "v" === n3 ? "h" : "v", element: t3._root.opacity.picker, wrapper: t3._root.opacity.slider, onstop: () => t3._emit("changestop", "slider", t3), onchange(o4) {
+ } }), opacity: $3({ lock: "v" === n3 ? "h" : "v", element: t3._root.opacity.picker, wrapper: t3._root.opacity.slider, onstop: () => t3._emit("changestop", "slider", t3), onchange(o4) {
if (!e3.opacity || !e3.palette)
return;
- const n4 = s3();
+ const n4 = s4();
t3._recalc && (n4.a = Math.round(100 * o4) / 100), this.element.style.background = `rgba(0, 0, 0, ${n4.a})`, r3.palette.trigger();
} }), selectable: k2({ elements: t3._root.interaction.options, className: "active", onchange(e4) {
t3._representation = e4.target.getAttribute("data-type").toUpperCase(), t3._recalc && t3._updateOutput("swatch");
@@ -411,11 +411,11 @@ var require_pickr_min = __commonJS({
}
if (e3.adjustableNumbers) {
const e4 = { rgba: [255, 255, 255, 1], hsva: [360, 100, 100, 1], hsla: [360, 100, 100, 1], cmyk: [100, 100, 100, 100] };
- p2(t3.interaction.result, (t4, o4, n3) => {
+ p3(t3.interaction.result, (t4, o4, n3) => {
const i3 = e4[this.getColorRepresentation().toLowerCase()];
if (i3) {
- const e5 = i3[n3], s3 = t4 + (e5 >= 100 ? 1e3 * o4 : o4);
- return s3 <= 0 ? 0 : Number((s3 < e5 ? s3 : e5).toPrecision(3));
+ const e5 = i3[n3], s4 = t4 + (e5 >= 100 ? 1e3 * o4 : o4);
+ return s4 <= 0 ? 0 : Number((s4 < e5 ? s4 : e5).toPrecision(3));
}
return t4;
});
@@ -453,8 +453,8 @@ var require_pickr_min = __commonJS({
o3.useAsButton || e3.button.style.setProperty("--pcr-color", "rgba(0, 0, 0, 0.15)"), e3.button.classList.add("clear"), o3.showAlways || this.hide(), this._lastColor = null, this._initializingActive || t3 || (this._emit("save", null), this._emit("clear"));
}
_parseLocalColor(t3) {
- const { values: e3, type: o3, a: n3 } = w2(t3), { lockOpacity: i3 } = this.options, s3 = void 0 !== n3 && 1 !== n3;
- return e3 && 3 === e3.length && (e3[3] = void 0), { values: !e3 || i3 && s3 ? null : e3, type: o3 };
+ const { values: e3, type: o3, a: n3 } = w2(t3), { lockOpacity: i3 } = this.options, s4 = void 0 !== n3 && 1 !== n3;
+ return e3 && 3 === e3.length && (e3[3] = void 0), { values: !e3 || i3 && s4 ? null : e3, type: o3 };
}
_t(t3) {
return this.options.i18n[t3] || L2.I18N_DEFAULTS[t3];
@@ -472,8 +472,8 @@ var require_pickr_min = __commonJS({
addSwatch(t3) {
const { values: e3 } = this._parseLocalColor(t3);
if (e3) {
- const { _swatchColors: t4, _root: o3 } = this, n3 = A2(...e3), s3 = r2(`
`);
- return o3.swatches.appendChild(s3), t4.push({ el: s3, color: n3 }), this._eventBindings.push(i2(s3, "click", () => {
+ const { _swatchColors: t4, _root: o3 } = this, n3 = A2(...e3), s4 = r2(`
`);
+ return o3.swatches.appendChild(s4), t4.push({ el: s4, color: n3 }), this._eventBindings.push(i2(s4, "click", () => {
this.setHSVA(...n3.toHSVA(), true), this._emit("swatchselect", n3), this._emit("change", n3, "swatch", this);
})), true;
}
@@ -492,7 +492,7 @@ var require_pickr_min = __commonJS({
return e3.lastColor.style.setProperty("--pcr-color", n3), this.options.useAsButton || o3.style.setProperty("--pcr-color", n3), o3.classList.remove("clear"), this._lastColor = this._color.clone(), this._initializingActive || t3 || this._emit("save", this._color), this;
}
destroy() {
- cancelAnimationFrame(this._setupAnimationFrame), this._eventBindings.forEach((t3) => s2(...t3)), Object.keys(this._components).forEach((t3) => this._components[t3].destroy());
+ cancelAnimationFrame(this._setupAnimationFrame), this._eventBindings.forEach((t3) => s3(...t3)), Object.keys(this._components).forEach((t3) => this._components[t3].destroy());
}
destroyAndRemove() {
this.destroy();
@@ -509,22 +509,22 @@ var require_pickr_min = __commonJS({
return this._root.app.classList.contains("visible");
}
setHSVA(t3 = 360, e3 = 0, o3 = 0, n3 = 1, i3 = false) {
- const s3 = this._recalc;
+ const s4 = this._recalc;
if (this._recalc = false, t3 < 0 || t3 > 360 || e3 < 0 || e3 > 100 || o3 < 0 || o3 > 100 || n3 < 0 || n3 > 1)
return false;
this._color = A2(t3, e3, o3, n3);
const { hue: r3, opacity: a3, palette: l3 } = this._components;
- return r3.update(t3 / 360), a3.update(n3), l3.update(e3 / 100, 1 - o3 / 100), i3 || this.applyColor(), s3 && this._updateOutput(), this._recalc = s3, true;
+ return r3.update(t3 / 360), a3.update(n3), l3.update(e3 / 100, 1 - o3 / 100), i3 || this.applyColor(), s4 && this._updateOutput(), this._recalc = s4, true;
}
setColor(t3, e3 = false) {
if (null === t3)
return this._clearColor(e3), true;
const { values: o3, type: n3 } = this._parseLocalColor(t3);
if (o3) {
- const t4 = n3.toUpperCase(), { options: i3 } = this._root.interaction, s3 = i3.find((e4) => e4.getAttribute("data-type") === t4);
- if (s3 && !s3.hidden)
+ const t4 = n3.toUpperCase(), { options: i3 } = this._root.interaction, s4 = i3.find((e4) => e4.getAttribute("data-type") === t4);
+ if (s4 && !s4.hidden)
for (const t5 of i3)
- t5.classList[t5 === s3 ? "add" : "remove"]("active");
+ t5.classList[t5 === s4 ? "add" : "remove"]("active");
return !!this.setHSVA(...o3, e3) && this.setColorRepresentation(t4);
}
return false;
@@ -557,106 +557,6 @@ var require_pickr_min = __commonJS({
}
});
-// node_modules/is-buffer/index.js
-var require_is_buffer = __commonJS({
- "node_modules/is-buffer/index.js"(exports, module2) {
- module2.exports = function isBuffer2(obj) {
- return obj != null && obj.constructor != null && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj);
- };
- }
-});
-
-// node_modules/extend/index.js
-var require_extend = __commonJS({
- "node_modules/extend/index.js"(exports, module2) {
- "use strict";
- var hasOwn = Object.prototype.hasOwnProperty;
- var toStr = Object.prototype.toString;
- var defineProperty = Object.defineProperty;
- var gOPD = Object.getOwnPropertyDescriptor;
- var isArray = function isArray2(arr) {
- if (typeof Array.isArray === "function") {
- return Array.isArray(arr);
- }
- return toStr.call(arr) === "[object Array]";
- };
- var isPlainObject2 = function isPlainObject3(obj) {
- if (!obj || toStr.call(obj) !== "[object Object]") {
- return false;
- }
- var hasOwnConstructor = hasOwn.call(obj, "constructor");
- var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, "isPrototypeOf");
- if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
- return false;
- }
- var key;
- for (key in obj) {
- }
- return typeof key === "undefined" || hasOwn.call(obj, key);
- };
- var setProperty = function setProperty2(target, options) {
- if (defineProperty && options.name === "__proto__") {
- defineProperty(target, options.name, {
- enumerable: true,
- configurable: true,
- value: options.newValue,
- writable: true
- });
- } else {
- target[options.name] = options.newValue;
- }
- };
- var getProperty = function getProperty2(obj, name) {
- if (name === "__proto__") {
- if (!hasOwn.call(obj, name)) {
- return void 0;
- } else if (gOPD) {
- return gOPD(obj, name).value;
- }
- }
- return obj[name];
- };
- module2.exports = function extend2() {
- var options, name, src, copy, copyIsArray, clone;
- var target = arguments[0];
- var i2 = 1;
- var length = arguments.length;
- var deep = false;
- if (typeof target === "boolean") {
- deep = target;
- target = arguments[1] || {};
- i2 = 2;
- }
- if (target == null || typeof target !== "object" && typeof target !== "function") {
- target = {};
- }
- for (; i2 < length; ++i2) {
- options = arguments[i2];
- if (options != null) {
- for (name in options) {
- src = getProperty(target, name);
- copy = getProperty(options, name);
- if (target !== copy) {
- if (deep && copy && (isPlainObject2(copy) || (copyIsArray = isArray(copy)))) {
- if (copyIsArray) {
- copyIsArray = false;
- clone = src && isArray(src) ? src : [];
- } else {
- clone = src && isPlainObject2(src) ? src : {};
- }
- setProperty(target, { name, newValue: extend2(deep, clone, copy) });
- } else if (typeof copy !== "undefined") {
- setProperty(target, { name, newValue: copy });
- }
- }
- }
- }
- }
- return target;
- };
- }
-});
-
// src/main.ts
var main_exports = {};
__export(main_exports, {
@@ -2041,7 +1941,7 @@ var P = function(t2, e2) {
var U = function(t2) {
for (var e2 = [], n2 = 1; n2 < arguments.length; n2++)
e2[n2 - 1] = arguments[n2];
- for (var r2 = [], i2 = [], o2 = [], c2 = [], u2 = [], s2 = Object.values(l), d2 = Object.values(f), b2 = Object.values(h), A2 = { legacyCSS: 0, spacesAfterCommas: 0, cmykFunction: 0 }, F2 = 0, v2 = e2; F2 < v2.length; F2++) {
+ for (var r2 = [], i2 = [], o2 = [], c2 = [], u2 = [], s3 = Object.values(l), d2 = Object.values(f), b2 = Object.values(h), A2 = { legacyCSS: 0, spacesAfterCommas: 0, cmykFunction: 0 }, F2 = 0, v2 = e2; F2 < v2.length; F2++) {
var H2 = v2[F2];
if ("string" == typeof H2) {
if (r2.push(H2), H2.includes(",")) {
@@ -2066,7 +1966,7 @@ var U = function(t2) {
}
}
}
- return { decimals: typeof t2.decimals === a.NUMBER ? t2.decimals : D.decimals, legacyCSS: typeof t2.legacyCSS === a.BOOLEAN ? t2.legacyCSS : Boolean(r2.length && A2.legacyCSS === r2.length) || D.legacyCSS, spacesAfterCommas: typeof t2.spacesAfterCommas === a.BOOLEAN ? t2.spacesAfterCommas : Boolean(r2.length && A2.spacesAfterCommas === r2.length) || D.spacesAfterCommas, anglesUnit: t2.anglesUnit && s2.includes(t2.anglesUnit) ? t2.anglesUnit : 1 === new Set(i2).size ? i2[0] : D.anglesUnit, rgbUnit: t2.rgbUnit && d2.includes(t2.rgbUnit) ? t2.rgbUnit : 1 === new Set(o2).size && o2[0] ? f.PERCENT : D.rgbUnit, cmykUnit: t2.cmykUnit && d2.includes(t2.cmykUnit) ? t2.cmykUnit : 1 !== new Set(c2).size || c2[0] ? D.cmykUnit : f.NONE, alphaUnit: t2.alphaUnit && d2.includes(t2.alphaUnit) ? t2.alphaUnit : 1 === new Set(u2).size && u2[0] ? f.PERCENT : D.alphaUnit, cmykFunction: t2.cmykFunction && b2.includes(t2.cmykFunction) ? t2.cmykFunction : c2.length && c2.length === A2.cmykFunction ? h.CMYK : D.cmykFunction };
+ return { decimals: typeof t2.decimals === a.NUMBER ? t2.decimals : D.decimals, legacyCSS: typeof t2.legacyCSS === a.BOOLEAN ? t2.legacyCSS : Boolean(r2.length && A2.legacyCSS === r2.length) || D.legacyCSS, spacesAfterCommas: typeof t2.spacesAfterCommas === a.BOOLEAN ? t2.spacesAfterCommas : Boolean(r2.length && A2.spacesAfterCommas === r2.length) || D.spacesAfterCommas, anglesUnit: t2.anglesUnit && s3.includes(t2.anglesUnit) ? t2.anglesUnit : 1 === new Set(i2).size ? i2[0] : D.anglesUnit, rgbUnit: t2.rgbUnit && d2.includes(t2.rgbUnit) ? t2.rgbUnit : 1 === new Set(o2).size && o2[0] ? f.PERCENT : D.rgbUnit, cmykUnit: t2.cmykUnit && d2.includes(t2.cmykUnit) ? t2.cmykUnit : 1 !== new Set(c2).size || c2[0] ? D.cmykUnit : f.NONE, alphaUnit: t2.alphaUnit && d2.includes(t2.alphaUnit) ? t2.alphaUnit : 1 === new Set(u2).size && u2[0] ? f.PERCENT : D.alphaUnit, cmykFunction: t2.cmykFunction && b2.includes(t2.cmykFunction) ? t2.cmykFunction : c2.length && c2.length === A2.cmykFunction ? h.CMYK : D.cmykFunction };
};
var w = function(t2, e2, n2) {
return n2 < 0 && (n2 += 6), n2 >= 6 && (n2 -= 6), K(n2 < 1 ? 255 * ((e2 - t2) * n2 + t2) : n2 < 3 ? 255 * e2 : n2 < 4 ? 255 * ((e2 - t2) * (4 - n2) + t2) : 255 * t2);
@@ -2086,7 +1986,7 @@ var q = function(t2, e2, n2) {
};
var _ = function(t2, e2, n2, r2) {
void 0 === r2 && (r2 = 1), t2 /= 255, e2 /= 255, n2 /= 255, r2 = Math.min(r2, 1);
- var i2 = Math.max(t2, e2, n2), o2 = Math.min(t2, e2, n2), a2 = i2 - o2, c2 = 0, u2 = 0, s2 = (i2 + o2) / 2;
+ var i2 = Math.max(t2, e2, n2), o2 = Math.min(t2, e2, n2), a2 = i2 - o2, c2 = 0, u2 = 0, s3 = (i2 + o2) / 2;
if (0 !== a2) {
switch (i2) {
case t2:
@@ -2098,9 +1998,9 @@ var _ = function(t2, e2, n2, r2) {
case n2:
c2 = (t2 - e2) / a2 + 4;
}
- (c2 = K(60 * c2)) < 0 && (c2 += 360), u2 = a2 / (1 - Math.abs(2 * s2 - 1));
+ (c2 = K(60 * c2)) < 0 && (c2 += 360), u2 = a2 / (1 - Math.abs(2 * s3 - 1));
}
- return { h: c2, s: K(100 * u2), l: K(100 * s2), a: r2 };
+ return { h: c2, s: K(100 * u2), l: K(100 * s3), a: r2 };
};
var $ = function(t2, e2) {
if (t2 < 0 && (t2 += 360), t2 > 360 && (t2 -= 360), 360 === t2 || 0 === t2)
@@ -2154,8 +2054,8 @@ var Z = ((H = {})[n.HEX] = function(t2) {
}, H[n.CMYK] = function(t2, e2) {
var n2 = e2.decimals, r2 = e2.legacyCSS, i2 = e2.spacesAfterCommas, o2 = e2.cmykUnit, a2 = e2.cmykFunction, c2 = z(i2), u2 = Q(t2, function(t3, r3) {
return o2 === f.PERCENT && r3 < 4 ? "".concat(K(t3, n2), "%") : 4 === r3 ? J(t3, e2) : K(t3 / 100, n2);
- }), s2 = r2 ? 5 === u2.length ? "".concat(a2, "({1}").concat(c2, "{2}").concat(c2, "{3}").concat(c2, "{4}").concat(c2, "{5})") : "".concat(a2, "({1}").concat(c2, "{2}").concat(c2, "{3}").concat(c2, "{4})") : 5 === u2.length ? "".concat(a2, "({1} {2} {3} {4} / {5})") : "".concat(a2, "({1} {2} {3} {4})");
- return W(s2, u2);
+ }), s3 = r2 ? 5 === u2.length ? "".concat(a2, "({1}").concat(c2, "{2}").concat(c2, "{3}").concat(c2, "{4}").concat(c2, "{5})") : "".concat(a2, "({1}").concat(c2, "{2}").concat(c2, "{3}").concat(c2, "{4})") : 5 === u2.length ? "".concat(a2, "({1} {2} {3} {4} / {5})") : "".concat(a2, "({1} {2} {3} {4})");
+ return W(s3, u2);
}, H);
var tt = function(t2) {
return "string" == typeof t2 && (t2 = m.test(t2) ? L(t2) / 100 : +t2), isNaN(+t2) || t2 > 1 ? 1 : K(t2);
@@ -2259,8 +2159,8 @@ var ft = ((S = {})[n.HEX] = function(t2) {
return n2.a = O(t2, "a") ? K(t2.a, e2) : 1, n2;
}, S);
var ht = function(e2, r2, i2, o2) {
- var a2 = ut(e2), c2 = "string" == typeof e2, u2 = lt(e2, a2), s2 = "string" == typeof e2 && O(u2, "a") || "string" != typeof e2 && O(e2, "a"), d2 = _(u2.r, u2.g, u2.b, u2.a);
- s2 || delete d2.a;
+ var a2 = ut(e2), c2 = "string" == typeof e2, u2 = lt(e2, a2), s3 = "string" == typeof e2 && O(u2, "a") || "string" != typeof e2 && O(e2, "a"), d2 = _(u2.r, u2.g, u2.b, u2.a);
+ s3 || delete d2.a;
var l2 = i2 ? d2.l / (r2 + 1) : (100 - d2.l) / (r2 + 1), f2 = Array(r2).fill(null).map(function(e3, n2) {
return t(t({}, d2), { l: d2.l + l2 * (n2 + 1) * (1 - 2 * +i2) });
});
@@ -2269,29 +2169,29 @@ var ht = function(e2, r2, i2, o2) {
default:
return f2.map(function(e3) {
var n2 = x(e3.h, e3.s, e3.l);
- return s2 && (n2.a = e3.a), c2 ? s2 ? Z.HEX(t(t({}, n2), { a: K(255 * n2.a) })) : Z.HEX(n2) : s2 ? ft.HEXA(n2) : ft.HEX(n2);
+ return s3 && (n2.a = e3.a), c2 ? s3 ? Z.HEX(t(t({}, n2), { a: K(255 * n2.a) })) : Z.HEX(n2) : s3 ? ft.HEXA(n2) : ft.HEX(n2);
});
case n.RGB:
return f2.map(function(t2) {
var e3 = x(t2.h, t2.s, t2.l);
- return s2 && (e3.a = t2.a), c2 ? Z.RGB(e3, o2) : s2 ? ft.RGBA(e3, o2.decimals) : ft.RGB(e3, o2.decimals);
+ return s3 && (e3.a = t2.a), c2 ? Z.RGB(e3, o2) : s3 ? ft.RGBA(e3, o2.decimals) : ft.RGB(e3, o2.decimals);
});
case n.HSL:
return f2.map(function(e3) {
- return c2 ? Z.HSL(e3, o2) : s2 ? ft.HSLA(t(t({}, x(e3.h, e3.s, e3.l)), { a: e3.a }), o2.decimals) : ft.HSL(x(e3.h, e3.s, e3.l), o2.decimals);
+ return c2 ? Z.HSL(e3, o2) : s3 ? ft.HSLA(t(t({}, x(e3.h, e3.s, e3.l)), { a: e3.a }), o2.decimals) : ft.HSL(x(e3.h, e3.s, e3.l), o2.decimals);
});
}
};
var pt = ((R = { buildHarmony: function(t2, e2, r2, i2) {
- var o2 = ut(t2), a2 = lt(t2, o2), c2 = _(a2.r, a2.g, a2.b, a2.a), u2 = "string" == typeof t2 && O(a2, "a") || "string" != typeof t2 && O(t2, "a"), s2 = "string" == typeof t2;
+ var o2 = ut(t2), a2 = lt(t2, o2), c2 = _(a2.r, a2.g, a2.b, a2.a), u2 = "string" == typeof t2 && O(a2, "a") || "string" != typeof t2 && O(t2, "a"), s3 = "string" == typeof t2;
switch (o2) {
case n.HEX:
default:
- return u2 ? this.HEXA(bt(c2, 0), e2, r2, s2) : this.HEX(bt(c2, 0), e2, r2, s2);
+ return u2 ? this.HEXA(bt(c2, 0), e2, r2, s3) : this.HEX(bt(c2, 0), e2, r2, s3);
case n.HSL:
- return u2 ? this.HSLA(c2, e2, r2, s2, i2) : this.HSL(c2, e2, r2, s2, i2);
+ return u2 ? this.HSLA(c2, e2, r2, s3, i2) : this.HSL(c2, e2, r2, s3, i2);
case n.RGB:
- return u2 ? this.RGBA(c2, e2, r2, s2, i2) : this.RGB(c2, e2, r2, s2, i2);
+ return u2 ? this.RGBA(c2, e2, r2, s3, i2) : this.RGB(c2, e2, r2, s3, i2);
}
} })[n.HEX] = function(t2, e2, n2, r2) {
return e2(t2, n2).map(function(t3) {
@@ -2319,11 +2219,11 @@ var pt = ((R = { buildHarmony: function(t2, e2, r2, i2) {
});
}, R);
var gt = ((M = { mix: function(e2, n2) {
- var r2, o2, a2, c2, u2, s2, d2, l2, f2, h2, p2, g2, m2, b2, A2, y2 = e2.map(function(t2) {
+ var r2, o2, a2, c2, u2, s3, d2, l2, f2, h3, p3, g2, m2, b2, A2, y2 = e2.map(function(t2) {
var e3 = ut(t2);
return lt(t2, e3);
}), E2 = n2 === i.SUBTRACTIVE ? y2.map(function(t2) {
- var e3, n3, r3, i2, o3, a3, c3, u3, s3, d3, l3, f3, h3, p3, g3 = (e3 = t2.r, n3 = t2.g, r3 = t2.b, i2 = Math.min(e3, n3, r3), o3 = Math.min(255 - e3, 255 - n3, 255 - r3), a3 = e3 - i2, c3 = n3 - i2, u3 = r3 - i2, s3 = Math.min(a3, c3), d3 = a3 - s3, l3 = (c3 + s3) / 2, f3 = (u3 + c3 - s3) / 2, h3 = Math.max(d3, l3, f3) / Math.max(a3, c3, u3), p3 = isNaN(h3) || h3 === 1 / 0 || h3 <= 0 ? 1 : h3, { r: d3 / p3 + o3, y: l3 / p3 + o3, b: f3 / p3 + o3 });
+ var e3, n3, r3, i2, o3, a3, c3, u3, s4, d3, l3, f3, h4, p4, g3 = (e3 = t2.r, n3 = t2.g, r3 = t2.b, i2 = Math.min(e3, n3, r3), o3 = Math.min(255 - e3, 255 - n3, 255 - r3), a3 = e3 - i2, c3 = n3 - i2, u3 = r3 - i2, s4 = Math.min(a3, c3), d3 = a3 - s4, l3 = (c3 + s4) / 2, f3 = (u3 + c3 - s4) / 2, h4 = Math.max(d3, l3, f3) / Math.max(a3, c3, u3), p4 = isNaN(h4) || h4 === 1 / 0 || h4 <= 0 ? 1 : h4, { r: d3 / p4 + o3, y: l3 / p4 + o3, b: f3 / p4 + o3 });
return O(t2, "a") && (g3.a = t2.a), g3;
}) : null;
function F2(e3) {
@@ -2337,7 +2237,7 @@ var gt = ((M = { mix: function(e2, n2) {
r2 = F2(y2);
else {
var v2 = F2(E2);
- o2 = v2.r, a2 = v2.y, c2 = v2.b, u2 = Math.min(o2, a2, c2), s2 = Math.min(255 - o2, 255 - a2, 255 - c2), d2 = o2 - u2, l2 = a2 - u2, f2 = c2 - u2, h2 = Math.min(l2, f2), p2 = d2 + l2 - h2, g2 = l2 + h2, m2 = 2 * (f2 - h2), b2 = Math.max(p2, g2, m2) / Math.max(d2, l2, f2), A2 = isNaN(b2) || b2 === 1 / 0 || b2 <= 0 ? 1 : b2, (r2 = { r: p2 / A2 + s2, g: g2 / A2 + s2, b: m2 / A2 + s2 }).a = v2.a;
+ o2 = v2.r, a2 = v2.y, c2 = v2.b, u2 = Math.min(o2, a2, c2), s3 = Math.min(255 - o2, 255 - a2, 255 - c2), d2 = o2 - u2, l2 = a2 - u2, f2 = c2 - u2, h3 = Math.min(l2, f2), p3 = d2 + l2 - h3, g2 = l2 + h3, m2 = 2 * (f2 - h3), b2 = Math.max(p3, g2, m2) / Math.max(d2, l2, f2), A2 = isNaN(b2) || b2 === 1 / 0 || b2 <= 0 ? 1 : b2, (r2 = { r: p3 / A2 + s3, g: g2 / A2 + s3, b: m2 / A2 + s3 }).a = v2.a;
}
return { r: K(r2.r), g: K(r2.g), b: K(r2.b), a: N(r2.a, 0, 1) };
} })[n.HEX] = function(t2, e2, n2) {
@@ -2376,8 +2276,8 @@ var Et = function(t2, e2, n2, r2, i2) {
n2 < 1 && (n2 = 5);
var o2 = function(t3, e3, n3) {
var r3 = n3 - 1, i3 = (e3.r - t3.r) / r3, o3 = (e3.g - t3.g) / r3, a2 = (e3.b - t3.b) / r3, c2 = tt(t3.a), u2 = (tt(e3.a) - c2) / r3;
- return Array(n3).fill(null).map(function(n4, s2) {
- return 0 === s2 ? t3 : s2 === r3 ? e3 : { r: K(t3.r + i3 * s2), g: K(t3.g + o3 * s2), b: K(t3.b + a2 * s2), a: K(c2 + u2 * s2) };
+ return Array(n3).fill(null).map(function(n4, s3) {
+ return 0 === s3 ? t3 : s3 === r3 ? e3 : { r: K(t3.r + i3 * s3), g: K(t3.g + o3 * s3), b: K(t3.b + a2 * s3), a: K(c2 + u2 * s3) };
});
}(lt(t2), lt(e2), n2);
return o2.map(function(t3) {
@@ -2648,7 +2548,7 @@ var SettingsTab = class extends import_obsidian.PluginSettingTab {
};
let ignoreTimeout = setTimeout(() => {
});
- new import_obsidian.Setting(containerEl).setName("Ignore Codeblocks").setDesc("Define languages in a comma separated list which the plugin should completely ignore. You can use a wildcard (*) either at the beginning, or at the end. For example: ad-* will exclude codeblocks where the language starts with ad- e.g.: ad-info, ad-error etc.").addText((text3) => text3.setPlaceholder("e.g. dataview, dataviewjs etc.").setValue(this.plugin.settings.excludedCodeblocks).onChange((value) => {
+ new import_obsidian.Setting(containerEl).setName("Ignore Codeblocks").setDesc("Define languages in a comma separated list which the plugin should completely ignore. You can use a wildcard (*) either at the beginning, or at the end. For example: ad-* will exclude codeblocks where the language starts with ad- e.g.: ad-info, ad-error etc.").addText((text2) => text2.setPlaceholder("e.g. dataview, dataviewjs etc.").setValue(this.plugin.settings.excludedCodeblocks).onChange((value) => {
this.plugin.settings.excludedCodeblocks = value;
(async () => {
await this.plugin.saveSettings();
@@ -2658,7 +2558,7 @@ var SettingsTab = class extends import_obsidian.PluginSettingTab {
}));
let excludeTimeout = setTimeout(() => {
});
- new import_obsidian.Setting(containerEl).setName("Exclude Languages").setDesc("Define languages in a comma separated list which the plugin should not decorate. You can use a wildcard (*) either at the beginning, or at the end. For example: ad-* will exclude codeblocks where the language starts with ad- e.g.: ad-info, ad-error etc.").addText((text3) => text3.setPlaceholder("e.g. ad-*, python etc.").setValue(this.plugin.settings.excludedLanguages).onChange((value) => {
+ new import_obsidian.Setting(containerEl).setName("Exclude Languages").setDesc("Define languages in a comma separated list which the plugin should not decorate. You can use a wildcard (*) either at the beginning, or at the end. For example: ad-* will exclude codeblocks where the language starts with ad- e.g.: ad-info, ad-error etc.").addText((text2) => text2.setPlaceholder("e.g. ad-*, python etc.").setValue(this.plugin.settings.excludedLanguages).onChange((value) => {
this.plugin.settings.excludedLanguages = value;
(async () => {
await this.plugin.saveSettings();
@@ -2724,8 +2624,8 @@ var SettingsTab = class extends import_obsidian.PluginSettingTab {
let newThemeName;
let newThemeDefault;
this.plugin.settings.newTheme = "";
- new import_obsidian.Setting(containerEl).setName("Add New Theme").setDesc("Create a new theme from the current settings.").addText((text3) => {
- newThemeName = text3.setPlaceholder("New theme name").setValue(this.plugin.settings.newTheme).onChange((value) => {
+ new import_obsidian.Setting(containerEl).setName("Add New Theme").setDesc("Create a new theme from the current settings.").addText((text2) => {
+ newThemeName = text2.setPlaceholder("New theme name").setValue(this.plugin.settings.newTheme).onChange((value) => {
this.plugin.settings.newTheme = value;
});
}).addExtraButton((button) => {
@@ -2928,8 +2828,8 @@ var SettingsTab = class extends import_obsidian.PluginSettingTab {
await this.plugin.saveSettings();
})();
});
- }).addText((text3) => {
- text3.setPlaceholder("Font").setValue(this.plugin.settings.currentTheme.settings.header.title.textFont).onChange((value) => {
+ }).addText((text2) => {
+ text2.setPlaceholder("Font").setValue(this.plugin.settings.currentTheme.settings.header.title.textFont).onChange((value) => {
this.plugin.settings.currentTheme.settings.header.title.textFont = value;
(async () => {
await this.plugin.saveSettings();
@@ -2949,7 +2849,7 @@ var SettingsTab = class extends import_obsidian.PluginSettingTab {
});
let collapsePlaceholderTimeout = setTimeout(() => {
});
- new import_obsidian.Setting(containerEl).setName("Collapse Placeholder Text").setDesc("Title placeholder text for collapsed code when no title parameter is set.").addText((text3) => text3.setPlaceholder("Collapsed Code").setValue(this.plugin.settings.currentTheme.settings.header.collapsePlaceholder).onChange((value) => {
+ new import_obsidian.Setting(containerEl).setName("Collapse Placeholder Text").setDesc("Title placeholder text for collapsed code when no title parameter is set.").addText((text2) => text2.setPlaceholder("Collapsed Code").setValue(this.plugin.settings.currentTheme.settings.header.collapsePlaceholder).onChange((value) => {
this.plugin.settings.currentTheme.settings.header.collapsePlaceholder = value;
(async () => {
await this.plugin.saveSettings();
@@ -3012,8 +2912,8 @@ var SettingsTab = class extends import_obsidian.PluginSettingTab {
})();
});
this.disableableComponents["headerLanguageTags"].push(languageTagsItalicToggle);
- }).addText((text3) => {
- languageIconsFontText = text3.setPlaceholder("Font").setValue(this.plugin.settings.currentTheme.settings.header.languageTag.textFont).setDisabled(this.plugin.settings.currentTheme.settings.header.languageTag.display === "none").onChange((value) => {
+ }).addText((text2) => {
+ languageIconsFontText = text2.setPlaceholder("Font").setValue(this.plugin.settings.currentTheme.settings.header.languageTag.textFont).setDisabled(this.plugin.settings.currentTheme.settings.header.languageTag.display === "none").onChange((value) => {
this.plugin.settings.currentTheme.settings.header.languageTag.textFont = value;
(async () => {
await this.plugin.saveSettings();
@@ -3625,11 +3525,11 @@ function calc(calcString) {
return calcString;
}
function getCurrentMode() {
- const body = document.querySelector("body");
- if (body !== null) {
- if (body.classList.contains("theme-light"))
+ const body3 = document.querySelector("body");
+ if (body3 !== null) {
+ if (body3.classList.contains("theme-light"))
return "light";
- else if (body.classList.contains("theme-dark"))
+ else if (body3.classList.contains("theme-dark"))
return "dark";
}
console.warn("Warning: Couldn't get current theme");
@@ -3717,7 +3617,7 @@ function getThemeColours(themeModeColours) {
}, "");
}
function styleThemeSettings(themeSettings, currentTheme) {
- var _a, _b;
+ var _a2, _b;
return `
body.code-styler [class^="code-styler-header-language-tag"] {
--code-styler-header-language-tag-text-bold: ${themeSettings.header.languageTag.textBold ? "bold" : "normal"};
@@ -3744,7 +3644,7 @@ function styleThemeSettings(themeSettings, currentTheme) {
${!themeSettings.codeblock.wrapLinesActive ? "" : "--line-active-wrapping: pre-wrap;"}
${themeSettings.header.languageIcon.displayColour ? "" : "--icon-filter: grayscale(1);"}
}
- ${((_a = THEME_STYLES == null ? void 0 : THEME_STYLES[currentTheme]) == null ? void 0 : _a.border) ? `
+ ${((_a2 = THEME_STYLES == null ? void 0 : THEME_STYLES[currentTheme]) == null ? void 0 : _a2.border) ? `
.markdown-source-view :not(pre.code-styler-pre) > [class^="code-styler-header-container"] {
--code-styler-header-border:` + //@ts-expect-error Does Exist
THEME_STYLES[currentTheme].border.style + `;
@@ -3758,11 +3658,11 @@ function styleThemeSettings(themeSettings, currentTheme) {
}
function styleLanguageColours(themeSettings, redirectLanguages, currentTheme) {
return Object.entries(LANGUAGE_NAMES).reduce((result, [languageName, languageDisplayName]) => {
- var _a, _b, _c;
+ var _a2, _b, _c;
if (languageDisplayName in LANGUAGE_COLOURS || languageName in redirectLanguages && "colour" in redirectLanguages[languageName]) {
result += `
.language-${languageName} {
- --language-border-colour: ${(_b = (_a = redirectLanguages == null ? void 0 : redirectLanguages[languageName]) == null ? void 0 : _a["colour"]) != null ? _b : LANGUAGE_COLOURS[languageDisplayName]};
+ --language-border-colour: ${(_b = (_a2 = redirectLanguages == null ? void 0 : redirectLanguages[languageName]) == null ? void 0 : _a2["colour"]) != null ? _b : LANGUAGE_COLOURS[languageDisplayName]};
--language-border-width: ${themeSettings.advanced.languageBorderColour ? themeSettings.advanced.languageBorderWidth : 0}px;
}
`;
@@ -3800,8 +3700,8 @@ function addThemeSettingsClasses(themeSettings) {
document.body.classList.add("code-styler-show-langicons");
}
function removeStylesAndClasses() {
- var _a;
- (_a = document.getElementById(STYLE_ID)) == null ? void 0 : _a.remove();
+ var _a2;
+ (_a2 = document.getElementById(STYLE_ID)) == null ? void 0 : _a2.remove();
document.body.classList.remove(
"code-styler",
"code-styler-show-line-numbers",
@@ -3830,13 +3730,13 @@ async function parseCodeblockSource(codeSection, sourcePath, plugin) {
const codeblocks = [];
const codeblocksParameters = [];
function parseCodeblockSection(codeSection2) {
- var _a;
+ var _a2;
if (codeSection2.length === 0)
return;
const openingCodeblockLine = getOpeningLine(codeSection2);
if (!openingCodeblockLine)
return;
- const openDelimiter = (_a = /^\s*(?:>\s*)*((?:```+|~~~+)).*$/.exec(openingCodeblockLine)) == null ? void 0 : _a[1];
+ const openDelimiter = (_a2 = /^\s*(?:>\s*)*((?:```+|~~~+)).*$/.exec(openingCodeblockLine)) == null ? void 0 : _a2[1];
if (!openDelimiter)
return;
const openDelimiterIndex = codeSection2.indexOf(openingCodeblockLine);
@@ -3860,8 +3760,8 @@ async function parseCodeblockSource(codeSection, sourcePath, plugin) {
}
return { codeblocksParameters, nested: codeblocks[0] ? !arraysEqual(codeSection, codeblocks[0]) : true };
}
-function parseInlineCode(codeText2) {
- const match = /^({} ?)?{([^}]*)} ?(.*)$/.exec(codeText2);
+function parseInlineCode(codeText) {
+ const match = /^({} ?)?{([^}]*)} ?(.*)$/.exec(codeText);
if (!(match == null ? void 0 : match[1]) && !((match == null ? void 0 : match[2]) && (match == null ? void 0 : match[3])))
return { parameters: null, text: "" };
else if (match == null ? void 0 : match[1])
@@ -3915,9 +3815,9 @@ function parseCodeblockParameters(parameterLine, theme) {
return codeblockParameters;
}
async function pluginAdjustParameters(codeblockParameters, plugins, codeblockLines, sourcePath) {
- var _a, _b, _c, _d, _e, _f;
+ var _a2, _b, _c, _d, _e, _f;
if (codeblockParameters.language === "preview") {
- if (((_a = plugins == null ? void 0 : plugins["obsidian-code-preview"]) == null ? void 0 : _a.code) && ((_b = plugins == null ? void 0 : plugins["obsidian-code-preview"]) == null ? void 0 : _b.analyzeHighLightLines)) {
+ if (((_a2 = plugins == null ? void 0 : plugins["obsidian-code-preview"]) == null ? void 0 : _a2.code) && ((_b = plugins == null ? void 0 : plugins["obsidian-code-preview"]) == null ? void 0 : _b.analyzeHighLightLines)) {
const codePreviewParams = await plugins["obsidian-code-preview"].code(codeblockLines.slice(1, -1).join("\n"), sourcePath);
if (!codeblockParameters.lineNumbers.alwaysDisabled && !codeblockParameters.lineNumbers.alwaysEnabled) {
if (typeof codePreviewParams.start === "number")
@@ -4184,10 +4084,10 @@ function getLanguageTag(language) {
}
function getLineClass(codeblockParameters, lineNumber, line) {
let classList = [];
- if (codeblockParameters.highlights.default.lineNumbers.includes(lineNumber + codeblockParameters.lineNumbers.offset) || codeblockParameters.highlights.default.plainText.some((text3) => line.indexOf(text3) > -1) || codeblockParameters.highlights.default.regularExpressions.some((regExp) => regExp.test(line)))
+ if (codeblockParameters.highlights.default.lineNumbers.includes(lineNumber + codeblockParameters.lineNumbers.offset) || codeblockParameters.highlights.default.plainText.some((text2) => line.indexOf(text2) > -1) || codeblockParameters.highlights.default.regularExpressions.some((regExp) => regExp.test(line)))
classList.push("code-styler-line-highlighted");
Object.entries(codeblockParameters.highlights.alternative).forEach(([alternativeHighlight, highlightedLines]) => {
- if (highlightedLines.lineNumbers.includes(lineNumber + codeblockParameters.lineNumbers.offset) || highlightedLines.plainText.some((text3) => line.indexOf(text3) > -1) || highlightedLines.regularExpressions.some((regExp) => regExp.test(line)))
+ if (highlightedLines.lineNumbers.includes(lineNumber + codeblockParameters.lineNumbers.offset) || highlightedLines.plainText.some((text2) => line.indexOf(text2) > -1) || highlightedLines.regularExpressions.some((regExp) => regExp.test(line)))
classList.push(`code-styler-line-highlighted-${alternativeHighlight.replace(/\s+/g, "-").toLowerCase()}`);
});
if (classList.length === 0)
@@ -4256,8 +4156,8 @@ function createCodeblockCodeMirrorExtensions(settings, languageIcons) {
}
}
buildDecorations(view) {
- var _a;
- if (!((_a = view == null ? void 0 : view.visibleRanges) == null ? void 0 : _a.length) || editingViewIgnore(view.state)) {
+ var _a2;
+ if (!((_a2 = view == null ? void 0 : view.visibleRanges) == null ? void 0 : _a2.length) || editingViewIgnore(view.state)) {
this.decorations = import_view.Decoration.none;
return;
}
@@ -4441,8 +4341,8 @@ function createCodeblockCodeMirrorExtensions(settings, languageIcons) {
}
}
buildDecorations(view) {
- var _a;
- if (!((_a = view == null ? void 0 : view.visibleRanges) == null ? void 0 : _a.length) || editingViewIgnore(view.state)) {
+ var _a2;
+ if (!((_a2 = view == null ? void 0 : view.visibleRanges) == null ? void 0 : _a2.length) || editingViewIgnore(view.state)) {
this.decorations = import_view.Decoration.none;
return;
}
@@ -4451,8 +4351,8 @@ function createCodeblockCodeMirrorExtensions(settings, languageIcons) {
from,
to,
enter: (syntaxNode) => {
- var _a2;
- const properties = new Set((_a2 = syntaxNode.node.type.prop(import_language.tokenClassNodeProp)) == null ? void 0 : _a2.split(" "));
+ var _a3;
+ const properties = new Set((_a3 = syntaxNode.node.type.prop(import_language.tokenClassNodeProp)) == null ? void 0 : _a3.split(" "));
if (!(properties.has("inline-code") && !properties.has("formatting")))
return;
const previousSibling = syntaxNode.node.prevSibling;
@@ -4460,10 +4360,10 @@ function createCodeblockCodeMirrorExtensions(settings, languageIcons) {
return;
const delimiterSize = previousSibling.to - previousSibling.from;
const inlineCodeText = view.state.doc.sliceString(syntaxNode.from, syntaxNode.to);
- const { parameters, text: text3 } = parseInlineCode(inlineCodeText);
- const endOfParameters = inlineCodeText.lastIndexOf(text3);
+ const { parameters, text: text2 } = parseInlineCode(inlineCodeText);
+ const endOfParameters = inlineCodeText.lastIndexOf(text2);
if (!parameters) {
- if (text3) {
+ if (text2) {
if (view.state.selection.ranges.some((range) => range.to >= syntaxNode.from - delimiterSize && range.from <= syntaxNode.to + delimiterSize))
this.decorations = this.decorations.update({ filterFrom: syntaxNode.from, filterTo: syntaxNode.from, filter: (from2, to2, value) => false });
else
@@ -4478,8 +4378,8 @@ function createCodeblockCodeMirrorExtensions(settings, languageIcons) {
} else {
let decorated = false;
this.decorations.between(syntaxNode.from, syntaxNode.from, (from2, to2, decorationValue) => {
- var _a3;
- if (!((_a3 = decorationValue.spec) == null ? void 0 : _a3.class))
+ var _a4;
+ if (!((_a4 = decorationValue.spec) == null ? void 0 : _a4.class))
decorated = true;
});
if (!decorated) {
@@ -4491,7 +4391,7 @@ function createCodeblockCodeMirrorExtensions(settings, languageIcons) {
this.decorations = this.decorations.update({ filterFrom: syntaxNode.from + endOfParameters + 1, filterTo: syntaxNode.to, filter: (from2, to2, decorationValue) => false });
if (!settings.currentTheme.settings.inline.syntaxHighlight)
return;
- this.decorations = this.decorations.update({ add: modeHighlight({ start: syntaxNode.from + endOfParameters, text: text3, language: parameters.language }) });
+ this.decorations = this.decorations.update({ add: modeHighlight({ start: syntaxNode.from + endOfParameters, text: text2, language: parameters.language }) });
}
}
});
@@ -4504,9 +4404,9 @@ function createCodeblockCodeMirrorExtensions(settings, languageIcons) {
);
function cursorIntoCollapsedTransactionFilter() {
return import_state.EditorState.transactionFilter.of((transaction) => {
- var _a, _b, _c, _d;
+ var _a2, _b, _c, _d;
const extraTransactions = [];
- const collapsedRangeSet = (_b = (_a = transaction.startState.field(codeblockCollapse, false)) == null ? void 0 : _a.map(transaction.changes)) != null ? _b : import_view.Decoration.none;
+ const collapsedRangeSet = (_b = (_a2 = transaction.startState.field(codeblockCollapse, false)) == null ? void 0 : _a2.map(transaction.changes)) != null ? _b : import_view.Decoration.none;
const temporarilyUncollapsedRangeSet = (_d = (_c = transaction.startState.field(temporarilyUncollapsed, false)) == null ? void 0 : _c.map(transaction.changes)) != null ? _d : import_view.Decoration.none;
transaction.newSelection.ranges.forEach((range) => {
collapsedRangeSet.between(range.from, range.to, (collapseStartFrom, collapseEndTo, decorationValue) => {
@@ -4524,12 +4424,12 @@ function createCodeblockCodeMirrorExtensions(settings, languageIcons) {
});
}
class LineNumberWidget extends import_view.WidgetType {
- constructor(lineNumber, codeblockParameters, maxLineNum, empty2) {
+ constructor(lineNumber, codeblockParameters, maxLineNum, empty3) {
super();
this.lineNumber = lineNumber;
this.codeblockParameters = codeblockParameters;
this.maxLineNum = maxLineNum;
- this.empty = empty2;
+ this.empty = empty3;
}
eq(other) {
return this.lineNumber === other.lineNumber && this.codeblockParameters.lineNumbers.alwaysEnabled === other.codeblockParameters.lineNumbers.alwaysEnabled && this.codeblockParameters.lineNumbers.alwaysDisabled === other.codeblockParameters.lineNumbers.alwaysDisabled && this.codeblockParameters.lineNumbers.offset === other.codeblockParameters.lineNumbers.offset && this.maxLineNum === other.maxLineNum && this.empty === other.empty;
@@ -4588,10 +4488,10 @@ function createCodeblockCodeMirrorExtensions(settings, languageIcons) {
}
}
function collapseOnClick(view, target) {
- var _a;
- const position2 = view.posAtDOM(target);
+ var _a2;
+ const position3 = view.posAtDOM(target);
let folded = false;
- (_a = view.state.field(codeblockCollapse, false)) == null ? void 0 : _a.between(position2, position2, () => {
+ (_a2 = view.state.field(codeblockCollapse, false)) == null ? void 0 : _a2.between(position3, position3, () => {
folded = true;
});
let collapseStart = null;
@@ -4606,7 +4506,7 @@ function createCodeblockCodeMirrorExtensions(settings, languageIcons) {
if (startLine) {
startLine = false;
startDelimiter = currentDelimiter;
- if (position2 === line.from)
+ if (position3 === line.from)
collapseStart = line;
} else {
if (currentDelimiter === startDelimiter) {
@@ -4674,27 +4574,27 @@ function findCodeblocks(view) {
});
return codeblocks;
}
-function modeHighlight({ start, text: text3, language }) {
- var _a;
+function modeHighlight({ start, text: text2, language }) {
+ var _a2;
const markDecorations = [];
- const mode = window.CodeMirror.getMode(window.CodeMirror.defaults, (_a = window.CodeMirror.findModeByName(language)) == null ? void 0 : _a.mime);
+ const mode = window.CodeMirror.getMode(window.CodeMirror.defaults, (_a2 = window.CodeMirror.findModeByName(language)) == null ? void 0 : _a2.mime);
const state = window.CodeMirror.startState(mode);
if (mode == null ? void 0 : mode.token) {
- const stream = new window.CodeMirror.StringStream(text3);
+ const stream = new window.CodeMirror.StringStream(text2);
while (!stream.eol()) {
- const style = mode.token(stream, state);
- if (style)
- markDecorations.push({ from: start + stream.start, to: start + stream.pos, value: import_view.Decoration.mark({ class: `cm-${style}` }) });
+ const style2 = mode.token(stream, state);
+ if (style2)
+ markDecorations.push({ from: start + stream.start, to: start + stream.pos, value: import_view.Decoration.mark({ class: `cm-${style2}` }) });
stream.start = stream.pos;
}
}
return markDecorations;
}
function editingViewIgnore(state) {
- var _a, _b, _c, _d;
+ var _a2, _b, _c, _d;
if (!state.field(import_obsidian2.editorLivePreviewField))
return true;
- const filePath = (_b = (_a = state.field(import_obsidian2.editorInfoField)) == null ? void 0 : _a.file) == null ? void 0 : _b.path;
+ const filePath = (_b = (_a2 = state.field(import_obsidian2.editorInfoField)) == null ? void 0 : _a2.file) == null ? void 0 : _b.path;
if (typeof filePath !== "undefined")
return ((_d = (_c = this.app.metadataCache.getCache(filePath)) == null ? void 0 : _c.frontmatter) == null ? void 0 : _d["code-styler-ignore"]) === true;
return false;
@@ -4703,210 +4603,10094 @@ function editingViewIgnore(state) {
// src/ReadingView.ts
var import_obsidian3 = require("obsidian");
-// node_modules/bail/index.js
-function bail(error) {
- if (error) {
- throw error;
+// node_modules/unist-util-is/lib/index.js
+var convert = (
+ // Note: overloads in JSDoc can’t yet use different `@template`s.
+ /**
+ * @type {(
+ * (
(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &
+ * ((test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &
+ * ((test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate) &
+ * ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &
+ * ((test?: Test) => Check)
+ * )}
+ */
+ /**
+ * @param {Test} [test]
+ * @returns {Check}
+ */
+ function(test) {
+ if (test === null || test === void 0) {
+ return ok;
+ }
+ if (typeof test === "function") {
+ return castFactory(test);
+ }
+ if (typeof test === "object") {
+ return Array.isArray(test) ? anyFactory(test) : propsFactory(test);
+ }
+ if (typeof test === "string") {
+ return typeFactory(test);
+ }
+ throw new Error("Expected function, string, or object as test");
}
-}
-
-// node_modules/unified/lib/index.js
-var import_is_buffer2 = __toESM(require_is_buffer(), 1);
-var import_extend = __toESM(require_extend(), 1);
-
-// node_modules/is-plain-obj/index.js
-function isPlainObject(value) {
- if (typeof value !== "object" || value === null) {
+);
+function anyFactory(tests) {
+ const checks2 = [];
+ let index2 = -1;
+ while (++index2 < tests.length) {
+ checks2[index2] = convert(tests[index2]);
+ }
+ return castFactory(any);
+ function any(...parameters) {
+ let index3 = -1;
+ while (++index3 < checks2.length) {
+ if (checks2[index3].apply(this, parameters))
+ return true;
+ }
return false;
}
- const prototype = Object.getPrototypeOf(value);
- return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
+}
+function propsFactory(check) {
+ const checkAsRecord = (
+ /** @type {Record} */
+ check
+ );
+ return castFactory(all3);
+ function all3(node) {
+ const nodeAsRecord = (
+ /** @type {Record} */
+ /** @type {unknown} */
+ node
+ );
+ let key2;
+ for (key2 in check) {
+ if (nodeAsRecord[key2] !== checkAsRecord[key2])
+ return false;
+ }
+ return true;
+ }
+}
+function typeFactory(check) {
+ return castFactory(type);
+ function type(node) {
+ return node && node.type === check;
+ }
+}
+function castFactory(testFunction) {
+ return check;
+ function check(value, index2, parent) {
+ return Boolean(
+ looksLikeANode(value) && testFunction.call(
+ this,
+ value,
+ typeof index2 === "number" ? index2 : void 0,
+ parent || void 0
+ )
+ );
+ }
+}
+function ok() {
+ return true;
+}
+function looksLikeANode(value) {
+ return value !== null && typeof value === "object" && "type" in value;
}
-// node_modules/trough/index.js
-function trough() {
- const fns = [];
- const pipeline = { run, use };
- return pipeline;
- function run(...values) {
- let middlewareIndex = -1;
- const callback = values.pop();
- if (typeof callback !== "function") {
- throw new TypeError("Expected function as last argument, not " + callback);
+// node_modules/unist-util-visit-parents/lib/color.js
+function color(d2) {
+ return d2;
+}
+
+// node_modules/unist-util-visit-parents/lib/index.js
+var empty = [];
+var CONTINUE = true;
+var EXIT = false;
+var SKIP = "skip";
+function visitParents(tree, test, visitor, reverse) {
+ let check;
+ if (typeof test === "function" && typeof visitor !== "function") {
+ reverse = visitor;
+ visitor = test;
+ } else {
+ check = test;
+ }
+ const is2 = convert(check);
+ const step = reverse ? -1 : 1;
+ factory(tree, void 0, [])();
+ function factory(node, index2, parents) {
+ const value = (
+ /** @type {Record} */
+ node && typeof node === "object" ? node : {}
+ );
+ if (typeof value.type === "string") {
+ const name = (
+ // `hast`
+ typeof value.tagName === "string" ? value.tagName : (
+ // `xast`
+ typeof value.name === "string" ? value.name : void 0
+ )
+ );
+ Object.defineProperty(visit, "name", {
+ value: "node (" + color(node.type + (name ? "<" + name + ">" : "")) + ")"
+ });
}
- next(null, ...values);
- function next(error, ...output) {
- const fn = fns[++middlewareIndex];
- let index2 = -1;
- if (error) {
- callback(error);
- return;
- }
- while (++index2 < values.length) {
- if (output[index2] === null || output[index2] === void 0) {
- output[index2] = values[index2];
+ return visit;
+ function visit() {
+ let result = empty;
+ let subresult;
+ let offset;
+ let grandparents;
+ if (!test || is2(node, index2, parents[parents.length - 1] || void 0)) {
+ result = toResult(visitor(node, parents));
+ if (result[0] === EXIT) {
+ return result;
}
}
- values = output;
- if (fn) {
- wrap(fn, next)(...output);
- } else {
- callback(null, ...output);
+ if ("children" in node && node.children) {
+ const nodeAsParent = (
+ /** @type {UnistParent} */
+ node
+ );
+ if (nodeAsParent.children && result[0] !== SKIP) {
+ offset = (reverse ? nodeAsParent.children.length : -1) + step;
+ grandparents = parents.concat(nodeAsParent);
+ while (offset > -1 && offset < nodeAsParent.children.length) {
+ const child = nodeAsParent.children[offset];
+ subresult = factory(child, offset, grandparents)();
+ if (subresult[0] === EXIT) {
+ return subresult;
+ }
+ offset = typeof subresult[1] === "number" ? subresult[1] : offset + step;
+ }
+ }
}
+ return result;
}
}
- function use(middelware) {
- if (typeof middelware !== "function") {
- throw new TypeError(
- "Expected `middelware` to be a function, not " + middelware
- );
- }
- fns.push(middelware);
- return pipeline;
- }
}
-function wrap(middleware, callback) {
- let called;
- return wrapped;
- function wrapped(...parameters) {
- const fnExpectsCallback = middleware.length > parameters.length;
- let result;
- if (fnExpectsCallback) {
- parameters.push(done);
+function toResult(value) {
+ if (Array.isArray(value)) {
+ return value;
+ }
+ if (typeof value === "number") {
+ return [CONTINUE, value];
+ }
+ return value === null || value === void 0 ? empty : [value];
+}
+
+// node_modules/devlop/lib/default.js
+function ok2() {
+}
+
+// node_modules/property-information/lib/util/schema.js
+var Schema = class {
+ /**
+ * @constructor
+ * @param {Properties} property
+ * @param {Normal} normal
+ * @param {string} [space]
+ */
+ constructor(property, normal, space) {
+ this.property = property;
+ this.normal = normal;
+ if (space) {
+ this.space = space;
}
- try {
- result = middleware.apply(this, parameters);
- } catch (error) {
- const exception = (
- /** @type {Error} */
- error
- );
- if (fnExpectsCallback && called) {
- throw exception;
- }
- return done(exception);
- }
- if (!fnExpectsCallback) {
- if (result instanceof Promise) {
- result.then(then, done);
- } else if (result instanceof Error) {
- done(result);
- } else {
- then(result);
+ }
+};
+Schema.prototype.property = {};
+Schema.prototype.normal = {};
+Schema.prototype.space = null;
+
+// node_modules/property-information/lib/util/merge.js
+function merge(definitions, space) {
+ const property = {};
+ const normal = {};
+ let index2 = -1;
+ while (++index2 < definitions.length) {
+ Object.assign(property, definitions[index2].property);
+ Object.assign(normal, definitions[index2].normal);
+ }
+ return new Schema(property, normal, space);
+}
+
+// node_modules/property-information/lib/normalize.js
+function normalize(value) {
+ return value.toLowerCase();
+}
+
+// node_modules/property-information/lib/util/info.js
+var Info = class {
+ /**
+ * @constructor
+ * @param {string} property
+ * @param {string} attribute
+ */
+ constructor(property, attribute) {
+ this.property = property;
+ this.attribute = attribute;
+ }
+};
+Info.prototype.space = null;
+Info.prototype.boolean = false;
+Info.prototype.booleanish = false;
+Info.prototype.overloadedBoolean = false;
+Info.prototype.number = false;
+Info.prototype.commaSeparated = false;
+Info.prototype.spaceSeparated = false;
+Info.prototype.commaOrSpaceSeparated = false;
+Info.prototype.mustUseProperty = false;
+Info.prototype.defined = false;
+
+// node_modules/property-information/lib/util/types.js
+var types_exports = {};
+__export(types_exports, {
+ boolean: () => boolean,
+ booleanish: () => booleanish,
+ commaOrSpaceSeparated: () => commaOrSpaceSeparated,
+ commaSeparated: () => commaSeparated,
+ number: () => number,
+ overloadedBoolean: () => overloadedBoolean,
+ spaceSeparated: () => spaceSeparated
+});
+var powers = 0;
+var boolean = increment();
+var booleanish = increment();
+var overloadedBoolean = increment();
+var number = increment();
+var spaceSeparated = increment();
+var commaSeparated = increment();
+var commaOrSpaceSeparated = increment();
+function increment() {
+ return 2 ** ++powers;
+}
+
+// node_modules/property-information/lib/util/defined-info.js
+var checks = Object.keys(types_exports);
+var DefinedInfo = class extends Info {
+ /**
+ * @constructor
+ * @param {string} property
+ * @param {string} attribute
+ * @param {number|null} [mask]
+ * @param {string} [space]
+ */
+ constructor(property, attribute, mask, space) {
+ let index2 = -1;
+ super(property, attribute);
+ mark(this, "space", space);
+ if (typeof mask === "number") {
+ while (++index2 < checks.length) {
+ const check = checks[index2];
+ mark(this, checks[index2], (mask & types_exports[check]) === types_exports[check]);
}
}
}
- function done(error, ...output) {
- if (!called) {
- called = true;
- callback(error, ...output);
- }
- }
- function then(value) {
- done(null, value);
+};
+DefinedInfo.prototype.defined = true;
+function mark(values, key2, value) {
+ if (value) {
+ values[key2] = value;
}
}
-// node_modules/vfile/lib/index.js
-var import_is_buffer = __toESM(require_is_buffer(), 1);
+// node_modules/property-information/lib/util/create.js
+var own = {}.hasOwnProperty;
+function create(definition) {
+ const property = {};
+ const normal = {};
+ let prop;
+ for (prop in definition.properties) {
+ if (own.call(definition.properties, prop)) {
+ const value = definition.properties[prop];
+ const info = new DefinedInfo(
+ prop,
+ definition.transform(definition.attributes || {}, prop),
+ value,
+ definition.space
+ );
+ if (definition.mustUseProperty && definition.mustUseProperty.includes(prop)) {
+ info.mustUseProperty = true;
+ }
+ property[prop] = info;
+ normal[normalize(prop)] = prop;
+ normal[normalize(info.attribute)] = prop;
+ }
+ }
+ return new Schema(property, normal, definition.space);
+}
-// node_modules/unist-util-stringify-position/lib/index.js
+// node_modules/property-information/lib/xlink.js
+var xlink = create({
+ space: "xlink",
+ transform(_2, prop) {
+ return "xlink:" + prop.slice(5).toLowerCase();
+ },
+ properties: {
+ xLinkActuate: null,
+ xLinkArcRole: null,
+ xLinkHref: null,
+ xLinkRole: null,
+ xLinkShow: null,
+ xLinkTitle: null,
+ xLinkType: null
+ }
+});
+
+// node_modules/property-information/lib/xml.js
+var xml = create({
+ space: "xml",
+ transform(_2, prop) {
+ return "xml:" + prop.slice(3).toLowerCase();
+ },
+ properties: { xmlLang: null, xmlBase: null, xmlSpace: null }
+});
+
+// node_modules/property-information/lib/util/case-sensitive-transform.js
+function caseSensitiveTransform(attributes, attribute) {
+ return attribute in attributes ? attributes[attribute] : attribute;
+}
+
+// node_modules/property-information/lib/util/case-insensitive-transform.js
+function caseInsensitiveTransform(attributes, property) {
+ return caseSensitiveTransform(attributes, property.toLowerCase());
+}
+
+// node_modules/property-information/lib/xmlns.js
+var xmlns = create({
+ space: "xmlns",
+ attributes: { xmlnsxlink: "xmlns:xlink" },
+ transform: caseInsensitiveTransform,
+ properties: { xmlns: null, xmlnsXLink: null }
+});
+
+// node_modules/property-information/lib/aria.js
+var aria = create({
+ transform(_2, prop) {
+ return prop === "role" ? prop : "aria-" + prop.slice(4).toLowerCase();
+ },
+ properties: {
+ ariaActiveDescendant: null,
+ ariaAtomic: booleanish,
+ ariaAutoComplete: null,
+ ariaBusy: booleanish,
+ ariaChecked: booleanish,
+ ariaColCount: number,
+ ariaColIndex: number,
+ ariaColSpan: number,
+ ariaControls: spaceSeparated,
+ ariaCurrent: null,
+ ariaDescribedBy: spaceSeparated,
+ ariaDetails: null,
+ ariaDisabled: booleanish,
+ ariaDropEffect: spaceSeparated,
+ ariaErrorMessage: null,
+ ariaExpanded: booleanish,
+ ariaFlowTo: spaceSeparated,
+ ariaGrabbed: booleanish,
+ ariaHasPopup: null,
+ ariaHidden: booleanish,
+ ariaInvalid: null,
+ ariaKeyShortcuts: null,
+ ariaLabel: null,
+ ariaLabelledBy: spaceSeparated,
+ ariaLevel: number,
+ ariaLive: null,
+ ariaModal: booleanish,
+ ariaMultiLine: booleanish,
+ ariaMultiSelectable: booleanish,
+ ariaOrientation: null,
+ ariaOwns: spaceSeparated,
+ ariaPlaceholder: null,
+ ariaPosInSet: number,
+ ariaPressed: booleanish,
+ ariaReadOnly: booleanish,
+ ariaRelevant: null,
+ ariaRequired: booleanish,
+ ariaRoleDescription: spaceSeparated,
+ ariaRowCount: number,
+ ariaRowIndex: number,
+ ariaRowSpan: number,
+ ariaSelected: booleanish,
+ ariaSetSize: number,
+ ariaSort: null,
+ ariaValueMax: number,
+ ariaValueMin: number,
+ ariaValueNow: number,
+ ariaValueText: null,
+ role: null
+ }
+});
+
+// node_modules/property-information/lib/html.js
+var html = create({
+ space: "html",
+ attributes: {
+ acceptcharset: "accept-charset",
+ classname: "class",
+ htmlfor: "for",
+ httpequiv: "http-equiv"
+ },
+ transform: caseInsensitiveTransform,
+ mustUseProperty: ["checked", "multiple", "muted", "selected"],
+ properties: {
+ // Standard Properties.
+ abbr: null,
+ accept: commaSeparated,
+ acceptCharset: spaceSeparated,
+ accessKey: spaceSeparated,
+ action: null,
+ allow: null,
+ allowFullScreen: boolean,
+ allowPaymentRequest: boolean,
+ allowUserMedia: boolean,
+ alt: null,
+ as: null,
+ async: boolean,
+ autoCapitalize: null,
+ autoComplete: spaceSeparated,
+ autoFocus: boolean,
+ autoPlay: boolean,
+ capture: boolean,
+ charSet: null,
+ checked: boolean,
+ cite: null,
+ className: spaceSeparated,
+ cols: number,
+ colSpan: null,
+ content: null,
+ contentEditable: booleanish,
+ controls: boolean,
+ controlsList: spaceSeparated,
+ coords: number | commaSeparated,
+ crossOrigin: null,
+ data: null,
+ dateTime: null,
+ decoding: null,
+ default: boolean,
+ defer: boolean,
+ dir: null,
+ dirName: null,
+ disabled: boolean,
+ download: overloadedBoolean,
+ draggable: booleanish,
+ encType: null,
+ enterKeyHint: null,
+ form: null,
+ formAction: null,
+ formEncType: null,
+ formMethod: null,
+ formNoValidate: boolean,
+ formTarget: null,
+ headers: spaceSeparated,
+ height: number,
+ hidden: boolean,
+ high: number,
+ href: null,
+ hrefLang: null,
+ htmlFor: spaceSeparated,
+ httpEquiv: spaceSeparated,
+ id: null,
+ imageSizes: null,
+ imageSrcSet: null,
+ inputMode: null,
+ integrity: null,
+ is: null,
+ isMap: boolean,
+ itemId: null,
+ itemProp: spaceSeparated,
+ itemRef: spaceSeparated,
+ itemScope: boolean,
+ itemType: spaceSeparated,
+ kind: null,
+ label: null,
+ lang: null,
+ language: null,
+ list: null,
+ loading: null,
+ loop: boolean,
+ low: number,
+ manifest: null,
+ max: null,
+ maxLength: number,
+ media: null,
+ method: null,
+ min: null,
+ minLength: number,
+ multiple: boolean,
+ muted: boolean,
+ name: null,
+ nonce: null,
+ noModule: boolean,
+ noValidate: boolean,
+ onAbort: null,
+ onAfterPrint: null,
+ onAuxClick: null,
+ onBeforeMatch: null,
+ onBeforePrint: null,
+ onBeforeUnload: null,
+ onBlur: null,
+ onCancel: null,
+ onCanPlay: null,
+ onCanPlayThrough: null,
+ onChange: null,
+ onClick: null,
+ onClose: null,
+ onContextLost: null,
+ onContextMenu: null,
+ onContextRestored: null,
+ onCopy: null,
+ onCueChange: null,
+ onCut: null,
+ onDblClick: null,
+ onDrag: null,
+ onDragEnd: null,
+ onDragEnter: null,
+ onDragExit: null,
+ onDragLeave: null,
+ onDragOver: null,
+ onDragStart: null,
+ onDrop: null,
+ onDurationChange: null,
+ onEmptied: null,
+ onEnded: null,
+ onError: null,
+ onFocus: null,
+ onFormData: null,
+ onHashChange: null,
+ onInput: null,
+ onInvalid: null,
+ onKeyDown: null,
+ onKeyPress: null,
+ onKeyUp: null,
+ onLanguageChange: null,
+ onLoad: null,
+ onLoadedData: null,
+ onLoadedMetadata: null,
+ onLoadEnd: null,
+ onLoadStart: null,
+ onMessage: null,
+ onMessageError: null,
+ onMouseDown: null,
+ onMouseEnter: null,
+ onMouseLeave: null,
+ onMouseMove: null,
+ onMouseOut: null,
+ onMouseOver: null,
+ onMouseUp: null,
+ onOffline: null,
+ onOnline: null,
+ onPageHide: null,
+ onPageShow: null,
+ onPaste: null,
+ onPause: null,
+ onPlay: null,
+ onPlaying: null,
+ onPopState: null,
+ onProgress: null,
+ onRateChange: null,
+ onRejectionHandled: null,
+ onReset: null,
+ onResize: null,
+ onScroll: null,
+ onScrollEnd: null,
+ onSecurityPolicyViolation: null,
+ onSeeked: null,
+ onSeeking: null,
+ onSelect: null,
+ onSlotChange: null,
+ onStalled: null,
+ onStorage: null,
+ onSubmit: null,
+ onSuspend: null,
+ onTimeUpdate: null,
+ onToggle: null,
+ onUnhandledRejection: null,
+ onUnload: null,
+ onVolumeChange: null,
+ onWaiting: null,
+ onWheel: null,
+ open: boolean,
+ optimum: number,
+ pattern: null,
+ ping: spaceSeparated,
+ placeholder: null,
+ playsInline: boolean,
+ poster: null,
+ preload: null,
+ readOnly: boolean,
+ referrerPolicy: null,
+ rel: spaceSeparated,
+ required: boolean,
+ reversed: boolean,
+ rows: number,
+ rowSpan: number,
+ sandbox: spaceSeparated,
+ scope: null,
+ scoped: boolean,
+ seamless: boolean,
+ selected: boolean,
+ shape: null,
+ size: number,
+ sizes: null,
+ slot: null,
+ span: number,
+ spellCheck: booleanish,
+ src: null,
+ srcDoc: null,
+ srcLang: null,
+ srcSet: null,
+ start: number,
+ step: null,
+ style: null,
+ tabIndex: number,
+ target: null,
+ title: null,
+ translate: null,
+ type: null,
+ typeMustMatch: boolean,
+ useMap: null,
+ value: booleanish,
+ width: number,
+ wrap: null,
+ // Legacy.
+ // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis
+ align: null,
+ // Several. Use CSS `text-align` instead,
+ aLink: null,
+ // ``. Use CSS `a:active {color}` instead
+ archive: spaceSeparated,
+ // `