@bendyline/squisq-react 2.4.0 → 2.4.2

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/README.md CHANGED
@@ -125,6 +125,10 @@ Interactive mount:
125
125
 
126
126
  For headless capture, add `renderMode: true`, then await
127
127
  `handle.renderAPI` before calling `seekTo()` or reading render metadata.
128
+ `seekTo()` resolves only after React has committed the requested visual time,
129
+ CSS animations have been positioned, active video has produced its sought
130
+ frame, and one final paint opportunity has completed. `getRenderedTime()`
131
+ returns the timeline time represented by the committed DOM.
128
132
  TypeScript hosts can import `MountOptions` and `SquisqPlayerHandle` from the
129
133
  package root.
130
134
 
@@ -543,25 +543,41 @@ function RichTextLayer({ layer, viewport, blockTime }) {
543
543
  };
544
544
  const cls = `squisq-rich-text-${cssId(layer.id)}`;
545
545
  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}`;
546
- return /* @__PURE__ */ jsx3("g", { className: `block-layer block-layer--text ${animStyle.className}`, "data-layer-id": layer.id, children: /* @__PURE__ */ jsx3("foreignObject", { x: boxX, y: boxY, width: boxWidth, height: boxHeight, children: /* @__PURE__ */ jsxs2(
547
- "div",
546
+ return /* @__PURE__ */ jsx3("g", { className: `block-layer block-layer--text ${animStyle.className}`, "data-layer-id": layer.id, children: /* @__PURE__ */ jsx3(
547
+ "foreignObject",
548
548
  {
549
- ...{ xmlns: "http://www.w3.org/1999/xhtml" },
550
- style: boxStyle,
551
- children: [
552
- /* @__PURE__ */ jsx3("style", { children: scopedCss }),
553
- /* @__PURE__ */ jsx3(
554
- "div",
555
- {
556
- className: cls,
557
- "aria-label": content.text,
558
- style: { width: "100%", whiteSpace: "pre-wrap", wordBreak: "break-word" },
559
- dangerouslySetInnerHTML: { __html: safeHtml }
560
- }
561
- )
562
- ]
549
+ x: boxX,
550
+ y: boxY,
551
+ width: boxWidth,
552
+ height: boxHeight,
553
+ color: style.color,
554
+ style: { color: style.color },
555
+ children: /* @__PURE__ */ jsxs2(
556
+ "div",
557
+ {
558
+ ...{ xmlns: "http://www.w3.org/1999/xhtml" },
559
+ style: boxStyle,
560
+ children: [
561
+ /* @__PURE__ */ jsx3("style", { children: scopedCss }),
562
+ /* @__PURE__ */ jsx3(
563
+ "div",
564
+ {
565
+ className: cls,
566
+ "aria-label": content.text,
567
+ style: {
568
+ width: "100%",
569
+ color: style.color,
570
+ whiteSpace: "pre-wrap",
571
+ wordBreak: "break-word"
572
+ },
573
+ dangerouslySetInnerHTML: { __html: safeHtml }
574
+ }
575
+ )
576
+ ]
577
+ }
578
+ )
563
579
  }
564
- ) }) });
580
+ ) });
565
581
  }
566
582
  function cssId(id) {
567
583
  return id.replace(/[^a-zA-Z0-9_-]/g, "-");