@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.
- package/README.md +46 -0
- package/dist/native/octane-client-build.json +1 -1
- package/dist/native/ui.js +52 -40
- package/dist/native/ui10.js +20 -11
- package/dist/native/ui11.js +42 -109
- package/dist/native/ui12.js +17 -84
- package/dist/native/ui13.js +11 -41
- package/dist/native/ui14.js +118 -76
- package/dist/native/ui15.js +43 -92
- package/dist/native/ui16.js +106 -45
- package/dist/native/ui17.js +29 -42
- package/dist/native/ui18.js +34 -53
- package/dist/native/ui19.js +246 -32
- package/dist/native/ui20.js +27 -16
- package/dist/native/ui21.js +376 -86
- package/dist/native/ui22.js +26 -114
- package/dist/native/ui23.js +49 -97
- package/dist/native/ui24.js +78 -53
- package/dist/native/ui25.js +138 -16
- package/dist/native/ui26.js +8 -23
- package/dist/native/ui27.js +60 -34
- package/dist/native/ui28.js +36 -142
- package/dist/native/ui29.js +101 -21
- package/dist/native/ui30.js +14 -31
- package/dist/native/ui31.js +55 -36
- package/dist/native/ui32.js +49 -61
- package/dist/native/ui33.js +36 -28
- package/dist/native/ui34.js +51 -8
- package/dist/native/ui35.js +98 -20
- package/dist/native/ui36.js +9 -33
- package/dist/native/ui37.js +42 -15
- package/dist/native/ui38.js +186 -57
- package/dist/native/ui39.js +96 -24
- package/dist/native/ui4.js +22 -20
- package/dist/native/ui40.js +57 -13
- package/dist/native/ui41.js +15 -100
- package/dist/native/ui42.js +6 -146
- package/dist/native/ui43.js +37 -21
- package/dist/native/ui44.js +265 -6
- 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 -77
- 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 +52 -9
- package/dist/native/ui60.js +108 -0
- package/dist/native/ui61.js +76 -0
- package/dist/native/ui7.js +42 -26
- package/dist/native/ui8.js +22 -12
- package/dist/native/ui9.js +18 -9
- package/dist/web/octane-client-build.json +1 -1
- package/dist/web/ui.js +51 -40
- package/dist/web/ui10.js +33 -186
- package/dist/web/ui11.js +28 -409
- package/dist/web/ui12.js +21 -68
- package/dist/web/ui13.js +201 -97
- package/dist/web/ui14.js +85 -95
- package/dist/web/ui15.js +368 -25
- package/dist/web/ui16.js +13 -101
- package/dist/web/ui17.js +246 -42
- package/dist/web/ui18.js +237 -28
- package/dist/web/ui19.js +36 -10
- package/dist/web/ui20.js +73 -102
- package/dist/web/ui21.js +102 -73
- package/dist/web/ui22.js +95 -55
- package/dist/web/ui23.js +94 -55
- package/dist/web/ui24.js +31 -15
- package/dist/web/ui25.js +105 -19
- package/dist/web/ui26.js +29 -23
- package/dist/web/ui27.js +12 -123
- package/dist/web/ui28.js +9 -110
- package/dist/web/ui29.js +52 -102
- package/dist/web/ui3.js +29 -18
- package/dist/web/ui30.js +32 -41
- package/dist/web/ui31.js +120 -39
- package/dist/web/ui32.js +41 -74
- package/dist/web/ui33.js +148 -32
- package/dist/web/ui34.js +54 -51
- package/dist/web/ui35.js +55 -7
- package/dist/web/ui36.js +18 -41
- package/dist/web/ui37.js +6 -46
- package/dist/web/ui38.js +37 -16
- package/dist/web/ui39.js +135 -81
- package/dist/web/ui4.js +46 -152
- package/dist/web/ui40.js +39 -37
- package/dist/web/ui41.js +41 -16
- package/dist/web/ui42.js +74 -7
- package/dist/web/ui43.js +40 -20
- package/dist/web/ui44.js +60 -6
- 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 +131 -27
- 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 +81 -45
- package/dist/web/ui7.js +43 -21
- package/dist/web/ui8.js +27 -21
- package/dist/web/ui9.js +29 -18
- package/package.json +13 -4
- package/src/theme/tokens.css +369 -138
- package/types/index.d.ts +102 -58
- package/types/props.d.ts +233 -13
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 };
|
package/dist/web/ui58.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { applyThemeClasses } from "./ui29.js";
|
|
2
|
+
import { createRoot } from "octane";
|
|
3
|
+
//#region src/sheet-service.web.ts
|
|
4
|
+
var active = /* @__PURE__ */ new Set();
|
|
5
|
+
/** Close the most recently opened sheet (resolve with `result`). */
|
|
6
|
+
function closeSheet(result) {
|
|
7
|
+
[...active].pop()?.finish(result);
|
|
8
|
+
}
|
|
9
|
+
/** Imperative in-window sheet: portal layer at document root, bottom-
|
|
10
|
+
* anchored panel, dedicated Octane root. Resolves when the sheet closes. */
|
|
11
|
+
var openSheet = (Component, params, options = {}) => new Promise((resolve) => {
|
|
12
|
+
const layer = document.createElement("div");
|
|
13
|
+
const unbindTheme = applyThemeClasses(layer, "vx-sheet-layer");
|
|
14
|
+
const panel = document.createElement("div");
|
|
15
|
+
panel.className = "vx-sheet";
|
|
16
|
+
let finished = false;
|
|
17
|
+
const finish = (result) => {
|
|
18
|
+
if (finished) return;
|
|
19
|
+
finished = true;
|
|
20
|
+
active.delete(entry);
|
|
21
|
+
unbindTheme();
|
|
22
|
+
root.unmount();
|
|
23
|
+
layer.remove();
|
|
24
|
+
resolve(result);
|
|
25
|
+
};
|
|
26
|
+
const entry = {
|
|
27
|
+
layer,
|
|
28
|
+
finish
|
|
29
|
+
};
|
|
30
|
+
if (options.shadeCover ?? true) {
|
|
31
|
+
const backdrop = document.createElement("div");
|
|
32
|
+
backdrop.className = "vx-sheet-backdrop";
|
|
33
|
+
backdrop.addEventListener("click", () => finish());
|
|
34
|
+
layer.appendChild(backdrop);
|
|
35
|
+
}
|
|
36
|
+
layer.appendChild(panel);
|
|
37
|
+
document.body.appendChild(layer);
|
|
38
|
+
const root = createRoot(panel);
|
|
39
|
+
root.render(Component, {
|
|
40
|
+
params,
|
|
41
|
+
close: finish
|
|
42
|
+
});
|
|
43
|
+
active.add(entry);
|
|
44
|
+
});
|
|
45
|
+
//#endregion
|
|
46
|
+
export { closeSheet, openSheet };
|
package/dist/web/ui6.js
CHANGED
|
@@ -1,58 +1,94 @@
|
|
|
1
1
|
import { applyEscapeProps } from "./ui2.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { glassClassOf, glassStyleOf } from "./ui3.js";
|
|
3
|
+
import { layoutChildProps } from "./ui4.js";
|
|
4
|
+
import { __s, bag8, clone, snapshotSpread, template } from "octane";
|
|
5
|
+
import { bindSignalChild, bindSignalHostPropSources, enableSignalBindings } from "octane/internal/client";
|
|
6
|
+
//#region src/Row.web.tsrx
|
|
7
|
+
enableSignalBindings(1, true);
|
|
5
8
|
var _t$0 = /* @__PURE__ */ template("<div></div>");
|
|
6
9
|
var _rm$1 = [
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
+
"s",
|
|
11
|
+
"f",
|
|
12
|
+
"e"
|
|
10
13
|
];
|
|
11
|
-
function
|
|
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;
|
|
14
|
+
var Row = /* @__PURE__ */ __s(function Row(props, __s, __extra) {
|
|
26
15
|
let _b = __s.slots[0];
|
|
27
16
|
if (_b === void 0) {
|
|
28
|
-
let _m1, _m3;
|
|
17
|
+
let _m0, _m1, _m2, _m3, _m4, _m5;
|
|
29
18
|
const _root = clone(_t$0);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
19
|
+
_m0 = props.id;
|
|
20
|
+
_m1 = (e) => applyEscapeProps(e, props);
|
|
21
|
+
_m2 = [
|
|
22
|
+
"vx-row",
|
|
23
|
+
glassClassOf(props.glass),
|
|
24
|
+
props.className
|
|
25
|
+
];
|
|
26
|
+
_m3 = snapshotSpread(layoutChildProps(props, {
|
|
27
|
+
...glassStyleOf(props.glass),
|
|
28
|
+
...props.style
|
|
29
|
+
}));
|
|
30
|
+
_m4 = _root;
|
|
31
|
+
_m5 = bindSignalHostPropSources(__s, void 0, _root, [
|
|
32
|
+
[
|
|
33
|
+
false,
|
|
34
|
+
"id",
|
|
35
|
+
_m0
|
|
36
|
+
],
|
|
37
|
+
[
|
|
38
|
+
false,
|
|
39
|
+
"ref",
|
|
40
|
+
_m1
|
|
41
|
+
],
|
|
42
|
+
[
|
|
43
|
+
false,
|
|
44
|
+
"className",
|
|
45
|
+
_m2
|
|
46
|
+
],
|
|
47
|
+
[true, _m3]
|
|
48
|
+
], "b:3863ef97", true);
|
|
49
|
+
_b = bag8(__s, _root, _m0, _m1, _m2, _m3, _m4, _m5, null, void 0);
|
|
34
50
|
__s.refFields = _rm$1;
|
|
35
51
|
} else {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
_b.a = updateFreshClassName(["vx-grid", props.className], _b.a, _b.b);
|
|
40
|
-
{
|
|
41
|
-
const _v = {
|
|
42
|
-
...props.style,
|
|
43
|
-
...props.rows ? { gridTemplateRows: parseTracks(props.rows) } : {},
|
|
44
|
-
...props.columns ? { gridTemplateColumns: parseTracks(props.columns) } : {}
|
|
45
|
-
};
|
|
46
|
-
if (_b.c !== _v) {
|
|
47
|
-
setStyle(_b.b, _v, _b.c);
|
|
48
|
-
_b.c = _v;
|
|
52
|
+
{
|
|
53
|
+
const _v = props.id;
|
|
54
|
+
if (_b.a !== _v) _b.a = _v;
|
|
49
55
|
}
|
|
56
|
+
{
|
|
57
|
+
const _v = (e) => applyEscapeProps(e, props);
|
|
58
|
+
if (_b.b !== _v) _b.b = _v;
|
|
59
|
+
}
|
|
60
|
+
{
|
|
61
|
+
const _v = [
|
|
62
|
+
"vx-row",
|
|
63
|
+
glassClassOf(props.glass),
|
|
64
|
+
props.className
|
|
65
|
+
];
|
|
66
|
+
if (_b.c !== _v) _b.c = _v;
|
|
67
|
+
}
|
|
68
|
+
_b.d = snapshotSpread(layoutChildProps(props, {
|
|
69
|
+
...glassStyleOf(props.glass),
|
|
70
|
+
...props.style
|
|
71
|
+
}));
|
|
72
|
+
_b.f = bindSignalHostPropSources(__s, _b.f, _b.e, [
|
|
73
|
+
[
|
|
74
|
+
false,
|
|
75
|
+
"id",
|
|
76
|
+
_b.a
|
|
77
|
+
],
|
|
78
|
+
[
|
|
79
|
+
false,
|
|
80
|
+
"ref",
|
|
81
|
+
_b.b
|
|
82
|
+
],
|
|
83
|
+
[
|
|
84
|
+
false,
|
|
85
|
+
"className",
|
|
86
|
+
_b.c
|
|
87
|
+
],
|
|
88
|
+
[true, _b.d]
|
|
89
|
+
], "b:3863ef97", true);
|
|
50
90
|
}
|
|
51
|
-
|
|
52
|
-
const _v = props.children;
|
|
53
|
-
_b.e = childTextHoleUpdate(__s, 1, _b.b, _v, _b.e, _b.f);
|
|
54
|
-
_b.f = _v;
|
|
55
|
-
}
|
|
91
|
+
_b.i = bindSignalChild(__s, _b.i, 1, _b.e, props.children, "b:24a4d1fc", null, void 0, void 0, void 0, true);
|
|
56
92
|
});
|
|
57
93
|
//#endregion
|
|
58
|
-
export {
|
|
94
|
+
export { Row };
|
package/dist/web/ui7.js
CHANGED
|
@@ -1,40 +1,62 @@
|
|
|
1
1
|
import { applyEscapeProps } from "./ui2.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { glassClassOf, glassStyleOf } from "./ui3.js";
|
|
3
|
+
import { __s, bag7, clone, queueRefAttach, queueRefDetach, setStyle, template } from "octane";
|
|
4
|
+
import { bindSignalAttribute, bindSignalChild, enableSignalBindings, replaceRef, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
|
|
5
|
+
//#region src/Grid.web.tsrx
|
|
6
|
+
enableSignalBindings(1, true);
|
|
5
7
|
var _t$0 = /* @__PURE__ */ template("<div></div>");
|
|
6
8
|
var _rm$1 = [
|
|
7
9
|
"r",
|
|
8
|
-
"
|
|
10
|
+
"e",
|
|
9
11
|
"b"
|
|
10
12
|
];
|
|
11
|
-
|
|
13
|
+
function parseTracks(spec) {
|
|
14
|
+
return spec?.split(",").map((part) => {
|
|
15
|
+
const track = part.trim();
|
|
16
|
+
if (track === "auto") return "auto";
|
|
17
|
+
if (track.endsWith("*")) return `${track.slice(0, -1) || "1"}fr`;
|
|
18
|
+
return /^\d+(?:\.\d+)?$/.test(track) ? `${track}px` : track;
|
|
19
|
+
}).join(" ");
|
|
20
|
+
}
|
|
21
|
+
var warnedAboutGap = false;
|
|
22
|
+
var Grid = /* @__PURE__ */ __s(function Grid(props, __s, __extra) {
|
|
23
|
+
if (props.gap != null && !warnedAboutGap) {
|
|
24
|
+
warnedAboutGap = true;
|
|
25
|
+
console.warn("[Grid] gap is not supported; use child margins instead.");
|
|
26
|
+
}
|
|
27
|
+
if (__s.block.pending && !__s.block.crossRenderUpdate) return;
|
|
12
28
|
let _b = __s.slots[0];
|
|
13
29
|
if (_b === void 0) {
|
|
14
|
-
let _m1,
|
|
30
|
+
let _m1, _m4;
|
|
15
31
|
const _root = clone(_t$0);
|
|
16
32
|
_m1 = _root;
|
|
17
|
-
queueRefAttach(__s,
|
|
18
|
-
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.
|
|
19
|
-
_b =
|
|
33
|
+
queueRefAttach(__s, _m4 = (el) => applyEscapeProps(el, props), _m1);
|
|
34
|
+
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.e, _b.b));
|
|
35
|
+
_b = bag7(__s, _root, void 0, _m1, void 0, void 0, _m4, null, void 0);
|
|
20
36
|
__s.refFields = _rm$1;
|
|
21
37
|
} else {
|
|
22
38
|
const _r = (el) => applyEscapeProps(el, props);
|
|
23
|
-
if (_r !== _b.
|
|
39
|
+
if (_r !== _b.e) _b.e = replaceRef(__s, _b.e, _r, _b.b);
|
|
24
40
|
}
|
|
25
|
-
_b.a =
|
|
41
|
+
_b.a = bindSignalAttribute(__s, _b.a, _b.b, "id", props.id, "b:8088bcf9", setPlainAttribute);
|
|
42
|
+
_b.c = updateFreshClassName([
|
|
43
|
+
"vx-grid",
|
|
44
|
+
glassClassOf(props.glass),
|
|
45
|
+
props.className
|
|
46
|
+
], _b.c, _b.b);
|
|
26
47
|
{
|
|
27
|
-
const _v =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
48
|
+
const _v = {
|
|
49
|
+
...glassStyleOf(props.glass),
|
|
50
|
+
...props.style,
|
|
51
|
+
...props.rows ? { gridTemplateRows: parseTracks(props.rows) } : {},
|
|
52
|
+
...props.columns ? { gridTemplateColumns: parseTracks(props.columns) } : {}
|
|
53
|
+
};
|
|
54
|
+
if (_b.d !== _v) {
|
|
55
|
+
setStyle(_b.b, _v, _b.d);
|
|
56
|
+
_b.d = _v;
|
|
31
57
|
}
|
|
32
58
|
}
|
|
33
|
-
|
|
34
|
-
const _v = props.children;
|
|
35
|
-
_b.e = childTextHoleUpdate(__s, 1, _b.b, _v, _b.e, _b.f);
|
|
36
|
-
_b.f = _v;
|
|
37
|
-
}
|
|
59
|
+
_b.h = bindSignalChild(__s, _b.h, 1, _b.b, props.children, "b:2e517120", null, void 0, void 0, void 0, true);
|
|
38
60
|
});
|
|
39
61
|
//#endregion
|
|
40
|
-
export {
|
|
62
|
+
export { Grid };
|
package/dist/web/ui8.js
CHANGED
|
@@ -1,40 +1,46 @@
|
|
|
1
1
|
import { applyEscapeProps } from "./ui2.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { glassClassOf, glassStyleOf } from "./ui3.js";
|
|
3
|
+
import { __s, bag7, clone, queueRefAttach, queueRefDetach, setStyle, template } from "octane";
|
|
4
|
+
import { bindSignalAttribute, bindSignalChild, enableSignalBindings, replaceRef, setPlainAttribute, updateFreshClassName } from "octane/internal/client";
|
|
5
|
+
//#region src/Stack.web.tsrx
|
|
6
|
+
enableSignalBindings(1, true);
|
|
5
7
|
var _t$0 = /* @__PURE__ */ template("<div></div>");
|
|
6
8
|
var _rm$1 = [
|
|
7
9
|
"r",
|
|
8
|
-
"
|
|
10
|
+
"e",
|
|
9
11
|
"b"
|
|
10
12
|
];
|
|
11
|
-
var
|
|
13
|
+
var Stack = /* @__PURE__ */ __s(function Stack(props, __s, __extra) {
|
|
12
14
|
let _b = __s.slots[0];
|
|
13
15
|
if (_b === void 0) {
|
|
14
|
-
let _m1,
|
|
16
|
+
let _m1, _m4;
|
|
15
17
|
const _root = clone(_t$0);
|
|
16
18
|
_m1 = _root;
|
|
17
|
-
queueRefAttach(__s,
|
|
18
|
-
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.
|
|
19
|
-
_b =
|
|
19
|
+
queueRefAttach(__s, _m4 = (el) => applyEscapeProps(el, props), _m1);
|
|
20
|
+
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.e, _b.b));
|
|
21
|
+
_b = bag7(__s, _root, void 0, _m1, void 0, void 0, _m4, null, void 0);
|
|
20
22
|
__s.refFields = _rm$1;
|
|
21
23
|
} else {
|
|
22
24
|
const _r = (el) => applyEscapeProps(el, props);
|
|
23
|
-
if (_r !== _b.
|
|
25
|
+
if (_r !== _b.e) _b.e = replaceRef(__s, _b.e, _r, _b.b);
|
|
24
26
|
}
|
|
25
|
-
_b.a =
|
|
27
|
+
_b.a = bindSignalAttribute(__s, _b.a, _b.b, "id", props.id, "b:c5a2da88", setPlainAttribute);
|
|
28
|
+
_b.c = updateFreshClassName([
|
|
29
|
+
"vx-stack",
|
|
30
|
+
glassClassOf(props.glass),
|
|
31
|
+
props.className
|
|
32
|
+
], _b.c, _b.b);
|
|
26
33
|
{
|
|
27
|
-
const _v =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
34
|
+
const _v = {
|
|
35
|
+
...glassStyleOf(props.glass),
|
|
36
|
+
...props.style
|
|
37
|
+
};
|
|
38
|
+
if (_b.d !== _v) {
|
|
39
|
+
setStyle(_b.b, _v, _b.d);
|
|
40
|
+
_b.d = _v;
|
|
31
41
|
}
|
|
32
42
|
}
|
|
33
|
-
|
|
34
|
-
const _v = props.children;
|
|
35
|
-
_b.e = childTextHoleUpdate(__s, 1, _b.b, _v, _b.e, _b.f);
|
|
36
|
-
_b.f = _v;
|
|
37
|
-
}
|
|
43
|
+
_b.h = bindSignalChild(__s, _b.h, 1, _b.b, props.children, "b:3a94ba9c", null, void 0, void 0, void 0, true);
|
|
38
44
|
});
|
|
39
45
|
//#endregion
|
|
40
|
-
export {
|
|
46
|
+
export { Stack };
|