@c9up/orbit 0.0.0-stage → 0.1.1
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/Cargo.lock +139 -0
- package/Cargo.toml +20 -0
- package/LICENSE +21 -0
- package/README.md +320 -2
- package/android/orbit.cmake +31 -0
- package/android/src/main/cpp/NativeOrbit.cpp +309 -0
- package/android/src/main/cpp/NativeOrbit.h +35 -0
- package/android/src/main/cpp/orbit_host.h +34 -0
- package/android/src/main/java/com/c9up/orbit/OrbitEffects.kt +286 -0
- package/android/src/main/java/com/c9up/orbit/OrbitHost.kt +258 -0
- package/android/src/main/java/com/c9up/orbit/OrbitImage.kt +346 -0
- package/android/src/main/java/com/c9up/orbit/OrbitInput.kt +161 -0
- package/android/src/main/java/com/c9up/orbit/OrbitPress.kt +110 -0
- package/android/src/main/java/com/c9up/orbit/OrbitVector.kt +115 -0
- package/android/src/main/java/com/c9up/orbit/OrbitViews.kt +362 -0
- package/crates/orbit-host/Cargo.toml +14 -0
- package/crates/orbit-host/src/gesture.rs +561 -0
- package/crates/orbit-host/src/lib.rs +2042 -0
- package/crates/orbit-host/src/motion.rs +328 -0
- package/crates/orbit-host/src/vector.rs +1173 -0
- package/dist/color.d.ts +10 -0
- package/dist/color.d.ts.map +1 -0
- package/dist/color.js +62 -0
- package/dist/color.js.map +1 -0
- package/dist/commit.d.ts +77 -0
- package/dist/commit.d.ts.map +1 -0
- package/dist/commit.js +302 -0
- package/dist/commit.js.map +1 -0
- package/dist/errors.d.ts +76 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +89 -0
- package/dist/errors.js.map +1 -0
- package/dist/host.d.ts +49 -0
- package/dist/host.d.ts.map +1 -0
- package/dist/host.js +20 -0
- package/dist/host.js.map +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -0
- package/dist/motion.d.ts +18 -0
- package/dist/motion.d.ts.map +1 -0
- package/dist/motion.js +67 -0
- package/dist/motion.js.map +1 -0
- package/dist/node.d.ts +46 -0
- package/dist/node.d.ts.map +1 -0
- package/dist/node.js +110 -0
- package/dist/node.js.map +1 -0
- package/dist/pages.d.ts +56 -0
- package/dist/pages.d.ts.map +1 -0
- package/dist/pages.js +157 -0
- package/dist/pages.js.map +1 -0
- package/dist/react-native/index.d.ts +33 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +71 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/report.d.ts +13 -0
- package/dist/report.d.ts.map +1 -0
- package/dist/report.js +22 -0
- package/dist/report.js.map +1 -0
- package/dist/server.d.ts +109 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +290 -0
- package/dist/server.js.map +1 -0
- package/dist/stack.d.ts +117 -0
- package/dist/stack.d.ts.map +1 -0
- package/dist/stack.js +299 -0
- package/dist/stack.js.map +1 -0
- package/dist/styles.d.ts +138 -0
- package/dist/styles.d.ts.map +1 -0
- package/dist/styles.js +920 -0
- package/dist/styles.js.map +1 -0
- package/dist/template.d.ts +27 -0
- package/dist/template.d.ts.map +1 -0
- package/dist/template.js +1436 -0
- package/dist/template.js.map +1 -0
- package/dist/textDecoder.d.ts +29 -0
- package/dist/textDecoder.d.ts.map +1 -0
- package/dist/textDecoder.js +149 -0
- package/dist/textDecoder.js.map +1 -0
- package/dist/url.d.ts +45 -0
- package/dist/url.d.ts.map +1 -0
- package/dist/url.js +303 -0
- package/dist/url.js.map +1 -0
- package/package.json +96 -3
- package/scripts/build-android.sh +27 -0
- package/scripts/test-styles.mjs +31 -0
- package/specs/NativeOrbit.ts +34 -0
- package/src/color.ts +68 -0
- package/src/commit.ts +373 -0
- package/src/errors.ts +178 -0
- package/src/host.ts +91 -0
- package/src/index.ts +64 -0
- package/src/motion.ts +88 -0
- package/src/node.ts +133 -0
- package/src/pages.ts +207 -0
- package/src/react-native/index.ts +115 -0
- package/src/react-native/react-native.d.ts +39 -0
- package/src/report.ts +25 -0
- package/src/server.ts +395 -0
- package/src/stack.ts +428 -0
- package/src/styles.ts +1021 -0
- package/src/template.ts +1681 -0
- package/src/textDecoder.ts +162 -0
- package/src/url.ts +333 -0
package/dist/errors.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orbit's errors, one per code. Every failure carries a stable
|
|
3
|
+
* `E_ORBIT_<REASON>` code, so a caller branches on `error.code` or on
|
|
4
|
+
* `instanceof errors.E_ORBIT_…` rather than on a message.
|
|
5
|
+
*/
|
|
6
|
+
import { createError } from "@c9up/flare";
|
|
7
|
+
/** `mount` ran before `useHost` gave orbit a native host, or the module is not orbit's host. */
|
|
8
|
+
export const E_ORBIT_NO_HOST = createError("[orbit] %s", "E_ORBIT_NO_HOST");
|
|
9
|
+
/** The native host refused a commit; the message carries its report. */
|
|
10
|
+
export const E_ORBIT_COMMIT_FAILED = createError("[orbit] the host refused a commit: %j", "E_ORBIT_COMMIT_FAILED");
|
|
11
|
+
/**
|
|
12
|
+
* The views of a screen nest deeper than the host lays out (100 levels): the
|
|
13
|
+
* layout recurses once per level on the JS thread's stack, so the host refuses
|
|
14
|
+
* the commit instead of overflowing it.
|
|
15
|
+
*/
|
|
16
|
+
export const E_ORBIT_TREE_TOO_DEEP = createError("[orbit] %s", "E_ORBIT_TREE_TOO_DEEP");
|
|
17
|
+
/**
|
|
18
|
+
* A value of an `<svg>` the host cannot read (a `NaN` length, unreadable path
|
|
19
|
+
* data, `points` or `transform`): that part of the drawing is left out and the
|
|
20
|
+
* rest drawn. Reported to `mount`'s `onError`, never thrown.
|
|
21
|
+
*/
|
|
22
|
+
export const E_ORBIT_SVG_VALUE = createError("[orbit] %s", "E_ORBIT_SVG_VALUE");
|
|
23
|
+
/** An element with no native mapping yet (`<select>`, `<canvas>`, or `<text>` / a gradient inside an `<svg>`). */
|
|
24
|
+
export const E_ORBIT_UNSUPPORTED_ELEMENT = createError("[orbit] <%s> %s", "E_ORBIT_UNSUPPORTED_ELEMENT");
|
|
25
|
+
/** A block element inside text: native text holds only inline runs. */
|
|
26
|
+
export const E_ORBIT_BLOCK_IN_TEXT = createError("[orbit] <%s> cannot sit inside text on native", "E_ORBIT_BLOCK_IN_TEXT");
|
|
27
|
+
/** `motion=${…}` was not an object of motion values. The message is aurora's. */
|
|
28
|
+
export const E_ORBIT_INVALID_MOTION = createError("%s", "E_ORBIT_INVALID_MOTION");
|
|
29
|
+
/** `scroll-y=${…}` was not a motion value. */
|
|
30
|
+
export const E_ORBIT_INVALID_SCROLL_BINDING = createError("[orbit] scroll-y expects a motion value", "E_ORBIT_INVALID_SCROLL_BINDING");
|
|
31
|
+
/** A colour orbit cannot read (named colours other than `transparent`, `hsl()`…). */
|
|
32
|
+
export const E_ORBIT_INVALID_COLOR = createError('[orbit] cannot read the colour "%s"', "E_ORBIT_INVALID_COLOR");
|
|
33
|
+
/** `<img src>` over plain http: images are fetched over https only. */
|
|
34
|
+
export const E_ORBIT_INSECURE_IMAGE_URL = createError('[orbit] <img src="%s">: an image is fetched over https only', "E_ORBIT_INSECURE_IMAGE_URL");
|
|
35
|
+
/** `<img src>` with a scheme that is not an image source (`data:`, `javascript:`…). */
|
|
36
|
+
export const E_ORBIT_IMAGE_SOURCE = createError('[orbit] <img src="%s">: %s', "E_ORBIT_IMAGE_SOURCE");
|
|
37
|
+
/** Two elements of an `each` list share a key: a key names one row. */
|
|
38
|
+
export const E_ORBIT_DUPLICATE_KEY = createError("[orbit] each(): two elements share the key %s — a key names one row", "E_ORBIT_DUPLICATE_KEY");
|
|
39
|
+
/** `useScreen()` in a component no screen of a stack built. */
|
|
40
|
+
export const E_ORBIT_NO_SCREEN = createError("[orbit] useScreen() outside a screen: it reads the screen a stack shows, from a component that screen built", "E_ORBIT_NO_SCREEN");
|
|
41
|
+
/** One stack put in two places: a stack is shown once. */
|
|
42
|
+
export const E_ORBIT_STACK_SHOWN = createError("[orbit] a stack is shown in one place: this one is already in a template", "E_ORBIT_STACK_SHOWN");
|
|
43
|
+
/** `useStyles` got something other than a table `ream css:compile` wrote. */
|
|
44
|
+
export const E_ORBIT_STYLE_TABLE = createError("[orbit] not a style table orbit reads (version 1, from ream css:compile)", "E_ORBIT_STYLE_TABLE");
|
|
45
|
+
/** `serverPages({ server })` over plain http to a host that is not this machine or the emulator's. */
|
|
46
|
+
export const E_ORBIT_INSECURE_SERVER = createError("[orbit] the server %s is not https (plain http only reaches this machine or the emulator's host)", "E_ORBIT_INSECURE_SERVER");
|
|
47
|
+
/** The server named a page the app does not have (`serverPages({ pages })`). */
|
|
48
|
+
export const E_ORBIT_UNKNOWN_PAGE = createError('[orbit] the server named the page "%s", which this app does not have', "E_ORBIT_UNKNOWN_PAGE");
|
|
49
|
+
/** A server connection was asked for a path that resolves to another origin. */
|
|
50
|
+
export const E_ORBIT_FOREIGN_ORIGIN = createError("[orbit] the connection to %s does not reach %s", "E_ORBIT_FOREIGN_ORIGIN");
|
|
51
|
+
/** The server answered a JSON request with an empty non-2xx response. */
|
|
52
|
+
export const E_ORBIT_SERVER_REQUEST_FAILED = createError("[orbit] %s answered HTTP %d", "E_ORBIT_SERVER_REQUEST_FAILED");
|
|
53
|
+
/** Server events need an `XMLHttpRequest`, and the platform has none. */
|
|
54
|
+
export const E_ORBIT_NO_XHR = createError("[orbit] server events need XMLHttpRequest", "E_ORBIT_NO_XHR");
|
|
55
|
+
/** An invariant inside orbit broke: a bug in orbit. The site says which one. */
|
|
56
|
+
export const E_ORBIT_INTERNAL = createError("[orbit] %s", "E_ORBIT_INTERNAL");
|
|
57
|
+
// The errors below are raised by orbit's stand-ins for the platform's `URL`
|
|
58
|
+
// and `TextDecoder`, which Hermes lacks. Code written against those APIs
|
|
59
|
+
// expects what the WHATWG specs raise — `new URL("bad")` throws a `TypeError`,
|
|
60
|
+
// an unknown encoding label a `RangeError` — so these stay native error
|
|
61
|
+
// classes, named like the platform's own (`name` is `TypeError` /
|
|
62
|
+
// `RangeError`), with the code added. They are not flare exceptions on
|
|
63
|
+
// purpose: a polyfill must not change what the API it replaces throws.
|
|
64
|
+
/** `URL.createObjectURL` with no platform `URL` to make blob URLs. */
|
|
65
|
+
export class E_ORBIT_OBJECT_URL_UNAVAILABLE extends TypeError {
|
|
66
|
+
static code = "E_ORBIT_OBJECT_URL_UNAVAILABLE";
|
|
67
|
+
code = "E_ORBIT_OBJECT_URL_UNAVAILABLE";
|
|
68
|
+
}
|
|
69
|
+
/** A URL (or its base) that does not parse. */
|
|
70
|
+
export class E_ORBIT_INVALID_URL extends TypeError {
|
|
71
|
+
static code = "E_ORBIT_INVALID_URL";
|
|
72
|
+
code = "E_ORBIT_INVALID_URL";
|
|
73
|
+
}
|
|
74
|
+
/** `TextDecoder` given an encoding label other than UTF-8's. */
|
|
75
|
+
export class E_ORBIT_UNSUPPORTED_ENCODING extends RangeError {
|
|
76
|
+
static code = "E_ORBIT_UNSUPPORTED_ENCODING";
|
|
77
|
+
code = "E_ORBIT_UNSUPPORTED_ENCODING";
|
|
78
|
+
}
|
|
79
|
+
/** `TextDecoder.decode` given something that is not an `ArrayBuffer` or a view on one. */
|
|
80
|
+
export class E_ORBIT_INVALID_DECODER_INPUT extends TypeError {
|
|
81
|
+
static code = "E_ORBIT_INVALID_DECODER_INPUT";
|
|
82
|
+
code = "E_ORBIT_INVALID_DECODER_INPUT";
|
|
83
|
+
}
|
|
84
|
+
/** A `fatal` `TextDecoder` met bytes that are not valid UTF-8. */
|
|
85
|
+
export class E_ORBIT_INVALID_ENCODED_DATA extends TypeError {
|
|
86
|
+
static code = "E_ORBIT_INVALID_ENCODED_DATA";
|
|
87
|
+
code = "E_ORBIT_INVALID_ENCODED_DATA";
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,aA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IACpC,IAAI,GAAG,qBAAqB,CAAC;;AAGvC,gEAAgE;AAChE,MAAM,OAAO,4BAA6B,SAAQ,UAAU;IAC3D,MAAM,CAAU,IAAI,GAAG,8BAA8B,CAAC;IAC7C,IAAI,GAAG,8BAA8B,CAAC;;AAGhD,0FAA0F;AAC1F,MAAM,OAAO,6BAA8B,SAAQ,SAAS;IAC3D,MAAM,CAAU,IAAI,GAAG,+BAA+B,CAAC;IAC9C,IAAI,GAAG,+BAA+B,CAAC;;AAGjD,kEAAkE;AAClE,MAAM,OAAO,4BAA6B,SAAQ,SAAS;IAC1D,MAAM,CAAU,IAAI,GAAG,8BAA8B,CAAC;IAC7C,IAAI,GAAG,8BAA8B,CAAC"}
|
package/dist/host.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What orbit needs from the native side: the Rust host behind JSI (the
|
|
3
|
+
* `NativeOrbit` TurboModule, see `specs/NativeOrbit.ts`), or a fake in tests.
|
|
4
|
+
* Structural on purpose: orbit's core imports nothing from React Native.
|
|
5
|
+
*/
|
|
6
|
+
export interface OrbitHost {
|
|
7
|
+
/** The root's size in dp. */
|
|
8
|
+
setViewport(width: number, height: number): void;
|
|
9
|
+
/** Apply a JSON batch of tree operations; returns the host's JSON report. */
|
|
10
|
+
commit(ops: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* The bytes an image node shows (`<img src=${bytes}>`): copied into the
|
|
13
|
+
* host's memory, never to disk, and dropped (zeroed) with the node.
|
|
14
|
+
*/
|
|
15
|
+
imageBytes(tag: number, bytes: Uint8Array): void;
|
|
16
|
+
/**
|
|
17
|
+
* Where nodes were laid out: a JSON array of tags in, a JSON array of
|
|
18
|
+
* `[x, y, width, height]` (dp, the root's coordinates, scroll offsets left
|
|
19
|
+
* out) or null per tag out.
|
|
20
|
+
*/
|
|
21
|
+
layout(tags: string): string;
|
|
22
|
+
/** Scroll a scroll view by `by` dp, or to its end. */
|
|
23
|
+
scroll(tag: number, by: number, toEnd: boolean): void;
|
|
24
|
+
/**
|
|
25
|
+
* Events from host views: touches (React Native's touch event types, in dp),
|
|
26
|
+
* text fields (`topChange`, `topFocus`, `topBlur`, `topSubmit`, with the
|
|
27
|
+
* text in `data`), `topScroll` from a scroll view with its offset in `y`
|
|
28
|
+
* (dp), and `topViewport` on tag 0 when the window resized (the keyboard),
|
|
29
|
+
* with `x`/`y` the new size in dp.
|
|
30
|
+
*/
|
|
31
|
+
setEventHandler(handler: (tag: number, type: string, x: number, y: number, data: string) => void): void;
|
|
32
|
+
motionValue(tag: number, initial: number): void;
|
|
33
|
+
motionInterpolate(tag: number, input: number, from: readonly number[], to: readonly number[]): void;
|
|
34
|
+
motionSet(tag: number, value: number): void;
|
|
35
|
+
motionStop(tag: number): void;
|
|
36
|
+
motionFrames(tag: number, frames: readonly number[], to: number, loop: boolean): void;
|
|
37
|
+
motionSpring(tag: number, to: number, stiffness: number, damping: number, mass: number): void;
|
|
38
|
+
/** Forget a motion value or interpolation, its animation and its bindings. */
|
|
39
|
+
motionDispose(tag: number): void;
|
|
40
|
+
/** prop: 0 opacity, 1 translateX, 2 translateY, 3 scale, 4 visible (> 0.5). */
|
|
41
|
+
motionBind(view: number, prop: number, node: number): void;
|
|
42
|
+
motionBindScroll(scrollView: number, value: number): void;
|
|
43
|
+
}
|
|
44
|
+
/** The TurboModule name the native side registers. */
|
|
45
|
+
export declare const NATIVE_MODULE_NAME = "NativeOrbit";
|
|
46
|
+
/** Give orbit its native host, once, before `mount`. */
|
|
47
|
+
export declare function useHost(next: OrbitHost): void;
|
|
48
|
+
export declare function currentHost(): OrbitHost;
|
|
49
|
+
//# sourceMappingURL=host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACzB,6BAA6B;IAC7B,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE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,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,+EAA+E;IAC/E,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3D,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1D;AAED,sDAAsD;AACtD,eAAO,MAAM,kBAAkB,gBAAgB,CAAC;AAIhD,wDAAwD;AACxD,wBAAgB,OAAO,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CAI7C;AAED,wBAAgB,WAAW,IAAI,SAAS,CAOvC"}
|
package/dist/host.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { E_ORBIT_NO_HOST } from "./errors.js";
|
|
2
|
+
import { useNativeMotion } from "./motion.js";
|
|
3
|
+
/** The TurboModule name the native side registers. */
|
|
4
|
+
export const NATIVE_MODULE_NAME = "NativeOrbit";
|
|
5
|
+
let host = null;
|
|
6
|
+
/** Give orbit its native host, once, before `mount`. */
|
|
7
|
+
export function useHost(next) {
|
|
8
|
+
host = next;
|
|
9
|
+
// aurora's motion values made from now on live in this host.
|
|
10
|
+
useNativeMotion();
|
|
11
|
+
}
|
|
12
|
+
export function currentHost() {
|
|
13
|
+
if (host === null) {
|
|
14
|
+
throw new E_ORBIT_NO_HOST([
|
|
15
|
+
`no native host: call useHost(TurboModuleRegistry.getEnforcing("${NATIVE_MODULE_NAME}")) before mount()`,
|
|
16
|
+
]);
|
|
17
|
+
}
|
|
18
|
+
return host;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=host.js.map
|
package/dist/host.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.js","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAsE9C,sDAAsD;AACtD,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAAC;AAEhD,IAAI,IAAI,GAAqB,IAAI,CAAC;AAElC,wDAAwD;AACxD,MAAM,UAAU,OAAO,CAAC,IAAe;IACtC,IAAI,GAAG,IAAI,CAAC;IACZ,6DAA6D;IAC7D,eAAe,EAAE,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,WAAW;IAC1B,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QACnB,MAAM,IAAI,eAAe,CAAC;YACzB,kEAAkE,kBAAkB,oBAAoB;SACxG,CAAC,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@c9up/orbit` — aurora components as native views on a phone.
|
|
3
|
+
*
|
|
4
|
+
* The JS side keeps a tree of native nodes that aurora's signals patch; each
|
|
5
|
+
* commit goes over JSI to a Rust host that lays it out (taffy), diffs it and
|
|
6
|
+
* hands mount operations to the platform's views. Animations and scroll-driven
|
|
7
|
+
* values run on the UI thread, without JS.
|
|
8
|
+
*
|
|
9
|
+
* useHost(TurboModuleRegistry.getEnforcing("NativeOrbit"))
|
|
10
|
+
* mount(App(), { viewport: Dimensions.get("window") })
|
|
11
|
+
*
|
|
12
|
+
* Screens: `createStack(Home)` in the root, `useScreen().push(Detail, props)`
|
|
13
|
+
* in a screen; the Android back button pops (see `@c9up/orbit/react-native`).
|
|
14
|
+
*/
|
|
15
|
+
export { colorToArgb } from "./color.js";
|
|
16
|
+
export { afterCommit, type MountOptions, type OrbitReport, type Root, } from "./commit.js";
|
|
17
|
+
export * as errors from "./errors.js";
|
|
18
|
+
export { NATIVE_MODULE_NAME, type OrbitHost, useHost } from "./host.js";
|
|
19
|
+
export { bindMotion, bindScrollY, MotionNode, type MotionStyle, MotionValue, type SpringOptions, type TimingOptions, } from "./motion.js";
|
|
20
|
+
/** The app's ream server, one connection for pages, comet and relay. */
|
|
21
|
+
export { type ConnectOptions, connectServer, type ServerConnection, type ServerEvent, ServerEventStream, type TokenStore, } from "./server.js";
|
|
22
|
+
export { createStack,
|
|
23
|
+
/** What the back button does: pop the innermost shown stack (false: nothing to pop). */
|
|
24
|
+
goBack, type Navigator, type Screen, type ScreenComponent, type Stack, type StackOptions, useScreen, } from "./stack.js";
|
|
25
|
+
export { colorScheme, type StyleTable, unknownClasses, useStyles, } from "./styles.js";
|
|
26
|
+
export { type GestureEvent, mount } from "./template.js";
|
|
27
|
+
/** A standard UTF-8 `TextDecoder` where the engine has none (Hermes). */
|
|
28
|
+
export { installTextDecoder, StandardTextDecoder } from "./textDecoder.js";
|
|
29
|
+
/** A standard `URL` in place of the platform's, when it is not one (React Native's). */
|
|
30
|
+
export { installStandardUrl, StandardURL } from "./url.js";
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EACN,WAAW,EACX,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,IAAI,GACT,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,KAAK,SAAS,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACxE,OAAO,EACN,UAAU,EACV,WAAW,EACX,UAAU,EACV,KAAK,WAAW,EAChB,WAAW,EACX,KAAK,aAAa,EAClB,KAAK,aAAa,GAClB,MAAM,aAAa,CAAC;AACrB,wEAAwE;AACxE,OAAO,EACN,KAAK,cAAc,EACnB,aAAa,EACb,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,iBAAiB,EACjB,KAAK,UAAU,GACf,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,WAAW;AACX,wFAAwF;AACxF,MAAM,EACN,KAAK,SAAS,EACd,KAAK,MAAM,EACX,KAAK,eAAe,EACpB,KAAK,KAAK,EACV,KAAK,YAAY,EACjB,SAAS,GACT,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,WAAW,EACX,KAAK,UAAU,EACf,cAAc,EACd,SAAS,GACT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACzD,yEAAyE;AACzE,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC3E,wFAAwF;AACxF,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@c9up/orbit` — aurora components as native views on a phone.
|
|
3
|
+
*
|
|
4
|
+
* The JS side keeps a tree of native nodes that aurora's signals patch; each
|
|
5
|
+
* commit goes over JSI to a Rust host that lays it out (taffy), diffs it and
|
|
6
|
+
* hands mount operations to the platform's views. Animations and scroll-driven
|
|
7
|
+
* values run on the UI thread, without JS.
|
|
8
|
+
*
|
|
9
|
+
* useHost(TurboModuleRegistry.getEnforcing("NativeOrbit"))
|
|
10
|
+
* mount(App(), { viewport: Dimensions.get("window") })
|
|
11
|
+
*
|
|
12
|
+
* Screens: `createStack(Home)` in the root, `useScreen().push(Detail, props)`
|
|
13
|
+
* in a screen; the Android back button pops (see `@c9up/orbit/react-native`).
|
|
14
|
+
*/
|
|
15
|
+
export { colorToArgb } from "./color.js";
|
|
16
|
+
export { afterCommit, } from "./commit.js";
|
|
17
|
+
export * as errors from "./errors.js";
|
|
18
|
+
export { NATIVE_MODULE_NAME, useHost } from "./host.js";
|
|
19
|
+
export { bindMotion, bindScrollY, MotionNode, MotionValue, } from "./motion.js";
|
|
20
|
+
/** The app's ream server, one connection for pages, comet and relay. */
|
|
21
|
+
export { connectServer, ServerEventStream, } from "./server.js";
|
|
22
|
+
export { createStack,
|
|
23
|
+
/** What the back button does: pop the innermost shown stack (false: nothing to pop). */
|
|
24
|
+
goBack, useScreen, } from "./stack.js";
|
|
25
|
+
export { colorScheme, unknownClasses, useStyles, } from "./styles.js";
|
|
26
|
+
export { mount } from "./template.js";
|
|
27
|
+
/** A standard UTF-8 `TextDecoder` where the engine has none (Hermes). */
|
|
28
|
+
export { installTextDecoder, StandardTextDecoder } from "./textDecoder.js";
|
|
29
|
+
/** A standard `URL` in place of the platform's, when it is not one (React Native's). */
|
|
30
|
+
export { installStandardUrl, StandardURL } from "./url.js";
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EACN,WAAW,GAIX,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAkB,OAAO,EAAE,MAAM,WAAW,CAAC;AACxE,OAAO,EACN,UAAU,EACV,WAAW,EACX,UAAU,EAEV,WAAW,GAGX,MAAM,aAAa,CAAC;AACrB,wEAAwE;AACxE,OAAO,EAEN,aAAa,EAGb,iBAAiB,GAEjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,WAAW;AACX,wFAAwF;AACxF,MAAM,EAMN,SAAS,GACT,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,WAAW,EAEX,cAAc,EACd,SAAS,GACT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAqB,KAAK,EAAE,MAAM,eAAe,CAAC;AACzD,yEAAyE;AACzE,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC3E,wFAAwF;AACxF,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/motion.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Motion values on the phone: aurora's `MotionValue`, driven by the Rust host
|
|
3
|
+
* on the UI thread. JS declares values, curves and bindings once, and a
|
|
4
|
+
* blocked JS thread stops none of it. The same component file animates in the
|
|
5
|
+
* browser, where aurora's DOM renderer hands the curves to the Web Animations
|
|
6
|
+
* API.
|
|
7
|
+
*/
|
|
8
|
+
import { type MotionStyle, type MotionValue } from "@c9up/aurora/core";
|
|
9
|
+
export { MotionNode, type MotionStyle, MotionValue, type SpringOptions, type TimingOptions, } from "@c9up/aurora/core";
|
|
10
|
+
/** @internal `useHost` installs it: motion values made from then on live in the host. */
|
|
11
|
+
export declare function useNativeMotion(): void;
|
|
12
|
+
/** Wire `style` to the view `viewTag`; call once the view is committed. */
|
|
13
|
+
export declare function bindMotion(viewTag: number, style: MotionStyle): void;
|
|
14
|
+
/** Feed `value` from the scroll offset of the scroll view `scrollViewTag`. */
|
|
15
|
+
export declare function bindScrollY(scrollViewTag: number, value: MotionValue): void;
|
|
16
|
+
/** Read a `motion=${…}` attribute value, as aurora reads it on the web. */
|
|
17
|
+
export declare function readMotion(value: unknown): MotionStyle;
|
|
18
|
+
//# sourceMappingURL=motion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../src/motion.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAEN,KAAK,WAAW,EAChB,KAAK,WAAW,EAGhB,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EACN,UAAU,EACV,KAAK,WAAW,EAChB,WAAW,EACX,KAAK,aAAa,EAClB,KAAK,aAAa,GAClB,MAAM,mBAAmB,CAAC;AAgB3B,yFAAyF;AACzF,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAiBD,2EAA2E;AAC3E,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,IAAI,CAKpE;AAED,8EAA8E;AAC9E,wBAAgB,WAAW,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,IAAI,CAE3E;AAED,2EAA2E;AAC3E,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,CActD"}
|
package/dist/motion.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Motion values on the phone: aurora's `MotionValue`, driven by the Rust host
|
|
3
|
+
* on the UI thread. JS declares values, curves and bindings once, and a
|
|
4
|
+
* blocked JS thread stops none of it. The same component file animates in the
|
|
5
|
+
* browser, where aurora's DOM renderer hands the curves to the Web Animations
|
|
6
|
+
* API.
|
|
7
|
+
*/
|
|
8
|
+
import { readMotionStyle, setMotionDriver, } from "@c9up/aurora/core";
|
|
9
|
+
import { E_ORBIT_INVALID_MOTION } from "./errors.js";
|
|
10
|
+
import { currentHost } from "./host.js";
|
|
11
|
+
export { MotionNode, MotionValue, } from "@c9up/aurora/core";
|
|
12
|
+
/** aurora's motion values, held and played by orbit's native host. */
|
|
13
|
+
const nativeDriver = {
|
|
14
|
+
value: (tag, initial) => currentHost().motionValue(tag, initial),
|
|
15
|
+
set: (tag, value) => currentHost().motionSet(tag, value),
|
|
16
|
+
stop: (tag) => currentHost().motionStop(tag),
|
|
17
|
+
frames: (tag, frames, to, loop) => currentHost().motionFrames(tag, [...frames], to, loop),
|
|
18
|
+
spring: (tag, to, stiffness, damping, mass) => currentHost().motionSpring(tag, to, stiffness, damping, mass),
|
|
19
|
+
interpolate: (tag, input, from, to) => currentHost().motionInterpolate(tag, input, from, to),
|
|
20
|
+
dispose: (tag) => currentHost().motionDispose(tag),
|
|
21
|
+
};
|
|
22
|
+
/** @internal `useHost` installs it: motion values made from then on live in the host. */
|
|
23
|
+
export function useNativeMotion() {
|
|
24
|
+
setMotionDriver(nativeDriver);
|
|
25
|
+
}
|
|
26
|
+
const PROPS = {
|
|
27
|
+
opacity: 0,
|
|
28
|
+
translateX: 1,
|
|
29
|
+
translateY: 2,
|
|
30
|
+
scale: 3,
|
|
31
|
+
visible: 4,
|
|
32
|
+
};
|
|
33
|
+
const KEYS = [
|
|
34
|
+
"opacity",
|
|
35
|
+
"translateX",
|
|
36
|
+
"translateY",
|
|
37
|
+
"scale",
|
|
38
|
+
"visible",
|
|
39
|
+
];
|
|
40
|
+
/** Wire `style` to the view `viewTag`; call once the view is committed. */
|
|
41
|
+
export function bindMotion(viewTag, style) {
|
|
42
|
+
for (const key of KEYS) {
|
|
43
|
+
const node = style[key];
|
|
44
|
+
if (node)
|
|
45
|
+
currentHost().motionBind(viewTag, PROPS[key], node.tag);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/** Feed `value` from the scroll offset of the scroll view `scrollViewTag`. */
|
|
49
|
+
export function bindScrollY(scrollViewTag, value) {
|
|
50
|
+
currentHost().motionBindScroll(scrollViewTag, value.tag);
|
|
51
|
+
}
|
|
52
|
+
/** Read a `motion=${…}` attribute value, as aurora reads it on the web. */
|
|
53
|
+
export function readMotion(value) {
|
|
54
|
+
try {
|
|
55
|
+
return readMotionStyle(value);
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
// Matched by code, not by class: the code is aurora's contract, and it
|
|
59
|
+
// holds whichever aurora release the app resolves.
|
|
60
|
+
if (error instanceof Error &&
|
|
61
|
+
Reflect.get(error, "code") === "E_AURORA_INVALID_MOTION") {
|
|
62
|
+
throw new E_ORBIT_INVALID_MOTION([error.message], { cause: error });
|
|
63
|
+
}
|
|
64
|
+
throw error;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=motion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motion.js","sourceRoot":"","s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,CAAC;QACrE,CAAC;QACD,MAAM,KAAK,CAAC;IACb,CAAC;AACF,CAAC"}
|
package/dist/node.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tree orbit keeps in JS: one node per native element, with the props
|
|
3
|
+
* the host lays out and draws. Signals write props straight into it; a commit
|
|
4
|
+
* sends only what changed (see `commit.ts`).
|
|
5
|
+
*/
|
|
6
|
+
export type Style = {
|
|
7
|
+
[key: string]: string | number;
|
|
8
|
+
};
|
|
9
|
+
export type Props = {
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
};
|
|
12
|
+
export type Handler = (type: string, payload: unknown) => void;
|
|
13
|
+
type Value<T> = T | (() => T);
|
|
14
|
+
/** Style as the host reads it: flattened, colours as ARGB integers. */
|
|
15
|
+
export declare function flatten(style: Style): Props;
|
|
16
|
+
export declare function setDirtyListener(listener: () => void): void;
|
|
17
|
+
/** A run of children that a reactive slot replaces wholesale. */
|
|
18
|
+
export declare class Region {
|
|
19
|
+
parent: NativeNode | null;
|
|
20
|
+
items: Child[];
|
|
21
|
+
set(items: Child[]): void;
|
|
22
|
+
}
|
|
23
|
+
export type Child = NativeNode | Region;
|
|
24
|
+
export declare class NativeNode {
|
|
25
|
+
readonly viewName: string;
|
|
26
|
+
props: Props;
|
|
27
|
+
readonly children: Child[];
|
|
28
|
+
readonly tag: number;
|
|
29
|
+
parent: NativeNode | null;
|
|
30
|
+
/** Props changed since the last commit, or null. */
|
|
31
|
+
pendingProps: Props | null;
|
|
32
|
+
/** Something below this node changed since the last commit. */
|
|
33
|
+
childrenDirty: boolean;
|
|
34
|
+
onEvent: Handler | null;
|
|
35
|
+
/** An image's bytes, sent to the host's memory with the next commit. */
|
|
36
|
+
pendingBytes: Uint8Array | null;
|
|
37
|
+
/** A scroll view's offset readers (dp), told on each native scroll. */
|
|
38
|
+
readonly scrollListeners: Array<(y: number) => void>;
|
|
39
|
+
constructor(viewName: string, props: Props, children: Child[]);
|
|
40
|
+
flatChildren(): NativeNode[];
|
|
41
|
+
setProps(patch: Props): void;
|
|
42
|
+
}
|
|
43
|
+
/** Raw text content, static or signal-backed: the effect patches only `text`. */
|
|
44
|
+
export declare function rawText(content: Value<string>): NativeNode;
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AAEH,MAAM,MAAM,KAAK,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AACvD,MAAM,MAAM,KAAK,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC;AAC/C,MAAM,MAAM,OAAO,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;AAC/D,KAAK,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AAmB9B,uEAAuE;AACvE,wBAAgB,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAS3C;AAKD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAE3D;AAQD,iEAAiE;AACjE,qBAAa,MAAM;IAClB,MAAM,EAAE,UAAU,GAAG,IAAI,CAAQ;IACjC,KAAK,EAAE,KAAK,EAAE,CAAM;IAEpB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI;CAKzB;AAED,MAAM,MAAM,KAAK,GAAG,UAAU,GAAG,MAAM,CAAC;AAmBxC,qBAAa,UAAU;IAcrB,QAAQ,CAAC,QAAQ,EAAE,MAAM;IAClB,KAAK,EAAE,KAAK;IACnB,QAAQ,CAAC,QAAQ,EAAE,KAAK,EAAE;IAf3B,QAAQ,CAAC,GAAG,SAAiB;IAC7B,MAAM,EAAE,UAAU,GAAG,IAAI,CAAQ;IACjC,oDAAoD;IACpD,YAAY,EAAE,KAAK,GAAG,IAAI,CAAQ;IAClC,+DAA+D;IAC/D,aAAa,UAAS;IACtB,OAAO,EAAE,OAAO,GAAG,IAAI,CAAQ;IAC/B,wEAAwE;IACxE,YAAY,EAAE,UAAU,GAAG,IAAI,CAAQ;IACvC,uEAAuE;IACvE,QAAQ,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC,CAAM;gBAGhD,QAAQ,EAAE,MAAM,EAClB,KAAK,EAAE,KAAK,EACV,QAAQ,EAAE,KAAK,EAAE;IAK3B,YAAY,IAAI,UAAU,EAAE;IAI5B,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;CAO5B;AAED,iFAAiF;AACjF,wBAAgB,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,UAAU,CAU1D"}
|
package/dist/node.js
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { effect } from "@c9up/aurora/core";
|
|
2
|
+
import { colorToArgb } from "./color.js";
|
|
3
|
+
const COLOR_KEYS = new Set([
|
|
4
|
+
"backgroundColor",
|
|
5
|
+
"color",
|
|
6
|
+
"borderColor",
|
|
7
|
+
"shadowColor",
|
|
8
|
+
"placeholderColor",
|
|
9
|
+
]);
|
|
10
|
+
// Tags the host keys its views by. Even numbers from 2^30, out of the way of
|
|
11
|
+
// anything else that might share a surface.
|
|
12
|
+
let nextTag = 1 << 30;
|
|
13
|
+
function allocateTag() {
|
|
14
|
+
nextTag += 2;
|
|
15
|
+
return nextTag;
|
|
16
|
+
}
|
|
17
|
+
/** Style as the host reads it: flattened, colours as ARGB integers. */
|
|
18
|
+
export function flatten(style) {
|
|
19
|
+
const out = {};
|
|
20
|
+
for (const [key, value] of Object.entries(style)) {
|
|
21
|
+
out[key] =
|
|
22
|
+
COLOR_KEYS.has(key) && typeof value === "string"
|
|
23
|
+
? colorToArgb(value)
|
|
24
|
+
: value;
|
|
25
|
+
}
|
|
26
|
+
return out;
|
|
27
|
+
}
|
|
28
|
+
/** Called whenever a node below `from` changed: the commit walks this path. */
|
|
29
|
+
let onDirty = () => { };
|
|
30
|
+
export function setDirtyListener(listener) {
|
|
31
|
+
onDirty = listener;
|
|
32
|
+
}
|
|
33
|
+
function markChildrenDirty(from) {
|
|
34
|
+
for (let p = from; p && !p.childrenDirty; p = p.parent)
|
|
35
|
+
p.childrenDirty = true;
|
|
36
|
+
onDirty();
|
|
37
|
+
}
|
|
38
|
+
/** A run of children that a reactive slot replaces wholesale. */
|
|
39
|
+
export class Region {
|
|
40
|
+
parent = null;
|
|
41
|
+
items = [];
|
|
42
|
+
set(items) {
|
|
43
|
+
this.items = items;
|
|
44
|
+
for (const item of items)
|
|
45
|
+
adopt(item, this.parent);
|
|
46
|
+
markChildrenDirty(this.parent);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function adopt(child, parent) {
|
|
50
|
+
child.parent = parent;
|
|
51
|
+
if (child instanceof Region)
|
|
52
|
+
for (const item of child.items)
|
|
53
|
+
adopt(item, parent);
|
|
54
|
+
}
|
|
55
|
+
function flattenInto(children, out) {
|
|
56
|
+
for (const child of children) {
|
|
57
|
+
if (child instanceof Region)
|
|
58
|
+
flattenInto(child.items, out);
|
|
59
|
+
else
|
|
60
|
+
out.push(child);
|
|
61
|
+
}
|
|
62
|
+
return out;
|
|
63
|
+
}
|
|
64
|
+
export class NativeNode {
|
|
65
|
+
viewName;
|
|
66
|
+
props;
|
|
67
|
+
children;
|
|
68
|
+
tag = allocateTag();
|
|
69
|
+
parent = null;
|
|
70
|
+
/** Props changed since the last commit, or null. */
|
|
71
|
+
pendingProps = null;
|
|
72
|
+
/** Something below this node changed since the last commit. */
|
|
73
|
+
childrenDirty = false;
|
|
74
|
+
onEvent = null;
|
|
75
|
+
/** An image's bytes, sent to the host's memory with the next commit. */
|
|
76
|
+
pendingBytes = null;
|
|
77
|
+
/** A scroll view's offset readers (dp), told on each native scroll. */
|
|
78
|
+
scrollListeners = [];
|
|
79
|
+
constructor(viewName, props, children) {
|
|
80
|
+
this.viewName = viewName;
|
|
81
|
+
this.props = props;
|
|
82
|
+
this.children = children;
|
|
83
|
+
for (const child of children)
|
|
84
|
+
adopt(child, this);
|
|
85
|
+
}
|
|
86
|
+
flatChildren() {
|
|
87
|
+
return flattenInto(this.children, []);
|
|
88
|
+
}
|
|
89
|
+
setProps(patch) {
|
|
90
|
+
Object.assign(this.props, patch);
|
|
91
|
+
this.pendingProps = this.pendingProps
|
|
92
|
+
? Object.assign(this.pendingProps, patch)
|
|
93
|
+
: { ...patch };
|
|
94
|
+
markChildrenDirty(this.parent);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/** Raw text content, static or signal-backed: the effect patches only `text`. */
|
|
98
|
+
export function rawText(content) {
|
|
99
|
+
const raw = new NativeNode("RCTRawText", { text: "" }, []);
|
|
100
|
+
if (typeof content === "function") {
|
|
101
|
+
effect(() => raw.setProps({ text: content() }));
|
|
102
|
+
// The first run is the initial content, not a change to send.
|
|
103
|
+
raw.pendingProps = null;
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
raw.props.text = content;
|
|
107
|
+
}
|
|
108
|
+
return raw;
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=node.js.map
|
package/dist/node.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.js","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAazC,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC;IAC1B,iBAAiB;IACjB,OAAO;IACP,aAAa;IACb,aAAa;IACb,kBAAkB;CAClB,CAAC,CAAC;AAEH,6EAA6E;AAC7E,4CAA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AC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACjC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY;YACpC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC;YACzC,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC;QAChB,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;CACD;AAED,iFAAiF;AACjF,MAAM,UAAU,OAAO,CAAC,OAAsB;IAC7C,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAC3D,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE,CAAC;QACnC,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;QAChD,8DAA8D;QAC9D,GAAG,CAAC,YAAY,GAAG,IAAI,CAAC;IACzB,CAAC;SAAM,CAAC;QACP,GAAG,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC;IAC1B,CAAC;IACD,OAAO,GAAG,CAAC;AACZ,CAAC"}
|
package/dist/pages.d.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@c9up/orbit/pages` — pages the ream server drives, on the phone.
|
|
3
|
+
*
|
|
4
|
+
* The server stays the router: a link or a visit asks it for the next page
|
|
5
|
+
* object (photon's protocol, the one the browser speaks after `visits: true`)
|
|
6
|
+
* and the app shows the page it names — an aurora component bundled with the
|
|
7
|
+
* app — as a screen of a stack. The same controller answers the browser and
|
|
8
|
+
* the phone.
|
|
9
|
+
*
|
|
10
|
+
* run(() => html`${serverPages({
|
|
11
|
+
* server: 'https://app.example',
|
|
12
|
+
* pages: { Home, Orders, Order },
|
|
13
|
+
* })}`)
|
|
14
|
+
*
|
|
15
|
+
* photon's router does the protocol — visits, partial reloads, deferred
|
|
16
|
+
* props, the version check, history — and this is where it runs: requests to
|
|
17
|
+
* the server, a back stack in memory mirrored by the screens, the back button
|
|
18
|
+
* going through photon's history. A covered page keeps its state; going back
|
|
19
|
+
* shows it as it was, without a request.
|
|
20
|
+
*/
|
|
21
|
+
import type { TemplateResult } from "@c9up/aurora/renderer";
|
|
22
|
+
import { type ServerConnection } from "./server.js";
|
|
23
|
+
import { type Stack, type StackOptions } from "./stack.js";
|
|
24
|
+
/**
|
|
25
|
+
* A page: an aurora component taking the page object's props. Declared as a
|
|
26
|
+
* method so a page typed with its own props (`{ orders: Order[] }`) is one.
|
|
27
|
+
*/
|
|
28
|
+
type PageFunction = {
|
|
29
|
+
page(props: Record<string, unknown>): TemplateResult;
|
|
30
|
+
}["page"];
|
|
31
|
+
export interface ServerPagesOptions {
|
|
32
|
+
/**
|
|
33
|
+
* The ream server: its origin (https, or http to this machine through
|
|
34
|
+
* `adb reverse` or to the emulator's host `10.0.2.2`), or the connection
|
|
35
|
+
* `connectServer` made — the one comet and relay go through too.
|
|
36
|
+
*/
|
|
37
|
+
server: string | ServerConnection;
|
|
38
|
+
/** The pages the server may name, by the name it renders them under. */
|
|
39
|
+
pages: {
|
|
40
|
+
[name: string]: PageFunction;
|
|
41
|
+
};
|
|
42
|
+
/** The first page's path. Default `/`. */
|
|
43
|
+
url?: string;
|
|
44
|
+
/** How screens change (`transition`, `duration`, `background`). */
|
|
45
|
+
stack?: Omit<StackOptions, "back">;
|
|
46
|
+
/** Shown until the first page has arrived. */
|
|
47
|
+
loading?: () => TemplateResult;
|
|
48
|
+
/** Shown when the server could not give a page; `retry` asks again. */
|
|
49
|
+
failed?: (error: unknown, retry: () => void) => TemplateResult;
|
|
50
|
+
/** A link off the server (another site, `mailto:`): the platform opens it. */
|
|
51
|
+
open?: (url: string) => void;
|
|
52
|
+
}
|
|
53
|
+
/** The stack the server's pages are shown in; put it in a template. */
|
|
54
|
+
export declare function serverPages(options: ServerPagesOptions): Stack;
|
|
55
|
+
export {};
|
|
56
|
+
//# sourceMappingURL=pages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../src/pages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAQ5D,OAAO,EAAiB,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EAAe,KAAK,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAGxE;;;GAGG;AACH,KAAK,YAAY,GAAG;IACnB,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,cAAc,CAAC;CACrD,CAAC,MAAM,CAAC,CAAC;AAEV,MAAM,WAAW,kBAAkB;IAClC;;;;OAIG;IACH,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAAC;IAClC,wEAAwE;IACxE,KAAK,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAAA;KAAE,CAAC;IACxC,0CAA0C;IAC1C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,KAAK,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IACnC,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,cAAc,CAAC;IAC/B,uEAAuE;IACvE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,KAAK,cAAc,CAAC;IAC/D,8EAA8E;IAC9E,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7B;AAoBD,uEAAuE;AACvE,wBAAgB,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,KAAK,CA4H9D"}
|