@octane-xplat/ui 0.3.0 → 0.4.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 (123) hide show
  1. package/README.md +46 -0
  2. package/dist/native/octane-client-build.json +1 -1
  3. package/dist/native/ui.js +52 -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 +118 -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 +78 -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/ui30.js +14 -31
  25. package/dist/native/ui31.js +55 -36
  26. package/dist/native/ui32.js +49 -61
  27. package/dist/native/ui33.js +36 -28
  28. package/dist/native/ui34.js +51 -8
  29. package/dist/native/ui35.js +98 -20
  30. package/dist/native/ui36.js +9 -33
  31. package/dist/native/ui37.js +42 -15
  32. package/dist/native/ui38.js +186 -57
  33. package/dist/native/ui39.js +96 -24
  34. package/dist/native/ui4.js +22 -20
  35. package/dist/native/ui40.js +57 -13
  36. package/dist/native/ui41.js +15 -100
  37. package/dist/native/ui42.js +6 -146
  38. package/dist/native/ui43.js +37 -21
  39. package/dist/native/ui44.js +265 -6
  40. package/dist/native/ui45.js +28 -0
  41. package/dist/native/ui46.js +35 -0
  42. package/dist/native/ui47.js +41 -0
  43. package/dist/native/ui48.js +72 -0
  44. package/dist/native/ui49.js +66 -0
  45. package/dist/native/ui5.js +37 -77
  46. package/dist/native/ui50.js +27 -0
  47. package/dist/native/ui51.js +13 -0
  48. package/dist/native/ui52.js +92 -0
  49. package/dist/native/ui53.js +34 -0
  50. package/dist/native/ui54.js +17 -0
  51. package/dist/native/ui55.js +156 -0
  52. package/dist/native/ui56.js +33 -0
  53. package/dist/native/ui57.js +14 -0
  54. package/dist/native/ui58.js +22 -0
  55. package/dist/native/ui59.js +8 -0
  56. package/dist/native/ui6.js +52 -9
  57. package/dist/native/ui60.js +108 -0
  58. package/dist/native/ui61.js +76 -0
  59. package/dist/native/ui7.js +42 -26
  60. package/dist/native/ui8.js +22 -12
  61. package/dist/native/ui9.js +18 -9
  62. package/dist/web/octane-client-build.json +1 -1
  63. package/dist/web/ui.js +51 -40
  64. package/dist/web/ui10.js +33 -186
  65. package/dist/web/ui11.js +28 -409
  66. package/dist/web/ui12.js +21 -68
  67. package/dist/web/ui13.js +201 -97
  68. package/dist/web/ui14.js +85 -95
  69. package/dist/web/ui15.js +368 -25
  70. package/dist/web/ui16.js +13 -101
  71. package/dist/web/ui17.js +246 -42
  72. package/dist/web/ui18.js +237 -28
  73. package/dist/web/ui19.js +36 -10
  74. package/dist/web/ui20.js +73 -102
  75. package/dist/web/ui21.js +102 -73
  76. package/dist/web/ui22.js +95 -55
  77. package/dist/web/ui23.js +94 -55
  78. package/dist/web/ui24.js +31 -15
  79. package/dist/web/ui25.js +105 -19
  80. package/dist/web/ui26.js +29 -23
  81. package/dist/web/ui27.js +12 -123
  82. package/dist/web/ui28.js +9 -110
  83. package/dist/web/ui29.js +52 -102
  84. package/dist/web/ui3.js +29 -18
  85. package/dist/web/ui30.js +32 -41
  86. package/dist/web/ui31.js +120 -39
  87. package/dist/web/ui32.js +41 -74
  88. package/dist/web/ui33.js +148 -32
  89. package/dist/web/ui34.js +54 -51
  90. package/dist/web/ui35.js +55 -7
  91. package/dist/web/ui36.js +18 -41
  92. package/dist/web/ui37.js +6 -46
  93. package/dist/web/ui38.js +37 -16
  94. package/dist/web/ui39.js +135 -81
  95. package/dist/web/ui4.js +46 -152
  96. package/dist/web/ui40.js +39 -37
  97. package/dist/web/ui41.js +41 -16
  98. package/dist/web/ui42.js +74 -7
  99. package/dist/web/ui43.js +40 -20
  100. package/dist/web/ui44.js +60 -6
  101. package/dist/web/ui45.js +9 -0
  102. package/dist/web/ui46.js +45 -0
  103. package/dist/web/ui47.js +13 -0
  104. package/dist/web/ui48.js +63 -0
  105. package/dist/web/ui49.js +47 -0
  106. package/dist/web/ui5.js +131 -27
  107. package/dist/web/ui50.js +17 -0
  108. package/dist/web/ui51.js +149 -0
  109. package/dist/web/ui52.js +42 -0
  110. package/dist/web/ui53.js +17 -0
  111. package/dist/web/ui54.js +9 -0
  112. package/dist/web/ui55.js +22 -0
  113. package/dist/web/ui56.js +8 -0
  114. package/dist/web/ui57.js +44 -0
  115. package/dist/web/ui58.js +46 -0
  116. package/dist/web/ui6.js +81 -45
  117. package/dist/web/ui7.js +43 -21
  118. package/dist/web/ui8.js +27 -21
  119. package/dist/web/ui9.js +29 -18
  120. package/package.json +13 -4
  121. package/src/theme/tokens.css +369 -138
  122. package/types/index.d.ts +102 -58
  123. package/types/props.d.ts +233 -13
package/dist/web/ui13.js CHANGED
@@ -1,110 +1,214 @@
1
1
  import { applyEscapeProps } from "./ui2.js";
2
- import { __s, bag11, clone, delegateEvents, hookSlots, queueRefAttach, queueRefDetach, setEventHandler, setStyle, template, useLayoutEffect, useRef } from "octane";
3
- import { bindSignalAttribute, bindSignalValue, enableSignalBindings, replaceRef, setBooleanAttributeIfChanged, updateFreshClassName } from "octane/internal/client";
4
- //#region src/TextArea.web.tsrx
2
+ import { layoutChildProps } from "./ui4.js";
3
+ import { __s, bag16, clone, snapshotSpread, template } from "octane";
4
+ import { bindSignalChild, bindSignalHostPropSources, enableSignalBindings } from "octane/internal/client";
5
+ //#region src/Text.web.tsrx
5
6
  enableSignalBindings(1, true);
6
- delegateEvents([
7
- "focusin",
8
- "focusout",
9
- "input",
10
- "keydown"
11
- ]);
12
- var _t$0 = /* @__PURE__ */ template("<textarea data-octane-input=\"i:8374d32b\"></textarea>");
13
- var _hs$ = /* @__PURE__ */ hookSlots(2);
14
- var _rm$0 = [
15
- "r",
16
- "b",
17
- "a"
7
+ var _t$0 = /* @__PURE__ */ template("<span></span>");
8
+ var _rm$1 = [
9
+ "s",
10
+ "n",
11
+ "m"
18
12
  ];
19
- var TextArea = /* @__PURE__ */ __s(function TextArea(props, __s, __extra) {
20
- const el = useRef(null, _hs$ + 0);
21
- useLayoutEffect(() => {
22
- const t = el.current;
23
- if (!t) return;
24
- const cs = getComputedStyle(t);
25
- const pad = parseFloat(cs.paddingTop) + parseFloat(cs.paddingBottom);
26
- const bord = parseFloat(cs.borderTopWidth) + parseFloat(cs.borderBottomWidth);
27
- const adj = cs.boxSizing === "border-box" ? bord : -pad;
28
- const line = parseFloat(cs.lineHeight) || parseFloat(cs.fontSize) * 1.2;
29
- const cap = props.maxRows ? props.maxRows * line + (cs.boxSizing === "border-box" ? pad + bord : 0) : parseFloat(cs.maxHeight) || Infinity;
30
- if (props.maxRows) t.style.maxHeight = Math.ceil(cap) + "px";
31
- if (props.autoGrow) {
32
- t.style.height = "auto";
33
- const need = t.scrollHeight + adj;
34
- t.style.height = Math.min(need, cap) + "px";
35
- t.style.overflowY = need > cap ? "auto" : "hidden";
36
- }
37
- }, [
38
- props.value,
39
- props.rows,
40
- props.autoGrow,
41
- props.maxRows,
42
- props.className,
43
- props.style
44
- ], _hs$ + 1);
13
+ var Text = /* @__PURE__ */ __s(function Text(props, __s, __extra) {
14
+ const textStyle = {
15
+ ...props.style,
16
+ ...props.numberOfLines ? {
17
+ display: "-webkit-box",
18
+ WebkitLineClamp: props.numberOfLines,
19
+ WebkitBoxOrient: "vertical",
20
+ overflow: "hidden"
21
+ } : {},
22
+ ...props.selectable === false ? { userSelect: "none" } : props.selectable ? { userSelect: "text" } : {},
23
+ ...props.ellipsize ? {
24
+ textOverflow: "ellipsis",
25
+ whiteSpace: "nowrap",
26
+ overflow: "hidden"
27
+ } : {}
28
+ };
45
29
  let _b = __s.slots[0];
46
30
  if (_b === void 0) {
47
- let _m0, _m1, _m5;
31
+ let _m0, _m1, _m2, _m3, _m4, _m5, _m6, _m7, _m8, _m9, _m10, _m11, _m12, _m13;
48
32
  const _root = clone(_t$0);
49
- queueRefAttach(__s, _m1 = (node) => {
50
- el.current = node;
51
- if (!node) return;
52
- applyEscapeProps(node, props);
53
- props.bind?.({
54
- focus: () => node.focus(),
55
- blur: () => node.blur(),
56
- native: node
57
- });
58
- }, _m0 = _root);
59
- (__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.b, _b.a));
60
- _m5 = bindSignalValue(__s, void 0, _root, props.value, "i:8374d32b");
61
- setEventHandler(_root, "$$input", (e) => props.onChange?.(e.target.value));
62
- setEventHandler(_root, "$$keydown", (e) => {
63
- if (e.key === "Enter" && (e.ctrlKey || e.metaKey)) props.onSubmit?.();
64
- });
65
- setEventHandler(_root, "$$focusin", props.onFocus);
66
- setEventHandler(_root, "$$focusout", props.onBlur);
67
- _b = bag11(__s, _root, _m0, _m1, void 0, void 0, void 0, _m5, void 0, void 0, void 0, void 0, void 0);
68
- __s.refFields = _rm$0;
33
+ _m0 = props.id;
34
+ _m1 = (el) => applyEscapeProps(el, props);
35
+ _m2 = props.className;
36
+ _m3 = snapshotSpread(layoutChildProps(props, textStyle));
37
+ _m4 = props.accessibilityHint;
38
+ _m5 = props.accessibilityValue;
39
+ _m6 = props.accessibilityState?.disabled;
40
+ _m7 = props.accessibilityState?.selected;
41
+ _m8 = props.accessibilityState?.checked;
42
+ _m9 = props.accessibilityState?.busy;
43
+ _m10 = props.accessibilityState?.expanded;
44
+ _m11 = props.accessibilityLiveRegion === "none" ? "off" : props.accessibilityLiveRegion;
45
+ _m12 = _root;
46
+ _m13 = bindSignalHostPropSources(__s, void 0, _root, [
47
+ [
48
+ false,
49
+ "id",
50
+ _m0
51
+ ],
52
+ [
53
+ false,
54
+ "ref",
55
+ _m1
56
+ ],
57
+ [
58
+ false,
59
+ "className",
60
+ _m2
61
+ ],
62
+ [true, _m3],
63
+ [
64
+ false,
65
+ "aria-description",
66
+ _m4
67
+ ],
68
+ [
69
+ false,
70
+ "aria-valuetext",
71
+ _m5
72
+ ],
73
+ [
74
+ false,
75
+ "aria-disabled",
76
+ _m6
77
+ ],
78
+ [
79
+ false,
80
+ "aria-selected",
81
+ _m7
82
+ ],
83
+ [
84
+ false,
85
+ "aria-checked",
86
+ _m8
87
+ ],
88
+ [
89
+ false,
90
+ "aria-busy",
91
+ _m9
92
+ ],
93
+ [
94
+ false,
95
+ "aria-expanded",
96
+ _m10
97
+ ],
98
+ [
99
+ false,
100
+ "aria-live",
101
+ _m11
102
+ ]
103
+ ], "b:3b621770", true);
104
+ _b = bag16(__s, _root, _m0, _m1, _m2, _m3, _m4, _m5, _m6, _m7, _m8, _m9, _m10, _m11, _m12, _m13, null, void 0);
105
+ __s.refFields = _rm$1;
69
106
  } else {
70
107
  {
71
- const _r = (node) => {
72
- el.current = node;
73
- if (!node) return;
74
- applyEscapeProps(node, props);
75
- props.bind?.({
76
- focus: () => node.focus(),
77
- blur: () => node.blur(),
78
- native: node
79
- });
80
- };
81
- if (_r !== _b.b) _b.b = replaceRef(__s, _b.b, _r, _b.a);
108
+ const _v = props.id;
109
+ if (_b.a !== _v) _b.a = _v;
82
110
  }
83
- _b.f = bindSignalValue(__s, _b.f, _b.a, props.value, "i:8374d32b");
84
- setEventHandler(_b.a, "$$input", (e) => props.onChange?.(e.target.value));
85
- setEventHandler(_b.a, "$$keydown", (e) => {
86
- if (e.key === "Enter" && (e.ctrlKey || e.metaKey)) props.onSubmit?.();
87
- });
88
- setEventHandler(_b.a, "$$focusin", props.onFocus);
89
- setEventHandler(_b.a, "$$focusout", props.onBlur);
90
- }
91
- _b.c = bindSignalAttribute(__s, _b.c, _b.a, "id", props.id, "b:016c5af0", "attr");
92
- _b.d = updateFreshClassName(["vx-textarea", props.className], _b.d, _b.a);
93
- {
94
- const _v = {
95
- ...props.style,
96
- ...props.placeholderTextColor ? { "--placeholder-color": props.placeholderTextColor } : {}
97
- };
98
- if (_b.e !== _v) {
99
- setStyle(_b.a, _v, _b.e);
100
- _b.e = _v;
111
+ {
112
+ const _v = (el) => applyEscapeProps(el, props);
113
+ if (_b.b !== _v) _b.b = _v;
114
+ }
115
+ {
116
+ const _v = props.className;
117
+ if (_b.c !== _v) _b.c = _v;
118
+ }
119
+ _b.d = snapshotSpread(layoutChildProps(props, textStyle));
120
+ {
121
+ const _v = props.accessibilityHint;
122
+ if (_b.e !== _v) _b.e = _v;
123
+ }
124
+ {
125
+ const _v = props.accessibilityValue;
126
+ if (_b.f !== _v) _b.f = _v;
127
+ }
128
+ {
129
+ const _v = props.accessibilityState?.disabled;
130
+ if (_b.g !== _v) _b.g = _v;
131
+ }
132
+ {
133
+ const _v = props.accessibilityState?.selected;
134
+ if (_b.h !== _v) _b.h = _v;
135
+ }
136
+ {
137
+ const _v = props.accessibilityState?.checked;
138
+ if (_b.i !== _v) _b.i = _v;
139
+ }
140
+ {
141
+ const _v = props.accessibilityState?.busy;
142
+ if (_b.j !== _v) _b.j = _v;
143
+ }
144
+ {
145
+ const _v = props.accessibilityState?.expanded;
146
+ if (_b.k !== _v) _b.k = _v;
147
+ }
148
+ {
149
+ const _v = props.accessibilityLiveRegion === "none" ? "off" : props.accessibilityLiveRegion;
150
+ if (_b.l !== _v) _b.l = _v;
101
151
  }
152
+ _b.n = bindSignalHostPropSources(__s, _b.n, _b.m, [
153
+ [
154
+ false,
155
+ "id",
156
+ _b.a
157
+ ],
158
+ [
159
+ false,
160
+ "ref",
161
+ _b.b
162
+ ],
163
+ [
164
+ false,
165
+ "className",
166
+ _b.c
167
+ ],
168
+ [true, _b.d],
169
+ [
170
+ false,
171
+ "aria-description",
172
+ _b.e
173
+ ],
174
+ [
175
+ false,
176
+ "aria-valuetext",
177
+ _b.f
178
+ ],
179
+ [
180
+ false,
181
+ "aria-disabled",
182
+ _b.g
183
+ ],
184
+ [
185
+ false,
186
+ "aria-selected",
187
+ _b.h
188
+ ],
189
+ [
190
+ false,
191
+ "aria-checked",
192
+ _b.i
193
+ ],
194
+ [
195
+ false,
196
+ "aria-busy",
197
+ _b.j
198
+ ],
199
+ [
200
+ false,
201
+ "aria-expanded",
202
+ _b.k
203
+ ],
204
+ [
205
+ false,
206
+ "aria-live",
207
+ _b.l
208
+ ]
209
+ ], "b:3b621770", true);
102
210
  }
103
- _b.g = bindSignalAttribute(__s, _b.g, _b.a, "inputMode", props.keyboardType === "number" ? "numeric" : props.keyboardType === "phone" ? "tel" : props.keyboardType === "default" ? "text" : props.keyboardType, "b:5c730abe", "attr");
104
- _b.h = bindSignalAttribute(__s, _b.h, _b.a, "enterKeyHint", props.returnKeyType, "b:a6a3a77f", "attr");
105
- _b.i = setBooleanAttributeIfChanged(props.editable === false, _b.i, _b.a, "readonly");
106
- _b.j = bindSignalAttribute(__s, _b.j, _b.a, "placeholder", props.placeholder ?? props.hint, "b:df751435", "attr");
107
- _b.k = bindSignalAttribute(__s, _b.k, _b.a, "rows", props.rows ?? (props.autoGrow ? 1 : 3), "b:dfee7c66", "attr");
211
+ _b.q = bindSignalChild(__s, _b.q, 1, _b.m, props.children, "b:5ab934f0", null, void 0, void 0, void 0, true);
108
212
  });
109
213
  //#endregion
110
- export { TextArea };
214
+ export { Text };
package/dist/web/ui14.js CHANGED
@@ -1,108 +1,98 @@
1
- import { __s, bag4, bag6, child, clone, drainFrag, forBlock, hookSlots, queueRefAttach, queueRefDetach, setStyle, template, useLayoutEffect, useRef } from "octane";
2
- import { bindSignalAttribute, bindSignalChild, enableSignalBindings, replaceRef, updateFreshClassName } from "octane/internal/client";
3
- //#region src/List.web.tsrx
1
+ import { applyEscapeProps } from "./ui2.js";
2
+ import { layoutChildProps } from "./ui4.js";
3
+ import { __s, bag5, bag8, clone, delegateEvents, setEventHandler, setStyle, snapshotSpread, template } from "octane";
4
+ import { bindSignalAttribute, bindSignalChild, bindSignalHostPropSources, enableSignalBindings } from "octane/internal/client";
5
+ //#region src/RichText.web.tsrx
4
6
  enableSignalBindings(1, true);
5
- var _t$0 = /* @__PURE__ */ template("<!>", 0, 1);
6
- var _t$1 = /* @__PURE__ */ template("<div><!></div>");
7
- var _hs$ = /* @__PURE__ */ hookSlots(3);
8
- function __empty$1(__props, __s, __extra) {
9
- const __block = __s.block;
10
- const props = __extra[0];
7
+ var _t$0 = /* @__PURE__ */ template("<span></span>");
8
+ var _rm$1 = [
9
+ "s",
10
+ "f",
11
+ "e"
12
+ ];
13
+ var RichText = /* @__PURE__ */ __s(function RichText(props, __s, __extra) {
11
14
  let _b = __s.slots[0];
12
15
  if (_b === void 0) {
13
- let _m0, _m1;
16
+ let _m0, _m1, _m2, _m3, _m4, _m5;
14
17
  const _root = clone(_t$0);
15
- _m0 = __block.parentNode;
16
- _m1 = child(_root);
17
- drainFrag(_root, __block.parentNode, __block.endMarker);
18
- _b = bag4(__s, null, _m0, _m1, null, void 0);
18
+ _m0 = props.id;
19
+ _m1 = (el) => applyEscapeProps(el, props);
20
+ _m2 = ["vx-rich-text", props.className];
21
+ _m3 = snapshotSpread(layoutChildProps(props, props.style));
22
+ _m4 = _root;
23
+ _m5 = bindSignalHostPropSources(__s, void 0, _root, [
24
+ [
25
+ false,
26
+ "id",
27
+ _m0
28
+ ],
29
+ [
30
+ false,
31
+ "ref",
32
+ _m1
33
+ ],
34
+ [
35
+ false,
36
+ "className",
37
+ _m2
38
+ ],
39
+ [true, _m3]
40
+ ], "b:e9859754", true);
41
+ _b = bag8(__s, _root, _m0, _m1, _m2, _m3, _m4, _m5, null, void 0);
42
+ __s.refFields = _rm$1;
43
+ } else {
44
+ {
45
+ const _v = props.id;
46
+ if (_b.a !== _v) _b.a = _v;
47
+ }
48
+ {
49
+ const _v = (el) => applyEscapeProps(el, props);
50
+ if (_b.b !== _v) _b.b = _v;
51
+ }
52
+ {
53
+ const _v = ["vx-rich-text", props.className];
54
+ if (_b.c !== _v) _b.c = _v;
55
+ }
56
+ _b.d = snapshotSpread(layoutChildProps(props, props.style));
57
+ _b.f = bindSignalHostPropSources(__s, _b.f, _b.e, [
58
+ [
59
+ false,
60
+ "id",
61
+ _b.a
62
+ ],
63
+ [
64
+ false,
65
+ "ref",
66
+ _b.b
67
+ ],
68
+ [
69
+ false,
70
+ "className",
71
+ _b.c
72
+ ],
73
+ [true, _b.d]
74
+ ], "b:e9859754", true);
19
75
  }
20
- _b.e = bindSignalChild(__s, _b.e, 1, _b.a, props.renderEmpty?.(), "b:00ed4516", _b.b, true, void 0, true, void 0);
21
- }
22
- function __item$3(item, __s, __extra) {
23
- const __block = __s.block;
24
- const props = __extra[0];
25
- const i = __block.itemIndex;
76
+ _b.i = bindSignalChild(__s, _b.i, 1, _b.e, props.children, "b:f9a8f27a", null, void 0, void 0, void 0, true);
77
+ });
78
+ var RichTextSpan = /* @__PURE__ */ (() => (delegateEvents(["click"]), /* @__PURE__ */ __s(function RichTextSpan(props, __s, __extra) {
26
79
  let _b = __s.slots[0];
27
80
  if (_b === void 0) {
28
- let _m0, _m1;
81
+ let _m1;
29
82
  const _root = clone(_t$0);
30
- _m0 = __block.parentNode;
31
- _m1 = child(_root);
32
- drainFrag(_root, __block.parentNode, __block.endMarker);
33
- _b = bag4(__s, null, _m0, _m1, null, void 0);
34
- }
35
- _b.e = bindSignalChild(__s, _b.e, 1, _b.a, props.renderItem(item, i), "b:3e351c68", _b.b, true, void 0, true, void 0);
36
- }
37
- var _rm$6 = [
38
- "r",
39
- "c",
40
- "b"
41
- ];
42
- var List = /* @__PURE__ */ __s(function List(props, __s, __extra) {
43
- const el = useRef(null, _hs$ + 0);
44
- const reachedEnd = useRef(false, _hs$ + 1);
45
- useLayoutEffect(() => {
46
- const node = el.current;
47
- if (!node) return;
48
- for (const [name, value] of Object.entries(props.web ?? {})) if (name.includes("-")) {
49
- if (value == null) node.removeAttribute(name);
50
- else node.setAttribute(name, String(value));
51
- } else node[name] = value;
52
- let frame = 0;
53
- const checkEnd = () => {
54
- frame = 0;
55
- if (node.scrollHeight - node.scrollTop - node.clientHeight > node.clientHeight) reachedEnd.current = false;
56
- else if (!reachedEnd.current) {
57
- reachedEnd.current = true;
58
- props.onEndReached?.();
59
- }
60
- };
61
- const onScroll = () => {
62
- if (!frame) frame = requestAnimationFrame(checkEnd);
63
- };
64
- node.addEventListener("scroll", onScroll, { passive: true });
65
- checkEnd();
66
- return () => {
67
- node.removeEventListener("scroll", onScroll);
68
- if (frame) cancelAnimationFrame(frame);
69
- };
70
- }, [
71
- props.onEndReached,
72
- props.web,
73
- props.items
74
- ], _hs$ + 2);
75
- let _b = __s.slots[0];
76
- if (_b === void 0) {
77
- let _m1, _m2, _m5;
78
- const _root = clone(_t$1);
79
83
  _m1 = _root;
80
- queueRefAttach(__s, _m2 = el, _m1);
81
- (__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.c, _b.b));
82
- _m5 = child(_root);
83
- _b = bag6(__s, _root, void 0, _m1, _m2, void 0, void 0, _m5);
84
- __s.refFields = _rm$6;
85
- } else {
86
- const _r = el;
87
- if (_r !== _b.c) _b.c = replaceRef(__s, _b.c, _r, _b.b);
88
- }
89
- _b.a = bindSignalAttribute(__s, _b.a, _b.b, "id", props.id, "b:6c896629", "attr");
90
- _b.d = updateFreshClassName(["vx-list", props.className], _b.d, _b.b);
84
+ setEventHandler(_root, "$$click", () => props.onPress?.());
85
+ _b = bag5(__s, _root, void 0, _m1, void 0, null, void 0);
86
+ } else setEventHandler(_b.b, "$$click", () => props.onPress?.());
87
+ _b.a = bindSignalAttribute(__s, _b.a, _b.b, "class", props.className, "b:76166c9b", "class");
91
88
  {
92
- const _v = Object.assign({
93
- display: "flex",
94
- flexDirection: "column",
95
- flexWrap: "nowrap",
96
- alignItems: "stretch",
97
- overflowY: "auto",
98
- minHeight: 0
99
- }, props.style);
100
- if (_b.e !== _v) {
101
- setStyle(_b.b, _v, _b.e);
102
- _b.e = _v;
89
+ const _v = props.style;
90
+ if (_b.c !== _v) {
91
+ setStyle(_b.b, _v, _b.c);
92
+ _b.c = _v;
103
93
  }
104
94
  }
105
- forBlock(__s, 1, _b.b, props.items, (item, i) => props.keyFor?.(item) ?? item.id, __item$3, 0, [props], __empty$1, _b.f, true);
106
- });
95
+ _b.f = bindSignalChild(__s, _b.f, 1, _b.b, props.text ?? props.children, "b:f71ea880", null, void 0, void 0, void 0, true);
96
+ })))();
107
97
  //#endregion
108
- export { List };
98
+ export { RichText, RichTextSpan };