chordsheetjs 14.6.1 → 15.0.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.
Files changed (129) hide show
  1. package/README.md +12 -3
  2. package/lib/bundle.js +25728 -66671
  3. package/lib/bundle.min.js +148 -7118
  4. package/lib/index.js +1 -7770
  5. package/lib/index.js.map +1 -1
  6. package/lib/main.d.ts +2 -131
  7. package/lib/main.d.ts.map +1 -1
  8. package/lib/module.js +2 -7769
  9. package/lib/module.js.map +1 -1
  10. package/lib/pdf/chord.d.ts +219 -0
  11. package/lib/pdf/chord_definition/chord_definition.d.ts +66 -0
  12. package/lib/pdf/chord_definition/chord_definition_set.d.ts +12 -0
  13. package/lib/pdf/chord_diagram/chord_diagram.d.ts +131 -0
  14. package/lib/pdf/chord_diagram/js_pdf_renderer.d.ts +40 -0
  15. package/lib/pdf/chord_diagram/renderer.d.ts +43 -0
  16. package/lib/pdf/chord_parsing_error.d.ts +2 -0
  17. package/lib/pdf/chord_sheet/ast_component.d.ts +11 -0
  18. package/lib/pdf/chord_sheet/ast_type.d.ts +9 -0
  19. package/lib/pdf/chord_sheet/chord_lyrics_pair.d.ts +60 -0
  20. package/lib/pdf/chord_sheet/chord_pro/composite.d.ts +11 -0
  21. package/lib/pdf/chord_sheet/chord_pro/evaluatable.d.ts +7 -0
  22. package/lib/pdf/chord_sheet/chord_pro/evaluation_error.d.ts +7 -0
  23. package/lib/pdf/chord_sheet/chord_pro/literal.d.ts +9 -0
  24. package/lib/pdf/chord_sheet/chord_pro/ternary.d.ts +29 -0
  25. package/lib/pdf/chord_sheet/comment.d.ts +21 -0
  26. package/lib/pdf/chord_sheet/font.d.ts +47 -0
  27. package/lib/pdf/chord_sheet/font_size.d.ts +33 -0
  28. package/lib/pdf/chord_sheet/font_stack.d.ts +13 -0
  29. package/lib/pdf/chord_sheet/item.d.ts +7 -0
  30. package/lib/pdf/chord_sheet/line.d.ts +130 -0
  31. package/lib/pdf/chord_sheet/line_expander.d.ts +12 -0
  32. package/lib/pdf/chord_sheet/metadata.d.ts +71 -0
  33. package/lib/pdf/chord_sheet/metadata_accessors.d.ts +18 -0
  34. package/lib/pdf/chord_sheet/paragraph.d.ts +48 -0
  35. package/lib/pdf/chord_sheet/soft_line_break.d.ts +15 -0
  36. package/lib/pdf/chord_sheet/song.d.ts +253 -0
  37. package/lib/pdf/chord_sheet/song_mapper.d.ts +15 -0
  38. package/lib/pdf/chord_sheet/standard_metadata_providers.d.ts +5 -0
  39. package/lib/pdf/chord_sheet/tag.d.ts +104 -0
  40. package/lib/pdf/chord_sheet/tag_interpreter.d.ts +14 -0
  41. package/lib/pdf/chord_sheet/tags.d.ts +259 -0
  42. package/lib/pdf/chord_sheet/trace_info.d.ts +6 -0
  43. package/lib/pdf/chord_sheet_serializer.d.ts +49 -0
  44. package/lib/pdf/constants.d.ts +117 -0
  45. package/lib/pdf/formatter/chord_pro_formatter.d.ts +39 -0
  46. package/lib/pdf/formatter/chord_renderer.d.ts +30 -0
  47. package/lib/pdf/formatter/chords_over_words_formatter.d.ts +33 -0
  48. package/lib/pdf/formatter/configuration/base_configuration.d.ts +58 -0
  49. package/lib/pdf/formatter/configuration/default_config_manager.d.ts +31 -0
  50. package/lib/pdf/formatter/configuration/html_configuration.d.ts +37 -0
  51. package/lib/pdf/formatter/configuration/index.d.ts +13 -0
  52. package/lib/pdf/formatter/configuration/measured_html_configuration.d.ts +38 -0
  53. package/lib/pdf/formatter/configuration/measurement_based_configuration.d.ts +204 -0
  54. package/lib/pdf/formatter/configuration/pdf_configuration.d.ts +16 -0
  55. package/lib/pdf/formatter/formatter.d.ts +38 -0
  56. package/lib/pdf/formatter/formatting_context.d.ts +7 -0
  57. package/lib/pdf/formatter/html_div_formatter.d.ts +9 -0
  58. package/lib/pdf/formatter/html_formatter.d.ts +60 -0
  59. package/lib/pdf/formatter/html_table_formatter.d.ts +10 -0
  60. package/lib/pdf/formatter/measured_html_formatter.d.ts +43 -0
  61. package/lib/pdf/formatter/measurement_based_formatter.d.ts +19 -0
  62. package/lib/pdf/formatter/pdf_formatter/doc_wrapper.d.ts +53 -0
  63. package/lib/pdf/formatter/pdf_formatter/fonts/NimbusSansLFonts.base64.d.ts +4 -0
  64. package/lib/pdf/formatter/pdf_formatter/types.d.ts +34 -0
  65. package/lib/pdf/formatter/pdf_formatter.d.ts +40 -0
  66. package/lib/pdf/formatter/templates/html_div_formatter.d.ts +3 -0
  67. package/lib/pdf/formatter/templates/html_table_formatter.d.ts +3 -0
  68. package/lib/pdf/formatter/text_formatter.d.ts +35 -0
  69. package/lib/pdf/helpers.d.ts +42 -0
  70. package/lib/pdf/index.d.ts +126 -0
  71. package/lib/pdf/index.js +24369 -0
  72. package/lib/pdf/key.d.ts +124 -0
  73. package/lib/pdf/key_config.d.ts +3 -0
  74. package/lib/pdf/layout/engine/condition.d.ts +25 -0
  75. package/lib/pdf/layout/engine/dimensions.d.ts +33 -0
  76. package/lib/pdf/layout/engine/index.d.ts +7 -0
  77. package/lib/pdf/layout/engine/item_processor.d.ts +70 -0
  78. package/lib/pdf/layout/engine/layout_engine.d.ts +67 -0
  79. package/lib/pdf/layout/engine/layout_factory.d.ts +22 -0
  80. package/lib/pdf/layout/engine/layout_helpers.d.ts +35 -0
  81. package/lib/pdf/layout/engine/line_breaker.d.ts +54 -0
  82. package/lib/pdf/layout/engine/paragraph_splitter/index.d.ts +5 -0
  83. package/lib/pdf/layout/engine/paragraph_splitter/paragraph_splitter.d.ts +5 -0
  84. package/lib/pdf/layout/engine/paragraph_splitter/strategies/five_or_more_lines_paragraph_split_strategy.d.ts +14 -0
  85. package/lib/pdf/layout/engine/paragraph_splitter/strategies/four_lines_paragraph_split_strategy.d.ts +8 -0
  86. package/lib/pdf/layout/engine/paragraph_splitter/strategies/three_or_less_lines_paragraph_split_strategy.d.ts +4 -0
  87. package/lib/pdf/layout/engine/title_separator_tag.d.ts +8 -0
  88. package/lib/pdf/layout/engine/types.d.ts +98 -0
  89. package/lib/pdf/layout/measurement/canvas_measurer.d.ts +18 -0
  90. package/lib/pdf/layout/measurement/dom_measurer.d.ts +21 -0
  91. package/lib/pdf/layout/measurement/index.d.ts +4 -0
  92. package/lib/pdf/layout/measurement/js_pdf_measurer.d.ts +12 -0
  93. package/lib/pdf/layout/measurement/measurer.d.ts +52 -0
  94. package/lib/pdf/module.js +24336 -0
  95. package/lib/pdf/normalize_mappings/enharmonic-normalize.d.ts +2 -0
  96. package/lib/pdf/normalize_mappings/suffix-normalize-mapping.d.ts +2 -0
  97. package/lib/pdf/pango/pango_helpers.d.ts +6 -0
  98. package/lib/pdf/parser/chord/peg_parser.d.ts +55 -0
  99. package/lib/pdf/parser/chord_definition/peg_parser.d.ts +55 -0
  100. package/lib/pdf/parser/chord_pro/helpers.d.ts +15 -0
  101. package/lib/pdf/parser/chord_pro/peg_parser.d.ts +55 -0
  102. package/lib/pdf/parser/chord_pro_parser.d.ts +32 -0
  103. package/lib/pdf/parser/chord_sheet_parser.d.ts +57 -0
  104. package/lib/pdf/parser/chords_over_words/helpers.d.ts +33 -0
  105. package/lib/pdf/parser/chords_over_words/peg_parser.d.ts +55 -0
  106. package/lib/pdf/parser/chords_over_words_parser.d.ts +67 -0
  107. package/lib/pdf/parser/null_tracer.d.ts +4 -0
  108. package/lib/pdf/parser/parser_helpers.d.ts +3 -0
  109. package/lib/pdf/parser/parser_warning.d.ts +33 -0
  110. package/lib/pdf/parser/ultimate_guitar_parser.d.ts +46 -0
  111. package/lib/pdf/pdf.d.ts +2 -0
  112. package/lib/pdf/rendering/html/html_doc_wrapper.d.ts +82 -0
  113. package/lib/pdf/rendering/html/html_element_styler.d.ts +58 -0
  114. package/lib/pdf/rendering/html/positioned_html_renderer.d.ts +85 -0
  115. package/lib/pdf/rendering/pdf/js_pdf_renderer.d.ts +46 -0
  116. package/lib/pdf/rendering/pdf/pdf_chord_diagram_renderer.d.ts +118 -0
  117. package/lib/pdf/rendering/renderer.d.ts +273 -0
  118. package/lib/pdf/rendering/shared/layout_section_renderer.d.ts +93 -0
  119. package/lib/pdf/scales.d.ts +3 -0
  120. package/lib/pdf/serialized_types.d.ts +76 -0
  121. package/lib/pdf/song_builder.d.ts +38 -0
  122. package/lib/pdf/template_helpers/metadata_processor.d.ts +14 -0
  123. package/lib/pdf/template_helpers/when.d.ts +13 -0
  124. package/lib/pdf/template_helpers/when_callback.d.ts +2 -0
  125. package/lib/pdf/template_helpers/when_clause.d.ts +8 -0
  126. package/lib/pdf/template_helpers.d.ts +64 -0
  127. package/lib/pdf/utilities.d.ts +35 -0
  128. package/lib/pdf/version.d.ts +2 -0
  129. package/package.json +20 -2
@@ -0,0 +1,52 @@
1
+ import { FontConfiguration } from '../../formatter/configuration';
2
+ export interface TextDimensions {
3
+ width: number;
4
+ height: number;
5
+ }
6
+ export interface Measurer {
7
+ /**
8
+ * Measures the dimensions of text with the given font configuration
9
+ * @param text The text to measure
10
+ * @param fontConfig The font configuration to apply
11
+ * @returns The dimensions of the text
12
+ */
13
+ measureText(text: string, fontConfig: FontConfiguration): TextDimensions;
14
+ /**
15
+ * Measures the width of text with the given font configuration
16
+ * @param text The text to measure
17
+ * @param fontConfig The font configuration to apply
18
+ * @returns The width of the text
19
+ */
20
+ measureTextWidth(text: string, fontConfig: FontConfiguration): number;
21
+ /**
22
+ * Measures the height of text with the given font configuration
23
+ * @param text The text to measure
24
+ * @param fontConfig The font configuration to apply
25
+ * @returns The height of the text
26
+ */
27
+ measureTextHeight(text: string, fontConfig: FontConfiguration): number;
28
+ /**
29
+ * Splits text into lines that fit within the given width
30
+ * @param text The text to split
31
+ * @param maxWidth The maximum width of each line
32
+ * @param fontConfig The font configuration to apply
33
+ * @returns The lines of text
34
+ */
35
+ splitTextToSize(text: string, maxWidth: number, fontConfig: FontConfiguration): string[];
36
+ }
37
+ /**
38
+ * Base class for implementing measurers with common functionality
39
+ */
40
+ export declare abstract class BaseMeasurer implements Measurer {
41
+ abstract measureText(text: string, fontConfig: FontConfiguration): TextDimensions;
42
+ measureTextWidth(text: string, fontConfig: FontConfiguration): number;
43
+ measureTextHeight(text: string, fontConfig: FontConfiguration): number;
44
+ abstract splitTextToSize(text: string, maxWidth: number, fontConfig: FontConfiguration): string[];
45
+ protected splitTextWithMeasure(text: string, maxWidth: number, measure: (value: string) => number): string[];
46
+ protected wrapParagraph(paragraph: string, maxWidth: number, measure: (value: string) => number): string[];
47
+ protected splitWord(word: string, maxWidth: number, measure: (value: string) => number): {
48
+ lines: string[];
49
+ remainder: string;
50
+ };
51
+ private accumulateWords;
52
+ }