chordsheetjs 14.5.1 → 14.6.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
@@ -36962,8 +36962,9 @@ ${error.stack}`);
36962
36962
  */
36963
36963
  toString({ useUnicodeModifier = false } = {}) {
36964
36964
  let chordString = "";
36965
- const suffix = this.suffix || "";
36965
+ let suffix = this.suffix || "";
36966
36966
  const showMinor = suffix[0] !== "m";
36967
+ if (useUnicodeModifier) suffix = suffix.replace(/#(?=\d)/g, "\u266F").replace(/b(?=\d)/g, "\u266D");
36967
36968
  if (this.root) chordString = this.root.toString({
36968
36969
  showMinor,
36969
36970
  useUnicodeModifier
@@ -38541,129 +38542,301 @@ ${error.stack}`);
38541
38542
  },
38542
38543
  fonts: {
38543
38544
  title: {
38544
- name: "NimbusSansL-Bol",
38545
+ name: "Arial",
38545
38546
  style: "bold",
38546
- size: 24,
38547
- color: "black"
38547
+ size: 22,
38548
+ color: "#151515"
38548
38549
  },
38549
38550
  subtitle: {
38550
- name: "NimbusSansL-Reg",
38551
+ name: "Arial",
38551
38552
  style: "normal",
38552
- size: 10,
38553
- color: 100
38553
+ size: 11,
38554
+ color: "#6f6f6f"
38554
38555
  },
38555
38556
  metadata: {
38556
- name: "NimbusSansL-Reg",
38557
+ name: "Arial",
38557
38558
  style: "normal",
38558
38559
  size: 10,
38559
- color: 100
38560
+ color: "#8b8b8b"
38560
38561
  },
38561
38562
  text: {
38562
- name: "NimbusSansL-Reg",
38563
+ name: "Arial",
38563
38564
  style: "normal",
38564
38565
  size: 10,
38565
- color: "black"
38566
+ color: "#232323"
38566
38567
  },
38567
38568
  chord: {
38568
- name: "NimbusSansL-Bol",
38569
+ name: "Arial",
38569
38570
  style: "bold",
38570
38571
  size: 9,
38571
- color: "black"
38572
+ color: "#232323"
38572
38573
  },
38573
38574
  comment: {
38574
- name: "NimbusSansL-Bol",
38575
+ name: "Arial",
38575
38576
  style: "bold",
38576
38577
  size: 10,
38577
- color: "black"
38578
+ color: "#232323"
38578
38579
  },
38579
38580
  sectionLabel: {
38580
- name: "NimbusSansL-Bol",
38581
+ name: "Arial",
38581
38582
  style: "bold",
38582
38583
  size: 10,
38583
- color: "black"
38584
+ color: "#a1312d"
38584
38585
  },
38585
38586
  annotation: {
38586
- name: "NimbusSansL-Reg",
38587
+ name: "Arial",
38587
38588
  style: "normal",
38588
38589
  size: 10,
38589
- color: "black"
38590
+ color: "#232323"
38590
38591
  }
38591
38592
  },
38592
38593
  layout: {
38593
38594
  global: {
38594
38595
  margins: {
38595
- top: 35,
38596
- bottom: 10,
38596
+ top: 14,
38597
+ bottom: 12,
38597
38598
  left: 45,
38598
38599
  right: 45
38599
38600
  }
38600
38601
  },
38601
38602
  header: {
38602
- height: 60,
38603
+ height: 72,
38603
38604
  content: [
38604
38605
  {
38605
38606
  type: "text",
38606
38607
  template: "%{title}",
38607
38608
  style: {
38608
- name: "NimbusSansL-Bol",
38609
+ name: "Arial",
38609
38610
  style: "bold",
38610
- size: 24,
38611
- color: "black"
38611
+ size: 19,
38612
+ color: "#151515",
38613
+ weight: 700
38612
38614
  },
38613
38615
  position: {
38614
38616
  x: "left",
38615
- y: 15
38617
+ y: 0,
38618
+ clip: true,
38619
+ ellipsis: true
38620
+ },
38621
+ condition: {
38622
+ page: {
38623
+ first: true
38624
+ }
38616
38625
  }
38617
38626
  },
38618
38627
  {
38619
38628
  type: "text",
38620
- template: "Key of %{key} - BPM %{tempo} - Time %{time}",
38629
+ template: "%{artist}",
38621
38630
  style: {
38622
- name: "NimbusSansL-Reg",
38631
+ name: "Arial",
38623
38632
  style: "normal",
38624
- size: 12,
38625
- color: 100
38633
+ size: 11,
38634
+ color: "#6f6f6f"
38626
38635
  },
38627
38636
  position: {
38628
38637
  x: "left",
38629
- y: 28
38638
+ y: 25,
38639
+ clip: true,
38640
+ ellipsis: true
38641
+ },
38642
+ condition: {
38643
+ page: {
38644
+ first: true
38645
+ }
38630
38646
  }
38631
38647
  },
38632
38648
  {
38633
38649
  type: "text",
38634
- template: "By %{artist} %{subtitle}",
38650
+ template: "%{tempo|%{} BPM}%{time| \xB7 %{}}%{capo| \xB7 Capo %{}}",
38635
38651
  style: {
38636
- name: "NimbusSansL-Reg",
38652
+ name: "Arial",
38637
38653
  style: "normal",
38638
- size: 10,
38639
- color: 100
38654
+ size: 11,
38655
+ color: "#6f6f6f"
38640
38656
  },
38641
38657
  position: {
38642
38658
  x: "left",
38643
- y: 38
38659
+ y: 40,
38660
+ width: 240,
38661
+ clip: true,
38662
+ ellipsis: true
38663
+ },
38664
+ condition: {
38665
+ page: {
38666
+ first: true
38667
+ }
38644
38668
  }
38645
- }
38646
- ]
38647
- },
38648
- footer: {
38649
- height: 30,
38650
- content: [
38669
+ },
38670
+ {
38671
+ type: "line",
38672
+ style: {
38673
+ width: 1,
38674
+ color: "#d7d7d7"
38675
+ },
38676
+ position: {
38677
+ x: 0,
38678
+ y: 60,
38679
+ width: "auto",
38680
+ height: 0
38681
+ },
38682
+ condition: {
38683
+ page: {
38684
+ first: true
38685
+ }
38686
+ }
38687
+ },
38651
38688
  {
38652
38689
  type: "text",
38653
- value: "\xA92024 My Music Publishing",
38690
+ template: "%{key}",
38691
+ cssClass: "measured-html-key-badge",
38692
+ elementStyle: {
38693
+ width: "28px",
38694
+ height: "28px",
38695
+ display: "flex",
38696
+ alignItems: "center",
38697
+ justifyContent: "center",
38698
+ borderRadius: "999px",
38699
+ backgroundColor: "#a1312d",
38700
+ textAlign: "center",
38701
+ boxSizing: "border-box"
38702
+ },
38654
38703
  style: {
38655
- name: "NimbusSansL-Reg",
38704
+ name: "Arial",
38705
+ style: "bold",
38706
+ size: 12,
38707
+ color: "#ffffff",
38708
+ weight: 700
38709
+ },
38710
+ position: {
38711
+ x: "right",
38712
+ y: 12,
38713
+ width: 28,
38714
+ offsetX: -2
38715
+ },
38716
+ condition: {
38717
+ and: [
38718
+ {
38719
+ page: {
38720
+ first: true
38721
+ }
38722
+ },
38723
+ {
38724
+ key: {
38725
+ exists: true
38726
+ }
38727
+ }
38728
+ ]
38729
+ }
38730
+ },
38731
+ {
38732
+ type: "text",
38733
+ template: "%{title}",
38734
+ style: {
38735
+ name: "Arial",
38736
+ style: "bold",
38737
+ size: 12,
38738
+ color: "#151515",
38739
+ weight: 700
38740
+ },
38741
+ position: {
38742
+ x: "left",
38743
+ y: 0,
38744
+ clip: true,
38745
+ ellipsis: true
38746
+ },
38747
+ condition: {
38748
+ page: {
38749
+ greater_than: 1
38750
+ }
38751
+ }
38752
+ },
38753
+ {
38754
+ type: "text",
38755
+ template: "%{page}/%{pages}",
38756
+ style: {
38757
+ name: "Arial",
38656
38758
  style: "normal",
38657
38759
  size: 10,
38658
- color: "black"
38760
+ color: "#9a9a9a"
38659
38761
  },
38660
38762
  position: {
38661
- x: "left",
38662
- y: 0
38763
+ x: "right",
38764
+ y: 4,
38765
+ offsetX: -38
38766
+ },
38767
+ condition: {
38768
+ page: {
38769
+ greater_than: 1
38770
+ }
38771
+ }
38772
+ },
38773
+ {
38774
+ type: "text",
38775
+ template: "%{key}",
38776
+ cssClass: "measured-html-key-badge",
38777
+ elementStyle: {
38778
+ width: "28px",
38779
+ height: "28px",
38780
+ display: "flex",
38781
+ alignItems: "center",
38782
+ justifyContent: "center",
38783
+ borderRadius: "999px",
38784
+ backgroundColor: "#a1312d",
38785
+ textAlign: "center",
38786
+ boxSizing: "border-box"
38787
+ },
38788
+ style: {
38789
+ name: "Arial",
38790
+ style: "bold",
38791
+ size: 12,
38792
+ color: "#ffffff",
38793
+ weight: 700
38794
+ },
38795
+ position: {
38796
+ x: "right",
38797
+ y: 2,
38798
+ width: 28,
38799
+ offsetX: -2
38800
+ },
38801
+ condition: {
38802
+ and: [
38803
+ {
38804
+ page: {
38805
+ greater_than: 1
38806
+ }
38807
+ },
38808
+ {
38809
+ key: {
38810
+ exists: true
38811
+ }
38812
+ }
38813
+ ]
38814
+ }
38815
+ },
38816
+ {
38817
+ type: "line",
38818
+ style: {
38819
+ width: 1,
38820
+ color: "#d7d7d7"
38821
+ },
38822
+ position: {
38823
+ x: 0,
38824
+ y: 32,
38825
+ width: "auto",
38826
+ height: 0
38827
+ },
38828
+ condition: {
38829
+ page: {
38830
+ greater_than: 1
38831
+ }
38663
38832
  }
38664
38833
  }
38665
38834
  ]
38666
38835
  },
38836
+ footer: {
38837
+ height: 0,
38838
+ content: []
38839
+ },
38667
38840
  sections: {
38668
38841
  global: {
38669
38842
  paragraphSpacing: 10,
@@ -38710,22 +38883,22 @@ ${error.stack}`);
38710
38883
  },
38711
38884
  fonts: {
38712
38885
  title: {
38713
- name: "NimbusSansL-Bol",
38886
+ name: "Arial",
38714
38887
  style: "bold",
38715
38888
  size: 9,
38716
- color: "black"
38889
+ color: "#232323"
38717
38890
  },
38718
38891
  fingerings: {
38719
- name: "NimbusSansL-Bol",
38892
+ name: "Arial",
38720
38893
  style: "bold",
38721
38894
  size: 6,
38722
- color: "black"
38895
+ color: "#232323"
38723
38896
  },
38724
38897
  baseFret: {
38725
- name: "NimbusSansL-Bol",
38898
+ name: "Arial",
38726
38899
  style: "bold",
38727
38900
  size: 6,
38728
- color: "black"
38901
+ color: "#232323"
38729
38902
  }
38730
38903
  }
38731
38904
  }
@@ -59606,6 +59779,7 @@ Or set the song key before changing key:
59606
59779
  * Gets conditional CSS styles from font configuration
59607
59780
  */
59608
59781
  getConditionalStyles(style) {
59782
+ const normalizedFontStyles = this.getNormalizedFontStyles(style);
59609
59783
  return {
59610
59784
  ...style.name && {
59611
59785
  fontFamily: style.name
@@ -59613,15 +59787,7 @@ Or set the song key before changing key:
59613
59787
  ...style.size && {
59614
59788
  fontSize: `${style.size}px`
59615
59789
  },
59616
- ...style.weight && {
59617
- fontWeight: style.weight
59618
- },
59619
- ...style.style && {
59620
- fontStyle: style.style
59621
- },
59622
- ...style.color && {
59623
- color: style.color
59624
- },
59790
+ ...normalizedFontStyles,
59625
59791
  ...style.underline && {
59626
59792
  textDecoration: "underline"
59627
59793
  },
@@ -59672,6 +59838,7 @@ Or set the song key before changing key:
59672
59838
  * Applies font styles to an HTML element
59673
59839
  */
59674
59840
  applyFontStyle(element, style) {
59841
+ const normalizedFontStyles = this.getNormalizedFontStyles(style);
59675
59842
  const styles = {
59676
59843
  whiteSpace: "pre",
59677
59844
  ...style.name && {
@@ -59680,15 +59847,7 @@ Or set the song key before changing key:
59680
59847
  ...style.size && {
59681
59848
  fontSize: `${style.size}px`
59682
59849
  },
59683
- ...style.weight && {
59684
- fontWeight: style.weight
59685
- },
59686
- ...style.style && {
59687
- fontStyle: style.style
59688
- },
59689
- ...style.color && {
59690
- color: style.color
59691
- },
59850
+ ...normalizedFontStyles,
59692
59851
  ...style.underline && {
59693
59852
  textDecoration: "underline"
59694
59853
  },
@@ -59721,6 +59880,27 @@ Or set the song key before changing key:
59721
59880
  getCustomClass(elementType) {
59722
59881
  return this.config.cssClasses?.[elementType];
59723
59882
  }
59883
+ getNormalizedFontStyles(style) {
59884
+ const fontWeight = style.weight ?? (style.style === "bold" ? "bold" : void 0);
59885
+ const fontStyle = style.style && style.style !== "bold" ? style.style : void 0;
59886
+ const color = this.normalizeColor(style.color);
59887
+ return {
59888
+ ...fontWeight && {
59889
+ fontWeight
59890
+ },
59891
+ ...fontStyle && {
59892
+ fontStyle
59893
+ },
59894
+ ...color && {
59895
+ color
59896
+ }
59897
+ };
59898
+ }
59899
+ normalizeColor(color) {
59900
+ if (typeof color === "number") return `rgb(${color}, ${color}, ${color})`;
59901
+ if (typeof color === "string" && /^\d+$/.test(color)) return `rgb(${color}, ${color}, ${color})`;
59902
+ return color;
59903
+ }
59724
59904
  };
59725
59905
  var $0594288a7c3f9fa6$export$2e2bcd8739ae039 = $0594288a7c3f9fa6$export$94eb343ca6d26096;
59726
59906
  function $bdd8c6196670168a$var$isNumber(value) {
@@ -59955,7 +60135,14 @@ Or set the song key before changing key:
59955
60135
  if (!contentItem.condition) return true;
59956
60136
  const { metadata: songMetadata, extraMetadata } = this.context;
59957
60137
  const metadata = new Proxy({}, {
59958
- get: (_3, prop) => extraMetadata?.[prop] ?? songMetadata.get(prop)
60138
+ get: (_3, prop) => {
60139
+ const value = extraMetadata?.[prop] ?? songMetadata.get(prop);
60140
+ if ((prop === "page" || prop === "pages" || prop === "renderTime") && typeof value === "string") {
60141
+ const numericValue = Number(value);
60142
+ if (!Number.isNaN(numericValue)) return numericValue;
60143
+ }
60144
+ return value;
60145
+ }
59959
60146
  });
59960
60147
  return new (0, $bdd8c6196670168a$export$2e2bcd8739ae039)(contentItem.condition, metadata).evaluate();
59961
60148
  }
@@ -59970,16 +60157,19 @@ Or set the song key before changing key:
59970
60157
  this.backend.setFontStyle(style);
59971
60158
  const availableWidth = position.width || this.getAvailableWidth();
59972
60159
  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);
60160
+ if (position.clip) this.renderClippedText(textValue, textItem, availableWidth, y3, style);
60161
+ else this.renderMultilineText(textValue, textItem, availableWidth, y3, style);
59975
60162
  }
59976
60163
  /**
59977
60164
  * Renders clipped text with optional ellipsis
59978
60165
  */
59979
- renderClippedText(textValue, position, availableWidth, y3, style) {
60166
+ renderClippedText(textValue, textItem, availableWidth, y3, style) {
60167
+ const { position } = textItem;
59980
60168
  const clippedText = position.ellipsis ? this.clipTextWithEllipsis(textValue, availableWidth, style) : this.clipText(textValue, availableWidth, style);
59981
60169
  const textWidth = this.backend.getTextWidth(clippedText, style);
59982
- const x2 = this.calculateX(position.x, textWidth);
60170
+ const alignmentWidth = position.width ?? textWidth;
60171
+ this.backend.setTextItem?.(textItem);
60172
+ const x2 = this.calculateX(position.x, alignmentWidth, position.offsetX);
59983
60173
  this.backend.text(clippedText, x2, y3);
59984
60174
  }
59985
60175
  /**
@@ -60001,12 +60191,15 @@ Or set the song key before changing key:
60001
60191
  /**
60002
60192
  * Renders multiline text
60003
60193
  */
60004
- renderMultilineText(textValue, position, availableWidth, y3, style) {
60194
+ renderMultilineText(textValue, textItem, availableWidth, y3, style) {
60195
+ const { position } = textItem;
60005
60196
  const lines = this.backend.splitTextToSize(textValue, availableWidth, style);
60006
60197
  let tempY = y3;
60007
60198
  lines.forEach((line) => {
60008
60199
  const lineWidth = this.backend.getTextWidth(line, style);
60009
- const x2 = this.calculateX(position.x, lineWidth);
60200
+ const alignmentWidth = position.width ?? lineWidth;
60201
+ this.backend.setTextItem?.(textItem);
60202
+ const x2 = this.calculateX(position.x, alignmentWidth, position.offsetX);
60010
60203
  this.backend.text(line, x2, tempY);
60011
60204
  tempY += style.size * (style.lineHeight ?? 1.2);
60012
60205
  });
@@ -60016,7 +60209,7 @@ Or set the song key before changing key:
60016
60209
  */
60017
60210
  renderImage(imageItem, sectionY) {
60018
60211
  const { src, position, size, alias, compression, rotation } = imageItem;
60019
- const x2 = this.calculateX(position.x, size.width);
60212
+ const x2 = this.calculateX(position.x, size.width, position.offsetX);
60020
60213
  const y3 = sectionY + position.y;
60021
60214
  const format = src.split(".").pop()?.toUpperCase();
60022
60215
  this.backend.addImage(src, format, x2, y3, size.width, size.height, alias, compression, rotation);
@@ -60053,16 +60246,16 @@ ${template}
60053
60246
  /**
60054
60247
  * Calculates the X position based on alignment
60055
60248
  */
60056
- calculateX(alignment, width = 0) {
60249
+ calculateX(alignment, width = 0, offsetX = 0) {
60057
60250
  switch (alignment) {
60058
60251
  case "center":
60059
- return this.backend.pageSize.width / 2 - width / 2;
60252
+ return this.backend.pageSize.width / 2 - width / 2 + offsetX;
60060
60253
  case "right":
60061
- return this.backend.pageSize.width - this.context.margins.right - width;
60254
+ return this.backend.pageSize.width - this.context.margins.right - width + offsetX;
60062
60255
  case "left":
60063
60256
  default:
60064
- if (typeof alignment === "number") return this.context.margins.left + alignment;
60065
- return this.context.margins.left;
60257
+ if (typeof alignment === "number") return this.context.margins.left + alignment + offsetX;
60258
+ return this.context.margins.left + offsetX;
60066
60259
  }
60067
60260
  }
60068
60261
  /**
@@ -60335,7 +60528,6 @@ ${template}
60335
60528
  recordRenderingTime() {
60336
60529
  const endTime = performance.now();
60337
60530
  this.renderTime = (endTime - this.startTime) / 1e3;
60338
- console.log(`Rendered in ${this.renderTime.toFixed(2)} seconds`);
60339
60531
  }
60340
60532
  /**
60341
60533
  * Get the elements for a specific page
@@ -60469,7 +60661,7 @@ ${template}
60469
60661
  * Creates a new HtmlRenderer
60470
60662
  */
60471
60663
  constructor(song, container, configuration) {
60472
- super(song), this._dimensions = null, this._dimensionCacheKey = null;
60664
+ super(song), this.currentLayoutFontStyle = null, this.currentLayoutSection = null, this.currentLayoutTextItem = null, this.currentLineStyle = null, this._dimensions = null, this._dimensionCacheKey = null;
60473
60665
  this.container = container;
60474
60666
  this.configuration = configuration;
60475
60667
  this.styler = new (0, $0594288a7c3f9fa6$export$2e2bcd8739ae039)({
@@ -60530,36 +60722,52 @@ ${template}
60530
60722
  console.log("Chord diagram rendering is stubbed out");
60531
60723
  }
60532
60724
  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");
60725
+ const headerConfig = this.getHeaderConfig();
60726
+ const footerConfig = this.getFooterConfig();
60727
+ if (headerConfig) this.renderLayoutForEachPage(headerConfig, "header");
60728
+ if (footerConfig) this.renderLayoutForEachPage(footerConfig, "footer");
60729
+ this.resetLayoutRenderingState();
60730
+ }
60731
+ renderLayoutForEachPage(layoutConfig, section) {
60732
+ this.doc.eachPage((_page, index2) => {
60733
+ this.currentLayoutSection = section;
60734
+ this.resetLayoutRenderingState(section);
60735
+ this.createLayoutRenderer(index2 + 1, this.doc.totalPages).renderLayout(layoutConfig, section);
60539
60736
  });
60540
60737
  }
60541
- createLayoutRenderer() {
60542
- const backend = this.createLayoutBackend();
60738
+ resetLayoutRenderingState(section = null) {
60739
+ this.currentLayoutSection = section;
60740
+ this.currentLayoutFontStyle = null;
60741
+ this.currentLayoutTextItem = null;
60742
+ this.currentLineStyle = null;
60743
+ }
60744
+ createLayoutRenderer(page, totalPages) {
60745
+ const backend = this.createLayoutBackend(page, totalPages);
60543
60746
  return new (0, $2e404bc796b05dec$export$2e2bcd8739ae039)(backend, {
60544
60747
  metadata: this.song.metadata,
60545
60748
  margins: this.dimensions.margins,
60546
- extraMetadata: this.getExtraMetadata(this.doc.currentPage, this.doc.totalPages)
60749
+ extraMetadata: this.getExtraMetadata(page, totalPages)
60547
60750
  });
60548
60751
  }
60549
- createLayoutBackend() {
60752
+ createLayoutBackend(page, totalPages) {
60550
60753
  return {
60551
60754
  pageSize: this.doc.pageSize,
60552
- currentPage: this.doc.currentPage,
60553
- totalPages: this.doc.totalPages,
60755
+ currentPage: page,
60756
+ totalPages,
60554
60757
  text: (content, x2, y3) => this.renderHtmlText(content, x2, y3),
60555
60758
  getTextWidth: (text2, font) => this.doc.getTextWidth(text2, font),
60556
60759
  splitTextToSize: (text2, maxWidth, font) => this.doc.splitTextToSize(text2, maxWidth, font),
60557
- setFontStyle: () => {
60760
+ setFontStyle: (style) => {
60761
+ this.currentLayoutFontStyle = style;
60762
+ },
60763
+ setTextItem: (item) => {
60764
+ this.currentLayoutTextItem = item;
60558
60765
  },
60559
60766
  addElement: (element, x2, y3) => this.doc.addElement(element, x2, y3),
60560
60767
  addImage: (src, _format, x2, y3, width, height) => this.renderHtmlImage(src, x2, y3, width, height),
60561
60768
  line: (x1, y1, x2, y22) => this.renderHtmlLine(x1, y1, x2, y22),
60562
- setLineStyle: () => {
60769
+ setLineStyle: (style) => {
60770
+ this.currentLineStyle = style;
60563
60771
  },
60564
60772
  resetDash: () => {
60565
60773
  }
@@ -60568,9 +60776,20 @@ ${template}
60568
60776
  renderHtmlText(content, x2, y3) {
60569
60777
  const element = document.createElement("div");
60570
60778
  element.className = `${this.styler.prefix}header-text`;
60779
+ this.applyLayoutTextClasses(element);
60571
60780
  element.textContent = content;
60781
+ this.applyLayoutTextStyles(element);
60572
60782
  this.doc.addElement(element, x2, y3);
60573
60783
  }
60784
+ applyLayoutTextClasses(element) {
60785
+ const sectionClass = this.currentLayoutSection ? this.styler.getCustomClass(this.currentLayoutSection) : void 0;
60786
+ if (sectionClass) element.classList.add(sectionClass);
60787
+ if (this.currentLayoutTextItem?.cssClass) element.classList.add(this.currentLayoutTextItem.cssClass);
60788
+ }
60789
+ applyLayoutTextStyles(element) {
60790
+ if (this.currentLayoutTextItem?.elementStyle) Object.assign(element.style, this.currentLayoutTextItem.elementStyle);
60791
+ if (this.currentLayoutFontStyle) this.styler.applyFontStyle(element, this.currentLayoutFontStyle);
60792
+ }
60574
60793
  renderHtmlImage(src, x2, y3, width, height) {
60575
60794
  const img = document.createElement("img");
60576
60795
  img.className = `${this.styler.prefix}image`;
@@ -60582,11 +60801,12 @@ ${template}
60582
60801
  renderHtmlLine(x1, y1, x2, _y2) {
60583
60802
  const lineElement = document.createElement("div");
60584
60803
  lineElement.className = `${this.styler.prefix}line`;
60804
+ const lineStyle = this.currentLineStyle;
60585
60805
  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";
60806
+ lineElement.style.height = "0";
60807
+ lineElement.style.borderBottomWidth = `${lineStyle?.width ?? 1}px`;
60808
+ lineElement.style.borderBottomStyle = lineStyle?.dash?.length ? "dashed" : "solid";
60809
+ lineElement.style.borderBottomColor = lineStyle?.color ?? "#000000";
60590
60810
  this.doc.addElement(lineElement, x1, y1);
60591
60811
  }
60592
60812
  renderParagraphs(paragraphLayouts) {
@@ -69993,7 +70213,7 @@ AjwCRQJ5AAAAAAABAAAAANpTmfAAAAAA0e+yRgAAAADR77JG
69993
70213
  }
69994
70214
  };
69995
70215
  var $a5a21ced491ea51f$export$2e2bcd8739ae039 = $a5a21ced491ea51f$var$UltimateGuitarParser;
69996
- var $ae92e002ce14f11a$export$2e2bcd8739ae039 = "14.5.1";
70216
+ var $ae92e002ce14f11a$export$2e2bcd8739ae039 = "14.6.0";
69997
70217
  var $a3816b486f741c00$exports = {};
69998
70218
  var $892913528e7f60f9$export$2e2bcd8739ae039 = {
69999
70219
  CHORUS: $dce48cb70c4120bb$export$8db6c706fc9142b2,