svelteplot 0.8.0-pr-270.0 → 0.8.0-pr-282.1
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/dist/helpers/wordwrap.d.ts +2 -2
- package/dist/helpers/wordwrap.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* - Uses a rough character width table to approximate line widths.
|
|
6
6
|
* - Wraps once the maximum visual width is exceeded, but only after a minimum.
|
|
7
7
|
*/
|
|
8
|
-
export default function wordwrap(line: string, { maxCharactersPerLine, maxLineWidth }
|
|
8
|
+
export default function wordwrap(line: string, { maxCharactersPerLine, maxLineWidth }?: {
|
|
9
9
|
maxCharactersPerLine?: number;
|
|
10
10
|
maxLineWidth?: number;
|
|
11
|
-
}, { minCharactersPerLine, minLineWidth }
|
|
11
|
+
}, { minCharactersPerLine, minLineWidth }?: {
|
|
12
12
|
minCharactersPerLine?: number;
|
|
13
13
|
minLineWidth?: number;
|
|
14
14
|
}, fontSize?: number, monospace?: boolean): string[];
|
package/dist/helpers/wordwrap.js
CHANGED
|
@@ -67,7 +67,7 @@ const CHAR_W = {
|
|
|
67
67
|
* - Uses a rough character width table to approximate line widths.
|
|
68
68
|
* - Wraps once the maximum visual width is exceeded, but only after a minimum.
|
|
69
69
|
*/
|
|
70
|
-
export default function wordwrap(line, { maxCharactersPerLine, maxLineWidth }, { minCharactersPerLine, minLineWidth }, fontSize = 12, monospace = false) {
|
|
70
|
+
export default function wordwrap(line, { maxCharactersPerLine, maxLineWidth } = {}, { minCharactersPerLine, minLineWidth } = {}, fontSize = 12, monospace = false) {
|
|
71
71
|
// Tokenized words (with hyphen-splitting applied) including trailing spaces/hyphens.
|
|
72
72
|
const tokens = [];
|
|
73
73
|
// First split by spaces, then further split by hyphens so we can
|
package/dist/index.d.ts
CHANGED
|
@@ -3,4 +3,5 @@ export { default as PlotCore } from './core/Plot.svelte';
|
|
|
3
3
|
export * from './marks/index.js';
|
|
4
4
|
export * from './transforms/index.js';
|
|
5
5
|
export { formatMonth } from './helpers/formats.js';
|
|
6
|
+
export { default as wordwrap } from './helpers/wordwrap.js';
|
|
6
7
|
export * from './hooks/plotDefaults.js';
|
package/dist/index.js
CHANGED