@scrider/formatter 1.4.0 → 1.4.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/index.cjs +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1293,13 +1293,16 @@ declare function validateDelta(delta: Delta, registry: Registry): boolean;
|
|
|
1293
1293
|
declare function cloneDelta(delta: Delta): Delta;
|
|
1294
1294
|
|
|
1295
1295
|
/**
|
|
1296
|
+
|
|
1296
1297
|
* Document-level HTML presentation for deltaToHtml (clipboard, export).
|
|
1298
|
+
|
|
1297
1299
|
* Not stored in Delta — mirrors editor Settings (line spacing, indents).
|
|
1300
|
+
|
|
1298
1301
|
*/
|
|
1299
1302
|
interface DocumentPresentation {
|
|
1300
1303
|
/** Line spacing multiplier, e.g. 1.5 */
|
|
1301
1304
|
lineSpacing?: number;
|
|
1302
|
-
/** First-line indent in cm on `<p>`
|
|
1305
|
+
/** First-line indent in cm on `<p>` only (lists: use listBlockIndentCm). */
|
|
1303
1306
|
textIndentCm?: number;
|
|
1304
1307
|
/** Extra left padding on top-level `<ul>`/`<ol>` — shifts marker + text as a block. */
|
|
1305
1308
|
listBlockIndentCm?: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -1293,13 +1293,16 @@ declare function validateDelta(delta: Delta, registry: Registry): boolean;
|
|
|
1293
1293
|
declare function cloneDelta(delta: Delta): Delta;
|
|
1294
1294
|
|
|
1295
1295
|
/**
|
|
1296
|
+
|
|
1296
1297
|
* Document-level HTML presentation for deltaToHtml (clipboard, export).
|
|
1298
|
+
|
|
1297
1299
|
* Not stored in Delta — mirrors editor Settings (line spacing, indents).
|
|
1300
|
+
|
|
1298
1301
|
*/
|
|
1299
1302
|
interface DocumentPresentation {
|
|
1300
1303
|
/** Line spacing multiplier, e.g. 1.5 */
|
|
1301
1304
|
lineSpacing?: number;
|
|
1302
|
-
/** First-line indent in cm on `<p>`
|
|
1305
|
+
/** First-line indent in cm on `<p>` only (lists: use listBlockIndentCm). */
|
|
1303
1306
|
textIndentCm?: number;
|
|
1304
1307
|
/** Extra left padding on top-level `<ul>`/`<ol>` — shifts marker + text as a block. */
|
|
1305
1308
|
listBlockIndentCm?: number;
|
package/dist/index.js
CHANGED
|
@@ -2505,10 +2505,13 @@ function resolveDocumentPresentation(presentation) {
|
|
|
2505
2505
|
return { lineSpacing, textIndentCm, listBlockIndentCm };
|
|
2506
2506
|
}
|
|
2507
2507
|
var LINE_HEIGHT_TAGS = /* @__PURE__ */ new Set(["p", "li", "blockquote"]);
|
|
2508
|
-
var TEXT_INDENT_TAGS = /* @__PURE__ */ new Set(["p"
|
|
2508
|
+
var TEXT_INDENT_TAGS = /* @__PURE__ */ new Set(["p"]);
|
|
2509
2509
|
function documentPresentationListWrapperStyleParts(resolved) {
|
|
2510
2510
|
if (!resolved?.listBlockIndentCm) return [];
|
|
2511
|
-
return [
|
|
2511
|
+
return [
|
|
2512
|
+
`padding-left:1.25em`,
|
|
2513
|
+
`margin-left:${resolved.listBlockIndentCm}cm`
|
|
2514
|
+
];
|
|
2512
2515
|
}
|
|
2513
2516
|
function documentPresentationStyleParts(tag, resolved) {
|
|
2514
2517
|
if (!resolved) return [];
|