@simon-says-build/ssb-overlay 0.9.2 → 0.9.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simon-says-build/ssb-overlay",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
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
@@ -519,8 +519,11 @@ function Host({ config, getToken, sessionKey, route, capture, storage, pushToken
519
519
  accessibilityLabel: t === 'box' ? 'Box: drag a box round it' : 'Pencil: scribble on it', style: [s.toolBtn, tool === t && s.toolOn],
520
520
  }, h(Text, { style: [s.toolText, tool === t && s.toolTextOn] }, t === 'box' ? '▭ Box' : '✎ Pencil'))),
521
521
  h(View, { style: s.hintSep }),
522
- items.length ? h(Pressable, { onPress: () => setItems((all) => all.slice(0, -1)), accessibilityRole: 'button', accessibilityLabel: 'Undo the last one', style: s.hintBtn }, h(Text, { style: s.hintLink }, 'Undo')) : null,
523
- h(Pressable, { onPress: stopDrawing, accessibilityRole: 'button', accessibilityLabel: 'Stop drawing', style: s.hintBtn }, h(Text, { style: s.hintLink }, 'Cancel'))),
522
+ // Undo and Cancel are buttons, always there (Michael, 2026-10-26: two
523
+ // small links, Undo only after a mark, read as missing). Undo takes
524
+ // the last mark off; Cancel drops them all and goes back to the panel.
525
+ h(Pressable, { testID: 'ssb-draw-undo', onPress: () => setItems((all) => all.slice(0, -1)), disabled: !items.length, accessibilityRole: 'button', accessibilityLabel: 'Undo the last one', accessibilityState: { disabled: !items.length }, style: [s.hintBtn, !items.length && s.disabled] }, h(Text, { style: s.hintBtnText }, '↶ Undo')),
526
+ h(Pressable, { testID: 'ssb-draw-cancel', onPress: stopDrawing, accessibilityRole: 'button', accessibilityLabel: 'Stop drawing', style: [s.hintBtn, s.hintCancel] }, h(Text, { style: s.hintBtnText }, '✕ Cancel'))),
524
527
  top != null ? h(View, { style: [s.field, { top }] },
525
528
  h(TextInput, {
526
529
  testID: 'ssb-draw-note', value: note, onChangeText: setNote, placeholder: 'What should change here?',
@@ -700,8 +703,9 @@ const s = StyleSheet.create({
700
703
  toolText: { color: TEXT, fontSize: 14, fontWeight: '600' },
701
704
  toolTextOn: { color: '#fff' },
702
705
  hintSep: { width: 1, height: 18, backgroundColor: LINE, marginHorizontal: 6 },
703
- hintLink: { color: '#8fb3ff', fontSize: 14, fontWeight: '600' },
704
- hintBtn: { paddingHorizontal: 6, paddingVertical: 2 },
706
+ hintBtn: { paddingVertical: 5, paddingHorizontal: 10, borderRadius: 12, marginLeft: 4, borderWidth: 1, borderColor: LINE, backgroundColor: SURFACE },
707
+ hintCancel: { borderColor: 'rgba(255,77,90,0.5)' },
708
+ hintBtnText: { color: TEXT, fontSize: 14, fontWeight: '600' },
705
709
  field: { position: 'absolute', left: 12, right: 12, height: 56, flexDirection: 'row', alignItems: 'center', paddingLeft: 14, paddingRight: 6, borderRadius: 16, backgroundColor: SURFACE, borderWidth: 1, borderColor: LINE, ...shadow },
706
710
  fieldInput: { flex: 1, fontSize: 16, color: TEXT },
707
711
  sendRound: { width: 40, height: 40, borderRadius: 20, backgroundColor: BLUE, alignItems: 'center', justifyContent: 'center', marginLeft: 4, ...glow(BLUE, 10) },
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.2';
8
+ export const OVERLAY_VERSION = '0.9.3';
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