create-octane-xplat 0.10.0 → 0.11.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-octane-xplat",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Scaffold a minimal @octane-xplat/ui app — one Octane codebase for web + iOS + Android",
5
5
  "keywords": [
6
6
  "create",
package/scaffold.mjs CHANGED
@@ -74,6 +74,7 @@ export const targets = {
74
74
  '@nativescript-community/ui-drawer',
75
75
  '@nativescript/core',
76
76
  '@octane-xplat/effects',
77
+ '@octane-xplat/image',
77
78
  '@valor/nativescript-websockets',
78
79
  ],
79
80
  devDeps: [
@@ -25,12 +25,35 @@ export function Welcome() {
25
25
  | Tap | `Pressable`, `Button`, `Link`, `NavLink` |
26
26
  | Input | `TextInput`, `TextArea`, `Switch`, `Slider` |
27
27
  | Scrolling | `ScrollableArea`, `VirtualList` |
28
- | Media | `Image`, `Icon` |
28
+ | Media | `Image` (see note), `Icon` |
29
29
  | Feedback | `Spinner`, `Meter`, `showToast` |
30
30
  | Overlays | `BottomSheet`, `Overlay`, `Popover`, `Drawer`, `HoverCard`, `Tooltip` |
31
31
  | Shells | `Screen`, `Tabs` |
32
32
  | Theme and measurement | `useColorScheme`, `useSafeAreaInsets`, `useMeasure` |
33
33
 
34
+ For images, prefer the `Image` from `@octane-xplat/image` — it has the exact
35
+ same props as `@octane-xplat/ui`'s `Image` but loads through a real image
36
+ engine on native (Glide on Android, SDWebImage on iOS) with a sized memory +
37
+ disk cache and decode-to-view-size, instead of the 5 MB cache in the core
38
+ component that evicts visible images mid-scroll. Apps scaffolded with iOS or
39
+ Android targets already have the package; a web-only app renders a plain
40
+ `<img>` either way, so `pnpm add @octane-xplat/image` is optional there. Core
41
+ `Image` remains the baseline for SVG sources, which the engine cannot decode.
42
+
43
+ ```tsrx
44
+ import { Image } from '@octane-xplat/image'
45
+
46
+ export function TripPhoto() {
47
+ return <Image
48
+ src="https://picsum.photos/seed/trail/800/450"
49
+ alt="Trailhead"
50
+ contentFit="cover"
51
+ placeholder="blurhash:LEHV6nWB2yk8pyo0adR*.7kCMdnj"
52
+ style={{ width: '100%', height: 180 }}
53
+ />
54
+ }
55
+ ```
56
+
34
57
  `ScrollableArea` scrolls a bounded set of children. For a long list, use
35
58
  `VirtualList` so the app does not mount every row at once.
36
59
 
@@ -20,9 +20,10 @@
20
20
  "@nativescript-community/octane": "0.2.4",
21
21
  "@nativescript-community/ui-drawer": "0.1.32",
22
22
  "@nativescript/core": "9.1.2",
23
- "@octane-xplat/effects": "^0.10.0",
24
- "@octane-xplat/platform": "^0.10.0",
25
- "@octane-xplat/ui": "^0.10.0",
23
+ "@octane-xplat/effects": "^0.11.0",
24
+ "@octane-xplat/image": "^0.11.0",
25
+ "@octane-xplat/platform": "^0.11.0",
26
+ "@octane-xplat/ui": "^0.11.0",
26
27
  "@valor/nativescript-websockets": "2.0.3",
27
28
  "octane": "0.6.3"
28
29
  },
@@ -32,8 +33,8 @@
32
33
  "@nativescript/ios": "9.1.0",
33
34
  "@nativescript/types": "9.0.0",
34
35
  "@nativescript/vite": "8.0.17",
35
- "@octane-xplat/cli": "^0.10.0",
36
- "@octane-xplat/lint": "^0.10.0",
36
+ "@octane-xplat/cli": "^0.11.0",
37
+ "@octane-xplat/lint": "^0.11.0",
37
38
  "@octanejs/vite-plugin": "0.1.61",
38
39
  "@tsrx/typescript-plugin": "0.4.11",
39
40
  "nativescript": "9.1.1",
@@ -72,7 +72,10 @@ patchedDependencies:
72
72
  # so `.mobile` leaves resolve under mapped imports and `ns build`. Served `/node_modules/`
73
73
  # tails now also scan pnpm's `.pnpm` store and `link:`/`file:`/`portal:` dep roots — a
74
74
  # linked package's transitive deps (e.g. @iconify/utils under @octane-xplat/icons) resolve
75
- # nowhere else and 404 the dev session.
75
+ # nowhere else and 404 the dev session. findMonorepoWorkspaceRoot no longer treats a lone
76
+ # turbo.json as a workspace root — Turborepo's per-package task configs marked apps/* as
77
+ # roots, masking the real pnpm root so served `/node_modules/` tails never reached the
78
+ # `.pnpm` store scan and non-hoisted transitive deps like source-map-js 404'd dev boot.
76
79
  "@nativescript/vite@8.0.17": node_modules/.pnpm-config/@octane-xplat/patches/patches/@nativescript__vite@8.0.17.patch
77
80
  # Driver setProp skips `undefined` writes — NativeScript native setters coerce it (e.g.
78
81
  # editable → ios.userInteractionEnabled = NO), leaving dead UI that still has its JS
@@ -108,5 +111,17 @@ patchedDependencies:
108
111
  # boot). Same fix as linkifyjs: try/catch new RegExp with an ASCII-range fallback — the
109
112
  # matcher only feeds autolink, which native doesn't use.
110
113
  "@lexical/link@0.51.0": node_modules/.pnpm-config/@octane-xplat/patches/patches/@lexical__link@0.51.0.patch
114
+ # ui-image 5.x regressed two iOS prefetch behaviors the 4.x line shipped (still present in
115
+ # 4.6.20): prefetchToCacheType ignores its cacheType argument — SDWebImagePrefetcher's
116
+ # default context stores to disk+memory either way, so a 'disk' prefetch also decodes and
117
+ # warms memory, diverging from Android's bytes-only Glide downloadOnly — and
118
+ # getContextFromOptions drops PrefetchOptions.headers because it never sets
119
+ # SDWebImageContextDownloadRequestModifier, so prefetch({headers}) silently sends no
120
+ # headers on iOS while Android's CustomGlideUrl forwards them. Ports upstream's own 4.x
121
+ # implementation — SDWebImageContextStoreCacheType on the prefetch context plus the
122
+ # request-modifier branch in getContextFromOptions — and additionally sets
123
+ # SDWebImageContextOriginalStoreCacheType so a memory prefetch does not spill original
124
+ # bytes to disk.
125
+ "@nativescript-community/ui-image@5.0.17": node_modules/.pnpm-config/@octane-xplat/patches/patches/@nativescript-community__ui-image@5.0.17.patch
111
126
  configDependencies:
112
- "@octane-xplat/patches": 0.10.0
127
+ "@octane-xplat/patches": 0.11.0