@simon-says-build/ssb-overlay 0.9.0 → 0.9.1
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/package.json +1 -1
- package/src/SsbHost.js +7 -1
- package/src/core.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simon-says-build/ssb-overlay",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "SSB inside a native app SimonSays controls: the SSB button for the people who change the app (screenshot, mark, ask for a change), and Help for everyone who uses it.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
package/src/SsbHost.js
CHANGED
|
@@ -132,6 +132,7 @@ function Host({ config, getToken, sessionKey, route, capture, storage, pushToken
|
|
|
132
132
|
const [mode, setMode] = useState('idle'); // idle | sheet | drawing | capturing
|
|
133
133
|
const [shot, setShot] = useState(null); // the screen as it was when the button was tapped
|
|
134
134
|
const [items, setItems] = useState([]); // what is drawn: strokes and boxes, in screen points (core.js)
|
|
135
|
+
const [openShot, setOpenShot] = useState(null); // the message whose full screen is showing (its preview otherwise)
|
|
135
136
|
const [live, setLive] = useState(null); // the item under the finger
|
|
136
137
|
const liveRef = useRef(null);
|
|
137
138
|
const [tool, setTool] = useState('pencil'); // pencil | box
|
|
@@ -626,7 +627,11 @@ function Panel({ gate, chat, work, elsewhere, onDemo, screen, insets, draft, set
|
|
|
626
627
|
h(BottomSheetScrollView, { ref: scroll, style: s.thread, contentContainerStyle: { paddingTop: 8, paddingBottom: footH + 8 }, keyboardShouldPersistTaps: 'handled', onContentSizeChange: () => scroll.current?.scrollToEnd({ animated: true }) },
|
|
627
628
|
msgs.length ? null : h(Text, { style: s.empty }, 'Say what should change on this screen, or tap Draw to scribble on it.'),
|
|
628
629
|
...msgs.map((m) => h(View, { key: m.id, style: [s.bubble, m.role === 'user' ? s.mine : s.theirs] },
|
|
629
|
-
|
|
630
|
+
// The marked part as the preview; a tap shows the full screen
|
|
631
|
+
// (2026-10-23, functions/shot-crop.mjs — the console and the
|
|
632
|
+
// extension do the same).
|
|
633
|
+
m.image ? h(Pressable, { onPress: () => setOpenShot(openShot === m.id ? null : m.id), accessibilityRole: 'imagebutton', accessibilityLabel: openShot === m.id ? 'Show the marked part' : 'Show the full screen' },
|
|
634
|
+
h(Image, { source: { uri: openShot === m.id || !m.preview ? m.image : m.preview }, style: openShot === m.id ? s.shotFull : s.thumb, resizeMode: 'contain' })) : null,
|
|
630
635
|
h(Text, { style: m.role === 'user' ? s.mineText : s.theirsText }, m.text),
|
|
631
636
|
m.id === offer ? h(Pressable, { onPress: onStartAll, disabled: busy, style: [s.primary, { marginTop: 8, alignSelf: 'flex-start' }] }, h(Text, { style: s.primaryText }, 'Confirm and start work')) : null)),
|
|
632
637
|
chat?.thinking ? h(View, { style: [s.bubble, s.theirs, s.row] }, h(ActivityIndicator, { size: 'small', color: MUTED }), h(Text, { style: [s.theirsText, { marginLeft: 8 }] }, 'SSB is thinking…')) : null,
|
|
@@ -707,6 +712,7 @@ const s = StyleSheet.create({
|
|
|
707
712
|
mineText: { color: '#fff', fontSize: 15, lineHeight: 21 },
|
|
708
713
|
theirsText: { color: TEXT, fontSize: 15, lineHeight: 21 },
|
|
709
714
|
thumb: { width: 140, height: 220, borderRadius: 8, marginBottom: 6, backgroundColor: '#0006' },
|
|
715
|
+
shotFull: { width: 260, height: 460, borderRadius: 8, marginBottom: 6, backgroundColor: '#0006' },
|
|
710
716
|
error: { color: RED, fontSize: 13, paddingHorizontal: 16, paddingTop: 6 },
|
|
711
717
|
composer: { paddingHorizontal: 12, paddingTop: 10, borderTopWidth: 1, borderTopColor: LINE, backgroundColor: SURFACE },
|
|
712
718
|
input: { minHeight: 44, maxHeight: 120, fontSize: 16, color: TEXT, backgroundColor: BG, borderWidth: 1, borderColor: LINE, borderRadius: 14, paddingHorizontal: 13, paddingTop: 11, paddingBottom: 11 },
|
package/src/core.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
export const DEFAULT_API = 'https://simonsays.build';
|
|
6
6
|
// What this overlay is, said when it registers for pushes (clientInfo below).
|
|
7
7
|
// Kept equal to package.json by test/core.test.mjs.
|
|
8
|
-
export const OVERLAY_VERSION = '0.9.
|
|
8
|
+
export const OVERLAY_VERSION = '0.9.1';
|
|
9
9
|
export const HOST = 5;
|
|
10
10
|
export const TEXT = 6;
|
|
11
11
|
const PIN_SLOP = 12; // a drag shorter than this is a tap: a pin, not a box
|