@vibes.diy/base 14.3.451 → 14.3.453
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/components/ImgGen.js +9 -14
- package/components/dictation/dictation.d.ts +73 -0
- package/components/dictation/dictation.js +466 -0
- package/components/index.d.ts +1 -0
- package/components/index.js +1 -0
- package/components/vibe-menu/cards/ShareCard.js +8 -36
- package/components/vibe-menu/cards/share-card.styles.d.ts +1 -1
- package/components/vibe-menu/cards/share-card.styles.js +1 -8
- package/components/vibe-menu/copy.d.ts +2 -8
- package/components/vibe-menu/copy.js +1 -5
- package/components/vibe-menu/parts/Composer.d.ts +1 -0
- package/components/vibe-menu/parts/Composer.js +31 -2
- package/components/vibe-menu/parts/use-composer-draft.js +1 -0
- package/components/vibe-menu/slices.d.ts +0 -2
- package/components/vibe-menu/vibe-menu.styles.d.ts +1 -1
- package/components/vibe-menu/vibe-menu.styles.js +66 -0
- package/hooks/img-gen/use-img-gen.js +27 -1
- package/package.json +5 -5
|
@@ -739,6 +739,66 @@ export const VIBE_MENU_CSS = `
|
|
|
739
739
|
width: 16px;
|
|
740
740
|
height: 16px;
|
|
741
741
|
}
|
|
742
|
+
/* The record button (2026-11-26): a mic beside the cap; listening, the field
|
|
743
|
+
gives way to a live line between a cross and a check. */
|
|
744
|
+
[data-vibe-menu] .vm-composer .vm-mic {
|
|
745
|
+
flex: none;
|
|
746
|
+
align-self: center;
|
|
747
|
+
width: var(--size-copy);
|
|
748
|
+
height: var(--size-copy);
|
|
749
|
+
margin-right: var(--space-8);
|
|
750
|
+
border-radius: 50%;
|
|
751
|
+
display: grid;
|
|
752
|
+
place-items: center;
|
|
753
|
+
color: var(--muted);
|
|
754
|
+
}
|
|
755
|
+
[data-vibe-menu] .vm-composer .vm-mic:hover {
|
|
756
|
+
color: var(--ink);
|
|
757
|
+
}
|
|
758
|
+
[data-vibe-menu] .vm-composer .vm-mic[data-transcribing] {
|
|
759
|
+
color: var(--ink);
|
|
760
|
+
cursor: progress;
|
|
761
|
+
}
|
|
762
|
+
[data-vibe-menu] .vm-composer.is-dictating textarea,
|
|
763
|
+
[data-vibe-menu] .vm-composer.is-dictating .vm-attach,
|
|
764
|
+
[data-vibe-menu] .vm-composer.is-dictating .vm-cap {
|
|
765
|
+
display: none !important;
|
|
766
|
+
}
|
|
767
|
+
[data-vibe-menu] .vm-composer .vm-dictate {
|
|
768
|
+
flex: 1;
|
|
769
|
+
min-width: 0;
|
|
770
|
+
display: flex;
|
|
771
|
+
align-items: center;
|
|
772
|
+
gap: var(--space-8);
|
|
773
|
+
padding-left: var(--space-6);
|
|
774
|
+
color: var(--ink);
|
|
775
|
+
}
|
|
776
|
+
[data-vibe-menu] .vm-composer .vm-dictate-cancel {
|
|
777
|
+
flex: none;
|
|
778
|
+
width: var(--size-copy);
|
|
779
|
+
height: var(--size-copy);
|
|
780
|
+
border-radius: 50%;
|
|
781
|
+
display: grid;
|
|
782
|
+
place-items: center;
|
|
783
|
+
color: var(--muted);
|
|
784
|
+
}
|
|
785
|
+
[data-vibe-menu] .vm-composer .vm-dictate-cancel:hover {
|
|
786
|
+
color: var(--ink);
|
|
787
|
+
}
|
|
788
|
+
[data-vibe-menu] .vm-composer .vm-dictate-done {
|
|
789
|
+
flex: none;
|
|
790
|
+
align-self: stretch;
|
|
791
|
+
display: grid;
|
|
792
|
+
place-items: center;
|
|
793
|
+
padding: 0 var(--space-24) 0 20px;
|
|
794
|
+
border-left: var(--stroke-rule) solid var(--line-card);
|
|
795
|
+
background: var(--section-code);
|
|
796
|
+
color: var(--on-code);
|
|
797
|
+
cursor: pointer;
|
|
798
|
+
}
|
|
799
|
+
[data-vibe-menu] .vm-composer .vm-dictate-done:hover {
|
|
800
|
+
background: color-mix(in oklch, var(--section-code), var(--menu-ink) 10%);
|
|
801
|
+
}
|
|
742
802
|
[data-vibe-menu] .vm-cap {
|
|
743
803
|
flex: none;
|
|
744
804
|
display: flex;
|
|
@@ -826,6 +886,12 @@ export const VIBE_MENU_CSS = `
|
|
|
826
886
|
[data-vibe-menu] .vm-composer:has(textarea:not(:placeholder-shown)) + .vm-queue-note {
|
|
827
887
|
display: block;
|
|
828
888
|
}
|
|
889
|
+
/* The dictation line (#11269) answers a mic press, which works in an empty box
|
|
890
|
+
too ("Allow the microphone…", "Writing down what you said…"), so it shows
|
|
891
|
+
whatever the box holds. */
|
|
892
|
+
[data-vibe-menu] .vm-queue-note[data-dictation-note] {
|
|
893
|
+
display: block;
|
|
894
|
+
}
|
|
829
895
|
/* The change box's hint (#7803 #7878): one quiet line under the box while the
|
|
830
896
|
person types, in the queue note's muted voice, whose button is the second door. */
|
|
831
897
|
[data-vibe-menu] .vm-door-line {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState, useEffect, useMemo, useRef, useCallback } from "react";
|
|
2
2
|
import { useFireproof, imgGen as defaultImgGen, confirmedMediaProbe as defaultConfirmedMediaProbe, useVibeContext, getRegisteredVibeApi, vibe, decorateFiles, IMG_GEN_SOURCE_UNUSABLE, } from "@vibes.diy/vibe-runtime";
|
|
3
|
-
import { IMG_GEN_CANCELLED, IMG_GEN_NEEDS_TAP, IMG_GEN_UNREACHABLE, IMG_GEN_UNREACHABLE_MESSAGE, isImgGenPaused, isImgGenMadeElsewhere, buildMediaPointerDoc, buildMediaVersionDoc, mediaDbName, mediaPointerDocId, mediaVersionDocId, } from "@vibes.diy/vibe-types";
|
|
3
|
+
import { IMG_GEN_CANCELLED, IMG_GEN_NEEDS_TAP, IMG_GEN_UNREACHABLE, IMG_GEN_UNREACHABLE_MESSAGE, isImgGenPaused, isImgGenMadeElsewhere, isImgGenLost, IMG_GEN_LOST_RETRY_MS, buildMediaPointerDoc, buildMediaVersionDoc, mediaDbName, mediaPointerDocId, mediaVersionDocId, } from "@vibes.diy/vibe-types";
|
|
4
4
|
import { exception2Result, Result } from "@adviser/cement";
|
|
5
5
|
import { type } from "arktype";
|
|
6
6
|
import { registeredLocalFileUrl, registeredPictureStore } from "./local-pictures.js";
|
|
@@ -283,6 +283,7 @@ export function useImgGen(opts) {
|
|
|
283
283
|
const playgroundModeRef = useRef(false);
|
|
284
284
|
const tapSpentRef = useRef(undefined);
|
|
285
285
|
const playgroundSpentKeyRef = useRef(undefined);
|
|
286
|
+
const lostKeyRef = useRef(undefined);
|
|
286
287
|
const currentGenRef = useRef(null);
|
|
287
288
|
const failedGenRef = useRef(null);
|
|
288
289
|
const probeInFlightRef = useRef(null);
|
|
@@ -618,6 +619,15 @@ export function useImgGen(opts) {
|
|
|
618
619
|
setDocument(existingDoc);
|
|
619
620
|
return;
|
|
620
621
|
}
|
|
622
|
+
if (lostKeyRef.current === failKey) {
|
|
623
|
+
if (existingDoc)
|
|
624
|
+
setDocument(existingDoc);
|
|
625
|
+
setPending(false);
|
|
626
|
+
setLoading(false);
|
|
627
|
+
setPaused({ retryAfterMs: IMG_GEN_LOST_RETRY_MS, lost: true });
|
|
628
|
+
currentGenRef.current = null;
|
|
629
|
+
return;
|
|
630
|
+
}
|
|
621
631
|
const leaseKey = `${mediaDbName(dbName)}\u0000${hostDocId}\u0000${myHandle}`;
|
|
622
632
|
if (unmountSignalRef.current.aborted)
|
|
623
633
|
return;
|
|
@@ -733,6 +743,22 @@ export function useImgGen(opts) {
|
|
|
733
743
|
releaseLease();
|
|
734
744
|
return decide(rRead.Ok(), legacyDoc, false);
|
|
735
745
|
}
|
|
746
|
+
if (isImgGenLost(pausedErr)) {
|
|
747
|
+
lostKeyRef.current = failKey;
|
|
748
|
+
setLoading(false);
|
|
749
|
+
setPending(true);
|
|
750
|
+
const rRead = await exception2Result(loadMediaDocs);
|
|
751
|
+
if (unmountSignalRef.current.aborted || currentGenRef.current !== genKey)
|
|
752
|
+
return;
|
|
753
|
+
releaseLease();
|
|
754
|
+
if (rRead.isErr()) {
|
|
755
|
+
setPending(false);
|
|
756
|
+
setPaused({ retryAfterMs: IMG_GEN_LOST_RETRY_MS, lost: true });
|
|
757
|
+
currentGenRef.current = null;
|
|
758
|
+
return;
|
|
759
|
+
}
|
|
760
|
+
return decide(rRead.Ok(), legacyDoc, false);
|
|
761
|
+
}
|
|
736
762
|
if (isImgGenPaused(pausedErr)) {
|
|
737
763
|
setPaused({ retryAfterMs: pausedErr.retryAfterMs });
|
|
738
764
|
setLoading(false);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibes.diy/base",
|
|
3
|
-
"version": "14.3.
|
|
3
|
+
"version": "14.3.453",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@adviser/cement": "~0.5.37",
|
|
12
12
|
"@emotion/css": "~11.13.5",
|
|
13
|
-
"@vibes.diy/api-types": "14.3.
|
|
14
|
-
"@vibes.diy/use-vibes-types": "14.3.
|
|
15
|
-
"@vibes.diy/vibe-runtime": "14.3.
|
|
16
|
-
"@vibes.diy/vibe-types": "14.3.
|
|
13
|
+
"@vibes.diy/api-types": "14.3.453",
|
|
14
|
+
"@vibes.diy/use-vibes-types": "14.3.453",
|
|
15
|
+
"@vibes.diy/vibe-runtime": "14.3.453",
|
|
16
|
+
"@vibes.diy/vibe-types": "14.3.453",
|
|
17
17
|
"arktype": "~2.2.10",
|
|
18
18
|
"officeparser": "~8.9.0",
|
|
19
19
|
"qrcode-generator": "~2.0.4",
|