@veltra/desktop 1.2.34 → 1.3.1

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.
Files changed (114) hide show
  1. package/dist/components/action/action-group.vue.d.ts +2 -2
  2. package/dist/components/action/action.vue.d.ts +1 -1
  3. package/dist/components/auto-complete/auto-complete.vue.d.ts +1 -1
  4. package/dist/components/batch-edit/style2.css +0 -3
  5. package/dist/components/breadcrumb/style2.css +1 -2
  6. package/dist/components/button/style2.css +23 -7
  7. package/dist/components/calendar/style2.css +3 -0
  8. package/dist/components/card/style2.css +13 -11
  9. package/dist/components/cascade/cascade.vue.d.ts +7 -7
  10. package/dist/components/check-tag/style2.css +6 -1
  11. package/dist/components/checkbox/checkbox.js +10 -10
  12. package/dist/components/checkbox/checkbox.js.map +1 -1
  13. package/dist/components/checkbox/style2.css +20 -3
  14. package/dist/components/checkbox-group/checkbox-group.vue.d.ts +1 -1
  15. package/dist/components/code-editor/lang-loaders.js +1 -0
  16. package/dist/components/code-editor/lang-loaders.js.map +1 -1
  17. package/dist/components/code-editor/style2.css +2 -2
  18. package/dist/components/condition-editor/style2.css +2 -4
  19. package/dist/components/contextmenu/style2.css +2 -2
  20. package/dist/components/date-picker/date-picker.vue.d.ts +1 -1
  21. package/dist/components/date-range-picker/date-range-picker.vue.d.ts +1 -1
  22. package/dist/components/dialog/style2.css +3 -3
  23. package/dist/components/drawer/style2.css +1 -1
  24. package/dist/components/dropdown/style2.css +1 -1
  25. package/dist/components/empty/empty.vue.d.ts +1 -1
  26. package/dist/components/float-button/style2.css +1 -1
  27. package/dist/components/group-nav/style2.css +1 -1
  28. package/dist/components/input/input.vue.d.ts +3 -3
  29. package/dist/components/input/style2.css +5 -4
  30. package/dist/components/message/style2.css +7 -7
  31. package/dist/components/message-confirm/style2.css +1 -1
  32. package/dist/components/multi-select/multi-select.vue.d.ts +3 -3
  33. package/dist/components/multi-tree-select/multi-tree-select.vue.d.ts +6 -6
  34. package/dist/components/nav/style2.css +2 -2
  35. package/dist/components/notification/style2.css +1 -1
  36. package/dist/components/number/number.vue.d.ts +1 -1
  37. package/dist/components/number-input/number-input.vue.d.ts +3 -3
  38. package/dist/components/number-range-input/number-range-input.vue.d.ts +1 -1
  39. package/dist/components/pop-confirm/pop-confirm.vue.d.ts +1 -1
  40. package/dist/components/progress-nodes/progress-nodes.vue.d.ts +1 -1
  41. package/dist/components/radio/radio.js +5 -5
  42. package/dist/components/radio/radio.js.map +1 -1
  43. package/dist/components/radio/style2.css +12 -0
  44. package/dist/components/radio-group/radio-group.vue.d.ts +1 -1
  45. package/dist/components/rich-text-editor/style2.css +1 -1
  46. package/dist/components/scroll/style2.css +3 -3
  47. package/dist/components/select/select.vue.d.ts +2 -2
  48. package/dist/components/slider/slider-thumb.js +4 -2
  49. package/dist/components/slider/slider-thumb.js.map +1 -1
  50. package/dist/components/slider/style2.css +7 -0
  51. package/dist/components/switch/style2.css +15 -1
  52. package/dist/components/switch/switch.js +0 -1
  53. package/dist/components/switch/switch.js.map +1 -1
  54. package/dist/components/tabs/style2.css +7 -4
  55. package/dist/components/text/style2.css +5 -5
  56. package/dist/components/textarea/textarea.vue.d.ts +3 -3
  57. package/dist/components/tip/style2.css +2 -2
  58. package/dist/components/tree/tree.vue.d.ts +3 -3
  59. package/dist/components/tree-select/tree-select.vue.d.ts +5 -5
  60. package/dist/node_modules/.bun/@codemirror_autocomplete@6.20.3/node_modules/@codemirror/autocomplete/dist/index.js +1 -1
  61. package/dist/node_modules/.bun/@codemirror_lang-css@6.3.1/node_modules/@codemirror/lang-css/dist/index.js +914 -0
  62. package/dist/node_modules/.bun/@codemirror_lang-css@6.3.1/node_modules/@codemirror/lang-css/dist/index.js.map +1 -0
  63. package/dist/node_modules/.bun/@codemirror_lang-html@6.4.11/node_modules/@codemirror/lang-html/dist/index.js +994 -0
  64. package/dist/node_modules/.bun/@codemirror_lang-html@6.4.11/node_modules/@codemirror/lang-html/dist/index.js.map +1 -0
  65. package/dist/node_modules/.bun/@codemirror_lang-javascript@6.2.5/node_modules/@codemirror/lang-javascript/dist/index.js +1 -1
  66. package/dist/node_modules/.bun/@codemirror_lang-markdown@6.5.1/node_modules/@codemirror/lang-markdown/dist/index.js +471 -0
  67. package/dist/node_modules/.bun/@codemirror_lang-markdown@6.5.1/node_modules/@codemirror/lang-markdown/dist/index.js.map +1 -0
  68. package/dist/node_modules/.bun/@codemirror_language@6.12.4/node_modules/@codemirror/language/dist/index.js +71 -1
  69. package/dist/node_modules/.bun/@codemirror_language@6.12.4/node_modules/@codemirror/language/dist/index.js.map +1 -1
  70. package/dist/node_modules/.bun/@lezer_common@1.5.2/node_modules/@lezer/common/dist/index.js +326 -2
  71. package/dist/node_modules/.bun/@lezer_common@1.5.2/node_modules/@lezer/common/dist/index.js.map +1 -1
  72. package/dist/node_modules/.bun/@lezer_css@1.3.4/node_modules/@lezer/css/dist/index.js +250 -0
  73. package/dist/node_modules/.bun/@lezer_css@1.3.4/node_modules/@lezer/css/dist/index.js.map +1 -0
  74. package/dist/node_modules/.bun/@lezer_highlight@1.2.3/node_modules/@lezer/highlight/dist/index.js +1 -1
  75. package/dist/node_modules/.bun/@lezer_html@1.3.13/node_modules/@lezer/html/dist/index.js +438 -0
  76. package/dist/node_modules/.bun/@lezer_html@1.3.13/node_modules/@lezer/html/dist/index.js.map +1 -0
  77. package/dist/node_modules/.bun/@lezer_markdown@1.7.2/node_modules/@lezer/markdown/dist/index.js +1952 -0
  78. package/dist/node_modules/.bun/@lezer_markdown@1.7.2/node_modules/@lezer/markdown/dist/index.js.map +1 -0
  79. package/dist/types/code-editor.d.ts +1 -1
  80. package/package.json +7 -6
  81. package/src/components/batch-edit/style.scss +0 -5
  82. package/src/components/breadcrumb/style.scss +1 -2
  83. package/src/components/button/style.scss +18 -9
  84. package/src/components/calendar/style.scss +4 -0
  85. package/src/components/card/style.scss +5 -3
  86. package/src/components/check-tag/style.scss +7 -1
  87. package/src/components/checkbox/checkbox.vue +8 -2
  88. package/src/components/checkbox/style.scss +32 -3
  89. package/src/components/code-editor/lang-loaders.ts +1 -0
  90. package/src/components/code-editor/style.scss +2 -2
  91. package/src/components/condition-editor/style.scss +2 -4
  92. package/src/components/contextmenu/style.scss +1 -3
  93. package/src/components/dialog/style.scss +3 -3
  94. package/src/components/drawer/style.scss +1 -1
  95. package/src/components/dropdown/style.scss +1 -1
  96. package/src/components/float-button/style.scss +1 -1
  97. package/src/components/group-nav/style.scss +1 -3
  98. package/src/components/input/style.scss +4 -3
  99. package/src/components/message/style.scss +2 -2
  100. package/src/components/message-confirm/style.scss +1 -1
  101. package/src/components/nav/style.scss +2 -6
  102. package/src/components/notification/style.scss +1 -1
  103. package/src/components/radio/radio.vue +8 -9
  104. package/src/components/radio/style.scss +21 -0
  105. package/src/components/rich-text-editor/style.scss +1 -1
  106. package/src/components/scroll/style.scss +3 -3
  107. package/src/components/slider/slider-thumb.vue +1 -1
  108. package/src/components/slider/style.scss +10 -0
  109. package/src/components/switch/style.scss +25 -1
  110. package/src/components/switch/switch.vue +0 -1
  111. package/src/components/tabs/style.scss +7 -5
  112. package/src/components/text/style.scss +5 -5
  113. package/src/components/tip/style.scss +2 -2
  114. package/src/types/code-editor.ts +9 -1
@@ -1560,8 +1560,332 @@ var StringInput = class {
1560
1560
  return this.string.slice(from, to);
1561
1561
  }
1562
1562
  };
1563
- new NodeProp({ perNode: true });
1563
+ /**
1564
+ Create a parse wrapper that, after the inner parse completes,
1565
+ scans its tree for mixed language regions with the `nest`
1566
+ function, runs the resulting [inner parses](#common.NestedParse),
1567
+ and then [mounts](#common.NodeProp^mounted) their results onto the
1568
+ tree.
1569
+ */
1570
+ function parseMixed(nest) {
1571
+ return (parse, input, fragments, ranges) => new MixedParse(parse, nest, input, fragments, ranges);
1572
+ }
1573
+ var InnerParse = class {
1574
+ constructor(parser, parse, overlay, bracketed, target, from) {
1575
+ this.parser = parser;
1576
+ this.parse = parse;
1577
+ this.overlay = overlay;
1578
+ this.bracketed = bracketed;
1579
+ this.target = target;
1580
+ this.from = from;
1581
+ }
1582
+ };
1583
+ function checkRanges(ranges) {
1584
+ if (!ranges.length || ranges.some((r) => r.from >= r.to)) throw new RangeError("Invalid inner parse ranges given: " + JSON.stringify(ranges));
1585
+ }
1586
+ var ActiveOverlay = class {
1587
+ constructor(parser, predicate, mounts, index, start, bracketed, target, prev) {
1588
+ this.parser = parser;
1589
+ this.predicate = predicate;
1590
+ this.mounts = mounts;
1591
+ this.index = index;
1592
+ this.start = start;
1593
+ this.bracketed = bracketed;
1594
+ this.target = target;
1595
+ this.prev = prev;
1596
+ this.depth = 0;
1597
+ this.ranges = [];
1598
+ }
1599
+ };
1600
+ const stoppedInner = new NodeProp({ perNode: true });
1601
+ var MixedParse = class {
1602
+ constructor(base, nest, input, fragments, ranges) {
1603
+ this.nest = nest;
1604
+ this.input = input;
1605
+ this.fragments = fragments;
1606
+ this.ranges = ranges;
1607
+ this.inner = [];
1608
+ this.innerDone = 0;
1609
+ this.baseTree = null;
1610
+ this.stoppedAt = null;
1611
+ this.baseParse = base;
1612
+ }
1613
+ advance() {
1614
+ if (this.baseParse) {
1615
+ let done = this.baseParse.advance();
1616
+ if (!done) return null;
1617
+ this.baseParse = null;
1618
+ this.baseTree = done;
1619
+ this.startInner();
1620
+ if (this.stoppedAt != null) for (let inner of this.inner) inner.parse.stopAt(this.stoppedAt);
1621
+ }
1622
+ if (this.innerDone == this.inner.length) {
1623
+ let result = this.baseTree;
1624
+ if (this.stoppedAt != null) result = new Tree(result.type, result.children, result.positions, result.length, result.propValues.concat([[stoppedInner, this.stoppedAt]]));
1625
+ return result;
1626
+ }
1627
+ let inner = this.inner[this.innerDone], done = inner.parse.advance();
1628
+ if (done) {
1629
+ this.innerDone++;
1630
+ let props = Object.assign(Object.create(null), inner.target.props);
1631
+ props[NodeProp.mounted.id] = new MountedTree(done, inner.overlay, inner.parser, inner.bracketed);
1632
+ inner.target.props = props;
1633
+ }
1634
+ return null;
1635
+ }
1636
+ get parsedPos() {
1637
+ if (this.baseParse) return 0;
1638
+ let pos = this.input.length;
1639
+ for (let i = this.innerDone; i < this.inner.length; i++) if (this.inner[i].from < pos) pos = Math.min(pos, this.inner[i].parse.parsedPos);
1640
+ return pos;
1641
+ }
1642
+ stopAt(pos) {
1643
+ this.stoppedAt = pos;
1644
+ if (this.baseParse) this.baseParse.stopAt(pos);
1645
+ else for (let i = this.innerDone; i < this.inner.length; i++) this.inner[i].parse.stopAt(pos);
1646
+ }
1647
+ startInner() {
1648
+ let fragmentCursor = new FragmentCursor(this.fragments);
1649
+ let overlay = null;
1650
+ let covered = null;
1651
+ let cursor = new TreeCursor(new TreeNode(this.baseTree, this.ranges[0].from, 0, null), IterMode.IncludeAnonymous | IterMode.IgnoreMounts);
1652
+ scan: for (let nest, isCovered;;) {
1653
+ let enter = true, range;
1654
+ if (this.stoppedAt != null && cursor.from >= this.stoppedAt) enter = false;
1655
+ else if (fragmentCursor.hasNode(cursor)) {
1656
+ if (overlay) {
1657
+ let match = overlay.mounts.find((m) => m.frag.from <= cursor.from && m.frag.to >= cursor.to && m.mount.overlay);
1658
+ if (match) for (let r of match.mount.overlay) {
1659
+ let from = r.from + match.pos, to = r.to + match.pos;
1660
+ if (from >= cursor.from && to <= cursor.to && !overlay.ranges.some((r) => r.from < to && r.to > from)) overlay.ranges.push({
1661
+ from,
1662
+ to
1663
+ });
1664
+ }
1665
+ }
1666
+ enter = false;
1667
+ } else if (covered && (isCovered = checkCover(covered.ranges, cursor.from, cursor.to))) enter = isCovered != 2;
1668
+ else if (!cursor.type.isAnonymous && (nest = this.nest(cursor, this.input)) && (cursor.from < cursor.to || !nest.overlay)) {
1669
+ if (!cursor.tree) {
1670
+ materialize(cursor);
1671
+ if (overlay) overlay.depth++;
1672
+ if (covered) covered.depth++;
1673
+ }
1674
+ let oldMounts = fragmentCursor.findMounts(cursor.from, nest.parser);
1675
+ if (typeof nest.overlay == "function") overlay = new ActiveOverlay(nest.parser, nest.overlay, oldMounts, this.inner.length, cursor.from, !!nest.bracketed, cursor.tree, overlay);
1676
+ else {
1677
+ let ranges = punchRanges(this.ranges, nest.overlay || (cursor.from < cursor.to ? [new Range(cursor.from, cursor.to)] : []));
1678
+ if (ranges.length) checkRanges(ranges);
1679
+ if (ranges.length || !nest.overlay) this.inner.push(new InnerParse(nest.parser, ranges.length ? nest.parser.startParse(this.input, enterFragments(oldMounts, ranges), ranges) : nest.parser.startParse(""), nest.overlay ? nest.overlay.map((r) => new Range(r.from - cursor.from, r.to - cursor.from)) : null, !!nest.bracketed, cursor.tree, ranges.length ? ranges[0].from : cursor.from));
1680
+ if (!nest.overlay) enter = false;
1681
+ else if (ranges.length) covered = {
1682
+ ranges,
1683
+ depth: 0,
1684
+ prev: covered
1685
+ };
1686
+ }
1687
+ } else if (overlay && (range = overlay.predicate(cursor))) {
1688
+ if (range === true) range = new Range(cursor.from, cursor.to);
1689
+ if (range.from < range.to) {
1690
+ let last = overlay.ranges.length - 1;
1691
+ if (last >= 0 && overlay.ranges[last].to == range.from) overlay.ranges[last] = {
1692
+ from: overlay.ranges[last].from,
1693
+ to: range.to
1694
+ };
1695
+ else overlay.ranges.push(range);
1696
+ }
1697
+ }
1698
+ if (enter && cursor.firstChild()) {
1699
+ if (overlay) overlay.depth++;
1700
+ if (covered) covered.depth++;
1701
+ } else for (;;) {
1702
+ if (cursor.nextSibling()) break;
1703
+ if (!cursor.parent()) break scan;
1704
+ if (overlay && !--overlay.depth) {
1705
+ let ranges = punchRanges(this.ranges, overlay.ranges);
1706
+ if (ranges.length) {
1707
+ checkRanges(ranges);
1708
+ this.inner.splice(overlay.index, 0, new InnerParse(overlay.parser, overlay.parser.startParse(this.input, enterFragments(overlay.mounts, ranges), ranges), overlay.ranges.map((r) => new Range(r.from - overlay.start, r.to - overlay.start)), overlay.bracketed, overlay.target, ranges[0].from));
1709
+ }
1710
+ overlay = overlay.prev;
1711
+ }
1712
+ if (covered && !--covered.depth) covered = covered.prev;
1713
+ }
1714
+ }
1715
+ }
1716
+ };
1717
+ function checkCover(covered, from, to) {
1718
+ for (let range of covered) {
1719
+ if (range.from >= to) break;
1720
+ if (range.to > from) return range.from <= from && range.to >= to ? 2 : 1;
1721
+ }
1722
+ return 0;
1723
+ }
1724
+ function sliceBuf(buf, startI, endI, nodes, positions, off) {
1725
+ if (startI < endI) {
1726
+ let from = buf.buffer[startI + 1];
1727
+ nodes.push(buf.slice(startI, endI, from));
1728
+ positions.push(from - off);
1729
+ }
1730
+ }
1731
+ function materialize(cursor) {
1732
+ let { node } = cursor, stack = [];
1733
+ let buffer = node.context.buffer;
1734
+ do {
1735
+ stack.push(cursor.index);
1736
+ cursor.parent();
1737
+ } while (!cursor.tree);
1738
+ let base = cursor.tree, i = base.children.indexOf(buffer);
1739
+ let buf = base.children[i], b = buf.buffer, newStack = [i];
1740
+ function split(startI, endI, type, innerOffset, length, stackPos) {
1741
+ let targetI = stack[stackPos];
1742
+ let children = [], positions = [];
1743
+ sliceBuf(buf, startI, targetI, children, positions, innerOffset);
1744
+ let from = b[targetI + 1], to = b[targetI + 2];
1745
+ newStack.push(children.length);
1746
+ let child = stackPos ? split(targetI + 4, b[targetI + 3], buf.set.types[b[targetI]], from, to - from, stackPos - 1) : node.toTree();
1747
+ children.push(child);
1748
+ positions.push(from - innerOffset);
1749
+ sliceBuf(buf, b[targetI + 3], endI, children, positions, innerOffset);
1750
+ return new Tree(type, children, positions, length);
1751
+ }
1752
+ base.children[i] = split(0, b.length, NodeType.none, 0, buf.length, stack.length - 1);
1753
+ for (let index of newStack) {
1754
+ let tree = cursor.tree.children[index], pos = cursor.tree.positions[index];
1755
+ cursor.yield(new TreeNode(tree, pos + cursor.from, index, cursor._tree));
1756
+ }
1757
+ }
1758
+ var StructureCursor = class {
1759
+ constructor(root, offset) {
1760
+ this.offset = offset;
1761
+ this.done = false;
1762
+ this.cursor = root.cursor(IterMode.IncludeAnonymous | IterMode.IgnoreMounts);
1763
+ }
1764
+ moveTo(pos) {
1765
+ let { cursor } = this, p = pos - this.offset;
1766
+ while (!this.done && cursor.from < p) if (cursor.to >= pos && cursor.enter(p, 1, IterMode.IgnoreOverlays | IterMode.ExcludeBuffers));
1767
+ else if (cursor.to <= pos) {
1768
+ if (!cursor.next(false)) this.done = true;
1769
+ } else break;
1770
+ }
1771
+ hasNode(cursor) {
1772
+ this.moveTo(cursor.from);
1773
+ if (!this.done && this.cursor.from + this.offset == cursor.from && this.cursor.tree) for (let tree = this.cursor.tree;;) {
1774
+ if (tree == cursor.tree) return true;
1775
+ if (tree.children.length && tree.positions[0] == 0 && tree.children[0] instanceof Tree) tree = tree.children[0];
1776
+ else break;
1777
+ }
1778
+ return false;
1779
+ }
1780
+ };
1781
+ var FragmentCursor = class {
1782
+ constructor(fragments) {
1783
+ var _a;
1784
+ this.fragments = fragments;
1785
+ this.curTo = 0;
1786
+ this.fragI = 0;
1787
+ if (fragments.length) {
1788
+ let first = this.curFrag = fragments[0];
1789
+ this.curTo = (_a = first.tree.prop(stoppedInner)) !== null && _a !== void 0 ? _a : first.to;
1790
+ this.inner = new StructureCursor(first.tree, -first.offset);
1791
+ } else this.curFrag = this.inner = null;
1792
+ }
1793
+ hasNode(node) {
1794
+ while (this.curFrag && node.from >= this.curTo) this.nextFrag();
1795
+ return this.curFrag && this.curFrag.from <= node.from && this.curTo >= node.to && this.inner.hasNode(node);
1796
+ }
1797
+ nextFrag() {
1798
+ var _a;
1799
+ this.fragI++;
1800
+ if (this.fragI == this.fragments.length) this.curFrag = this.inner = null;
1801
+ else {
1802
+ let frag = this.curFrag = this.fragments[this.fragI];
1803
+ this.curTo = (_a = frag.tree.prop(stoppedInner)) !== null && _a !== void 0 ? _a : frag.to;
1804
+ this.inner = new StructureCursor(frag.tree, -frag.offset);
1805
+ }
1806
+ }
1807
+ findMounts(pos, parser) {
1808
+ var _a;
1809
+ let result = [];
1810
+ if (this.inner) {
1811
+ this.inner.cursor.moveTo(pos, 1);
1812
+ for (let pos = this.inner.cursor.node; pos; pos = pos.parent) {
1813
+ let mount = (_a = pos.tree) === null || _a === void 0 ? void 0 : _a.prop(NodeProp.mounted);
1814
+ if (mount && mount.parser == parser) for (let i = this.fragI; i < this.fragments.length; i++) {
1815
+ let frag = this.fragments[i];
1816
+ if (frag.from >= pos.to) break;
1817
+ if (frag.tree == this.curFrag.tree) result.push({
1818
+ frag,
1819
+ pos: pos.from - frag.offset,
1820
+ mount
1821
+ });
1822
+ }
1823
+ }
1824
+ }
1825
+ return result;
1826
+ }
1827
+ };
1828
+ function punchRanges(outer, ranges) {
1829
+ let copy = null, current = ranges;
1830
+ for (let i = 1, j = 0; i < outer.length; i++) {
1831
+ let gapFrom = outer[i - 1].to, gapTo = outer[i].from;
1832
+ for (; j < current.length; j++) {
1833
+ let r = current[j];
1834
+ if (r.from >= gapTo) break;
1835
+ if (r.to <= gapFrom) continue;
1836
+ if (!copy) current = copy = ranges.slice();
1837
+ if (r.from < gapFrom) {
1838
+ copy[j] = new Range(r.from, gapFrom);
1839
+ if (r.to > gapTo) copy.splice(j + 1, 0, new Range(gapTo, r.to));
1840
+ } else if (r.to > gapTo) copy[j--] = new Range(gapTo, r.to);
1841
+ else copy.splice(j--, 1);
1842
+ }
1843
+ }
1844
+ return current;
1845
+ }
1846
+ function findCoverChanges(a, b, from, to) {
1847
+ let iA = 0, iB = 0, inA = false, inB = false, pos = -1e9;
1848
+ let result = [];
1849
+ for (;;) {
1850
+ let nextA = iA == a.length ? 1e9 : inA ? a[iA].to : a[iA].from;
1851
+ let nextB = iB == b.length ? 1e9 : inB ? b[iB].to : b[iB].from;
1852
+ if (inA != inB) {
1853
+ let start = Math.max(pos, from), end = Math.min(nextA, nextB, to);
1854
+ if (start < end) result.push(new Range(start, end));
1855
+ }
1856
+ pos = Math.min(nextA, nextB);
1857
+ if (pos == 1e9) break;
1858
+ if (nextA == pos) if (!inA) inA = true;
1859
+ else {
1860
+ inA = false;
1861
+ iA++;
1862
+ }
1863
+ if (nextB == pos) if (!inB) inB = true;
1864
+ else {
1865
+ inB = false;
1866
+ iB++;
1867
+ }
1868
+ }
1869
+ return result;
1870
+ }
1871
+ function enterFragments(mounts, ranges) {
1872
+ let result = [];
1873
+ for (let { pos, mount, frag } of mounts) {
1874
+ let startPos = pos + (mount.overlay ? mount.overlay[0].from : 0), endPos = startPos + mount.tree.length;
1875
+ let from = Math.max(frag.from, startPos), to = Math.min(frag.to, endPos);
1876
+ if (mount.overlay) {
1877
+ let changes = findCoverChanges(ranges, mount.overlay.map((r) => new Range(r.from + pos, r.to + pos)), from, to);
1878
+ for (let i = 0, pos = from;; i++) {
1879
+ let last = i == changes.length, end = last ? to : changes[i].from;
1880
+ if (end > pos) result.push(new TreeFragment(pos, end, mount.tree, -startPos, frag.from >= pos || frag.openStart, frag.to <= end || frag.openEnd));
1881
+ if (last) break;
1882
+ pos = changes[i].to;
1883
+ }
1884
+ } else result.push(new TreeFragment(from, to, mount.tree, -startPos, frag.from >= startPos || frag.openStart, frag.to <= endPos || frag.openEnd));
1885
+ }
1886
+ return result;
1887
+ }
1564
1888
  //#endregion
1565
- export { DefaultBufferLength, IterMode, NodeProp, NodeSet, NodeType, NodeWeakMap, Parser, Tree, TreeFragment };
1889
+ export { DefaultBufferLength, IterMode, NodeProp, NodeSet, NodeType, NodeWeakMap, Parser, Tree, TreeFragment, parseMixed };
1566
1890
 
1567
1891
  //# sourceMappingURL=index.js.map