@dsebastien/music-notation 0.13.0 → 0.14.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.
@@ -16,6 +16,8 @@ export declare function dotLabel(doc: Document, text: string, point: [number, nu
16
16
  export declare function svgLine(doc: Document, [x1, y1]: [number, number], [x2, y2]: [number, number], cls: string): SVGElement;
17
17
  /** An HTML element with a class and optional text. */
18
18
  export declare function html<K extends keyof HTMLElementTagNameMap>(doc: Document, tag: K, cls?: string, text?: string): HTMLElementTagNameMap[K];
19
+ /** An id unique on the page (a counter behind this copy's random prefix). */
20
+ export declare const uniqueId: () => string;
19
21
  /**
20
22
  * A root <svg> sized by its viewBox, scaling with the container up to its natural width.
21
23
  *
package/dist/tab/index.js CHANGED
@@ -44,6 +44,7 @@ function html(doc, tag, cls, text) {
44
44
  }
45
45
  var NAME_PREFIX = `mn-name-${Math.random().toString(36).slice(2, 8)}-`;
46
46
  var names = 0;
47
+ var uniqueId = () => `${NAME_PREFIX}${++names}`;
47
48
  function svgRoot(doc, width, height, cls, label) {
48
49
  const id = `${NAME_PREFIX}${++names}`;
49
50
  const title = svg(doc, "title", { class: "mn-name", id });
@@ -2105,5 +2106,5 @@ export {
2105
2106
  textTabToAlphaTex
2106
2107
  };
2107
2108
 
2108
- //# debugId=E85AD092947E6FCA64756E2164756E21
2109
+ //# debugId=88C605D20363676064756E2164756E21
2109
2110
  //# sourceMappingURL=index.js.map