chordsheetjs 14.5.1 → 14.7.0-canary.0

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/lib/bundle.js CHANGED
@@ -14251,7 +14251,7 @@ var ChordSheetJS = (() => {
14251
14251
  function createDOMPurify() {
14252
14252
  let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
14253
14253
  const DOMPurify = (root) => createDOMPurify(root);
14254
- DOMPurify.version = "3.4.0";
14254
+ DOMPurify.version = "3.3.2";
14255
14255
  DOMPurify.removed = [];
14256
14256
  if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
14257
14257
  DOMPurify.isSupported = false;
@@ -14434,7 +14434,7 @@ var ChordSheetJS = (() => {
14434
14434
  NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
14435
14435
  MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
14436
14436
  HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
14437
- CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || create(null);
14437
+ CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
14438
14438
  if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
14439
14439
  CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
14440
14440
  }
@@ -14473,8 +14473,12 @@ var ChordSheetJS = (() => {
14473
14473
  addToSet(ALLOWED_ATTR, xml);
14474
14474
  }
14475
14475
  }
14476
- EXTRA_ELEMENT_HANDLING.tagCheck = null;
14477
- EXTRA_ELEMENT_HANDLING.attributeCheck = null;
14476
+ if (!objectHasOwnProperty(cfg, "ADD_TAGS")) {
14477
+ EXTRA_ELEMENT_HANDLING.tagCheck = null;
14478
+ }
14479
+ if (!objectHasOwnProperty(cfg, "ADD_ATTR")) {
14480
+ EXTRA_ELEMENT_HANDLING.attributeCheck = null;
14481
+ }
14478
14482
  if (cfg.ADD_TAGS) {
14479
14483
  if (typeof cfg.ADD_TAGS === "function") {
14480
14484
  EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
@@ -14697,10 +14701,6 @@ var ChordSheetJS = (() => {
14697
14701
  _forceRemove(currentNode);
14698
14702
  return true;
14699
14703
  }
14700
- if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === "style" && _isNode(currentNode.firstElementChild)) {
14701
- _forceRemove(currentNode);
14702
- return true;
14703
- }
14704
14704
  if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
14705
14705
  _forceRemove(currentNode);
14706
14706
  return true;
@@ -14709,7 +14709,7 @@ var ChordSheetJS = (() => {
14709
14709
  _forceRemove(currentNode);
14710
14710
  return true;
14711
14711
  }
14712
- if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {
14712
+ if (!(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName])) {
14713
14713
  if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
14714
14714
  if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
14715
14715
  return false;
@@ -14889,7 +14889,7 @@ var ChordSheetJS = (() => {
14889
14889
  }
14890
14890
  _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
14891
14891
  };
14892
- const _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {
14892
+ const _sanitizeShadowDOM = function _sanitizeShadowDOM2(fragment) {
14893
14893
  let shadowNode = null;
14894
14894
  const shadowIterator = _createNodeIterator(fragment);
14895
14895
  _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
@@ -14968,21 +14968,13 @@ var ChordSheetJS = (() => {
14968
14968
  _sanitizeElements(currentNode);
14969
14969
  _sanitizeAttributes(currentNode);
14970
14970
  if (currentNode.content instanceof DocumentFragment) {
14971
- _sanitizeShadowDOM2(currentNode.content);
14971
+ _sanitizeShadowDOM(currentNode.content);
14972
14972
  }
14973
14973
  }
14974
14974
  if (IN_PLACE) {
14975
14975
  return dirty;
14976
14976
  }
14977
14977
  if (RETURN_DOM) {
14978
- if (SAFE_FOR_TEMPLATES) {
14979
- body.normalize();
14980
- let html2 = body.innerHTML;
14981
- arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
14982
- html2 = stringReplace(html2, expr, " ");
14983
- });
14984
- body.innerHTML = html2;
14985
- }
14986
14978
  if (RETURN_DOM_FRAGMENT) {
14987
14979
  returnNode = createDocumentFragment.call(body.ownerDocument);
14988
14980
  while (body.firstChild) {
@@ -15113,7 +15105,7 @@ var ChordSheetJS = (() => {
15113
15105
  text = freeze(["#text"]);
15114
15106
  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", "slot"]);
15115
15107
  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"]);
15116
- 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"]);
15108
+ mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "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"]);
15117
15109
  xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]);
15118
15110
  MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm);
15119
15111
  ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
@@ -15146,11 +15138,20 @@ var ChordSheetJS = (() => {
15146
15138
  });
15147
15139
  NODE_TYPE = {
15148
15140
  element: 1,
15141
+ attribute: 2,
15149
15142
  text: 3,
15143
+ cdataSection: 4,
15144
+ entityReference: 5,
15145
+ // Deprecated
15146
+ entityNode: 6,
15150
15147
  // Deprecated
15151
15148
  progressingInstruction: 7,
15152
15149
  comment: 8,
15153
- document: 9
15150
+ document: 9,
15151
+ documentType: 10,
15152
+ documentFragment: 11,
15153
+ notation: 12
15154
+ // Deprecated
15154
15155
  };
15155
15156
  getGlobal = function getGlobal2() {
15156
15157
  return typeof window === "undefined" ? null : window;
@@ -33032,6 +33033,8 @@ var ChordSheetJS = (() => {
33032
33033
  $parcel$export(module.exports, "UltimateGuitarParser", () => $a5a21ced491ea51f$export$2e2bcd8739ae039);
33033
33034
  $parcel$export(module.exports, "templateHelpers", () => $f9c5006b26957916$export$2e2bcd8739ae039);
33034
33035
  $parcel$export(module.exports, "version", () => $ae92e002ce14f11a$export$2e2bcd8739ae039);
33036
+ $parcel$export(module.exports, "formatterConfiguration", () => $2a7926da41d163b3$export$2e2bcd8739ae039);
33037
+ $parcel$export(module.exports, "keyHelpers", () => $3f8a8e161b112441$export$2e2bcd8739ae039);
33035
33038
  $parcel$export(module.exports, "IMAGE", () => $d21c5c7a462f3c34$export$74f94c628b84d921);
33036
33039
  $parcel$export(module.exports, "defaultPangoRenderer", () => $1883202621c13add$export$6be9e661c5b42166);
33037
33040
  $parcel$export(module.exports, "pangoToHtml", () => $1883202621c13add$export$599bd3ab2aa4735e);
@@ -36962,8 +36965,9 @@ ${error.stack}`);
36962
36965
  */
36963
36966
  toString({ useUnicodeModifier = false } = {}) {
36964
36967
  let chordString = "";
36965
- const suffix = this.suffix || "";
36968
+ let suffix = this.suffix || "";
36966
36969
  const showMinor = suffix[0] !== "m";
36970
+ if (useUnicodeModifier) suffix = suffix.replace(/#(?=\d)/g, "\u266F").replace(/b(?=\d)/g, "\u266D");
36967
36971
  if (this.root) chordString = this.root.toString({
36968
36972
  showMinor,
36969
36973
  useUnicodeModifier
@@ -38541,129 +38545,301 @@ ${error.stack}`);
38541
38545
  },
38542
38546
  fonts: {
38543
38547
  title: {
38544
- name: "NimbusSansL-Bol",
38548
+ name: "Arial",
38545
38549
  style: "bold",
38546
- size: 24,
38547
- color: "black"
38550
+ size: 22,
38551
+ color: "#151515"
38548
38552
  },
38549
38553
  subtitle: {
38550
- name: "NimbusSansL-Reg",
38554
+ name: "Arial",
38551
38555
  style: "normal",
38552
- size: 10,
38553
- color: 100
38556
+ size: 11,
38557
+ color: "#6f6f6f"
38554
38558
  },
38555
38559
  metadata: {
38556
- name: "NimbusSansL-Reg",
38560
+ name: "Arial",
38557
38561
  style: "normal",
38558
38562
  size: 10,
38559
- color: 100
38563
+ color: "#8b8b8b"
38560
38564
  },
38561
38565
  text: {
38562
- name: "NimbusSansL-Reg",
38566
+ name: "Arial",
38563
38567
  style: "normal",
38564
38568
  size: 10,
38565
- color: "black"
38569
+ color: "#232323"
38566
38570
  },
38567
38571
  chord: {
38568
- name: "NimbusSansL-Bol",
38572
+ name: "Arial",
38569
38573
  style: "bold",
38570
38574
  size: 9,
38571
- color: "black"
38575
+ color: "#232323"
38572
38576
  },
38573
38577
  comment: {
38574
- name: "NimbusSansL-Bol",
38578
+ name: "Arial",
38575
38579
  style: "bold",
38576
38580
  size: 10,
38577
- color: "black"
38581
+ color: "#232323"
38578
38582
  },
38579
38583
  sectionLabel: {
38580
- name: "NimbusSansL-Bol",
38584
+ name: "Arial",
38581
38585
  style: "bold",
38582
38586
  size: 10,
38583
- color: "black"
38587
+ color: "#a1312d"
38584
38588
  },
38585
38589
  annotation: {
38586
- name: "NimbusSansL-Reg",
38590
+ name: "Arial",
38587
38591
  style: "normal",
38588
38592
  size: 10,
38589
- color: "black"
38593
+ color: "#232323"
38590
38594
  }
38591
38595
  },
38592
38596
  layout: {
38593
38597
  global: {
38594
38598
  margins: {
38595
- top: 35,
38596
- bottom: 10,
38599
+ top: 14,
38600
+ bottom: 12,
38597
38601
  left: 45,
38598
38602
  right: 45
38599
38603
  }
38600
38604
  },
38601
38605
  header: {
38602
- height: 60,
38606
+ height: 72,
38603
38607
  content: [
38604
38608
  {
38605
38609
  type: "text",
38606
38610
  template: "%{title}",
38607
38611
  style: {
38608
- name: "NimbusSansL-Bol",
38612
+ name: "Arial",
38609
38613
  style: "bold",
38610
- size: 24,
38611
- color: "black"
38614
+ size: 19,
38615
+ color: "#151515",
38616
+ weight: 700
38612
38617
  },
38613
38618
  position: {
38614
38619
  x: "left",
38615
- y: 15
38620
+ y: 0,
38621
+ clip: true,
38622
+ ellipsis: true
38623
+ },
38624
+ condition: {
38625
+ page: {
38626
+ first: true
38627
+ }
38616
38628
  }
38617
38629
  },
38618
38630
  {
38619
38631
  type: "text",
38620
- template: "Key of %{key} - BPM %{tempo} - Time %{time}",
38632
+ template: "%{artist}",
38621
38633
  style: {
38622
- name: "NimbusSansL-Reg",
38634
+ name: "Arial",
38623
38635
  style: "normal",
38624
- size: 12,
38625
- color: 100
38636
+ size: 11,
38637
+ color: "#6f6f6f"
38626
38638
  },
38627
38639
  position: {
38628
38640
  x: "left",
38629
- y: 28
38641
+ y: 25,
38642
+ clip: true,
38643
+ ellipsis: true
38644
+ },
38645
+ condition: {
38646
+ page: {
38647
+ first: true
38648
+ }
38630
38649
  }
38631
38650
  },
38632
38651
  {
38633
38652
  type: "text",
38634
- template: "By %{artist} %{subtitle}",
38653
+ template: "%{tempo|%{} BPM}%{time| \xB7 %{}}%{capo| \xB7 Capo %{}}",
38635
38654
  style: {
38636
- name: "NimbusSansL-Reg",
38655
+ name: "Arial",
38637
38656
  style: "normal",
38638
- size: 10,
38639
- color: 100
38657
+ size: 11,
38658
+ color: "#6f6f6f"
38640
38659
  },
38641
38660
  position: {
38642
38661
  x: "left",
38643
- y: 38
38662
+ y: 40,
38663
+ width: 240,
38664
+ clip: true,
38665
+ ellipsis: true
38666
+ },
38667
+ condition: {
38668
+ page: {
38669
+ first: true
38670
+ }
38644
38671
  }
38645
- }
38646
- ]
38647
- },
38648
- footer: {
38649
- height: 30,
38650
- content: [
38672
+ },
38673
+ {
38674
+ type: "line",
38675
+ style: {
38676
+ width: 1,
38677
+ color: "#d7d7d7"
38678
+ },
38679
+ position: {
38680
+ x: 0,
38681
+ y: 60,
38682
+ width: "auto",
38683
+ height: 0
38684
+ },
38685
+ condition: {
38686
+ page: {
38687
+ first: true
38688
+ }
38689
+ }
38690
+ },
38651
38691
  {
38652
38692
  type: "text",
38653
- value: "\xA92024 My Music Publishing",
38693
+ template: "%{key}",
38694
+ cssClass: "measured-html-key-badge",
38695
+ elementStyle: {
38696
+ width: "28px",
38697
+ height: "28px",
38698
+ display: "flex",
38699
+ alignItems: "center",
38700
+ justifyContent: "center",
38701
+ borderRadius: "999px",
38702
+ backgroundColor: "#a1312d",
38703
+ textAlign: "center",
38704
+ boxSizing: "border-box"
38705
+ },
38654
38706
  style: {
38655
- name: "NimbusSansL-Reg",
38707
+ name: "Arial",
38708
+ style: "bold",
38709
+ size: 12,
38710
+ color: "#ffffff",
38711
+ weight: 700
38712
+ },
38713
+ position: {
38714
+ x: "right",
38715
+ y: 12,
38716
+ width: 28,
38717
+ offsetX: -2
38718
+ },
38719
+ condition: {
38720
+ and: [
38721
+ {
38722
+ page: {
38723
+ first: true
38724
+ }
38725
+ },
38726
+ {
38727
+ key: {
38728
+ exists: true
38729
+ }
38730
+ }
38731
+ ]
38732
+ }
38733
+ },
38734
+ {
38735
+ type: "text",
38736
+ template: "%{title}",
38737
+ style: {
38738
+ name: "Arial",
38739
+ style: "bold",
38740
+ size: 12,
38741
+ color: "#151515",
38742
+ weight: 700
38743
+ },
38744
+ position: {
38745
+ x: "left",
38746
+ y: 0,
38747
+ clip: true,
38748
+ ellipsis: true
38749
+ },
38750
+ condition: {
38751
+ page: {
38752
+ greater_than: 1
38753
+ }
38754
+ }
38755
+ },
38756
+ {
38757
+ type: "text",
38758
+ template: "%{page}/%{pages}",
38759
+ style: {
38760
+ name: "Arial",
38656
38761
  style: "normal",
38657
38762
  size: 10,
38658
- color: "black"
38763
+ color: "#9a9a9a"
38659
38764
  },
38660
38765
  position: {
38661
- x: "left",
38662
- y: 0
38766
+ x: "right",
38767
+ y: 4,
38768
+ offsetX: -38
38769
+ },
38770
+ condition: {
38771
+ page: {
38772
+ greater_than: 1
38773
+ }
38774
+ }
38775
+ },
38776
+ {
38777
+ type: "text",
38778
+ template: "%{key}",
38779
+ cssClass: "measured-html-key-badge",
38780
+ elementStyle: {
38781
+ width: "28px",
38782
+ height: "28px",
38783
+ display: "flex",
38784
+ alignItems: "center",
38785
+ justifyContent: "center",
38786
+ borderRadius: "999px",
38787
+ backgroundColor: "#a1312d",
38788
+ textAlign: "center",
38789
+ boxSizing: "border-box"
38790
+ },
38791
+ style: {
38792
+ name: "Arial",
38793
+ style: "bold",
38794
+ size: 12,
38795
+ color: "#ffffff",
38796
+ weight: 700
38797
+ },
38798
+ position: {
38799
+ x: "right",
38800
+ y: 2,
38801
+ width: 28,
38802
+ offsetX: -2
38803
+ },
38804
+ condition: {
38805
+ and: [
38806
+ {
38807
+ page: {
38808
+ greater_than: 1
38809
+ }
38810
+ },
38811
+ {
38812
+ key: {
38813
+ exists: true
38814
+ }
38815
+ }
38816
+ ]
38817
+ }
38818
+ },
38819
+ {
38820
+ type: "line",
38821
+ style: {
38822
+ width: 1,
38823
+ color: "#d7d7d7"
38824
+ },
38825
+ position: {
38826
+ x: 0,
38827
+ y: 32,
38828
+ width: "auto",
38829
+ height: 0
38830
+ },
38831
+ condition: {
38832
+ page: {
38833
+ greater_than: 1
38834
+ }
38663
38835
  }
38664
38836
  }
38665
38837
  ]
38666
38838
  },
38839
+ footer: {
38840
+ height: 0,
38841
+ content: []
38842
+ },
38667
38843
  sections: {
38668
38844
  global: {
38669
38845
  paragraphSpacing: 10,
@@ -38710,22 +38886,22 @@ ${error.stack}`);
38710
38886
  },
38711
38887
  fonts: {
38712
38888
  title: {
38713
- name: "NimbusSansL-Bol",
38889
+ name: "Arial",
38714
38890
  style: "bold",
38715
38891
  size: 9,
38716
- color: "black"
38892
+ color: "#232323"
38717
38893
  },
38718
38894
  fingerings: {
38719
- name: "NimbusSansL-Bol",
38895
+ name: "Arial",
38720
38896
  style: "bold",
38721
38897
  size: 6,
38722
- color: "black"
38898
+ color: "#232323"
38723
38899
  },
38724
38900
  baseFret: {
38725
- name: "NimbusSansL-Bol",
38901
+ name: "Arial",
38726
38902
  style: "bold",
38727
38903
  size: 6,
38728
- color: "black"
38904
+ color: "#232323"
38729
38905
  }
38730
38906
  }
38731
38907
  }
@@ -40242,6 +40418,74 @@ ${formattedContentLines}`;
40242
40418
  }
40243
40419
  };
40244
40420
  var $e02a17f5a26edf19$export$2e2bcd8739ae039 = $e02a17f5a26edf19$var$ChordRenderer;
40421
+ var $a7ae2843546189cc$export$1e6f8e38ccd793b = {
40422
+ solfege: [
40423
+ "La",
40424
+ "Sib",
40425
+ "Si",
40426
+ "Do",
40427
+ "Do#",
40428
+ "Reb",
40429
+ "Re",
40430
+ "Mib",
40431
+ "Mi",
40432
+ "Fa",
40433
+ "Fa#",
40434
+ "Solb",
40435
+ "Sol",
40436
+ "Sol#",
40437
+ "Lab"
40438
+ ],
40439
+ symbol: [
40440
+ "A",
40441
+ "Bb",
40442
+ "B",
40443
+ "C",
40444
+ "C#",
40445
+ "Db",
40446
+ "D",
40447
+ "Eb",
40448
+ "E",
40449
+ "F",
40450
+ "F#",
40451
+ "Gb",
40452
+ "G",
40453
+ "G#",
40454
+ "Ab"
40455
+ ]
40456
+ };
40457
+ var $a7ae2843546189cc$export$24a0bd6af7756225 = {
40458
+ solfege: [
40459
+ "Fa#m",
40460
+ "Solm",
40461
+ "Sol#m",
40462
+ "Lam",
40463
+ "Sibm",
40464
+ "Sim",
40465
+ "Dom",
40466
+ "Do#m",
40467
+ "Rem",
40468
+ "Re#m",
40469
+ "Mibm",
40470
+ "Mim",
40471
+ "Fam"
40472
+ ],
40473
+ symbol: [
40474
+ "F#m",
40475
+ "Gm",
40476
+ "G#m",
40477
+ "Am",
40478
+ "Bbm",
40479
+ "Bm",
40480
+ "Cm",
40481
+ "C#m",
40482
+ "Dm",
40483
+ "D#m",
40484
+ "Ebm",
40485
+ "Em",
40486
+ "Fm"
40487
+ ]
40488
+ };
40245
40489
  var $a7ae2843546189cc$export$1ba61c6fa2f892a9 = {
40246
40490
  solfege: {
40247
40491
  "Sib": {
@@ -40549,6 +40793,11 @@ ${formattedContentLines}`;
40549
40793
  const chordType = keyObj.type === "solfege" ? "solfege" : "symbol";
40550
40794
  return (0, $a7ae2843546189cc$export$1ba61c6fa2f892a9)[chordType][(0, $c2d6ab25ad00308f$export$2e2bcd8739ae039).toString(key)];
40551
40795
  }
40796
+ function $2ce1086ce25c9ac0$export$74743eda5dda3ccf(key) {
40797
+ const keyObj = (0, $c2d6ab25ad00308f$export$2e2bcd8739ae039).wrapOrFail(key);
40798
+ const chordType = keyObj.type === "solfege" ? "solfege" : "symbol";
40799
+ return keyObj.isMinor() ? (0, $a7ae2843546189cc$export$24a0bd6af7756225)[chordType] : (0, $a7ae2843546189cc$export$1e6f8e38ccd793b)[chordType];
40800
+ }
40552
40801
  function $2ce1086ce25c9ac0$export$efb38dd75b8e2957({ selector, isNegated }, { configuration, metadata }) {
40553
40802
  if (selector === configuration.instrument?.type) return !isNegated;
40554
40803
  if (selector === configuration.user?.name) return !isNegated;
@@ -46209,6 +46458,10 @@ Or set the song key before changing key:
46209
46458
  }
46210
46459
  };
46211
46460
  var $e9ad1e86e7afd0c0$export$2e2bcd8739ae039 = $e9ad1e86e7afd0c0$var$When;
46461
+ function $181068e44290b873$export$8d21e34596265fa2(config) {
46462
+ const defautlBaseConfig = (0, $fe1d3ba9df1ecad5$export$cb4529290f33d264)();
46463
+ return (0, $28a2fcb6fb95a147$export$5d86b86a654a7039)(defautlBaseConfig, config);
46464
+ }
46212
46465
  function $f9c5006b26957916$export$17c9e635b932873b(item) {
46213
46466
  return item instanceof (0, $551a223fc13b5c10$export$2e2bcd8739ae039);
46214
46467
  }
@@ -59606,6 +59859,7 @@ Or set the song key before changing key:
59606
59859
  * Gets conditional CSS styles from font configuration
59607
59860
  */
59608
59861
  getConditionalStyles(style) {
59862
+ const normalizedFontStyles = this.getNormalizedFontStyles(style);
59609
59863
  return {
59610
59864
  ...style.name && {
59611
59865
  fontFamily: style.name
@@ -59613,15 +59867,7 @@ Or set the song key before changing key:
59613
59867
  ...style.size && {
59614
59868
  fontSize: `${style.size}px`
59615
59869
  },
59616
- ...style.weight && {
59617
- fontWeight: style.weight
59618
- },
59619
- ...style.style && {
59620
- fontStyle: style.style
59621
- },
59622
- ...style.color && {
59623
- color: style.color
59624
- },
59870
+ ...normalizedFontStyles,
59625
59871
  ...style.underline && {
59626
59872
  textDecoration: "underline"
59627
59873
  },
@@ -59672,6 +59918,7 @@ Or set the song key before changing key:
59672
59918
  * Applies font styles to an HTML element
59673
59919
  */
59674
59920
  applyFontStyle(element, style) {
59921
+ const normalizedFontStyles = this.getNormalizedFontStyles(style);
59675
59922
  const styles = {
59676
59923
  whiteSpace: "pre",
59677
59924
  ...style.name && {
@@ -59680,15 +59927,7 @@ Or set the song key before changing key:
59680
59927
  ...style.size && {
59681
59928
  fontSize: `${style.size}px`
59682
59929
  },
59683
- ...style.weight && {
59684
- fontWeight: style.weight
59685
- },
59686
- ...style.style && {
59687
- fontStyle: style.style
59688
- },
59689
- ...style.color && {
59690
- color: style.color
59691
- },
59930
+ ...normalizedFontStyles,
59692
59931
  ...style.underline && {
59693
59932
  textDecoration: "underline"
59694
59933
  },
@@ -59721,6 +59960,27 @@ Or set the song key before changing key:
59721
59960
  getCustomClass(elementType) {
59722
59961
  return this.config.cssClasses?.[elementType];
59723
59962
  }
59963
+ getNormalizedFontStyles(style) {
59964
+ const fontWeight = style.weight ?? (style.style === "bold" ? "bold" : void 0);
59965
+ const fontStyle = style.style && style.style !== "bold" ? style.style : void 0;
59966
+ const color = this.normalizeColor(style.color);
59967
+ return {
59968
+ ...fontWeight && {
59969
+ fontWeight
59970
+ },
59971
+ ...fontStyle && {
59972
+ fontStyle
59973
+ },
59974
+ ...color && {
59975
+ color
59976
+ }
59977
+ };
59978
+ }
59979
+ normalizeColor(color) {
59980
+ if (typeof color === "number") return `rgb(${color}, ${color}, ${color})`;
59981
+ if (typeof color === "string" && /^\d+$/.test(color)) return `rgb(${color}, ${color}, ${color})`;
59982
+ return color;
59983
+ }
59724
59984
  };
59725
59985
  var $0594288a7c3f9fa6$export$2e2bcd8739ae039 = $0594288a7c3f9fa6$export$94eb343ca6d26096;
59726
59986
  function $bdd8c6196670168a$var$isNumber(value) {
@@ -59955,7 +60215,14 @@ Or set the song key before changing key:
59955
60215
  if (!contentItem.condition) return true;
59956
60216
  const { metadata: songMetadata, extraMetadata } = this.context;
59957
60217
  const metadata = new Proxy({}, {
59958
- get: (_3, prop) => extraMetadata?.[prop] ?? songMetadata.get(prop)
60218
+ get: (_3, prop) => {
60219
+ const value = extraMetadata?.[prop] ?? songMetadata.get(prop);
60220
+ if ((prop === "page" || prop === "pages" || prop === "renderTime") && typeof value === "string") {
60221
+ const numericValue = Number(value);
60222
+ if (!Number.isNaN(numericValue)) return numericValue;
60223
+ }
60224
+ return value;
60225
+ }
59959
60226
  });
59960
60227
  return new (0, $bdd8c6196670168a$export$2e2bcd8739ae039)(contentItem.condition, metadata).evaluate();
59961
60228
  }
@@ -59970,16 +60237,19 @@ Or set the song key before changing key:
59970
60237
  this.backend.setFontStyle(style);
59971
60238
  const availableWidth = position.width || this.getAvailableWidth();
59972
60239
  const y3 = sectionY + position.y;
59973
- if (position.clip) this.renderClippedText(textValue, position, availableWidth, y3, style);
59974
- else this.renderMultilineText(textValue, position, availableWidth, y3, style);
60240
+ if (position.clip) this.renderClippedText(textValue, textItem, availableWidth, y3, style);
60241
+ else this.renderMultilineText(textValue, textItem, availableWidth, y3, style);
59975
60242
  }
59976
60243
  /**
59977
60244
  * Renders clipped text with optional ellipsis
59978
60245
  */
59979
- renderClippedText(textValue, position, availableWidth, y3, style) {
60246
+ renderClippedText(textValue, textItem, availableWidth, y3, style) {
60247
+ const { position } = textItem;
59980
60248
  const clippedText = position.ellipsis ? this.clipTextWithEllipsis(textValue, availableWidth, style) : this.clipText(textValue, availableWidth, style);
59981
60249
  const textWidth = this.backend.getTextWidth(clippedText, style);
59982
- const x2 = this.calculateX(position.x, textWidth);
60250
+ const alignmentWidth = position.width ?? textWidth;
60251
+ this.backend.setTextItem?.(textItem);
60252
+ const x2 = this.calculateX(position.x, alignmentWidth, position.offsetX);
59983
60253
  this.backend.text(clippedText, x2, y3);
59984
60254
  }
59985
60255
  /**
@@ -60001,12 +60271,15 @@ Or set the song key before changing key:
60001
60271
  /**
60002
60272
  * Renders multiline text
60003
60273
  */
60004
- renderMultilineText(textValue, position, availableWidth, y3, style) {
60274
+ renderMultilineText(textValue, textItem, availableWidth, y3, style) {
60275
+ const { position } = textItem;
60005
60276
  const lines = this.backend.splitTextToSize(textValue, availableWidth, style);
60006
60277
  let tempY = y3;
60007
60278
  lines.forEach((line) => {
60008
60279
  const lineWidth = this.backend.getTextWidth(line, style);
60009
- const x2 = this.calculateX(position.x, lineWidth);
60280
+ const alignmentWidth = position.width ?? lineWidth;
60281
+ this.backend.setTextItem?.(textItem);
60282
+ const x2 = this.calculateX(position.x, alignmentWidth, position.offsetX);
60010
60283
  this.backend.text(line, x2, tempY);
60011
60284
  tempY += style.size * (style.lineHeight ?? 1.2);
60012
60285
  });
@@ -60016,7 +60289,7 @@ Or set the song key before changing key:
60016
60289
  */
60017
60290
  renderImage(imageItem, sectionY) {
60018
60291
  const { src, position, size, alias, compression, rotation } = imageItem;
60019
- const x2 = this.calculateX(position.x, size.width);
60292
+ const x2 = this.calculateX(position.x, size.width, position.offsetX);
60020
60293
  const y3 = sectionY + position.y;
60021
60294
  const format = src.split(".").pop()?.toUpperCase();
60022
60295
  this.backend.addImage(src, format, x2, y3, size.width, size.height, alias, compression, rotation);
@@ -60053,16 +60326,16 @@ ${template}
60053
60326
  /**
60054
60327
  * Calculates the X position based on alignment
60055
60328
  */
60056
- calculateX(alignment, width = 0) {
60329
+ calculateX(alignment, width = 0, offsetX = 0) {
60057
60330
  switch (alignment) {
60058
60331
  case "center":
60059
- return this.backend.pageSize.width / 2 - width / 2;
60332
+ return this.backend.pageSize.width / 2 - width / 2 + offsetX;
60060
60333
  case "right":
60061
- return this.backend.pageSize.width - this.context.margins.right - width;
60334
+ return this.backend.pageSize.width - this.context.margins.right - width + offsetX;
60062
60335
  case "left":
60063
60336
  default:
60064
- if (typeof alignment === "number") return this.context.margins.left + alignment;
60065
- return this.context.margins.left;
60337
+ if (typeof alignment === "number") return this.context.margins.left + alignment + offsetX;
60338
+ return this.context.margins.left + offsetX;
60066
60339
  }
60067
60340
  }
60068
60341
  /**
@@ -60335,7 +60608,6 @@ ${template}
60335
60608
  recordRenderingTime() {
60336
60609
  const endTime = performance.now();
60337
60610
  this.renderTime = (endTime - this.startTime) / 1e3;
60338
- console.log(`Rendered in ${this.renderTime.toFixed(2)} seconds`);
60339
60611
  }
60340
60612
  /**
60341
60613
  * Get the elements for a specific page
@@ -60469,7 +60741,7 @@ ${template}
60469
60741
  * Creates a new HtmlRenderer
60470
60742
  */
60471
60743
  constructor(song, container, configuration) {
60472
- super(song), this._dimensions = null, this._dimensionCacheKey = null;
60744
+ super(song), this.currentLayoutFontStyle = null, this.currentLayoutSection = null, this.currentLayoutTextItem = null, this.currentLineStyle = null, this._dimensions = null, this._dimensionCacheKey = null;
60473
60745
  this.container = container;
60474
60746
  this.configuration = configuration;
60475
60747
  this.styler = new (0, $0594288a7c3f9fa6$export$2e2bcd8739ae039)({
@@ -60530,36 +60802,52 @@ ${template}
60530
60802
  console.log("Chord diagram rendering is stubbed out");
60531
60803
  }
60532
60804
  renderHeadersAndFooters() {
60533
- const layoutRenderer = this.createLayoutRenderer();
60534
- if (this.getHeaderConfig()) this.doc.eachPage(() => {
60535
- layoutRenderer.renderLayout(this.getHeaderConfig(), "header");
60536
- });
60537
- if (this.getFooterConfig()) this.doc.eachPage(() => {
60538
- layoutRenderer.renderLayout(this.getFooterConfig(), "footer");
60805
+ const headerConfig = this.getHeaderConfig();
60806
+ const footerConfig = this.getFooterConfig();
60807
+ if (headerConfig) this.renderLayoutForEachPage(headerConfig, "header");
60808
+ if (footerConfig) this.renderLayoutForEachPage(footerConfig, "footer");
60809
+ this.resetLayoutRenderingState();
60810
+ }
60811
+ renderLayoutForEachPage(layoutConfig, section) {
60812
+ this.doc.eachPage((_page, index2) => {
60813
+ this.currentLayoutSection = section;
60814
+ this.resetLayoutRenderingState(section);
60815
+ this.createLayoutRenderer(index2 + 1, this.doc.totalPages).renderLayout(layoutConfig, section);
60539
60816
  });
60540
60817
  }
60541
- createLayoutRenderer() {
60542
- const backend = this.createLayoutBackend();
60818
+ resetLayoutRenderingState(section = null) {
60819
+ this.currentLayoutSection = section;
60820
+ this.currentLayoutFontStyle = null;
60821
+ this.currentLayoutTextItem = null;
60822
+ this.currentLineStyle = null;
60823
+ }
60824
+ createLayoutRenderer(page, totalPages) {
60825
+ const backend = this.createLayoutBackend(page, totalPages);
60543
60826
  return new (0, $2e404bc796b05dec$export$2e2bcd8739ae039)(backend, {
60544
60827
  metadata: this.song.metadata,
60545
60828
  margins: this.dimensions.margins,
60546
- extraMetadata: this.getExtraMetadata(this.doc.currentPage, this.doc.totalPages)
60829
+ extraMetadata: this.getExtraMetadata(page, totalPages)
60547
60830
  });
60548
60831
  }
60549
- createLayoutBackend() {
60832
+ createLayoutBackend(page, totalPages) {
60550
60833
  return {
60551
60834
  pageSize: this.doc.pageSize,
60552
- currentPage: this.doc.currentPage,
60553
- totalPages: this.doc.totalPages,
60835
+ currentPage: page,
60836
+ totalPages,
60554
60837
  text: (content, x2, y3) => this.renderHtmlText(content, x2, y3),
60555
60838
  getTextWidth: (text2, font) => this.doc.getTextWidth(text2, font),
60556
60839
  splitTextToSize: (text2, maxWidth, font) => this.doc.splitTextToSize(text2, maxWidth, font),
60557
- setFontStyle: () => {
60840
+ setFontStyle: (style) => {
60841
+ this.currentLayoutFontStyle = style;
60842
+ },
60843
+ setTextItem: (item) => {
60844
+ this.currentLayoutTextItem = item;
60558
60845
  },
60559
60846
  addElement: (element, x2, y3) => this.doc.addElement(element, x2, y3),
60560
60847
  addImage: (src, _format, x2, y3, width, height) => this.renderHtmlImage(src, x2, y3, width, height),
60561
60848
  line: (x1, y1, x2, y22) => this.renderHtmlLine(x1, y1, x2, y22),
60562
- setLineStyle: () => {
60849
+ setLineStyle: (style) => {
60850
+ this.currentLineStyle = style;
60563
60851
  },
60564
60852
  resetDash: () => {
60565
60853
  }
@@ -60568,9 +60856,20 @@ ${template}
60568
60856
  renderHtmlText(content, x2, y3) {
60569
60857
  const element = document.createElement("div");
60570
60858
  element.className = `${this.styler.prefix}header-text`;
60859
+ this.applyLayoutTextClasses(element);
60571
60860
  element.textContent = content;
60861
+ this.applyLayoutTextStyles(element);
60572
60862
  this.doc.addElement(element, x2, y3);
60573
60863
  }
60864
+ applyLayoutTextClasses(element) {
60865
+ const sectionClass = this.currentLayoutSection ? this.styler.getCustomClass(this.currentLayoutSection) : void 0;
60866
+ if (sectionClass) element.classList.add(sectionClass);
60867
+ if (this.currentLayoutTextItem?.cssClass) element.classList.add(this.currentLayoutTextItem.cssClass);
60868
+ }
60869
+ applyLayoutTextStyles(element) {
60870
+ if (this.currentLayoutTextItem?.elementStyle) Object.assign(element.style, this.currentLayoutTextItem.elementStyle);
60871
+ if (this.currentLayoutFontStyle) this.styler.applyFontStyle(element, this.currentLayoutFontStyle);
60872
+ }
60574
60873
  renderHtmlImage(src, x2, y3, width, height) {
60575
60874
  const img = document.createElement("img");
60576
60875
  img.className = `${this.styler.prefix}image`;
@@ -60582,11 +60881,12 @@ ${template}
60582
60881
  renderHtmlLine(x1, y1, x2, _y2) {
60583
60882
  const lineElement = document.createElement("div");
60584
60883
  lineElement.className = `${this.styler.prefix}line`;
60884
+ const lineStyle = this.currentLineStyle;
60585
60885
  lineElement.style.width = `${x2 - x1}px`;
60586
- lineElement.style.height = "1px";
60587
- lineElement.style.borderBottomWidth = "1px";
60588
- lineElement.style.borderBottomStyle = "solid";
60589
- lineElement.style.borderBottomColor = "#000000";
60886
+ lineElement.style.height = "0";
60887
+ lineElement.style.borderBottomWidth = `${lineStyle?.width ?? 1}px`;
60888
+ lineElement.style.borderBottomStyle = lineStyle?.dash?.length ? "dashed" : "solid";
60889
+ lineElement.style.borderBottomColor = lineStyle?.color ?? "#000000";
60590
60890
  this.doc.addElement(lineElement, x1, y1);
60591
60891
  }
60592
60892
  renderParagraphs(paragraphLayouts) {
@@ -69993,7 +70293,19 @@ AjwCRQJ5AAAAAAABAAAAANpTmfAAAAAA0e+yRgAAAADR77JG
69993
70293
  }
69994
70294
  };
69995
70295
  var $a5a21ced491ea51f$export$2e2bcd8739ae039 = $a5a21ced491ea51f$var$UltimateGuitarParser;
69996
- var $ae92e002ce14f11a$export$2e2bcd8739ae039 = "14.5.1";
70296
+ var $ae92e002ce14f11a$export$2e2bcd8739ae039 = "14.7.0-canary.0";
70297
+ var $2a7926da41d163b3$export$2e2bcd8739ae039 = {
70298
+ configure: $181068e44290b873$export$8d21e34596265fa2,
70299
+ getDefaultConfig: $fe1d3ba9df1ecad5$export$ed30944e0fe6ae5c,
70300
+ getHTMLDefaultConfig: $fe1d3ba9df1ecad5$export$feae4e1ddbcbea1a,
70301
+ getMeasuredHtmlDefaultConfig: $fe1d3ba9df1ecad5$export$fe41e6106c4780cb,
70302
+ getPDFDefaultConfig: $fe1d3ba9df1ecad5$export$a9bd96cef660c12c,
70303
+ mergeConfigs: $28a2fcb6fb95a147$export$5d86b86a654a7039
70304
+ };
70305
+ var $3f8a8e161b112441$export$2e2bcd8739ae039 = {
70306
+ getCapos: $2ce1086ce25c9ac0$export$b07b16221c14aaa,
70307
+ getKeys: $2ce1086ce25c9ac0$export$74743eda5dda3ccf
70308
+ };
69997
70309
  var $a3816b486f741c00$exports = {};
69998
70310
  var $892913528e7f60f9$export$2e2bcd8739ae039 = {
69999
70311
  CHORUS: $dce48cb70c4120bb$export$8db6c706fc9142b2,
@@ -70033,6 +70345,8 @@ AjwCRQJ5AAAAAAABAAAAANpTmfAAAAAA0e+yRgAAAADR77JG
70033
70345
  CanvasMeasurer: $5aa067f9e49dac6d$export$6d4390fed2af4771,
70034
70346
  JsPdfMeasurer: $084c3084a14f9d9d$export$341872369d2a416a,
70035
70347
  LayoutEngine: $7fa32b9e3992eddb$export$12b762d1038ddc6b,
70348
+ formatterConfiguration: $2a7926da41d163b3$export$2e2bcd8739ae039,
70349
+ keyHelpers: $3f8a8e161b112441$export$2e2bcd8739ae039,
70036
70350
  version: $ae92e002ce14f11a$export$2e2bcd8739ae039,
70037
70351
  templateHelpers: {
70038
70352
  isEvaluatable: $28a2fcb6fb95a147$export$e3f63561d52b936d,
@@ -70087,7 +70401,7 @@ html2canvas/dist/html2canvas.js:
70087
70401
  ***************************************************************************** *)
70088
70402
 
70089
70403
  dompurify/dist/purify.es.mjs:
70090
- (*! @license DOMPurify 3.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.0/LICENSE *)
70404
+ (*! @license DOMPurify 3.3.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.2/LICENSE *)
70091
70405
 
70092
70406
  svg-pathdata/lib/SVGPathData.module.js:
70093
70407
  (*! *****************************************************************************