@quanta-intellect/vessel-browser 0.1.74 → 0.1.76
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/README.md
CHANGED
|
@@ -61,7 +61,10 @@ curl -fsSL https://raw.githubusercontent.com/unmodeled-tyler/quanta-vessel-brows
|
|
|
61
61
|
|
|
62
62
|
### Development From Source
|
|
63
63
|
|
|
64
|
+
Vessel development uses Node.js 22. If you use `fnm`, run `fnm use` from the repo root to pick up `.node-version`.
|
|
65
|
+
|
|
64
66
|
```bash
|
|
67
|
+
fnm use
|
|
65
68
|
npm install
|
|
66
69
|
npm run dev
|
|
67
70
|
```
|
|
@@ -189,6 +192,9 @@ vessel-browser
|
|
|
189
192
|
```
|
|
190
193
|
|
|
191
194
|
```bash
|
|
195
|
+
# Use the pinned Node.js 22 runtime
|
|
196
|
+
fnm use
|
|
197
|
+
|
|
192
198
|
# Install dependencies
|
|
193
199
|
npm install
|
|
194
200
|
|
|
@@ -4732,13 +4732,19 @@ const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
|
|
|
4732
4732
|
const arrayPop = unapply(Array.prototype.pop);
|
|
4733
4733
|
const arrayPush = unapply(Array.prototype.push);
|
|
4734
4734
|
const arraySplice = unapply(Array.prototype.splice);
|
|
4735
|
+
const arrayIsArray = Array.isArray;
|
|
4735
4736
|
const stringToLowerCase = unapply(String.prototype.toLowerCase);
|
|
4736
4737
|
const stringToString = unapply(String.prototype.toString);
|
|
4737
4738
|
const stringMatch = unapply(String.prototype.match);
|
|
4738
4739
|
const stringReplace = unapply(String.prototype.replace);
|
|
4739
4740
|
const stringIndexOf = unapply(String.prototype.indexOf);
|
|
4740
4741
|
const stringTrim = unapply(String.prototype.trim);
|
|
4742
|
+
const numberToString = unapply(Number.prototype.toString);
|
|
4743
|
+
const booleanToString = unapply(Boolean.prototype.toString);
|
|
4744
|
+
const bigintToString = typeof BigInt === "undefined" ? null : unapply(BigInt.prototype.toString);
|
|
4745
|
+
const symbolToString = typeof Symbol === "undefined" ? null : unapply(Symbol.prototype.toString);
|
|
4741
4746
|
const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
|
|
4747
|
+
const objectToString = unapply(Object.prototype.toString);
|
|
4742
4748
|
const regExpTest = unapply(RegExp.prototype.test);
|
|
4743
4749
|
const typeErrorCreate = unconstruct(TypeError);
|
|
4744
4750
|
function unapply(func) {
|
|
@@ -4765,6 +4771,9 @@ function addToSet(set, array) {
|
|
|
4765
4771
|
if (setPrototypeOf) {
|
|
4766
4772
|
setPrototypeOf(set, null);
|
|
4767
4773
|
}
|
|
4774
|
+
if (!arrayIsArray(array)) {
|
|
4775
|
+
return set;
|
|
4776
|
+
}
|
|
4768
4777
|
let l = array.length;
|
|
4769
4778
|
while (l--) {
|
|
4770
4779
|
let element = array[l];
|
|
@@ -4795,7 +4804,7 @@ function clone(object) {
|
|
|
4795
4804
|
for (const [property, value] of entries(object)) {
|
|
4796
4805
|
const isPropertyExist = objectHasOwnProperty(object, property);
|
|
4797
4806
|
if (isPropertyExist) {
|
|
4798
|
-
if (
|
|
4807
|
+
if (arrayIsArray(value)) {
|
|
4799
4808
|
newObject[property] = cleanArray(value);
|
|
4800
4809
|
} else if (value && typeof value === "object" && value.constructor === Object) {
|
|
4801
4810
|
newObject[property] = clone(value);
|
|
@@ -4806,6 +4815,44 @@ function clone(object) {
|
|
|
4806
4815
|
}
|
|
4807
4816
|
return newObject;
|
|
4808
4817
|
}
|
|
4818
|
+
function stringifyValue(value) {
|
|
4819
|
+
switch (typeof value) {
|
|
4820
|
+
case "string": {
|
|
4821
|
+
return value;
|
|
4822
|
+
}
|
|
4823
|
+
case "number": {
|
|
4824
|
+
return numberToString(value);
|
|
4825
|
+
}
|
|
4826
|
+
case "boolean": {
|
|
4827
|
+
return booleanToString(value);
|
|
4828
|
+
}
|
|
4829
|
+
case "bigint": {
|
|
4830
|
+
return bigintToString ? bigintToString(value) : "0";
|
|
4831
|
+
}
|
|
4832
|
+
case "symbol": {
|
|
4833
|
+
return symbolToString ? symbolToString(value) : "Symbol()";
|
|
4834
|
+
}
|
|
4835
|
+
case "undefined": {
|
|
4836
|
+
return objectToString(value);
|
|
4837
|
+
}
|
|
4838
|
+
case "function":
|
|
4839
|
+
case "object": {
|
|
4840
|
+
if (value === null) {
|
|
4841
|
+
return objectToString(value);
|
|
4842
|
+
}
|
|
4843
|
+
const valueAsRecord = value;
|
|
4844
|
+
const valueToString = lookupGetter(valueAsRecord, "toString");
|
|
4845
|
+
if (typeof valueToString === "function") {
|
|
4846
|
+
const stringified = valueToString(valueAsRecord);
|
|
4847
|
+
return typeof stringified === "string" ? stringified : objectToString(stringified);
|
|
4848
|
+
}
|
|
4849
|
+
return objectToString(value);
|
|
4850
|
+
}
|
|
4851
|
+
default: {
|
|
4852
|
+
return objectToString(value);
|
|
4853
|
+
}
|
|
4854
|
+
}
|
|
4855
|
+
}
|
|
4809
4856
|
function lookupGetter(object, prop) {
|
|
4810
4857
|
while (object !== null) {
|
|
4811
4858
|
const desc = getOwnPropertyDescriptor(object, prop);
|
|
@@ -4824,6 +4871,14 @@ function lookupGetter(object, prop) {
|
|
|
4824
4871
|
}
|
|
4825
4872
|
return fallbackValue;
|
|
4826
4873
|
}
|
|
4874
|
+
function isRegex(value) {
|
|
4875
|
+
try {
|
|
4876
|
+
regExpTest(value, "");
|
|
4877
|
+
return true;
|
|
4878
|
+
} catch (_unused) {
|
|
4879
|
+
return false;
|
|
4880
|
+
}
|
|
4881
|
+
}
|
|
4827
4882
|
const html$1 = freeze(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]);
|
|
4828
4883
|
const svg$1 = freeze(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]);
|
|
4829
4884
|
const svgFilters = freeze(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]);
|
|
@@ -4831,9 +4886,9 @@ const svgDisallowed = freeze(["animate", "color-profile", "cursor", "discard", "
|
|
|
4831
4886
|
const mathMl$1 = freeze(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]);
|
|
4832
4887
|
const mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]);
|
|
4833
4888
|
const text = freeze(["#text"]);
|
|
4834
|
-
const html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"
|
|
4889
|
+
const html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]);
|
|
4835
4890
|
const svg = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]);
|
|
4836
|
-
const mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "
|
|
4891
|
+
const mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]);
|
|
4837
4892
|
const xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]);
|
|
4838
4893
|
const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm);
|
|
4839
4894
|
const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
|
|
@@ -4915,7 +4970,7 @@ const _createHooksMap = function _createHooksMap2() {
|
|
|
4915
4970
|
function createDOMPurify() {
|
|
4916
4971
|
let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
|
|
4917
4972
|
const DOMPurify = (root2) => createDOMPurify(root2);
|
|
4918
|
-
DOMPurify.version = "3.
|
|
4973
|
+
DOMPurify.version = "3.4.2";
|
|
4919
4974
|
DOMPurify.removed = [];
|
|
4920
4975
|
if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
|
|
4921
4976
|
DOMPurify.isSupported = false;
|
|
@@ -5070,15 +5125,15 @@ function createDOMPurify() {
|
|
|
5070
5125
|
PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes
|
|
5071
5126
|
SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
|
|
5072
5127
|
transformCaseFunc = PARSER_MEDIA_TYPE === "application/xhtml+xml" ? stringToString : stringToLowerCase;
|
|
5073
|
-
ALLOWED_TAGS = objectHasOwnProperty(cfg, "ALLOWED_TAGS") ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
|
|
5074
|
-
ALLOWED_ATTR = objectHasOwnProperty(cfg, "ALLOWED_ATTR") ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
|
|
5075
|
-
ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, "ALLOWED_NAMESPACES") ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
|
|
5076
|
-
URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
|
|
5077
|
-
DATA_URI_TAGS = objectHasOwnProperty(cfg, "ADD_DATA_URI_TAGS") ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
|
|
5078
|
-
FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
|
|
5079
|
-
FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
|
|
5080
|
-
FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
|
|
5081
|
-
USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES : false;
|
|
5128
|
+
ALLOWED_TAGS = objectHasOwnProperty(cfg, "ALLOWED_TAGS") && arrayIsArray(cfg.ALLOWED_TAGS) ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
|
|
5129
|
+
ALLOWED_ATTR = objectHasOwnProperty(cfg, "ALLOWED_ATTR") && arrayIsArray(cfg.ALLOWED_ATTR) ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
|
|
5130
|
+
ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, "ALLOWED_NAMESPACES") && arrayIsArray(cfg.ALLOWED_NAMESPACES) ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
|
|
5131
|
+
URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") && arrayIsArray(cfg.ADD_URI_SAFE_ATTR) ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
|
|
5132
|
+
DATA_URI_TAGS = objectHasOwnProperty(cfg, "ADD_DATA_URI_TAGS") && arrayIsArray(cfg.ADD_DATA_URI_TAGS) ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
|
|
5133
|
+
FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") && arrayIsArray(cfg.FORBID_CONTENTS) ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
|
|
5134
|
+
FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") && arrayIsArray(cfg.FORBID_TAGS) ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
|
|
5135
|
+
FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") && arrayIsArray(cfg.FORBID_ATTR) ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
|
|
5136
|
+
USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === "object" ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;
|
|
5082
5137
|
ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;
|
|
5083
5138
|
ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;
|
|
5084
5139
|
ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false;
|
|
@@ -5094,19 +5149,20 @@ function createDOMPurify() {
|
|
|
5094
5149
|
SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false;
|
|
5095
5150
|
KEEP_CONTENT = cfg.KEEP_CONTENT !== false;
|
|
5096
5151
|
IN_PLACE = cfg.IN_PLACE || false;
|
|
5097
|
-
IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP
|
|
5098
|
-
NAMESPACE = cfg.NAMESPACE
|
|
5099
|
-
MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS
|
|
5100
|
-
HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5152
|
+
IS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI;
|
|
5153
|
+
NAMESPACE = typeof cfg.NAMESPACE === "string" ? cfg.NAMESPACE : HTML_NAMESPACE;
|
|
5154
|
+
MATHML_TEXT_INTEGRATION_POINTS = objectHasOwnProperty(cfg, "MATHML_TEXT_INTEGRATION_POINTS") && cfg.MATHML_TEXT_INTEGRATION_POINTS && typeof cfg.MATHML_TEXT_INTEGRATION_POINTS === "object" ? clone(cfg.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]);
|
|
5155
|
+
HTML_INTEGRATION_POINTS = objectHasOwnProperty(cfg, "HTML_INTEGRATION_POINTS") && cfg.HTML_INTEGRATION_POINTS && typeof cfg.HTML_INTEGRATION_POINTS === "object" ? clone(cfg.HTML_INTEGRATION_POINTS) : addToSet({}, ["annotation-xml"]);
|
|
5156
|
+
const customElementHandling = objectHasOwnProperty(cfg, "CUSTOM_ELEMENT_HANDLING") && cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING === "object" ? clone(cfg.CUSTOM_ELEMENT_HANDLING) : create(null);
|
|
5157
|
+
CUSTOM_ELEMENT_HANDLING = create(null);
|
|
5158
|
+
if (objectHasOwnProperty(customElementHandling, "tagNameCheck") && isRegexOrFunction(customElementHandling.tagNameCheck)) {
|
|
5159
|
+
CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck;
|
|
5104
5160
|
}
|
|
5105
|
-
if (
|
|
5106
|
-
CUSTOM_ELEMENT_HANDLING.attributeNameCheck =
|
|
5161
|
+
if (objectHasOwnProperty(customElementHandling, "attributeNameCheck") && isRegexOrFunction(customElementHandling.attributeNameCheck)) {
|
|
5162
|
+
CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck;
|
|
5107
5163
|
}
|
|
5108
|
-
if (
|
|
5109
|
-
CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements =
|
|
5164
|
+
if (objectHasOwnProperty(customElementHandling, "allowCustomizedBuiltInElements") && typeof customElementHandling.allowCustomizedBuiltInElements === "boolean") {
|
|
5165
|
+
CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements;
|
|
5110
5166
|
}
|
|
5111
5167
|
if (SAFE_FOR_TEMPLATES) {
|
|
5112
5168
|
ALLOW_DATA_ATTR = false;
|
|
@@ -5137,42 +5193,38 @@ function createDOMPurify() {
|
|
|
5137
5193
|
addToSet(ALLOWED_ATTR, xml);
|
|
5138
5194
|
}
|
|
5139
5195
|
}
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
if (!objectHasOwnProperty(cfg, "ADD_ATTR")) {
|
|
5144
|
-
EXTRA_ELEMENT_HANDLING.attributeCheck = null;
|
|
5145
|
-
}
|
|
5146
|
-
if (cfg.ADD_TAGS) {
|
|
5196
|
+
EXTRA_ELEMENT_HANDLING.tagCheck = null;
|
|
5197
|
+
EXTRA_ELEMENT_HANDLING.attributeCheck = null;
|
|
5198
|
+
if (objectHasOwnProperty(cfg, "ADD_TAGS")) {
|
|
5147
5199
|
if (typeof cfg.ADD_TAGS === "function") {
|
|
5148
5200
|
EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
|
|
5149
|
-
} else {
|
|
5201
|
+
} else if (arrayIsArray(cfg.ADD_TAGS)) {
|
|
5150
5202
|
if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
|
|
5151
5203
|
ALLOWED_TAGS = clone(ALLOWED_TAGS);
|
|
5152
5204
|
}
|
|
5153
5205
|
addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
|
|
5154
5206
|
}
|
|
5155
5207
|
}
|
|
5156
|
-
if (cfg
|
|
5208
|
+
if (objectHasOwnProperty(cfg, "ADD_ATTR")) {
|
|
5157
5209
|
if (typeof cfg.ADD_ATTR === "function") {
|
|
5158
5210
|
EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;
|
|
5159
|
-
} else {
|
|
5211
|
+
} else if (arrayIsArray(cfg.ADD_ATTR)) {
|
|
5160
5212
|
if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
|
|
5161
5213
|
ALLOWED_ATTR = clone(ALLOWED_ATTR);
|
|
5162
5214
|
}
|
|
5163
5215
|
addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
|
|
5164
5216
|
}
|
|
5165
5217
|
}
|
|
5166
|
-
if (cfg.ADD_URI_SAFE_ATTR) {
|
|
5218
|
+
if (objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") && arrayIsArray(cfg.ADD_URI_SAFE_ATTR)) {
|
|
5167
5219
|
addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
|
|
5168
5220
|
}
|
|
5169
|
-
if (cfg.FORBID_CONTENTS) {
|
|
5221
|
+
if (objectHasOwnProperty(cfg, "FORBID_CONTENTS") && arrayIsArray(cfg.FORBID_CONTENTS)) {
|
|
5170
5222
|
if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
|
|
5171
5223
|
FORBID_CONTENTS = clone(FORBID_CONTENTS);
|
|
5172
5224
|
}
|
|
5173
5225
|
addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
|
|
5174
5226
|
}
|
|
5175
|
-
if (cfg.ADD_FORBID_CONTENTS) {
|
|
5227
|
+
if (objectHasOwnProperty(cfg, "ADD_FORBID_CONTENTS") && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {
|
|
5176
5228
|
if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
|
|
5177
5229
|
FORBID_CONTENTS = clone(FORBID_CONTENTS);
|
|
5178
5230
|
}
|
|
@@ -5365,6 +5417,10 @@ function createDOMPurify() {
|
|
|
5365
5417
|
_forceRemove(currentNode);
|
|
5366
5418
|
return true;
|
|
5367
5419
|
}
|
|
5420
|
+
if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === "style" && _isNode(currentNode.firstElementChild)) {
|
|
5421
|
+
_forceRemove(currentNode);
|
|
5422
|
+
return true;
|
|
5423
|
+
}
|
|
5368
5424
|
if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
|
|
5369
5425
|
_forceRemove(currentNode);
|
|
5370
5426
|
return true;
|
|
@@ -5373,7 +5429,7 @@ function createDOMPurify() {
|
|
|
5373
5429
|
_forceRemove(currentNode);
|
|
5374
5430
|
return true;
|
|
5375
5431
|
}
|
|
5376
|
-
if (!(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) &&
|
|
5432
|
+
if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {
|
|
5377
5433
|
if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
|
|
5378
5434
|
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
|
|
5379
5435
|
return false;
|
|
@@ -5389,7 +5445,6 @@ function createDOMPurify() {
|
|
|
5389
5445
|
const childCount = childNodes.length;
|
|
5390
5446
|
for (let i = childCount - 1; i >= 0; --i) {
|
|
5391
5447
|
const childClone = cloneNode(childNodes[i], true);
|
|
5392
|
-
childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
|
|
5393
5448
|
parentNode.insertBefore(childClone, getNextSibling(currentNode));
|
|
5394
5449
|
}
|
|
5395
5450
|
}
|
|
@@ -5427,10 +5482,10 @@ function createDOMPurify() {
|
|
|
5427
5482
|
if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in document2 || value in formElement)) {
|
|
5428
5483
|
return false;
|
|
5429
5484
|
}
|
|
5485
|
+
const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);
|
|
5430
5486
|
if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR2, lcName)) ;
|
|
5431
5487
|
else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR2, lcName)) ;
|
|
5432
|
-
else if (
|
|
5433
|
-
else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
|
|
5488
|
+
else if (!nameIsPermitted || FORBID_ATTR[lcName]) {
|
|
5434
5489
|
if (
|
|
5435
5490
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
5436
5491
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
@@ -5451,8 +5506,9 @@ function createDOMPurify() {
|
|
|
5451
5506
|
} else ;
|
|
5452
5507
|
return true;
|
|
5453
5508
|
};
|
|
5509
|
+
const RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]);
|
|
5454
5510
|
const _isBasicCustomElement = function _isBasicCustomElement2(tagName) {
|
|
5455
|
-
return tagName
|
|
5511
|
+
return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT2, tagName);
|
|
5456
5512
|
};
|
|
5457
5513
|
const _sanitizeAttributes = function _sanitizeAttributes2(currentNode) {
|
|
5458
5514
|
_executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
|
|
@@ -5486,7 +5542,7 @@ function createDOMPurify() {
|
|
|
5486
5542
|
hookEvent.forceKeepAttr = void 0;
|
|
5487
5543
|
_executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
|
|
5488
5544
|
value = hookEvent.attrValue;
|
|
5489
|
-
if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name")) {
|
|
5545
|
+
if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name") && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {
|
|
5490
5546
|
_removeAttribute(name, currentNode);
|
|
5491
5547
|
value = SANITIZE_NAMED_PROPS_PREFIX + value;
|
|
5492
5548
|
}
|
|
@@ -5553,7 +5609,7 @@ function createDOMPurify() {
|
|
|
5553
5609
|
}
|
|
5554
5610
|
_executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
|
|
5555
5611
|
};
|
|
5556
|
-
const
|
|
5612
|
+
const _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {
|
|
5557
5613
|
let shadowNode = null;
|
|
5558
5614
|
const shadowIterator = _createNodeIterator(fragment);
|
|
5559
5615
|
_executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
|
|
@@ -5578,13 +5634,9 @@ function createDOMPurify() {
|
|
|
5578
5634
|
dirty = "<!-->";
|
|
5579
5635
|
}
|
|
5580
5636
|
if (typeof dirty !== "string" && !_isNode(dirty)) {
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
throw typeErrorCreate("dirty is not a string, aborting");
|
|
5585
|
-
}
|
|
5586
|
-
} else {
|
|
5587
|
-
throw typeErrorCreate("toString is not a function");
|
|
5637
|
+
dirty = stringifyValue(dirty);
|
|
5638
|
+
if (typeof dirty !== "string") {
|
|
5639
|
+
throw typeErrorCreate("dirty is not a string, aborting");
|
|
5588
5640
|
}
|
|
5589
5641
|
}
|
|
5590
5642
|
if (!DOMPurify.isSupported) {
|
|
@@ -5598,8 +5650,9 @@ function createDOMPurify() {
|
|
|
5598
5650
|
IN_PLACE = false;
|
|
5599
5651
|
}
|
|
5600
5652
|
if (IN_PLACE) {
|
|
5601
|
-
|
|
5602
|
-
|
|
5653
|
+
const nn = dirty.nodeName;
|
|
5654
|
+
if (typeof nn === "string") {
|
|
5655
|
+
const tagName = transformCaseFunc(nn);
|
|
5603
5656
|
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
|
|
5604
5657
|
throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
|
|
5605
5658
|
}
|
|
@@ -5632,13 +5685,21 @@ function createDOMPurify() {
|
|
|
5632
5685
|
_sanitizeElements(currentNode);
|
|
5633
5686
|
_sanitizeAttributes(currentNode);
|
|
5634
5687
|
if (currentNode.content instanceof DocumentFragment) {
|
|
5635
|
-
|
|
5688
|
+
_sanitizeShadowDOM2(currentNode.content);
|
|
5636
5689
|
}
|
|
5637
5690
|
}
|
|
5638
5691
|
if (IN_PLACE) {
|
|
5639
5692
|
return dirty;
|
|
5640
5693
|
}
|
|
5641
5694
|
if (RETURN_DOM) {
|
|
5695
|
+
if (SAFE_FOR_TEMPLATES) {
|
|
5696
|
+
body.normalize();
|
|
5697
|
+
let html2 = body.innerHTML;
|
|
5698
|
+
arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
|
|
5699
|
+
html2 = stringReplace(html2, expr, " ");
|
|
5700
|
+
});
|
|
5701
|
+
body.innerHTML = html2;
|
|
5702
|
+
}
|
|
5642
5703
|
if (RETURN_DOM_FRAGMENT) {
|
|
5643
5704
|
returnNode = createDocumentFragment.call(body.ownerDocument);
|
|
5644
5705
|
while (body.firstChild) {
|
package/out/renderer/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; connect-src 'self'; font-src 'self' data:;" />
|
|
7
7
|
<title>Vessel</title>
|
|
8
|
-
<script type="module" crossorigin src="./assets/index-
|
|
8
|
+
<script type="module" crossorigin src="./assets/index-Dulr1nPi.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="./assets/index-D3rrgL9t.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quanta-intellect/vessel-browser",
|
|
3
3
|
"mcpName": "io.github.unmodeled-tyler/vessel-browser",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.76",
|
|
5
5
|
"description": "AI-native web browser runtime for autonomous agents with human supervision",
|
|
6
6
|
"main": "./out/main/index.js",
|
|
7
7
|
"bin": {
|
|
@@ -55,28 +55,33 @@
|
|
|
55
55
|
"type": "git",
|
|
56
56
|
"url": "https://github.com/unmodeled-tyler/quanta-vessel-browser.git"
|
|
57
57
|
},
|
|
58
|
+
"engines": {
|
|
59
|
+
"node": ">=22.12.0",
|
|
60
|
+
"npm": ">=10.0.0"
|
|
61
|
+
},
|
|
62
|
+
"packageManager": "npm@10.9.7",
|
|
58
63
|
"peerDependencies": {
|
|
59
64
|
"electron": ">=30.0.0"
|
|
60
65
|
},
|
|
61
66
|
"devDependencies": {
|
|
62
|
-
"@types/
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"electron": "^40.8.3",
|
|
67
|
+
"@types/node": "^25.6.0",
|
|
68
|
+
"c8": "^11.0.0",
|
|
69
|
+
"electron": "^41.3.0",
|
|
66
70
|
"electron-builder": "^26.8.1",
|
|
67
71
|
"electron-vite": "^5.0.0",
|
|
68
|
-
"
|
|
69
|
-
"solid
|
|
72
|
+
"linkedom": "^0.18.12",
|
|
73
|
+
"lucide-solid": "^1.14.0",
|
|
74
|
+
"solid-js": "^1.9.12",
|
|
70
75
|
"tsx": "^4.21.0",
|
|
71
|
-
"typescript": "^
|
|
72
|
-
"vite-plugin-solid": "^2.11.
|
|
76
|
+
"typescript": "^6.0.3",
|
|
77
|
+
"vite-plugin-solid": "^2.11.12"
|
|
73
78
|
},
|
|
74
79
|
"dependencies": {
|
|
75
|
-
"@anthropic-ai/sdk": "^0.
|
|
76
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
80
|
+
"@anthropic-ai/sdk": "^0.92.0",
|
|
81
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
77
82
|
"@mozilla/readability": "^0.6.0",
|
|
78
|
-
"dompurify": "^3.
|
|
79
|
-
"openai": "^6.
|
|
80
|
-
"zod": "^4.
|
|
83
|
+
"dompurify": "^3.4.2",
|
|
84
|
+
"openai": "^6.35.0",
|
|
85
|
+
"zod": "^4.4.1"
|
|
81
86
|
}
|
|
82
87
|
}
|