@oxy.so/app-preset 6.5.0 → 6.6.0
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 +34 -2
- package/babel/index.js +1 -1
- package/css/document-scroll.css +9 -0
- package/package.json +3 -2
- package/plugin/withOxyAppPreset.js +5 -4
package/README.md
CHANGED
|
@@ -419,8 +419,12 @@ module.exports = require('@oxy.so/app-preset/babel');
|
|
|
419
419
|
In development this is exactly `babel-preset-expo`. Expo's oxc transformer,
|
|
420
420
|
Noxcturnal, runs only when the Babel config resolves to the bare Expo preset;
|
|
421
421
|
one extra plugin or preset option sends every file back to Babel. The config
|
|
422
|
-
plugin
|
|
423
|
-
|
|
422
|
+
plugin leaves the experiment (`experiments.noxcturnalTransformWorker`) unset by
|
|
423
|
+
default, following Expo's Babel default. Noxcturnal 0.1.11 with Expo Metro 58.0.21
|
|
424
|
+
miscompiles a derived class with a private field and private method, causing
|
|
425
|
+
TanStack Query 5.103.3 observers to throw during Nilo startup. `noxcturnal: true`
|
|
426
|
+
opts into the experimental development transformer; `false` leaves it unset.
|
|
427
|
+
An explicit app experiment keeps its own value. Preset-managed production builds stay on Babel,
|
|
424
428
|
with the build-id inliner, because Noxcturnal keeps the requires of dead
|
|
425
429
|
platform branches and pulls native-only packages into a web bundle.
|
|
426
430
|
|
|
@@ -485,3 +489,31 @@ Requires **Expo SDK 56+**; validated against **Expo SDK 58 / React Native 0.88**
|
|
|
485
489
|
uses `proguard-android-optimize.txt` and turns R8 on through `gradle.properties`
|
|
486
490
|
(`android.enableMinifyInReleaseBuilds`), so the preset's `-optimize` ProGuard
|
|
487
491
|
swap only changes anything on SDK 56/57.
|
|
492
|
+
|
|
493
|
+
### Web document scrolling versus a bounded host
|
|
494
|
+
|
|
495
|
+
The document-scroll stylesheet is available from app-preset 6.6.0.
|
|
496
|
+
|
|
497
|
+
The base stylesheet preserves Expo's bounded host: `body` cannot scroll and a
|
|
498
|
+
bounded `ScrollView`/Bloom `Screen` owns its region. Keep that default for apps
|
|
499
|
+
whose routes fit the viewport.
|
|
500
|
+
|
|
501
|
+
For an application that uses document flow (for example Bloom `AppShell
|
|
502
|
+
scroll="page"` with `panelLayout.flow="document"`), explicitly import the host
|
|
503
|
+
recipe after the base in the app's `global.css`:
|
|
504
|
+
|
|
505
|
+
```css
|
|
506
|
+
@import "@oxy.so/app-preset/base.css";
|
|
507
|
+
@import "@oxy.so/app-preset/css/document-scroll.css";
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
This enables body overflow without changing the root's height or removing Expo's
|
|
511
|
+
reset. Bounded regions can still own their own scroll inside that host; do not add
|
|
512
|
+
an outer `ScrollView` around a document-owning Screen. This CSS only configures
|
|
513
|
+
the web host; native scroll remains owned by the native Screen/ScrollView.
|
|
514
|
+
|
|
515
|
+
Configure this in the stylesheet, not only in a custom `+html.tsx`: Expo's
|
|
516
|
+
`web.output="single"` export uses its default HTML and does not render that custom
|
|
517
|
+
document. Static output must keep its script/style `headNodes` and `bodyNodes`.
|
|
518
|
+
The generated scaffold defaults to a bounded host. Changing the host permission
|
|
519
|
+
is separate from choosing the scroll owner for each route.
|
package/babel/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* In development the config is exactly `babel-preset-expo`, nothing else.
|
|
5
5
|
* Expo's oxc transformer (Noxcturnal, `experiments.noxcturnalTransformWorker`,
|
|
6
|
-
*
|
|
6
|
+
* enabled explicitly with `noxcturnal: true`) runs only when the project's Babel
|
|
7
7
|
* config resolves to the bare Expo preset; one extra plugin or preset option
|
|
8
8
|
* sends every file back to Babel. Everything the config used to add is covered
|
|
9
9
|
* without it in SDK 58: `babel-preset-expo` adds `react-native-worklets/plugin`
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* Explicit web host opt-in for document-owned scrolling (for example Bloom
|
|
2
|
+
* AppShell scroll="page"). Expo's default reset intentionally disables body
|
|
3
|
+
* scrolling for bounded ScrollViews. Keep that default in base.css; import this
|
|
4
|
+
* stylesheet only when the application's host allows document flow.
|
|
5
|
+
* The selector beats Expo's body reset regardless of stylesheet order. Retain
|
|
6
|
+
* root/viewport geometry so bounded screens keep their existing scroll owner. */
|
|
7
|
+
html body {
|
|
8
|
+
overflow: auto;
|
|
9
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxy.so/app-preset",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.6.0",
|
|
4
4
|
"description": "The Oxy distro of Expo — centralized Expo config plugin, Metro/Babel/ESLint factories, Tailwind base CSS and TypeScript bases shared by every Oxy app (Mention, Homiio, Allo, accounts, …). A zero-build package: apps replace copy-pasted config with a single dependency bump.",
|
|
5
5
|
"main": "./app.plugin.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
"./tsconfig/base.json": "./tsconfig/base.json",
|
|
29
29
|
"./tsconfig/frontend.json": "./tsconfig/frontend.json",
|
|
30
30
|
"./tsconfig/backend.json": "./tsconfig/backend.json",
|
|
31
|
-
"./package.json": "./package.json"
|
|
31
|
+
"./package.json": "./package.json",
|
|
32
|
+
"./css/document-scroll.css": "./css/document-scroll.css"
|
|
32
33
|
},
|
|
33
34
|
"files": [
|
|
34
35
|
"NOTICE",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* ios: { deploymentTarget: '17.0' }, // false → skip iOS build properties
|
|
20
20
|
* android: { targetSdkVersion: 34 }, // false → skip Android build properties
|
|
21
21
|
* webgpu: true, // opt-in: react-native-webgpu's config plugin
|
|
22
|
-
* noxcturnal:
|
|
22
|
+
* noxcturnal: true, // opt in of Expo's oxc transformer in development
|
|
23
23
|
* }]
|
|
24
24
|
*
|
|
25
25
|
* Android never gets `android:sharedUserId`: each Oxy app has its own UID and
|
|
@@ -52,9 +52,10 @@
|
|
|
52
52
|
* @param {boolean} [options.webgpu=false] Apply `react-native-webgpu`'s
|
|
53
53
|
* config plugin (an app drawing with WebGPU on native). Needs
|
|
54
54
|
* `react-native-webgpu` installed in the app.
|
|
55
|
-
* @param {boolean} [options.noxcturnal=
|
|
55
|
+
* @param {boolean} [options.noxcturnal=false] Bundle development builds with
|
|
56
56
|
* Noxcturnal, Expo's oxc transformer (`experiments.noxcturnalTransformWorker`),
|
|
57
|
-
*
|
|
57
|
+
* disabled by default: private-field lowering can break dependency code.
|
|
58
|
+
* It only runs when the app's
|
|
58
59
|
* Babel config is the preset's (or none), and never in a production build: it
|
|
59
60
|
* keeps the requires of dead platform branches, pulling native-only packages
|
|
60
61
|
* into a web bundle. The Expo CLI sets NODE_ENV before it reads the config.
|
|
@@ -84,7 +85,7 @@ module.exports = function withOxyAppPreset(config, options = {}) {
|
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
87
|
|
|
87
|
-
const { keychainGroup, ios = {}, android = {}, webgpu = false, noxcturnal =
|
|
88
|
+
const { keychainGroup, ios = {}, android = {}, webgpu = false, noxcturnal = false } = options;
|
|
88
89
|
|
|
89
90
|
let next = config;
|
|
90
91
|
|