@duckmind/dm-darwin-x64 0.35.6 → 0.35.9

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.
@@ -569,9 +569,9 @@
569
569
  "license": "MIT"
570
570
  },
571
571
  "node_modules/nwsapi": {
572
- "version": "2.2.23",
573
- "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.23.tgz",
574
- "integrity": "sha512-7wfH4sLbt4M0gCDzGE6vzQBo0bfTKjU7Sfpqy/7gs1qBfYz2vEJH6vXcBKpO3+6Yu1telwd0t9HpyOoLEQQbIQ==",
572
+ "version": "2.2.24",
573
+ "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.24.tgz",
574
+ "integrity": "sha512-7YRhZ3jS45LwmSCT4b2sVFHt/WuovaktDU07QrtOBY2PXskss5a9jfmR9jptyumwXST+rFjrmppMY1KT/yn35A==",
575
575
  "license": "MIT"
576
576
  },
577
577
  "node_modules/parse5": {
@@ -1,4 +1,4 @@
1
- Copyright (c) 2007-2025 Diego Perini (http://www.iport.it/)
1
+ Copyright (c) 2007-2026 Diego Perini (http://www.iport.it/)
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person
4
4
  obtaining a copy of this software and associated documentation
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nwsapi",
3
- "version": "2.2.23",
3
+ "version": "2.2.24",
4
4
  "description": "Fast CSS Selectors API Engine",
5
5
  "homepage": "https://javascript.nwbox.com/nwsapi/",
6
6
  "main": "./src/nwsapi",
@@ -1,13 +1,13 @@
1
1
  /*
2
- * Copyright (C) 2007-2025 Diego Perini
2
+ * Copyright (C) 2007-2026 Diego Perini
3
3
  * All rights reserved.
4
4
  *
5
5
  * nwsapi.js - Fast CSS Selectors API Engine
6
6
  *
7
7
  * Author: Diego Perini <diego.perini at gmail com>
8
- * Version: 2.2.23
8
+ * Version: 2.2.24
9
9
  * Created: 20070722
10
- * Release: 20251205
10
+ * Release: 20260606
11
11
  *
12
12
  * License:
13
13
  * https://javascript.nwbox.com/nwsapi/MIT-LICENSE
@@ -30,15 +30,15 @@
30
30
 
31
31
  })(this, function Factory(global, Export) {
32
32
 
33
- var version = 'nwsapi-2.2.23',
33
+ var version = 'nwsapi-2.2.24',
34
34
 
35
35
  doc = global.document,
36
36
  root = doc.documentElement,
37
37
  slice = Array.prototype.slice,
38
38
 
39
- HSP = '[\\x20\\t]',
40
- VSP = '[\\r\\n\\f]',
41
- WSP = '[\\x20\\t\\r\\n\\f]',
39
+ HSP = '\\x20\\t',
40
+ VSP = '\\r\\n\\f',
41
+ WSP = '[' + HSP + VSP + ']',
42
42
 
43
43
  CFG = {
44
44
  // extensions
@@ -46,10 +46,6 @@
46
46
  combinators: '[\\x20\\t>+~](?=[^>+~])'
47
47
  },
48
48
 
49
- HAS = {
50
- nestedself: ':has\\x28(?::has\\x28|.*)\\x29)\\x29',
51
- },
52
-
53
49
  NOT = {
54
50
  // not enclosed in double/single/parens/square
55
51
  double_enc: '(?=(?:[^"]*["][^"]*["])*[^"]*$)',
@@ -81,9 +77,9 @@
81
77
 
82
78
  GROUPS = {
83
79
  // pseudo-classes requiring parameters
84
- linguistic: '(dir|lang)(?:\\x28\\s?([-\\w]{2,})\\s?\\x29)',
85
- logicalsel: '(is|where|matches|not|has)(?:\\x28\\s?(' + '[^()]*|.*' + ')\\s?\\x29)',
86
- treestruct: '(nth(?:-last)?(?:-child|-of\\-type))(?:\\x28\\s?(even|odd|(?:[-+]?\\d*)(?:n\\s?[-+]?\\s?\\d*)?)\\s?\\x29)',
80
+ linguistic: '(dir|lang)(?:\\x28\\s?([-\\w]{2,})\\s?(?:\\x29|$))',
81
+ logicalsel: '(is|where|matches|not|has)(?:\\x28\\s?(' + '[^()]*|.*' + ')\\s?(?:\\x29|$))',
82
+ treestruct: '(nth(?:-last)?(?:-child|-of\\-type))(?:\\x28\\s?(even|odd|(?:[-+]?\\d*)(?:n\\s?[-+]?\\s?\\d*)?)\\s?(?:\\x29|$))',
87
83
  // pseudo-classes not requiring parameters
88
84
  locationpc: '(any\\-link|link|visited|target|defined)\\b',
89
85
  useraction: '(hover|active|focus\\-within|focus\\-visible|focus)\\b',
@@ -336,7 +332,11 @@
336
332
 
337
333
  // convert escape sequence in a CSS string or identifier
338
334
  // to javascript string with javascript escape sequences
339
- convertEscapes =
335
+ escapeIdentifier =
336
+ // global.CSS && typeof global.CSS.escape == 'function' ?
337
+ // function(str) {
338
+ // return global.CSS.escape(str);
339
+ // } :
340
340
  function(str) {
341
341
  return REX.HasEscapes.test(str) ?
342
342
  str.replace(REX.FixEscapes,
@@ -708,15 +708,13 @@
708
708
 
709
709
  // non-ascii chars
710
710
  noascii = '[^\\x00-\\x9f]',
711
- // escaped chars
712
- escaped = '\\\\[^\\r\\n\\f0-9a-fA-F]',
713
711
  // unicode chars
714
- unicode = '\\\\[0-9a-fA-F]{1,6}(?:\\r\\n|\\s)?',
712
+ unicode = '\\\\[0-9a-fA-F]{1,6}',
715
713
 
716
714
  // can start with single/double dash
717
715
  // but it can not start with a digit
718
- identifier = '-?(?:[a-zA-Z_-]|' + noascii + '|' + escaped + '|' + unicode + ')' +
719
- '(?:-{2}|[0-9]|[a-zA-Z_-]|' + noascii + '|' + escaped + '|' + unicode + ')*',
716
+ identifier = '(?:-|--|' + unicode + '[' + HSP + ']' +
717
+ '?|\\\\[^' + VSP + ']|' + noascii + '|[\\w-])+',
720
718
 
721
719
  pseudonames = '[-\\w]+',
722
720
  pseudoparms = '(?:[-+]?\\d*)(?:n\\s?[-+]?\\s?\\d*)',
@@ -902,7 +900,7 @@
902
900
  compileSelector =
903
901
  function(expression, source, mode, callback) {
904
902
 
905
- var a, b, n, f, name, NS, referenceElement,
903
+ var a, b, n, f, k = 0, name, NS, referenceElement,
906
904
  compat, expr, match, result, status, symbol, test,
907
905
  type, selector = expression, vars;
908
906
 
@@ -915,6 +913,8 @@
915
913
 
916
914
  while (selector) {
917
915
 
916
+ ++k;
917
+
918
918
  // get namespace prefix if present or get first char of selector
919
919
  symbol = STD.apimethods.test(selector) ? '|' : selector[0];
920
920
 
@@ -978,7 +978,7 @@
978
978
  // whitespace separated list but value contains space
979
979
  break;
980
980
  } else if (match[4]) {
981
- match[4] = convertEscapes(match[4]).replace(REX.RegExpChar, '\\$&');
981
+ match[4] = escapeIdentifier(match[4]).replace(REX.RegExpChar, '\\$&');
982
982
  }
983
983
  type = match[5] == 'i' || (HTML_DOCUMENT && HTML_TABLE[expr.toLowerCase()]) ? 'i' : '';
984
984
  source = 'if((' +
@@ -992,14 +992,14 @@
992
992
  // E ~ F (F relative sibling of E)
993
993
  case '~':
994
994
  match = selector.match(Patterns.relative);
995
- source = 'while(e&&(e=e.previousElementSibling)){' + source + '}';
995
+ source = 'var N' + k + '=e;while(e&&(e=e.previousElementSibling)){' + source + '}e=N' + k + ';';
996
996
  break;
997
997
 
998
998
  // *** Adjacent sibling combinator
999
999
  // E + F (F adiacent sibling of E)
1000
1000
  case '+':
1001
1001
  match = selector.match(Patterns.adjacent);
1002
- source = 'if(e&&(e=e.previousElementSibling)){' + source + '}';
1002
+ source = 'var N' + k + '=e;if(e&&(e=e.previousElementSibling)){' + source + '}e=N' + k + ';';
1003
1003
  break;
1004
1004
 
1005
1005
  // *** Descendant combinator
@@ -1007,14 +1007,14 @@
1007
1007
  case '\x09':
1008
1008
  case '\x20':
1009
1009
  match = selector.match(Patterns.ancestor);
1010
- source = 'while(e&&(e=e.parentElement)){' + source + '}';
1010
+ source = 'var N' + k + '=e;while(e&&(e=e.parentElement)){' + source + '}e=N' + k + ';';
1011
1011
  break;
1012
1012
 
1013
1013
  // *** Child combinator
1014
1014
  // E > F (F children of E)
1015
1015
  case '>':
1016
1016
  match = selector.match(Patterns.children);
1017
- source = 'if(e&&(e=e.parentElement)){' + source + '}';
1017
+ source = 'var N' + k + '=e;if(e&&(e=e.parentElement)){' + source + '}e=N' + k + ';';
1018
1018
  break;
1019
1019
 
1020
1020
  // *** user supplied combinators extensions
@@ -1160,8 +1160,7 @@
1160
1160
  '.querySelectorAll("*' + expr + '")' : '.children') +
1161
1161
  ').includes(e.nextElementSibling)){' + source + '}';
1162
1162
  } else {
1163
- source = 'if(e.querySelector(":scope ' + expr + '"))' +
1164
- '{' + source + '}';
1163
+ source = 'if(s.first(":scope ' + expr + '",e)){' + source + '}';
1165
1164
  }
1166
1165
  break;
1167
1166
  default:
@@ -1534,8 +1533,8 @@
1534
1533
  }
1535
1534
  return selectors.replace(/:scope/i,
1536
1535
  (element.localName) +
1537
- (element.id ? '#' + escape(element.id) : '') +
1538
- (element.className ? '.' + escape(element.classList[0]) : ''));
1536
+ (element.id ? '#' + escapeIdentifier(element.id) : '') +
1537
+ (element.className ? '.' + escapeIdentifier(element.classList[0]) : ''));
1539
1538
  },
1540
1539
 
1541
1540
  // equivalent of w3c 'closest' method
@@ -1578,6 +1577,9 @@
1578
1577
  } else if (arguments[0] === '') {
1579
1578
  emit('\'\'' + qsInvalid);
1580
1579
  return Config.VERBOSITY ? undefined : (type ? none : false);
1580
+ } else if (/^[.#]?\d/.test(selectors)) {
1581
+ emit('\'\'' + qsInvalid);
1582
+ return Config.VERBOSITY ? undefined : (type ? none : false);
1581
1583
  }
1582
1584
 
1583
1585
  // input NULL or UNDEFINED
@@ -1585,12 +1587,8 @@
1585
1587
  selectors = '' + selectors;
1586
1588
  }
1587
1589
 
1588
- if ((/:scope/i).test(selectors)) {
1589
- selectors = makeref(selectors, Snapshot.from);
1590
- }
1591
-
1592
1590
  // normalize input string
1593
- parsed = unescape(selectors).
1591
+ parsed = selectors.
1594
1592
  replace(/\x00|\\$/g, '\ufffd').
1595
1593
  replace(REX.CombineWSP, '\x20').
1596
1594
  replace(REX.PseudosWSP, '$1').
@@ -1741,7 +1739,7 @@
1741
1739
  }
1742
1740
 
1743
1741
  nodeset[i] = token[1] + token[2];
1744
- token[2] = unescapeIdentifier(token[2]);
1742
+ token[2] = unescapeIdentifier(token[2]);
1745
1743
  htmlset[i] = compat[token[1]](context, token[2]);
1746
1744
  factory[i] = compile(optimized[i], true, null);
1747
1745
 
@@ -1903,6 +1901,7 @@
1903
1901
 
1904
1902
  first: first,
1905
1903
  match: match,
1904
+ select: select,
1906
1905
 
1907
1906
  ancestor: ancestor,
1908
1907
 
@@ -1943,9 +1942,10 @@
1943
1942
  byTag: byTag,
1944
1943
  byClass: byClass,
1945
1944
 
1946
- match: match,
1947
1945
  first: first,
1946
+ match: match,
1948
1947
  select: select,
1948
+
1949
1949
  closest: ancestor,
1950
1950
 
1951
1951
  compile: compile,
@@ -584,9 +584,9 @@
584
584
  "license": "MIT"
585
585
  },
586
586
  "node_modules/nwsapi": {
587
- "version": "2.2.23",
588
- "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.23.tgz",
589
- "integrity": "sha512-7wfH4sLbt4M0gCDzGE6vzQBo0bfTKjU7Sfpqy/7gs1qBfYz2vEJH6vXcBKpO3+6Yu1telwd0t9HpyOoLEQQbIQ==",
587
+ "version": "2.2.24",
588
+ "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.24.tgz",
589
+ "integrity": "sha512-7YRhZ3jS45LwmSCT4b2sVFHt/WuovaktDU07QrtOBY2PXskss5a9jfmR9jptyumwXST+rFjrmppMY1KT/yn35A==",
590
590
  "license": "MIT"
591
591
  },
592
592
  "node_modules/parse5": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duckmind/dm-darwin-x64",
3
- "version": "0.35.6",
3
+ "version": "0.35.9",
4
4
  "description": "DuckMind (dm) binary payload for darwin x64",
5
5
  "license": "MIT",
6
6
  "os": [