@octane-xplat/ui 0.2.0 → 0.3.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.
- package/dist/native/octane-client-build.json +1 -1
- package/dist/native/ui.js +40 -19
- package/dist/native/ui10.js +19 -48
- package/dist/native/ui11.js +118 -56
- package/dist/native/ui12.js +114 -16
- package/dist/native/ui13.js +54 -18
- package/dist/native/ui14.js +76 -13
- package/dist/native/ui15.js +128 -18
- package/dist/native/ui16.js +48 -136
- package/dist/native/ui17.js +42 -19
- package/dist/native/ui18.js +50 -9
- package/dist/native/ui19.js +34 -12
- package/dist/native/ui2.js +10 -48
- package/dist/native/ui20.js +17 -0
- package/dist/native/ui21.js +93 -0
- package/dist/native/ui22.js +124 -0
- package/dist/native/ui23.js +103 -0
- package/dist/native/ui24.js +58 -0
- package/dist/native/ui25.js +19 -0
- package/dist/native/ui26.js +27 -0
- package/dist/native/ui27.js +35 -0
- package/dist/native/ui28.js +146 -0
- package/dist/native/ui29.js +28 -0
- package/dist/native/ui3.js +17 -20
- package/dist/native/ui30.js +35 -0
- package/dist/native/ui31.js +39 -0
- package/dist/native/ui32.js +70 -0
- package/dist/native/ui33.js +30 -0
- package/dist/native/ui34.js +10 -0
- package/dist/native/ui35.js +27 -0
- package/dist/native/ui36.js +34 -0
- package/dist/native/ui37.js +17 -0
- package/dist/native/ui38.js +68 -0
- package/dist/native/ui39.js +33 -0
- package/dist/native/ui4.js +21 -48
- package/dist/native/ui40.js +14 -0
- package/dist/native/ui41.js +104 -0
- package/dist/native/ui42.js +148 -0
- package/dist/native/ui43.js +22 -0
- package/dist/native/ui44.js +8 -0
- package/dist/native/ui5.js +70 -27
- package/dist/native/ui6.js +36 -20
- package/dist/native/ui7.js +24 -61
- package/dist/native/ui8.js +16 -18
- package/dist/native/ui9.js +16 -13
- package/dist/web/octane-client-build.json +1 -1
- package/dist/web/ui.js +40 -19
- package/dist/web/ui10.js +187 -31
- package/dist/web/ui11.js +419 -53
- package/dist/web/ui12.js +83 -15
- package/dist/web/ui13.js +107 -19
- package/dist/web/ui14.js +98 -18
- package/dist/web/ui15.js +83 -47
- package/dist/web/ui16.js +100 -93
- package/dist/web/ui17.js +36 -22
- package/dist/web/ui18.js +29 -15
- package/dist/web/ui19.js +9 -7
- package/dist/web/ui2.js +15 -103
- package/dist/web/ui20.js +114 -0
- package/dist/web/ui21.js +82 -0
- package/dist/web/ui22.js +68 -0
- package/dist/web/ui23.js +57 -0
- package/dist/web/ui24.js +16 -0
- package/dist/web/ui25.js +22 -0
- package/dist/web/ui26.js +39 -0
- package/dist/web/ui27.js +127 -0
- package/dist/web/ui28.js +112 -0
- package/dist/web/ui29.js +108 -0
- package/dist/web/ui3.js +19 -27
- package/dist/web/ui30.js +43 -0
- package/dist/web/ui31.js +42 -0
- package/dist/web/ui32.js +77 -0
- package/dist/web/ui33.js +43 -0
- package/dist/web/ui34.js +67 -0
- package/dist/web/ui35.js +9 -0
- package/dist/web/ui36.js +45 -0
- package/dist/web/ui37.js +47 -0
- package/dist/web/ui38.js +17 -0
- package/dist/web/ui39.js +100 -0
- package/dist/web/ui4.js +145 -17
- package/dist/web/ui40.js +41 -0
- package/dist/web/ui41.js +17 -0
- package/dist/web/ui42.js +9 -0
- package/dist/web/ui43.js +22 -0
- package/dist/web/ui44.js +8 -0
- package/dist/web/ui5.js +54 -52
- package/dist/web/ui6.js +43 -16
- package/dist/web/ui7.js +29 -36
- package/dist/web/ui8.js +29 -18
- package/dist/web/ui9.js +24 -16
- package/package.json +14 -3
- package/src/theme/tokens.css +166 -0
- package/types/index.d.ts +108 -1
- package/types/props.d.ts +333 -8
package/dist/web/ui42.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/stacks.web.ts
|
|
2
|
+
/** Web twin — one linear URL stack; named stacks don't apply. */
|
|
3
|
+
function registerStack(_name, _frame) {}
|
|
4
|
+
function getStack(_name) {}
|
|
5
|
+
function stackEntries() {
|
|
6
|
+
return [].values();
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { getStack, registerStack, stackEntries };
|
package/dist/web/ui43.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region src/store.ts
|
|
2
|
+
function createStore(initial) {
|
|
3
|
+
let value = initial;
|
|
4
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
5
|
+
return {
|
|
6
|
+
get: () => value,
|
|
7
|
+
set(next) {
|
|
8
|
+
const v = typeof next === "function" ? next(value) : next;
|
|
9
|
+
if (Object.is(v, value)) return;
|
|
10
|
+
value = v;
|
|
11
|
+
for (const l of [...listeners]) l();
|
|
12
|
+
},
|
|
13
|
+
subscribe(notify) {
|
|
14
|
+
listeners.add(notify);
|
|
15
|
+
return () => {
|
|
16
|
+
listeners.delete(notify);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { createStore };
|
package/dist/web/ui44.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { hookSlots, useSyncExternalStore } from "octane";
|
|
2
|
+
//#region src/use-store.web.tsrx
|
|
3
|
+
var _h$0 = /* @__PURE__ */ Symbol(/* @__PURE__ */ hookSlots(1));
|
|
4
|
+
function useStore(store, select) {
|
|
5
|
+
return useSyncExternalStore(store.subscribe, select === void 0 ? store.get : () => select(store.get()), _h$0);
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { useStore };
|
package/dist/web/ui5.js
CHANGED
|
@@ -1,62 +1,64 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { applyEscapeProps } from "./ui2.js";
|
|
2
|
+
import { layoutChildProps } from "./ui3.js";
|
|
3
|
+
import { __s, bag7, clone, snapshotSpread, template } from "octane";
|
|
4
|
+
import { bindSignalChild, bindSignalHostPropSources, enableSignalBindings } from "octane/internal/client";
|
|
5
|
+
//#region src/Row.web.tsrx
|
|
4
6
|
enableSignalBindings(1, true);
|
|
5
|
-
delegateEvents([
|
|
6
|
-
"click",
|
|
7
|
-
"pointercancel",
|
|
8
|
-
"pointerdown",
|
|
9
|
-
"pointerleave",
|
|
10
|
-
"pointerup"
|
|
11
|
-
]);
|
|
12
7
|
var _t$0 = /* @__PURE__ */ template("<div></div>");
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
const down = () => {
|
|
22
|
-
if (props.disabled || !props.onLongPress) return;
|
|
23
|
-
cancel();
|
|
24
|
-
timer = setTimeout(() => {
|
|
25
|
-
timer = null;
|
|
26
|
-
props.onLongPress?.();
|
|
27
|
-
}, 500);
|
|
28
|
-
};
|
|
8
|
+
var _rm$1 = [
|
|
9
|
+
"s",
|
|
10
|
+
"e",
|
|
11
|
+
"d"
|
|
12
|
+
];
|
|
13
|
+
var Row = /* @__PURE__ */ __s(function Row(props, __s, __extra) {
|
|
29
14
|
let _b = __s.slots[0];
|
|
30
15
|
if (_b === void 0) {
|
|
31
|
-
let _m1;
|
|
16
|
+
let _m0, _m1, _m2, _m3, _m4;
|
|
32
17
|
const _root = clone(_t$0);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
18
|
+
_m0 = (e) => applyEscapeProps(e, props);
|
|
19
|
+
_m1 = ["vx-row", props.className];
|
|
20
|
+
_m2 = snapshotSpread(layoutChildProps(props));
|
|
21
|
+
_m3 = _root;
|
|
22
|
+
_m4 = bindSignalHostPropSources(__s, void 0, _root, [
|
|
23
|
+
[
|
|
24
|
+
false,
|
|
25
|
+
"ref",
|
|
26
|
+
_m0
|
|
27
|
+
],
|
|
28
|
+
[
|
|
29
|
+
false,
|
|
30
|
+
"className",
|
|
31
|
+
_m1
|
|
32
|
+
],
|
|
33
|
+
[true, _m2]
|
|
34
|
+
], "b:be019871", true);
|
|
35
|
+
_b = bag7(__s, _root, _m0, _m1, _m2, _m3, _m4, null, void 0);
|
|
36
|
+
__s.refFields = _rm$1;
|
|
40
37
|
} else {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
_b.c = updateFreshClassName(["vx-pressable", props.className], _b.c, _b.b);
|
|
49
|
-
{
|
|
50
|
-
const _v = props.style;
|
|
51
|
-
if (_b.d !== _v) {
|
|
52
|
-
setStyle(_b.b, _v, _b.d);
|
|
53
|
-
_b.d = _v;
|
|
38
|
+
{
|
|
39
|
+
const _v = (e) => applyEscapeProps(e, props);
|
|
40
|
+
if (_b.a !== _v) _b.a = _v;
|
|
41
|
+
}
|
|
42
|
+
{
|
|
43
|
+
const _v = ["vx-row", props.className];
|
|
44
|
+
if (_b.b !== _v) _b.b = _v;
|
|
54
45
|
}
|
|
46
|
+
_b.c = snapshotSpread(layoutChildProps(props));
|
|
47
|
+
_b.e = bindSignalHostPropSources(__s, _b.e, _b.d, [
|
|
48
|
+
[
|
|
49
|
+
false,
|
|
50
|
+
"ref",
|
|
51
|
+
_b.a
|
|
52
|
+
],
|
|
53
|
+
[
|
|
54
|
+
false,
|
|
55
|
+
"className",
|
|
56
|
+
_b.b
|
|
57
|
+
],
|
|
58
|
+
[true, _b.c]
|
|
59
|
+
], "b:be019871", true);
|
|
55
60
|
}
|
|
56
|
-
_b.
|
|
57
|
-
_b.f = bindSignalAttribute(__s, _b.f, _b.b, "aria-label", props.accessibilityLabel, "b:bf6ff2b6", "ariaAttr");
|
|
58
|
-
_b.g = bindSignalAttribute(__s, _b.g, _b.b, "aria-hidden", props.accessible === false ? true : void 0, "b:22b020b5", "ariaAttr");
|
|
59
|
-
_b.j = bindSignalChild(__s, _b.j, 1, _b.b, props.children, "b:7124d4dc", null, void 0, void 0, void 0, true);
|
|
61
|
+
_b.h = bindSignalChild(__s, _b.h, 1, _b.d, props.children, "b:95d1a265", null, void 0, void 0, void 0, true);
|
|
60
62
|
});
|
|
61
63
|
//#endregion
|
|
62
|
-
export {
|
|
64
|
+
export { Row };
|
package/dist/web/ui6.js
CHANGED
|
@@ -1,31 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
1
|
+
import { applyEscapeProps } from "./ui2.js";
|
|
2
|
+
import { __s, bag6, clone, queueRefAttach, queueRefDetach, setStyle, template } from "octane";
|
|
3
|
+
import { childTextHoleUpdate, replaceRef, updateFreshClassName } from "octane/internal/client";
|
|
4
|
+
//#region src/Grid.web.tsrx
|
|
5
|
+
var _t$0 = /* @__PURE__ */ template("<div></div>");
|
|
6
|
+
var _rm$1 = [
|
|
7
|
+
"r",
|
|
8
|
+
"d",
|
|
9
|
+
"b"
|
|
10
|
+
];
|
|
11
|
+
function parseTracks(spec) {
|
|
12
|
+
return spec?.split(",").map((part) => {
|
|
13
|
+
const track = part.trim();
|
|
14
|
+
if (track === "auto") return "auto";
|
|
15
|
+
if (track.endsWith("*")) return `${track.slice(0, -1) || "1"}fr`;
|
|
16
|
+
return /^\d+(?:\.\d+)?$/.test(track) ? `${track}px` : track;
|
|
17
|
+
}).join(" ");
|
|
18
|
+
}
|
|
19
|
+
var warnedAboutGap = false;
|
|
20
|
+
var Grid = /* @__PURE__ */ __s(function Grid(props, __s, __extra) {
|
|
21
|
+
if (props.gap != null && !warnedAboutGap) {
|
|
22
|
+
warnedAboutGap = true;
|
|
23
|
+
console.warn("[Grid] gap is not supported; use child margins instead.");
|
|
24
|
+
}
|
|
25
|
+
if (__s.block.pending && !__s.block.crossRenderUpdate) return;
|
|
8
26
|
let _b = __s.slots[0];
|
|
9
27
|
if (_b === void 0) {
|
|
10
28
|
let _m1, _m3;
|
|
11
29
|
const _root = clone(_t$0);
|
|
12
30
|
_m1 = _root;
|
|
13
|
-
_m3 =
|
|
14
|
-
|
|
15
|
-
_b =
|
|
31
|
+
queueRefAttach(__s, _m3 = (el) => applyEscapeProps(el, props), _m1);
|
|
32
|
+
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.d, _b.b));
|
|
33
|
+
_b = bag6(__s, _root, void 0, _m1, void 0, _m3, null, void 0);
|
|
34
|
+
__s.refFields = _rm$1;
|
|
16
35
|
} else {
|
|
17
|
-
|
|
18
|
-
|
|
36
|
+
const _r = (el) => applyEscapeProps(el, props);
|
|
37
|
+
if (_r !== _b.d) _b.d = replaceRef(__s, _b.d, _r, _b.b);
|
|
19
38
|
}
|
|
20
|
-
_b.a =
|
|
39
|
+
_b.a = updateFreshClassName(["vx-grid", props.className], _b.a, _b.b);
|
|
21
40
|
{
|
|
22
|
-
const _v =
|
|
41
|
+
const _v = {
|
|
42
|
+
...props.style,
|
|
43
|
+
...props.rows ? { gridTemplateRows: parseTracks(props.rows) } : {},
|
|
44
|
+
...props.columns ? { gridTemplateColumns: parseTracks(props.columns) } : {}
|
|
45
|
+
};
|
|
23
46
|
if (_b.c !== _v) {
|
|
24
47
|
setStyle(_b.b, _v, _b.c);
|
|
25
48
|
_b.c = _v;
|
|
26
49
|
}
|
|
27
50
|
}
|
|
28
|
-
|
|
51
|
+
{
|
|
52
|
+
const _v = props.children;
|
|
53
|
+
_b.e = childTextHoleUpdate(__s, 1, _b.b, _v, _b.e, _b.f);
|
|
54
|
+
_b.f = _v;
|
|
55
|
+
}
|
|
29
56
|
});
|
|
30
57
|
//#endregion
|
|
31
|
-
export {
|
|
58
|
+
export { Grid };
|
package/dist/web/ui7.js
CHANGED
|
@@ -1,47 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _t$0 = /* @__PURE__ */ template("
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { applyEscapeProps } from "./ui2.js";
|
|
2
|
+
import { __s, bag6, clone, queueRefAttach, queueRefDetach, setStyle, template } from "octane";
|
|
3
|
+
import { childTextHoleUpdate, replaceRef, updateFreshClassName } from "octane/internal/client";
|
|
4
|
+
//#region src/Stack.web.tsrx
|
|
5
|
+
var _t$0 = /* @__PURE__ */ template("<div></div>");
|
|
6
|
+
var _rm$1 = [
|
|
7
|
+
"r",
|
|
8
|
+
"d",
|
|
9
|
+
"b"
|
|
10
|
+
];
|
|
11
|
+
var Stack = /* @__PURE__ */ __s(function Stack(props, __s, __extra) {
|
|
11
12
|
let _b = __s.slots[0];
|
|
12
13
|
if (_b === void 0) {
|
|
13
|
-
let
|
|
14
|
+
let _m1, _m3;
|
|
14
15
|
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);
|
|
19
|
-
}
|
|
20
|
-
_b.e = bindSignalChild(__s, _b.e, 1, _b.a, props.renderEmpty?.(), "b:7e61efcc", _b.b, true, void 0, true, void 0);
|
|
21
|
-
}
|
|
22
|
-
function __item$3(item, __s, __extra) {
|
|
23
|
-
__extra[0].renderItem(item);
|
|
24
|
-
if (__s.block.pending && !__s.block.crossRenderUpdate) return;
|
|
25
|
-
}
|
|
26
|
-
var List = /* @__PURE__ */ __s(function List(props, __s, __extra) {
|
|
27
|
-
let _b = __s.slots[0];
|
|
28
|
-
if (_b === void 0) {
|
|
29
|
-
let _m1, _m4;
|
|
30
|
-
const _root = clone(_t$1);
|
|
31
16
|
_m1 = _root;
|
|
32
|
-
|
|
33
|
-
|
|
17
|
+
queueRefAttach(__s, _m3 = (el) => applyEscapeProps(el, props), _m1);
|
|
18
|
+
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.d, _b.b));
|
|
19
|
+
_b = bag6(__s, _root, void 0, _m1, void 0, _m3, null, void 0);
|
|
20
|
+
__s.refFields = _rm$1;
|
|
21
|
+
} else {
|
|
22
|
+
const _r = (el) => applyEscapeProps(el, props);
|
|
23
|
+
if (_r !== _b.d) _b.d = replaceRef(__s, _b.d, _r, _b.b);
|
|
34
24
|
}
|
|
35
|
-
_b.a =
|
|
36
|
-
_b.c = updateFreshClassName(["vx-list", props.className], _b.c, _b.b);
|
|
25
|
+
_b.a = updateFreshClassName(["vx-stack", props.className], _b.a, _b.b);
|
|
37
26
|
{
|
|
38
27
|
const _v = props.style;
|
|
39
|
-
if (_b.
|
|
40
|
-
setStyle(_b.b, _v, _b.
|
|
41
|
-
_b.
|
|
28
|
+
if (_b.c !== _v) {
|
|
29
|
+
setStyle(_b.b, _v, _b.c);
|
|
30
|
+
_b.c = _v;
|
|
42
31
|
}
|
|
43
32
|
}
|
|
44
|
-
|
|
33
|
+
{
|
|
34
|
+
const _v = props.children;
|
|
35
|
+
_b.e = childTextHoleUpdate(__s, 1, _b.b, _v, _b.e, _b.f);
|
|
36
|
+
_b.f = _v;
|
|
37
|
+
}
|
|
45
38
|
});
|
|
46
39
|
//#endregion
|
|
47
|
-
export {
|
|
40
|
+
export { Stack };
|
package/dist/web/ui8.js
CHANGED
|
@@ -1,29 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { applyEscapeProps } from "./ui2.js";
|
|
2
|
+
import { __s, bag6, clone, queueRefAttach, queueRefDetach, setStyle, template } from "octane";
|
|
3
|
+
import { childTextHoleUpdate, replaceRef, updateFreshClassName } from "octane/internal/client";
|
|
4
|
+
//#region src/Absolute.web.tsrx
|
|
5
5
|
var _t$0 = /* @__PURE__ */ template("<div></div>");
|
|
6
|
-
var
|
|
6
|
+
var _rm$1 = [
|
|
7
|
+
"r",
|
|
8
|
+
"d",
|
|
9
|
+
"b"
|
|
10
|
+
];
|
|
11
|
+
var Absolute = /* @__PURE__ */ __s(function Absolute(props, __s, __extra) {
|
|
7
12
|
let _b = __s.slots[0];
|
|
8
13
|
if (_b === void 0) {
|
|
9
|
-
let _m1;
|
|
14
|
+
let _m1, _m3;
|
|
10
15
|
const _root = clone(_t$0);
|
|
11
16
|
_m1 = _root;
|
|
12
|
-
|
|
17
|
+
queueRefAttach(__s, _m3 = (el) => applyEscapeProps(el, props), _m1);
|
|
18
|
+
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.d, _b.b));
|
|
19
|
+
_b = bag6(__s, _root, void 0, _m1, void 0, _m3, null, void 0);
|
|
20
|
+
__s.refFields = _rm$1;
|
|
21
|
+
} else {
|
|
22
|
+
const _r = (el) => applyEscapeProps(el, props);
|
|
23
|
+
if (_r !== _b.d) _b.d = replaceRef(__s, _b.d, _r, _b.b);
|
|
13
24
|
}
|
|
14
|
-
_b.a =
|
|
15
|
-
_b.c = updateFreshClassName(["vx-scroll", props.className], _b.c, _b.b);
|
|
25
|
+
_b.a = updateFreshClassName(["vx-absolute", props.className], _b.a, _b.b);
|
|
16
26
|
{
|
|
17
|
-
const _v =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (_b.d !== _v) {
|
|
22
|
-
setStyle(_b.b, _v, _b.d);
|
|
23
|
-
_b.d = _v;
|
|
27
|
+
const _v = props.style;
|
|
28
|
+
if (_b.c !== _v) {
|
|
29
|
+
setStyle(_b.b, _v, _b.c);
|
|
30
|
+
_b.c = _v;
|
|
24
31
|
}
|
|
25
32
|
}
|
|
26
|
-
|
|
33
|
+
{
|
|
34
|
+
const _v = props.children;
|
|
35
|
+
_b.e = childTextHoleUpdate(__s, 1, _b.b, _v, _b.e, _b.f);
|
|
36
|
+
_b.f = _v;
|
|
37
|
+
}
|
|
27
38
|
});
|
|
28
39
|
//#endregion
|
|
29
|
-
export {
|
|
40
|
+
export { Absolute };
|
package/dist/web/ui9.js
CHANGED
|
@@ -1,27 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _t$0 = /* @__PURE__ */ template("<
|
|
6
|
-
var
|
|
1
|
+
import { applyEscapeProps } from "./ui2.js";
|
|
2
|
+
import { __s, bag4, clone, queueRefAttach, queueRefDetach, setStyle, template } from "octane";
|
|
3
|
+
import { replaceRef, updateFreshClassName } from "octane/internal/client";
|
|
4
|
+
//#region src/Spacer.web.tsrx
|
|
5
|
+
var _t$0 = /* @__PURE__ */ template("<div></div>");
|
|
6
|
+
var _rm$0 = [
|
|
7
|
+
"r",
|
|
8
|
+
"d",
|
|
9
|
+
"b"
|
|
10
|
+
];
|
|
11
|
+
var Spacer = /* @__PURE__ */ __s(function Spacer(props, __s, __extra) {
|
|
7
12
|
let _b = __s.slots[0];
|
|
8
13
|
if (_b === void 0) {
|
|
9
|
-
let _m1;
|
|
14
|
+
let _m1, _m3;
|
|
10
15
|
const _root = clone(_t$0);
|
|
11
16
|
_m1 = _root;
|
|
12
|
-
|
|
17
|
+
queueRefAttach(__s, _m3 = (el) => applyEscapeProps(el, props), _m1);
|
|
18
|
+
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.d, _b.b));
|
|
19
|
+
_b = bag4(__s, _root, void 0, _m1, void 0, _m3);
|
|
20
|
+
__s.refFields = _rm$0;
|
|
21
|
+
} else {
|
|
22
|
+
const _r = (el) => applyEscapeProps(el, props);
|
|
23
|
+
if (_r !== _b.d) _b.d = replaceRef(__s, _b.d, _r, _b.b);
|
|
13
24
|
}
|
|
14
|
-
_b.a =
|
|
15
|
-
_b.c = bindSignalAttribute(__s, _b.c, _b.b, "class", props.className, "b:dee59c6d", "class");
|
|
25
|
+
_b.a = updateFreshClassName(["vx-spacer", props.className], _b.a, _b.b);
|
|
16
26
|
{
|
|
17
27
|
const _v = props.style;
|
|
18
|
-
if (_b.
|
|
19
|
-
setStyle(_b.b, _v, _b.
|
|
20
|
-
_b.
|
|
28
|
+
if (_b.c !== _v) {
|
|
29
|
+
setStyle(_b.b, _v, _b.c);
|
|
30
|
+
_b.c = _v;
|
|
21
31
|
}
|
|
22
32
|
}
|
|
23
|
-
_b.e = bindSignalAttribute(__s, _b.e, _b.b, "src", props.src, "b:1951fade", "attr");
|
|
24
|
-
_b.f = bindSignalAttribute(__s, _b.f, _b.b, "alt", props.alt, "b:0b6f5f10", "attr");
|
|
25
33
|
});
|
|
26
34
|
//#endregion
|
|
27
|
-
export {
|
|
35
|
+
export { Spacer };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octane-xplat/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -20,15 +20,26 @@
|
|
|
20
20
|
"@nativescript-community/octane": "0.2.1",
|
|
21
21
|
"@nativescript/core": "9.1.2",
|
|
22
22
|
"@octanejs/vite-plugin": "0.1.58",
|
|
23
|
+
"jsdom": "30.1.1",
|
|
23
24
|
"octane": "0.4.0",
|
|
24
|
-
"vite": "8.3.0"
|
|
25
|
+
"vite": "8.3.0",
|
|
26
|
+
"vitest": "5.0.1"
|
|
25
27
|
},
|
|
26
28
|
"peerDependencies": {
|
|
27
29
|
"@nativescript-community/octane": ">=0.2.1 <1",
|
|
28
30
|
"@nativescript/core": ">=9.1.0 <10",
|
|
29
31
|
"octane": ">=0.1.51 <1"
|
|
30
32
|
},
|
|
33
|
+
"peerDependenciesMeta": {
|
|
34
|
+
"@nativescript-community/octane": {
|
|
35
|
+
"optional": true
|
|
36
|
+
},
|
|
37
|
+
"@nativescript/core": {
|
|
38
|
+
"optional": true
|
|
39
|
+
}
|
|
40
|
+
},
|
|
31
41
|
"scripts": {
|
|
32
|
-
"build": "vite build && vite build --mode native && tsc -p tsconfig.types.json"
|
|
42
|
+
"build": "vite build && vite build --mode native && tsc -p tsconfig.types.json",
|
|
43
|
+
"test:native": "vitest run --config vitest.native.config.mts"
|
|
33
44
|
}
|
|
34
45
|
}
|
package/src/theme/tokens.css
CHANGED
|
@@ -27,11 +27,65 @@
|
|
|
27
27
|
flex-direction: column;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
/* Safe-area values are zero when the viewport has no display cutout. */
|
|
31
|
+
.vx-safe-area {
|
|
32
|
+
padding-top: constant(safe-area-inset-top);
|
|
33
|
+
padding-right: constant(safe-area-inset-right);
|
|
34
|
+
padding-bottom: constant(safe-area-inset-bottom);
|
|
35
|
+
padding-left: constant(safe-area-inset-left);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.vx-safe-area {
|
|
39
|
+
padding-top: env(safe-area-inset-top);
|
|
40
|
+
padding-right: env(safe-area-inset-right);
|
|
41
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
42
|
+
padding-left: env(safe-area-inset-left);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.vx-keyboard-avoiding { display: flex; flex-direction: column; }
|
|
46
|
+
.vx-drawer { display: flex; flex-direction: row; position: relative; overflow: hidden; }
|
|
47
|
+
.vx-drawer-main { display: flex; flex: 1; min-width: 0; }
|
|
48
|
+
.vx-drawer-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.35); }
|
|
49
|
+
.vx-drawer-panel {
|
|
50
|
+
position: absolute;
|
|
51
|
+
z-index: 1;
|
|
52
|
+
top: 0;
|
|
53
|
+
bottom: 0;
|
|
54
|
+
left: 0;
|
|
55
|
+
width: 280px;
|
|
56
|
+
overflow: auto;
|
|
57
|
+
background: var(--color-surface);
|
|
58
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
|
|
59
|
+
}
|
|
60
|
+
|
|
30
61
|
.vx-row {
|
|
31
62
|
flex-direction: row;
|
|
32
63
|
}
|
|
33
64
|
|
|
65
|
+
.vx-grid,
|
|
66
|
+
.vx-stack {
|
|
67
|
+
display: grid;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.vx-stack > * {
|
|
71
|
+
grid-area: 1 / 1;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.vx-absolute {
|
|
75
|
+
position: relative;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.vx-absolute > * {
|
|
79
|
+
position: absolute;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.vx-spacer {
|
|
83
|
+
flex-grow: 1;
|
|
84
|
+
}
|
|
85
|
+
|
|
34
86
|
.vx-pressable {
|
|
87
|
+
display: flex;
|
|
88
|
+
flex-direction: column;
|
|
35
89
|
user-select: none;
|
|
36
90
|
}
|
|
37
91
|
|
|
@@ -39,11 +93,123 @@
|
|
|
39
93
|
.vx-pressable:active {
|
|
40
94
|
opacity: 0.85;
|
|
41
95
|
}
|
|
96
|
+
.vx-pressable-no-feedback:active {
|
|
97
|
+
opacity: 1;
|
|
98
|
+
}
|
|
42
99
|
/* native press feedback (NS pseudo — dead rule on web, and vice versa) */
|
|
43
100
|
.vx-pressable:pressed {
|
|
44
101
|
opacity: 0.85;
|
|
45
102
|
}
|
|
46
103
|
|
|
104
|
+
.vx-overlay {
|
|
105
|
+
z-index: 1000;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.vx-overlay-shade {
|
|
109
|
+
position: absolute;
|
|
110
|
+
inset: 0;
|
|
111
|
+
background-color: rgba(0, 0, 0, 0.45);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.vx-overlay-content {
|
|
115
|
+
position: relative;
|
|
116
|
+
z-index: 1;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.vx-popover {
|
|
120
|
+
z-index: 1001;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.vx-toast-host {
|
|
124
|
+
position: fixed;
|
|
125
|
+
z-index: 1002;
|
|
126
|
+
left: 0;
|
|
127
|
+
right: 0;
|
|
128
|
+
display: flex;
|
|
129
|
+
justify-content: center;
|
|
130
|
+
pointer-events: none;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.vx-toast-top { top: 24px; }
|
|
134
|
+
.vx-toast-bottom { bottom: 24px; }
|
|
135
|
+
|
|
136
|
+
.vx-toast {
|
|
137
|
+
pointer-events: auto;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* auto-grow owns height — the manual resize handle has no native analog */
|
|
141
|
+
.vx-textarea {
|
|
142
|
+
resize: none;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* Modal is a real top-layer dialog on web. Presentation variants keep their
|
|
146
|
+
sizing and anchoring in tokens so both the component and openModal share it. */
|
|
147
|
+
.vx-modal {
|
|
148
|
+
width: 480px;
|
|
149
|
+
max-width: 90%;
|
|
150
|
+
max-height: 90%;
|
|
151
|
+
padding: 24px;
|
|
152
|
+
border: 0;
|
|
153
|
+
border-radius: 16px;
|
|
154
|
+
color: var(--color-text);
|
|
155
|
+
background-color: var(--color-surface);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.vx-modal::backdrop {
|
|
159
|
+
background: rgba(15, 23, 42, 0.45);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.vx-modal--dialog {
|
|
163
|
+
width: 480px;
|
|
164
|
+
max-width: 90%;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.vx-modal--sheet {
|
|
168
|
+
width: 100%;
|
|
169
|
+
max-width: none;
|
|
170
|
+
max-height: 85%;
|
|
171
|
+
position: fixed;
|
|
172
|
+
inset: auto 0 0;
|
|
173
|
+
margin: 0;
|
|
174
|
+
border-radius: 16px 16px 0 0;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.vx-modal--fullscreen {
|
|
178
|
+
width: 100%;
|
|
179
|
+
max-width: none;
|
|
180
|
+
height: 100%;
|
|
181
|
+
max-height: none;
|
|
182
|
+
margin: 0;
|
|
183
|
+
border-radius: 0;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
input::placeholder,
|
|
187
|
+
textarea::placeholder {
|
|
188
|
+
color: var(--placeholder-color, currentColor);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.vx-spinner {
|
|
192
|
+
display: inline-block;
|
|
193
|
+
width: 1em;
|
|
194
|
+
height: 1em;
|
|
195
|
+
box-sizing: border-box;
|
|
196
|
+
border: 2px solid currentColor;
|
|
197
|
+
border-right-color: transparent;
|
|
198
|
+
border-radius: 50%;
|
|
199
|
+
animation: vx-spinner-turn 0.8s linear infinite;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
@keyframes vx-spinner-turn {
|
|
203
|
+
to { transform: rotate(360deg); }
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.vx-h1 { font-size: 2em; font-weight: bold; }
|
|
207
|
+
.vx-h2 { font-size: 1.5em; font-weight: bold; }
|
|
208
|
+
.vx-h3 { font-size: 1.17em; font-weight: bold; }
|
|
209
|
+
.vx-h4 { font-size: 1em; font-weight: bold; }
|
|
210
|
+
.vx-h5 { font-size: 0.83em; font-weight: bold; }
|
|
211
|
+
.vx-h6 { font-size: 0.67em; font-weight: bold; }
|
|
212
|
+
|
|
47
213
|
/* utilities (hand-written subset for the harness; Tailwind later) */
|
|
48
214
|
|
|
49
215
|
.flex-1 { flex-grow: 1; }
|