@bendyline/squisq-react 2.12.4 → 2.12.6
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-MGFMKGZY.js → chunk-6BKIY72Q.js} +3 -3
- package/dist/{chunk-BJQCVANW.js → chunk-AX2FWY2N.js} +1 -1
- package/dist/{chunk-EY3DUCK7.js → chunk-BXPGK5VO.js} +1 -1
- package/dist/{chunk-4ILJDBJ7.js → chunk-DN6JZRJI.js} +2 -2
- package/dist/{chunk-3H6QBEYX.js → chunk-DQGV2LEY.js} +3 -1
- package/dist/{chunk-YVQ7KEYI.js → chunk-FLPGMUXM.js} +33 -5
- package/dist/{chunk-JP2VHB5H.js → chunk-P6MT4F3R.js} +4 -4
- package/dist/{chunk-F4YKXLEH.js → chunk-TQYJ54WQ.js} +6 -6
- package/dist/{chunk-O2ZISYT3.js → chunk-UQOVF7IL.js} +1 -1
- package/dist/{chunk-PFKYO6C2.js → chunk-WACTP75S.js} +1 -1
- package/dist/diagram-pictures/index.js +4 -4
- package/dist/hooks/index.d.ts +3 -2
- package/dist/hooks/index.js +2 -2
- package/dist/index.js +10 -10
- package/dist/json-view/index.js +4 -4
- package/dist/layers/index.js +3 -3
- package/dist/markdown/index.js +3 -3
- package/dist/page/index.js +7 -7
- package/dist/player/index.js +8 -8
- package/dist/squisq-player.full.global.js +403 -403
- package/dist/squisq-player.global.js +73 -73
- package/dist/standalone-player-full.js +1 -1
- package/dist/standalone-source.js +1 -1
- package/package.json +2 -2
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
InlineVideoPlayer,
|
|
6
6
|
MarkdownRenderer,
|
|
7
7
|
VideoEmbedFrame
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FLPGMUXM.js";
|
|
9
9
|
import {
|
|
10
10
|
BlockRenderer
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WACTP75S.js";
|
|
12
12
|
import {
|
|
13
13
|
svgDataImageSrc,
|
|
14
14
|
useMediaUrl
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-P6MT4F3R.js";
|
|
16
16
|
|
|
17
17
|
// src/page/PageViewContext.ts
|
|
18
18
|
import { createContext, useContext } from "react";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
renderMermaidSvg,
|
|
3
3
|
useMediaProvider,
|
|
4
4
|
useResourcePolicy
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-P6MT4F3R.js";
|
|
6
6
|
|
|
7
7
|
// src/hooks/useMediaSchedule.ts
|
|
8
8
|
import { useMemo } from "react";
|
|
@@ -655,7 +655,9 @@ function useFeatureMediaAspectRatios(blocks, basePath, theme) {
|
|
|
655
655
|
if (!absolute && provider) {
|
|
656
656
|
try {
|
|
657
657
|
url = await provider.resolveUrl(source);
|
|
658
|
+
if (!url || url === source) return;
|
|
658
659
|
} catch {
|
|
660
|
+
return;
|
|
659
661
|
}
|
|
660
662
|
}
|
|
661
663
|
if (!current || !isResourceUrlAllowed2(url, policy)) return;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MermaidDiagram
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BXPGK5VO.js";
|
|
4
4
|
import {
|
|
5
5
|
svgDataImageSrc,
|
|
6
6
|
useMediaProvider,
|
|
7
7
|
useMediaUrl
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-P6MT4F3R.js";
|
|
9
9
|
|
|
10
10
|
// src/hooks/FenceRendererContext.tsx
|
|
11
11
|
import { createContext, useContext } from "react";
|
|
@@ -536,7 +536,17 @@ function renderInline(nodes, keyPrefix = "", ctx = DEFAULT_CTX) {
|
|
|
536
536
|
const label = node.alt || node.title || void 0;
|
|
537
537
|
return kind === "video" ? /* @__PURE__ */ jsx6(InlineVideoPlayer, { src, basePath: ".", label }, key) : /* @__PURE__ */ jsx6(InlineAudioPlayer, { src, basePath: ".", label }, key);
|
|
538
538
|
}
|
|
539
|
-
return /* @__PURE__ */ jsx6(
|
|
539
|
+
return /* @__PURE__ */ jsx6(
|
|
540
|
+
MdImage,
|
|
541
|
+
{
|
|
542
|
+
src: node.url,
|
|
543
|
+
alt: node.alt ?? "",
|
|
544
|
+
title: node.title ?? void 0,
|
|
545
|
+
width: node.width,
|
|
546
|
+
height: node.height
|
|
547
|
+
},
|
|
548
|
+
key
|
|
549
|
+
);
|
|
540
550
|
}
|
|
541
551
|
case "break":
|
|
542
552
|
return /* @__PURE__ */ jsx6("br", {}, key);
|
|
@@ -732,14 +742,30 @@ function renderTable(rows, align, key, ctx = DEFAULT_CTX) {
|
|
|
732
742
|
function renderBlocks(nodes, keyPrefix = "", ctx = DEFAULT_CTX) {
|
|
733
743
|
return nodes.map((node, i) => renderBlock(node, `${keyPrefix}b${i}`, ctx));
|
|
734
744
|
}
|
|
735
|
-
function MdImage({
|
|
745
|
+
function MdImage({
|
|
746
|
+
src,
|
|
747
|
+
alt,
|
|
748
|
+
title,
|
|
749
|
+
width,
|
|
750
|
+
height
|
|
751
|
+
}) {
|
|
736
752
|
const safeSrc = sanitizeUrl(src, "media") ?? svgDataImageSrc(src);
|
|
737
753
|
const resolved = useMediaUrl(safeSrc ?? "", ".");
|
|
738
754
|
const imageRef = useRef4(null);
|
|
739
755
|
const playback = useAnimatedImage(safeSrc ?? "", resolved);
|
|
740
756
|
if (!safeSrc) return null;
|
|
741
757
|
if (!mayBeAnimatedImage2(safeSrc)) {
|
|
742
|
-
return /* @__PURE__ */ jsx6(
|
|
758
|
+
return /* @__PURE__ */ jsx6(
|
|
759
|
+
"img",
|
|
760
|
+
{
|
|
761
|
+
className: "squisq-md-image",
|
|
762
|
+
src: resolved,
|
|
763
|
+
alt,
|
|
764
|
+
title,
|
|
765
|
+
width,
|
|
766
|
+
height
|
|
767
|
+
}
|
|
768
|
+
);
|
|
743
769
|
}
|
|
744
770
|
return /* @__PURE__ */ jsxs4(
|
|
745
771
|
"span",
|
|
@@ -756,6 +782,8 @@ function MdImage({ src, alt, title }) {
|
|
|
756
782
|
src: playback.displaySrc,
|
|
757
783
|
alt,
|
|
758
784
|
title,
|
|
785
|
+
width,
|
|
786
|
+
height,
|
|
759
787
|
style: { display: "block", maxWidth: "100%" }
|
|
760
788
|
}
|
|
761
789
|
),
|
|
@@ -104,19 +104,19 @@ function useMediaUrl(relativePath, basePath, options = {}) {
|
|
|
104
104
|
path: safePath,
|
|
105
105
|
provider,
|
|
106
106
|
policy: resourcePolicy,
|
|
107
|
-
|
|
107
|
+
// Providers return the original path when the asset is absent.
|
|
108
|
+
url: resolved2 !== safePath && allowed(resolved2) ? resolved2 : ""
|
|
108
109
|
});
|
|
109
110
|
}
|
|
110
111
|
},
|
|
111
112
|
() => {
|
|
112
|
-
if (!cancelled)
|
|
113
|
-
setResolved({ path: safePath, provider, policy: resourcePolicy, url: fallback });
|
|
113
|
+
if (!cancelled) setResolved({ path: safePath, provider, policy: resourcePolicy, url: "" });
|
|
114
114
|
}
|
|
115
115
|
);
|
|
116
116
|
return () => {
|
|
117
117
|
cancelled = true;
|
|
118
118
|
};
|
|
119
|
-
}, [needsProvider, provider, safePath,
|
|
119
|
+
}, [needsProvider, provider, safePath, resourcePolicy, allowed]);
|
|
120
120
|
const url = !needsProvider ? fallback : resolved?.path === safePath && resolved.provider === provider && resolved.policy === resourcePolicy ? resolved.url : "";
|
|
121
121
|
return useSanitizedSvgImage(url, isSvg, { static: options.staticSvg === true }) ?? "";
|
|
122
122
|
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LinearDocView
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6BKIY72Q.js";
|
|
4
4
|
import {
|
|
5
5
|
useAudioSync,
|
|
6
6
|
useDocPlayback,
|
|
7
7
|
useMediaSchedule,
|
|
8
8
|
useViewportOrientation
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DQGV2LEY.js";
|
|
10
10
|
import {
|
|
11
11
|
useAutoSurface
|
|
12
12
|
} from "./chunk-TT6ENR6T.js";
|
|
13
13
|
import {
|
|
14
14
|
MarkdownRenderer
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-FLPGMUXM.js";
|
|
16
16
|
import {
|
|
17
17
|
BlockRenderer
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-WACTP75S.js";
|
|
19
19
|
import {
|
|
20
20
|
isCaptureDrivenVideo,
|
|
21
21
|
seekVideoToFrame
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-DN6JZRJI.js";
|
|
23
23
|
import {
|
|
24
24
|
useMediaProvider,
|
|
25
25
|
useMediaUrl,
|
|
26
26
|
useResourcePolicy
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-P6MT4F3R.js";
|
|
28
28
|
|
|
29
29
|
// src/hooks/useBuildNavigation.ts
|
|
30
30
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BlockRenderer
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-WACTP75S.js";
|
|
4
|
+
import "../chunk-DN6JZRJI.js";
|
|
5
|
+
import "../chunk-BXPGK5VO.js";
|
|
6
6
|
import {
|
|
7
7
|
renderMermaidSvgForExport
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-P6MT4F3R.js";
|
|
9
9
|
|
|
10
10
|
// src/export/diagramPictures.ts
|
|
11
11
|
import { createElement } from "react";
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -192,8 +192,9 @@ interface UseMediaUrlOptions {
|
|
|
192
192
|
staticSvg?: boolean;
|
|
193
193
|
}
|
|
194
194
|
/**
|
|
195
|
-
* Hook to resolve a media URL via the MediaProvider (if available)
|
|
196
|
-
*
|
|
195
|
+
* Hook to resolve a media URL via the MediaProvider (if available).
|
|
196
|
+
* Only provider-less paths use basePath-based resolution; a failed workspace
|
|
197
|
+
* lookup stays unresolved instead of requesting the same path from the page origin.
|
|
197
198
|
*
|
|
198
199
|
* Returns the resolved URL string. Updates when the provider or path changes.
|
|
199
200
|
*
|
package/dist/hooks/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
useDocPlayback,
|
|
7
7
|
useMediaSchedule,
|
|
8
8
|
useViewportOrientation
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-DQGV2LEY.js";
|
|
10
10
|
import {
|
|
11
11
|
useAutoSurface
|
|
12
12
|
} from "../chunk-TT6ENR6T.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
useMediaProvider,
|
|
17
17
|
useMediaUrl,
|
|
18
18
|
useResourcePolicy
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-P6MT4F3R.js";
|
|
20
20
|
export {
|
|
21
21
|
MediaContext,
|
|
22
22
|
ResourcePolicyContext,
|
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-TQYJ54WQ.js";
|
|
21
21
|
import {
|
|
22
22
|
PaginatedDocView
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-AX2FWY2N.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-6BKIY72Q.js";
|
|
31
31
|
import {
|
|
32
32
|
useModalDialog
|
|
33
33
|
} from "./chunk-JP457U6N.js";
|
|
@@ -36,11 +36,11 @@ import {
|
|
|
36
36
|
useDocPlayback,
|
|
37
37
|
useMediaSchedule,
|
|
38
38
|
useViewportOrientation
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-DQGV2LEY.js";
|
|
40
40
|
import {
|
|
41
41
|
JsonView,
|
|
42
42
|
createJsonFormFenceRenderer
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-UQOVF7IL.js";
|
|
44
44
|
import {
|
|
45
45
|
useAutoSurface
|
|
46
46
|
} from "./chunk-TT6ENR6T.js";
|
|
@@ -54,10 +54,10 @@ import {
|
|
|
54
54
|
VideoEmbedFrame,
|
|
55
55
|
useAnimatedImage,
|
|
56
56
|
useFenceRenderers
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-FLPGMUXM.js";
|
|
58
58
|
import {
|
|
59
59
|
BlockRenderer
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-WACTP75S.js";
|
|
61
61
|
import {
|
|
62
62
|
ImageLayer,
|
|
63
63
|
MapLayer,
|
|
@@ -71,10 +71,10 @@ import {
|
|
|
71
71
|
VideoLayer,
|
|
72
72
|
getAnimationStyle,
|
|
73
73
|
getTransitionClass
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-DN6JZRJI.js";
|
|
75
75
|
import {
|
|
76
76
|
MermaidDiagram
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-BXPGK5VO.js";
|
|
78
78
|
import {
|
|
79
79
|
MediaContext,
|
|
80
80
|
ResourcePolicyContext,
|
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
useMediaUrl,
|
|
85
85
|
useResourcePolicy,
|
|
86
86
|
useSanitizedSvgImage
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-P6MT4F3R.js";
|
|
88
88
|
export {
|
|
89
89
|
AnimatedImageControls,
|
|
90
90
|
BlockRenderer,
|
package/dist/json-view/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
JsonView,
|
|
3
3
|
createJsonFormFenceRenderer
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-UQOVF7IL.js";
|
|
5
5
|
import "../chunk-TT6ENR6T.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-FLPGMUXM.js";
|
|
7
|
+
import "../chunk-BXPGK5VO.js";
|
|
8
|
+
import "../chunk-P6MT4F3R.js";
|
|
9
9
|
export {
|
|
10
10
|
JsonView,
|
|
11
11
|
createJsonFormFenceRenderer
|
package/dist/layers/index.js
CHANGED
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
TextLayer,
|
|
10
10
|
TreeLayer,
|
|
11
11
|
VideoLayer
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-DN6JZRJI.js";
|
|
13
|
+
import "../chunk-BXPGK5VO.js";
|
|
14
|
+
import "../chunk-P6MT4F3R.js";
|
|
15
15
|
export {
|
|
16
16
|
ImageLayer,
|
|
17
17
|
MapLayer,
|
package/dist/markdown/index.js
CHANGED
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
MarkdownRenderer,
|
|
4
4
|
VideoEmbedFrame,
|
|
5
5
|
useFenceRenderers
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-FLPGMUXM.js";
|
|
7
7
|
import {
|
|
8
8
|
MermaidDiagram
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-BXPGK5VO.js";
|
|
10
|
+
import "../chunk-P6MT4F3R.js";
|
|
11
11
|
export {
|
|
12
12
|
FenceRendererContext,
|
|
13
13
|
MarkdownRenderer,
|
package/dist/page/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PaginatedDocView
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-AX2FWY2N.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-6BKIY72Q.js";
|
|
11
11
|
import "../chunk-TT6ENR6T.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-FLPGMUXM.js";
|
|
13
|
+
import "../chunk-WACTP75S.js";
|
|
14
|
+
import "../chunk-DN6JZRJI.js";
|
|
15
|
+
import "../chunk-BXPGK5VO.js";
|
|
16
|
+
import "../chunk-P6MT4F3R.js";
|
|
17
17
|
export {
|
|
18
18
|
CanvasSection,
|
|
19
19
|
LinearDocView,
|
package/dist/player/index.js
CHANGED
|
@@ -12,20 +12,20 @@ import {
|
|
|
12
12
|
MediaClipLayer,
|
|
13
13
|
SocialCaptionOverlay,
|
|
14
14
|
formatTime
|
|
15
|
-
} from "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
15
|
+
} from "../chunk-TQYJ54WQ.js";
|
|
16
|
+
import "../chunk-6BKIY72Q.js";
|
|
17
|
+
import "../chunk-DQGV2LEY.js";
|
|
18
18
|
import "../chunk-TT6ENR6T.js";
|
|
19
19
|
import {
|
|
20
20
|
InlineAudioPlayer,
|
|
21
21
|
InlineVideoPlayer
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-FLPGMUXM.js";
|
|
23
23
|
import {
|
|
24
24
|
BlockRenderer
|
|
25
|
-
} from "../chunk-
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-
|
|
25
|
+
} from "../chunk-WACTP75S.js";
|
|
26
|
+
import "../chunk-DN6JZRJI.js";
|
|
27
|
+
import "../chunk-BXPGK5VO.js";
|
|
28
|
+
import "../chunk-P6MT4F3R.js";
|
|
29
29
|
export {
|
|
30
30
|
BlockRenderer,
|
|
31
31
|
CaptionOverlay,
|