@octane-xplat/ui 0.1.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.
@@ -0,0 +1,8 @@
1
+ {
2
+ "version": 1,
3
+ "buildId": "e5d5a76e-91b1-4920-b8b5-b59d15b06d53",
4
+ "mode": "production",
5
+ "capabilities": {
6
+ "independentHydration": false
7
+ }
8
+ }
@@ -0,0 +1,19 @@
1
+ import { View } from "./ui2.js";
2
+ import { Row } from "./ui3.js";
3
+ import { Text } from "./ui4.js";
4
+ import { Pressable } from "./ui5.js";
5
+ import { TextInput } from "./ui6.js";
6
+ import { List } from "./ui7.js";
7
+ import { ScrollView } from "./ui8.js";
8
+ import { Image } from "./ui9.js";
9
+ import { Modal } from "./ui10.js";
10
+ import { useAnimation } from "./ui11.js";
11
+ import { getColorScheme, useColorScheme } from "./ui12.js";
12
+ import { styled } from "./ui13.js";
13
+ import { Screen } from "./ui14.js";
14
+ import { getStack, registerStack, stackEntries } from "./ui15.js";
15
+ import { Tabs } from "./ui16.js";
16
+ import { Switch } from "./ui17.js";
17
+ import { PlatformBadge } from "./ui18.js";
18
+ import { currentRoute, pushRoute, routeFor, useRoute } from "./ui19.js";
19
+ export { View as Column, Image, List, Modal, PlatformBadge, Pressable, Row, Screen, ScrollView, Switch, Tabs, Text, TextInput, View, currentRoute, getColorScheme, getStack, pushRoute, registerStack, routeFor, stackEntries, styled, useAnimation, useColorScheme, useRoute };
@@ -0,0 +1,52 @@
1
+ import { createNativeScriptRoot, defineUniversalComponent, hookSlots, universalPlan, universalValue, useEffect, useRef } from "@nativescript-community/octane";
2
+ import { ContentView, Frame } from "@nativescript/core";
3
+ //#region src/Modal.native.tsrx
4
+ var _hs$ = /* @__PURE__ */ hookSlots(2);
5
+ var _h$0 = /* @__PURE__ */ Symbol(_hs$);
6
+ var _h$1 = /* @__PURE__ */ Symbol(_hs$ + 1);
7
+ var __octaneUniversalPlan0 = universalPlan("nativescript", {
8
+ "kind": "range",
9
+ "children": [{
10
+ "kind": "slot",
11
+ "slot": 0
12
+ }]
13
+ });
14
+ var __octaneUniversalPlan1 = universalPlan("nativescript", {
15
+ "kind": "range",
16
+ "children": []
17
+ });
18
+ var Panel = defineUniversalComponent("nativescript", function Panel(props) {
19
+ return universalValue(__octaneUniversalPlan0, [props.children]);
20
+ }, { "module": "@nativescript-community/octane" });
21
+ var Modal = defineUniversalComponent("nativescript", function Modal(props) {
22
+ const shown = useRef(null, _h$0);
23
+ useEffect(() => {
24
+ if (props.open && !shown.current) {
25
+ const presenter = Frame.topmost()?.currentPage ?? Frame.topmost();
26
+ if (!presenter) return;
27
+ const host = new ContentView();
28
+ const root = createNativeScriptRoot(host);
29
+ shown.current = {
30
+ host,
31
+ root
32
+ };
33
+ root.render(Panel, { children: props.children });
34
+ presenter.showModal(host, {
35
+ context: {},
36
+ closeCallback: () => {
37
+ shown.current = null;
38
+ props.onClose?.();
39
+ },
40
+ fullscreen: props.fullscreen ?? true,
41
+ animated: true
42
+ });
43
+ } else if (!props.open && shown.current) {
44
+ const { host } = shown.current;
45
+ shown.current = null;
46
+ host.closeModal();
47
+ }
48
+ }, [props.open], _h$1);
49
+ return universalValue(__octaneUniversalPlan1, []);
50
+ }, { "module": "@nativescript-community/octane" });
51
+ //#endregion
52
+ export { Modal };
@@ -0,0 +1,58 @@
1
+ import { hookSlots, useRef } from "@nativescript-community/octane";
2
+ import { cancelAnimationFrame, requestAnimationFrame } from "@nativescript/core/animation-frame";
3
+ //#region src/anim.native.tsrx
4
+ var _h$0 = /* @__PURE__ */ Symbol(/* @__PURE__ */ hookSlots(1));
5
+ function createAnimated(initial, prop) {
6
+ let view = null;
7
+ let current = initial;
8
+ let raf = 0;
9
+ const apply = (v) => {
10
+ current = v;
11
+ if (view) view[prop] = v;
12
+ };
13
+ const run = (step) => {
14
+ cancelAnimationFrame(raf);
15
+ const start = Date.now();
16
+ const tick = () => {
17
+ const v = step(Date.now() - start);
18
+ if (v === null) return;
19
+ apply(v);
20
+ raf = requestAnimationFrame(tick);
21
+ };
22
+ raf = requestAnimationFrame(tick);
23
+ };
24
+ return {
25
+ get value() {
26
+ return current;
27
+ },
28
+ bind(v) {
29
+ view = v;
30
+ if (view) view[prop] = current;
31
+ },
32
+ to(target, opts) {
33
+ const dur = opts?.duration ?? 300;
34
+ const from = current;
35
+ run((t) => t >= dur ? (apply(target), null) : from + (target - from) * (t / dur));
36
+ },
37
+ spring(target, opts) {
38
+ const damping = opts?.damping ?? 14, stiffness = opts?.stiffness ?? 120;
39
+ let v = 0, x = current;
40
+ run(() => {
41
+ const dt = 1 / 60;
42
+ v += (-stiffness * (x - target) - damping * v) * dt;
43
+ x += v * dt;
44
+ return Math.abs(v) < .5 && Math.abs(x - target) < .5 ? (apply(target), null) : x;
45
+ });
46
+ },
47
+ stop() {
48
+ cancelAnimationFrame(raf);
49
+ }
50
+ };
51
+ }
52
+ function useAnimation(initial = 0, prop = "translateX") {
53
+ const c = useRef(null, _h$0);
54
+ if (!c.current) c.current = createAnimated(initial, prop);
55
+ return c.current;
56
+ }
57
+ //#endregion
58
+ export { useAnimation };
@@ -0,0 +1,17 @@
1
+ import { hookSlots, useSyncExternalStore } from "@nativescript-community/octane";
2
+ import { Application } from "@nativescript/core";
3
+ //#region src/theme/colorScheme.native.tsrx
4
+ var _h$0 = /* @__PURE__ */ Symbol(/* @__PURE__ */ hookSlots(1));
5
+ function getColorScheme() {
6
+ return Application.primaryWindow?.systemAppearance?.() ?? Application.systemAppearance?.() ?? "light";
7
+ }
8
+ function subscribe(cb) {
9
+ const h = () => cb();
10
+ Application.on("systemAppearanceChanged", h);
11
+ return () => Application.off("systemAppearanceChanged", h);
12
+ }
13
+ function useColorScheme() {
14
+ return useSyncExternalStore(subscribe, getColorScheme, _h$0);
15
+ }
16
+ //#endregion
17
+ export { getColorScheme, useColorScheme };
@@ -0,0 +1,19 @@
1
+ import "@nativescript-community/octane";
2
+ import { defineUniversalComponent as defineUniversalComponent$1, universalComponent as universalComponent$1 } from "octane/universal";
3
+ //#region src/styled.native.tsrx
4
+ function styled(Base, def) {
5
+ function Styled(props) {
6
+ const cls = [def.base];
7
+ const rest = { ...props };
8
+ for (const k of Object.keys(def.variants ?? {})) {
9
+ if (props[k]) cls.push(def.variants[k]);
10
+ delete rest[k];
11
+ }
12
+ if (props.className) cls.push(props.className);
13
+ rest.className = cls;
14
+ return universalComponent$1("nativescript", Base, rest);
15
+ }
16
+ return defineUniversalComponent$1("nativescript", Styled);
17
+ }
18
+ //#endregion
19
+ export { styled };
@@ -0,0 +1,20 @@
1
+ import { defineUniversalComponent, universalPlan, universalValue } from "@nativescript-community/octane";
2
+ //#region src/Screen.native.tsrx
3
+ var __octaneUniversalPlan0 = universalPlan("nativescript", {
4
+ "kind": "host",
5
+ "type": "rootlayout",
6
+ "bindings": [["className", 0], ["style", 1]],
7
+ "children": [{
8
+ "kind": "slot",
9
+ "slot": 2
10
+ }]
11
+ });
12
+ var Screen = defineUniversalComponent("nativescript", function Screen(props) {
13
+ return universalValue(__octaneUniversalPlan0, [
14
+ props.className,
15
+ props.style,
16
+ props.children
17
+ ]);
18
+ }, { "module": "@nativescript-community/octane" });
19
+ //#endregion
20
+ export { Screen };
@@ -0,0 +1,19 @@
1
+ //#region src/stacks.native.ts
2
+ /** Named parallel stacks. A shell (Tabs with `stack` on a spec, the app
3
+ * entry's root frame) registers its Frame here; `navigate(name, params,
4
+ * {into})` resolves the target by name. Native-only concept — on web,
5
+ * parallel stacks map to nested routes (one linear URL stack). */
6
+ var stacks = /* @__PURE__ */ new Map();
7
+ function registerStack(name, frame) {
8
+ stacks.set(name, frame);
9
+ }
10
+ function getStack(name) {
11
+ return stacks.get(name);
12
+ }
13
+ /** All registered stacks in registration order — for hardware-back
14
+ * resolution (pop whichever stack is visibly on top). */
15
+ function stackEntries() {
16
+ return stacks.entries();
17
+ }
18
+ //#endregion
19
+ export { getStack, registerStack, stackEntries };
@@ -0,0 +1,143 @@
1
+ import { registerStack } from "./ui15.js";
2
+ import { createNativeScriptRoot, defineUniversalComponent, markWarm, memo, universalComponent, universalPlan, universalProps, universalValue, useBatch, warmChild } from "@nativescript-community/octane";
3
+ import { ContentView, Frame, Page, TabViewItem } from "@nativescript/core";
4
+ //#region src/Tabs.native.tsrx
5
+ var __octaneUniversalPlan0 = universalPlan("nativescript", {
6
+ "kind": "range",
7
+ "children": [{
8
+ "kind": "slot",
9
+ "slot": 0
10
+ }]
11
+ });
12
+ var __octaneUniversalPlan1 = universalPlan("nativescript", {
13
+ "kind": "host",
14
+ "type": "tabview",
15
+ "bindings": [
16
+ ["id", 0],
17
+ ["className", 1],
18
+ ["style", 2],
19
+ ["items", 3],
20
+ ["selectedIndex", 4],
21
+ ["onSelectedIndexChanged", 5],
22
+ ["onLoaded", 6]
23
+ ]
24
+ });
25
+ var __octaneUniversalPlan2 = universalPlan("nativescript", {
26
+ "kind": "slot",
27
+ "slot": 0
28
+ });
29
+ var TabPane = defineUniversalComponent("nativescript", function TabPane(props) {
30
+ return universalValue(__octaneUniversalPlan0, [props.render()]);
31
+ }, { "module": "@nativescript-community/octane" });
32
+ var paneRoots = /* @__PURE__ */ new WeakMap();
33
+ var tabsByView = /* @__PURE__ */ new WeakMap();
34
+ var itemsCache = /* @__PURE__ */ new WeakMap();
35
+ function itemsFor(tabs) {
36
+ let items = itemsCache.get(tabs);
37
+ if (items !== void 0) return items;
38
+ items = tabs.map((t) => {
39
+ const item = new TabViewItem();
40
+ item.title = t.title;
41
+ if (t.stack) {
42
+ const frame = new Frame();
43
+ frame.once("loaded", () => {
44
+ frame.navigate({ create: () => {
45
+ const page = new Page();
46
+ page.actionBarHidden = true;
47
+ createNativeScriptRoot(page).render(TabPane, { render: t.render });
48
+ return page;
49
+ } });
50
+ });
51
+ registerStack(t.stack, frame);
52
+ item.view = frame;
53
+ return item;
54
+ }
55
+ const cv = new ContentView();
56
+ tabsByView.set(cv, t.render);
57
+ item.view = cv;
58
+ return item;
59
+ });
60
+ itemsCache.set(tabs, items);
61
+ return items;
62
+ }
63
+ function mountPanes(e) {
64
+ const tv = e.object;
65
+ for (const item of tv.items) {
66
+ const cv = item.view;
67
+ if (!(cv instanceof ContentView) || paneRoots.has(cv)) continue;
68
+ const render = tabsByView.get(cv);
69
+ if (!render) continue;
70
+ const root = createNativeScriptRoot(cv);
71
+ paneRoots.set(cv, root);
72
+ root.render(TabPane, { render });
73
+ }
74
+ console.log("[probe] tabs mounted panes=" + tv.items.length);
75
+ }
76
+ var TabsInner = defineUniversalComponent("nativescript", function TabsInner(props) {
77
+ return universalValue(__octaneUniversalPlan1, [
78
+ props.id,
79
+ props.className,
80
+ props.style,
81
+ itemsFor(props.tabs),
82
+ props.selectedIndex,
83
+ (e) => props.onSelectedIndexChanged?.(e.value),
84
+ mountPanes
85
+ ]);
86
+ }, { "module": "@nativescript-community/octane" });
87
+ var MemoTabs = memo(TabsInner, (a, b) => a.tabs === b.tabs && a.selectedIndex === b.selectedIndex);
88
+ var Tabs = defineUniversalComponent("nativescript", markWarm(function Tabs(props) {
89
+ useBatch([], () => {
90
+ warmChild(MemoTabs, {
91
+ id: props.id,
92
+ className: props.className,
93
+ style: props.style,
94
+ tabs: props.tabs,
95
+ selectedIndex: props.selectedIndex,
96
+ onSelectedIndexChanged: props.onSelectedIndexChanged
97
+ });
98
+ });
99
+ return universalValue(__octaneUniversalPlan2, [universalComponent("nativescript", MemoTabs, universalProps([
100
+ [
101
+ "set",
102
+ "id",
103
+ props.id
104
+ ],
105
+ [
106
+ "set",
107
+ "className",
108
+ props.className
109
+ ],
110
+ [
111
+ "set",
112
+ "style",
113
+ props.style
114
+ ],
115
+ [
116
+ "set",
117
+ "tabs",
118
+ props.tabs
119
+ ],
120
+ [
121
+ "set",
122
+ "selectedIndex",
123
+ props.selectedIndex
124
+ ],
125
+ [
126
+ "set",
127
+ "onSelectedIndexChanged",
128
+ props.onSelectedIndexChanged
129
+ ]
130
+ ]))]);
131
+ }, (__wp) => {
132
+ const props = __wp;
133
+ warmChild(MemoTabs, {
134
+ id: props.id,
135
+ className: props.className,
136
+ style: props.style,
137
+ tabs: props.tabs,
138
+ selectedIndex: props.selectedIndex,
139
+ onSelectedIndexChanged: props.onSelectedIndexChanged
140
+ });
141
+ }), { "module": "@nativescript-community/octane" });
142
+ //#endregion
143
+ export { Tabs };
@@ -0,0 +1,24 @@
1
+ import { defineUniversalComponent, universalPlan, universalValue } from "@nativescript-community/octane";
2
+ //#region src/Switch.native.tsrx
3
+ var __octaneUniversalPlan0 = universalPlan("nativescript", {
4
+ "kind": "host",
5
+ "type": "switch",
6
+ "bindings": [
7
+ ["id", 0],
8
+ ["className", 1],
9
+ ["style", 2],
10
+ ["checked", 3],
11
+ ["onCheckedChange", 4]
12
+ ]
13
+ });
14
+ var Switch = defineUniversalComponent("nativescript", function Switch(props) {
15
+ return universalValue(__octaneUniversalPlan0, [
16
+ props.id,
17
+ props.className,
18
+ props.style,
19
+ props.checked,
20
+ (e) => props.onCheckedChange?.(e.value)
21
+ ]);
22
+ }, { "module": "@nativescript-community/octane" });
23
+ //#endregion
24
+ export { Switch };
@@ -0,0 +1,13 @@
1
+ import { defineUniversalComponent, universalPlan, universalValue } from "@nativescript-community/octane";
2
+ //#region src/PlatformBadge.native.tsrx
3
+ var __octaneUniversalPlan0 = universalPlan("nativescript", {
4
+ "kind": "host",
5
+ "type": "label",
6
+ "props": { "text": "ios|android" },
7
+ "bindings": [["className", 0]]
8
+ });
9
+ var PlatformBadge = defineUniversalComponent("nativescript", function PlatformBadge(props) {
10
+ return universalValue(__octaneUniversalPlan0, [props.className]);
11
+ }, { "module": "@nativescript-community/octane" });
12
+ //#endregion
13
+ export { PlatformBadge };
@@ -0,0 +1,13 @@
1
+ //#region src/route.native.ts
2
+ function routeFor(_stack) {
3
+ return null;
4
+ }
5
+ function currentRoute() {
6
+ return null;
7
+ }
8
+ function useRoute(_stack) {
9
+ return null;
10
+ }
11
+ function pushRoute(_r) {}
12
+ //#endregion
13
+ export { currentRoute, pushRoute, routeFor, useRoute };
@@ -0,0 +1,49 @@
1
+ import { defineUniversalComponent, hookSlots, universalPlan, universalValue, useCallback } from "@nativescript-community/octane";
2
+ //#region src/View.native.tsrx
3
+ var _h$0 = /* @__PURE__ */ Symbol(/* @__PURE__ */ hookSlots(1));
4
+ var __octaneUniversalPlan0 = universalPlan("nativescript", {
5
+ "kind": "host",
6
+ "type": "flexboxlayout",
7
+ "props": { "flexDirection": "column" },
8
+ "bindings": [
9
+ ["id", 0],
10
+ ["ref", 1],
11
+ ["className", 2],
12
+ ["style", 3],
13
+ ["onPan", 4],
14
+ ["onSwipe", 5]
15
+ ],
16
+ "children": [{
17
+ "kind": "slot",
18
+ "slot": 6
19
+ }]
20
+ });
21
+ var PAN_STATE = [
22
+ "cancelled",
23
+ "began",
24
+ "moved",
25
+ "ended"
26
+ ];
27
+ var View = defineUniversalComponent("nativescript", function View(props) {
28
+ const onPan = useCallback((e) => props.onPan?.({
29
+ x: e.deltaX,
30
+ y: e.deltaY,
31
+ dx: e.deltaX,
32
+ dy: e.deltaY,
33
+ vx: 0,
34
+ vy: 0,
35
+ state: PAN_STATE[e.state] ?? "moved",
36
+ target: e.view ?? e.object
37
+ }), [props.onPan], _h$0);
38
+ return universalValue(__octaneUniversalPlan0, [
39
+ props.id,
40
+ props.bind,
41
+ props.className,
42
+ props.style,
43
+ props.onPan ? onPan : void 0,
44
+ props.onSwipe,
45
+ props.children
46
+ ]);
47
+ }, { "module": "@nativescript-community/octane" });
48
+ //#endregion
49
+ export { View };
@@ -0,0 +1,21 @@
1
+ import { defineUniversalComponent, universalPlan, universalValue } from "@nativescript-community/octane";
2
+ //#region src/Row.native.tsrx
3
+ var __octaneUniversalPlan0 = universalPlan("nativescript", {
4
+ "kind": "host",
5
+ "type": "flexboxlayout",
6
+ "props": { "flexDirection": "row" },
7
+ "bindings": [["className", 0], ["style", 1]],
8
+ "children": [{
9
+ "kind": "slot",
10
+ "slot": 2
11
+ }]
12
+ });
13
+ var Row = defineUniversalComponent("nativescript", function Row(props) {
14
+ return universalValue(__octaneUniversalPlan0, [
15
+ props.className,
16
+ props.style,
17
+ props.children
18
+ ]);
19
+ }, { "module": "@nativescript-community/octane" });
20
+ //#endregion
21
+ export { Row };
@@ -0,0 +1,49 @@
1
+ import { createContext, defineUniversalComponent, universalComponent, universalIf, universalPlan, universalProps, universalValue, useContext } from "@nativescript-community/octane";
2
+ //#region src/Text.native.tsrx
3
+ var __octaneUniversalPlan0 = universalPlan("nativescript", {
4
+ "kind": "host",
5
+ "type": "span",
6
+ "bindings": [["className", 0], ["style", 1]],
7
+ "children": [{
8
+ "kind": "slot",
9
+ "slot": 2
10
+ }]
11
+ });
12
+ var __octaneUniversalPlan1 = universalPlan("nativescript", {
13
+ "kind": "host",
14
+ "type": "label",
15
+ "bindings": [["className", 0], ["style", 1]],
16
+ "children": [{
17
+ "kind": "slot",
18
+ "slot": 2
19
+ }]
20
+ });
21
+ var __octaneUniversalPlan2 = universalPlan("nativescript", {
22
+ "kind": "slot",
23
+ "slot": 0
24
+ });
25
+ var InText = createContext(false);
26
+ var TextScope = defineUniversalComponent("nativescript", function TextScope(props) {
27
+ return InText({
28
+ value: true,
29
+ children: props.children
30
+ });
31
+ }, { "module": "@nativescript-community/octane" });
32
+ var Text = defineUniversalComponent("nativescript", function Text(props) {
33
+ const inText = useContext(InText);
34
+ return universalValue(__octaneUniversalPlan2, [universalIf(inText, () => {
35
+ return universalValue(__octaneUniversalPlan0, [
36
+ props.className,
37
+ props.style,
38
+ props.children
39
+ ]);
40
+ }, () => {
41
+ return universalValue(__octaneUniversalPlan1, [
42
+ props.className,
43
+ props.style,
44
+ universalComponent("nativescript", TextScope, universalProps([], props.children))
45
+ ]);
46
+ })]);
47
+ }, { "module": "@nativescript-community/octane" });
48
+ //#endregion
49
+ export { Text };
@@ -0,0 +1,35 @@
1
+ import { defineUniversalComponent, universalPlan, universalValue } from "@nativescript-community/octane";
2
+ //#region src/Pressable.native.tsrx
3
+ var __octaneUniversalPlan0 = universalPlan("nativescript", {
4
+ "kind": "host",
5
+ "type": "contentview",
6
+ "bindings": [
7
+ ["id", 0],
8
+ ["className", 1],
9
+ ["style", 2],
10
+ ["accessible", 3],
11
+ ["accessibilityLabel", 4],
12
+ ["accessibilityRole", 5],
13
+ ["onTap", 6],
14
+ ["onLongPress", 7]
15
+ ],
16
+ "children": [{
17
+ "kind": "slot",
18
+ "slot": 8
19
+ }]
20
+ });
21
+ var Pressable = defineUniversalComponent("nativescript", function Pressable(props) {
22
+ return universalValue(__octaneUniversalPlan0, [
23
+ props.id,
24
+ props.className,
25
+ props.style,
26
+ props.accessible,
27
+ props.accessibilityLabel,
28
+ props.accessibilityRole,
29
+ props.disabled ? void 0 : props.onPress,
30
+ props.disabled ? void 0 : props.onLongPress,
31
+ props.children
32
+ ]);
33
+ }, { "module": "@nativescript-community/octane" });
34
+ //#endregion
35
+ export { Pressable };
@@ -0,0 +1,25 @@
1
+ import { defineUniversalComponent, universalPlan, universalValue } from "@nativescript-community/octane";
2
+ //#region src/TextInput.native.tsrx
3
+ var __octaneUniversalPlan0 = universalPlan("nativescript", {
4
+ "kind": "host",
5
+ "type": "textfield",
6
+ "props": { "id": "probe-input" },
7
+ "bindings": [
8
+ ["className", 0],
9
+ ["style", 1],
10
+ ["text", 2],
11
+ ["hint", 3],
12
+ ["onTextChange", 4]
13
+ ]
14
+ });
15
+ var TextInput = defineUniversalComponent("nativescript", function TextInput(props) {
16
+ return universalValue(__octaneUniversalPlan0, [
17
+ props.className,
18
+ props.style,
19
+ props.value,
20
+ props.placeholder ?? props.hint,
21
+ (e) => props.onChange?.(e.value)
22
+ ]);
23
+ }, { "module": "@nativescript-community/octane" });
24
+ //#endregion
25
+ export { TextInput };
@@ -0,0 +1,73 @@
1
+ import { defineUniversalComponent, memo, universalComponent, universalIf, universalPlan, universalProps, universalValue } from "@nativescript-community/octane";
2
+ //#region src/List.native.tsrx
3
+ var __octaneUniversalPlan0 = universalPlan("nativescript", {
4
+ "kind": "host",
5
+ "type": "listview",
6
+ "bindings": [
7
+ ["id", 0],
8
+ ["className", 1],
9
+ ["style", 2],
10
+ ["items", 3],
11
+ ["renderItem", 4]
12
+ ]
13
+ });
14
+ var __octaneUniversalPlan1 = universalPlan("nativescript", {
15
+ "kind": "slot",
16
+ "slot": 0
17
+ });
18
+ var __octaneUniversalPlan2 = universalPlan("nativescript", {
19
+ "kind": "range",
20
+ "children": [{
21
+ "kind": "slot",
22
+ "slot": 0
23
+ }]
24
+ });
25
+ var __octaneUniversalPlan3 = universalPlan("nativescript", {
26
+ "kind": "slot",
27
+ "slot": 0
28
+ });
29
+ var ListInner = defineUniversalComponent("nativescript", function ListInner(props) {
30
+ return universalValue(__octaneUniversalPlan0, [
31
+ props.id,
32
+ props.className,
33
+ props.style,
34
+ props.items,
35
+ props.renderItem
36
+ ]);
37
+ }, { "module": "@nativescript-community/octane" });
38
+ var MemoListView = memo(ListInner, (a, b) => a.items === b.items);
39
+ var List = defineUniversalComponent("nativescript", function List(props) {
40
+ return universalValue(__octaneUniversalPlan3, [universalIf(props.items.length > 0, () => {
41
+ return universalValue(__octaneUniversalPlan1, [universalComponent("nativescript", MemoListView, universalProps([
42
+ [
43
+ "set",
44
+ "id",
45
+ props.id
46
+ ],
47
+ [
48
+ "set",
49
+ "items",
50
+ props.items
51
+ ],
52
+ [
53
+ "set",
54
+ "className",
55
+ props.className
56
+ ],
57
+ [
58
+ "set",
59
+ "style",
60
+ props.style
61
+ ],
62
+ [
63
+ "set",
64
+ "renderItem",
65
+ props.renderItem
66
+ ]
67
+ ]))]);
68
+ }, () => {
69
+ return universalValue(__octaneUniversalPlan2, [props.renderEmpty?.()]);
70
+ })]);
71
+ }, { "module": "@nativescript-community/octane" });
72
+ //#endregion
73
+ export { List };