@octane-xplat/ui 0.2.1 → 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.
- package/README.md +46 -0
- package/dist/native/octane-client-build.json +1 -1
- package/dist/native/ui.js +52 -19
- package/dist/native/ui10.js +25 -45
- package/dist/native/ui11.js +52 -57
- package/dist/native/ui12.js +47 -16
- package/dist/native/ui13.js +24 -18
- package/dist/native/ui14.js +117 -12
- package/dist/native/ui15.js +78 -17
- package/dist/native/ui16.js +88 -115
- package/dist/native/ui17.js +29 -19
- package/dist/native/ui18.js +34 -12
- package/dist/native/ui19.js +244 -8
- package/dist/native/ui2.js +10 -48
- package/dist/native/ui20.js +28 -0
- package/dist/native/ui21.js +383 -0
- package/dist/native/ui22.js +36 -0
- package/dist/native/ui23.js +55 -0
- package/dist/native/ui24.js +83 -0
- package/dist/native/ui25.js +141 -0
- package/dist/native/ui26.js +12 -0
- package/dist/native/ui27.js +61 -0
- package/dist/native/ui28.js +40 -0
- package/dist/native/ui29.js +108 -0
- package/dist/native/ui3.js +17 -20
- package/dist/native/ui30.js +18 -0
- package/dist/native/ui31.js +58 -0
- package/dist/native/ui32.js +58 -0
- package/dist/native/ui33.js +38 -0
- package/dist/native/ui34.js +53 -0
- package/dist/native/ui35.js +105 -0
- package/dist/native/ui36.js +10 -0
- package/dist/native/ui37.js +44 -0
- package/dist/native/ui38.js +197 -0
- package/dist/native/ui39.js +105 -0
- package/dist/native/ui4.js +23 -48
- package/dist/native/ui40.js +58 -0
- package/dist/native/ui41.js +19 -0
- package/dist/native/ui42.js +8 -0
- package/dist/native/ui43.js +38 -0
- package/dist/native/ui44.js +267 -0
- package/dist/native/ui45.js +28 -0
- package/dist/native/ui46.js +35 -0
- package/dist/native/ui47.js +41 -0
- package/dist/native/ui48.js +72 -0
- package/dist/native/ui49.js +66 -0
- package/dist/native/ui5.js +37 -34
- package/dist/native/ui50.js +27 -0
- package/dist/native/ui51.js +13 -0
- package/dist/native/ui52.js +92 -0
- package/dist/native/ui53.js +34 -0
- package/dist/native/ui54.js +17 -0
- package/dist/native/ui55.js +156 -0
- package/dist/native/ui56.js +33 -0
- package/dist/native/ui57.js +14 -0
- package/dist/native/ui58.js +22 -0
- package/dist/native/ui59.js +8 -0
- package/dist/native/ui6.js +79 -20
- package/dist/native/ui60.js +108 -0
- package/dist/native/ui61.js +76 -0
- package/dist/native/ui7.js +44 -65
- package/dist/native/ui8.js +25 -17
- package/dist/native/ui9.js +24 -12
- package/dist/web/octane-client-build.json +1 -1
- package/dist/web/ui.js +51 -19
- package/dist/web/ui10.js +33 -30
- package/dist/web/ui11.js +40 -55
- package/dist/web/ui12.js +36 -15
- package/dist/web/ui13.js +212 -20
- package/dist/web/ui14.js +84 -14
- package/dist/web/ui15.js +425 -46
- package/dist/web/ui16.js +12 -93
- package/dist/web/ui17.js +246 -28
- package/dist/web/ui18.js +238 -15
- package/dist/web/ui19.js +36 -8
- package/dist/web/ui2.js +15 -103
- package/dist/web/ui20.js +85 -0
- package/dist/web/ui21.js +111 -0
- package/dist/web/ui22.js +108 -0
- package/dist/web/ui23.js +96 -0
- package/dist/web/ui24.js +32 -0
- package/dist/web/ui25.js +108 -0
- package/dist/web/ui26.js +45 -0
- package/dist/web/ui27.js +16 -0
- package/dist/web/ui28.js +11 -0
- package/dist/web/ui29.js +58 -0
- package/dist/web/ui3.js +30 -27
- package/dist/web/ui30.js +34 -0
- package/dist/web/ui31.js +123 -0
- package/dist/web/ui32.js +44 -0
- package/dist/web/ui33.js +159 -0
- package/dist/web/ui34.js +70 -0
- package/dist/web/ui35.js +57 -0
- package/dist/web/ui36.js +22 -0
- package/dist/web/ui37.js +7 -0
- package/dist/web/ui38.js +38 -0
- package/dist/web/ui39.js +154 -0
- package/dist/web/ui4.js +46 -24
- package/dist/web/ui40.js +43 -0
- package/dist/web/ui41.js +42 -0
- package/dist/web/ui42.js +76 -0
- package/dist/web/ui43.js +42 -0
- package/dist/web/ui44.js +62 -0
- package/dist/web/ui45.js +9 -0
- package/dist/web/ui46.js +45 -0
- package/dist/web/ui47.js +13 -0
- package/dist/web/ui48.js +63 -0
- package/dist/web/ui49.js +47 -0
- package/dist/web/ui5.js +158 -52
- package/dist/web/ui50.js +17 -0
- package/dist/web/ui51.js +149 -0
- package/dist/web/ui52.js +42 -0
- package/dist/web/ui53.js +17 -0
- package/dist/web/ui54.js +9 -0
- package/dist/web/ui55.js +22 -0
- package/dist/web/ui56.js +8 -0
- package/dist/web/ui57.js +44 -0
- package/dist/web/ui58.js +46 -0
- package/dist/web/ui6.js +85 -22
- package/dist/web/ui7.js +46 -41
- package/dist/web/ui8.js +28 -11
- package/dist/web/ui9.js +32 -13
- package/package.json +18 -6
- package/src/theme/tokens.css +444 -47
- package/types/index.d.ts +180 -29
- package/types/props.d.ts +553 -8
package/dist/web/ui48.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { meterRange } from "./ui47.js";
|
|
2
|
+
import { __s, bag12, child, clone, setAriaAttribute, setStyle, sibling, template } from "octane";
|
|
3
|
+
import { bindSignalAttribute, bindSignalChild, enableSignalBindings, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
|
|
4
|
+
//#region src/Meter.web.tsrx
|
|
5
|
+
enableSignalBindings(1, true);
|
|
6
|
+
var _t$0 = /* @__PURE__ */ template("<div role=\"progressbar\" aria-valuemin=\"0\"><div aria-hidden=\"true\"></div><div style=\"position: relative;\"></div></div>");
|
|
7
|
+
var Meter = /* @__PURE__ */ __s(function Meter(props, __s, __extra) {
|
|
8
|
+
const max = props.max ?? 100;
|
|
9
|
+
const { max: rangeMax, value, ratio } = meterRange(props.value, max);
|
|
10
|
+
const size = props.size ?? 24;
|
|
11
|
+
const strokeWidth = Math.max(0, Math.min(props.strokeWidth ?? 3, size));
|
|
12
|
+
const color = props.color ?? "#3376cc";
|
|
13
|
+
const trackColor = props.trackColor ?? "#e1ecf7";
|
|
14
|
+
const sweep = ratio * 360;
|
|
15
|
+
const ringStyle = {
|
|
16
|
+
position: "absolute",
|
|
17
|
+
inset: 0,
|
|
18
|
+
borderRadius: "50%",
|
|
19
|
+
backgroundImage: `conic-gradient(${color} 0deg ${sweep}deg, ${trackColor} ${sweep}deg 360deg)`,
|
|
20
|
+
mask: `radial-gradient(circle, transparent calc(50% - ${strokeWidth}px), #000 calc(50% - ${strokeWidth}px + 0.5px))`,
|
|
21
|
+
WebkitMask: `radial-gradient(circle, transparent calc(50% - ${strokeWidth}px), #000 calc(50% - ${strokeWidth}px + 0.5px))`
|
|
22
|
+
};
|
|
23
|
+
if (__s.block.pending && !__s.block.crossRenderUpdate) return;
|
|
24
|
+
let _b = __s.slots[0];
|
|
25
|
+
if (_b === void 0) {
|
|
26
|
+
let _m1, _m8, _m9;
|
|
27
|
+
const _root = clone(_t$0);
|
|
28
|
+
_m1 = _root;
|
|
29
|
+
const _el0 = child(_root);
|
|
30
|
+
_m8 = _el0;
|
|
31
|
+
_m9 = sibling(_el0, 1);
|
|
32
|
+
_b = bag12(__s, _root, void 0, _m1, void 0, void 0, void 0, void 0, void 0, void 0, _m8, _m9, null, void 0);
|
|
33
|
+
}
|
|
34
|
+
_b.a = bindSignalAttribute(__s, _b.a, _b.b, "id", props.id, "b:fe732458", setPlainAttribute);
|
|
35
|
+
_b.c = updateFreshClassName(["vx-meter", props.className], _b.c, _b.b);
|
|
36
|
+
{
|
|
37
|
+
const _v = {
|
|
38
|
+
display: "grid",
|
|
39
|
+
placeItems: "center",
|
|
40
|
+
position: "relative",
|
|
41
|
+
width: size,
|
|
42
|
+
height: size,
|
|
43
|
+
...props.style
|
|
44
|
+
};
|
|
45
|
+
if (_b.d !== _v) {
|
|
46
|
+
setStyle(_b.b, _v, _b.d);
|
|
47
|
+
_b.d = _v;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
_b.e = bindSignalAttribute(__s, _b.e, _b.b, "aria-label", props.accessibilityLabel, "b:8b03ec71", setAriaAttribute);
|
|
51
|
+
_b.f = bindSignalAttribute(__s, _b.f, _b.b, "aria-valuemax", rangeMax, "b:b0ee791c", setAriaAttribute);
|
|
52
|
+
_b.g = bindSignalAttribute(__s, _b.g, _b.b, "aria-valuenow", value, "b:4be1f493", setAriaAttribute);
|
|
53
|
+
{
|
|
54
|
+
const _v = ringStyle;
|
|
55
|
+
if (_b.h !== _v) {
|
|
56
|
+
setStyle(_b.i, _v, _b.h);
|
|
57
|
+
_b.h = _v;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
_b.m = bindSignalChild(__s, _b.m, 1, _b.j, props.children, "b:c7af99f3", null, void 0, void 0, void 0, true);
|
|
61
|
+
});
|
|
62
|
+
//#endregion
|
|
63
|
+
export { Meter };
|
package/dist/web/ui49.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { applyWebProps } from "./ui45.js";
|
|
2
|
+
import { __s, bag9, clone, delegateEvents, queueRefAttach, queueRefDetach, setBooleanAttribute, setEventHandler, setStyle, template } from "octane";
|
|
3
|
+
import { bindSignalAttribute, bindSignalValue, enableSignalBindings, replaceRef, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
|
|
4
|
+
//#region src/Slider.web.tsrx
|
|
5
|
+
enableSignalBindings(1, true);
|
|
6
|
+
delegateEvents(["input"]);
|
|
7
|
+
var _t$0 = /* @__PURE__ */ template("<input type=\"range\" data-octane-input=\"i:c0018a58\"/>");
|
|
8
|
+
var _rm$0 = [
|
|
9
|
+
"r",
|
|
10
|
+
"i",
|
|
11
|
+
"b"
|
|
12
|
+
];
|
|
13
|
+
var Slider = /* @__PURE__ */ __s(function Slider(props, __s, __extra) {
|
|
14
|
+
let _b = __s.slots[0];
|
|
15
|
+
if (_b === void 0) {
|
|
16
|
+
let _m1, _m4, _m8;
|
|
17
|
+
const _root = clone(_t$0);
|
|
18
|
+
_m1 = _root;
|
|
19
|
+
_m4 = bindSignalValue(__s, void 0, _root, props.value, "i:c0018a58");
|
|
20
|
+
setEventHandler(_root, "$$input", (e) => props.onValueChange?.(Number(e.target.value)));
|
|
21
|
+
queueRefAttach(__s, _m8 = (el) => applyWebProps(el, props.web), _m1);
|
|
22
|
+
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.i, _b.b));
|
|
23
|
+
_b = bag9(__s, _root, void 0, _m1, void 0, void 0, _m4, void 0, void 0, void 0, _m8);
|
|
24
|
+
__s.refFields = _rm$0;
|
|
25
|
+
} else {
|
|
26
|
+
_b.e = bindSignalValue(__s, _b.e, _b.b, props.value, "i:c0018a58");
|
|
27
|
+
setEventHandler(_b.b, "$$input", (e) => props.onValueChange?.(Number(e.target.value)));
|
|
28
|
+
{
|
|
29
|
+
const _r = (el) => applyWebProps(el, props.web);
|
|
30
|
+
if (_r !== _b.i) _b.i = replaceRef(__s, _b.i, _r, _b.b);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
_b.a = bindSignalAttribute(__s, _b.a, _b.b, "id", props.id, "b:97ef4e10", setPlainAttribute);
|
|
34
|
+
_b.c = updateFreshClassName(["vx-slider", props.className], _b.c, _b.b);
|
|
35
|
+
{
|
|
36
|
+
const _v = props.style;
|
|
37
|
+
if (_b.d !== _v) {
|
|
38
|
+
setStyle(_b.b, _v, _b.d);
|
|
39
|
+
_b.d = _v;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
_b.f = bindSignalAttribute(__s, _b.f, _b.b, "min", props.minValue ?? 0, "b:7991c980", setPlainAttribute);
|
|
43
|
+
_b.g = bindSignalAttribute(__s, _b.g, _b.b, "max", props.maxValue ?? 100, "b:ff7f1a7c", setPlainAttribute);
|
|
44
|
+
_b.h = bindSignalAttribute(__s, _b.h, _b.b, "disabled", props.disabled, "b:91d4cdb7", setBooleanAttribute);
|
|
45
|
+
});
|
|
46
|
+
//#endregion
|
|
47
|
+
export { Slider };
|
package/dist/web/ui5.js
CHANGED
|
@@ -1,62 +1,168 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { applyEscapeProps } from "./ui2.js";
|
|
2
|
+
import { glassClassOf, glassStyleOf } from "./ui3.js";
|
|
3
|
+
import { layoutChildProps } from "./ui4.js";
|
|
4
|
+
import { __s, bag8, clone, hookSlots, snapshotSpread, template, useEffect, useRef } from "octane";
|
|
5
|
+
import { bindSignalChild, bindSignalHostPropSources, enableSignalBindings } from "octane/internal/client";
|
|
6
|
+
//#region src/View.web.tsrx
|
|
4
7
|
enableSignalBindings(1, true);
|
|
5
|
-
delegateEvents([
|
|
6
|
-
"click",
|
|
7
|
-
"pointercancel",
|
|
8
|
-
"pointerdown",
|
|
9
|
-
"pointerleave",
|
|
10
|
-
"pointerup"
|
|
11
|
-
]);
|
|
12
8
|
var _t$0 = /* @__PURE__ */ template("<div></div>");
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
9
|
+
var _hs$ = /* @__PURE__ */ hookSlots(2);
|
|
10
|
+
var _rm$1 = [
|
|
11
|
+
"s",
|
|
12
|
+
"f",
|
|
13
|
+
"e"
|
|
14
|
+
];
|
|
15
|
+
var View = /* @__PURE__ */ __s(function View(props, __s, __extra) {
|
|
16
|
+
const el = useRef(null, _hs$ + 0);
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
const node = el.current;
|
|
19
|
+
const cb = props.onPan;
|
|
20
|
+
if (!node || !cb) return;
|
|
21
|
+
let sx = 0, sy = 0, active = false, last = 0, lx = 0, t0 = 0;
|
|
22
|
+
const emit = (e, state) => {
|
|
23
|
+
const now = performance.now();
|
|
24
|
+
const dt = Math.max(now - t0, 1) / 1e3;
|
|
25
|
+
const vx = (e.clientX - lx) / dt;
|
|
26
|
+
const vy = (e.clientY - last) / dt;
|
|
27
|
+
lx = e.clientX;
|
|
28
|
+
last = e.clientY;
|
|
29
|
+
t0 = now;
|
|
30
|
+
cb({
|
|
31
|
+
x: e.clientX - sx,
|
|
32
|
+
y: e.clientY - sy,
|
|
33
|
+
dx: e.clientX - sx,
|
|
34
|
+
dy: e.clientY - sy,
|
|
35
|
+
vx,
|
|
36
|
+
vy,
|
|
37
|
+
state,
|
|
38
|
+
target: node
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
const down = (e) => {
|
|
42
|
+
active = true;
|
|
43
|
+
sx = e.clientX;
|
|
44
|
+
sy = e.clientY;
|
|
45
|
+
t0 = performance.now();
|
|
46
|
+
lx = sx;
|
|
47
|
+
last = sy;
|
|
48
|
+
node.setPointerCapture?.(e.pointerId);
|
|
49
|
+
emit(e, "began");
|
|
50
|
+
};
|
|
51
|
+
const move = (e) => {
|
|
52
|
+
if (active) emit(e, "moved");
|
|
53
|
+
};
|
|
54
|
+
const up = (e) => {
|
|
55
|
+
if (active) {
|
|
56
|
+
active = false;
|
|
57
|
+
emit(e, "ended");
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const cancel = (e) => {
|
|
61
|
+
if (active) {
|
|
62
|
+
active = false;
|
|
63
|
+
emit(e, "cancelled");
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
node.addEventListener("pointerdown", down);
|
|
67
|
+
node.addEventListener("pointermove", move);
|
|
68
|
+
node.addEventListener("pointerup", up);
|
|
69
|
+
node.addEventListener("pointercancel", cancel);
|
|
70
|
+
return () => {
|
|
71
|
+
node.removeEventListener("pointerdown", down);
|
|
72
|
+
node.removeEventListener("pointermove", move);
|
|
73
|
+
node.removeEventListener("pointerup", up);
|
|
74
|
+
node.removeEventListener("pointercancel", cancel);
|
|
75
|
+
};
|
|
76
|
+
}, [props.onPan], _hs$ + 1);
|
|
29
77
|
let _b = __s.slots[0];
|
|
30
78
|
if (_b === void 0) {
|
|
31
|
-
let _m1;
|
|
79
|
+
let _m0, _m1, _m2, _m3, _m4, _m5;
|
|
32
80
|
const _root = clone(_t$0);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
81
|
+
_m0 = props.id;
|
|
82
|
+
_m1 = (e) => {
|
|
83
|
+
el.current = e;
|
|
84
|
+
if (e) {
|
|
85
|
+
applyEscapeProps(e, props);
|
|
86
|
+
props.bind?.(e);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
_m2 = [
|
|
90
|
+
"vx-view",
|
|
91
|
+
glassClassOf(props.glass),
|
|
92
|
+
props.className
|
|
93
|
+
];
|
|
94
|
+
_m3 = snapshotSpread(layoutChildProps(props, {
|
|
95
|
+
...glassStyleOf(props.glass),
|
|
96
|
+
...props.style
|
|
97
|
+
}));
|
|
98
|
+
_m4 = _root;
|
|
99
|
+
_m5 = bindSignalHostPropSources(__s, void 0, _root, [
|
|
100
|
+
[
|
|
101
|
+
false,
|
|
102
|
+
"id",
|
|
103
|
+
_m0
|
|
104
|
+
],
|
|
105
|
+
[
|
|
106
|
+
false,
|
|
107
|
+
"ref",
|
|
108
|
+
_m1
|
|
109
|
+
],
|
|
110
|
+
[
|
|
111
|
+
false,
|
|
112
|
+
"className",
|
|
113
|
+
_m2
|
|
114
|
+
],
|
|
115
|
+
[true, _m3]
|
|
116
|
+
], "b:e20c8de1", true);
|
|
117
|
+
_b = bag8(__s, _root, _m0, _m1, _m2, _m3, _m4, _m5, null, void 0);
|
|
118
|
+
__s.refFields = _rm$1;
|
|
40
119
|
} else {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
_b.
|
|
120
|
+
{
|
|
121
|
+
const _v = props.id;
|
|
122
|
+
if (_b.a !== _v) _b.a = _v;
|
|
123
|
+
}
|
|
124
|
+
{
|
|
125
|
+
const _v = (e) => {
|
|
126
|
+
el.current = e;
|
|
127
|
+
if (e) {
|
|
128
|
+
applyEscapeProps(e, props);
|
|
129
|
+
props.bind?.(e);
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
if (_b.b !== _v) _b.b = _v;
|
|
133
|
+
}
|
|
134
|
+
{
|
|
135
|
+
const _v = [
|
|
136
|
+
"vx-view",
|
|
137
|
+
glassClassOf(props.glass),
|
|
138
|
+
props.className
|
|
139
|
+
];
|
|
140
|
+
if (_b.c !== _v) _b.c = _v;
|
|
54
141
|
}
|
|
142
|
+
_b.d = snapshotSpread(layoutChildProps(props, {
|
|
143
|
+
...glassStyleOf(props.glass),
|
|
144
|
+
...props.style
|
|
145
|
+
}));
|
|
146
|
+
_b.f = bindSignalHostPropSources(__s, _b.f, _b.e, [
|
|
147
|
+
[
|
|
148
|
+
false,
|
|
149
|
+
"id",
|
|
150
|
+
_b.a
|
|
151
|
+
],
|
|
152
|
+
[
|
|
153
|
+
false,
|
|
154
|
+
"ref",
|
|
155
|
+
_b.b
|
|
156
|
+
],
|
|
157
|
+
[
|
|
158
|
+
false,
|
|
159
|
+
"className",
|
|
160
|
+
_b.c
|
|
161
|
+
],
|
|
162
|
+
[true, _b.d]
|
|
163
|
+
], "b:e20c8de1", true);
|
|
55
164
|
}
|
|
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);
|
|
165
|
+
_b.i = bindSignalChild(__s, _b.i, 1, _b.e, props.children, "b:13e02afa", null, void 0, void 0, void 0, true);
|
|
60
166
|
});
|
|
61
167
|
//#endregion
|
|
62
|
-
export {
|
|
168
|
+
export { View };
|
package/dist/web/ui50.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/icons.ts
|
|
2
|
+
/**
|
|
3
|
+
* App-owned icon registry. `svg` is SVG path `d` data (not a full SVG
|
|
4
|
+
* markup string). Native `font` glyphs render only when the app ships that font.
|
|
5
|
+
*/
|
|
6
|
+
var icons = /* @__PURE__ */ new Map();
|
|
7
|
+
function registerIcon(name, glyph) {
|
|
8
|
+
icons.set(name, glyph);
|
|
9
|
+
}
|
|
10
|
+
function registerIcons(record) {
|
|
11
|
+
for (const [name, glyph] of Object.entries(record)) icons.set(name, glyph);
|
|
12
|
+
}
|
|
13
|
+
function getIcon(name) {
|
|
14
|
+
return icons.get(name);
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { getIcon, registerIcon, registerIcons };
|
package/dist/web/ui51.js
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { applyWebProps } from "./ui45.js";
|
|
2
|
+
import { getIcon } from "./ui50.js";
|
|
3
|
+
import { bag8, bag9, clone, hookSlots, ifBlock, queueRefAttach, queueRefDetach, setStyle, template } from "octane";
|
|
4
|
+
import { bindSignalAttribute, compilerMemoRegion, createElementFromConfig, enableSignalBindings, hookMemoCreate, hookMemoEqual, hookMemoPublish1, replaceRef, setPlainAttribute, setURLAttribute, updateFreshClassAttr, updateFreshClassName } from "octane/internal/client";
|
|
5
|
+
//#region src/Icon.web.tsrx
|
|
6
|
+
enableSignalBindings(1, true);
|
|
7
|
+
var _t$0 = /* @__PURE__ */ template("<svg aria-hidden=\"true\"></svg>", 1);
|
|
8
|
+
var _t$1 = /* @__PURE__ */ template("<svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path></path></svg>", 1);
|
|
9
|
+
var _t$2 = /* @__PURE__ */ template("<img/>");
|
|
10
|
+
var _rm$1 = [
|
|
11
|
+
"r",
|
|
12
|
+
"h",
|
|
13
|
+
"b"
|
|
14
|
+
];
|
|
15
|
+
function __then$0(__props, __s, __extra) {
|
|
16
|
+
const glyph = __extra[0];
|
|
17
|
+
const props = __extra[1];
|
|
18
|
+
const size = __extra[2];
|
|
19
|
+
let _b = __s.slots[0];
|
|
20
|
+
if (_b === void 0) {
|
|
21
|
+
let _m1, _m7;
|
|
22
|
+
const _root = clone(_t$0);
|
|
23
|
+
_m1 = _root;
|
|
24
|
+
queueRefAttach(__s, _m7 = (el) => {
|
|
25
|
+
if (el) el.innerHTML = glyph.markup;
|
|
26
|
+
applyWebProps(el, props.web);
|
|
27
|
+
}, _m1);
|
|
28
|
+
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.h, _b.b));
|
|
29
|
+
_b = bag8(__s, _root, void 0, _m1, void 0, void 0, void 0, void 0, void 0, _m7);
|
|
30
|
+
__s.refFields = _rm$1;
|
|
31
|
+
} else {
|
|
32
|
+
const _r = (el) => {
|
|
33
|
+
if (el) el.innerHTML = glyph.markup;
|
|
34
|
+
applyWebProps(el, props.web);
|
|
35
|
+
};
|
|
36
|
+
if (_r !== _b.h) _b.h = replaceRef(__s, _b.h, _r, _b.b);
|
|
37
|
+
}
|
|
38
|
+
_b.a = bindSignalAttribute(__s, _b.a, _b.b, "id", props.id, "b:3add0cdf", setPlainAttribute);
|
|
39
|
+
_b.c = updateFreshClassAttr(["vx-icon", props.className], _b.c, _b.b);
|
|
40
|
+
_b.d = bindSignalAttribute(__s, _b.d, _b.b, "viewBox", glyph.viewBox ?? "0 0 24 24", "b:c67a6a16", setPlainAttribute);
|
|
41
|
+
_b.e = bindSignalAttribute(__s, _b.e, _b.b, "width", size, "b:fb23295c", setPlainAttribute);
|
|
42
|
+
_b.f = bindSignalAttribute(__s, _b.f, _b.b, "height", size, "b:8d1adcef", setPlainAttribute);
|
|
43
|
+
{
|
|
44
|
+
const _v = props.color ? { color: props.color } : void 0;
|
|
45
|
+
if (_b.g !== _v) {
|
|
46
|
+
setStyle(_b.b, _v, _b.g);
|
|
47
|
+
_b.g = _v;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
var _rm$4 = [
|
|
52
|
+
"r",
|
|
53
|
+
"f",
|
|
54
|
+
"b"
|
|
55
|
+
];
|
|
56
|
+
function __then$3(__props, __s, __extra) {
|
|
57
|
+
const glyph = __extra[0];
|
|
58
|
+
const props = __extra[1];
|
|
59
|
+
const size = __extra[2];
|
|
60
|
+
let _b = __s.slots[0];
|
|
61
|
+
if (_b === void 0) {
|
|
62
|
+
let _m1, _m5, _m7;
|
|
63
|
+
const _root = clone(_t$1);
|
|
64
|
+
_m1 = _root;
|
|
65
|
+
queueRefAttach(__s, _m5 = (el) => applyWebProps(el, props.web), _m1);
|
|
66
|
+
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.f, _b.b));
|
|
67
|
+
_m7 = _root.firstChild;
|
|
68
|
+
_b = bag9(__s, _root, void 0, _m1, void 0, void 0, void 0, _m5, void 0, _m7, void 0);
|
|
69
|
+
__s.refFields = _rm$4;
|
|
70
|
+
} else {
|
|
71
|
+
const _r = (el) => applyWebProps(el, props.web);
|
|
72
|
+
if (_r !== _b.f) _b.f = replaceRef(__s, _b.f, _r, _b.b);
|
|
73
|
+
}
|
|
74
|
+
_b.a = bindSignalAttribute(__s, _b.a, _b.b, "id", props.id, "b:9e8c5282", setPlainAttribute);
|
|
75
|
+
_b.c = updateFreshClassAttr(["vx-icon", props.className], _b.c, _b.b);
|
|
76
|
+
_b.d = bindSignalAttribute(__s, _b.d, _b.b, "width", size, "b:3b5779f4", setPlainAttribute);
|
|
77
|
+
_b.e = bindSignalAttribute(__s, _b.e, _b.b, "height", size, "b:13d0b8b1", setPlainAttribute);
|
|
78
|
+
_b.g = bindSignalAttribute(__s, _b.g, _b.h, "d", glyph.svg, "b:5d6c1e35", setPlainAttribute);
|
|
79
|
+
_b.i = bindSignalAttribute(__s, _b.i, _b.h, "fill", props.color ?? "currentColor", "b:b6d02800", setPlainAttribute);
|
|
80
|
+
}
|
|
81
|
+
var _rm$7 = [
|
|
82
|
+
"r",
|
|
83
|
+
"h",
|
|
84
|
+
"b"
|
|
85
|
+
];
|
|
86
|
+
function __then$6(__props, __s, __extra) {
|
|
87
|
+
const glyph = __extra[0];
|
|
88
|
+
const props = __extra[1];
|
|
89
|
+
const size = __extra[2];
|
|
90
|
+
let _b = __s.slots[0];
|
|
91
|
+
if (_b === void 0) {
|
|
92
|
+
let _m1, _m7;
|
|
93
|
+
const _root = clone(_t$2);
|
|
94
|
+
_m1 = _root;
|
|
95
|
+
queueRefAttach(__s, _m7 = (el) => applyWebProps(el, props.web), _m1);
|
|
96
|
+
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.h, _b.b));
|
|
97
|
+
_b = bag8(__s, _root, void 0, _m1, void 0, void 0, void 0, void 0, void 0, _m7);
|
|
98
|
+
__s.refFields = _rm$7;
|
|
99
|
+
} else {
|
|
100
|
+
const _r = (el) => applyWebProps(el, props.web);
|
|
101
|
+
if (_r !== _b.h) _b.h = replaceRef(__s, _b.h, _r, _b.b);
|
|
102
|
+
}
|
|
103
|
+
_b.a = bindSignalAttribute(__s, _b.a, _b.b, "id", props.id, "b:1374b84a", setPlainAttribute);
|
|
104
|
+
_b.c = updateFreshClassName(["vx-icon", props.className], _b.c, _b.b);
|
|
105
|
+
_b.d = bindSignalAttribute(__s, _b.d, _b.b, "src", glyph.src, "b:fdaa8e12", setURLAttribute);
|
|
106
|
+
_b.e = bindSignalAttribute(__s, _b.e, _b.b, "width", size, "b:a4c78316", setPlainAttribute);
|
|
107
|
+
_b.f = bindSignalAttribute(__s, _b.f, _b.b, "height", size, "b:2ca071e0", setPlainAttribute);
|
|
108
|
+
_b.g = bindSignalAttribute(__s, _b.g, _b.b, "alt", props.name, "b:731bb804", setPlainAttribute);
|
|
109
|
+
}
|
|
110
|
+
function __else$5(__props, __s, __extra) {
|
|
111
|
+
const __block = __s.block;
|
|
112
|
+
const glyph = __extra[0];
|
|
113
|
+
__extra[1];
|
|
114
|
+
__extra[2];
|
|
115
|
+
ifBlock(__s, 0, __block.parentNode, glyph.src, __then$6, null, __block.endMarker, __extra);
|
|
116
|
+
}
|
|
117
|
+
function __else$2(__props, __s, __extra) {
|
|
118
|
+
const __block = __s.block;
|
|
119
|
+
const glyph = __extra[0];
|
|
120
|
+
__extra[1];
|
|
121
|
+
__extra[2];
|
|
122
|
+
ifBlock(__s, 0, __block.parentNode, glyph.svg, __then$3, __else$5, __block.endMarker, __extra);
|
|
123
|
+
}
|
|
124
|
+
function _frag$0(props, __s, __extra) {
|
|
125
|
+
const __block = __s.block;
|
|
126
|
+
ifBlock(__s, 0, __block.parentNode, props.h0, props.h1, props.h2, __block.endMarker, props.h3);
|
|
127
|
+
}
|
|
128
|
+
var _hs$ = /* @__PURE__ */ hookSlots(7);
|
|
129
|
+
var Icon = function Icon(props, __s, __extra) {
|
|
130
|
+
const __memoRegion = compilerMemoRegion(__s, _hs$ + 0);
|
|
131
|
+
let __hk = __memoRegion.hooks;
|
|
132
|
+
if (__hk === void 0) __memoRegion.hooks = __hk = hookMemoCreate(3);
|
|
133
|
+
let __hkd0;
|
|
134
|
+
const glyph = (__hkd0 = props, __hk[0] !== true || !hookMemoEqual(__hk[1], __hkd0) ? hookMemoPublish1(__hk, 0, getIcon(props.name), __hkd0) : __hk[2]);
|
|
135
|
+
if (!glyph) return null;
|
|
136
|
+
const size = props.size ?? 24;
|
|
137
|
+
return createElementFromConfig("c:3275b5a7", _frag$0, {
|
|
138
|
+
h0: glyph.markup,
|
|
139
|
+
h1: __then$0,
|
|
140
|
+
h2: __else$2,
|
|
141
|
+
h3: [
|
|
142
|
+
glyph,
|
|
143
|
+
props,
|
|
144
|
+
size
|
|
145
|
+
]
|
|
146
|
+
});
|
|
147
|
+
};
|
|
148
|
+
//#endregion
|
|
149
|
+
export { Icon };
|
package/dist/web/ui52.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { normStyle } from "./ui4.js";
|
|
2
|
+
import { applyWebProps } from "./ui45.js";
|
|
3
|
+
import { bag4, child, clone, componentSlot, drainFrag, markChildrenBlock, template } from "octane";
|
|
4
|
+
import { textHoleUpdate } from "octane/internal/client";
|
|
5
|
+
//#region src/Heading.web.tsrx
|
|
6
|
+
var _t$0 = /* @__PURE__ */ template("<!>", 0, 1);
|
|
7
|
+
var __childrenBody = {};
|
|
8
|
+
var Heading = function Heading(props, __s, __extra) {
|
|
9
|
+
const __block = __s.block;
|
|
10
|
+
const level = props.level ?? 2;
|
|
11
|
+
const tag = `h${level}`;
|
|
12
|
+
function __children$1(__props, __s, __extra) {
|
|
13
|
+
const __block = __s.block;
|
|
14
|
+
let _b = __s.slots[0];
|
|
15
|
+
if (_b === void 0) {
|
|
16
|
+
let _m0, _m1;
|
|
17
|
+
const _root = clone(_t$0);
|
|
18
|
+
_m0 = __block.parentNode;
|
|
19
|
+
_m1 = child(_root);
|
|
20
|
+
drainFrag(_root, __block.parentNode, __block.endMarker);
|
|
21
|
+
_b = bag4(__s, null, _m0, _m1, null, void 0);
|
|
22
|
+
}
|
|
23
|
+
{
|
|
24
|
+
const _v = props.children;
|
|
25
|
+
_b.c = textHoleUpdate(__s, 1, _b.a, _v, _b.c, _b.d, _b.b, true, true);
|
|
26
|
+
_b.d = _v;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
componentSlot(__s, 0, __block.parentNode, tag, {
|
|
30
|
+
"id": props.id,
|
|
31
|
+
"className": [
|
|
32
|
+
"vx-heading",
|
|
33
|
+
`vx-h${level}`,
|
|
34
|
+
props.className
|
|
35
|
+
],
|
|
36
|
+
"style": normStyle(props.style),
|
|
37
|
+
"ref": (el) => applyWebProps(el, props.web),
|
|
38
|
+
"children": markChildrenBlock(__children$1, __childrenBody)
|
|
39
|
+
}, __block.endMarker, void 0, void 0, true, void 0, "c:4056bf45");
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { Heading };
|
package/dist/web/ui53.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { __s, bag2, clone, template } from "octane";
|
|
2
|
+
import { bindSignalAttribute, enableSignalBindings } from "octane/internal/client";
|
|
3
|
+
//#region src/PlatformBadge.web.tsrx
|
|
4
|
+
enableSignalBindings(1, true);
|
|
5
|
+
var _t$0 = /* @__PURE__ */ template("<span>web</span>");
|
|
6
|
+
var PlatformBadge = /* @__PURE__ */ __s(function PlatformBadge(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 = bag2(__s, _root, void 0, _m1);
|
|
13
|
+
}
|
|
14
|
+
_b.a = bindSignalAttribute(__s, _b.a, _b.b, "class", props.className, "b:f3cb9a4b", "class");
|
|
15
|
+
});
|
|
16
|
+
//#endregion
|
|
17
|
+
export { PlatformBadge };
|
package/dist/web/ui54.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/ui55.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/ui56.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/ui57.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { cx } from "./ui28.js";
|
|
2
|
+
import { useThemeScheme } from "./ui29.js";
|
|
3
|
+
import { bag4, child, clone, createElement, createPortal, createScopedElement, createScopedValue, drainFrag, hookSlots, ifBlock, positionalChildren, template, withSlot } from "octane";
|
|
4
|
+
import { textHoleUpdate } from "octane/internal/client";
|
|
5
|
+
//#region src/Sheet.web.tsrx
|
|
6
|
+
var _t$0 = /* @__PURE__ */ template("<!>", 0, 1);
|
|
7
|
+
var _h$0 = /* @__PURE__ */ Symbol(/* @__PURE__ */ hookSlots(2));
|
|
8
|
+
function __then$0(__props, __s, __extra) {
|
|
9
|
+
const __block = __s.block;
|
|
10
|
+
const dark = __extra[0];
|
|
11
|
+
const props = __extra[1];
|
|
12
|
+
let _b = __s.slots[0];
|
|
13
|
+
if (_b === void 0) {
|
|
14
|
+
let _m0, _m1;
|
|
15
|
+
const _root = clone(_t$0);
|
|
16
|
+
_m0 = __block.parentNode;
|
|
17
|
+
_m1 = child(_root);
|
|
18
|
+
drainFrag(_root, __block.parentNode, __block.endMarker);
|
|
19
|
+
_b = bag4(__s, null, _m0, _m1, null, void 0);
|
|
20
|
+
}
|
|
21
|
+
{
|
|
22
|
+
const _v = /* @__PURE__ */ createPortal(createScopedValue(() => createScopedElement("div", { className: cx("vx-sheet-layer", dark && "dark") }, () => positionalChildren([(props.shadeCover ?? true) && createScopedValue(() => createElement("div", {
|
|
23
|
+
className: "vx-sheet-backdrop",
|
|
24
|
+
onClick: props.onDismiss
|
|
25
|
+
})), createScopedValue(() => createScopedElement("div", {
|
|
26
|
+
className: cx("vx-sheet", props.className),
|
|
27
|
+
style: { ...props.style },
|
|
28
|
+
...props.web
|
|
29
|
+
}, () => props.children))]))), document.body);
|
|
30
|
+
_b.c = textHoleUpdate(__s, 1, _b.a, _v, _b.c, _b.d, _b.b, true, true);
|
|
31
|
+
_b.d = _v;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
var Sheet = function Sheet(props, __s, __extra) {
|
|
35
|
+
const __block = __s.block;
|
|
36
|
+
const dark = withSlot(_h$0, useThemeScheme) === "dark";
|
|
37
|
+
if (__s.block.pending && !__s.block.crossRenderUpdate) return;
|
|
38
|
+
{
|
|
39
|
+
const __ifCondition = props.open;
|
|
40
|
+
ifBlock(__s, 0, __block.parentNode, __ifCondition, __then$0, null, __block.endMarker, __ifCondition ? [dark, props] : void 0);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
//#endregion
|
|
44
|
+
export { Sheet };
|