@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
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { getStack, onStackRegistered, stackEntries } from "./ui27.js";
|
|
2
|
+
import { buildRoutePath } from "./ui41.js";
|
|
3
|
+
import { createNativeScriptRoot } from "@nativescript-community/octane";
|
|
4
|
+
import { Application, GridLayout, Page } from "@nativescript/core";
|
|
5
|
+
import { hookSlots as hookSlots$1, useSyncExternalStore as useSyncExternalStore$1 } from "octane";
|
|
6
|
+
//#region src/route.native.ts
|
|
7
|
+
/** Native twin of route.web — same Route contract over Frame/Page stacks.
|
|
8
|
+
* `pushRoute` resolves a stack ('root' = the app's root Frame — an
|
|
9
|
+
* explicit registerStack('root') or, by default, the Frame returned by
|
|
10
|
+
* Application.getRootView(); named stacks come from TabSpec.stack panes
|
|
11
|
+
* or registerStack) and pushes a Page hosting the registered screen —
|
|
12
|
+
* each pushed Page is its own Octane root (decision #9: pages never
|
|
13
|
+
* share context with their presenter). Params land as props; named-stack
|
|
14
|
+
* pushes get `_stack` injected so the screen can popRoute its own stack.
|
|
15
|
+
*
|
|
16
|
+
* Registration contract (the footgun this module exists to defuse):
|
|
17
|
+
* - `registerScreens(table)` once — pushRoute resolves `name` through it.
|
|
18
|
+
* - 'root' needs nothing when the app boots a Frame as its root view
|
|
19
|
+
* (the standard shape); non-Frame roots can't host pushes at all.
|
|
20
|
+
* - named stacks register via `TabSpec.stack` or `registerStack`.
|
|
21
|
+
* Every drop path warns loudly — silent no-ops are how apps ship a
|
|
22
|
+
* default route on native while working fine on web. */
|
|
23
|
+
var screens = {};
|
|
24
|
+
var routes = [];
|
|
25
|
+
/** Register the app's name → screen table (call once, from the shared
|
|
26
|
+
* routes module). Native `pushRoute` resolves `route.name` through it;
|
|
27
|
+
* on web the table feeds `screenFor` for outlets without a
|
|
28
|
+
* `resolveScreen` prop. `manifest` (from deriveRouteManifest) is stored
|
|
29
|
+
* for parity — the web leaf matches URLs through it; native navigation
|
|
30
|
+
* is name+params and only needs the table. */
|
|
31
|
+
function registerScreens(table, manifest) {
|
|
32
|
+
screens = table;
|
|
33
|
+
routes = manifest ?? [];
|
|
34
|
+
}
|
|
35
|
+
/** One-call registration for route-dir apps — screens + URL patterns +
|
|
36
|
+
* layouts all come from deriveRouteManifest. */
|
|
37
|
+
function registerRoutes(manifest) {
|
|
38
|
+
registerScreens(manifest.screens, manifest.routes);
|
|
39
|
+
}
|
|
40
|
+
function screenFor(name) {
|
|
41
|
+
return screens[name];
|
|
42
|
+
}
|
|
43
|
+
var tracked = /* @__PURE__ */ new WeakSet();
|
|
44
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
45
|
+
var pageRoutes = /* @__PURE__ */ new WeakMap();
|
|
46
|
+
var warned = /* @__PURE__ */ new Set();
|
|
47
|
+
function emit() {
|
|
48
|
+
listeners.forEach((l) => l());
|
|
49
|
+
}
|
|
50
|
+
function warnOnce(key, msg) {
|
|
51
|
+
if (warned.has(key)) return;
|
|
52
|
+
warned.add(key);
|
|
53
|
+
console.warn("[octane-xplat] " + msg);
|
|
54
|
+
}
|
|
55
|
+
/** Attach the route-store emission hook once per frame. `navigatedTo`
|
|
56
|
+
* fires on push AND on pop (the revealed page re-fires it), so one
|
|
57
|
+
* listener keeps every useRoute snapshot honest. */
|
|
58
|
+
function trackFrame(frame) {
|
|
59
|
+
if (tracked.has(frame)) return;
|
|
60
|
+
tracked.add(frame);
|
|
61
|
+
frame.on("navigatedTo", emit);
|
|
62
|
+
}
|
|
63
|
+
function resolveStack(stack) {
|
|
64
|
+
const frame = getStack(stack);
|
|
65
|
+
if (frame) trackFrame(frame);
|
|
66
|
+
return frame;
|
|
67
|
+
}
|
|
68
|
+
onStackRegistered((_name, frame) => {
|
|
69
|
+
trackFrame(frame);
|
|
70
|
+
emit();
|
|
71
|
+
});
|
|
72
|
+
function pushRoute(r) {
|
|
73
|
+
const frame = resolveStack(r.stack);
|
|
74
|
+
if (!frame) {
|
|
75
|
+
warnOnce("stack:" + r.stack, r.stack === "root" ? `pushRoute('${r.name}') dropped — no root Frame. Boot with a Frame as the app root (Application.run create() returning new Frame) or call registerStack('root', frame).` : `pushRoute('${r.name}') dropped — no stack '${r.stack}' is registered. Named stacks come from TabSpec.stack on <Tabs> or registerStack('${r.stack}', frame).`);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const C = screenFor(r.name);
|
|
79
|
+
if (!C) {
|
|
80
|
+
warnOnce("screen:" + r.name, `pushRoute('${r.name}') dropped — '${r.name}' isn't in the screen table. Call registerScreens({ ${r.name}: ... }) at boot.`);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (Application.android && r.stack !== "root") warnOnce("android:" + r.stack, `pushRoute into named stack '${r.stack}' on Android — upstream #11444: the page mounts but currentPage/backStack/goBack never land (pages accumulate). Named-stack pushes are iOS-only until fixed.`);
|
|
84
|
+
if (!frame.isLoaded) frame.callLoaded?.();
|
|
85
|
+
const props = r.stack === "root" ? r.params : {
|
|
86
|
+
...r.params,
|
|
87
|
+
_stack: r.stack
|
|
88
|
+
};
|
|
89
|
+
try {
|
|
90
|
+
frame.navigate({ create: () => {
|
|
91
|
+
const page = new Page();
|
|
92
|
+
page.id = r.name + "-page";
|
|
93
|
+
page.actionBarHidden = true;
|
|
94
|
+
pageRoutes.set(page, r);
|
|
95
|
+
const host = new GridLayout();
|
|
96
|
+
page.content = host;
|
|
97
|
+
createNativeScriptRoot(host).render(C, props);
|
|
98
|
+
return page;
|
|
99
|
+
} });
|
|
100
|
+
} catch (e) {
|
|
101
|
+
console.warn("[octane-xplat] pushRoute(" + r.name + ") threw: " + e?.message);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
/** Pop the top page of a stack ('root' default). Quiet no-op at the base
|
|
105
|
+
* page — matching web, where back at the app root is a no-op; loud only
|
|
106
|
+
* when the stack itself doesn't exist. */
|
|
107
|
+
function popRoute(stack = "root") {
|
|
108
|
+
const frame = resolveStack(stack);
|
|
109
|
+
if (!frame) {
|
|
110
|
+
warnOnce("pop:" + stack, `popRoute('${stack}') dropped — no such stack is registered.`);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
frame.goBack();
|
|
114
|
+
}
|
|
115
|
+
/** Route stamped on a stack's current page, or null at its base page. */
|
|
116
|
+
function routeFor(stack) {
|
|
117
|
+
const page = resolveStack(stack)?.currentPage;
|
|
118
|
+
return (page && pageRoutes.get(page)) ?? null;
|
|
119
|
+
}
|
|
120
|
+
/** The top route across stacks — root's current route wins (a root push
|
|
121
|
+
* covers the shell); otherwise the most recently registered named stack
|
|
122
|
+
* showing a pushed page. Native has no boot URL, so this is an
|
|
123
|
+
* approximation of web's "current URL route", not a deep link. */
|
|
124
|
+
function currentRoute() {
|
|
125
|
+
const root = routeFor("root");
|
|
126
|
+
if (root) return root;
|
|
127
|
+
const named = [...stackEntries()].reverse();
|
|
128
|
+
for (const [name] of named) {
|
|
129
|
+
const r = routeFor(name);
|
|
130
|
+
if (r) return r;
|
|
131
|
+
}
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
134
|
+
/** Path-string parity for the web leaf's hrefFor — a canonical
|
|
135
|
+
* /<stack>/<path> rendering of the route (deep-linking consumes it
|
|
136
|
+
* there). Native navigation itself is name+params, not URLs. */
|
|
137
|
+
function hrefFor(r) {
|
|
138
|
+
return buildRoutePath(routes, r);
|
|
139
|
+
}
|
|
140
|
+
function useRoute(stack) {
|
|
141
|
+
return useSyncExternalStore$1((cb) => {
|
|
142
|
+
listeners.add(cb);
|
|
143
|
+
return () => listeners.delete(cb);
|
|
144
|
+
}, () => routeFor(stack), _h$0);
|
|
145
|
+
}
|
|
146
|
+
var _h$0 = /* @__PURE__ */ Symbol(/* @__PURE__ */ hookSlots$1(1));
|
|
147
|
+
//#endregion
|
|
148
|
+
export { currentRoute, hrefFor, popRoute, pushRoute, registerRoutes, registerScreens, routeFor, screenFor, useRoute };
|
|
@@ -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 };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { hookSlots, useSyncExternalStore } from "@nativescript-community/octane";
|
|
2
|
+
//#region src/use-store.native.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/native/ui5.js
CHANGED
|
@@ -1,35 +1,78 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { cx } from "./ui2.js";
|
|
2
|
+
import { applyEscapeProps } from "./ui3.js";
|
|
3
|
+
import { layoutChildProps } from "./ui4.js";
|
|
4
|
+
import { defineUniversalComponent, hookSlots, universalPlan, universalProps, universalValue, useCallback } from "@nativescript-community/octane";
|
|
5
|
+
//#region src/View.native.tsrx
|
|
6
|
+
var _h$0 = /* @__PURE__ */ Symbol(/* @__PURE__ */ hookSlots(1));
|
|
3
7
|
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
4
8
|
"kind": "host",
|
|
5
|
-
"type": "
|
|
6
|
-
"
|
|
7
|
-
["id", 0],
|
|
8
|
-
["className", 1],
|
|
9
|
-
["style", 2],
|
|
10
|
-
["accessible", 3],
|
|
11
|
-
["accessibilityLabel", 4],
|
|
12
|
-
["accessibilityRole", 5],
|
|
13
|
-
["onTap", 6],
|
|
14
|
-
["onLongPress", 7]
|
|
15
|
-
],
|
|
9
|
+
"type": "flexboxlayout",
|
|
10
|
+
"propsSlot": 0,
|
|
16
11
|
"children": [{
|
|
17
12
|
"kind": "slot",
|
|
18
|
-
"slot":
|
|
13
|
+
"slot": 1
|
|
19
14
|
}]
|
|
20
15
|
});
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
16
|
+
var PAN_STATE = [
|
|
17
|
+
"cancelled",
|
|
18
|
+
"began",
|
|
19
|
+
"moved",
|
|
20
|
+
"ended"
|
|
21
|
+
];
|
|
22
|
+
var View = defineUniversalComponent("nativescript", function View(props) {
|
|
23
|
+
const onPan = useCallback((e) => props.onPan?.({
|
|
24
|
+
x: e.deltaX,
|
|
25
|
+
y: e.deltaY,
|
|
26
|
+
dx: e.deltaX,
|
|
27
|
+
dy: e.deltaY,
|
|
28
|
+
vx: 0,
|
|
29
|
+
vy: 0,
|
|
30
|
+
state: PAN_STATE[e.state] ?? "moved",
|
|
31
|
+
target: e.view ?? e.object
|
|
32
|
+
}), [props.onPan], _h$0);
|
|
33
|
+
return universalValue(__octaneUniversalPlan0, [universalProps([
|
|
34
|
+
[
|
|
35
|
+
"set",
|
|
36
|
+
"id",
|
|
37
|
+
props.id
|
|
38
|
+
],
|
|
39
|
+
["spread", layoutChildProps(props)],
|
|
40
|
+
[
|
|
41
|
+
"set",
|
|
42
|
+
"ref",
|
|
43
|
+
(v) => {
|
|
44
|
+
if (v) {
|
|
45
|
+
applyEscapeProps(v, props);
|
|
46
|
+
props.bind?.(v);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
[
|
|
51
|
+
"set",
|
|
52
|
+
"flexDirection",
|
|
53
|
+
"column"
|
|
54
|
+
],
|
|
55
|
+
[
|
|
56
|
+
"set",
|
|
57
|
+
"className",
|
|
58
|
+
cx(props.className)
|
|
59
|
+
],
|
|
60
|
+
[
|
|
61
|
+
"set",
|
|
62
|
+
"style",
|
|
63
|
+
props.style
|
|
64
|
+
],
|
|
65
|
+
[
|
|
66
|
+
"set",
|
|
67
|
+
"onPan",
|
|
68
|
+
props.onPan ? onPan : void 0
|
|
69
|
+
],
|
|
70
|
+
[
|
|
71
|
+
"set",
|
|
72
|
+
"onSwipe",
|
|
73
|
+
props.onSwipe
|
|
74
|
+
]
|
|
75
|
+
]), props.children]);
|
|
33
76
|
}, { "module": "@nativescript-community/octane" });
|
|
34
77
|
//#endregion
|
|
35
|
-
export {
|
|
78
|
+
export { View };
|
package/dist/native/ui6.js
CHANGED
|
@@ -1,25 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { cx } from "./ui2.js";
|
|
2
|
+
import { applyEscapeProps } from "./ui3.js";
|
|
3
|
+
import { layoutChildProps } from "./ui4.js";
|
|
4
|
+
import { defineUniversalComponent, universalPlan, universalProps, universalValue } from "@nativescript-community/octane";
|
|
5
|
+
//#region src/Row.native.tsrx
|
|
3
6
|
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
4
7
|
"kind": "host",
|
|
5
|
-
"type": "
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
["hint", 3],
|
|
12
|
-
["onTextChange", 4]
|
|
13
|
-
]
|
|
8
|
+
"type": "flexboxlayout",
|
|
9
|
+
"propsSlot": 0,
|
|
10
|
+
"children": [{
|
|
11
|
+
"kind": "slot",
|
|
12
|
+
"slot": 1
|
|
13
|
+
}]
|
|
14
14
|
});
|
|
15
|
-
var
|
|
16
|
-
return universalValue(__octaneUniversalPlan0, [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
var Row = defineUniversalComponent("nativescript", function Row(props) {
|
|
16
|
+
return universalValue(__octaneUniversalPlan0, [universalProps([
|
|
17
|
+
[
|
|
18
|
+
"set",
|
|
19
|
+
"ref",
|
|
20
|
+
(v) => applyEscapeProps(v, props)
|
|
21
|
+
],
|
|
22
|
+
[
|
|
23
|
+
"set",
|
|
24
|
+
"flexDirection",
|
|
25
|
+
"row"
|
|
26
|
+
],
|
|
27
|
+
[
|
|
28
|
+
"set",
|
|
29
|
+
"className",
|
|
30
|
+
cx(props.className)
|
|
31
|
+
],
|
|
32
|
+
[
|
|
33
|
+
"set",
|
|
34
|
+
"style",
|
|
35
|
+
props.style
|
|
36
|
+
],
|
|
37
|
+
["spread", layoutChildProps(props)]
|
|
38
|
+
]), props.children]);
|
|
23
39
|
}, { "module": "@nativescript-community/octane" });
|
|
24
40
|
//#endregion
|
|
25
|
-
export {
|
|
41
|
+
export { Row };
|
package/dist/native/ui7.js
CHANGED
|
@@ -1,73 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { cx } from "./ui2.js";
|
|
2
|
+
import { applyEscapeProps } from "./ui3.js";
|
|
3
|
+
import { defineUniversalComponent, universalPlan, universalValue } from "@nativescript-community/octane";
|
|
4
|
+
//#region src/Grid.native.tsrx
|
|
3
5
|
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
4
6
|
"kind": "host",
|
|
5
|
-
"type": "
|
|
7
|
+
"type": "gridlayout",
|
|
6
8
|
"bindings": [
|
|
7
|
-
["
|
|
8
|
-
["
|
|
9
|
-
["
|
|
10
|
-
["
|
|
11
|
-
["
|
|
12
|
-
]
|
|
13
|
-
});
|
|
14
|
-
var __octaneUniversalPlan1 = universalPlan("nativescript", {
|
|
15
|
-
"kind": "slot",
|
|
16
|
-
"slot": 0
|
|
17
|
-
});
|
|
18
|
-
var __octaneUniversalPlan2 = universalPlan("nativescript", {
|
|
19
|
-
"kind": "range",
|
|
9
|
+
["ref", 0],
|
|
10
|
+
["rows", 1],
|
|
11
|
+
["columns", 2],
|
|
12
|
+
["className", 3],
|
|
13
|
+
["style", 4]
|
|
14
|
+
],
|
|
20
15
|
"children": [{
|
|
21
16
|
"kind": "slot",
|
|
22
|
-
"slot":
|
|
17
|
+
"slot": 5
|
|
23
18
|
}]
|
|
24
19
|
});
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
var warnedAboutGap = false;
|
|
21
|
+
var Grid = defineUniversalComponent("nativescript", function Grid(props) {
|
|
22
|
+
if (props.gap != null && !warnedAboutGap) {
|
|
23
|
+
warnedAboutGap = true;
|
|
24
|
+
console.warn("[Grid] gap is not supported; use child margins instead.");
|
|
25
|
+
}
|
|
30
26
|
return universalValue(__octaneUniversalPlan0, [
|
|
31
|
-
props
|
|
32
|
-
props.
|
|
27
|
+
(view) => applyEscapeProps(view, props),
|
|
28
|
+
props.rows,
|
|
29
|
+
props.columns,
|
|
30
|
+
cx("vx-grid", props.className),
|
|
33
31
|
props.style,
|
|
34
|
-
props.
|
|
35
|
-
props.renderItem
|
|
32
|
+
props.children
|
|
36
33
|
]);
|
|
37
34
|
}, { "module": "@nativescript-community/octane" });
|
|
38
|
-
var MemoListView = memo(ListInner, (a, b) => a.items === b.items);
|
|
39
|
-
var List = defineUniversalComponent("nativescript", function List(props) {
|
|
40
|
-
return universalValue(__octaneUniversalPlan3, [universalIf(props.items.length > 0, () => {
|
|
41
|
-
return universalValue(__octaneUniversalPlan1, [universalComponent("nativescript", MemoListView, universalProps([
|
|
42
|
-
[
|
|
43
|
-
"set",
|
|
44
|
-
"id",
|
|
45
|
-
props.id
|
|
46
|
-
],
|
|
47
|
-
[
|
|
48
|
-
"set",
|
|
49
|
-
"items",
|
|
50
|
-
props.items
|
|
51
|
-
],
|
|
52
|
-
[
|
|
53
|
-
"set",
|
|
54
|
-
"className",
|
|
55
|
-
props.className
|
|
56
|
-
],
|
|
57
|
-
[
|
|
58
|
-
"set",
|
|
59
|
-
"style",
|
|
60
|
-
props.style
|
|
61
|
-
],
|
|
62
|
-
[
|
|
63
|
-
"set",
|
|
64
|
-
"renderItem",
|
|
65
|
-
props.renderItem
|
|
66
|
-
]
|
|
67
|
-
]))]);
|
|
68
|
-
}, () => {
|
|
69
|
-
return universalValue(__octaneUniversalPlan2, [props.renderEmpty?.()]);
|
|
70
|
-
})]);
|
|
71
|
-
}, { "module": "@nativescript-community/octane" });
|
|
72
35
|
//#endregion
|
|
73
|
-
export {
|
|
36
|
+
export { Grid };
|
package/dist/native/ui8.js
CHANGED
|
@@ -1,33 +1,31 @@
|
|
|
1
|
+
import { cx } from "./ui2.js";
|
|
2
|
+
import { applyEscapeProps } from "./ui3.js";
|
|
1
3
|
import { defineUniversalComponent, universalPlan, universalValue } from "@nativescript-community/octane";
|
|
2
|
-
//#region src/
|
|
4
|
+
//#region src/Stack.native.tsrx
|
|
3
5
|
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
4
6
|
"kind": "host",
|
|
5
|
-
"type": "
|
|
7
|
+
"type": "gridlayout",
|
|
8
|
+
"props": {
|
|
9
|
+
"rows": "*",
|
|
10
|
+
"columns": "*"
|
|
11
|
+
},
|
|
6
12
|
"bindings": [
|
|
7
|
-
["
|
|
13
|
+
["ref", 0],
|
|
8
14
|
["className", 1],
|
|
9
|
-
["style", 2]
|
|
10
|
-
["orientation", 3]
|
|
15
|
+
["style", 2]
|
|
11
16
|
],
|
|
12
17
|
"children": [{
|
|
13
|
-
"kind": "
|
|
14
|
-
"
|
|
15
|
-
"bindings": [["flexDirection", 4]],
|
|
16
|
-
"children": [{
|
|
17
|
-
"kind": "slot",
|
|
18
|
-
"slot": 5
|
|
19
|
-
}]
|
|
18
|
+
"kind": "slot",
|
|
19
|
+
"slot": 3
|
|
20
20
|
}]
|
|
21
21
|
});
|
|
22
|
-
var
|
|
22
|
+
var Stack = defineUniversalComponent("nativescript", function Stack(props) {
|
|
23
23
|
return universalValue(__octaneUniversalPlan0, [
|
|
24
|
-
props
|
|
25
|
-
props.className,
|
|
24
|
+
(view) => applyEscapeProps(view, props),
|
|
25
|
+
cx("vx-stack", props.className),
|
|
26
26
|
props.style,
|
|
27
|
-
props.horizontal ? "horizontal" : "vertical",
|
|
28
|
-
props.horizontal ? "row" : "column",
|
|
29
27
|
props.children
|
|
30
28
|
]);
|
|
31
29
|
}, { "module": "@nativescript-community/octane" });
|
|
32
30
|
//#endregion
|
|
33
|
-
export {
|
|
31
|
+
export { Stack };
|
package/dist/native/ui9.js
CHANGED
|
@@ -1,24 +1,27 @@
|
|
|
1
|
+
import { cx } from "./ui2.js";
|
|
2
|
+
import { applyEscapeProps } from "./ui3.js";
|
|
1
3
|
import { defineUniversalComponent, universalPlan, universalValue } from "@nativescript-community/octane";
|
|
2
|
-
//#region src/
|
|
4
|
+
//#region src/Absolute.native.tsrx
|
|
3
5
|
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
4
6
|
"kind": "host",
|
|
5
|
-
"type": "
|
|
7
|
+
"type": "absolutelayout",
|
|
6
8
|
"bindings": [
|
|
7
|
-
["
|
|
9
|
+
["ref", 0],
|
|
8
10
|
["className", 1],
|
|
9
|
-
["style", 2]
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
["style", 2]
|
|
12
|
+
],
|
|
13
|
+
"children": [{
|
|
14
|
+
"kind": "slot",
|
|
15
|
+
"slot": 3
|
|
16
|
+
}]
|
|
13
17
|
});
|
|
14
|
-
var
|
|
18
|
+
var Absolute = defineUniversalComponent("nativescript", function Absolute(props) {
|
|
15
19
|
return universalValue(__octaneUniversalPlan0, [
|
|
16
|
-
props
|
|
17
|
-
props.className,
|
|
20
|
+
(view) => applyEscapeProps(view, props),
|
|
21
|
+
cx("vx-absolute", props.className),
|
|
18
22
|
props.style,
|
|
19
|
-
props.
|
|
20
|
-
props.alt
|
|
23
|
+
props.children
|
|
21
24
|
]);
|
|
22
25
|
}, { "module": "@nativescript-community/octane" });
|
|
23
26
|
//#endregion
|
|
24
|
-
export {
|
|
27
|
+
export { Absolute };
|
package/dist/web/ui.js
CHANGED
|
@@ -1,19 +1,40 @@
|
|
|
1
|
-
import { View } from "./
|
|
2
|
-
import { Row } from "./
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
|
|
1
|
+
import { View } from "./ui4.js";
|
|
2
|
+
import { Row } from "./ui5.js";
|
|
3
|
+
import { Grid } from "./ui6.js";
|
|
4
|
+
import { Stack } from "./ui7.js";
|
|
5
|
+
import { Absolute } from "./ui8.js";
|
|
6
|
+
import { Spacer } from "./ui9.js";
|
|
7
|
+
import { Text } from "./ui10.js";
|
|
8
|
+
import { Pressable } from "./ui11.js";
|
|
9
|
+
import { TextInput } from "./ui12.js";
|
|
10
|
+
import { TextArea } from "./ui13.js";
|
|
11
|
+
import { List } from "./ui14.js";
|
|
12
|
+
import { ScrollView } from "./ui15.js";
|
|
13
|
+
import { Image } from "./ui16.js";
|
|
14
|
+
import { Modal } from "./ui17.js";
|
|
15
|
+
import { openModal } from "./ui18.js";
|
|
16
|
+
import { Overlay } from "./ui20.js";
|
|
17
|
+
import { Popover } from "./ui21.js";
|
|
18
|
+
import { showToast } from "./ui22.js";
|
|
19
|
+
import { useAnimation } from "./ui23.js";
|
|
20
|
+
import { getColorScheme, useColorScheme } from "./ui24.js";
|
|
21
|
+
import { styled } from "./ui25.js";
|
|
22
|
+
import { Screen } from "./ui26.js";
|
|
23
|
+
import { deriveRouteManifest } from "./ui27.js";
|
|
24
|
+
import { currentRoute, hrefFor, popRoute, pushRoute, registerRoutes, registerScreens, routeFor, screenFor, useRoute } from "./ui28.js";
|
|
25
|
+
import { Tabs } from "./ui29.js";
|
|
26
|
+
import { Switch } from "./ui30.js";
|
|
27
|
+
import { useSafeAreaInsets } from "./ui31.js";
|
|
28
|
+
import { SafeArea } from "./ui32.js";
|
|
29
|
+
import { KeyboardAvoiding } from "./ui33.js";
|
|
30
|
+
import { Drawer } from "./ui34.js";
|
|
31
|
+
import { ActivityIndicator } from "./ui36.js";
|
|
32
|
+
import { Slider } from "./ui37.js";
|
|
33
|
+
import { registerIcon, registerIcons } from "./ui38.js";
|
|
34
|
+
import { Icon } from "./ui39.js";
|
|
35
|
+
import { Heading } from "./ui40.js";
|
|
36
|
+
import { PlatformBadge } from "./ui41.js";
|
|
37
|
+
import { getStack, registerStack, stackEntries } from "./ui42.js";
|
|
38
|
+
import { createStore } from "./ui43.js";
|
|
39
|
+
import { useStore } from "./ui44.js";
|
|
40
|
+
export { Absolute, ActivityIndicator, View as Column, Drawer, Grid, Heading, Icon, Image, KeyboardAvoiding, List, Modal, Overlay, PlatformBadge, Popover, Pressable, Row, SafeArea, Screen, ScrollView, Slider, Spacer, Stack, Switch, Tabs, Text, TextArea, TextInput, View, createStore, currentRoute, deriveRouteManifest, getColorScheme, getStack, hrefFor, openModal, popRoute, pushRoute, registerIcon, registerIcons, registerRoutes, registerScreens, registerStack, routeFor, screenFor, showToast, stackEntries, styled, useAnimation, useColorScheme, useRoute, useSafeAreaInsets, useStore };
|