@bendyline/squisq-react 2.8.0 → 2.10.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.
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-TT6ENR6T.js";
4
4
  import {
5
5
  MarkdownRenderer
6
- } from "./chunk-ESI3P77P.js";
6
+ } from "./chunk-7YSKELA5.js";
7
7
 
8
8
  // src/jsonView/useJsonViewTokens.ts
9
9
  import { useMemo } from "react";
@@ -170,6 +170,10 @@ function renderInline(nodes, keyPrefix = "", ctx = DEFAULT_CTX) {
170
170
  return /* @__PURE__ */ jsx3("strong", { className: "squisq-md-strong", children: renderInline(node.children, key, ctx) }, key);
171
171
  case "delete":
172
172
  return /* @__PURE__ */ jsx3("del", { className: "squisq-md-del", children: renderInline(node.children, key, ctx) }, key);
173
+ case "superscript":
174
+ return /* @__PURE__ */ jsx3("sup", { className: "squisq-md-sup", children: renderInline(node.children, key, ctx) }, key);
175
+ case "subscript":
176
+ return /* @__PURE__ */ jsx3("sub", { className: "squisq-md-sub", children: renderInline(node.children, key, ctx) }, key);
173
177
  case "inlineCode":
174
178
  return /* @__PURE__ */ jsx3("code", { className: "squisq-md-inline-code", children: node.value }, key);
175
179
  case "link": {
@@ -593,7 +593,8 @@ function RichTextLayer({ layer, viewport, blockTime }) {
593
593
  ...animStyle.style
594
594
  };
595
595
  const cls = `squisq-rich-text-${cssId(layer.id)}`;
596
- const scopedCss = `.${cls}{margin:0}.${cls} p{margin:0 0 .4em}.${cls} h1,.${cls} h2,.${cls} h3,.${cls} h4,.${cls} h5,.${cls} h6{margin:0 0 .3em;line-height:1.2}.${cls} ul,.${cls} ol{margin:0 0 .4em;padding-left:1.2em;list-style-position:inside}.${cls} li{margin:0}.${cls} li>p{display:inline;margin:0}.${cls} *:first-child{margin-top:0}.${cls} *:last-child{margin-bottom:0}.${cls} a{color:inherit;text-decoration:underline}`;
596
+ const listStylePosition = style.textAlign === "center" || style.textAlign === "right" ? "inside" : "outside";
597
+ const scopedCss = `.${cls}{margin:0}.${cls} p{margin:0 0 .4em}.${cls} h1,.${cls} h2,.${cls} h3,.${cls} h4,.${cls} h5,.${cls} h6{margin:0 0 .3em;line-height:1.2}.${cls} ul,.${cls} ol{margin:0 0 .7em;padding-left:1.2em;list-style-position:${listStylePosition}}.${cls} li{margin:0}.${cls} li>p{display:inline;margin:0}.${cls} *:first-child{margin-top:0}.${cls} *:last-child{margin-bottom:0}.${cls} a{color:inherit;text-decoration:underline}`;
597
598
  return /* @__PURE__ */ jsx3("g", { className: `block-layer block-layer--text ${animStyle.className}`, "data-layer-id": layer.id, children: /* @__PURE__ */ jsx3(
598
599
  "foreignObject",
599
600
  {
@@ -9,14 +9,14 @@ import {
9
9
  TreeLayer,
10
10
  VideoLayer,
11
11
  getTransitionClass
12
- } from "./chunk-UJEHDVQO.js";
12
+ } from "./chunk-G6FVNYNW.js";
13
13
  import {
14
14
  useAutoSurface
15
15
  } from "./chunk-TT6ENR6T.js";
16
16
  import {
17
17
  InlineVideoPlayer,
18
18
  MarkdownRenderer
19
- } from "./chunk-ESI3P77P.js";
19
+ } from "./chunk-7YSKELA5.js";
20
20
  import {
21
21
  useMediaUrl
22
22
  } from "./chunk-LR3AIGDD.js";