@bendyline/squisq-react 2.12.18 → 2.12.19
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-73MW4RJW.js → chunk-2DUF6C7B.js} +3 -3
- package/dist/{chunk-GIJRQVYB.js → chunk-4HVJHRL5.js} +1 -1
- package/dist/{chunk-PVCHPYJG.js → chunk-6LM6HDKH.js} +4 -4
- package/dist/{chunk-UTRO6ZZS.js → chunk-IPB22WG3.js} +33 -0
- package/dist/{chunk-X67VFBAO.js → chunk-MUYICTDA.js} +1 -1
- package/dist/diagram-pictures/index.js +2 -2
- package/dist/index.js +5 -5
- package/dist/layers/index.js +1 -1
- package/dist/page/index.d.ts +1 -1
- package/dist/page/index.js +4 -4
- package/dist/player/index.js +4 -4
- package/dist/squisq-player.full.global.js +350 -350
- package/dist/squisq-player.global.js +78 -78
- package/dist/standalone-player-full.js +1 -1
- package/dist/standalone-source.js +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LinearDocView
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6LM6HDKH.js";
|
|
4
4
|
import {
|
|
5
5
|
useAudioSync,
|
|
6
6
|
useDocPlayback,
|
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
} from "./chunk-OWC7DNGJ.js";
|
|
16
16
|
import {
|
|
17
17
|
BlockRenderer
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-4HVJHRL5.js";
|
|
19
19
|
import {
|
|
20
20
|
isCaptureDrivenVideo,
|
|
21
21
|
seekVideoToFrame
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-IPB22WG3.js";
|
|
23
23
|
import {
|
|
24
24
|
useMediaProvider,
|
|
25
25
|
useMediaUrl,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-OWC7DNGJ.js";
|
|
9
9
|
import {
|
|
10
10
|
BlockRenderer
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4HVJHRL5.js";
|
|
12
12
|
import {
|
|
13
13
|
svgDataImageSrc,
|
|
14
14
|
useMediaUrl
|
|
@@ -506,7 +506,7 @@ import {
|
|
|
506
506
|
buildPageCssVars,
|
|
507
507
|
pageStyleDataAttributes,
|
|
508
508
|
PAGE_BASE_CSS,
|
|
509
|
-
|
|
509
|
+
resolveThemeForDoc
|
|
510
510
|
} from "@bendyline/squisq/doc";
|
|
511
511
|
import { parseMarkdown } from "@bendyline/squisq/markdown";
|
|
512
512
|
import { fenceRendererLangs } from "@bendyline/squisq/fence";
|
|
@@ -542,9 +542,9 @@ function LinearDocView({
|
|
|
542
542
|
const autoSurface = useAutoSurface(surface === "auto");
|
|
543
543
|
const resolvedSurface = surface === "auto" ? autoSurface : surface;
|
|
544
544
|
const activeTheme = useMemo2(() => {
|
|
545
|
-
const baseTheme = theme ??
|
|
545
|
+
const baseTheme = theme ?? resolveThemeForDoc(resolvedDoc);
|
|
546
546
|
return resolvedSurface ? applySurface(baseTheme, resolvedSurface) : baseTheme;
|
|
547
|
-
}, [theme, resolvedSurface]);
|
|
547
|
+
}, [theme, resolvedDoc, resolvedSurface]);
|
|
548
548
|
const pageStyle = useMemo2(
|
|
549
549
|
() => resolvePageStyle2(activeTheme, transformPage, variant),
|
|
550
550
|
[activeTheme, transformPage, variant]
|
|
@@ -44,6 +44,11 @@ function getAnchorOffset(anchor, width, height) {
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
// src/utils/foreignObjectPaint.ts
|
|
48
|
+
function paintsForeignObjectLayersUnscaled(userAgent = typeof navigator === "undefined" ? "" : navigator.userAgent) {
|
|
49
|
+
return /AppleWebKit\//.test(userAgent) && !/(Chrome|Chromium|jsdom)\/|Android/.test(userAgent);
|
|
50
|
+
}
|
|
51
|
+
|
|
47
52
|
// src/layers/ImageLayer.tsx
|
|
48
53
|
import { jsx } from "react/jsx-runtime";
|
|
49
54
|
function ImageLayer({
|
|
@@ -115,6 +120,34 @@ function ImageLayer({
|
|
|
115
120
|
if (isCover && isSpatialAnim && animation) {
|
|
116
121
|
const kbAnim = remapToKenBurns(animation);
|
|
117
122
|
const kbStyle = getAnimationStyle(kbAnim, blockTime);
|
|
123
|
+
if (paintsForeignObjectLayersUnscaled()) {
|
|
124
|
+
return /* @__PURE__ */ jsx(
|
|
125
|
+
"g",
|
|
126
|
+
{
|
|
127
|
+
className: "block-layer block-layer--image",
|
|
128
|
+
"data-layer-id": layer.id,
|
|
129
|
+
"data-image-framing": "svg-ken-burns",
|
|
130
|
+
children: /* @__PURE__ */ jsx("svg", { x: finalX, y: finalY, width, height, style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx(
|
|
131
|
+
"image",
|
|
132
|
+
{
|
|
133
|
+
href: src,
|
|
134
|
+
width,
|
|
135
|
+
height,
|
|
136
|
+
preserveAspectRatio: "xMidYMid slice",
|
|
137
|
+
className: kbStyle.className,
|
|
138
|
+
...content.alt ? { role: "img", "aria-label": content.alt } : {},
|
|
139
|
+
style: {
|
|
140
|
+
pointerEvents: "none",
|
|
141
|
+
transformBox: "fill-box",
|
|
142
|
+
transformOrigin: "center center",
|
|
143
|
+
...filter ? { filter } : {},
|
|
144
|
+
...kbStyle.style
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
) })
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
}
|
|
118
151
|
return /* @__PURE__ */ jsx("g", { className: "block-layer block-layer--image", "data-layer-id": layer.id, children: /* @__PURE__ */ jsx("foreignObject", { x: finalX, y: finalY, width, height, children: /* @__PURE__ */ jsx(
|
|
119
152
|
"div",
|
|
120
153
|
{
|
package/dist/index.js
CHANGED
|
@@ -17,17 +17,17 @@ import {
|
|
|
17
17
|
resolveDocPlayerAppearance,
|
|
18
18
|
useBuildNavigation,
|
|
19
19
|
useMediaClipDurations
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-2DUF6C7B.js";
|
|
21
21
|
import {
|
|
22
22
|
PaginatedDocView
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-MUYICTDA.js";
|
|
24
24
|
import {
|
|
25
25
|
CanvasSection,
|
|
26
26
|
LinearDocView,
|
|
27
27
|
PageSectionView,
|
|
28
28
|
PageViewContext,
|
|
29
29
|
usePageView
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-6LM6HDKH.js";
|
|
31
31
|
import {
|
|
32
32
|
useModalDialog
|
|
33
33
|
} from "./chunk-JP457U6N.js";
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
} from "./chunk-OWC7DNGJ.js";
|
|
58
58
|
import {
|
|
59
59
|
BlockRenderer
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-4HVJHRL5.js";
|
|
61
61
|
import {
|
|
62
62
|
ImageLayer,
|
|
63
63
|
MapLayer,
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
VideoLayer,
|
|
72
72
|
getAnimationStyle,
|
|
73
73
|
getTransitionClass
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-IPB22WG3.js";
|
|
75
75
|
import {
|
|
76
76
|
MermaidDiagram
|
|
77
77
|
} from "./chunk-A65WPCGZ.js";
|
package/dist/layers/index.js
CHANGED
package/dist/page/index.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ interface LinearDocViewProps {
|
|
|
25
25
|
viewport?: ViewportConfig;
|
|
26
26
|
/** Optional CSS class for the outer container */
|
|
27
27
|
className?: string;
|
|
28
|
-
/** Theme to use for rendering (default:
|
|
28
|
+
/** Theme to use for rendering (default: the document's own theme, as the player resolves it) */
|
|
29
29
|
theme?: Theme;
|
|
30
30
|
/** Whether embedded canvas sections render their layer animations (default: true). */
|
|
31
31
|
animationsEnabled?: boolean;
|
package/dist/page/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PaginatedDocView
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-MUYICTDA.js";
|
|
4
4
|
import {
|
|
5
5
|
CanvasSection,
|
|
6
6
|
LinearDocView,
|
|
7
7
|
PageSectionView,
|
|
8
8
|
PageViewContext,
|
|
9
9
|
usePageView
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-6LM6HDKH.js";
|
|
11
11
|
import "../chunk-TT6ENR6T.js";
|
|
12
12
|
import "../chunk-OWC7DNGJ.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-4HVJHRL5.js";
|
|
14
|
+
import "../chunk-IPB22WG3.js";
|
|
15
15
|
import "../chunk-A65WPCGZ.js";
|
|
16
16
|
import "../chunk-OTYJ4MRH.js";
|
|
17
17
|
export {
|
package/dist/player/index.js
CHANGED
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
MediaClipLayer,
|
|
13
13
|
SocialCaptionOverlay,
|
|
14
14
|
formatTime
|
|
15
|
-
} from "../chunk-
|
|
16
|
-
import "../chunk-
|
|
15
|
+
} from "../chunk-2DUF6C7B.js";
|
|
16
|
+
import "../chunk-6LM6HDKH.js";
|
|
17
17
|
import "../chunk-TVYZINUR.js";
|
|
18
18
|
import "../chunk-TT6ENR6T.js";
|
|
19
19
|
import {
|
|
@@ -22,8 +22,8 @@ import {
|
|
|
22
22
|
} from "../chunk-OWC7DNGJ.js";
|
|
23
23
|
import {
|
|
24
24
|
BlockRenderer
|
|
25
|
-
} from "../chunk-
|
|
26
|
-
import "../chunk-
|
|
25
|
+
} from "../chunk-4HVJHRL5.js";
|
|
26
|
+
import "../chunk-IPB22WG3.js";
|
|
27
27
|
import "../chunk-A65WPCGZ.js";
|
|
28
28
|
import "../chunk-OTYJ4MRH.js";
|
|
29
29
|
export {
|