create-octane-xplat 0.7.2 → 0.7.3
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
package/template/package.json
CHANGED
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"@nativescript-community/octane": "0.2.1",
|
|
21
21
|
"@nativescript-community/ui-drawer": "0.1.32",
|
|
22
22
|
"@nativescript/core": "9.1.2",
|
|
23
|
-
"@octane-xplat/effects": "^0.7.
|
|
24
|
-
"@octane-xplat/ui": "^0.7.
|
|
23
|
+
"@octane-xplat/effects": "^0.7.3",
|
|
24
|
+
"@octane-xplat/ui": "^0.7.3",
|
|
25
25
|
"@valor/nativescript-websockets": "2.0.3",
|
|
26
26
|
"octane": "0.6.3"
|
|
27
27
|
},
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"@nativescript/ios": "9.1.0",
|
|
32
32
|
"@nativescript/types": "9.0.0",
|
|
33
33
|
"@nativescript/vite": "8.0.11",
|
|
34
|
-
"@octane-xplat/cli": "^0.7.
|
|
35
|
-
"@octane-xplat/lint": "^0.7.
|
|
34
|
+
"@octane-xplat/cli": "^0.7.3",
|
|
35
|
+
"@octane-xplat/lint": "^0.7.3",
|
|
36
36
|
"@octanejs/vite-plugin": "0.1.61",
|
|
37
37
|
"@tsrx/typescript-plugin": "0.4.7",
|
|
38
38
|
"nativescript": "9.1.1",
|
|
@@ -750,3 +750,45 @@ index d391d4213240cab9a5088f9d7937fab17e7c7e54..112a3dc9ca31471c7cbceb94f6ee22bc
|
|
|
750
750
|
view.measure(childWidthMeasureSpec, makeMeasureSpec(newHeight, EXACTLY));
|
|
751
751
|
if (originalMeasuredWidth > view.getMeasuredWidth()) {
|
|
752
752
|
childWidthMeasureSpec = makeMeasureSpec(originalMeasuredWidth, EXACTLY);
|
|
753
|
+
diff --git a/ui/styling/font.android.js b/ui/styling/font.android.js
|
|
754
|
+
index a275f112af0ef85433c983cbce31f043b3aa7599..4c4ece97f013242aa6b5a10f5f07d7e197c131b7 100644
|
|
755
|
+
--- a/ui/styling/font.android.js
|
|
756
|
+
+++ b/ui/styling/font.android.js
|
|
757
|
+
@@ -38,7 +38,7 @@ export class Font extends FontBase {
|
|
758
|
+
Font.default = new Font(undefined, undefined);
|
|
759
|
+
function computeFontCacheKey(fontFamily, font) {
|
|
760
|
+
const sep = ':';
|
|
761
|
+
- return [fontFamily, String(FontVariationSettings.toString(font.fontVariationSettings)).replace(/'/g, '').replace(/[\s,]/g, '_')].join(sep);
|
|
762
|
+
+ return [fontFamily, String(getNumericFontWeight(font.fontWeight)), String(FontVariationSettings.toString(font.fontVariationSettings)).replace(/'/g, '').replace(/[\s,]/g, '_')].join(sep);
|
|
763
|
+
}
|
|
764
|
+
function loadFontFromFile(fontFamily, font) {
|
|
765
|
+
const cacheKey = SDK_VERSION >= 26 ? computeFontCacheKey(fontFamily, font) : fontFamily;
|
|
766
|
+
@@ -71,8 +71,26 @@ function loadFontFromFile(fontFamily, font) {
|
|
767
|
+
if (SDK_VERSION >= 26) {
|
|
768
|
+
const builder = new android.graphics.Typeface.Builder(fontAssetPath);
|
|
769
|
+
if (builder) {
|
|
770
|
+
- builder.setFontVariationSettings(font.fontVariationSettings?.length ? FontVariationSettings.toString(font.fontVariationSettings) : '');
|
|
771
|
+
- result = builder.build();
|
|
772
|
+
+ const explicitSettings = FontVariationSettings.toString(font.fontVariationSettings) || '';
|
|
773
|
+
+ const variationSettings = font.fontVariationSettings?.length ? [...font.fontVariationSettings] : [];
|
|
774
|
+
+ const hasWeightAxis = variationSettings.some(({ axis }) => axis.toLowerCase() === 'wght');
|
|
775
|
+
+ if (!hasWeightAxis) {
|
|
776
|
+
+ variationSettings.push({ axis: 'wght', value: getNumericFontWeight(font.fontWeight) });
|
|
777
|
+
+ }
|
|
778
|
+
+ try {
|
|
779
|
+
+ builder.setFontVariationSettings(FontVariationSettings.toString(variationSettings) || '');
|
|
780
|
+
+ result = builder.build();
|
|
781
|
+
+ }
|
|
782
|
+
+ catch (e) {
|
|
783
|
+
+ if (hasWeightAxis) {
|
|
784
|
+
+ throw e;
|
|
785
|
+
+ }
|
|
786
|
+
+ }
|
|
787
|
+
+ if (!result && !hasWeightAxis) {
|
|
788
|
+
+ const fallbackBuilder = new android.graphics.Typeface.Builder(fontAssetPath);
|
|
789
|
+
+ fallbackBuilder.setFontVariationSettings(explicitSettings);
|
|
790
|
+
+ result = fallbackBuilder.build();
|
|
791
|
+
+ }
|
|
792
|
+
}
|
|
793
|
+
else {
|
|
794
|
+
result = android.graphics.Typeface.createFromFile(fontAssetPath);
|
|
@@ -483,10 +483,15 @@ index b54aefcc839e95906d76d02e522c052a706ca76f..a9c38c32b8752765044cd8f2c1eac558
|
|
|
483
483
|
return {
|
|
484
484
|
kind: 'context',
|
|
485
485
|
diff --git a/hmr/server/websocket-ns-m.js b/hmr/server/websocket-ns-m.js
|
|
486
|
-
index 8eeb51ab59497e7f775da3117c4207e05f1814c7..
|
|
486
|
+
index 8eeb51ab59497e7f775da3117c4207e05f1814c7..ad91d9bab28605d06b16d1ef7fdb5d6c49678d9b 100644
|
|
487
487
|
--- a/hmr/server/websocket-ns-m.js
|
|
488
488
|
+++ b/hmr/server/websocket-ns-m.js
|
|
489
|
-
@@ -
|
|
489
|
+
@@ -1,3 +1,4 @@
|
|
490
|
+
+import * as path from 'node:path';
|
|
491
|
+
import { parse as babelParse } from '@babel/parser';
|
|
492
|
+
import traverse from '@babel/traverse';
|
|
493
|
+
import { sanitizeStrayCoreReferences } from './core-sanitize.js';
|
|
494
|
+
@@ -6,6 +7,7 @@ import { isRuntimeGraphExcludedPath } from './runtime-graph-filter.js';
|
|
490
495
|
import { buildPiniaVendorShim, buildVueVendorShim } from './vendor-bare-module-shims.js';
|
|
491
496
|
import { collapseLegacyNsMTags } from './websocket-ns-m-paths.js';
|
|
492
497
|
import { createNsMRequestContext, resolveNsMTransformedModule } from './websocket-ns-m-request.js';
|
|
@@ -33,7 +33,9 @@ patchedDependencies:
|
|
|
33
33
|
# on iOS and detached from their tab fragment on Android), iOS items writes load the
|
|
34
34
|
# selected item's view once controllers exist, and Frame._pushInFrameStack only promotes
|
|
35
35
|
# frames whose ancestors present them (Frame.topmost stops returning hidden preloaded tab
|
|
36
|
-
# frames).
|
|
36
|
+
# frames). Also maps CSS font-weight to the OpenType wght axis for custom Android fonts on
|
|
37
|
+
# API 26+, preserves explicit variation settings, and falls back to the prior file load
|
|
38
|
+
# when the axis is unsupported.
|
|
37
39
|
"@nativescript/core@9.1.2": patches/@nativescript__core@9.1.2.patch
|
|
38
40
|
# @nativescript/vite serializes bundled CSS and dev app.css through reworkcss `css`@3.0.0,
|
|
39
41
|
# which mis-parses @layer into garbage selectors — rules die before reaching
|
|
@@ -41,14 +43,15 @@ patchedDependencies:
|
|
|
41
43
|
# transitive dep — no app declares it directly.
|
|
42
44
|
css@3.0.0: patches/css@3.0.0.patch
|
|
43
45
|
# Dev-server /ns/m fixes: resolve pnpm-isolated transitive deps and platform-suffixed
|
|
44
|
-
# entries, inline workspace CSS through /@fs
|
|
45
|
-
#
|
|
46
|
-
#
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
# failed bundle-mode
|
|
46
|
+
# entries, inline workspace CSS through /@fs (including the node:path import required to
|
|
47
|
+
# resolve workspace files), route vendor-excluded plugins through HTTP, decode bracketed
|
|
48
|
+
# paths, and ignore comments during export-star expansion. Deps-bundle alias: the dev
|
|
49
|
+
# payload's esbuild passes never see vite resolve.alias, so a dep importing bare `octane`
|
|
50
|
+
# bundles the DOM runtime beside the universal one (hooks crash on boot, octane-xplat#3) —
|
|
51
|
+
# an onResolve plugin redirects `octane` → `octane/universal/native`. tsconfig-paths
|
|
52
|
+
# resolver also probes the .mobile suffix tier (ios/android) between the os qualifier and
|
|
53
|
+
# unsuffixed default — .mobile-only modules behind paths-mapped imports failed bundle-mode
|
|
54
|
+
# resolution.
|
|
52
55
|
"@nativescript/vite@8.0.11": patches/@nativescript__vite@8.0.11.patch
|
|
53
56
|
# Driver setProp skips `undefined` writes — NativeScript native setters coerce it (e.g.
|
|
54
57
|
# editable → ios.userInteractionEnabled = NO), leaving dead UI that still has its JS
|