@bendyline/squisq-react 2.12.35 → 2.12.37
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-MPOU5JC4.js → chunk-2MUOWKDD.js} +77 -36
- package/dist/{chunk-ZZ5ZY5JD.js → chunk-4T52YEO6.js} +1 -1
- package/dist/{chunk-MLONAXXN.js → chunk-BTQ6MFGI.js} +2 -2
- package/dist/{chunk-ARBI4PTE.js → chunk-CNUP52LX.js} +5 -3
- package/dist/{chunk-EQCHV3QH.js → chunk-HLL7ENG5.js} +5 -2
- package/dist/{chunk-755MBX5E.js → chunk-PQFZGOAN.js} +15 -6
- package/dist/{chunk-TCBV3WXF.js → chunk-QT2EVNNF.js} +1 -1
- package/dist/{chunk-GIRDBU3E.js → chunk-V22O3WRT.js} +1 -1
- package/dist/diagram-pictures/index.js +2 -2
- package/dist/hooks/index.js +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.js +8 -8
- package/dist/json-view/index.js +2 -2
- package/dist/layers/index.js +1 -1
- package/dist/markdown/index.js +1 -1
- package/dist/page/index.js +5 -5
- package/dist/player/index.d.ts +1 -1
- package/dist/player/index.js +6 -6
- package/dist/{player-XTHVuSvh.d.ts → player-CcdlXneC.d.ts} +141 -90
- package/dist/squisq-player.full.global.js +508 -507
- package/dist/squisq-player.global.js +98 -97
- package/dist/standalone-player-full.js +1 -1
- package/dist/standalone-source.js +1 -1
- package/package.json +2 -2
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LinearDocView
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BTQ6MFGI.js";
|
|
4
4
|
import {
|
|
5
5
|
useAudioSync,
|
|
6
6
|
useDocPlayback,
|
|
7
7
|
useMediaSchedule,
|
|
8
8
|
useScreenWakeLock,
|
|
9
9
|
useViewportOrientation
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HLL7ENG5.js";
|
|
11
11
|
import {
|
|
12
12
|
useAutoSurface
|
|
13
13
|
} from "./chunk-TT6ENR6T.js";
|
|
14
14
|
import {
|
|
15
15
|
MarkdownRenderer
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CNUP52LX.js";
|
|
17
17
|
import {
|
|
18
18
|
BlockRenderer
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-QT2EVNNF.js";
|
|
20
20
|
import {
|
|
21
21
|
applyMediaLevel,
|
|
22
22
|
blockVideoSourceTime,
|
|
@@ -2205,7 +2205,16 @@ import {
|
|
|
2205
2205
|
resolvePageBlock,
|
|
2206
2206
|
resolveThemeForDoc as resolveThemeForDoc2
|
|
2207
2207
|
} from "@bendyline/squisq/doc";
|
|
2208
|
+
import { SeededRandom, hashString } from "@bendyline/squisq/random";
|
|
2208
2209
|
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2210
|
+
function cardRef(card) {
|
|
2211
|
+
return {
|
|
2212
|
+
id: card.id,
|
|
2213
|
+
kind: card.kind,
|
|
2214
|
+
sourceBlockId: card.sourceBlockId,
|
|
2215
|
+
...card.ownerBlockId ? { ownerBlockId: card.ownerBlockId } : {}
|
|
2216
|
+
};
|
|
2217
|
+
}
|
|
2209
2218
|
var VISUAL_TEMPLATES = /* @__PURE__ */ new Set([
|
|
2210
2219
|
"diagram",
|
|
2211
2220
|
"tree",
|
|
@@ -2305,29 +2314,8 @@ function FaceContent(props) {
|
|
|
2305
2314
|
function FlashcardFaceView(props) {
|
|
2306
2315
|
return /* @__PURE__ */ jsx9(FaceContent, { ...props, viewport: props.viewport ?? VIEWPORT_PRESETS2.landscape });
|
|
2307
2316
|
}
|
|
2308
|
-
function hashSeed(value) {
|
|
2309
|
-
let hash = 2166136261;
|
|
2310
|
-
for (let index = 0; index < value.length; index++) {
|
|
2311
|
-
hash ^= value.charCodeAt(index);
|
|
2312
|
-
hash = Math.imul(hash, 16777619);
|
|
2313
|
-
}
|
|
2314
|
-
return hash >>> 0;
|
|
2315
|
-
}
|
|
2316
2317
|
function shuffled(values, seed) {
|
|
2317
|
-
|
|
2318
|
-
let state = hashSeed(seed) || 1;
|
|
2319
|
-
const random = () => {
|
|
2320
|
-
state += 1831565813;
|
|
2321
|
-
let next = state;
|
|
2322
|
-
next = Math.imul(next ^ next >>> 15, next | 1);
|
|
2323
|
-
next ^= next + Math.imul(next ^ next >>> 7, next | 61);
|
|
2324
|
-
return ((next ^ next >>> 14) >>> 0) / 4294967296;
|
|
2325
|
-
};
|
|
2326
|
-
for (let index = result.length - 1; index > 0; index--) {
|
|
2327
|
-
const other = Math.floor(random() * (index + 1));
|
|
2328
|
-
[result[index], result[other]] = [result[other], result[index]];
|
|
2329
|
-
}
|
|
2330
|
-
return result;
|
|
2318
|
+
return new SeededRandom(hashString(seed) || 1).shuffled(values);
|
|
2331
2319
|
}
|
|
2332
2320
|
function ChoiceContent(props) {
|
|
2333
2321
|
return /* @__PURE__ */ jsx9(FaceContent, { ...props, face: props.choice.content });
|
|
@@ -2354,13 +2342,24 @@ function FlashcardView({
|
|
|
2354
2342
|
viewport = VIEWPORT_PRESETS2.landscape,
|
|
2355
2343
|
density = "comfortable",
|
|
2356
2344
|
className,
|
|
2357
|
-
renderControls
|
|
2345
|
+
renderControls,
|
|
2346
|
+
kinds,
|
|
2347
|
+
onRate,
|
|
2348
|
+
onAnswer,
|
|
2349
|
+
onComplete
|
|
2358
2350
|
}) {
|
|
2359
2351
|
const compact = density === "compact";
|
|
2360
2352
|
const hostControls = !!renderControls;
|
|
2361
2353
|
const rootClassName = "squisq-flashcards" + (compact ? " squisq-flashcards--compact" : "") + (className ? ` ${className}` : "");
|
|
2362
2354
|
const activeTheme = useMemo5(() => theme ?? resolveThemeForDoc2(doc), [doc, theme]);
|
|
2363
|
-
const
|
|
2355
|
+
const kindsKey = kinds?.join(",");
|
|
2356
|
+
const deck = useMemo5(() => {
|
|
2357
|
+
const built = materializeFlashcards(doc, { source });
|
|
2358
|
+
const wanted = kindsKey?.split(",");
|
|
2359
|
+
return wanted ? { ...built, cards: built.cards.filter((card) => wanted.includes(card.kind)) } : built;
|
|
2360
|
+
}, [doc, source, kindsKey]);
|
|
2361
|
+
const callbacks = useRef5({ onRate, onAnswer, onComplete });
|
|
2362
|
+
callbacks.current = { onRate, onAnswer, onComplete };
|
|
2364
2363
|
const [shuffleEnabled, setShuffleEnabled] = useState5(initialShuffle);
|
|
2365
2364
|
const [sessionSeed, setSessionSeed] = useState5(1);
|
|
2366
2365
|
const [cardIndex, setCardIndex] = useState5(0);
|
|
@@ -2381,6 +2380,28 @@ function FlashcardView({
|
|
|
2381
2380
|
);
|
|
2382
2381
|
const currentCard = sessionCards[cardIndex];
|
|
2383
2382
|
const finished = sessionCards.length > 0 && cardIndex >= sessionCards.length;
|
|
2383
|
+
const choices = useMemo5(
|
|
2384
|
+
() => currentCard?.choices ? shuffled(currentCard.choices, `${currentCard.id}:${sessionSeed}`) : [],
|
|
2385
|
+
[currentCard, sessionSeed]
|
|
2386
|
+
);
|
|
2387
|
+
const complete = useCallback4(
|
|
2388
|
+
(finalRatings) => {
|
|
2389
|
+
const handler = callbacks.current.onComplete;
|
|
2390
|
+
if (!handler) return;
|
|
2391
|
+
const results = sessionCards.map((card) => ({
|
|
2392
|
+
card: cardRef(card),
|
|
2393
|
+
rating: finalRatings[card.id] ?? null
|
|
2394
|
+
}));
|
|
2395
|
+
handler({
|
|
2396
|
+
results,
|
|
2397
|
+
remembered: results.filter((result) => result.rating === "got-it").length,
|
|
2398
|
+
missed: results.filter((result) => result.rating === "again").length,
|
|
2399
|
+
total: results.length,
|
|
2400
|
+
retry: retryIds !== null
|
|
2401
|
+
});
|
|
2402
|
+
},
|
|
2403
|
+
[retryIds, sessionCards]
|
|
2404
|
+
);
|
|
2384
2405
|
const resetPosition = useCallback4(() => {
|
|
2385
2406
|
setCardIndex(0);
|
|
2386
2407
|
setRevealed(false);
|
|
@@ -2428,18 +2449,25 @@ function FlashcardView({
|
|
|
2428
2449
|
setRevealed(true);
|
|
2429
2450
|
if (currentCard.kind === "multiple-choice" && selectedChoiceId === null) {
|
|
2430
2451
|
setRatings((current) => ({ ...current, [currentCard.id]: "again" }));
|
|
2452
|
+
callbacks.current.onAnswer?.({
|
|
2453
|
+
card: cardRef(currentCard),
|
|
2454
|
+
choiceId: null,
|
|
2455
|
+
correct: false,
|
|
2456
|
+
retry: retryIds !== null
|
|
2457
|
+
});
|
|
2431
2458
|
}
|
|
2432
|
-
}, [currentCard, selectedChoiceId]);
|
|
2459
|
+
}, [currentCard, retryIds, selectedChoiceId]);
|
|
2433
2460
|
const nextCard = useCallback4(() => {
|
|
2434
2461
|
if (!currentCard) return;
|
|
2435
2462
|
if (!revealed) {
|
|
2436
2463
|
revealAnswer();
|
|
2437
2464
|
return;
|
|
2438
2465
|
}
|
|
2466
|
+
if (cardIndex === sessionCards.length - 1) complete(ratings);
|
|
2439
2467
|
setCardIndex((index) => index + 1);
|
|
2440
2468
|
setRevealed(false);
|
|
2441
2469
|
setSelectedChoiceId(null);
|
|
2442
|
-
}, [currentCard, revealAnswer, revealed]);
|
|
2470
|
+
}, [cardIndex, complete, currentCard, ratings, revealAnswer, revealed, sessionCards.length]);
|
|
2443
2471
|
const previousCard = useCallback4(() => {
|
|
2444
2472
|
if (finished) {
|
|
2445
2473
|
setCardIndex(Math.max(0, sessionCards.length - 1));
|
|
@@ -2466,24 +2494,37 @@ function FlashcardView({
|
|
|
2466
2494
|
...current,
|
|
2467
2495
|
[currentCard.id]: choice.correct ? "got-it" : "again"
|
|
2468
2496
|
}));
|
|
2497
|
+
callbacks.current.onAnswer?.({
|
|
2498
|
+
card: cardRef(currentCard),
|
|
2499
|
+
choiceId: choice.id,
|
|
2500
|
+
correct: choice.correct,
|
|
2501
|
+
retry: retryIds !== null
|
|
2502
|
+
});
|
|
2469
2503
|
},
|
|
2470
|
-
[currentCard, revealed]
|
|
2504
|
+
[currentCard, retryIds, revealed]
|
|
2471
2505
|
);
|
|
2472
2506
|
const rate = useCallback4(
|
|
2473
2507
|
(rating) => {
|
|
2474
2508
|
if (!currentCard) return;
|
|
2475
|
-
|
|
2509
|
+
const next = { ...ratings, [currentCard.id]: rating };
|
|
2510
|
+
setRatings(next);
|
|
2511
|
+
callbacks.current.onRate?.({
|
|
2512
|
+
card: cardRef(currentCard),
|
|
2513
|
+
rating,
|
|
2514
|
+
retry: retryIds !== null
|
|
2515
|
+
});
|
|
2516
|
+
if (cardIndex === sessionCards.length - 1) complete(next);
|
|
2476
2517
|
setCardIndex((index) => index + 1);
|
|
2477
2518
|
setRevealed(false);
|
|
2478
2519
|
setSelectedChoiceId(null);
|
|
2479
2520
|
},
|
|
2480
|
-
[currentCard]
|
|
2521
|
+
[cardIndex, complete, currentCard, ratings, retryIds, sessionCards.length]
|
|
2481
2522
|
);
|
|
2482
2523
|
const handleShortcut = useCallback4(
|
|
2483
2524
|
(event) => {
|
|
2484
2525
|
if (event.defaultPrevented || isInteractiveTarget(event.target)) return;
|
|
2485
2526
|
if (/^[1-9]$/.test(event.key) && currentCard?.kind === "multiple-choice" && !revealed) {
|
|
2486
|
-
const choice =
|
|
2527
|
+
const choice = choices[Number(event.key) - 1];
|
|
2487
2528
|
if (choice) {
|
|
2488
2529
|
event.preventDefault();
|
|
2489
2530
|
choose(choice);
|
|
@@ -2498,7 +2539,7 @@ function FlashcardView({
|
|
|
2498
2539
|
nextCard();
|
|
2499
2540
|
}
|
|
2500
2541
|
},
|
|
2501
|
-
[choose, currentCard, nextCard, previousCard, revealed]
|
|
2542
|
+
[choices, choose, currentCard, nextCard, previousCard, revealed]
|
|
2502
2543
|
);
|
|
2503
2544
|
useEffect6(() => {
|
|
2504
2545
|
if (!globalKeyboardShortcuts) return;
|
|
@@ -2612,7 +2653,6 @@ function FlashcardView({
|
|
|
2612
2653
|
}
|
|
2613
2654
|
);
|
|
2614
2655
|
}
|
|
2615
|
-
const choices = currentCard?.choices ? shuffled(currentCard.choices, `${currentCard.id}:${sessionSeed}`) : [];
|
|
2616
2656
|
const selectedChoice = choices.find((choice) => choice.id === selectedChoiceId);
|
|
2617
2657
|
const position = `Card ${cardIndex + 1} of ${sessionCards.length}`;
|
|
2618
2658
|
const nextLabel = revealed ? lastCard ? "Finish" : "Next card" : "Reveal";
|
|
@@ -3123,6 +3163,7 @@ function DocPlayer(props) {
|
|
|
3123
3163
|
return /* @__PURE__ */ jsx10("div", { className: "doc-player doc-player--flashcards", children: /* @__PURE__ */ jsx10(
|
|
3124
3164
|
FlashcardView,
|
|
3125
3165
|
{
|
|
3166
|
+
...props.flashcards,
|
|
3126
3167
|
doc: resolvedDoc,
|
|
3127
3168
|
basePath: props.basePath,
|
|
3128
3169
|
theme: props.theme,
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
InlineVideoPlayer,
|
|
6
6
|
MarkdownRenderer,
|
|
7
7
|
VideoEmbedFrame
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CNUP52LX.js";
|
|
9
9
|
import {
|
|
10
10
|
BlockRenderer
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-QT2EVNNF.js";
|
|
12
12
|
import {
|
|
13
13
|
svgDataImageSrc,
|
|
14
14
|
useMediaUrl
|
|
@@ -420,7 +420,8 @@ import {
|
|
|
420
420
|
sanitizeHtmlNodes,
|
|
421
421
|
mediaKindForUrl,
|
|
422
422
|
sanitizeUrl,
|
|
423
|
-
videoEmbedFromIframe
|
|
423
|
+
videoEmbedFromIframe,
|
|
424
|
+
withoutAccessorySectionNodes
|
|
424
425
|
} from "@bendyline/squisq/markdown";
|
|
425
426
|
import { mediaEditValuesFromAttributes, parseMediaEdits } from "@bendyline/squisq/mediaEdit";
|
|
426
427
|
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
@@ -993,8 +994,9 @@ function MarkdownRenderer({
|
|
|
993
994
|
cancelled = true;
|
|
994
995
|
};
|
|
995
996
|
}, [mediaProvider]);
|
|
996
|
-
|
|
997
|
-
|
|
997
|
+
const shown = nodes && withoutAccessorySectionNodes(nodes);
|
|
998
|
+
if (!shown || shown.length === 0) return null;
|
|
999
|
+
return /* @__PURE__ */ jsx6("div", { className: `squisq-md ${className || ""}`, children: renderBlocks(shown, "", {
|
|
998
1000
|
htmlPolicy,
|
|
999
1001
|
linkSchemes,
|
|
1000
1002
|
theme,
|
|
@@ -650,6 +650,7 @@ import {
|
|
|
650
650
|
import {
|
|
651
651
|
expandDocBlocks,
|
|
652
652
|
flattenRenderableBlocks as flattenRenderableBlocks2,
|
|
653
|
+
isAccessoryBlock,
|
|
653
654
|
isTemplateBlock,
|
|
654
655
|
resolvePersistentLayers,
|
|
655
656
|
VIEWPORT_PRESETS
|
|
@@ -812,8 +813,10 @@ function useDocPlayback(script, currentTime, options = {}) {
|
|
|
812
813
|
if (!script?.blocks) {
|
|
813
814
|
return [];
|
|
814
815
|
}
|
|
815
|
-
const
|
|
816
|
-
|
|
816
|
+
const needsFlattening = script.blocks.some(
|
|
817
|
+
(b) => b.children && b.children.length > 0 || isAccessoryBlock(b)
|
|
818
|
+
);
|
|
819
|
+
const flatBlocks = needsFlattening ? flattenRenderableBlocks2(script.blocks) : script.blocks;
|
|
817
820
|
const hasTemplates = flatBlocks.some(isTemplateBlock);
|
|
818
821
|
const resolvedTheme = theme ?? DEFAULT_THEME;
|
|
819
822
|
const persistentLayers = resolvePersistentLayers(
|
|
@@ -544,6 +544,12 @@ function TextLayer(props) {
|
|
|
544
544
|
if (hasIconMarker(props.layer.content.text ?? "")) return /* @__PURE__ */ jsx4(IconTextLayer, { ...props });
|
|
545
545
|
return /* @__PURE__ */ jsx4(PlainTextLayer, { ...props });
|
|
546
546
|
}
|
|
547
|
+
function keptScale(layer, fitScale) {
|
|
548
|
+
return layer.content.style.keepSize ? 1 : fitScale;
|
|
549
|
+
}
|
|
550
|
+
function fitTarget(layer, kind) {
|
|
551
|
+
return layer.content.style.keepSize ? void 0 : kind;
|
|
552
|
+
}
|
|
547
553
|
function escapeHtml(value) {
|
|
548
554
|
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
549
555
|
}
|
|
@@ -552,7 +558,8 @@ function iconRunsToHtml(text) {
|
|
|
552
558
|
(run) => run.type === "icon" ? `<i class="${iconClass(run.family, run.name)}" aria-hidden="true"></i>` : escapeHtml(run.text).replace(/\n/g, "<br>")
|
|
553
559
|
).join("");
|
|
554
560
|
}
|
|
555
|
-
function IconTextLayer({ layer, viewport, blockTime, textScale = 1 }) {
|
|
561
|
+
function IconTextLayer({ layer, viewport, blockTime, textScale: fitScale = 1 }) {
|
|
562
|
+
const textScale = keptScale(layer, fitScale);
|
|
556
563
|
const { content, position, animation } = layer;
|
|
557
564
|
const { text, style } = content;
|
|
558
565
|
const rawX = resolveValue(position.x, viewport.width);
|
|
@@ -606,7 +613,7 @@ function IconTextLayer({ layer, viewport, blockTime, textScale = 1 }) {
|
|
|
606
613
|
"div",
|
|
607
614
|
{
|
|
608
615
|
...{ xmlns: "http://www.w3.org/1999/xhtml" },
|
|
609
|
-
"data-squisq-text-fit": "html",
|
|
616
|
+
"data-squisq-text-fit": fitTarget(layer, "html"),
|
|
610
617
|
"data-squisq-base-font-size": style.fontSize,
|
|
611
618
|
style: boxStyle,
|
|
612
619
|
children: /* @__PURE__ */ jsx4(
|
|
@@ -629,7 +636,8 @@ function IconTextLayer({ layer, viewport, blockTime, textScale = 1 }) {
|
|
|
629
636
|
}
|
|
630
637
|
);
|
|
631
638
|
}
|
|
632
|
-
function PlainTextLayer({ layer, viewport, blockTime, textScale = 1 }) {
|
|
639
|
+
function PlainTextLayer({ layer, viewport, blockTime, textScale: fitScale = 1 }) {
|
|
640
|
+
const textScale = keptScale(layer, fitScale);
|
|
633
641
|
const defsId = defsIdFor(useId2(), layer.id);
|
|
634
642
|
const { content, position, animation } = layer;
|
|
635
643
|
const { text, style } = content;
|
|
@@ -771,7 +779,7 @@ function PlainTextLayer({ layer, viewport, blockTime, textScale = 1 }) {
|
|
|
771
779
|
/* @__PURE__ */ jsx4(
|
|
772
780
|
"g",
|
|
773
781
|
{
|
|
774
|
-
"data-squisq-text-fit": "svg",
|
|
782
|
+
"data-squisq-text-fit": fitTarget(layer, "svg"),
|
|
775
783
|
"data-squisq-fit-width": fitWidth,
|
|
776
784
|
"data-squisq-fit-height": fitHeight,
|
|
777
785
|
style: {
|
|
@@ -813,7 +821,8 @@ function PlainTextLayer({ layer, viewport, blockTime, textScale = 1 }) {
|
|
|
813
821
|
}
|
|
814
822
|
);
|
|
815
823
|
}
|
|
816
|
-
function RichTextLayer({ layer, viewport, blockTime, textScale = 1 }) {
|
|
824
|
+
function RichTextLayer({ layer, viewport, blockTime, textScale: fitScale = 1 }) {
|
|
825
|
+
const textScale = keptScale(layer, fitScale);
|
|
817
826
|
const { content, position, animation } = layer;
|
|
818
827
|
const { html, style } = content;
|
|
819
828
|
const rawX = resolveValue(position.x, viewport.width);
|
|
@@ -881,7 +890,7 @@ function RichTextLayer({ layer, viewport, blockTime, textScale = 1 }) {
|
|
|
881
890
|
"div",
|
|
882
891
|
{
|
|
883
892
|
...{ xmlns: "http://www.w3.org/1999/xhtml" },
|
|
884
|
-
"data-squisq-text-fit": "html",
|
|
893
|
+
"data-squisq-text-fit": fitTarget(layer, "html"),
|
|
885
894
|
"data-squisq-base-font-size": style.fontSize,
|
|
886
895
|
style: boxStyle,
|
|
887
896
|
onPointerDown: stopEmbeddedTableEvent,
|
package/dist/hooks/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SquisqRenderAPI, P as PlaybackControlsProps, V as VideoPresentation$1, a as PipSize, b as PipShape, c as PipPosition } from './player-
|
|
2
|
-
export { B as BlockMarker, d as BlockRenderer, C as CaptionMode, e as CaptionOverlay, f as CaptionPosition, g as CaptionStyle, h as ControlsLayout,
|
|
1
|
+
import { D as DocPlayerFlashcardOptions, S as SquisqRenderAPI, P as PlaybackControlsProps, V as VideoPresentation$1, a as PipSize, b as PipShape, c as PipPosition } from './player-CcdlXneC.js';
|
|
2
|
+
export { B as BlockMarker, d as BlockRenderer, C as CaptionMode, e as CaptionOverlay, f as CaptionPosition, g as CaptionStyle, h as ControlsLayout, i as DisplayMode, j as DocControlsBottom, k as DocControlsOverlay, l as DocControlsSidebar, m as DocControlsSlideshow, n as DocPlayer, o as DocPlayerProps, p as DocPlayerWithSidebar, q as DocProgressBar, F as FlashcardAnswerEvent, r as FlashcardCardRef, s as FlashcardCompleteEvent, t as FlashcardControls, u as FlashcardFaceView, v as FlashcardFaceViewProps, w as FlashcardRateEvent, x as FlashcardRating, y as FlashcardView, z as FlashcardViewProps, I as InlineAudioPlayer, A as InlineAudioPlayerProps, E as InlineVideoPlayer, G as InlineVideoPlayerProps, M as MediaClipLayer, H as MediaClipLayerProps, J as PlaybackActions, K as PlaybackState, R as RenderAudioSegmentInfo, L as RenderBlockInfo, N as RenderCaptionInfo, O as RenderChapterInfo, Q as RenderVideoFrameSelector, T as SlideNavActions, U as SlideshowControlsProps, W as SlideshowPickerItem, X as SocialCaptionOverlay, Y as formatTime } from './player-CcdlXneC.js';
|
|
3
3
|
import { Theme, VideoPresentation, VideoPipSize, VideoPipShape, VideoPipPosition, MotionSpec, Doc, MediaProvider, ScheduledClip, Block, BuildCursor } from '@bendyline/squisq/schemas';
|
|
4
4
|
import { DashboardStyleId, ViewportConfig, CoverSlideTemplate, CoverSlidePlayback } from '@bendyline/squisq/doc';
|
|
5
5
|
export { getAnimationStyle, getTransitionClass } from '@bendyline/squisq/doc';
|
|
@@ -55,6 +55,8 @@ interface MountOptions {
|
|
|
55
55
|
/** Loop playback when the timeline ends (video mode only, default: false). */
|
|
56
56
|
loop?: boolean;
|
|
57
57
|
/** Dashboard-mode options (ignored by the other modes). */
|
|
58
|
+
/** Flashcards mode: where the cards come from, which kinds, and answer callbacks. */
|
|
59
|
+
flashcards?: DocPlayerFlashcardOptions;
|
|
58
60
|
dashboard?: {
|
|
59
61
|
/** Layout id or 'auto'. Overrides doc frontmatter. */
|
|
60
62
|
layout?: string;
|
|
@@ -416,4 +418,4 @@ declare function useBuildNavigation(block: Block | null | undefined, enabled: bo
|
|
|
416
418
|
showAll: () => void;
|
|
417
419
|
};
|
|
418
420
|
|
|
419
|
-
export { AnimatedImageControls, type AnimatedImageControlsProps, type AnimatedImagePlayback, type AnimatedImageStatus, CodeBlockCopyHandler, DashboardView, type DashboardViewProps, DocControlsCompact, type DocPlayerAppearanceOverrides, type MountOptions, PipPosition, PipShape, PipSize, PlaybackControlsProps, type ResolvedDocPlayerAppearance, type SanitizedSvgImageOptions, type SquisqPlayerHandle, SquisqRenderAPI, SvgIslandImage, type SvgIslandImageProps, type VideoDurationProbeOptions, VideoPresentation$1 as VideoPresentation, applyMediaLevel, decodeSvgImages, isLocalSvgUrl, mediaCropStyle, probeVideoDurations, recipeLevelAt, resolveDocPlayerAppearance, resolveVideoDurations, sanitizedSvgImageUrl, useAnimatedImage, useBuildNavigation, useCutTimeMap, useMediaClipDurations, useSanitizedSvgImage, useSkipCuts, useVideoDurations, withMermaidLabelWrapping };
|
|
421
|
+
export { AnimatedImageControls, type AnimatedImageControlsProps, type AnimatedImagePlayback, type AnimatedImageStatus, CodeBlockCopyHandler, DashboardView, type DashboardViewProps, DocControlsCompact, type DocPlayerAppearanceOverrides, DocPlayerFlashcardOptions, type MountOptions, PipPosition, PipShape, PipSize, PlaybackControlsProps, type ResolvedDocPlayerAppearance, type SanitizedSvgImageOptions, type SquisqPlayerHandle, SquisqRenderAPI, SvgIslandImage, type SvgIslandImageProps, type VideoDurationProbeOptions, VideoPresentation$1 as VideoPresentation, applyMediaLevel, decodeSvgImages, isLocalSvgUrl, mediaCropStyle, probeVideoDurations, recipeLevelAt, resolveDocPlayerAppearance, resolveVideoDurations, sanitizedSvgImageUrl, useAnimatedImage, useBuildNavigation, useCutTimeMap, useMediaClipDurations, useSanitizedSvgImage, useSkipCuts, useVideoDurations, withMermaidLabelWrapping };
|
package/dist/index.js
CHANGED
|
@@ -21,17 +21,17 @@ import {
|
|
|
21
21
|
useBuildNavigation,
|
|
22
22
|
useMediaClipDurations,
|
|
23
23
|
useVideoDurations
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-2MUOWKDD.js";
|
|
25
25
|
import {
|
|
26
26
|
PaginatedDocView
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-V22O3WRT.js";
|
|
28
28
|
import {
|
|
29
29
|
CanvasSection,
|
|
30
30
|
LinearDocView,
|
|
31
31
|
PageSectionView,
|
|
32
32
|
PageViewContext,
|
|
33
33
|
usePageView
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-BTQ6MFGI.js";
|
|
35
35
|
import {
|
|
36
36
|
useModalDialog
|
|
37
37
|
} from "./chunk-JP457U6N.js";
|
|
@@ -42,11 +42,11 @@ import {
|
|
|
42
42
|
useMediaSchedule,
|
|
43
43
|
useScreenWakeLock,
|
|
44
44
|
useViewportOrientation
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-HLL7ENG5.js";
|
|
46
46
|
import {
|
|
47
47
|
JsonView,
|
|
48
48
|
createJsonFormFenceRenderer
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-4T52YEO6.js";
|
|
50
50
|
import {
|
|
51
51
|
useAutoSurface
|
|
52
52
|
} from "./chunk-TT6ENR6T.js";
|
|
@@ -60,10 +60,10 @@ import {
|
|
|
60
60
|
VideoEmbedFrame,
|
|
61
61
|
useAnimatedImage,
|
|
62
62
|
useFenceRenderers
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-CNUP52LX.js";
|
|
64
64
|
import {
|
|
65
65
|
BlockRenderer
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-QT2EVNNF.js";
|
|
67
67
|
import {
|
|
68
68
|
ImageLayer,
|
|
69
69
|
MapLayer,
|
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
VideoLayer,
|
|
78
78
|
getAnimationStyle,
|
|
79
79
|
getTransitionClass
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-PQFZGOAN.js";
|
|
81
81
|
import {
|
|
82
82
|
MermaidDiagram,
|
|
83
83
|
applyMediaLevel,
|
package/dist/json-view/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
JsonView,
|
|
3
3
|
createJsonFormFenceRenderer
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-4T52YEO6.js";
|
|
5
5
|
import "../chunk-TT6ENR6T.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-CNUP52LX.js";
|
|
7
7
|
import "../chunk-FXAKS6KU.js";
|
|
8
8
|
import "../chunk-ZKMBIWAA.js";
|
|
9
9
|
export {
|
package/dist/layers/index.js
CHANGED
package/dist/markdown/index.js
CHANGED
package/dist/page/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PaginatedDocView
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-V22O3WRT.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-BTQ6MFGI.js";
|
|
11
11
|
import "../chunk-TT6ENR6T.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-CNUP52LX.js";
|
|
13
|
+
import "../chunk-QT2EVNNF.js";
|
|
14
|
+
import "../chunk-PQFZGOAN.js";
|
|
15
15
|
import "../chunk-FXAKS6KU.js";
|
|
16
16
|
import "../chunk-ZKMBIWAA.js";
|
|
17
17
|
export {
|
package/dist/player/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as BlockMarker, d as BlockRenderer, C as CaptionMode, e as CaptionOverlay, g as CaptionStyle, h as ControlsLayout,
|
|
1
|
+
export { B as BlockMarker, d as BlockRenderer, C as CaptionMode, e as CaptionOverlay, g as CaptionStyle, h as ControlsLayout, i as DisplayMode, j as DocControlsBottom, k as DocControlsOverlay, l as DocControlsSidebar, m as DocControlsSlideshow, n as DocPlayer, o as DocPlayerProps, p as DocPlayerWithSidebar, q as DocProgressBar, F as FlashcardAnswerEvent, r as FlashcardCardRef, s as FlashcardCompleteEvent, u as FlashcardFaceView, v as FlashcardFaceViewProps, w as FlashcardRateEvent, y as FlashcardView, z as FlashcardViewProps, I as InlineAudioPlayer, A as InlineAudioPlayerProps, E as InlineVideoPlayer, G as InlineVideoPlayerProps, M as MediaClipLayer, H as MediaClipLayerProps, c as PipPosition, b as PipShape, a as PipSize, J as PlaybackActions, K as PlaybackState, R as RenderAudioSegmentInfo, L as RenderBlockInfo, N as RenderCaptionInfo, O as RenderChapterInfo, T as SlideNavActions, X as SocialCaptionOverlay, S as SquisqRenderAPI, V as VideoPresentation, Y as formatTime } from '../player-CcdlXneC.js';
|
|
2
2
|
export { a as CodeBlockCopyContext, C as CodeBlockCopyHandler } from '../MarkdownRenderer-C63CQ9Ca.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@bendyline/squisq/schemas';
|
package/dist/player/index.js
CHANGED
|
@@ -12,18 +12,18 @@ import {
|
|
|
12
12
|
MediaClipLayer,
|
|
13
13
|
SocialCaptionOverlay,
|
|
14
14
|
formatTime
|
|
15
|
-
} from "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
15
|
+
} from "../chunk-2MUOWKDD.js";
|
|
16
|
+
import "../chunk-BTQ6MFGI.js";
|
|
17
|
+
import "../chunk-HLL7ENG5.js";
|
|
18
18
|
import "../chunk-TT6ENR6T.js";
|
|
19
19
|
import {
|
|
20
20
|
InlineAudioPlayer,
|
|
21
21
|
InlineVideoPlayer
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-CNUP52LX.js";
|
|
23
23
|
import {
|
|
24
24
|
BlockRenderer
|
|
25
|
-
} from "../chunk-
|
|
26
|
-
import "../chunk-
|
|
25
|
+
} from "../chunk-QT2EVNNF.js";
|
|
26
|
+
import "../chunk-PQFZGOAN.js";
|
|
27
27
|
import "../chunk-FXAKS6KU.js";
|
|
28
28
|
import "../chunk-ZKMBIWAA.js";
|
|
29
29
|
export {
|