create-octane-xplat 0.7.1 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-octane-xplat",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
4
4
  "description": "Scaffold a minimal @octane-xplat/ui app — one Octane codebase for web + iOS + Android",
5
5
  "keywords": [
6
6
  "octane",
@@ -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.1",
24
- "@octane-xplat/ui": "^0.7.1",
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.1",
35
- "@octane-xplat/lint": "^0.7.1",
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..407c2a2484c843bc538ce6ef9cf7af0b9b883ad3 100644
486
+ index 8eeb51ab59497e7f775da3117c4207e05f1814c7..ad91d9bab28605d06b16d1ef7fdb5d6c49678d9b 100644
487
487
  --- a/hmr/server/websocket-ns-m.js
488
488
  +++ b/hmr/server/websocket-ns-m.js
489
- @@ -6,6 +6,7 @@ import { isRuntimeGraphExcludedPath } from './runtime-graph-filter.js';
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';
@@ -0,0 +1,11 @@
1
+ diff --git a/dist/language-CofXAudP.js b/dist/language-CofXAudP.js
2
+ index 0d5504342813cd32b77bc834f9ed01bf6a353e3f..aff65966aba619c96f627474bb8e36c34d44f3e1 100644
3
+ --- a/dist/language-CofXAudP.js
4
+ +++ b/dist/language-CofXAudP.js
5
+ @@ -3,5 +3,5 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
6
+ `));return e?null:void 0}let u=D(o.layers,e=>ne(e.config));if(u.state===`invalid`)return j(`Invalid TSRX ${u.target} declaration:`,u.actual_type,u.actual_value,`in ${u.config_path}`),null;let f=o.extends_failures.filter(e=>u.state!==`declared`||!B(o.layers,e,u.config_path));if(f.length>0){for(let e of f){if(e.diagnostics.length===0){j(`Unable to resolve tsconfig extends entry:`,JSON.stringify(e.extends_value),`in ${e.config_path}`);continue}for(let t of e.diagnostics)j(`Unable to resolve tsconfig extends entry:`,JSON.stringify(e.extends_value),`in ${e.config_path}`,n.flattenDiagnosticMessageText(t.messageText,`
7
+ `))}return null}if(u.state===`declared`)return ae(n,r,u.config_path,u.value)}function se(e,t={}){let n=t.ts??l.default,r=t.configHost??n.sys,i=I(r),a=t.configFileName??R(d.default.dirname(e),r,i);if(a===null)return;let o=z(n,r,a,i);for(let e of o.dependencies)t.dependencies?.add(e);let s=o.layers.find(e=>e.raw_source===void 0);if(s){let e=`Unable to read tsconfig layer while resolving TSRX platform: ${s.path}`;throw j(e),Error(e)}let c=o.layers.filter(e=>e.parse_diagnostics.length>0);if(c.length>0){if(!o.layers.some(e=>E(e.config,[`tsrx`]).state===`found`?!0:e.parse_diagnostics.length>0&&e.raw_source!==void 0&&M.test(e.raw_source)))return;let e=c[0],t=n.flattenDiagnosticMessageText(e.parse_diagnostics[0].messageText,`
8
+ `),r=`Unable to parse tsconfig layer while resolving TSRX platform: ${e.path}: ${t}`;throw j(r),Error(r)}let u=D(o.layers,e=>re(e.config));if(u.state===`invalid`){let e=u.target===`platform`?` Expected "web", "ios", or "android".`:``,t=`Invalid TSRX ${u.target} declaration: ${u.actual_type} ${u.actual_value} in ${u.config_path}.${e}`;throw j(t),TypeError(t)}let f=o.extends_failures.filter(e=>u.state!==`declared`||!B(o.layers,e,u.config_path));if(f.length>0){if(!t.requirePlatformResolution)return u.state===`declared`?u.value:void 0;let e=f[0],r=e.diagnostics.length>0?`: ${n.flattenDiagnosticMessageText(e.diagnostics[0].messageText,`
9
+ -`)}`:``,i=`Unable to resolve tsconfig extends entry ${JSON.stringify(e.extends_value)} in ${e.config_path} while resolving TSRX platform${r}`;throw j(i),Error(i)}return u.state===`declared`?u.value:void 0}const ce=(0,f.createRequire)(require(`url`).pathToFileURL(__filename).href),le=d.default.dirname((0,p.fileURLToPath)(require(`url`).pathToFileURL(__filename).href)),{log:V,logWarning:H,logError:U}=k(`[TSRX Language]`),W=new Set,G=[`.tsrx`],K=[[`@tsrx/ripple`,[`node_modules`,`@tsrx`,`ripple`],[`.tsrx`],[`@tsrx/ripple`,`ripple`,`@ripple-ts/vite-plugin`]],[`@tsrx/react`,[`node_modules`,`@tsrx`,`react`],[`.tsrx`],[`@tsrx/react`,`@tsrx/vite-plugin-react`]],[`@tsrx/solid`,[`node_modules`,`@tsrx`,`solid`],[`.tsrx`],[`@tsrx/solid`,`@tsrx/vite-plugin-solid`]],[`@tsrx/preact`,[`node_modules`,`@tsrx`,`preact`],[`.tsrx`],[`@tsrx/preact`,`@tsrx/vite-plugin-preact`]],[`@tsrx/vue`,[`node_modules`,`@tsrx`,`vue`],[`.tsrx`],[`@tsrx/vue`,`@tsrx/vite-plugin-vue`]],[`@tsrx/hono`,[`node_modules`,`@tsrx`,`hono`],[`.tsrx`],[`@tsrx/hono`,`@tsrx/vite-plugin-hono`]],[`octane`,[`node_modules`,`octane`],[`.tsrx`],[`octane`,`@octanejs/vite-plugin`],[[`dist`,`compiler`,`volar.js`],[`src`,`compiler`,`volar.js`]]]],ue=[[`src`,`index.js`]];function de(e){return G.some(t=>e.endsWith(t))}function fe(e,t=l.default){let n=t.createScanner(t.ScriptTarget.Latest,!0,t.LanguageVariant.JSX,e),r=[];for(let e=n.scan();e!==t.SyntaxKind.EndOfFileToken;e=n.scan())r.push({kind:e,text:n.getTokenText()});let i=[`import`,`.`,`meta`,`.`,`env`,`.`,`platform`,`.`];for(let e=0;e+i.length<r.length;e+=1){if(e>0&&(r[e-1].kind===t.SyntaxKind.DotToken||r[e-1].kind===t.SyntaxKind.QuestionDotToken)||!i.every((t,n)=>r[e+n].text===t))continue;let n=r[e+i.length].text;if(n===`web`||n===`ios`||n===`android`)return!0}return!1}function pe(e={}){V(`Creating TSRX language plugin...`);let t=e.ts??l.default,n={...e,ts:t,configHost:e.configHost??t.sys};return{getLanguageId(e){let t=typeof e==`string`?e:e.fsPath.replace(/\\/g,`/`);if(de(t))return V(`Identified TSRX file:`,t),`tsrx`},createVirtualCode(e,t,r){if(t===`tsrx`){let t=ve(e),i=ye(t,n);if(!i){U(`TSRX compiler not found for file: ${t}`);return}V(`Creating virtual code for:`,t);try{return new q(t,r,i,e=>se(t,{...n,requirePlatformResolution:e}))}catch(e){throw U(`Failed to create virtual code for:`,t,`:`,e),e}}},updateVirtualCode(e,t,n){if(t instanceof q)return V(`Updating existing virtual code for:`,t.fileName),t.update(n),t},typescript:{extraFileExtensions:G.map(e=>({extension:e.slice(1),isMixedContent:!1,scriptKind:7})),getServiceScript(e){for(let t of(0,w.forEachEmbeddedCode)(e))if(t.languageId===`tsrx`)return{code:t,extension:`.tsx`,scriptKind:4}},...process.env.TSRX_TSC===`true`?null:{getExtraServiceScripts(e,t){let n=[];for(let r of(0,w.forEachEmbeddedCode)(t))r.languageId===`typescript`&&n.push({fileName:`${e}.${r.id}.ts`,code:r,extension:`.ts`,scriptKind:l.default.ScriptKind.TS});return n}}}}}var q=class{id=`root`;languageId=`tsrx`;codegenStacks=[];tsrx;platformProvider;generatedCode=``;embeddedCodes=[];mappings=[];fatalErrors=[];usageErrors=[];snapshot;sourceSnapshot;originalCode=``;sourceAst=null;isDotCompletionMode=!1;diagnostics=[];#e=null;#t=null;constructor(e,t,n,r){if(V(`Initializing TSRXVirtualCode for:`,e),this.fileName=e,this.tsrx=n,this.platformProvider=r,this.snapshot=t,this.sourceSnapshot=t,this.originalCode=t.getText(0,t.getLength()),!n||typeof n.compile_to_volar_mappings!=`function`)throw U(`Invalid TSRX compiler - missing compile_to_volar_mappings method`),Error(`Invalid TSRX compiler`);this.update(t)}update(e){V(`Updating virtual code for:`,this.fileName);let t=e.getText(0,e.getLength()),n=e.getChangeRange(this.sourceSnapshot);this.sourceSnapshot=e,this.#e=null,this.#t=null,this.fatalErrors=[],this.usageErrors=[],this.sourceAst=null,this.isDotCompletionMode=!1;let r,i=!1,a=-1;if(V(`changeRange:`,JSON.stringify(n)),n){let e=n.span.start,r=e+n.span.length,o=e+n.newLength,s=this.originalCode.substring(e,r),c=t.substring(e,o);if(V(`Change details:`),V(` Position:`,e,`-`,r,`(length:`,n.span.length,`)`),V(` Old text:`,JSON.stringify(s)),V(` New text:`,JSON.stringify(c),`(length:`,n.newLength,`)`),c.endsWith(`.`)){let e=o>1?t[o-2]:``;V(` Char before dot:`,JSON.stringify(e)),/[$#_\u200C\u200D\p{ID_Continue}\)\]\}]/u.test(e)&&(i=!0,a=o-1,V(`ChangeRange detected dot typed at position`,a))}}try{let e=this.platformProvider?.(fe(t));if(i&&a>=0){this.isDotCompletionMode=!0;let n=t.substring(0,a)+t.substring(a+1);if(V(`Compiling without typed dot at position`,a),r=this.tsrx.compile_to_volar_mappings(n,this.fileName,{loose:!0,platform:e}),V(`Compilation without dot successful`),r&&r.code&&r.mappings.length>0){let e=ge(r,a);e===null?H(`Failed to restore typed dot into transpiled output`):V(`Inserted typed dot at generated position`,e)}}else V(`Compiling TSRX code...`),r=this.tsrx.compile_to_volar_mappings(t,this.fileName,{loose:!0,platform:e}),V(`Compilation successful, generated code length:`,r?.code?.length||0)}catch(e){let t=e;U(`TSRX compilation failed for`,this.fileName,`:`,t),process.env.TSRX_TSC===`true`&&Y(this.fileName,[t]),t.type=`fatal`,this.fatalErrors.push(t)}if(r&&r.code){this.originalCode=t,this.generatedCode=r.code,this.mappings=r.mappings??[],this.usageErrors=r.errors,this.sourceAst=r.sourceAst,process.env.TSRX_TSC===`true`&&r.errors.length>0&&Y(this.fileName,r.errors);let e=r.cssMappings,n=r.scriptMappings??[];if(e.length>0||n.length>0){V(`Creating`,e.length,`CSS and`,n.length,`script embedded codes`);let t=[];for(let n of e)t.push(X(n,`css`));for(let e of n)t.push(X(e,`typescript`));this.embeddedCodes=t}else this.embeddedCodes=[];if(O){V(`CSS embedded codes:`,(this.embeddedCodes||[]).length),V(`Using transpiled code, mapping count:`,this.mappings.length),V(`Original code length:`,t.length),V(`Generated code length:`,this.generatedCode.length),V(`Last 100 chars of original:`,JSON.stringify(t.slice(-100))),V(`Last 200 chars of generated:`,JSON.stringify(this.generatedCode.slice(-200))),V(`Last few mappings:`);let e=Math.max(0,this.mappings.length-5);for(let t=e;t<this.mappings.length;t++){let e=this.mappings[t];V(` Mapping ${t}: source[${e.sourceOffsets[0]}:${e.sourceOffsets[0]+e.lengths[0]}] -> gen[${e.generatedOffsets[0]}:${e.generatedOffsets[0]+e.lengths[0]}], len=${e.lengths[0]}, completion=${e.data?.completion}`)}}this.snapshot={getText:(e,t)=>this.generatedCode.substring(e,t),getLength:()=>this.generatedCode.length,getChangeRange:()=>void 0}}else V(`Compilation failed, only display where the compilation error occurred.`),this.originalCode=t,this.generatedCode=t,this.mappings=[{sourceOffsets:[0],generatedOffsets:[0],lengths:[t.length],generatedLengths:[t.length],data:{completion:!0,verification:!0,customData:{}}}],this.embeddedCodes=[...me(t),...he(t)],this.snapshot={getText:(e,t)=>this.generatedCode.substring(e,t),getLength:()=>this.generatedCode.length,getChangeRange:()=>void 0}}#n(){if(!(this.#e||this.#t)){this.#e=new Map,this.#t=new Map;for(var e,t,n,r,i,a,o,s,c,l=0;l<this.mappings.length;l++)e=this.mappings[l],t=e.generatedOffsets[0],n=e.generatedLengths[0],r=t+n,i=`${t}-${r}`,this.#e.set(i,e),a=e.sourceOffsets[0],o=e.lengths[0],s=a+o,c=`${a}-${s}`,this.#t.set(c,e)}}findMappingByGeneratedRange(e,t){return this.#n(),this.#e.get(`${e}-${t}`)??null}findMappingBySourceRange(e,t){return this.#n(),this.#t.get(`${e}-${t}`)??null}findGeneratedRangeBySourceRange(e,t){let n=null,r=null;for(let i=0;i<this.mappings.length;i++){let a=this.mappings[i],o=a.sourceOffsets[0],s=o+a.lengths[0];s<=e||o>=t||((!n||o<n.sourceOffsets[0])&&(n=a),(!r||s>r.sourceOffsets[0]+r.lengths[0])&&(r=a))}if(!n||!r)return null;let i=n.generatedOffsets[0]+J(e-n.sourceOffsets[0],n.generatedLengths[0]),a=r.generatedOffsets[0]+J(t-r.sourceOffsets[0],r.generatedLengths[0]);return[i,Math.max(a,i+1)]}};function J(e,t){return Math.min(Math.max(e,0),t)}function Y(e,t){for(let n of t){let t=n&&typeof n==`object`&&`message`in n?String(n.message):String(n),r=`${e}\0${t}`;W.has(r)||(W.add(r),console.error(`[tsrx-tsc] ${e}: ${t}`))}}function me(e){let t=[],n=/<style\b((?:[^>"'{}/]|"[^"]*"|'[^']*'|\{(?:[^{}]|\{[^{}]*\})*\}|\/(?!>))*)>([\s\S]*?)<\/style>/gi,r,i=0;for(;(r=n.exec(e))!==null;){let e=r[1],n=r[2],a=r.index+(6+e.length+1),o=n.length,s=`style_${i}`;V(`Extracted CSS region ${i}: offset ${a}, length ${o}`);let c={sourceOffsets:[a],generatedOffsets:[0],lengths:[o],generatedLengths:[o],data:{verification:!0,completion:!0,semantic:!0,navigation:!0,structure:!0,format:!1,customData:{content:n,embeddedId:s}}};t.push(X(c,`css`)),i++}return t.length>0&&V(`Extracted ${t.length} CSS embedded codes from style tags`),t}function X(e,t){let n=e.data?.customData?.content??``;return{id:e.data?.customData?.embeddedId,languageId:t,snapshot:{getText:(e,t)=>n.substring(e,t),getLength:()=>e.lengths[0],getChangeRange:()=>void 0},mappings:[e],embeddedCodes:[]}}function he(e){let t=[],n=/<script\b((?:[^>"'/]|"[^"]*"|'[^']*'|\/(?!>))*)>([\s\S]*?)<\/script>/gi,r,i=0;for(;(r=n.exec(e))!==null;){let e=r[1],n=r[2],a=r.index+(7+e.length+1),o=n.length,s=`script_${i}`;V(`Extracted script region ${i}: offset ${a}, length ${o}`);let c={sourceOffsets:[a],generatedOffsets:[0],lengths:[o],generatedLengths:[o],data:{verification:!0,completion:!0,semantic:!0,navigation:!0,structure:!0,format:!1,customData:{content:n,embeddedId:s}}};t.push(X(c,`typescript`)),i++}return t.length>0&&V(`Extracted ${t.length} script embedded codes from script tags`),t}function ge(e,t){let n=null;for(let r of e.mappings)if(r.sourceOffsets[0]+r.lengths[0]===t){n=r;break}if(!n)return null;let r=n.generatedLengths[0],i=n.generatedOffsets[0]+r;e.code=e.code.substring(0,i)+`.`+e.code.substring(i);let a={sourceOffsets:[t],generatedOffsets:[i],lengths:[1],generatedLengths:[1],data:{...n.data}},o=e.mappings.indexOf(n);e.mappings.splice(o+1,0,a);for(let r of e.mappings)r!==n&&r!==a&&r.generatedOffsets[0]>=i&&(r.generatedOffsets[0]+=1),r!==n&&r!==a&&r.sourceOffsets[0]>=t&&(r.sourceOffsets[0]+=1);return i}const _e=new Map,Z=new Map;function ve(e){return typeof e==`string`?e:e.fsPath.replace(/\\/g,`/`)}function Q(e,t=u.default.existsSync){let n=e,r=[];for(;n;){if(Z.has(n)){let e=Z.get(n)??null;for(let t of r)Z.set(t,e);return e}r.push(n);let e=d.default.join(n,`package.json`);if(t(e))try{let t=JSON.parse(u.default.readFileSync(e,`utf8`)),n=new Set([...Object.keys(t.dependencies??{}),...Object.keys(t.devDependencies??{}),...Object.keys(t.peerDependencies??{}),...Object.keys(t.optionalDependencies??{})]),i={name:typeof t.name==`string`?t.name:null,dependencies:n};for(let e of r)Z.set(e,i);return i}catch{for(let e of r)Z.set(e,null);return null}let i=d.default.dirname(n);if(i===n)break;n=i}for(let e of r)Z.set(e,null);return null}function $(e,t,n){if(!e)return!1;if(e.name===t||n.includes(e.name??``)||e.dependencies.has(t))return!0;for(let t of n)if(e.dependencies.has(t))return!0;return!1}function ye(e,t){let n=Se(e,t);if(n)return be(ce(n))}function be(e){return typeof e?.compile_to_volar_mappings!=`function`&&typeof e?.compileToVolarMappings==`function`?{...e,compile_to_volar_mappings:e.compileToVolarMappings}:e}function xe(e,t=u.default.existsSync,n=_e){let r=e.split(`/`),i=d.default.extname(e);for(let e=r.length-2;e>=0;e--){let a=r.slice(0,e+1).join(`/`),o=a+`\0`+i;if(!n.has(o)){let e=[];for(let[n,r,o,s,c=ue]of K)if(o.includes(i))for(let i of c){let o=[a,...r,...i].join(`/`);if(t(o)){e.push([n,o,s]);break}}let r=null;if(e.length>0){let n=Q(a,t);r=e.find(([e,,t])=>$(n,e,t))?.[1]??e[0][1],V(`Found tsrx compiler at:`,r,`for extension:`,i)}n.set(o,r)}let s=n.get(o);if(s)return s}}function Se(e,t){let n=d.default.extname(e),r=oe(e,t);if(r!==void 0)return r??void 0;let i=Q(d.default.dirname(e)),a=xe(e);if(a)return a;let o=`No supported tsrx compiler found in workspace for ${e}.`,s=le;for(;s;){let e=[];for(let[t,r,i,a,o=ue]of K){if(!i.includes(n))continue;let c=d.default.join(s,...r);for(let n of o){let r=d.default.join(c,...n);if(u.default.existsSync(r)){e.push([t,r,a]);break}}}if(e.length>0){let t=e.find(([e,,t])=>$(i,e,t))?.[1]??e[0][1];return H(`${o} Using packaged version at ${t}`),t}let t=d.default.dirname(s);if(t===s)break;s=t}}Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return pe}});
10
+ +`)}`:``,i=`Unable to resolve tsconfig extends entry ${JSON.stringify(e.extends_value)} in ${e.config_path} while resolving TSRX platform${r}`;throw j(i),Error(i)}return u.state===`declared`?u.value:void 0}const ce=(0,f.createRequire)(require(`url`).pathToFileURL(__filename).href),le=d.default.dirname((0,p.fileURLToPath)(require(`url`).pathToFileURL(__filename).href)),{log:V,logWarning:H,logError:U}=k(`[TSRX Language]`),W=new Set,G=[`.tsrx`],K=[[`@tsrx/ripple`,[`node_modules`,`@tsrx`,`ripple`],[`.tsrx`],[`@tsrx/ripple`,`ripple`,`@ripple-ts/vite-plugin`]],[`@tsrx/react`,[`node_modules`,`@tsrx`,`react`],[`.tsrx`],[`@tsrx/react`,`@tsrx/vite-plugin-react`]],[`@tsrx/solid`,[`node_modules`,`@tsrx`,`solid`],[`.tsrx`],[`@tsrx/solid`,`@tsrx/vite-plugin-solid`]],[`@tsrx/preact`,[`node_modules`,`@tsrx`,`preact`],[`.tsrx`],[`@tsrx/preact`,`@tsrx/vite-plugin-preact`]],[`@tsrx/vue`,[`node_modules`,`@tsrx`,`vue`],[`.tsrx`],[`@tsrx/vue`,`@tsrx/vite-plugin-vue`]],[`@tsrx/hono`,[`node_modules`,`@tsrx`,`hono`],[`.tsrx`],[`@tsrx/hono`,`@tsrx/vite-plugin-hono`]],[`octane`,[`node_modules`,`octane`],[`.tsrx`],[`octane`,`@octanejs/vite-plugin`],[[`dist`,`compiler`,`volar.js`],[`src`,`compiler`,`volar.js`]]]],ue=[[`src`,`index.js`]];function de(e){return G.some(t=>e.endsWith(t))}function fe(e,t=l.default){let n=t.createScanner(t.ScriptTarget.Latest,!0,t.LanguageVariant.JSX,e),r=[];for(let e=n.scan();e!==t.SyntaxKind.EndOfFileToken;e=n.scan())r.push({kind:e,text:n.getTokenText()});let i=[`import`,`.`,`meta`,`.`,`env`,`.`,`platform`,`.`];for(let e=0;e+i.length<r.length;e+=1){if(e>0&&(r[e-1].kind===t.SyntaxKind.DotToken||r[e-1].kind===t.SyntaxKind.QuestionDotToken)||!i.every((t,n)=>r[e+n].text===t))continue;let n=r[e+i.length].text;if(n===`web`||n===`ios`||n===`android`)return!0}return!1}function pe(e={}){V(`Creating TSRX language plugin...`);let t=e.ts??l.default,n={...e,ts:t,configHost:e.configHost??t.sys};return{getLanguageId(e){let t=typeof e==`string`?e:e.fsPath.replace(/\\/g,`/`);if(de(t))return V(`Identified TSRX file:`,t),`tsrx`},createVirtualCode(e,t,r){if(t===`tsrx`){let t=ve(e),i=ye(t,n);if(!i){U(`TSRX compiler not found for file: ${t}`);return}V(`Creating virtual code for:`,t);try{return new q(t,r,i,e=>se(t,{...n,requirePlatformResolution:e}))}catch(e){throw U(`Failed to create virtual code for:`,t,`:`,e),e}}},updateVirtualCode(e,t,n){if(t instanceof q)return V(`Updating existing virtual code for:`,t.fileName),t.update(n),t},typescript:{resolveHiddenExtensions:!0,extraFileExtensions:G.map(e=>({extension:e.slice(1),isMixedContent:!1,scriptKind:7})),getServiceScript(e){for(let t of(0,w.forEachEmbeddedCode)(e))if(t.languageId===`tsrx`)return{code:t,extension:`.tsx`,scriptKind:4}},...process.env.TSRX_TSC===`true`?null:{getExtraServiceScripts(e,t){let n=[];for(let r of(0,w.forEachEmbeddedCode)(t))r.languageId===`typescript`&&n.push({fileName:`${e}.${r.id}.ts`,code:r,extension:`.ts`,scriptKind:l.default.ScriptKind.TS});return n}}}}}var q=class{id=`root`;languageId=`tsrx`;codegenStacks=[];tsrx;platformProvider;generatedCode=``;embeddedCodes=[];mappings=[];fatalErrors=[];usageErrors=[];snapshot;sourceSnapshot;originalCode=``;sourceAst=null;isDotCompletionMode=!1;diagnostics=[];#e=null;#t=null;constructor(e,t,n,r){if(V(`Initializing TSRXVirtualCode for:`,e),this.fileName=e,this.tsrx=n,this.platformProvider=r,this.snapshot=t,this.sourceSnapshot=t,this.originalCode=t.getText(0,t.getLength()),!n||typeof n.compile_to_volar_mappings!=`function`)throw U(`Invalid TSRX compiler - missing compile_to_volar_mappings method`),Error(`Invalid TSRX compiler`);this.update(t)}update(e){V(`Updating virtual code for:`,this.fileName);let t=e.getText(0,e.getLength()),n=e.getChangeRange(this.sourceSnapshot);this.sourceSnapshot=e,this.#e=null,this.#t=null,this.fatalErrors=[],this.usageErrors=[],this.sourceAst=null,this.isDotCompletionMode=!1;let r,i=!1,a=-1;if(V(`changeRange:`,JSON.stringify(n)),n){let e=n.span.start,r=e+n.span.length,o=e+n.newLength,s=this.originalCode.substring(e,r),c=t.substring(e,o);if(V(`Change details:`),V(` Position:`,e,`-`,r,`(length:`,n.span.length,`)`),V(` Old text:`,JSON.stringify(s)),V(` New text:`,JSON.stringify(c),`(length:`,n.newLength,`)`),c.endsWith(`.`)){let e=o>1?t[o-2]:``;V(` Char before dot:`,JSON.stringify(e)),/[$#_\u200C\u200D\p{ID_Continue}\)\]\}]/u.test(e)&&(i=!0,a=o-1,V(`ChangeRange detected dot typed at position`,a))}}try{let e=this.platformProvider?.(fe(t));if(i&&a>=0){this.isDotCompletionMode=!0;let n=t.substring(0,a)+t.substring(a+1);if(V(`Compiling without typed dot at position`,a),r=this.tsrx.compile_to_volar_mappings(n,this.fileName,{loose:!0,platform:e}),V(`Compilation without dot successful`),r&&r.code&&r.mappings.length>0){let e=ge(r,a);e===null?H(`Failed to restore typed dot into transpiled output`):V(`Inserted typed dot at generated position`,e)}}else V(`Compiling TSRX code...`),r=this.tsrx.compile_to_volar_mappings(t,this.fileName,{loose:!0,platform:e}),V(`Compilation successful, generated code length:`,r?.code?.length||0)}catch(e){let t=e;U(`TSRX compilation failed for`,this.fileName,`:`,t),process.env.TSRX_TSC===`true`&&Y(this.fileName,[t]),t.type=`fatal`,this.fatalErrors.push(t)}if(r&&r.code){this.originalCode=t,this.generatedCode=r.code,this.mappings=r.mappings??[],this.usageErrors=r.errors,this.sourceAst=r.sourceAst,process.env.TSRX_TSC===`true`&&r.errors.length>0&&Y(this.fileName,r.errors);let e=r.cssMappings,n=r.scriptMappings??[];if(e.length>0||n.length>0){V(`Creating`,e.length,`CSS and`,n.length,`script embedded codes`);let t=[];for(let n of e)t.push(X(n,`css`));for(let e of n)t.push(X(e,`typescript`));this.embeddedCodes=t}else this.embeddedCodes=[];if(O){V(`CSS embedded codes:`,(this.embeddedCodes||[]).length),V(`Using transpiled code, mapping count:`,this.mappings.length),V(`Original code length:`,t.length),V(`Generated code length:`,this.generatedCode.length),V(`Last 100 chars of original:`,JSON.stringify(t.slice(-100))),V(`Last 200 chars of generated:`,JSON.stringify(this.generatedCode.slice(-200))),V(`Last few mappings:`);let e=Math.max(0,this.mappings.length-5);for(let t=e;t<this.mappings.length;t++){let e=this.mappings[t];V(` Mapping ${t}: source[${e.sourceOffsets[0]}:${e.sourceOffsets[0]+e.lengths[0]}] -> gen[${e.generatedOffsets[0]}:${e.generatedOffsets[0]+e.lengths[0]}], len=${e.lengths[0]}, completion=${e.data?.completion}`)}}this.snapshot={getText:(e,t)=>this.generatedCode.substring(e,t),getLength:()=>this.generatedCode.length,getChangeRange:()=>void 0}}else V(`Compilation failed, only display where the compilation error occurred.`),this.originalCode=t,this.generatedCode=t,this.mappings=[{sourceOffsets:[0],generatedOffsets:[0],lengths:[t.length],generatedLengths:[t.length],data:{completion:!0,verification:!0,customData:{}}}],this.embeddedCodes=[...me(t),...he(t)],this.snapshot={getText:(e,t)=>this.generatedCode.substring(e,t),getLength:()=>this.generatedCode.length,getChangeRange:()=>void 0}}#n(){if(!(this.#e||this.#t)){this.#e=new Map,this.#t=new Map;for(var e,t,n,r,i,a,o,s,c,l=0;l<this.mappings.length;l++)e=this.mappings[l],t=e.generatedOffsets[0],n=e.generatedLengths[0],r=t+n,i=`${t}-${r}`,this.#e.set(i,e),a=e.sourceOffsets[0],o=e.lengths[0],s=a+o,c=`${a}-${s}`,this.#t.set(c,e)}}findMappingByGeneratedRange(e,t){return this.#n(),this.#e.get(`${e}-${t}`)??null}findMappingBySourceRange(e,t){return this.#n(),this.#t.get(`${e}-${t}`)??null}findGeneratedRangeBySourceRange(e,t){let n=null,r=null;for(let i=0;i<this.mappings.length;i++){let a=this.mappings[i],o=a.sourceOffsets[0],s=o+a.lengths[0];s<=e||o>=t||((!n||o<n.sourceOffsets[0])&&(n=a),(!r||s>r.sourceOffsets[0]+r.lengths[0])&&(r=a))}if(!n||!r)return null;let i=n.generatedOffsets[0]+J(e-n.sourceOffsets[0],n.generatedLengths[0]),a=r.generatedOffsets[0]+J(t-r.sourceOffsets[0],r.generatedLengths[0]);return[i,Math.max(a,i+1)]}};function J(e,t){return Math.min(Math.max(e,0),t)}function Y(e,t){for(let n of t){let t=n&&typeof n==`object`&&`message`in n?String(n.message):String(n),r=`${e}\0${t}`;W.has(r)||(W.add(r),console.error(`[tsrx-tsc] ${e}: ${t}`))}}function me(e){let t=[],n=/<style\b((?:[^>"'{}/]|"[^"]*"|'[^']*'|\{(?:[^{}]|\{[^{}]*\})*\}|\/(?!>))*)>([\s\S]*?)<\/style>/gi,r,i=0;for(;(r=n.exec(e))!==null;){let e=r[1],n=r[2],a=r.index+(6+e.length+1),o=n.length,s=`style_${i}`;V(`Extracted CSS region ${i}: offset ${a}, length ${o}`);let c={sourceOffsets:[a],generatedOffsets:[0],lengths:[o],generatedLengths:[o],data:{verification:!0,completion:!0,semantic:!0,navigation:!0,structure:!0,format:!1,customData:{content:n,embeddedId:s}}};t.push(X(c,`css`)),i++}return t.length>0&&V(`Extracted ${t.length} CSS embedded codes from style tags`),t}function X(e,t){let n=e.data?.customData?.content??``;return{id:e.data?.customData?.embeddedId,languageId:t,snapshot:{getText:(e,t)=>n.substring(e,t),getLength:()=>e.lengths[0],getChangeRange:()=>void 0},mappings:[e],embeddedCodes:[]}}function he(e){let t=[],n=/<script\b((?:[^>"'/]|"[^"]*"|'[^']*'|\/(?!>))*)>([\s\S]*?)<\/script>/gi,r,i=0;for(;(r=n.exec(e))!==null;){let e=r[1],n=r[2],a=r.index+(7+e.length+1),o=n.length,s=`script_${i}`;V(`Extracted script region ${i}: offset ${a}, length ${o}`);let c={sourceOffsets:[a],generatedOffsets:[0],lengths:[o],generatedLengths:[o],data:{verification:!0,completion:!0,semantic:!0,navigation:!0,structure:!0,format:!1,customData:{content:n,embeddedId:s}}};t.push(X(c,`typescript`)),i++}return t.length>0&&V(`Extracted ${t.length} script embedded codes from script tags`),t}function ge(e,t){let n=null;for(let r of e.mappings)if(r.sourceOffsets[0]+r.lengths[0]===t){n=r;break}if(!n)return null;let r=n.generatedLengths[0],i=n.generatedOffsets[0]+r;e.code=e.code.substring(0,i)+`.`+e.code.substring(i);let a={sourceOffsets:[t],generatedOffsets:[i],lengths:[1],generatedLengths:[1],data:{...n.data}},o=e.mappings.indexOf(n);e.mappings.splice(o+1,0,a);for(let r of e.mappings)r!==n&&r!==a&&r.generatedOffsets[0]>=i&&(r.generatedOffsets[0]+=1),r!==n&&r!==a&&r.sourceOffsets[0]>=t&&(r.sourceOffsets[0]+=1);return i}const _e=new Map,Z=new Map;function ve(e){return typeof e==`string`?e:e.fsPath.replace(/\\/g,`/`)}function Q(e,t=u.default.existsSync){let n=e,r=[];for(;n;){if(Z.has(n)){let e=Z.get(n)??null;for(let t of r)Z.set(t,e);return e}r.push(n);let e=d.default.join(n,`package.json`);if(t(e))try{let t=JSON.parse(u.default.readFileSync(e,`utf8`)),n=new Set([...Object.keys(t.dependencies??{}),...Object.keys(t.devDependencies??{}),...Object.keys(t.peerDependencies??{}),...Object.keys(t.optionalDependencies??{})]),i={name:typeof t.name==`string`?t.name:null,dependencies:n};for(let e of r)Z.set(e,i);return i}catch{for(let e of r)Z.set(e,null);return null}let i=d.default.dirname(n);if(i===n)break;n=i}for(let e of r)Z.set(e,null);return null}function $(e,t,n){if(!e)return!1;if(e.name===t||n.includes(e.name??``)||e.dependencies.has(t))return!0;for(let t of n)if(e.dependencies.has(t))return!0;return!1}function ye(e,t){let n=Se(e,t);if(n)return be(ce(n))}function be(e){return typeof e?.compile_to_volar_mappings!=`function`&&typeof e?.compileToVolarMappings==`function`?{...e,compile_to_volar_mappings:e.compileToVolarMappings}:e}function xe(e,t=u.default.existsSync,n=_e){let r=e.split(`/`),i=d.default.extname(e);for(let e=r.length-2;e>=0;e--){let a=r.slice(0,e+1).join(`/`),o=a+`\0`+i;if(!n.has(o)){let e=[];for(let[n,r,o,s,c=ue]of K)if(o.includes(i))for(let i of c){let o=[a,...r,...i].join(`/`);if(t(o)){e.push([n,o,s]);break}}let r=null;if(e.length>0){let n=Q(a,t);r=e.find(([e,,t])=>$(n,e,t))?.[1]??e[0][1],V(`Found tsrx compiler at:`,r,`for extension:`,i)}n.set(o,r)}let s=n.get(o);if(s)return s}}function Se(e,t){let n=d.default.extname(e),r=oe(e,t);if(r!==void 0)return r??void 0;let i=Q(d.default.dirname(e)),a=xe(e);if(a)return a;let o=`No supported tsrx compiler found in workspace for ${e}.`,s=le;for(;s;){let e=[];for(let[t,r,i,a,o=ue]of K){if(!i.includes(n))continue;let c=d.default.join(s,...r);for(let n of o){let r=d.default.join(c,...n);if(u.default.existsSync(r)){e.push([t,r,a]);break}}}if(e.length>0){let t=e.find(([e,,t])=>$(i,e,t))?.[1]??e[0][1];return H(`${o} Using packaged version at ${t}`),t}let t=d.default.dirname(s);if(t===s)break;s=t}}Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return pe}});
11
+ //# sourceMappingURL=language-CofXAudP.js.map
@@ -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, 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.
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
@@ -69,3 +72,8 @@ patchedDependencies:
69
72
  # and the flexbox common measure-spec — applied to the @11468 preview. iOS/Android
70
73
  # impl-file hunks are dead code on windows and were dropped.
71
74
  "@nativescript/core@9.1.3-next.2": patches/@nativescript__core@9.1.3-next.2.patch
75
+ # Enables `resolveHiddenExtensions` on the language plugin's typescript facet so
76
+ # extensionless specifiers (e.g. './Text') probe `.tsrx` after moduleSuffixes — required
77
+ # for a single extensionless shared barrel to resolve per-platform leaves under tsrx-tsc
78
+ # and the IDE plugin.
79
+ "@tsrx/typescript-plugin@0.4.11": patches/@tsrx__typescript-plugin@0.4.11.patch