@octane-xplat/ui 0.3.0 → 0.5.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.
Files changed (129) hide show
  1. package/README.md +46 -0
  2. package/dist/native/octane-client-build.json +1 -1
  3. package/dist/native/ui.js +55 -40
  4. package/dist/native/ui10.js +20 -11
  5. package/dist/native/ui11.js +42 -109
  6. package/dist/native/ui12.js +17 -84
  7. package/dist/native/ui13.js +11 -41
  8. package/dist/native/ui14.js +133 -76
  9. package/dist/native/ui15.js +43 -92
  10. package/dist/native/ui16.js +106 -45
  11. package/dist/native/ui17.js +29 -42
  12. package/dist/native/ui18.js +34 -53
  13. package/dist/native/ui19.js +246 -32
  14. package/dist/native/ui20.js +27 -16
  15. package/dist/native/ui21.js +376 -86
  16. package/dist/native/ui22.js +26 -114
  17. package/dist/native/ui23.js +49 -97
  18. package/dist/native/ui24.js +79 -53
  19. package/dist/native/ui25.js +138 -16
  20. package/dist/native/ui26.js +8 -23
  21. package/dist/native/ui27.js +60 -34
  22. package/dist/native/ui28.js +36 -142
  23. package/dist/native/ui29.js +101 -21
  24. package/dist/native/ui3.js +22 -1
  25. package/dist/native/ui30.js +14 -31
  26. package/dist/native/ui31.js +55 -36
  27. package/dist/native/ui32.js +49 -61
  28. package/dist/native/ui33.js +36 -28
  29. package/dist/native/ui34.js +51 -8
  30. package/dist/native/ui35.js +98 -20
  31. package/dist/native/ui36.js +9 -33
  32. package/dist/native/ui37.js +42 -15
  33. package/dist/native/ui38.js +186 -57
  34. package/dist/native/ui39.js +96 -26
  35. package/dist/native/ui4.js +22 -20
  36. package/dist/native/ui40.js +179 -8
  37. package/dist/native/ui41.js +52 -98
  38. package/dist/native/ui42.js +14 -145
  39. package/dist/native/ui43.js +16 -19
  40. package/dist/native/ui44.js +6 -6
  41. package/dist/native/ui45.js +38 -0
  42. package/dist/native/ui46.js +267 -0
  43. package/dist/native/ui47.js +28 -0
  44. package/dist/native/ui48.js +35 -0
  45. package/dist/native/ui49.js +41 -0
  46. package/dist/native/ui5.js +37 -77
  47. package/dist/native/ui50.js +72 -0
  48. package/dist/native/ui51.js +66 -0
  49. package/dist/native/ui52.js +64 -0
  50. package/dist/native/ui53.js +27 -0
  51. package/dist/native/ui54.js +13 -0
  52. package/dist/native/ui55.js +92 -0
  53. package/dist/native/ui56.js +34 -0
  54. package/dist/native/ui57.js +19 -0
  55. package/dist/native/ui58.js +156 -0
  56. package/dist/native/ui59.js +33 -0
  57. package/dist/native/ui6.js +94 -9
  58. package/dist/native/ui60.js +14 -0
  59. package/dist/native/ui61.js +22 -0
  60. package/dist/native/ui62.js +8 -0
  61. package/dist/native/ui63.js +108 -0
  62. package/dist/native/ui64.js +76 -0
  63. package/dist/native/ui7.js +42 -26
  64. package/dist/native/ui8.js +22 -12
  65. package/dist/native/ui9.js +18 -9
  66. package/dist/web/octane-client-build.json +1 -1
  67. package/dist/web/ui.js +53 -40
  68. package/dist/web/ui10.js +33 -186
  69. package/dist/web/ui11.js +28 -409
  70. package/dist/web/ui12.js +21 -68
  71. package/dist/web/ui13.js +265 -96
  72. package/dist/web/ui14.js +85 -95
  73. package/dist/web/ui15.js +368 -25
  74. package/dist/web/ui16.js +13 -101
  75. package/dist/web/ui17.js +246 -42
  76. package/dist/web/ui18.js +237 -28
  77. package/dist/web/ui19.js +36 -10
  78. package/dist/web/ui20.js +73 -102
  79. package/dist/web/ui21.js +102 -73
  80. package/dist/web/ui22.js +95 -55
  81. package/dist/web/ui23.js +94 -55
  82. package/dist/web/ui24.js +31 -15
  83. package/dist/web/ui25.js +105 -19
  84. package/dist/web/ui26.js +29 -23
  85. package/dist/web/ui27.js +12 -123
  86. package/dist/web/ui28.js +9 -110
  87. package/dist/web/ui29.js +52 -102
  88. package/dist/web/ui3.js +29 -18
  89. package/dist/web/ui30.js +32 -41
  90. package/dist/web/ui31.js +120 -39
  91. package/dist/web/ui32.js +41 -74
  92. package/dist/web/ui33.js +148 -32
  93. package/dist/web/ui34.js +145 -62
  94. package/dist/web/ui35.js +140 -7
  95. package/dist/web/ui36.js +86 -41
  96. package/dist/web/ui37.js +19 -44
  97. package/dist/web/ui38.js +5 -15
  98. package/dist/web/ui39.js +24 -86
  99. package/dist/web/ui4.js +46 -152
  100. package/dist/web/ui40.js +150 -37
  101. package/dist/web/ui41.js +36 -10
  102. package/dist/web/ui42.js +40 -7
  103. package/dist/web/ui43.js +73 -19
  104. package/dist/web/ui44.js +40 -6
  105. package/dist/web/ui45.js +62 -0
  106. package/dist/web/ui46.js +50 -0
  107. package/dist/web/ui47.js +9 -0
  108. package/dist/web/ui48.js +45 -0
  109. package/dist/web/ui49.js +13 -0
  110. package/dist/web/ui5.js +131 -27
  111. package/dist/web/ui50.js +63 -0
  112. package/dist/web/ui51.js +47 -0
  113. package/dist/web/ui52.js +19 -0
  114. package/dist/web/ui53.js +273 -0
  115. package/dist/web/ui54.js +42 -0
  116. package/dist/web/ui55.js +17 -0
  117. package/dist/web/ui56.js +9 -0
  118. package/dist/web/ui57.js +22 -0
  119. package/dist/web/ui58.js +8 -0
  120. package/dist/web/ui59.js +44 -0
  121. package/dist/web/ui6.js +81 -45
  122. package/dist/web/ui60.js +46 -0
  123. package/dist/web/ui7.js +43 -21
  124. package/dist/web/ui8.js +27 -21
  125. package/dist/web/ui9.js +29 -18
  126. package/package.json +17 -4
  127. package/src/theme/tokens.css +597 -141
  128. package/types/index.d.ts +112 -58
  129. package/types/props.d.ts +291 -16
@@ -1,103 +1,55 @@
1
1
  import { cx } from "./ui2.js";
2
- import { getColorScheme } from "./ui20.js";
3
- import { createNativeScriptRoot, defineUniversalComponent, universalComponent, universalIf, universalPlan, universalProps, universalValue } from "@nativescript-community/octane";
4
- import { GridLayout, getRootLayout, isAndroid, isIOS } from "@nativescript/core";
5
- //#region src/toast.native.tsrx
2
+ import { applyEscapeProps } from "./ui3.js";
3
+ import { defineUniversalComponent, universalPlan, universalValue } from "@nativescript-community/octane";
4
+ //#region src/TextInput.native.tsrx
6
5
  var __octaneUniversalPlan0 = universalPlan("nativescript", {
7
6
  "kind": "host",
8
- "type": "label",
9
- "props": { "className": "vx-toast" },
10
- "children": [{
11
- "kind": "slot",
12
- "slot": 0
13
- }]
7
+ "type": "textfield",
8
+ "bindings": [
9
+ ["ref", 0],
10
+ ["id", 1],
11
+ ["className", 2],
12
+ ["style", 3],
13
+ ["text", 4],
14
+ ["hint", 5],
15
+ ["secure", 6],
16
+ ["keyboardType", 7],
17
+ ["returnKeyType", 8],
18
+ ["editable", 9],
19
+ ["onTextChange", 10],
20
+ ["onReturnPress", 11],
21
+ ["onFocus", 12],
22
+ ["onBlur", 13]
23
+ ]
14
24
  });
15
- var __octaneUniversalPlan1 = universalPlan("nativescript", {
16
- "kind": "host",
17
- "type": "gridlayout",
18
- "props": { "className": "vx-toast" },
19
- "children": [{
20
- "kind": "slot",
21
- "slot": 0
22
- }]
23
- });
24
- var __octaneUniversalPlan2 = universalPlan("nativescript", {
25
- "kind": "slot",
26
- "slot": 0
27
- });
28
- var queue = [];
29
- var active = null;
30
- var ToastBody = defineUniversalComponent("nativescript", function ToastBody(props) {
31
- return universalValue(__octaneUniversalPlan2, [universalIf(typeof props.content === "string", () => {
32
- return universalValue(__octaneUniversalPlan0, [props.content]);
33
- }, () => {
34
- const Component = props.content;
35
- return universalValue(__octaneUniversalPlan1, [universalComponent("nativescript", Component, universalProps([]))]);
36
- })]);
25
+ var TextInput = defineUniversalComponent("nativescript", function TextInput(props) {
26
+ return universalValue(__octaneUniversalPlan0, [
27
+ (v) => {
28
+ if (!v) return;
29
+ applyEscapeProps(v, props);
30
+ props.bind?.({
31
+ focus: () => v.focus(),
32
+ blur: () => v.dismissSoftInput?.() ?? v.blur(),
33
+ native: v
34
+ });
35
+ },
36
+ props.id,
37
+ cx(props.className),
38
+ {
39
+ ...props.style,
40
+ ...props.placeholderTextColor ? { placeholderColor: props.placeholderTextColor } : {}
41
+ },
42
+ props.value,
43
+ props.placeholder ?? props.hint,
44
+ props.secure,
45
+ props.keyboardType === "default" ? void 0 : props.keyboardType,
46
+ props.returnKeyType,
47
+ props.editable ?? true,
48
+ (e) => props.onChange?.(e.value),
49
+ props.onSubmit,
50
+ props.onFocus,
51
+ props.onBlur
52
+ ]);
37
53
  }, { "module": "@nativescript-community/octane" });
38
- function finishToast(entry) {
39
- if (active !== entry) return;
40
- if (entry.timer !== null) clearTimeout(entry.timer);
41
- entry.timer = null;
42
- const rootLayout = getRootLayout();
43
- const finish = () => {
44
- entry.root.unmount?.();
45
- if (active === entry) active = null;
46
- showNext();
47
- };
48
- if (rootLayout?.hasChild?.(entry.host)) rootLayout.close(entry.host).then(finish, (error) => {
49
- console.error("[Toast] close failed", error);
50
- finish();
51
- });
52
- else finish();
53
- }
54
- function showNext() {
55
- if (active || queue.length === 0) return;
56
- const entry = queue.shift();
57
- const rootLayout = getRootLayout();
58
- if (!rootLayout) {
59
- console.warn("[Toast] RootLayout is not mounted; toast was skipped");
60
- return;
61
- }
62
- const host = new GridLayout();
63
- host.className = cx("vx-toast-host", getColorScheme() === "dark" && "ns-dark");
64
- host.horizontalAlignment = "stretch";
65
- host.verticalAlignment = entry.options.position === "top" ? "top" : "bottom";
66
- host.marginTop = entry.options.position === "top" ? 24 : 0;
67
- host.marginBottom = entry.options.position === "top" ? 0 : 24;
68
- Object.assign(host, isIOS ? entry.options.ios : isAndroid ? entry.options.android : void 0);
69
- const root = createNativeScriptRoot(host);
70
- const current = {
71
- ...entry,
72
- host,
73
- root,
74
- timer: null
75
- };
76
- active = current;
77
- root.render(ToastBody, { content: entry.content });
78
- const open = () => {
79
- rootLayout.open(host).then(() => {
80
- if (active === current) current.timer = setTimeout(() => finishToast(current), Math.max(0, entry.options.duration ?? 3e3));
81
- }, (error) => {
82
- console.error("[Toast] open failed", error);
83
- root.unmount?.();
84
- if (active === current) active = null;
85
- showNext();
86
- });
87
- };
88
- if (rootLayout.hasChild?.(host)) rootLayout.close(host).then(open, (error) => {
89
- console.error("[Toast] stale host close failed", error);
90
- if (active === current) active = null;
91
- showNext();
92
- });
93
- else open();
94
- }
95
- function showToast(content, options = {}) {
96
- queue.push({
97
- content,
98
- options
99
- });
100
- showNext();
101
- }
102
54
  //#endregion
103
- export { showToast };
55
+ export { TextInput };
@@ -1,58 +1,84 @@
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;
1
+ import { cx } from "./ui2.js";
2
+ import { applyEscapeProps } from "./ui3.js";
3
+ import { defineUniversalComponent, hookSlots, universalPlan, universalValue, useEffect, useRef } from "@nativescript-community/octane";
4
+ import { Utils } from "@nativescript/core";
5
+ //#region src/TextArea.native.tsrx
6
+ var _hs$ = /* @__PURE__ */ hookSlots(2);
7
+ var _h$0 = /* @__PURE__ */ Symbol(_hs$);
8
+ var _h$1 = /* @__PURE__ */ Symbol(_hs$ + 1);
9
+ var __octaneUniversalPlan0 = universalPlan("nativescript", {
10
+ "kind": "host",
11
+ "type": "textview",
12
+ "bindings": [
13
+ ["id", 0],
14
+ ["ref", 1],
15
+ ["className", 2],
16
+ ["style", 3],
17
+ ["text", 4],
18
+ ["hint", 5],
19
+ ["keyboardType", 6],
20
+ ["returnKeyType", 7],
21
+ ["editable", 8],
22
+ ["onLoaded", 9],
23
+ ["onTextChange", 10],
24
+ ["onReturnPress", 11],
25
+ ["onFocus", 12],
26
+ ["onBlur", 13]
27
+ ]
28
+ });
29
+ var TextArea = defineUniversalComponent("nativescript", function TextArea(props) {
30
+ const el = useRef(null, _h$0);
31
+ const submitOnReturn = props.returnKeyType === "done" || props.returnKeyType === "send";
32
+ const lineDip = (v) => {
33
+ const ios = v?.ios?.font?.lineHeight;
34
+ if (ios > 0) return ios;
35
+ const px = v?.android?.getLineHeight?.();
36
+ if (px > 0) return Utils.layout.toDeviceIndependentPixels(px);
37
+ return 24;
12
38
  };
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);
39
+ const fit = (v) => {
40
+ if (!v) return;
41
+ if (props.style?.height != null) return;
42
+ const line = lineDip(v);
43
+ const rows = props.rows ?? (props.autoGrow ? 1 : 3);
44
+ v.style.minHeight = rows * line;
45
+ if (props.maxRows) v.style.maxHeight = props.maxRows * line;
46
+ else if (!props.autoGrow) v.style.maxHeight = rows * line;
23
47
  };
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;
48
+ useEffect(() => fit(el.current), [
49
+ props.rows,
50
+ props.autoGrow,
51
+ props.maxRows,
52
+ props.style
53
+ ], _h$1);
54
+ return universalValue(__octaneUniversalPlan0, [
55
+ props.id,
56
+ (v) => {
57
+ el.current = v;
58
+ if (!v) return;
59
+ applyEscapeProps(v, props);
60
+ props.bind?.({
61
+ focus: () => v.focus(),
62
+ blur: () => v.dismissSoftInput?.() ?? v.blur(),
63
+ native: v
45
64
  });
46
65
  },
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
- }
66
+ cx(props.className),
67
+ {
68
+ ...props.style,
69
+ ...props.placeholderTextColor ? { placeholderColor: props.placeholderTextColor } : {}
70
+ },
71
+ props.value,
72
+ props.placeholder ?? props.hint,
73
+ props.keyboardType === "default" ? void 0 : props.keyboardType,
74
+ props.returnKeyType,
75
+ props.editable ?? true,
76
+ (e) => fit(e.object),
77
+ (e) => props.onChange?.(e.value),
78
+ submitOnReturn ? props.onSubmit : void 0,
79
+ props.onFocus,
80
+ props.onBlur
81
+ ]);
82
+ }, { "module": "@nativescript-community/octane" });
57
83
  //#endregion
58
- export { useAnimation };
84
+ export { TextArea };
@@ -1,19 +1,141 @@
1
- import "@nativescript-community/octane";
2
- import { defineUniversalComponent as defineUniversalComponent$1, universalComponent as universalComponent$1 } from "octane/universal/native";
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);
1
+ import { cx } from "./ui2.js";
2
+ import { defineUniversalComponent, memo, universalComponent, universalIf, universalPlan, universalProps, universalValue } from "@nativescript-community/octane";
3
+ import { ScrollView, isAndroid, isIOS } from "@nativescript/core";
4
+ //#region src/List.native.tsrx
5
+ var __octaneUniversalPlan0 = universalPlan("nativescript", {
6
+ "kind": "host",
7
+ "type": "gridlayout",
8
+ "children": [{
9
+ "kind": "slot",
10
+ "slot": 0
11
+ }]
12
+ });
13
+ var __octaneUniversalPlan1 = universalPlan("nativescript", {
14
+ "kind": "host",
15
+ "type": "listview",
16
+ "propsSlot": 0
17
+ });
18
+ var __octaneUniversalPlan2 = universalPlan("nativescript", {
19
+ "kind": "slot",
20
+ "slot": 0
21
+ });
22
+ var __octaneUniversalPlan3 = universalPlan("nativescript", {
23
+ "kind": "range",
24
+ "children": [{
25
+ "kind": "slot",
26
+ "slot": 0
27
+ }]
28
+ });
29
+ var __octaneUniversalPlan4 = universalPlan("nativescript", {
30
+ "kind": "slot",
31
+ "slot": 0
32
+ });
33
+ function rejectNestedScrollView(event) {
34
+ let parent = event.object?.parent;
35
+ while (parent) {
36
+ if (parent instanceof ScrollView) throw new Error("[List] cannot be nested inside native ScrollView. Use ScrollBox so the ListView owns scrolling.");
37
+ parent = parent.parent;
15
38
  }
16
- return defineUniversalComponent$1("nativescript", Styled);
17
39
  }
40
+ var ListInner = defineUniversalComponent("nativescript", function ListInner(props) {
41
+ const platformProps = Object.assign({}, isIOS ? props.ios : {}, isAndroid ? props.android : {});
42
+ return universalValue(__octaneUniversalPlan1, [universalProps([
43
+ [
44
+ "set",
45
+ "id",
46
+ props.id
47
+ ],
48
+ [
49
+ "set",
50
+ "className",
51
+ cx(props.className)
52
+ ],
53
+ [
54
+ "set",
55
+ "style",
56
+ props.style
57
+ ],
58
+ [
59
+ "set",
60
+ "items",
61
+ props.items
62
+ ],
63
+ [
64
+ "set",
65
+ "iosEstimatedRowHeight",
66
+ isIOS ? props.estimatedItemHeight : void 0
67
+ ],
68
+ [
69
+ "set",
70
+ "onLoadMoreItems",
71
+ props.onEndReached
72
+ ],
73
+ [
74
+ "set",
75
+ "onLoaded",
76
+ rejectNestedScrollView
77
+ ],
78
+ [
79
+ "set",
80
+ "renderItem",
81
+ (item, index) => universalValue(__octaneUniversalPlan0, [props.renderItem(item, index)])
82
+ ],
83
+ ["spread", platformProps]
84
+ ])]);
85
+ }, { "module": "@nativescript-community/octane" });
86
+ var MemoListView = memo(ListInner, (a, b) => a.items === b.items && a.className === b.className && a.style === b.style && a.id === b.id && a.estimatedItemHeight === b.estimatedItemHeight && a.onEndReached === b.onEndReached && a.ios === b.ios && a.android === b.android);
87
+ var List = defineUniversalComponent("nativescript", function List(props) {
88
+ return universalValue(__octaneUniversalPlan4, [universalIf(props.items.length > 0, () => {
89
+ return universalValue(__octaneUniversalPlan2, [universalComponent("nativescript", MemoListView, universalProps([
90
+ [
91
+ "set",
92
+ "id",
93
+ props.id
94
+ ],
95
+ [
96
+ "set",
97
+ "items",
98
+ props.items
99
+ ],
100
+ [
101
+ "set",
102
+ "className",
103
+ props.className
104
+ ],
105
+ [
106
+ "set",
107
+ "style",
108
+ props.style
109
+ ],
110
+ [
111
+ "set",
112
+ "renderItem",
113
+ props.renderItem
114
+ ],
115
+ [
116
+ "set",
117
+ "estimatedItemHeight",
118
+ props.estimatedItemHeight
119
+ ],
120
+ [
121
+ "set",
122
+ "onEndReached",
123
+ props.onEndReached
124
+ ],
125
+ [
126
+ "set",
127
+ "ios",
128
+ props.ios
129
+ ],
130
+ [
131
+ "set",
132
+ "android",
133
+ props.android
134
+ ]
135
+ ]))]);
136
+ }, () => {
137
+ return universalValue(__octaneUniversalPlan3, [props.renderEmpty?.()]);
138
+ })]);
139
+ }, { "module": "@nativescript-community/octane" });
18
140
  //#endregion
19
- export { styled };
141
+ export { List };
@@ -1,27 +1,12 @@
1
- import { cx } from "./ui2.js";
2
- import { applyEscapeProps } from "./ui3.js";
3
- import { defineUniversalComponent, universalPlan, universalValue } from "@nativescript-community/octane";
4
- //#region src/Screen.native.tsrx
1
+ import { View } from "./ui6.js";
2
+ import { defineUniversalComponent, universalComponent, universalPlan, universalProps, universalValue } from "@nativescript-community/octane";
3
+ //#region src/ScrollBox.native.tsrx
5
4
  var __octaneUniversalPlan0 = universalPlan("nativescript", {
6
- "kind": "host",
7
- "type": "rootlayout",
8
- "bindings": [
9
- ["ref", 0],
10
- ["className", 1],
11
- ["style", 2]
12
- ],
13
- "children": [{
14
- "kind": "slot",
15
- "slot": 3
16
- }]
5
+ "kind": "slot",
6
+ "slot": 0
17
7
  });
18
- var Screen = defineUniversalComponent("nativescript", function Screen(props) {
19
- return universalValue(__octaneUniversalPlan0, [
20
- (v) => applyEscapeProps(v, props),
21
- cx(props.className),
22
- props.style,
23
- props.children
24
- ]);
8
+ var ScrollBox = defineUniversalComponent("nativescript", function ScrollBox(props) {
9
+ return universalValue(__octaneUniversalPlan0, [universalComponent("nativescript", View, universalProps([["spread", props]], props.children))]);
25
10
  }, { "module": "@nativescript-community/octane" });
26
11
  //#endregion
27
- export { Screen };
12
+ export { ScrollBox };
@@ -1,35 +1,61 @@
1
- import { Application, Frame } from "@nativescript/core";
2
- //#region src/stacks.native.ts
3
- /** Named parallel stacks. A shell (Tabs with `stack` on a spec, the app
4
- * entry's root frame) registers its Frame here; `pushRoute` resolves the
5
- * target by name. Native-only concept — on web, parallel stacks map to
6
- * nested routes (one linear URL stack). 'root' needs no registration:
7
- * unregistered, it resolves to the app's root view when that's a
8
- * Frame — the standard `Application.run({ create: () => frame })` boot
9
- * shape. An explicit registerStack('root', frame) overrides it. */
10
- var stacks = /* @__PURE__ */ new Map();
11
- var regListeners = /* @__PURE__ */ new Set();
12
- function registerStack(name, frame) {
13
- stacks.set(name, frame);
14
- regListeners.forEach((l) => l(name, frame));
15
- }
16
- function getStack(name) {
17
- const registered = stacks.get(name);
18
- if (registered) return registered;
19
- if (name === "root") {
20
- const rv = Application.getRootView?.();
21
- if (rv instanceof Frame) return rv;
22
- }
23
- }
24
- /** All registered stacks in registration order — for hardware-back
25
- * resolution (pop whichever stack is visibly on top). */
26
- function stackEntries() {
27
- return stacks.entries();
28
- }
29
- /** Internal: route.native attaches frame listeners as stacks appear —
30
- * named frames can register after a useRoute subscription ran. */
31
- function onStackRegistered(cb) {
32
- regListeners.add(cb);
33
- }
1
+ import { cx } from "./ui2.js";
2
+ import { applyEscapeProps } from "./ui3.js";
3
+ import { glassClassOf, glassConfigOf } from "./ui4.js";
4
+ import { layoutChildProps } from "./ui5.js";
5
+ import { defineUniversalComponent, universalPlan, universalProps, universalValue } from "@nativescript-community/octane";
6
+ //#region src/ScrollView.native.tsrx
7
+ var __octaneUniversalPlan0 = universalPlan("nativescript", {
8
+ "kind": "host",
9
+ "type": "scrollview",
10
+ "propsSlot": 0,
11
+ "children": [{
12
+ "kind": "host",
13
+ "type": "flexboxlayout",
14
+ "bindings": [["flexDirection", 1]],
15
+ "children": [{
16
+ "kind": "slot",
17
+ "slot": 2
18
+ }]
19
+ }]
20
+ });
21
+ var ScrollView = defineUniversalComponent("nativescript", function ScrollView(props) {
22
+ return universalValue(__octaneUniversalPlan0, [
23
+ universalProps([
24
+ [
25
+ "set",
26
+ "ref",
27
+ (v) => applyEscapeProps(v, props)
28
+ ],
29
+ [
30
+ "set",
31
+ "id",
32
+ props.id
33
+ ],
34
+ ["spread", layoutChildProps(props)],
35
+ [
36
+ "set",
37
+ "className",
38
+ cx(glassClassOf(props.glass), props.className)
39
+ ],
40
+ [
41
+ "set",
42
+ "style",
43
+ props.style
44
+ ],
45
+ [
46
+ "set",
47
+ "iosGlassEffect",
48
+ glassConfigOf(props.glass)
49
+ ],
50
+ [
51
+ "set",
52
+ "orientation",
53
+ props.horizontal ? "horizontal" : "vertical"
54
+ ]
55
+ ]),
56
+ props.horizontal ? "row" : "column",
57
+ props.children
58
+ ]);
59
+ }, { "module": "@nativescript-community/octane" });
34
60
  //#endregion
35
- export { getStack, onStackRegistered, registerStack, stackEntries };
61
+ export { ScrollView };