@bendyline/squisq-react 2.11.25 → 2.12.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/{chunk-E7UE2PCJ.js → chunk-2K74UJ4T.js} +1 -1
- package/dist/{chunk-5OA2DYA2.js → chunk-3RVUSY4V.js} +1 -1
- package/dist/{chunk-245G4EEN.js → chunk-AA6NGEP7.js} +3 -14
- package/dist/{chunk-JKR5LJXK.js → chunk-PBVIXOWS.js} +310 -154
- package/dist/{chunk-KORFPHSJ.js → chunk-UNZSCTBU.js} +1 -1
- package/dist/{chunk-TN3NQAFM.js → chunk-XSSIHHDY.js} +60 -2
- package/dist/diagram-pictures/index.js +2 -2
- package/dist/hooks/index.d.ts +0 -14
- package/dist/hooks/index.js +1 -1
- package/dist/index.d.ts +15 -4
- package/dist/index.js +8 -6
- package/dist/layers/index.js +1 -1
- package/dist/page/index.js +4 -4
- package/dist/player/index.d.ts +1 -1
- package/dist/player/index.js +5 -5
- package/dist/{player-BrLTAA_l.d.ts → player-Dnka50W4.d.ts} +18 -2
- package/dist/squisq-player.full.global.js +461 -461
- package/dist/squisq-player.global.js +87 -87
- package/dist/standalone-player-full.js +1 -1
- package/dist/standalone-source.js +1 -1
- package/package.json +2 -2
|
@@ -665,7 +665,7 @@ function RichTextLayer({ layer, viewport, blockTime, textScale = 1 }) {
|
|
|
665
665
|
const target = event.target;
|
|
666
666
|
if (target?.closest?.("[data-squisq-table-scroll]")) event.stopPropagation();
|
|
667
667
|
};
|
|
668
|
-
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} [data-squisq-table-scroll]{width:100%;max-height:20em;margin:.35em 0;overflow:auto;overscroll-behavior:contain;box-sizing:border-box}.${cls} table{width:100%;min-width:48em;margin:0;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:.76em;line-height:1.2}.${cls} th,.${cls} td{box-sizing:border-box;padding:.28em .45em;border:1px solid rgba(127,127,127,.55);border-color:color-mix(in srgb,currentColor 32%,transparent);vertical-align:top;white-space:normal;overflow-wrap:anywhere}.${cls} th{position:sticky;top:0;z-index:1;background:rgba(127,127,127,.16);background:color-mix(in srgb,currentColor 12%,transparent);font-weight:600}.${cls} tbody tr:nth-child(even){background:rgba(127,127,127,.07);background:color-mix(in srgb,currentColor 5%,transparent)}.${cls} *:first-child{margin-top:0}.${cls} *:last-child{margin-bottom:0}.${cls} a{color:inherit;text-decoration:underline}`;
|
|
668
|
+
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[data-squisq-build-item]{list-style:none}.${cls} [data-squisq-build-row]{display:flex;gap:.35em}.${cls} [data-squisq-build-row]>span{flex:0 0 1.4em;text-align:right;margin-left:-1.75em}.${cls} [data-squisq-build-row]>div{min-width:0;flex:1}.${cls} li>p{display:inline;margin:0}.${cls} [data-squisq-table-scroll]{width:100%;max-height:20em;margin:.35em 0;overflow:auto;overscroll-behavior:contain;box-sizing:border-box}.${cls} table{width:100%;min-width:48em;margin:0;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:.76em;line-height:1.2}.${cls} th,.${cls} td{box-sizing:border-box;padding:.28em .45em;border:1px solid rgba(127,127,127,.55);border-color:color-mix(in srgb,currentColor 32%,transparent);vertical-align:top;white-space:normal;overflow-wrap:anywhere}.${cls} th{position:sticky;top:0;z-index:1;background:rgba(127,127,127,.16);background:color-mix(in srgb,currentColor 12%,transparent);font-weight:600}.${cls} tbody tr:nth-child(even){background:rgba(127,127,127,.07);background:color-mix(in srgb,currentColor 5%,transparent)}.${cls} *:first-child{margin-top:0}.${cls} *:last-child{margin-bottom:0}.${cls} a{color:inherit;text-decoration:underline}`;
|
|
669
669
|
return /* @__PURE__ */ jsx3(
|
|
670
670
|
"g",
|
|
671
671
|
{
|
|
@@ -534,6 +534,7 @@ function useAudioSync(audioRef, track, basePath = "", enabled = true, mode = "me
|
|
|
534
534
|
}
|
|
535
535
|
|
|
536
536
|
// src/hooks/useDocPlayback.ts
|
|
537
|
+
import { resolveDocBuildTiming } from "@bendyline/squisq/doc";
|
|
537
538
|
import { useMemo as useMemo4, useCallback as useCallback2, useRef as useRef2 } from "react";
|
|
538
539
|
import { resolveMotionForDoc } from "@bendyline/squisq/schemas";
|
|
539
540
|
import {
|
|
@@ -732,25 +733,13 @@ function useDocPlayback(script, currentTime, options = {}) {
|
|
|
732
733
|
// resolve through the user's design.
|
|
733
734
|
customTemplates: script.customTemplates
|
|
734
735
|
});
|
|
735
|
-
return expanded;
|
|
736
|
+
return resolveDocBuildTiming(script, expanded);
|
|
736
737
|
}
|
|
737
738
|
return flatBlocks.map((block, index) => {
|
|
738
739
|
const transition = resolveBlockTransition(block, resolvedTheme, index);
|
|
739
740
|
return transition !== block.transition ? { ...block, transition } : block;
|
|
740
741
|
});
|
|
741
|
-
}, [
|
|
742
|
-
script?.blocks,
|
|
743
|
-
script?.audio?.segments,
|
|
744
|
-
script?.persistentLayers,
|
|
745
|
-
script?.customTemplates,
|
|
746
|
-
script?.motion,
|
|
747
|
-
script?.frontmatter,
|
|
748
|
-
motionOverride,
|
|
749
|
-
mediaAspectRatios,
|
|
750
|
-
viewport,
|
|
751
|
-
theme,
|
|
752
|
-
useAudioSegmentTiming
|
|
753
|
-
]);
|
|
742
|
+
}, [script, motionOverride, mediaAspectRatios, viewport, theme, useAudioSegmentTiming]);
|
|
754
743
|
const currentBlock = useMemo4(() => getBlockAtTime(blocks, currentTime), [blocks, currentTime]);
|
|
755
744
|
const currentBlockIndex = useMemo4(
|
|
756
745
|
() => currentBlock ? blocks.indexOf(currentBlock) : -1,
|