@neural-ui/native 0.1.0-beta.2 → 0.1.0-beta.4

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 CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Neural Native brings the Neural visual language to [Angular Native](https://ng-native.com): 64 mobile component entries, Angular signals, typed APIs, shared themes and modular imports.
6
6
 
7
- **Public beta: `0.1.0-beta.2`.** APIs and framework compatibility may change before 1.0. Pin the version in your application lockfile and check compatibility before updating Angular Native.
7
+ **Public beta: `0.1.0-beta.4`.** APIs and framework compatibility may change before 1.0. Pin the version in your application lockfile and check compatibility before updating Angular Native.
8
8
 
9
9
  ## Documentation
10
10
 
@@ -18,20 +18,21 @@ Neural Native brings the Neural visual language to [Angular Native](https://ng-n
18
18
  Start with the compatible Angular Native template:
19
19
 
20
20
  ```sh
21
- npx create-expo-app@latest my-neural-app --template @ng-native/template@0.18.2
21
+ npx create-expo-app@latest my-neural-app --template @ng-native/template@0.19.2
22
22
  cd my-neural-app
23
23
  npm install @neural-ui/native@beta
24
24
  ```
25
25
 
26
- In an existing Angular Native 0.18.2 application, run only the last command. The beta is published under the npm `beta` tag; `@beta` is intentional.
26
+ In an existing Angular Native 0.19.2 application, run only the last command. The beta is published under the npm `beta` tag; `@beta` is intentional. Applications on Angular Native 0.18.2 should keep Neural Native 0.1.0-beta.2 until they update the framework.
27
27
 
28
28
  ### Compatibility
29
29
 
30
30
  | Dependency | This beta |
31
31
  | --- | --- |
32
- | Angular Native packages | 0.18.2 |
32
+ | Angular Native packages | 0.19.2 |
33
33
  | Angular | 22.2.2 tested; peers >=22.2.0 <23 |
34
34
  | Expo / React Native | 57.0.27 / 0.86.3 tested application baseline |
35
+ | Current framework template | Expo 58.0.16 / React Native 0.88.0: consumer tests and iOS/Android bundles verified |
35
36
  | react-native-svg | 15.15.4 |
36
37
  | TypeScript | 6.0.3 development baseline |
37
38
  | Node.js | 22.22.3 or 24.15+ development baseline |
@@ -177,7 +178,7 @@ Neural Native is maintained by Pedro Moreno Trujillo and shares its visual ident
177
178
 
178
179
  ## Español
179
180
 
180
- Neural Native ofrece componentes Angular nativos para iOS y Android. Esta primera Beta se instala con `npm install @neural-ui/native@beta` sobre una aplicación Angular Native 0.18.2. Los controles utilizan signals, un tema compartido e imports modulares; tu aplicación conserva el estado y decide cómo guardar los datos.
181
+ Neural Native ofrece componentes Angular nativos para iOS y Android. Esta beta.4 se instala con `npm install @neural-ui/native@beta` sobre una aplicación Angular Native 0.19.2. Si tu aplicación utiliza Angular Native 0.18.2, conserva Neural Native 0.1.0-beta.2 hasta actualizar el framework. Los controles utilizan signals, un tema compartido e imports modulares; tu aplicación conserva el estado y decide cómo guardar los datos.
181
182
 
182
183
  ## License
183
184
 
@@ -1 +1 @@
1
- {"version":3,"file":"data-view.js","sourceRoot":"","sources":["../../src/data-view/data-view.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,KAAK,EACL,KAAK,EACL,MAAM,EACN,QAAQ,EACR,MAAM,GAEP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,MAAM,oCAAoC,CAAC;AACrF,OAAO,EAAa,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,E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AAG,CAAC,IAAI,CAAC,CAAC;IACpF,CAAC;kFAAC,CAAC;IACO,MAAM,CAAC,IAAe;QAC9B,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACrE,CAAC;uGAzCU,oBAAoB;2FAApB,oBAAoB,ugDAIa,wBAAwB,gEArD1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA6CF,4wIA1DE,0BAA0B,+FAClC,IAAI,iDACJ,IAAI,mYACJ,SAAS,mIACT,SAAS,+EACT,6BAA6B,oIAC7B,aAAa,4DACb,gBAAgB,oJAChB,sBAAsB,sJACtB,oBAAoB,wKACpB,iBAAiB,qMACjB,sBAAsB;;2FAmDb,oBAAoB;kBAhEhC,SAAS;+BACE,eAAe,WAChB,CAAC,0BAA0B;wBAClC,IAAI;wBACJ,IAAI;wBACJ,SAAS;wBACT,SAAS;wBACT,6BAA6B;wBAC7B,aAAa;wBACb,gBAAgB;wBAChB,sBAAsB;wBACtB,oBAAoB;wBACpB,iBAAiB;wBACjB,sBAAsB;qBACvB,YACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA6CF;kSAQoC,wBAAwB","sourcesContent":["import {\n booleanAttribute,\n Component,\n contentChild,\n input,\n model,\n output,\n computed,\n inject,\n TemplateRef,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { View, Text } from '@ng-native/components';\nimport { NeuNativePressable as Pressable } from '../foundation/native-pressable.js';\nimport { AnimatedStyle } from '@ng-native/components/animations';\nimport { NeuDataViewRowMotionDirective } from './data-view-row.js';\nimport { NeuNativeTextInput as TextInput } from '../foundation/native-text-input.js';\nimport { NeuOption, uniqueOptions } from '../foundation/mobile.js';\nimport { NeuIconButtonComponent } from '../icon-button/icon-button.js';\nimport { NeuSkeletonComponent } from '../skeleton/skeleton.js';\nimport { NeuAlertComponent } from '../alert/alert.js';\nimport { NeuEmptyStateComponent } from '../empty-state/empty-state.js';\nimport { NEU_LIGHT_TOKENS, NEU_THEME } from '../foundation/index.js';\n\nimport { NeuNativeTextSyncDirective } from '../foundation/native-text-sync.js';\n\nimport { NeuDataViewItemDirective, type NeuDataViewItemContext } from './data-view-templates.js';\nexport type { NeuDataViewItemContext } from './data-view-templates.js';\n\n@Component({\n selector: 'neu-data-view',\n imports: [NeuNativeTextSyncDirective, \n View,\n Text,\n TextInput,\n Pressable,\n NeuDataViewRowMotionDirective,\n AnimatedStyle,\n NgTemplateOutlet,\n NeuIconButtonComponent,\n NeuSkeletonComponent,\n NeuAlertComponent,\n NeuEmptyStateComponent,\n ],\n template: `<view class=\"stack\"\n ><view class=\"data-toolbar\"\n ><neu-icon-button\n [label]=\"sortLabel()\"\n [svg]=\"sortIcon\"\n tone=\"neutral\"\n variant=\"text\"\n (pressed)=\"descending.update(invert)\" /><neu-icon-button\n [label]=\"refreshLabel()\"\n [svg]=\"refreshIcon\"\n tone=\"neutral\"\n variant=\"text\"\n [disabled]=\"loading()\"\n (pressed)=\"refresh.emit()\"\n /></view>\n <text-input\n neuSyncText\n #textSync=\"neuSyncText\"\n (changeText)=\"textSync.synchronize()\"\n class=\"control\"\n [neuralValue]=\"query()\"\n (neuralValueChange)=\"query.set($event)\"\n [accessibilityLabel]=\"searchLabel()\"\n [placeholder]=\"searchLabel()\"\n [placeholderTextColor]=\"mutedColor()\"\n />\n @if (loading()) {\n <neu-skeleton />\n } @else if (error()) {\n <neu-alert [message]=\"error()\" />\n } @else {\n @for (item of displayed(); track item.id) {\n <pressable class=\"data-item\" [neuDataRowIndex]=\"$index\" #rowMotion=\"neuDataRowMotion\"\n [animatedStyle]=\"rowMotion.animated\" [class.surface]=\"!resolvedItemTemplate()\" [class.outline]=\"!resolvedItemTemplate()\"\n accessibilityRole=\"button\" [accessibilityLabel]=\"item.label\" [disabled]=\"!!item.disabled\" (press)=\"choose(item)\">\n @if (resolvedItemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: item, index: $index }\" />\n } @else {\n <text class=\"title\">{{ item.label }}</text><text class=\"muted\">{{ item.description }}</text>\n }\n </pressable>\n } @empty {\n <neu-empty-state [title]=\"emptyLabel()\" />\n }\n }\n </view>`,\n styleUrl: '../foundation/mobile.css',\n styles: '.data-item { min-width: 0; } .data-toolbar { flex-direction: row; justify-content: flex-end; gap: 4px; }',\n})\nexport class NeuDataViewComponent {\n readonly items = input<readonly NeuOption[]>([]);\n /** Explicit template takes precedence over a projected neuDataViewItem. */\n readonly itemTemplate = input<TemplateRef<NeuDataViewItemContext>>();\n private readonly itemContent = contentChild(NeuDataViewItemDirective);\n protected readonly resolvedItemTemplate = computed(() => this.itemTemplate() ?? this.itemContent()?.templateRef);\n readonly query = model('');\n readonly descending = model(false);\n readonly loading = input(false, { transform: booleanAttribute });\n readonly error = input('');\n readonly searchLabel = input('Search items');\n readonly sortLabel = input('Reverse order');\n readonly refreshLabel = input('Refresh');\n readonly emptyLabel = input('No items');\n readonly selected = output<string>();\n readonly refresh = output<void>();\n protected readonly sortIcon = '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m7 4-3 3m3-3 3 3M7 4v16m10 0-3-3m3 3 3-3M17 4v16\"/></svg>';\n protected readonly refreshIcon = '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 12a9 9 0 0 1 15.4-6.4L21 8M21 3v5h-5M21 12a9 9 0 0 1-15.4 6.4L3 16M3 21v-5h5\"/></svg>';\n private readonly theme = inject(NEU_THEME, { optional: true });\n protected readonly mutedColor = computed(\n () => (this.theme?.() ?? NEU_LIGHT_TOKENS).muted,\n );\n protected readonly invert = (x: boolean) => !x;\n private readonly searchable = computed(() =>\n uniqueOptions(this.items()).map((item) => ({\n item,\n text: (item.label + ' ' + (item.description ?? '')).toLocaleLowerCase(),\n })),\n );\n private readonly sorted = computed(() => {\n const direction = this.descending() ? -1 : 1;\n return [...this.searchable()].sort(\n (a, b) => a.item.label.localeCompare(b.item.label) * direction,\n );\n });\n protected readonly displayed = computed(() => {\n const q = this.query().trim().toLocaleLowerCase();\n return this.sorted().filter((row) => row.text.includes(q)).map((row) => row.item);\n });\n protected choose(item: NeuOption): void {\n if (!item.disabled && !this.loading()) this.selected.emit(item.id);\n }\n}\n"]}
1
+ {"version":3,"file":"data-view.js","sourceRoot":"","sources":["../../src/data-view/data-view.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,KAAK,EACL,KAAK,EACL,MAAM,EACN,QAAQ,EACR,MAAM,GAEP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,MAAM,oCAAoC,CAAC;AACrF,OAAO,EAAa,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,gBAA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,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACrE,CAAC;uGAzCU,oBAAoB;2FAApB,oBAAoB,ugDAIa,wBAAwB,gEArD1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA6CF,4wIA1DE,0BAA0B,+FAClC,IAAI,iDACJ,IAAI,mYACJ,SAAS,mIACT,SAAS,+EACT,6BAA6B,oIAC7B,aAAa,4DACb,gBAAgB,oJAChB,sBAAsB,sJACtB,oBAAoB,wKACpB,iBAAiB,qMACjB,sBAAsB;;2FAmDb,oBAAoB;kBAhEhC,SAAS;+BACE,eAAe,WAChB,CAAC,0BAA0B;wBAClC,IAAI;wBACJ,IAAI;wBACJ,SAAS;wBACT,SAAS;wBACT,6BAA6B;wBAC7B,aAAa;wBACb,gBAAgB;wBAChB,sBAAsB;wBACtB,oBAAoB;wBACpB,iBAAiB;wBACjB,sBAAsB;qBACvB,YACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA6CF;kSAQoC,wBAAwB","sourcesContent":["import {\n booleanAttribute,\n Component,\n contentChild,\n input,\n model,\n output,\n computed,\n inject,\n TemplateRef,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { View, Text } from '@ng-native/components';\nimport { NeuNativePressable as Pressable } from '../foundation/native-pressable.js';\nimport { AnimatedStyle } from '@ng-native/components/animations';\nimport { NeuDataViewRowMotionDirective } from './data-view-row.js';\nimport { NeuNativeTextInput as TextInput } from '../foundation/native-text-input.js';\nimport { NeuOption, uniqueOptions } from '../foundation/mobile.js';\nimport { NeuIconButtonComponent } from '../icon-button/icon-button.js';\nimport { NeuSkeletonComponent } from '../skeleton/skeleton.js';\nimport { NeuAlertComponent } from '../alert/alert.js';\nimport { NeuEmptyStateComponent } from '../empty-state/empty-state.js';\nimport { NEU_LIGHT_TOKENS, NEU_THEME } from '../foundation/index.js';\n\nimport { NeuNativeTextSyncDirective } from '../foundation/native-text-sync.js';\n\nimport { NeuDataViewItemDirective, type NeuDataViewItemContext } from './data-view-templates.js';\nexport type { NeuDataViewItemContext } from './data-view-templates.js';\n\n@Component({\n selector: 'neu-data-view',\n imports: [NeuNativeTextSyncDirective,\n View,\n Text,\n TextInput,\n Pressable,\n NeuDataViewRowMotionDirective,\n AnimatedStyle,\n NgTemplateOutlet,\n NeuIconButtonComponent,\n NeuSkeletonComponent,\n NeuAlertComponent,\n NeuEmptyStateComponent,\n ],\n template: `<view class=\"stack\"\n ><view class=\"data-toolbar\"\n ><neu-icon-button\n [label]=\"sortLabel()\"\n [svg]=\"sortIcon\"\n tone=\"neutral\"\n variant=\"text\"\n (pressed)=\"descending.update(invert)\" /><neu-icon-button\n [label]=\"refreshLabel()\"\n [svg]=\"refreshIcon\"\n tone=\"neutral\"\n variant=\"text\"\n [disabled]=\"loading()\"\n (pressed)=\"refresh.emit()\"\n /></view>\n <text-input\n neuSyncText\n #textSync=\"neuSyncText\"\n (changeText)=\"textSync.synchronize()\"\n class=\"control\"\n [neuralValue]=\"query()\"\n (neuralValueChange)=\"query.set($event)\"\n [accessibilityLabel]=\"searchLabel()\"\n [placeholder]=\"searchLabel()\"\n [placeholderTextColor]=\"mutedColor()\"\n />\n @if (loading()) {\n <neu-skeleton />\n } @else if (error()) {\n <neu-alert [message]=\"error()\" />\n } @else {\n @for (item of displayed(); track item.id) {\n <pressable class=\"data-item\" [neuDataRowIndex]=\"$index\" #rowMotion=\"neuDataRowMotion\"\n [animatedStyle]=\"rowMotion.animated\" [class.surface]=\"!resolvedItemTemplate()\" [class.outline]=\"!resolvedItemTemplate()\"\n accessibilityRole=\"button\" [accessibilityLabel]=\"item.label\" [disabled]=\"!!item.disabled\" (press)=\"choose(item)\">\n @if (resolvedItemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: item, index: $index }\" />\n } @else {\n <text class=\"title\">{{ item.label }}</text><text class=\"muted\">{{ item.description }}</text>\n }\n </pressable>\n } @empty {\n <neu-empty-state [title]=\"emptyLabel()\" />\n }\n }\n </view>`,\n styleUrl: '../foundation/mobile.css',\n styles: '.data-item { min-width: 0; } .data-toolbar { flex-direction: row; justify-content: flex-end; gap: 4px; }',\n})\nexport class NeuDataViewComponent {\n readonly items = input<readonly NeuOption[]>([]);\n /** Explicit template takes precedence over a projected neuDataViewItem. */\n readonly itemTemplate = input<TemplateRef<NeuDataViewItemContext>>();\n private readonly itemContent = contentChild(NeuDataViewItemDirective);\n protected readonly resolvedItemTemplate = computed(() => this.itemTemplate() ?? this.itemContent()?.templateRef);\n readonly query = model('');\n readonly descending = model(false);\n readonly loading = input(false, { transform: booleanAttribute });\n readonly error = input('');\n readonly searchLabel = input('Search items');\n readonly sortLabel = input('Reverse order');\n readonly refreshLabel = input('Refresh');\n readonly emptyLabel = input('No items');\n readonly selected = output<string>();\n readonly refresh = output<void>();\n protected readonly sortIcon = '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m7 4-3 3m3-3 3 3M7 4v16m10 0-3-3m3 3 3-3M17 4v16\"/></svg>';\n protected readonly refreshIcon = '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 12a9 9 0 0 1 15.4-6.4L21 8M21 3v5h-5M21 12a9 9 0 0 1-15.4 6.4L3 16M3 21v-5h5\"/></svg>';\n private readonly theme = inject(NEU_THEME, { optional: true });\n protected readonly mutedColor = computed(\n () => (this.theme?.() ?? NEU_LIGHT_TOKENS).muted,\n );\n protected readonly invert = (x: boolean) => !x;\n private readonly searchable = computed(() =>\n uniqueOptions(this.items()).map((item) => ({\n item,\n text: (item.label + ' ' + (item.description ?? '')).toLocaleLowerCase(),\n })),\n );\n private readonly sorted = computed(() => {\n const direction = this.descending() ? -1 : 1;\n return [...this.searchable()].sort(\n (a, b) => a.item.label.localeCompare(b.item.label) * direction,\n );\n });\n protected readonly displayed = computed(() => {\n const q = this.query().trim().toLocaleLowerCase();\n return this.sorted().filter((row) => row.text.includes(q)).map((row) => row.item);\n });\n protected choose(item: NeuOption): void {\n if (!item.disabled && !this.loading()) this.selected.emit(item.id);\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neural-ui/native",
3
- "version": "0.1.0-beta.2",
3
+ "version": "0.1.0-beta.4",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Signals-first native Angular components for iOS and Android.",
@@ -287,10 +287,10 @@
287
287
  "peerDependencies": {
288
288
  "@angular/common": ">=22.2.0 <23",
289
289
  "@angular/core": ">=22.2.0 <23",
290
- "@ng-native/components": "0.18.2",
291
- "@ng-native/fabric": "0.18.2",
292
- "@ng-native/device": "0.18.2",
293
- "@ng-native/icons": "0.18.2",
290
+ "@ng-native/components": "0.19.2",
291
+ "@ng-native/fabric": "0.19.2",
292
+ "@ng-native/device": "0.19.2",
293
+ "@ng-native/icons": "0.19.2",
294
294
  "react-native-svg": "15.15.4"
295
295
  },
296
296
  "dependencies": {
@@ -299,7 +299,8 @@
299
299
  },
300
300
  "devDependencies": {
301
301
  "@angular/compiler-cli": "22.2.2",
302
- "@ng-native/testing": "0.18.2",
302
+ "@babel/core": "7.29.7",
303
+ "@ng-native/testing": "0.19.2",
303
304
  "@vitest/coverage-v8": "5.0.3",
304
305
  "vitest": "5.0.3"
305
306
  },