@vocasync/astro 0.1.7 → 0.1.9
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 +9 -6
- package/dist/api/client.d.ts +1 -1
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +5 -9
- package/dist/api/client.js.map +1 -1
- package/dist/cli.js +4 -48
- package/dist/cli.js.map +1 -1
- package/dist/components/AudioPlayer.astro +1 -1
- package/dist/components/index.d.ts +14 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +1 -0
- package/dist/config/index.js.map +1 -1
- package/dist/config/loader.d.ts +11 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +42 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/core/audio-map.d.ts +1 -1
- package/dist/core/audio-map.d.ts.map +1 -1
- package/dist/core/audio-map.js +1 -1
- package/dist/core/audio-map.js.map +1 -1
- package/dist/core/content-loader.d.ts +1 -1
- package/dist/core/content-loader.d.ts.map +1 -1
- package/dist/core/content-loader.js +1 -1
- package/dist/core/content-loader.js.map +1 -1
- package/dist/core/speech-builder.d.ts +1 -1
- package/dist/core/speech-builder.d.ts.map +1 -1
- package/dist/core/speech-builder.js +4 -4
- package/dist/core/speech-builder.js.map +1 -1
- package/dist/integration.d.ts.map +1 -1
- package/dist/integration.js +3 -21
- package/dist/integration.js.map +1 -1
- package/dist/lib/latex-to-speech/index.d.ts.map +1 -1
- package/dist/lib/latex-to-speech/index.js +5 -3
- package/dist/lib/latex-to-speech/index.js.map +1 -1
- package/dist/rehype/audio-words.d.ts.map +1 -1
- package/dist/rehype/audio-words.js +9 -8
- package/dist/rehype/audio-words.js.map +1 -1
- package/dist/rehype/rehype-math-speech.d.ts.map +1 -1
- package/dist/rehype/rehype-math-speech.js +1 -1
- package/dist/rehype/rehype-math-speech.js.map +1 -1
- package/dist/rehype/remark-math-speech.d.ts.map +1 -1
- package/dist/rehype/remark-math-speech.js +2 -2
- package/dist/rehype/remark-math-speech.js.map +1 -1
- package/dist/styles/variables.css +27 -27
- package/dist/sync/orchestrator.d.ts +1 -1
- package/dist/sync/orchestrator.d.ts.map +1 -1
- package/dist/sync/orchestrator.js +3 -3
- package/dist/sync/orchestrator.js.map +1 -1
- package/package.json +1 -1
- package/src/api/client.ts +13 -24
- package/src/cli.ts +13 -61
- package/src/components/AudioPlayer.astro +1 -1
- package/src/components/index.ts +10 -0
- package/src/config/index.ts +2 -0
- package/src/config/loader.ts +48 -0
- package/src/core/audio-map.ts +2 -2
- package/src/core/content-loader.ts +2 -2
- package/src/core/speech-builder.ts +10 -8
- package/src/integration.ts +4 -27
- package/src/lib/latex-to-speech/index.ts +17 -17
- package/src/rehype/audio-words.ts +22 -16
- package/src/rehype/rehype-math-speech.ts +6 -7
- package/src/rehype/remark-math-speech.ts +4 -4
- package/src/styles/variables.css +27 -27
- package/src/sync/orchestrator.ts +8 -14
package/src/styles/variables.css
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* VocaSync AudioPlayer CSS Variables
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* Import this file and override variables to customize the player appearance.
|
|
5
|
-
*
|
|
5
|
+
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```css
|
|
8
8
|
* @import "@vocasync/astro/styles/variables.css";
|
|
9
|
-
*
|
|
9
|
+
*
|
|
10
10
|
* :root {
|
|
11
11
|
* --vocasync-primary: #8b5cf6;
|
|
12
12
|
* }
|
|
@@ -17,73 +17,73 @@
|
|
|
17
17
|
/* ========================================
|
|
18
18
|
* COLOR PALETTE
|
|
19
19
|
* ======================================== */
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
/* Primary brand color - used for buttons, progress bar, active states */
|
|
22
22
|
--vocasync-primary: #3b82f6;
|
|
23
23
|
--vocasync-primary-hover: #2563eb;
|
|
24
24
|
--vocasync-primary-content: #ffffff;
|
|
25
|
-
|
|
25
|
+
|
|
26
26
|
/* Surface colors - backgrounds and cards */
|
|
27
27
|
--vocasync-surface: #f8fafc;
|
|
28
28
|
--vocasync-surface-elevated: #ffffff;
|
|
29
|
-
|
|
29
|
+
|
|
30
30
|
/* Border colors */
|
|
31
31
|
--vocasync-border: #e2e8f0;
|
|
32
32
|
--vocasync-border-focus: #3b82f6;
|
|
33
|
-
|
|
33
|
+
|
|
34
34
|
/* Text colors */
|
|
35
35
|
--vocasync-text: #1e293b;
|
|
36
36
|
--vocasync-text-muted: #64748b;
|
|
37
37
|
--vocasync-text-faint: #94a3b8;
|
|
38
|
-
|
|
38
|
+
|
|
39
39
|
/* ========================================
|
|
40
40
|
* WORD HIGHLIGHTING
|
|
41
41
|
* ======================================== */
|
|
42
|
-
|
|
42
|
+
|
|
43
43
|
/* Color for the currently spoken word */
|
|
44
44
|
--vocasync-highlight: #10b981;
|
|
45
45
|
--vocasync-highlight-text: #ffffff;
|
|
46
|
-
|
|
46
|
+
|
|
47
47
|
/* Opacity for active word background */
|
|
48
48
|
--vocasync-highlight-active-opacity: 0.25;
|
|
49
|
-
|
|
49
|
+
|
|
50
50
|
/* Opacity for trailing words (creates a "wake" effect) */
|
|
51
51
|
--vocasync-highlight-trail-opacity: 0.12;
|
|
52
|
-
|
|
52
|
+
|
|
53
53
|
/* ========================================
|
|
54
54
|
* SIZING & SPACING
|
|
55
55
|
* ======================================== */
|
|
56
|
-
|
|
56
|
+
|
|
57
57
|
/* Player dimensions */
|
|
58
58
|
--vocasync-player-radius: 0.75rem;
|
|
59
59
|
--vocasync-player-padding: 1rem;
|
|
60
60
|
--vocasync-player-gap: 0.75rem;
|
|
61
|
-
|
|
61
|
+
|
|
62
62
|
/* Button sizes */
|
|
63
63
|
--vocasync-button-size: 2.5rem;
|
|
64
64
|
--vocasync-button-radius: 9999px;
|
|
65
|
-
|
|
65
|
+
|
|
66
66
|
/* Slider/range input */
|
|
67
67
|
--vocasync-slider-height: 0.375rem;
|
|
68
68
|
--vocasync-slider-thumb-size: 1rem;
|
|
69
69
|
--vocasync-slider-radius: 9999px;
|
|
70
|
-
|
|
70
|
+
|
|
71
71
|
/* Mini player */
|
|
72
72
|
--vocasync-mini-height: 3.5rem;
|
|
73
73
|
--vocasync-mini-offset: 1rem;
|
|
74
|
-
|
|
74
|
+
|
|
75
75
|
/* ========================================
|
|
76
76
|
* SHADOWS & EFFECTS
|
|
77
77
|
* ======================================== */
|
|
78
|
-
|
|
78
|
+
|
|
79
79
|
--vocasync-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
80
80
|
--vocasync-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
81
81
|
--vocasync-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
82
|
-
|
|
82
|
+
|
|
83
83
|
/* ========================================
|
|
84
84
|
* TRANSITIONS
|
|
85
85
|
* ======================================== */
|
|
86
|
-
|
|
86
|
+
|
|
87
87
|
--vocasync-transition-fast: 150ms ease;
|
|
88
88
|
--vocasync-transition: 200ms ease;
|
|
89
89
|
--vocasync-transition-slow: 300ms ease;
|
|
@@ -98,20 +98,20 @@
|
|
|
98
98
|
--vocasync-primary: #60a5fa;
|
|
99
99
|
--vocasync-primary-hover: #3b82f6;
|
|
100
100
|
--vocasync-primary-content: #1e293b;
|
|
101
|
-
|
|
101
|
+
|
|
102
102
|
--vocasync-surface: #1e293b;
|
|
103
103
|
--vocasync-surface-elevated: #334155;
|
|
104
|
-
|
|
104
|
+
|
|
105
105
|
--vocasync-border: #475569;
|
|
106
106
|
--vocasync-border-focus: #60a5fa;
|
|
107
|
-
|
|
107
|
+
|
|
108
108
|
--vocasync-text: #f1f5f9;
|
|
109
109
|
--vocasync-text-muted: #94a3b8;
|
|
110
110
|
--vocasync-text-faint: #64748b;
|
|
111
|
-
|
|
111
|
+
|
|
112
112
|
--vocasync-highlight: #34d399;
|
|
113
113
|
--vocasync-highlight-text: #1e293b;
|
|
114
|
-
|
|
114
|
+
|
|
115
115
|
--vocasync-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.2);
|
|
116
116
|
--vocasync-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.3);
|
|
117
117
|
--vocasync-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
|
|
@@ -123,8 +123,8 @@
|
|
|
123
123
|
* ======================================== */
|
|
124
124
|
|
|
125
125
|
.vocasync-word {
|
|
126
|
-
transition: background-color var(--vocasync-transition-fast),
|
|
127
|
-
|
|
126
|
+
transition: background-color var(--vocasync-transition-fast), color
|
|
127
|
+
var(--vocasync-transition-fast);
|
|
128
128
|
border-radius: 0.125rem;
|
|
129
129
|
padding: 0 0.0625rem;
|
|
130
130
|
margin: 0 -0.0625rem;
|
package/src/sync/orchestrator.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
import { type VocaSyncClient, getStreamingUrls } from "../api/client.js";
|
|
1
2
|
import type { VocaSyncConfig } from "../config/index.js";
|
|
3
|
+
import { getAudioEntry, loadAudioMap, saveAudioMap, setAudioEntry } from "../core/audio-map.js";
|
|
4
|
+
import { loadContent } from "../core/content-loader.js";
|
|
5
|
+
import { hasChanged } from "../core/hash-manager.js";
|
|
6
|
+
import { buildSpeechDocument } from "../core/speech-builder.js";
|
|
2
7
|
import type {
|
|
3
|
-
ContentItem,
|
|
4
8
|
AudioArtifact,
|
|
5
9
|
AudioMap,
|
|
10
|
+
ContentItem,
|
|
6
11
|
SyncResult,
|
|
7
|
-
SyncSummary,
|
|
8
12
|
SyncStatus,
|
|
13
|
+
SyncSummary,
|
|
9
14
|
} from "../types/index.js";
|
|
10
|
-
import { loadContent } from "../core/content-loader.js";
|
|
11
|
-
import { buildSpeechDocument } from "../core/speech-builder.js";
|
|
12
|
-
import { loadAudioMap, saveAudioMap, getAudioEntry, setAudioEntry } from "../core/audio-map.js";
|
|
13
|
-
import { hasChanged } from "../core/hash-manager.js";
|
|
14
|
-
import { VocaSyncClient, getStreamingUrls } from "../api/client.js";
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Options for the sync operation.
|
|
@@ -69,13 +69,7 @@ export async function sync(
|
|
|
69
69
|
|
|
70
70
|
// Process each item
|
|
71
71
|
for (const item of items) {
|
|
72
|
-
const result = await processItem(
|
|
73
|
-
item,
|
|
74
|
-
config,
|
|
75
|
-
client,
|
|
76
|
-
audioMap,
|
|
77
|
-
{ force, dryRun, onProgress }
|
|
78
|
-
);
|
|
72
|
+
const result = await processItem(item, config, client, audioMap, { force, dryRun, onProgress });
|
|
79
73
|
|
|
80
74
|
results.push(result);
|
|
81
75
|
|