@scrider/formatter 1.3.7 → 1.4.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.
package/dist/index.cjs CHANGED
@@ -2608,14 +2608,17 @@ function resolveDocumentPresentation(presentation) {
2608
2608
  if (!presentation) return void 0;
2609
2609
  const lineSpacing = typeof presentation.lineSpacing === "number" && presentation.lineSpacing > 0 ? presentation.lineSpacing : void 0;
2610
2610
  const textIndentCm = typeof presentation.textIndentCm === "number" && presentation.textIndentCm > 0 ? presentation.textIndentCm : void 0;
2611
- if (lineSpacing === void 0 && textIndentCm === void 0) return void 0;
2612
- return { lineSpacing, textIndentCm };
2611
+ const listBlockIndentCm = typeof presentation.listBlockIndentCm === "number" && presentation.listBlockIndentCm > 0 ? presentation.listBlockIndentCm : void 0;
2612
+ if (lineSpacing === void 0 && textIndentCm === void 0 && listBlockIndentCm === void 0) {
2613
+ return void 0;
2614
+ }
2615
+ return { lineSpacing, textIndentCm, listBlockIndentCm };
2613
2616
  }
2614
2617
  var LINE_HEIGHT_TAGS = /* @__PURE__ */ new Set(["p", "li", "blockquote"]);
2615
- var TEXT_INDENT_TAGS = /* @__PURE__ */ new Set(["p"]);
2618
+ var TEXT_INDENT_TAGS = /* @__PURE__ */ new Set(["p", "li"]);
2616
2619
  function documentPresentationListWrapperStyleParts(resolved) {
2617
- if (!resolved?.textIndentCm) return [];
2618
- return [`padding-left:calc(1.5em + ${resolved.textIndentCm}cm)`];
2620
+ if (!resolved?.listBlockIndentCm) return [];
2621
+ return [`padding-left:calc(1.5em + ${resolved.listBlockIndentCm}cm)`];
2619
2622
  }
2620
2623
  function documentPresentationStyleParts(tag, resolved) {
2621
2624
  if (!resolved) return [];