@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 +4 -0
- package/dist/{chunk-XYS7HMP4.js → chunk-EMSYAEWP.js} +33 -17
- package/dist/{chunk-HML6PFH2.js → chunk-R5XTAWQH.js} +586 -157
- package/dist/{chunk-M2HEFJZP.js → chunk-ZIMG7EQV.js} +1 -1
- package/dist/index.d.ts +57 -5
- package/dist/index.js +8 -4
- package/dist/layers/index.js +1 -1
- package/dist/page/index.js +2 -2
- package/dist/player/index.d.ts +22 -8
- package/dist/player/index.js +3 -3
- package/dist/squisq-player.full.global.js +457 -455
- package/dist/squisq-player.global.js +63 -61
- package/dist/standalone-source.js +1 -1
- package/dist/styles/index.css +18 -11
- package/package.json +3 -3
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(
|
|
547
|
-
"
|
|
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
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
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, "-");
|