create-octane-xplat 0.5.0 → 0.7.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 +37 -12
- package/package.json +6 -1
- package/template/.agents/skills/xplat/SKILL.md +18 -11
- package/template/.agents/skills/xplat/references/components.md +78 -29
- package/template/.agents/skills/xplat/references/navigation.md +8 -5
- package/template/.agents/skills/xplat/references/platform.md +21 -21
- package/template/.agents/skills/xplat/references/styling.md +1 -1
- package/template/AGENTS.md +2 -1
- package/template/App_Resources/iOS/src/ShaderEffectRegistration.swift +31 -0
- package/template/package.json +8 -9
- package/template/patches/@nativescript-community__octane@0.2.1.patch +16 -0
- package/template/patches/@nativescript__core@9.1.2.patch +752 -0
- package/template/patches/@nativescript__core@9.1.3-next.2.patch +428 -0
- package/template/patches/@nativescript__vite@8.0.11.patch +531 -261
- package/template/patches/@nativescript__vite@8.0.13.patch +233 -0
- package/template/patches/css@3.0.0.patch +52 -0
- package/template/patches/octane@0.6.3.patch +1149 -0
- package/template/pnpm-workspace.yaml +54 -12
- package/template/src/App.tsrx +6 -4
- package/template/tsconfig.json +1 -1
- package/template/tsconfig.native.json +1 -1
- package/template/vite.config.ts +3 -3
- /package/template/src/{index.native.ts → index.ts} +0 -0
|
@@ -14,16 +14,58 @@ allowBuilds:
|
|
|
14
14
|
'@parcel/watcher': true
|
|
15
15
|
nativescript: true
|
|
16
16
|
'@nativescript/core': false
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
# deferred ns:hmr-delta broadcast — on-device HMR looks dead. The patch also
|
|
21
|
-
# counts open /ns-hmr sockets so `recipients=N` in update logs is real.
|
|
22
|
-
# Drop once a release carries the fix.
|
|
17
|
+
# Framework patch set required by the octane-xplat toolchain — applied via pnpm
|
|
18
|
+
# patchedDependencies. Managed upstream by @octane-xplat/cli (`xplat patches apply`
|
|
19
|
+
# refreshes, `xplat patches check` verifies); do not edit by hand.
|
|
23
20
|
patchedDependencies:
|
|
24
|
-
|
|
25
|
-
#
|
|
26
|
-
#
|
|
27
|
-
|
|
28
|
-
#
|
|
29
|
-
|
|
21
|
+
# Published octane 0.6.3 lacks live signal reads under universal renderers. Adds signal
|
|
22
|
+
# ownership, read tracking, and local signal hooks; JSX prop lowering and __methodDep
|
|
23
|
+
# already ship upstream.
|
|
24
|
+
octane@0.6.3: patches/octane@0.6.3.patch
|
|
25
|
+
# FlexboxLayout getChildMeasureSpec subtracts the child's own padding where AOSP subtracts
|
|
26
|
+
# parent padding + child margins — a column-stretched row re-measurement clamps padded
|
|
27
|
+
# children (37→17 dip, squished controls). Adds squircle (continuous) corner clipping for
|
|
28
|
+
# iOS backgrounds and CSS @layer cascade support to the native css-tree adapter (layer
|
|
29
|
+
# nodes, first-seen layerPath ordinals, layer rank ahead of specificity with unlayered
|
|
30
|
+
# last — sans !important). Ports the runtime half of NativeScript PR #11446 (fixes
|
|
31
|
+
# #11444): TabView onItemsChanged keeps retained items attached instead of
|
|
32
|
+
# unloading/re-adding them (the churn that left TabViewItem-hosted Frames isLoaded=false
|
|
33
|
+
# on iOS and detached from their tab fragment on Android), iOS items writes load the
|
|
34
|
+
# selected item's view once controllers exist, and Frame._pushInFrameStack only promotes
|
|
35
|
+
# frames whose ancestors present them (Frame.topmost stops returning hidden preloaded tab
|
|
36
|
+
# frames).
|
|
37
|
+
"@nativescript/core@9.1.2": patches/@nativescript__core@9.1.2.patch
|
|
38
|
+
# @nativescript/vite serializes bundled CSS and dev app.css through reworkcss `css`@3.0.0,
|
|
39
|
+
# which mis-parses @layer into garbage selectors — rules die before reaching
|
|
40
|
+
# _populateRules. Adds atlayer() covering block and statement forms. Applies to a
|
|
41
|
+
# transitive dep — no app declares it directly.
|
|
42
|
+
css@3.0.0: patches/css@3.0.0.patch
|
|
43
|
+
# Dev-server /ns/m fixes: resolve pnpm-isolated transitive deps and platform-suffixed
|
|
44
|
+
# entries, inline workspace CSS through /@fs, route vendor-excluded plugins through HTTP,
|
|
45
|
+
# decode bracketed paths, and ignore comments during export-star expansion. Deps-bundle
|
|
46
|
+
# alias: the dev payload's esbuild passes never see vite resolve.alias, so a dep importing
|
|
47
|
+
# bare `octane` bundles the DOM runtime beside the universal one (hooks crash on boot,
|
|
48
|
+
# octane-xplat#3) — an onResolve plugin redirects `octane` → `octane/universal/native`.
|
|
49
|
+
# tsconfig-paths resolver also probes the .mobile suffix tier (ios/android) between the os
|
|
50
|
+
# qualifier and unsuffixed default — .mobile-only modules behind paths-mapped imports
|
|
51
|
+
# failed bundle-mode resolution.
|
|
52
|
+
"@nativescript/vite@8.0.11": patches/@nativescript__vite@8.0.11.patch
|
|
53
|
+
# Driver setProp skips `undefined` writes — NativeScript native setters coerce it (e.g.
|
|
54
|
+
# editable → ios.userInteractionEnabled = NO), leaving dead UI that still has its JS
|
|
55
|
+
# listeners.
|
|
56
|
+
"@nativescript-community/octane@0.2.1": patches/@nativescript-community__octane@0.2.1.patch
|
|
57
|
+
# octaneServerStrategy's SCRIPT_FILE_RE only covers [jt]sx? — .tsrx edits never emit the
|
|
58
|
+
# deferred ns:hmr-delta broadcast, so component HMR silently never reaches the device.
|
|
59
|
+
# Also counts open /ns-hmr sockets so the update summary stops reporting recipients=0 for
|
|
60
|
+
# delivered updates.
|
|
61
|
+
"@nativescript-community/vite-octane@0.2.1": patches/@nativescript-community__vite-octane@0.2.1.patch
|
|
62
|
+
# Same dev-server fixes as the 8.0.11 patch, ported to the @11468 pkg.pr.new preview the
|
|
63
|
+
# windows target uses (apps/windows): /ns/m re-export records, vendor-manifest gating for
|
|
64
|
+
# plugin-patterned packages, percent-decoded specifiers, and the .mobile-aware
|
|
65
|
+
# tsconfig-paths probing.
|
|
66
|
+
"@nativescript/vite@8.0.13": patches/@nativescript__vite@8.0.13.patch
|
|
67
|
+
# Windows spike: the shared-file subset of the 9.1.2 patch — @layer cascade machinery
|
|
68
|
+
# (css-tree parser, css-selector, style-scope), the #11446 frame/tab-view common fixes,
|
|
69
|
+
# and the flexbox common measure-spec — applied to the @11468 preview. iOS/Android
|
|
70
|
+
# impl-file hunks are dead code on windows and were dropped.
|
|
71
|
+
"@nativescript/core@9.1.3-next.2": patches/@nativescript__core@9.1.3-next.2.patch
|
package/template/src/App.tsrx
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { useState } from 'octane';
|
|
2
|
-
import { View, Row, Text, Pressable,
|
|
2
|
+
import { View, Row, Text, Pressable, ScrollView, useColorScheme } from '@octane-xplat/ui';
|
|
3
3
|
|
|
4
4
|
const FEATURES = [
|
|
5
5
|
'shared components',
|
|
6
|
-
'platform leaves (.web / .
|
|
6
|
+
'platform leaves (.web / .mobile)',
|
|
7
7
|
'design tokens + dark mode',
|
|
8
8
|
'native navigation',
|
|
9
9
|
];
|
|
10
10
|
|
|
11
11
|
/** Every element here compiles for web AND for NativeScript iOS/Android —
|
|
12
12
|
* the same file, no branches. Platform divergence lives in leaf files
|
|
13
|
-
* (.web.tsrx / .
|
|
13
|
+
* (.web.tsrx / .mobile.tsrx), never inside a component. */
|
|
14
14
|
export function App() @{
|
|
15
15
|
const [count, setCount] = useState(0);
|
|
16
16
|
// null = follow the system; the toggle overrides it for this session.
|
|
@@ -28,7 +28,9 @@ export function App() @{
|
|
|
28
28
|
<Pressable className="btn" onPress={() => setCount(count + 1)}><Text>+</Text></Pressable>
|
|
29
29
|
</Row>
|
|
30
30
|
|
|
31
|
-
<
|
|
31
|
+
<ScrollView>
|
|
32
|
+
{FEATURES.map((f) => <Text className="chip">{f}</Text>)}
|
|
33
|
+
</ScrollView>
|
|
32
34
|
|
|
33
35
|
<Pressable className="link" onPress={() => setOverride(!dark)}>
|
|
34
36
|
<Text>{dark ? 'light' : 'dark'} mode (system: {scheme})</Text>
|
package/template/tsconfig.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"moduleResolution": "bundler",
|
|
7
7
|
"jsx": "preserve",
|
|
8
8
|
"jsxImportSource": "@nativescript-community/octane",
|
|
9
|
-
"moduleSuffixes": [".ios", ".android", ".
|
|
9
|
+
"moduleSuffixes": [".ios", ".android", ".mobile", ""],
|
|
10
10
|
"customConditions": ["native"],
|
|
11
11
|
"lib": ["ESNext"],
|
|
12
12
|
"types": ["@nativescript/types"],
|
package/template/vite.config.ts
CHANGED
|
@@ -2,9 +2,9 @@ import { defineConfig } from 'vite'
|
|
|
2
2
|
import { octane } from '@octanejs/vite-plugin'
|
|
3
3
|
|
|
4
4
|
// The web build. For native (iOS/Android), the same source runs through
|
|
5
|
-
// @nativescript-community/vite-octane with `conditions: ['native']
|
|
6
|
-
// .ios/.android/.
|
|
7
|
-
// apps/
|
|
5
|
+
// @nativescript-community/vite-octane with `conditions: ['native']`, the
|
|
6
|
+
// .ios/.android/.mobile suffix chain, and the unsuffixed native default — see
|
|
7
|
+
// the octane-xplat repo's apps/mobile/vite.config.mts.
|
|
8
8
|
export default defineConfig({
|
|
9
9
|
plugins: [...octane()],
|
|
10
10
|
server: { port: 5200 },
|
|
File without changes
|