create-octane-xplat 0.9.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/README.md +18 -3
- package/index.mjs +106 -16
- package/package.json +8 -1
- package/scaffold.mjs +532 -0
- package/template/.agents/skills/xplat/SKILL.md +107 -38
- package/template/.agents/skills/xplat/references/components.md +172 -96
- package/template/.agents/skills/xplat/references/navigation.md +81 -31
- package/template/.agents/skills/xplat/references/platform.md +74 -39
- package/template/.agents/skills/xplat/references/styling.md +80 -27
- package/template/package.json +6 -5
- package/template/pnpm-workspace.yaml +36 -7
- package/template/src/App.tsrx +5 -5
- package/template/src/style.css +24 -6
- package/template/vite.config.native.mts +3 -2
package/template/package.json
CHANGED
|
@@ -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.
|
|
24
|
-
"@octane-xplat/
|
|
25
|
-
"@octane-xplat/
|
|
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.
|
|
36
|
-
"@octane-xplat/lint": "^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",
|
|
@@ -25,9 +25,13 @@ patchedDependencies:
|
|
|
25
25
|
# ownership, read tracking, and local signal hooks; JSX prop lowering and __methodDep
|
|
26
26
|
# already ship upstream. Routes uncaught universal event-handler errors to onUncaughtError
|
|
27
27
|
# when configured. Pins instance signal/query declarations to their declaring owner so
|
|
28
|
-
# child reads and event handlers share one request.
|
|
29
|
-
#
|
|
30
|
-
#
|
|
28
|
+
# child reads and event handlers share one request. Makes universal useImperativeHandle
|
|
29
|
+
# honor optional refs, ref replacement, nested ref arrays, and callback cleanup. Also
|
|
30
|
+
# allows async and generator helpers that are not components in universal compiler
|
|
31
|
+
# modules, while preserving errors when those functions are used as components
|
|
32
|
+
# (octanejs/octane#1469). Adds renderer-owned Children.toArray/map for transparent
|
|
33
|
+
# deferred JSX groups, plan ranges/slots and arrays, preserving keyed wrapper identity
|
|
34
|
+
# while leaving scoped owners intact.
|
|
31
35
|
octane@0.6.3: node_modules/.pnpm-config/@octane-xplat/patches/patches/octane@0.6.3.patch
|
|
32
36
|
# FlexboxLayout getChildMeasureSpec subtracts the child's own padding where AOSP subtracts
|
|
33
37
|
# parent padding + child margins — a column-stretched row re-measurement clamps padded
|
|
@@ -65,12 +69,19 @@ patchedDependencies:
|
|
|
65
69
|
# beside the universal one (hooks crash on boot, octane-xplat#3) — an onResolve plugin
|
|
66
70
|
# redirects `octane` → `octane/universal/native`. tsconfig-paths and the generated
|
|
67
71
|
# build-time checker moduleSuffixes also need the `.mobile` tier for iOS/Android/visionOS
|
|
68
|
-
# so `.mobile` leaves resolve under mapped imports and `ns build`.
|
|
72
|
+
# so `.mobile` leaves resolve under mapped imports and `ns build`. Served `/node_modules/`
|
|
73
|
+
# tails now also scan pnpm's `.pnpm` store and `link:`/`file:`/`portal:` dep roots — a
|
|
74
|
+
# linked package's transitive deps (e.g. @iconify/utils under @octane-xplat/icons) resolve
|
|
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.
|
|
69
79
|
"@nativescript/vite@8.0.17": node_modules/.pnpm-config/@octane-xplat/patches/patches/@nativescript__vite@8.0.17.patch
|
|
70
80
|
# Driver setProp skips `undefined` writes — NativeScript native setters coerce it (e.g.
|
|
71
81
|
# editable → ios.userInteractionEnabled = NO), leaving dead UI that still has its JS
|
|
72
|
-
# listeners.
|
|
73
|
-
#
|
|
82
|
+
# listeners. Aligns intrinsic ref types with Octane callback cleanup and nested arrays
|
|
83
|
+
# with optional entries. Advertises the implemented visibility capability so committed
|
|
84
|
+
# suspense bodies can be retained while pending.
|
|
74
85
|
"@nativescript-community/octane@0.2.4": node_modules/.pnpm-config/@octane-xplat/patches/patches/@nativescript-community__octane@0.2.4.patch
|
|
75
86
|
# octaneServerStrategy's SCRIPT_FILE_RE only covers [jt]sx? — .tsrx edits never emit the
|
|
76
87
|
# deferred ns:hmr-delta broadcast, so component HMR silently never reaches the device.
|
|
@@ -94,5 +105,23 @@ patchedDependencies:
|
|
|
94
105
|
# unreachable. Adds a module-local process declaration for typecheck and merges the
|
|
95
106
|
# Context.ts definitions into Context.tsrx.
|
|
96
107
|
"@octanejs/tiptap@0.0.51": node_modules/.pnpm-config/@octane-xplat/patches/patches/@octanejs__tiptap@0.0.51.patch
|
|
108
|
+
# @lexical/link declares a /\p{L}\p{N}/u URL matcher as a regex literal at module scope;
|
|
109
|
+
# NativeScript's embedded V8 builds without ICU, so the literal throws SyntaxError at
|
|
110
|
+
# parse time and poisons the whole bundle (any bundled app importing @lexical/link dies on
|
|
111
|
+
# boot). Same fix as linkifyjs: try/catch new RegExp with an ASCII-range fallback — the
|
|
112
|
+
# matcher only feeds autolink, which native doesn't use.
|
|
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
|
|
97
126
|
configDependencies:
|
|
98
|
-
"@octane-xplat/patches": 0.
|
|
127
|
+
"@octane-xplat/patches": 0.11.0
|
package/template/src/App.tsrx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState } from 'octane';
|
|
2
|
-
import { View,
|
|
2
|
+
import { View, HStack, Text, Pressable, ScrollableArea, useColorScheme } from '@octane-xplat/ui';
|
|
3
3
|
import { storage } from '@octane-xplat/platform';
|
|
4
4
|
|
|
5
5
|
const FEATURES = [
|
|
@@ -27,15 +27,15 @@ export function App() @{
|
|
|
27
27
|
<Text className="title">octane-xplat</Text>
|
|
28
28
|
<Text className="muted">one codebase — web · iOS · android</Text>
|
|
29
29
|
|
|
30
|
-
<
|
|
30
|
+
<HStack className="counter">
|
|
31
31
|
<Pressable className="btn" onPress={() => setCount(count - 1)}><Text>−</Text></Pressable>
|
|
32
32
|
<Text className="count">{count}</Text>
|
|
33
33
|
<Pressable className="btn" onPress={() => setCount(count + 1)}><Text>+</Text></Pressable>
|
|
34
|
-
</
|
|
34
|
+
</HStack>
|
|
35
35
|
|
|
36
|
-
<
|
|
36
|
+
<ScrollableArea>
|
|
37
37
|
{FEATURES.map((f) => <Text className="chip">{f}</Text>)}
|
|
38
|
-
</
|
|
38
|
+
</ScrollableArea>
|
|
39
39
|
|
|
40
40
|
<Pressable className="link" onPress={() => {
|
|
41
41
|
const next = !dark;
|
package/template/src/style.css
CHANGED
|
@@ -1,7 +1,21 @@
|
|
|
1
|
-
/*
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/* This starter leaves the optional UI chrome stylesheet out. Define this
|
|
2
|
+
* app's palette here; the required tokens.css supplies layout structure. */
|
|
3
|
+
|
|
4
|
+
:root,
|
|
5
|
+
.ns-root {
|
|
6
|
+
--color-primary: #171717;
|
|
7
|
+
--color-onprimary: #fafafa;
|
|
8
|
+
--color-surface: #ffffff;
|
|
9
|
+
--color-text: #0a0a0a;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.dark,
|
|
13
|
+
.ns-dark {
|
|
14
|
+
--color-primary: #ededed;
|
|
15
|
+
--color-onprimary: #171717;
|
|
16
|
+
--color-surface: #0a0a0a;
|
|
17
|
+
--color-text: #ededed;
|
|
18
|
+
}
|
|
5
19
|
|
|
6
20
|
body {
|
|
7
21
|
margin: 0;
|
|
@@ -9,10 +23,12 @@ body {
|
|
|
9
23
|
background-color: var(--color-surface);
|
|
10
24
|
}
|
|
11
25
|
|
|
12
|
-
/* System-dark before JS mounts — no white flash.
|
|
13
|
-
*
|
|
26
|
+
/* System-dark before JS mounts — no white flash. .app.light below is the
|
|
27
|
+
* manual override back. */
|
|
14
28
|
@media (prefers-color-scheme: dark) {
|
|
15
29
|
:root {
|
|
30
|
+
--color-primary: #ededed;
|
|
31
|
+
--color-onprimary: #171717;
|
|
16
32
|
--color-surface: #0f172a;
|
|
17
33
|
--color-text: #f8fafc;
|
|
18
34
|
}
|
|
@@ -23,6 +39,8 @@ body {
|
|
|
23
39
|
|
|
24
40
|
/* Manual light override when the system is dark (JS adds .light). */
|
|
25
41
|
.app.light {
|
|
42
|
+
--color-primary: #171717;
|
|
43
|
+
--color-onprimary: #fafafa;
|
|
26
44
|
--color-surface: #ffffff;
|
|
27
45
|
--color-text: #111827;
|
|
28
46
|
}
|
|
@@ -3,6 +3,7 @@ import { xplatNative } from '@octane-xplat/cli/vite'
|
|
|
3
3
|
|
|
4
4
|
// The shared preset owns the renderer rules, octane→universal/native alias,
|
|
5
5
|
// suffix extension chain, deps-bundle plugin exclusions, the HMR watchdog,
|
|
6
|
-
//
|
|
7
|
-
// argument's `extra` (or
|
|
6
|
+
// the px→dip CSS rewrite, and fs.allow widening for link:/file: dep roots.
|
|
7
|
+
// App-specific additions go through the second argument's `extra` (or
|
|
8
|
+
// mergeConfig).
|
|
8
9
|
export default defineConfig(({ mode }) => xplatNative(mode))
|