@bendyline/squisq-react 2.12.16 → 2.12.18
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/THIRD_PARTY_LICENSES.txt +3 -3
- package/dist/{chunk-UQOVF7IL.js → chunk-26J5MZBI.js} +1 -1
- package/dist/{chunk-3Y62AJBT.js → chunk-73MW4RJW.js} +6 -6
- package/dist/{chunk-BXPGK5VO.js → chunk-A65WPCGZ.js} +1 -1
- package/dist/{chunk-MPTT6UJ4.js → chunk-GIJRQVYB.js} +1 -1
- package/dist/{chunk-P6MT4F3R.js → chunk-OTYJ4MRH.js} +23 -1
- package/dist/{chunk-FLPGMUXM.js → chunk-OWC7DNGJ.js} +2 -2
- package/dist/{chunk-Z23W4GCL.js → chunk-PVCHPYJG.js} +3 -3
- package/dist/{chunk-BFZAPNGC.js → chunk-TVYZINUR.js} +1 -1
- package/dist/{chunk-TOI34QD7.js → chunk-UTRO6ZZS.js} +2 -2
- package/dist/{chunk-H3HW6MU5.js → chunk-X67VFBAO.js} +1 -1
- package/dist/diagram-pictures/index.js +4 -4
- package/dist/hooks/index.js +2 -2
- package/dist/index.d.ts +10 -1
- package/dist/index.js +14 -12
- 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 +17 -17
- package/dist/squisq-player.global.js +7 -7
- package/dist/standalone-player-full.js +1 -1
- package/dist/standalone-source.js +1 -1
- package/package.json +1 -1
package/THIRD_PARTY_LICENSES.txt
CHANGED
|
@@ -61,7 +61,7 @@ COMPONENTS
|
|
|
61
61
|
- decode-named-character-reference@1.3.0 (MIT); files: license
|
|
62
62
|
- delaunator@5.1.0 (ISC); files: LICENSE
|
|
63
63
|
- devlop@1.1.0 (MIT); files: license
|
|
64
|
-
- dompurify@3.4.
|
|
64
|
+
- dompurify@3.4.17 ((MPL-2.0 OR Apache-2.0)); files: LICENSE, LICENSE-MPL
|
|
65
65
|
- entities@6.0.1 (BSD-2-Clause); files: LICENSE
|
|
66
66
|
- es-toolkit@1.49.0 (MIT); files: LICENSE
|
|
67
67
|
- escape-string-regexp@5.0.0 (MIT); files: license
|
|
@@ -1571,7 +1571,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
|
1571
1571
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1572
1572
|
|
|
1573
1573
|
==============================================================================
|
|
1574
|
-
dompurify@3.4.
|
|
1574
|
+
dompurify@3.4.17 - LICENSE
|
|
1575
1575
|
==============================================================================
|
|
1576
1576
|
|
|
1577
1577
|
Apache License
|
|
@@ -1777,7 +1777,7 @@ dompurify@3.4.16 - LICENSE
|
|
|
1777
1777
|
limitations under the License.
|
|
1778
1778
|
|
|
1779
1779
|
==============================================================================
|
|
1780
|
-
dompurify@3.4.
|
|
1780
|
+
dompurify@3.4.17 - LICENSE-MPL
|
|
1781
1781
|
==============================================================================
|
|
1782
1782
|
Mozilla Public License Version 2.0
|
|
1783
1783
|
==================================
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LinearDocView
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PVCHPYJG.js";
|
|
4
4
|
import {
|
|
5
5
|
useAudioSync,
|
|
6
6
|
useDocPlayback,
|
|
7
7
|
useMediaSchedule,
|
|
8
8
|
useViewportOrientation
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TVYZINUR.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-OWC7DNGJ.js";
|
|
16
16
|
import {
|
|
17
17
|
BlockRenderer
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-GIJRQVYB.js";
|
|
19
19
|
import {
|
|
20
20
|
isCaptureDrivenVideo,
|
|
21
21
|
seekVideoToFrame
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-UTRO6ZZS.js";
|
|
23
23
|
import {
|
|
24
24
|
useMediaProvider,
|
|
25
25
|
useMediaUrl,
|
|
26
26
|
useResourcePolicy
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-OTYJ4MRH.js";
|
|
28
28
|
|
|
29
29
|
// src/hooks/useBuildNavigation.ts
|
|
30
30
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
@@ -151,6 +151,25 @@ function enqueue(run) {
|
|
|
151
151
|
);
|
|
152
152
|
return result;
|
|
153
153
|
}
|
|
154
|
+
var LABEL_WIDTH_SNAP = 0.5;
|
|
155
|
+
async function withMermaidLabelWrapping(run) {
|
|
156
|
+
const prototype = Element.prototype;
|
|
157
|
+
const measure = prototype.getBoundingClientRect;
|
|
158
|
+
function snapped() {
|
|
159
|
+
const rect = measure.call(this);
|
|
160
|
+
if (!(this instanceof HTMLElement) || this.parentElement?.localName !== "foreignObject") {
|
|
161
|
+
return rect;
|
|
162
|
+
}
|
|
163
|
+
const maxWidth = Number.parseFloat(this.style.maxWidth);
|
|
164
|
+
return Math.abs(rect.width - maxWidth) < LABEL_WIDTH_SNAP ? new DOMRect(rect.x, rect.y, maxWidth, rect.height) : rect;
|
|
165
|
+
}
|
|
166
|
+
prototype.getBoundingClientRect = snapped;
|
|
167
|
+
try {
|
|
168
|
+
return await run();
|
|
169
|
+
} finally {
|
|
170
|
+
if (prototype.getBoundingClientRect === snapped) prototype.getBoundingClientRect = measure;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
154
173
|
function renderMermaidSvg(id, source, container, theme = DEFAULT_THEME) {
|
|
155
174
|
return enqueue(async () => {
|
|
156
175
|
const mermaid = await loadMermaid();
|
|
@@ -159,7 +178,9 @@ function renderMermaidSvg(id, source, container, theme = DEFAULT_THEME) {
|
|
|
159
178
|
theme: "base",
|
|
160
179
|
themeVariables: buildMermaidThemeVariables(theme)
|
|
161
180
|
});
|
|
162
|
-
const { svg, diagramType } = await
|
|
181
|
+
const { svg, diagramType } = await withMermaidLabelWrapping(
|
|
182
|
+
() => mermaid.render(id, source, container)
|
|
183
|
+
);
|
|
163
184
|
return { svg, diagramType };
|
|
164
185
|
});
|
|
165
186
|
}
|
|
@@ -193,6 +214,7 @@ export {
|
|
|
193
214
|
useResourcePolicy,
|
|
194
215
|
useMediaProvider,
|
|
195
216
|
useMediaUrl,
|
|
217
|
+
withMermaidLabelWrapping,
|
|
196
218
|
renderMermaidSvg,
|
|
197
219
|
renderMermaidSvgForExport,
|
|
198
220
|
mermaidRenderErrorMessage
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MermaidDiagram
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-A65WPCGZ.js";
|
|
4
4
|
import {
|
|
5
5
|
svgDataImageSrc,
|
|
6
6
|
useMediaProvider,
|
|
7
7
|
useMediaUrl
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-OTYJ4MRH.js";
|
|
9
9
|
|
|
10
10
|
// src/hooks/FenceRendererContext.tsx
|
|
11
11
|
import { createContext, useContext } from "react";
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
InlineVideoPlayer,
|
|
6
6
|
MarkdownRenderer,
|
|
7
7
|
VideoEmbedFrame
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-OWC7DNGJ.js";
|
|
9
9
|
import {
|
|
10
10
|
BlockRenderer
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-GIJRQVYB.js";
|
|
12
12
|
import {
|
|
13
13
|
svgDataImageSrc,
|
|
14
14
|
useMediaUrl
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-OTYJ4MRH.js";
|
|
16
16
|
|
|
17
17
|
// src/page/PageViewContext.ts
|
|
18
18
|
import { createContext, useContext } from "react";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BlockRenderer
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-GIJRQVYB.js";
|
|
4
|
+
import "../chunk-UTRO6ZZS.js";
|
|
5
|
+
import "../chunk-A65WPCGZ.js";
|
|
6
6
|
import {
|
|
7
7
|
renderMermaidSvgForExport
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-OTYJ4MRH.js";
|
|
9
9
|
|
|
10
10
|
// src/export/diagramPictures.ts
|
|
11
11
|
import { createElement } from "react";
|
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-TVYZINUR.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-OTYJ4MRH.js";
|
|
20
20
|
export {
|
|
21
21
|
MediaContext,
|
|
22
22
|
ResourcePolicyContext,
|
package/dist/index.d.ts
CHANGED
|
@@ -144,6 +144,15 @@ interface SquisqPlayerHandle {
|
|
|
144
144
|
unmount(): void;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
+
/** Browser-only, lazy official Mermaid renderer shared by page and slide views. */
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Run Mermaid work with HTML label widths snapped to their wrapping width, so
|
|
151
|
+
* long labels wrap at every display scale. Call it inside the shared Mermaid
|
|
152
|
+
* work queue, which keeps two renders from overlapping.
|
|
153
|
+
*/
|
|
154
|
+
declare function withMermaidLabelWrapping<T>(run: () => Promise<T>): Promise<T>;
|
|
155
|
+
|
|
147
156
|
interface DashboardViewProps {
|
|
148
157
|
doc: Doc;
|
|
149
158
|
/** Resolved theme; defaults to the doc's own theme resolution. */
|
|
@@ -325,4 +334,4 @@ declare function useBuildNavigation(block: Block | null | undefined, enabled: bo
|
|
|
325
334
|
showAll: () => void;
|
|
326
335
|
};
|
|
327
336
|
|
|
328
|
-
export { AnimatedImageControls, type AnimatedImageControlsProps, type AnimatedImagePlayback, type AnimatedImageStatus, CodeBlockCopyHandler, DashboardView, type DashboardViewProps, type DocPlayerAppearanceOverrides, type MountOptions, PipPosition, PipShape, PipSize, type ResolvedDocPlayerAppearance, type SanitizedSvgImageOptions, type SquisqPlayerHandle, SquisqRenderAPI, SvgIslandImage, type SvgIslandImageProps, VideoPresentation$1 as VideoPresentation, decodeSvgImages, isLocalSvgUrl, resolveDocPlayerAppearance, sanitizedSvgImageUrl, useAnimatedImage, useBuildNavigation, useMediaClipDurations, useSanitizedSvgImage };
|
|
337
|
+
export { AnimatedImageControls, type AnimatedImageControlsProps, type AnimatedImagePlayback, type AnimatedImageStatus, CodeBlockCopyHandler, DashboardView, type DashboardViewProps, type DocPlayerAppearanceOverrides, type MountOptions, PipPosition, PipShape, PipSize, type ResolvedDocPlayerAppearance, type SanitizedSvgImageOptions, type SquisqPlayerHandle, SquisqRenderAPI, SvgIslandImage, type SvgIslandImageProps, VideoPresentation$1 as VideoPresentation, decodeSvgImages, isLocalSvgUrl, resolveDocPlayerAppearance, sanitizedSvgImageUrl, useAnimatedImage, useBuildNavigation, useMediaClipDurations, useSanitizedSvgImage, withMermaidLabelWrapping };
|
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-73MW4RJW.js";
|
|
21
21
|
import {
|
|
22
22
|
PaginatedDocView
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-X67VFBAO.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-PVCHPYJG.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-TVYZINUR.js";
|
|
40
40
|
import {
|
|
41
41
|
JsonView,
|
|
42
42
|
createJsonFormFenceRenderer
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-26J5MZBI.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-OWC7DNGJ.js";
|
|
58
58
|
import {
|
|
59
59
|
BlockRenderer
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-GIJRQVYB.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-UTRO6ZZS.js";
|
|
75
75
|
import {
|
|
76
76
|
MermaidDiagram
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-A65WPCGZ.js";
|
|
78
78
|
import {
|
|
79
79
|
MediaContext,
|
|
80
80
|
ResourcePolicyContext,
|
|
@@ -83,8 +83,9 @@ import {
|
|
|
83
83
|
useMediaProvider,
|
|
84
84
|
useMediaUrl,
|
|
85
85
|
useResourcePolicy,
|
|
86
|
-
useSanitizedSvgImage
|
|
87
|
-
|
|
86
|
+
useSanitizedSvgImage,
|
|
87
|
+
withMermaidLabelWrapping
|
|
88
|
+
} from "./chunk-OTYJ4MRH.js";
|
|
88
89
|
export {
|
|
89
90
|
AnimatedImageControls,
|
|
90
91
|
BlockRenderer,
|
|
@@ -148,5 +149,6 @@ export {
|
|
|
148
149
|
usePageView,
|
|
149
150
|
useResourcePolicy,
|
|
150
151
|
useSanitizedSvgImage,
|
|
151
|
-
useViewportOrientation
|
|
152
|
+
useViewportOrientation,
|
|
153
|
+
withMermaidLabelWrapping
|
|
152
154
|
};
|
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-26J5MZBI.js";
|
|
5
5
|
import "../chunk-TT6ENR6T.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-OWC7DNGJ.js";
|
|
7
|
+
import "../chunk-A65WPCGZ.js";
|
|
8
|
+
import "../chunk-OTYJ4MRH.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-UTRO6ZZS.js";
|
|
13
|
+
import "../chunk-A65WPCGZ.js";
|
|
14
|
+
import "../chunk-OTYJ4MRH.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-OWC7DNGJ.js";
|
|
7
7
|
import {
|
|
8
8
|
MermaidDiagram
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-A65WPCGZ.js";
|
|
10
|
+
import "../chunk-OTYJ4MRH.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-X67VFBAO.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-PVCHPYJG.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-OWC7DNGJ.js";
|
|
13
|
+
import "../chunk-GIJRQVYB.js";
|
|
14
|
+
import "../chunk-UTRO6ZZS.js";
|
|
15
|
+
import "../chunk-A65WPCGZ.js";
|
|
16
|
+
import "../chunk-OTYJ4MRH.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-73MW4RJW.js";
|
|
16
|
+
import "../chunk-PVCHPYJG.js";
|
|
17
|
+
import "../chunk-TVYZINUR.js";
|
|
18
18
|
import "../chunk-TT6ENR6T.js";
|
|
19
19
|
import {
|
|
20
20
|
InlineAudioPlayer,
|
|
21
21
|
InlineVideoPlayer
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-OWC7DNGJ.js";
|
|
23
23
|
import {
|
|
24
24
|
BlockRenderer
|
|
25
|
-
} from "../chunk-
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-
|
|
25
|
+
} from "../chunk-GIJRQVYB.js";
|
|
26
|
+
import "../chunk-UTRO6ZZS.js";
|
|
27
|
+
import "../chunk-A65WPCGZ.js";
|
|
28
|
+
import "../chunk-OTYJ4MRH.js";
|
|
29
29
|
export {
|
|
30
30
|
BlockRenderer,
|
|
31
31
|
CaptionOverlay,
|