@simon-says-build/demo-player 0.14.1 → 0.14.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/package.json +9 -3
- package/src/DemoHost.js +12 -2
- package/src/core.js +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simon-says-build/demo-player",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"description": "SimonSays mobile demo player: walks a preview's viewer through a job's change, inside the app. Renders nothing unless the bundle carries a demo.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,10 +18,16 @@
|
|
|
18
18
|
],
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"react": ">=18",
|
|
21
|
-
"react-native": ">=0.76"
|
|
21
|
+
"react-native": ">=0.76",
|
|
22
|
+
"react-native-screens": ">=3"
|
|
22
23
|
},
|
|
23
24
|
"scripts": {
|
|
24
25
|
"test": "node --test test/*.test.mjs"
|
|
25
26
|
},
|
|
26
|
-
"license": "UNLICENSED"
|
|
27
|
+
"license": "UNLICENSED",
|
|
28
|
+
"peerDependenciesMeta": {
|
|
29
|
+
"react-native-screens": {
|
|
30
|
+
"optional": true
|
|
31
|
+
}
|
|
32
|
+
}
|
|
27
33
|
}
|
package/src/DemoHost.js
CHANGED
|
@@ -15,7 +15,15 @@
|
|
|
15
15
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
16
16
|
import { Linking, NativeModules, Platform, Settings, Pressable, ScrollView, StyleSheet, Text, TextInput, View, useWindowDimensions } from 'react-native';
|
|
17
17
|
import { pageName } from './page-name.js';
|
|
18
|
-
|
|
18
|
+
// ABOVE NATIVE SHEETS (0.14.2, 2026-11-07): a profile that opens as a native
|
|
19
|
+
// sheet (react-native-screens formSheet) covered the card, so Connie Ho's review
|
|
20
|
+
// lost its card at "tap her photo" (demo 16D4S5HqugIonvUSdC5u). On iOS the
|
|
21
|
+
// overlay draws in react-native-screens' FullWindowOverlay — a window above the
|
|
22
|
+
// app's own, sheets and modals included; taps outside the card still reach the
|
|
23
|
+
// app (box-none). An app without react-native-screens keeps the in-tree layer.
|
|
24
|
+
let FullWindowOverlay = null;
|
|
25
|
+
try { FullWindowOverlay = require('react-native-screens').FullWindowOverlay || null; } catch { FullWindowOverlay = null; }
|
|
26
|
+
import { OVERLAY_ID, overlayLayer, chapterOf, cardBox, pinnedBox, setTuckedDemo, overlayAnnounced, tapInside, currentDemo, demoConfig, findTarget, handlerFor, introBody, introOf, onDemo, phoneSteps, playDemo, releaseOf, reviewChangesOf, scalePoint, rescueNote, screenCandidates, stepTitle, targetOfKey } from './core.js';
|
|
19
27
|
import { demoApi, tourOf } from './api.js';
|
|
20
28
|
import { signInFirst, openInApp } from './signin.js';
|
|
21
29
|
import { runEvent, fillStep } from './events.js';
|
|
@@ -362,7 +370,9 @@ function Player({ config, router, insets, onClose, children }) {
|
|
|
362
370
|
};
|
|
363
371
|
return h(View, { ref: rootRef, style: s.root, collapsable: false, onTouchEnd },
|
|
364
372
|
children,
|
|
365
|
-
|
|
373
|
+
overlayLayer(Platform.OS, FullWindowOverlay) === 'window'
|
|
374
|
+
? h(FullWindowOverlay, null, h(View, { pointerEvents: 'box-none', style: StyleSheet.absoluteFill, testID: OVERLAY_ID }, overlay))
|
|
375
|
+
: h(View, { pointerEvents: 'box-none', style: StyleSheet.absoluteFill, testID: OVERLAY_ID }, overlay));
|
|
366
376
|
}
|
|
367
377
|
|
|
368
378
|
// The review card: every change of the demo, each approved here or discussed
|
package/src/core.js
CHANGED
|
@@ -10,7 +10,7 @@ import { bubbleBox } from './step-place.js';
|
|
|
10
10
|
// What this player is, said when the app registers for "Ready to see"
|
|
11
11
|
// (packages/ssb-overlay sends it; functions/in-app-notify.mjs clientOf). Kept
|
|
12
12
|
// equal to package.json by test/core.test.mjs.
|
|
13
|
-
export const PLAYER_VERSION = '0.14.
|
|
13
|
+
export const PLAYER_VERSION = '0.14.2';
|
|
14
14
|
|
|
15
15
|
export const HOST = 5;
|
|
16
16
|
export const TEXT = 6;
|
|
@@ -205,6 +205,10 @@ export function cardBox(place, at, screen, insets, card) {
|
|
|
205
205
|
// pinned at the TOP stays left of it; one pinned at the bottom is full width.
|
|
206
206
|
export const DEV_FAB_CLEAR = 88;
|
|
207
207
|
|
|
208
|
+
// Where the overlay draws (0.14.2): iOS with react-native-screens → its own
|
|
209
|
+
// window above sheets and modals (DemoHost, FullWindowOverlay); else in-tree.
|
|
210
|
+
export const overlayLayer = (os, fwo) => (os === 'ios' && fwo ? 'window' : 'tree');
|
|
211
|
+
|
|
208
212
|
export function pinnedBox(at, screen, insets, card) {
|
|
209
213
|
const left = 12, full = screen.width - 24;
|
|
210
214
|
const top = insets.top + 8;
|