guidex 0.2.5 → 0.3.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 (46) hide show
  1. package/README.md +239 -3
  2. package/dist/lib/app/ControlsRow.d.ts +1 -0
  3. package/dist/lib/app/Editor.d.ts +1 -0
  4. package/dist/lib/app/EditorContext.d.ts +17 -0
  5. package/dist/lib/app/EditorTextarea.d.ts +1 -0
  6. package/dist/lib/app/ExportSettings.d.ts +1 -0
  7. package/dist/lib/app/FeedbackSpan.d.ts +5 -0
  8. package/dist/lib/app/RenderSettings.d.ts +1 -0
  9. package/dist/lib/app/SamplesRow.d.ts +1 -0
  10. package/dist/lib/app/SettingsMenu.d.ts +1 -0
  11. package/dist/lib/app/SettingsPanel.d.ts +1 -0
  12. package/dist/lib/app/SyllablesTable.d.ts +1 -0
  13. package/dist/lib/app/WordCheckPanel.d.ts +1 -0
  14. package/dist/lib/app/WordCopyControls.d.ts +1 -0
  15. package/dist/lib/app/chantLibrary.d.ts +11 -0
  16. package/dist/lib/app/editorState.d.ts +159 -0
  17. package/dist/lib/app/samples.d.ts +10 -0
  18. package/dist/lib/app/wordCopy.d.ts +30 -0
  19. package/dist/lib/chantLayout-GAfg2iKS.js +1042 -0
  20. package/dist/lib/chantLayout.d.ts +169 -0
  21. package/dist/lib/chantMarkup.d.ts +36 -0
  22. package/dist/lib/editorStorage.d.ts +179 -0
  23. package/dist/lib/embed/index.d.ts +1 -0
  24. package/dist/lib/embed/index.js +2 -2
  25. package/dist/lib/embed/manual.d.ts +19 -1
  26. package/dist/lib/embed/manual.js +43 -2
  27. package/dist/lib/guidoRender.d.ts +22 -29
  28. package/dist/lib/guidoScript.d.ts +31 -3
  29. package/dist/lib/guidoScriptTransforms.d.ts +5 -4
  30. package/dist/lib/guidoStyles.d.ts +23 -5
  31. package/dist/lib/main.d.ts +0 -1
  32. package/dist/lib/react/GuidexScore.d.ts +1 -1
  33. package/dist/lib/react/index.d.ts +1 -0
  34. package/dist/lib/react/index.js +2 -2
  35. package/dist/lib/scoreImage-DnFIbtF_.js +951 -0
  36. package/dist/lib/scoreImage.d.ts +63 -0
  37. package/dist/lib/word/index.d.ts +17 -0
  38. package/dist/lib/word/index.js +2 -0
  39. package/dist/lib/wordChecker-C3nJrk_j.js +1042 -0
  40. package/dist/lib/wordChecker.d.ts +66 -0
  41. package/dist/lib/wordClipboard.d.ts +25 -0
  42. package/dist/lib/wordExport.d.ts +244 -0
  43. package/dist-embed/guidex-embed.min.js +1 -1
  44. package/package.json +8 -1
  45. package/dist/lib/core-CmzGmufM.js +0 -1262
  46. package/dist/lib/settingsMenu.d.ts +0 -1
@@ -148,11 +148,19 @@ export declare const STYLE_SETS: {
148
148
  };
149
149
  export type StyleSetName = keyof typeof STYLE_SETS;
150
150
  export declare const DEFAULT_STYLE_SET: StyleSetName;
151
- /** One resolved run of syllable text: its (already transformed) string and
152
- * how to draw it. */
151
+ /** What one run of syllable text is, independent of how a style set
152
+ * draws it: the notation-fixed meaning of the markup that produced it.
153
+ * `liturgy` the `__…__` wrapper, `rubric` `_…_`, `star` the whole-syllable
154
+ * `**`, `marker` the pause-marker glyph runs (`*`, `†`), `plus` the `+`
155
+ * of a Liturgy run; absent for plain text. The marked-up text export
156
+ * (chantMarkup.ts) and the renderer's run classes share this vocabulary. */
157
+ export type ChantRunKind = 'liturgy' | 'rubric' | 'star' | 'marker' | 'plus';
158
+ /** One resolved run of syllable text: its (already transformed) string,
159
+ * how to draw it, and what markup produced it. */
153
160
  export interface SyllablePart {
154
161
  text: string;
155
162
  style: PartStyle;
163
+ kind?: ChantRunKind;
156
164
  }
157
165
  /**
158
166
  * Resolves a syllable's raw text into the runs it renders as: the whole-
@@ -162,12 +170,22 @@ export interface SyllablePart {
162
170
  * part of the syllable — even the whole of it — with the initial rule
163
171
  * (`*sam*ple` → "sam" in the initial style, "ple" normal; an unmatched
164
172
  * `*` renders literally), the `bold` option forces weight 700 onto every
165
- * run, and marker-glyph characters split off into runs of their own font.
173
+ * run, and the marker characters (`*`, `†`) split off into runs of their
174
+ * own — with the style set's `markerGlyphs` font when one is configured,
175
+ * the text font otherwise (always the `marker` kind).
166
176
  * Inside a Liturgy-font run, `+` gets its own weight-400 runs — the font
167
177
  * is bold-looking by design, so the weight stays normal. The wrapper
168
- * characters themselves are dropped.
178
+ * characters themselves are dropped. Each run also carries `kind`, the
179
+ * notation-fixed semantic of its markup (`liturgy`, `rubric`, `star`,
180
+ * `marker`, `plus`) — the vocabulary the marked-up text export and the
181
+ * renderer's run classes share, identical across style sets. `rawCase`
182
+ * skips the BNS rubric uppercasing: uppercasing is presentation, so the
183
+ * marked-up text export keeps the raw letter case (a consumer CSS applies
184
+ * text-transform instead).
169
185
  */
170
- export declare function resolveSyllableParts(text: string, styleSet: StyleSet, bold: boolean): SyllablePart[];
186
+ export declare function resolveSyllableParts(text: string, styleSet: StyleSet, bold: boolean, options?: {
187
+ rawCase?: boolean;
188
+ }): SyllablePart[];
171
189
  /** The canvas font shorthand for measuring a run at the text size. */
172
190
  export declare function measurementFont(style: PartStyle, textPx: number, fallbackStack: string): string;
173
191
  /** The inline CSS properties that draw a run, as dash-cased names for
@@ -1 +0,0 @@
1
- export declare const DEFAULT_SCRIPT = "(MX)Ki(3)r\u00E1ly(3)k\u00E9nt(5) tr\u00F3(7i)nol(7-:) **() az(7i) \u00DAr(5-/) mind(5)\u00F6(4t)r\u00F6k(3)k\u00E9.(3-.)";
@@ -1,7 +1,7 @@
1
1
  import { MaxWidth } from '../embed/core';
2
2
  import { StyleSetName } from '../guidoStyles';
3
3
  export interface GuidexScoreProps {
4
- /** The score source in GuidoScript notation, e.g. `'(c4) fat(2)ue(2)'`. */
4
+ /** The score source in GuidoScript notation, e.g. `'(M)A(0) di(0q)e(qQ0)bus(1) an(3)ti(1e)quis(qQ0-:)'`. */
5
5
  script: string;
6
6
  /** Line-breaking budget in px, or 'auto' to fit the container (default). */
7
7
  maxWidth?: MaxWidth;
@@ -4,4 +4,5 @@
4
4
  */
5
5
  export { GuidexScore, type GuidexScoreProps } from './GuidexScore';
6
6
  export { renderScore, renderAll, init, dispose, version, type EmbedOptions, type MaxWidth } from '../embed/core';
7
+ export { downloadScorePng, downloadScoreSvg, scorePngBlob, scoreSvg, type ScoreDownloadOptions, type ScoreImageOptions, } from '../scoreImage';
7
8
  export type { StyleSetName } from '../guidoStyles';
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { a as version, i as renderScore, n as init, r as renderAll, t as dispose } from "../core-CmzGmufM.js";
2
+ import { a as dispose, c as renderScore, i as scoreSvg, l as version, n as downloadScoreSvg, o as init, r as scorePngBlob, s as renderAll, t as downloadScorePng } from "../scoreImage-DnFIbtF_.js";
3
3
  import { useEffect, useRef } from "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region src/react/GuidexScore.tsx
@@ -39,4 +39,4 @@ function GuidexScore({ script, maxWidth, style, bold, textPx, transpose, debug,
39
39
  });
40
40
  }
41
41
  //#endregion
42
- export { GuidexScore, dispose, init, renderAll, renderScore, version };
42
+ export { GuidexScore, dispose, downloadScorePng, downloadScoreSvg, init, renderAll, renderScore, scorePngBlob, scoreSvg, version };