@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.
- package/dist/native/octane-client-build.json +8 -0
- package/dist/native/ui.js +19 -0
- package/dist/native/ui10.js +52 -0
- package/dist/native/ui11.js +58 -0
- package/dist/native/ui12.js +17 -0
- package/dist/native/ui13.js +19 -0
- package/dist/native/ui14.js +20 -0
- package/dist/native/ui15.js +19 -0
- package/dist/native/ui16.js +143 -0
- package/dist/native/ui17.js +24 -0
- package/dist/native/ui18.js +13 -0
- package/dist/native/ui19.js +13 -0
- package/dist/native/ui2.js +49 -0
- package/dist/native/ui3.js +21 -0
- package/dist/native/ui4.js +49 -0
- package/dist/native/ui5.js +35 -0
- package/dist/native/ui6.js +25 -0
- package/dist/native/ui7.js +73 -0
- package/dist/native/ui8.js +33 -0
- package/dist/native/ui9.js +24 -0
- package/dist/web/octane-client-build.json +8 -0
- package/dist/web/ui.js +19 -0
- package/dist/web/ui10.js +43 -0
- package/dist/web/ui11.js +57 -0
- package/dist/web/ui12.js +16 -0
- package/dist/web/ui13.js +22 -0
- package/dist/web/ui14.js +28 -0
- package/dist/web/ui15.js +49 -0
- package/dist/web/ui16.js +101 -0
- package/dist/web/ui17.js +31 -0
- package/dist/web/ui18.js +17 -0
- package/dist/web/ui19.js +6 -0
- package/dist/web/ui2.js +105 -0
- package/dist/web/ui3.js +28 -0
- package/dist/web/ui4.js +25 -0
- package/dist/web/ui5.js +31 -0
- package/dist/web/ui6.js +31 -0
- package/dist/web/ui7.js +47 -0
- package/dist/web/ui8.js +29 -0
- package/dist/web/ui9.js +27 -0
- package/package.json +32 -0
- package/src/theme/tokens.css +110 -0
package/dist/web/ui6.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { __s, bag5, clone, delegateEvents, setEventHandler, setStyle, template } from "octane";
|
|
2
|
+
import { bindSignalAttribute, bindSignalValue, enableSignalBindings } from "octane/internal/client";
|
|
3
|
+
//#region src/TextInput.web.tsrx
|
|
4
|
+
enableSignalBindings(1, true);
|
|
5
|
+
delegateEvents(["input"]);
|
|
6
|
+
var _t$0 = /* @__PURE__ */ template("<input data-octane-input=\"i:cd4865f9\"/>");
|
|
7
|
+
var TextInput = /* @__PURE__ */ __s(function TextInput(props, __s, __extra) {
|
|
8
|
+
let _b = __s.slots[0];
|
|
9
|
+
if (_b === void 0) {
|
|
10
|
+
let _m1, _m3;
|
|
11
|
+
const _root = clone(_t$0);
|
|
12
|
+
_m1 = _root;
|
|
13
|
+
_m3 = bindSignalValue(__s, void 0, _root, props.value, "i:cd4865f9");
|
|
14
|
+
setEventHandler(_root, "$$input", (e) => props.onChange?.(e.target.value));
|
|
15
|
+
_b = bag5(__s, _root, void 0, _m1, void 0, _m3, void 0);
|
|
16
|
+
} else {
|
|
17
|
+
_b.d = bindSignalValue(__s, _b.d, _b.b, props.value, "i:cd4865f9");
|
|
18
|
+
setEventHandler(_b.b, "$$input", (e) => props.onChange?.(e.target.value));
|
|
19
|
+
}
|
|
20
|
+
_b.a = bindSignalAttribute(__s, _b.a, _b.b, "class", props.className, "b:f914f05f", "class");
|
|
21
|
+
{
|
|
22
|
+
const _v = props.style;
|
|
23
|
+
if (_b.c !== _v) {
|
|
24
|
+
setStyle(_b.b, _v, _b.c);
|
|
25
|
+
_b.c = _v;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
_b.e = bindSignalAttribute(__s, _b.e, _b.b, "placeholder", props.placeholder, "b:d3d4e22e", "attr");
|
|
29
|
+
});
|
|
30
|
+
//#endregion
|
|
31
|
+
export { TextInput };
|
package/dist/web/ui7.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { __s, bag4, bag5, child, clone, drainFrag, forBlock, setStyle, template } from "octane";
|
|
2
|
+
import { bindSignalAttribute, bindSignalChild, enableSignalBindings, updateFreshClassName } from "octane/internal/client";
|
|
3
|
+
//#region src/List.web.tsrx
|
|
4
|
+
enableSignalBindings(1, true);
|
|
5
|
+
var _t$0 = /* @__PURE__ */ template("<!>", 0, 1);
|
|
6
|
+
var _t$1 = /* @__PURE__ */ template("<div><!></div>");
|
|
7
|
+
var _key$0 = (item) => item.id;
|
|
8
|
+
function __empty$1(__props, __s, __extra) {
|
|
9
|
+
const __block = __s.block;
|
|
10
|
+
const props = __extra[0];
|
|
11
|
+
let _b = __s.slots[0];
|
|
12
|
+
if (_b === void 0) {
|
|
13
|
+
let _m0, _m1;
|
|
14
|
+
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:24ab3bd2", _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
|
+
_m1 = _root;
|
|
32
|
+
_m4 = child(_root);
|
|
33
|
+
_b = bag5(__s, _root, void 0, _m1, void 0, void 0, _m4);
|
|
34
|
+
}
|
|
35
|
+
_b.a = bindSignalAttribute(__s, _b.a, _b.b, "id", props.id, "b:73617e12", "attr");
|
|
36
|
+
_b.c = updateFreshClassName(["vx-list", props.className], _b.c, _b.b);
|
|
37
|
+
{
|
|
38
|
+
const _v = props.style;
|
|
39
|
+
if (_b.d !== _v) {
|
|
40
|
+
setStyle(_b.b, _v, _b.d);
|
|
41
|
+
_b.d = _v;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
forBlock(__s, 1, _b.b, props.items, _key$0, __item$3, 8, [props], __empty$1, _b.e, true);
|
|
45
|
+
});
|
|
46
|
+
//#endregion
|
|
47
|
+
export { List };
|
package/dist/web/ui8.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { __s, bag6, clone, setStyle, template } from "octane";
|
|
2
|
+
import { bindSignalAttribute, bindSignalChild, enableSignalBindings, updateFreshClassName } from "octane/internal/client";
|
|
3
|
+
//#region src/ScrollView.web.tsrx
|
|
4
|
+
enableSignalBindings(1, true);
|
|
5
|
+
var _t$0 = /* @__PURE__ */ template("<div></div>");
|
|
6
|
+
var ScrollView = /* @__PURE__ */ __s(function ScrollView(props, __s, __extra) {
|
|
7
|
+
let _b = __s.slots[0];
|
|
8
|
+
if (_b === void 0) {
|
|
9
|
+
let _m1;
|
|
10
|
+
const _root = clone(_t$0);
|
|
11
|
+
_m1 = _root;
|
|
12
|
+
_b = bag6(__s, _root, void 0, _m1, void 0, void 0, null, void 0);
|
|
13
|
+
}
|
|
14
|
+
_b.a = bindSignalAttribute(__s, _b.a, _b.b, "id", props.id, "b:43734484", "attr");
|
|
15
|
+
_b.c = updateFreshClassName(["vx-scroll", props.className], _b.c, _b.b);
|
|
16
|
+
{
|
|
17
|
+
const _v = {
|
|
18
|
+
...props.horizontal ? { overflowX: "auto" } : { overflowY: "auto" },
|
|
19
|
+
...props.style
|
|
20
|
+
};
|
|
21
|
+
if (_b.d !== _v) {
|
|
22
|
+
setStyle(_b.b, _v, _b.d);
|
|
23
|
+
_b.d = _v;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
_b.g = bindSignalChild(__s, _b.g, 1, _b.b, props.children, "b:a9b6a064", null, void 0, void 0, void 0, true);
|
|
27
|
+
});
|
|
28
|
+
//#endregion
|
|
29
|
+
export { ScrollView };
|
package/dist/web/ui9.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { __s, bag6, clone, setStyle, template } from "octane";
|
|
2
|
+
import { bindSignalAttribute, enableSignalBindings } from "octane/internal/client";
|
|
3
|
+
//#region src/Image.web.tsrx
|
|
4
|
+
enableSignalBindings(1, true);
|
|
5
|
+
var _t$0 = /* @__PURE__ */ template("<img/>");
|
|
6
|
+
var Image = /* @__PURE__ */ __s(function Image(props, __s, __extra) {
|
|
7
|
+
let _b = __s.slots[0];
|
|
8
|
+
if (_b === void 0) {
|
|
9
|
+
let _m1;
|
|
10
|
+
const _root = clone(_t$0);
|
|
11
|
+
_m1 = _root;
|
|
12
|
+
_b = bag6(__s, _root, void 0, _m1, void 0, void 0, void 0, void 0);
|
|
13
|
+
}
|
|
14
|
+
_b.a = bindSignalAttribute(__s, _b.a, _b.b, "id", props.id, "b:2b4768ff", "attr");
|
|
15
|
+
_b.c = bindSignalAttribute(__s, _b.c, _b.b, "class", props.className, "b:75dde9fe", "class");
|
|
16
|
+
{
|
|
17
|
+
const _v = props.style;
|
|
18
|
+
if (_b.d !== _v) {
|
|
19
|
+
setStyle(_b.b, _v, _b.d);
|
|
20
|
+
_b.d = _v;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
_b.e = bindSignalAttribute(__s, _b.e, _b.b, "src", props.src, "b:0755e81c", "attr");
|
|
24
|
+
_b.f = bindSignalAttribute(__s, _b.f, _b.b, "alt", props.alt, "b:62789e39", "attr");
|
|
25
|
+
});
|
|
26
|
+
//#endregion
|
|
27
|
+
export { Image };
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@octane-xplat/ui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"files": [
|
|
6
|
+
"dist",
|
|
7
|
+
"src/theme/tokens.css"
|
|
8
|
+
],
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"web": "./dist/web/ui.js",
|
|
12
|
+
"native": "./dist/native/ui.js",
|
|
13
|
+
"default": "./dist/native/ui.js"
|
|
14
|
+
},
|
|
15
|
+
"./theme/tokens.css": "./src/theme/tokens.css"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@nativescript-community/octane": "0.2.1",
|
|
19
|
+
"@octanejs/vite-plugin": "0.1.58",
|
|
20
|
+
"@nativescript/core": "9.1.2",
|
|
21
|
+
"octane": "0.4.0",
|
|
22
|
+
"vite": "8.3.0"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"octane": ">=0.1.51 <1",
|
|
26
|
+
"@nativescript-community/octane": ">=0.2.1 <1",
|
|
27
|
+
"@nativescript/core": ">=9.1.0 <10"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "vite build && vite build --mode native"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/* Design tokens — NS reads :root/.ns-root; web reads :root/.dark.
|
|
2
|
+
Numbers are dip (native) = px (web) by leaf convention. */
|
|
3
|
+
|
|
4
|
+
:root,
|
|
5
|
+
.ns-root {
|
|
6
|
+
--color-primary: #4f46e5;
|
|
7
|
+
--color-on-primary: #ffffff;
|
|
8
|
+
--color-surface: #ffffff;
|
|
9
|
+
--color-text: #111827;
|
|
10
|
+
--space-4: 16px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.ns-dark,
|
|
14
|
+
.dark {
|
|
15
|
+
--color-surface: #0f172a;
|
|
16
|
+
--color-text: #f8fafc;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* vocabulary base styles */
|
|
20
|
+
|
|
21
|
+
.vx-view,
|
|
22
|
+
.vx-row {
|
|
23
|
+
display: flex;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.vx-view {
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.vx-row {
|
|
31
|
+
flex-direction: row;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.vx-pressable {
|
|
35
|
+
user-select: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* web press feedback */
|
|
39
|
+
.vx-pressable:active {
|
|
40
|
+
opacity: 0.85;
|
|
41
|
+
}
|
|
42
|
+
/* native press feedback (NS pseudo — dead rule on web, and vice versa) */
|
|
43
|
+
.vx-pressable:pressed {
|
|
44
|
+
opacity: 0.85;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* utilities (hand-written subset for the harness; Tailwind later) */
|
|
48
|
+
|
|
49
|
+
.flex-1 { flex-grow: 1; }
|
|
50
|
+
.items-center { align-items: center; }
|
|
51
|
+
.justify-center { justify-content: center; }
|
|
52
|
+
.gap-4 { gap: 16px; }
|
|
53
|
+
|
|
54
|
+
.text-xl { font-size: 20px; }
|
|
55
|
+
.font-bold { font-weight: bold; }
|
|
56
|
+
|
|
57
|
+
.bg-primary { background-color: var(--color-primary); }
|
|
58
|
+
.text-onprimary { color: var(--color-on-primary); }
|
|
59
|
+
.bg-danger { background-color: #dc2626; }
|
|
60
|
+
.shadow-2 { box-shadow: 0 4px 12px rgba(0,0,0,0.25); }
|
|
61
|
+
|
|
62
|
+
.btn {
|
|
63
|
+
padding-top: 12px;
|
|
64
|
+
padding-right: 20px;
|
|
65
|
+
padding-bottom: 12px;
|
|
66
|
+
padding-left: 20px;
|
|
67
|
+
border-radius: 8px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* harness experiment styles */
|
|
71
|
+
|
|
72
|
+
.vx-app {
|
|
73
|
+
padding: 24px;
|
|
74
|
+
background-color: var(--color-surface);
|
|
75
|
+
color: var(--color-text);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.vx-app .text-xl,
|
|
79
|
+
.vx-app Text,
|
|
80
|
+
.vx-app label {
|
|
81
|
+
color: var(--color-text);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.input {
|
|
85
|
+
padding: 10px;
|
|
86
|
+
border-width: 1px;
|
|
87
|
+
border-color: #94a3b8;
|
|
88
|
+
border-radius: 6px;
|
|
89
|
+
font-size: 16px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.chip {
|
|
93
|
+
background-color: var(--color-primary);
|
|
94
|
+
color: var(--color-on-primary);
|
|
95
|
+
padding: 4px 10px;
|
|
96
|
+
border-radius: 12px;
|
|
97
|
+
font-size: 13px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.cell {
|
|
101
|
+
padding: 12px;
|
|
102
|
+
border-bottom-width: 1px;
|
|
103
|
+
border-bottom-color: #e2e8f0;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.vx-list {
|
|
107
|
+
flex-grow: 1;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.gap-2 { gap: 8px; }
|