@bendyline/squisq-react 1.4.0 → 1.4.2
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/README.md +57 -23
- package/dist/index.d.ts +81 -21
- package/dist/index.js +461 -178
- package/dist/index.js.map +1 -1
- package/dist/squisq-player.css +1 -1
- package/dist/squisq-player.css.map +1 -1
- package/dist/squisq-player.global.js +49 -17
- package/dist/squisq-player.global.js.map +1 -1
- package/dist/standalone-source.js +1 -1
- package/dist/styles/index.css +2263 -0
- package/package.json +8 -5
- package/src/DocControlsSlideshow.tsx +13 -2
- package/src/DocPlayer.tsx +255 -58
- package/src/DocPlayerWithSidebar.tsx +21 -9
- package/src/LinearDocView.tsx +59 -10
- package/src/MarkdownRenderer.tsx +52 -35
- package/src/__tests__/DocPlayer.test.tsx +85 -6
- package/src/__tests__/DocPlayerStylesSentinel.test.tsx +41 -0
- package/src/__tests__/LinearDocView.test.tsx +53 -1
- package/src/__tests__/MarkdownRenderer.test.tsx +18 -0
- package/src/__tests__/useJsonViewTokens.test.ts +41 -0
- package/src/__tests__/useSlideSwipe.test.ts +81 -0
- package/src/hooks/{AudioProvider.ts → AudioController.ts} +3 -3
- package/src/hooks/index.ts +7 -2
- package/src/hooks/useAudioSync.ts +5 -4
- package/src/hooks/useSlideSwipe.ts +265 -0
- package/src/index.ts +1 -1
- package/src/jsonView/useJsonViewTokens.ts +6 -31
- package/src/standalone-entry.tsx +1 -1
- package/src/styles/doc-animations.css +46 -0
- package/src/types.ts +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bendyline/squisq-react",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "React component library for doc playback, block rendering, and media layers",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bendyline",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"types": "./dist/index.d.ts",
|
|
35
35
|
"import": "./dist/index.js"
|
|
36
36
|
},
|
|
37
|
-
"./styles": "./
|
|
37
|
+
"./styles": "./dist/styles/index.css",
|
|
38
38
|
"./standalone": "./dist/squisq-player.global.js",
|
|
39
39
|
"./standalone-source": {
|
|
40
40
|
"types": "./src/standalone-source.d.ts",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
|
-
"build": "tsup && tsup --config tsup.standalone.config.ts && node scripts/generate-standalone-source.mjs",
|
|
45
|
+
"build": "tsup && tsup --config tsup.standalone.config.ts && node scripts/generate-standalone-source.mjs && node ../../scripts/build-styles.mjs",
|
|
46
46
|
"build:esm": "tsup",
|
|
47
47
|
"build:standalone": "tsup --config tsup.standalone.config.ts && node scripts/generate-standalone-source.mjs",
|
|
48
48
|
"dev": "npm run build:standalone && concurrently -n js,dts -c blue,gray -r \"tsup --watch --no-dts --no-clean\" \"tsup --watch --dts-only --no-clean\"",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@bendyline/squisq": "1.5.
|
|
56
|
+
"@bendyline/squisq": "1.5.2"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/react": "18.3.28",
|
|
@@ -66,5 +66,8 @@
|
|
|
66
66
|
"jsdom": "25.0.1",
|
|
67
67
|
"tsup": "8.5.1",
|
|
68
68
|
"typescript": "5.9.3"
|
|
69
|
-
}
|
|
69
|
+
},
|
|
70
|
+
"sideEffects": [
|
|
71
|
+
"**/*.css"
|
|
72
|
+
]
|
|
70
73
|
}
|
|
@@ -19,9 +19,20 @@ interface DocControlsSlideshowProps {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export function DocControlsSlideshow({ state, slideNav }: DocControlsSlideshowProps) {
|
|
22
|
-
const {
|
|
22
|
+
const {
|
|
23
|
+
currentBlockIndex,
|
|
24
|
+
currentSlideLabel,
|
|
25
|
+
currentSlideNumber,
|
|
26
|
+
totalBlocks,
|
|
27
|
+
totalSlideNumber,
|
|
28
|
+
} = state;
|
|
23
29
|
const isFirst = currentBlockIndex <= 0;
|
|
24
30
|
const isLast = currentBlockIndex >= totalBlocks - 1;
|
|
31
|
+
const counterText =
|
|
32
|
+
totalBlocks > 0
|
|
33
|
+
? (currentSlideLabel ??
|
|
34
|
+
`${currentSlideNumber ?? currentBlockIndex + 1} / ${totalSlideNumber ?? totalBlocks}`)
|
|
35
|
+
: '—';
|
|
25
36
|
|
|
26
37
|
return (
|
|
27
38
|
<div
|
|
@@ -91,7 +102,7 @@ export function DocControlsSlideshow({ state, slideNav }: DocControlsSlideshowPr
|
|
|
91
102
|
letterSpacing: '0.02em',
|
|
92
103
|
}}
|
|
93
104
|
>
|
|
94
|
-
{
|
|
105
|
+
{counterText}
|
|
95
106
|
</span>
|
|
96
107
|
|
|
97
108
|
{/* Next button */}
|