@tarve/core 0.4.0 → 0.6.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/CHANGELOG.md +126 -1
- package/README.md +121 -12
- package/dist/npm/build.js +1401 -85
- package/dist/npm/cli.js +1940 -117
- package/dist/npm/embedded-assets.js +22 -3
- package/dist/npm/index.js +5274 -975
- package/dist/npm/jsx-dev-runtime.js +1268 -0
- package/dist/npm/jsx-runtime.js +1268 -0
- package/dist/npm/native-runtime.json +3 -3
- package/dist/npm/node-build.js +1159 -0
- package/dist/npm/protocol.js +1 -1
- package/dist/npm/runtime.js +5 -5
- package/dist/npm/txiki/fetch.ts +228 -0
- package/dist/npm/txiki/intl-data.ts +7 -0
- package/dist/npm/txiki/intl.test.ts +53 -0
- package/dist/npm/txiki/intl.ts +249 -0
- package/dist/npm/txiki/prelude.ts +132 -0
- package/dist/npm/txiki/runtime.ts +6 -0
- package/dist/npm/txiki/shims/buffer.ts +112 -0
- package/dist/npm/txiki/shims/child-process.ts +151 -0
- package/dist/npm/txiki/shims/crypto.ts +30 -0
- package/dist/npm/txiki/shims/events.ts +75 -0
- package/dist/npm/txiki/shims/fs-promises.ts +77 -0
- package/dist/npm/txiki/shims/fs.ts +231 -0
- package/dist/npm/txiki/shims/module.ts +8 -0
- package/dist/npm/txiki/shims/net.ts +69 -0
- package/dist/npm/txiki/shims/os.ts +72 -0
- package/dist/npm/txiki/shims/path.ts +4 -0
- package/dist/npm/txiki/shims/timers-promises.ts +9 -0
- package/dist/npm/txiki/shims/zlib.ts +9 -0
- package/dist/npm/txiki/tjs.d.ts +58 -0
- package/dist/npm/txiki/unavailable.ts +10 -0
- package/dist/types/core/build.d.ts +24 -0
- package/dist/types/core/cli.d.ts +1 -1
- package/dist/types/core/esbuild-file-imports.d.ts +8 -0
- package/dist/types/core/jsx-compile.d.ts +7 -0
- package/dist/types/core/node-build.d.ts +7 -0
- package/dist/types/core/node-dev.d.ts +4 -0
- package/dist/types/core/node-target.d.ts +10 -0
- package/dist/types/core/package-metadata.d.ts +49 -0
- package/dist/types/core/runtime-select.d.ts +8 -0
- package/dist/types/core/src/advanced-controls.d.ts +1 -1
- package/dist/types/core/src/app/element-events.d.ts +18 -0
- package/dist/types/core/src/app/media.d.ts +15 -0
- package/dist/types/core/src/app/requests.d.ts +25 -0
- package/dist/types/core/src/app/shadow.d.ts +7 -0
- package/dist/types/core/src/app/stats.d.ts +12 -0
- package/dist/types/core/src/app/tray.d.ts +40 -0
- package/dist/types/core/src/app-metadata.d.ts +18 -0
- package/dist/types/core/src/app.d.ts +89 -2
- package/dist/types/core/src/assets.d.ts +4 -0
- package/dist/types/core/src/bridge/binding.d.ts +10 -34
- package/dist/types/core/src/bridge/index.d.ts +1 -1
- package/dist/types/core/src/canvas.d.ts +161 -0
- package/dist/types/core/src/chat-controls.d.ts +2 -1
- package/dist/types/core/src/components/button.d.ts +1 -1
- package/dist/types/core/src/components/glass.d.ts +52 -0
- package/dist/types/core/src/components/icon.d.ts +1 -1
- package/dist/types/core/src/components/image.d.ts +8 -4
- package/dist/types/core/src/components/layout.d.ts +5 -4
- package/dist/types/core/src/components/pressable.d.ts +3 -3
- package/dist/types/core/src/components/rich-content.d.ts +1 -1
- package/dist/types/core/src/components/scroll.d.ts +2 -2
- package/dist/types/core/src/components/svg.d.ts +1 -1
- package/dist/types/core/src/components/titlebar.d.ts +15 -1
- package/dist/types/core/src/components/window.d.ts +21 -1
- package/dist/types/core/src/components.d.ts +2 -0
- package/dist/types/core/src/css-shadow.d.ts +1 -1
- package/dist/types/core/src/desktop-controls.d.ts +2 -2
- package/dist/types/core/src/embedded-assets.d.ts +3 -2
- package/dist/types/core/src/extra-controls.d.ts +2 -2
- package/dist/types/core/src/form-controls.d.ts +1 -1
- package/dist/types/core/src/html-elements.d.ts +26 -0
- package/dist/types/core/src/index.d.ts +23 -11
- package/dist/types/core/src/inline-text.d.ts +25 -0
- package/dist/types/core/src/intrinsic-style.d.ts +1 -1
- package/dist/types/core/src/jsx-runtime.d.ts +182 -5
- package/dist/types/core/src/media-element.d.ts +70 -0
- package/dist/types/core/src/memo.d.ts +28 -0
- package/dist/types/core/src/motion.d.ts +1 -1
- package/dist/types/core/src/png.d.ts +29 -0
- package/dist/types/core/src/popups.d.ts +4 -3
- package/dist/types/core/src/protocol.d.ts +6 -0
- package/dist/types/core/src/reconciler/diff.d.ts +11 -0
- package/dist/types/core/src/reconciler/intrinsics.d.ts +24 -0
- package/dist/types/core/src/reconciler.d.ts +33 -10
- package/dist/types/core/src/render-scope.d.ts +8 -0
- package/dist/types/core/src/style.d.ts +1 -1
- package/dist/types/core/src/tailwind-palette.d.ts +1 -0
- package/dist/types/core/src/tailwind.d.ts +8 -0
- package/dist/types/core/src/test-renderer.d.ts +3 -1
- package/dist/types/core/src/text-search.d.ts +1 -1
- package/dist/types/core/src/theme.d.ts +10 -2
- package/dist/types/core/src/updates.d.ts +87 -0
- package/dist/types/core/src/virtual-list.d.ts +8 -2
- package/dist/types/core/txiki/fetch.d.ts +1 -0
- package/dist/types/core/txiki/intl-data.d.ts +6 -0
- package/dist/types/core/txiki/intl.d.ts +92 -0
- package/dist/types/core/txiki/prelude.d.ts +1 -0
- package/dist/types/core/txiki/runtime.d.ts +2 -0
- package/dist/types/core/txiki/shims/buffer.d.ts +37 -0
- package/dist/types/core/txiki/shims/child-process.d.ts +46 -0
- package/dist/types/core/txiki/shims/crypto.d.ts +16 -0
- package/dist/types/core/txiki/shims/events.d.ts +21 -0
- package/dist/types/core/txiki/shims/fs-promises.d.ts +41 -0
- package/dist/types/core/txiki/shims/fs.d.ts +44 -0
- package/dist/types/core/txiki/shims/module.d.ts +5 -0
- package/dist/types/core/txiki/shims/net.d.ts +22 -0
- package/dist/types/core/txiki/shims/os.d.ts +52 -0
- package/dist/types/core/txiki/shims/path.d.ts +3 -0
- package/dist/types/core/txiki/shims/timers-promises.d.ts +7 -0
- package/dist/types/core/txiki/shims/zlib.d.ts +11 -0
- package/dist/types/core/txiki/unavailable.d.ts +5 -0
- package/dist/types/core/txiki-build.d.ts +23 -0
- package/dist/types/core/updates-build.d.ts +35 -0
- package/dist/types/core/windows-executable.d.ts +16 -0
- package/dist/types/protocol/src/index.d.ts +344 -11
- package/native/linux-x64/libtarve_native.so +0 -0
- package/native/linux-x64/runtime.json +4 -4
- package/native/win32-x64/runtime.json +4 -4
- package/native/win32-x64/tarve_native.dll +0 -0
- package/package.json +13 -3
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { GlassMaterial, Style } from "../protocol";
|
|
2
|
+
import type { VNode } from "../jsx-runtime";
|
|
3
|
+
import { type ViewProps } from "./layout";
|
|
4
|
+
export type GlassVariant = "regular" | "clear" | "tinted";
|
|
5
|
+
export interface GlassProps extends ViewProps {
|
|
6
|
+
/**
|
|
7
|
+
* `regular`: frosted, legible over anything (toolbars, tab bars). `clear`: barely
|
|
8
|
+
* tinted, for controls over media. `tinted`: `tint` shows through strongly.
|
|
9
|
+
*/
|
|
10
|
+
variant?: GlassVariant;
|
|
11
|
+
/**
|
|
12
|
+
* Tint colour laid over the variant's veil; the alpha is the strength. `regular` stays
|
|
13
|
+
* frosted under it, `clear` shows it nearly alone. A gradient string passes through as is.
|
|
14
|
+
*/
|
|
15
|
+
tint?: string;
|
|
16
|
+
/** Light or dark appearance of the rim and veil. Default `light`. */
|
|
17
|
+
appearance?: "light" | "dark";
|
|
18
|
+
/** Corner radius. Default 26 (a capsule when the box is 52 px tall). */
|
|
19
|
+
radius?: number;
|
|
20
|
+
/** Overrides of the material: blur, saturate, refraction, highlight. */
|
|
21
|
+
material?: Partial<GlassMaterial>;
|
|
22
|
+
/** Outer shadow under the glass. Default on. */
|
|
23
|
+
shadow?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Glass boxes with the same key fuse like drops of liquid: where two come within
|
|
26
|
+
* `blend` px of each other their shapes bridge smoothly, as one surface. The first
|
|
27
|
+
* box of the key in tree order paints the surface: its tint, material and `blend`
|
|
28
|
+
* are the surface's, the others contribute only their shape (up to 8 per key).
|
|
29
|
+
*/
|
|
30
|
+
merge?: string;
|
|
31
|
+
/** How far apart in px two merged boxes start bridging; read from the first box of the key. Default 32. */
|
|
32
|
+
blend?: number;
|
|
33
|
+
}
|
|
34
|
+
/** `top` composited over `bottom` (source-over); `top` unchanged when either is not a hex colour. */
|
|
35
|
+
export declare function over(top: string, bottom: string): string;
|
|
36
|
+
/** The rim, inner light and drop shadow of iOS 26 glass, for a given radius and appearance. */
|
|
37
|
+
export declare function glassChrome(appearance: "light" | "dark", shadow: boolean): Style;
|
|
38
|
+
/** The complete style of a glass surface: veil, material, radius and chrome. */
|
|
39
|
+
export declare function glassSurface(variant: GlassVariant, appearance: "light" | "dark", options?: {
|
|
40
|
+
tint?: string;
|
|
41
|
+
radius?: number;
|
|
42
|
+
material?: Partial<GlassMaterial>;
|
|
43
|
+
shadow?: boolean;
|
|
44
|
+
merge?: string;
|
|
45
|
+
blend?: number;
|
|
46
|
+
}): Style;
|
|
47
|
+
/**
|
|
48
|
+
* A container made of Liquid Glass: what scrolls behind it shows through blurred,
|
|
49
|
+
* bent at the rounded edge, under a light veil, with a bright rim. Compose like a
|
|
50
|
+
* `View`; controls inside keep their own look.
|
|
51
|
+
*/
|
|
52
|
+
export declare function Glass({ variant, tint, appearance, radius, material, shadow, merge, blend, style, ...props }: GlassProps): VNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type BaseProps, type VNode } from "../jsx-runtime";
|
|
2
2
|
import { type SvgNode } from "./svg";
|
|
3
|
-
export type IconName = "check" | "x" | "plus" | "minus" | "chevron-down" | "chevron-up" | "chevron-right" | "chevron-left" | "search" | "info" | "house" | "settings" | "user" | "bell" | "heart" | "star" | "download" | "trash-2" | "folder" | "mail";
|
|
3
|
+
export type IconName = "check" | "x" | "plus" | "minus" | "chevron-down" | "chevron-up" | "chevron-right" | "chevron-left" | "search" | "info" | "house" | "settings" | "user" | "bell" | "heart" | "star" | "download" | "trash-2" | "folder" | "mail" | "play" | "pause" | "skip-back" | "skip-forward";
|
|
4
4
|
export interface IconProps extends BaseProps {
|
|
5
5
|
name?: IconName;
|
|
6
6
|
iconNode?: readonly SvgNode[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NativeImageSource } from "
|
|
1
|
+
import type { NativeImageSource } from "../protocol";
|
|
2
2
|
import { type BaseProps, type VNode } from "../jsx-runtime";
|
|
3
3
|
export interface ImageBytesSource {
|
|
4
4
|
/** Encoded PNG, JPEG, WebP or SVG bytes. */
|
|
@@ -17,11 +17,16 @@ export interface ImageRgbaSource {
|
|
|
17
17
|
}
|
|
18
18
|
export type ImageSource = string | Uint8Array | ImageBytesSource | ImageRgbaSource;
|
|
19
19
|
export interface ImageProps extends BaseProps {
|
|
20
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Local path, `http(s)://` URL, data URL, encoded bytes, or raw RGBA8 pixels.
|
|
22
|
+
* A URL is fetched and decoded natively, off the UI thread, the first time the
|
|
23
|
+
* image is on screen (like `loading="lazy"`); until then it shows its placeholder.
|
|
24
|
+
*/
|
|
21
25
|
src: ImageSource;
|
|
22
26
|
width?: number;
|
|
23
27
|
height?: number;
|
|
24
|
-
|
|
28
|
+
/** CSS `object-fit`. */
|
|
29
|
+
fit?: "cover" | "contain" | "fill";
|
|
25
30
|
}
|
|
26
31
|
export type ImageHttpCacheMode = "default" | "reload" | "no-store";
|
|
27
32
|
export interface LoadImageSourceOptions {
|
|
@@ -35,7 +40,6 @@ export type SerializedImageSource = {
|
|
|
35
40
|
} | {
|
|
36
41
|
image: NativeImageSource;
|
|
37
42
|
};
|
|
38
|
-
/** Protocol normalization shared by Image and intrinsic img reconciliation. */
|
|
39
43
|
export declare function serializeImageSource(source: ImageSource): SerializedImageSource;
|
|
40
44
|
/** Fetch an HTTP(S) image with AbortSignal support and a bounded 64 MiB in-process LRU. */
|
|
41
45
|
export declare function loadImageSource(url: string | URL, options?: LoadImageSourceOptions): Promise<ImageBytesSource>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type { Style } from "
|
|
2
|
-
import { type BaseProps, type VNode } from "../jsx-runtime";
|
|
3
|
-
export interface ViewProps extends BaseProps {
|
|
1
|
+
import type { Style } from "../protocol";
|
|
2
|
+
import { type BaseProps, type DropTargetProps, type VNode } from "../jsx-runtime";
|
|
3
|
+
export interface ViewProps extends BaseProps, DropTargetProps {
|
|
4
4
|
gap?: number;
|
|
5
5
|
padding?: Style["padding"];
|
|
6
|
-
flex
|
|
6
|
+
/** CSS `flex`: `1` is `1 1 0`; strings take any CSS value, e.g. `"1 1 176px"`. */
|
|
7
|
+
flex?: number | string;
|
|
7
8
|
align?: Style["align"];
|
|
8
9
|
justify?: Style["justify"];
|
|
9
10
|
portal?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Control } from "
|
|
2
|
-
import type { VNode } from "../jsx-runtime";
|
|
1
|
+
import type { Control } from "../protocol";
|
|
2
|
+
import type { DraggableProps, VNode } from "../jsx-runtime";
|
|
3
3
|
import { type ViewProps } from "./layout";
|
|
4
|
-
export interface PressableProps extends ViewProps {
|
|
4
|
+
export interface PressableProps extends ViewProps, DraggableProps {
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
onClick?: () => void;
|
|
7
7
|
onContextMenu?: (position: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type BaseProps, type VNode } from "../jsx-runtime";
|
|
2
|
-
import type { SyntaxTheme } from "
|
|
2
|
+
import type { SyntaxTheme } from "../protocol";
|
|
3
3
|
interface RichProps extends Omit<BaseProps, "children"> {
|
|
4
4
|
/** Overrides syntax colours without changing parsing or layout. */
|
|
5
5
|
syntaxTheme?: Partial<SyntaxTheme>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { VNode } from "../jsx-runtime";
|
|
2
|
-
import type { ScrollOrientation, ScrollPosition } from "
|
|
2
|
+
import type { ScrollInfo, ScrollOrientation, ScrollPosition } from "../protocol";
|
|
3
3
|
import { type ViewProps } from "./layout";
|
|
4
4
|
export interface ScrollProps extends ViewProps {
|
|
5
5
|
speed?: number;
|
|
6
6
|
orientation?: ScrollOrientation;
|
|
7
|
-
onScroll?: (offset: number, max: number) => void;
|
|
7
|
+
onScroll?: (offset: number, max: number, info: ScrollInfo) => void;
|
|
8
8
|
onScrollPosition?: (position: ScrollPosition) => void;
|
|
9
9
|
}
|
|
10
10
|
export declare function Scroll({ speed, orientation, ...props }: ScrollProps): VNode;
|
|
@@ -1,10 +1,24 @@
|
|
|
1
|
+
import type { Style } from "../protocol";
|
|
1
2
|
import { type VNode } from "../jsx-runtime";
|
|
2
3
|
import { type ViewProps } from "./layout";
|
|
4
|
+
import { type GlassVariant } from "./glass";
|
|
3
5
|
export interface TitleBarProps extends ViewProps {
|
|
4
6
|
title?: string;
|
|
5
7
|
height?: number;
|
|
6
8
|
showMinimize?: boolean;
|
|
7
9
|
showMaximize?: boolean;
|
|
8
10
|
showClose?: boolean;
|
|
11
|
+
/** Style merged into each window control (minimize, maximize, close): size, radius, colours. */
|
|
12
|
+
buttonStyle?: Style;
|
|
13
|
+
/**
|
|
14
|
+
* Liquid Glass bar: `true` for the `regular` material, or a variant. Its controls go
|
|
15
|
+
* round. Edge to edge (no `radius` in `style`) it keeps only a hairline along its bottom;
|
|
16
|
+
* with a `radius` it is a floating capsule with the full rim and shadow. Lay it over
|
|
17
|
+
* content (`position: "absolute"`) for the backdrop to show through, as the window
|
|
18
|
+
* background alone is only the veil.
|
|
19
|
+
*/
|
|
20
|
+
glass?: boolean | GlassVariant;
|
|
21
|
+
/** Light or dark glass; sets the ink of the title and controls. Default `light`. */
|
|
22
|
+
appearance?: "light" | "dark";
|
|
9
23
|
}
|
|
10
|
-
export declare function TitleBar({ title, height, showMinimize, showMaximize, showClose, children, style, ...props }: TitleBarProps): VNode;
|
|
24
|
+
export declare function TitleBar({ title, height, showMinimize, showMaximize, showClose, buttonStyle, glass, appearance, children, style, ...props }: TitleBarProps): VNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { WindowPosition } from "
|
|
1
|
+
import type { DesktopWidget, WindowLevel, WindowPosition } from "../protocol";
|
|
2
2
|
import type { VNode } from "../jsx-runtime";
|
|
3
3
|
import { type ThemeDefinition } from "../theme";
|
|
4
4
|
import { type ViewProps } from "./layout";
|
|
@@ -10,6 +10,26 @@ export interface WindowProps extends ViewProps {
|
|
|
10
10
|
minHeight?: number;
|
|
11
11
|
resizable?: boolean;
|
|
12
12
|
position?: WindowPosition;
|
|
13
|
+
/**
|
|
14
|
+
* Stacking order; `alwaysOnBottom` keeps the window under every other one, even
|
|
15
|
+
* when clicked or shown. Can change while the app runs.
|
|
16
|
+
*/
|
|
17
|
+
level?: WindowLevel;
|
|
18
|
+
/** Keep the window off the taskbar and out of Alt+Tab (Windows) or the task switcher and pager (Linux, X11). */
|
|
19
|
+
skipTaskbar?: boolean;
|
|
20
|
+
/** No native frame or title bar, without needing a `TitleBar`. Pair with a `dragRegion` to move it. */
|
|
21
|
+
frameless?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Make the window a desktop widget, `columns` × `rows` cells: frameless, below
|
|
24
|
+
* every window (unless `level` says otherwise) and off the taskbar.
|
|
25
|
+
* Windows: sized to the desktop icon grid; when dragged (give it a
|
|
26
|
+
* `dragRegion`) it drops into the nearest cells free of icons, and icons that
|
|
27
|
+
* land under it are moved out.
|
|
28
|
+
* Linux (X11; XWayland on a Wayland session): cells of a typical icon,
|
|
29
|
+
* 80 × 100, on every workspace; no icon grid to follow.
|
|
30
|
+
* `width`/`height` are ignored; `position` is where it first looks for room.
|
|
31
|
+
*/
|
|
32
|
+
desktopWidget?: DesktopWidget;
|
|
13
33
|
theme?: ThemeDefinition;
|
|
14
34
|
onCloseRequest?: (event: WindowCloseRequestEvent) => void;
|
|
15
35
|
}
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export { View, Row, Column, Portal } from "./components/layout";
|
|
8
8
|
export type { ViewProps, PortalProps } from "./components/layout";
|
|
9
|
+
export { Glass, glassChrome, glassSurface, over } from "./components/glass";
|
|
10
|
+
export type { GlassProps, GlassVariant } from "./components/glass";
|
|
9
11
|
export { Window } from "./components/window";
|
|
10
12
|
export type { WindowProps, WindowCloseRequestEvent } from "./components/window";
|
|
11
13
|
export { Pressable } from "./components/pressable";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BoxShadow, Gradient, TextShadow, Transform } from "
|
|
1
|
+
import type { BoxShadow, Gradient, TextShadow, Transform } from "./protocol";
|
|
2
2
|
/**
|
|
3
3
|
* CSS colour → "#rrggbbaa". Hex, rgb()/rgba(), hsl()/hsla() and a few names are
|
|
4
4
|
* converted; theme tokens (`var(--…)`) pass through for theme resolution.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Style } from "
|
|
1
|
+
import type { ScrollInfo, Style } from "./protocol";
|
|
2
2
|
import { type BaseProps, type Child, type VNode } from "./jsx-runtime";
|
|
3
3
|
import { type IconName } from "./components";
|
|
4
4
|
export interface TreeNode<T = unknown> {
|
|
@@ -56,7 +56,7 @@ export interface DataGridProps<T> extends BaseProps {
|
|
|
56
56
|
onSortChange?: (sort: DataGridSort | undefined) => void;
|
|
57
57
|
onSelectionChange?: (keys: DataGridKey[]) => void;
|
|
58
58
|
onRowActivate?: (row: T, index: number) => void;
|
|
59
|
-
onScroll?: (offset: number, max: number) => void;
|
|
59
|
+
onScroll?: (offset: number, max: number, info: ScrollInfo) => void;
|
|
60
60
|
}
|
|
61
61
|
/** Virtualized controlled data grid with local/manual sort, filtering and row selection. */
|
|
62
62
|
export declare function DataGrid<T>({ columns, rows, rowKey, height, rowHeight, offset, overscan, sort, sortMode, filter, filterMode, selectionMode, selectedKeys, empty, onSortChange, onSelectionChange, onRowActivate, onScroll, style, id, ...props }: DataGridProps<T>): VNode;
|
|
@@ -9,6 +9,7 @@ export interface AssetDigest {
|
|
|
9
9
|
* Give native libraries a physical path for an asset embedded in a Bun executable.
|
|
10
10
|
* With a build-time `digest`, a launch that finds the extracted copy at the
|
|
11
11
|
* expected size reuses it without reading or hashing the embedded bytes; the
|
|
12
|
-
* full hash check runs only when the copy is written.
|
|
12
|
+
* full hash check runs only when the copy is written. `digest` describes the
|
|
13
|
+
* decoded bytes; `encoding` names how the embedded copy is compressed (Bun only).
|
|
13
14
|
*/
|
|
14
|
-
export declare function materializeAsset(source: string, filename: string, digest?: AssetDigest): string;
|
|
15
|
+
export declare function materializeAsset(source: string, filename: string, digest?: AssetDigest, encoding?: "zstd"): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Style } from "
|
|
1
|
+
import type { Style } from "./protocol";
|
|
2
2
|
import { type BaseProps, type Child, type VNode } from "./jsx-runtime";
|
|
3
3
|
import { type ButtonProps } from "./components";
|
|
4
4
|
export interface SkeletonProps extends BaseProps {
|
|
@@ -11,7 +11,7 @@ export interface SpinnerProps extends BaseProps {
|
|
|
11
11
|
size?: number;
|
|
12
12
|
label?: string;
|
|
13
13
|
}
|
|
14
|
-
/** A
|
|
14
|
+
/** A loading indicator: an arc that turns once every 800 ms, rotated natively by `style.spin`. */
|
|
15
15
|
export declare function Spinner({ size, label, style, ...props }: SpinnerProps): VNode;
|
|
16
16
|
export interface AvatarProps extends BaseProps {
|
|
17
17
|
src?: string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { VNode } from "./jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* HTML elements that are not single native nodes: the remaining `<input>` types,
|
|
4
|
+
* `<form>`, `<fieldset>`, lists, tables and `<details>`. Each expands to Tarve
|
|
5
|
+
* components with the browser's user-agent defaults. Uncontrolled elements keep
|
|
6
|
+
* their state here, keyed by id, the way a browser keeps it in the DOM.
|
|
7
|
+
*/
|
|
8
|
+
export declare const HTML_ELEMENTS: Set<string>;
|
|
9
|
+
export declare const HTML_INPUT_TYPES: Set<string>;
|
|
10
|
+
/** Named values of a form, kept across renders like the DOM keeps field values. */
|
|
11
|
+
export declare function formValues(key: string): Map<string, FormValue>;
|
|
12
|
+
/** An uncontrolled element's value, kept across renders like the DOM keeps it. */
|
|
13
|
+
export declare function storedValue<T>(key: string, initial: T): T;
|
|
14
|
+
export declare function storeValue(key: string, value: unknown): void;
|
|
15
|
+
/** Forgets uncontrolled HTML element state (tests and remounts). */
|
|
16
|
+
export declare function resetHtmlState(): void;
|
|
17
|
+
export type FormValue = string | boolean | string[];
|
|
18
|
+
export interface FormContext {
|
|
19
|
+
values: Map<string, FormValue>;
|
|
20
|
+
required: Set<string>;
|
|
21
|
+
submit(): void;
|
|
22
|
+
}
|
|
23
|
+
/** `<input type="checkbox|radio|range|date|file">`. */
|
|
24
|
+
export declare function expandInput(props: Record<string, any>, key: string, form: FormContext | undefined): VNode;
|
|
25
|
+
/** Lists, tables, fieldsets and details, with Chromium's user-agent spacing. */
|
|
26
|
+
export declare function expandHtml(type: string, props: Record<string, any>, key: string): VNode;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export { Window, View, Row, Column, Portal, Pressable, Link, Icon, Svg, Path, Circle, Ellipse, Line, Polyline, Polygon, SvgRect, Text, Markdown, Code, Diff, Button, Image, clearImageSourceCache, loadImageSource, Scroll, ScrollArea, Input, TextArea, TitleBar, Modal, Dialog } from "./components";
|
|
2
|
-
export type { WindowProps, WindowCloseRequestEvent, ViewProps, PortalProps, PressableProps, LinkProps, IconName, IconProps, SvgProps, SvgNode, SvgAttributes, PathProps, CircleProps, EllipseProps, LineProps, PolylineProps, PolygonProps, RectProps, TextProps, MarkdownProps, CodeProps, DiffProps, ButtonProps, ImageBytesSource, ImageHttpCacheMode, ImageProps, ImageRgbaSource, ImageSource, LoadImageSourceOptions, ScrollProps, ScrollAreaProps, InputType, InputProps, TextAreaProps, TitleBarProps, ModalProps, DialogProps } from "./components";
|
|
1
|
+
export { Window, View, Row, Column, Portal, Glass, glassChrome, glassSurface, Pressable, Link, Icon, Svg, Path, Circle, Ellipse, Line, Polyline, Polygon, SvgRect, Text, Markdown, Code, Diff, Button, Image, clearImageSourceCache, loadImageSource, Scroll, ScrollArea, Input, TextArea, TitleBar, Modal, Dialog, over } from "./components";
|
|
2
|
+
export type { WindowProps, WindowCloseRequestEvent, ViewProps, GlassProps, GlassVariant, PortalProps, PressableProps, LinkProps, IconName, IconProps, SvgProps, SvgNode, SvgAttributes, PathProps, CircleProps, EllipseProps, LineProps, PolylineProps, PolygonProps, RectProps, TextProps, MarkdownProps, CodeProps, DiffProps, ButtonProps, ImageBytesSource, ImageHttpCacheMode, ImageProps, ImageRgbaSource, ImageSource, LoadImageSourceOptions, ScrollProps, ScrollAreaProps, InputType, InputProps, TextAreaProps, TitleBarProps, ModalProps, DialogProps } from "./components";
|
|
3
3
|
export { Checkbox, Switch, RadioGroup, Slider, Card, Badge, Separator, Progress, Tabs, Accordion } from "./controls";
|
|
4
4
|
export type { CheckboxProps, SwitchProps, RadioOption, RadioGroupProps, SliderProps, CardProps, BadgeProps, SeparatorProps, ProgressProps, TabItem, TabsProps, AccordionItem, AccordionProps } from "./controls";
|
|
5
5
|
export { VirtualList } from "./virtual-list";
|
|
6
|
+
export { memo, shallowEqual, template } from "./memo";
|
|
6
7
|
export type { VirtualListProps } from "./virtual-list";
|
|
7
8
|
export { AnimatePresence } from "./motion";
|
|
8
9
|
export type { AnimatePresenceProps } from "./motion";
|
|
@@ -10,18 +11,26 @@ export { List } from "./list";
|
|
|
10
11
|
export type { ListProps } from "./list";
|
|
11
12
|
export { Select } from "./select";
|
|
12
13
|
export type { SelectProps, SelectOption } from "./select";
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
14
|
+
export { Tooltip, Popover, DropdownMenu, ContextMenu, Combobox, Command, CommandPalette } from "./popups";
|
|
15
|
+
export type { PopupSide, TooltipProps, PopoverProps, DropdownMenuItem, DropdownMenuProps, ContextMenuProps, ComboboxOption, ComboboxProps, CommandItem, CommandProps, CommandPaletteProps } from "./popups";
|
|
16
|
+
export { Skeleton, Spinner, Avatar, Breadcrumb, Pagination, Calendar, DatePicker, Collapsible, Table, DataTable, AlertDialog, Sheet, Toast, Toaster, Menubar, HoverCard } from "./extra-controls";
|
|
17
|
+
export type { SkeletonProps, SpinnerProps, AvatarProps, BreadcrumbItem, BreadcrumbProps, PaginationProps, CalendarWeekStartsOn, CalendarProps, DatePickerProps, CollapsibleProps, TableColumn, TableProps, DataTableProps, AlertDialogProps, SheetSide, SheetProps, ToastVariant, ToastAction, ToastItem, ToastProps, ToasterPosition, ToasterProps, MenubarItem, MenubarMenu, MenubarProps, HoverCardSide, HoverCardProps } from "./extra-controls";
|
|
18
|
+
export { Alert, AspectRatio, ButtonGroup, Empty, Label, Field, InputGroup, InputOTP, Item, Kbd, NativeSelect, Toggle, ToggleGroup, Typography, Direction } from "./form-controls";
|
|
19
|
+
export type { AlertVariant, AlertProps, AspectRatioProps, ButtonGroupProps, EmptyProps, LabelProps, FieldProps, InputGroupProps, InputOTPProps, ItemProps, KbdProps, NativeSelectProps, ToggleProps, ToggleGroupItem, ToggleGroupProps, TypographyVariant, TypographyProps, DirectionProps } from "./form-controls";
|
|
20
|
+
export { Carousel, Chart, Drawer, NavigationMenu, Resizable, Sidebar, Questionnaire } from "./advanced-controls";
|
|
21
|
+
export type { CarouselItem, CarouselProps, ChartDatum, ChartProps, DrawerProps, NavigationMenuLink, NavigationMenuItem, NavigationMenuProps, ResizableProps, SidebarItem, SidebarProps, QuestionnaireAnswer, QuestionnaireQuestion, QuestionnaireProps } from "./advanced-controls";
|
|
22
|
+
export { Attachment, Bubble, Marker, Message, MessageScroller } from "./chat-controls";
|
|
23
|
+
export type { AttachmentStatus, AttachmentProps, BubbleSide, BubbleVariant, BubbleProps, MarkerProps, MessageProps, MessageScrollerProps } from "./chat-controls";
|
|
24
|
+
export { TreeView, DataGrid } from "./desktop-controls";
|
|
25
|
+
export type { TreeNode, TreeViewProps, DataGridKey, DataGridSortDirection, DataGridSort, DataGridColumn, DataGridProps } from "./desktop-controls";
|
|
19
26
|
export { normalizeHotkey } from "./hotkeys";
|
|
20
27
|
export { createTextSearchController, findRanges } from "./text-search";
|
|
21
28
|
export type { FindRangesOptions, TextSearchOptions, TextSearchController, TextSearchSnapshot } from "./text-search";
|
|
22
29
|
export type { HotkeyHandler } from "./hotkeys";
|
|
23
30
|
export { createApp, render } from "./app";
|
|
24
|
-
export
|
|
31
|
+
export { checkForUpdate, downloadUpdate, installUpdate, canInstallUpdate, cleanupUpdate, compareVersions, verifyUpdateManifest, validateUpdateManifest, isValidVersion, assertUpdateUrl, updatePlatform } from "./updates";
|
|
32
|
+
export type { Update, UpdateArtifact, UpdateManifest, SignedUpdateManifest, CheckForUpdateOptions, DownloadUpdateOptions, InstallUpdateOptions } from "./updates";
|
|
33
|
+
export type { AppErrorEvent, AppErrorSource, AppHandle, AppJsStats, AppOptions, AppStats, NotifyOptions, SystemMediaSession, TrayHandle, TrayMenuItem, TrayOptions } from "./app";
|
|
25
34
|
export { TestRenderer, Locator, createTestRenderer, launchTestProcess, waitFor } from "./test-renderer";
|
|
26
35
|
export type { Point, RoleLocatorOptions, TestProcess, TestProcessOptions, TestRendererOptions, TextLocatorOptions, WaitForOptions, WheelOptions } from "./test-renderer";
|
|
27
36
|
export { assertPngMatches, comparePngCaptures, compareRgbaImages, readPngRgba } from "./visual-testing";
|
|
@@ -30,7 +39,10 @@ export type { ComponentAdapter, ComponentAdapterInput } from "./component-adapte
|
|
|
30
39
|
export { theme, Theme, lightTheme, darkTheme, createTheme, buttonVariants } from "./theme";
|
|
31
40
|
export type { ThemeColors, ThemeFocusOutline, ThemeDefinition, ThemeOverrides, ButtonVariant } from "./theme";
|
|
32
41
|
export { Style } from "./style";
|
|
33
|
-
export type { StateStyle, OutlineStyle, BorderStyle, TextShadow, BoxShadow, Transform, Gradient, GradientStop, GradientSide, GradientLength, GradientCentre, RadialExtent, LinearGradient, RadialGradient, ConicGradient, ConicGradientStop, UserSelect, TextDecoration, Renderer, WindowPosition, WindowPositionPreset, FileDialogFilter, FileDialogOptions, ScrollOrientation, ScrollPosition, MotionProperty, NumericMotionProperty, MotionEasing, MotionTransition, MotionTransitions, MotionValues } from "
|
|
34
|
-
export type { VNode, Child, PastePayload } from "./jsx-runtime";
|
|
42
|
+
export type { StateStyle, OutlineStyle, BorderStyle, TextShadow, BoxShadow, Transform, Gradient, GradientStop, GradientSide, GradientLength, GradientCentre, RadialExtent, LinearGradient, RadialGradient, ConicGradient, ConicGradientStop, UserSelect, TextDecoration, GlassMaterial, Renderer, WindowPosition, WindowPositionPreset, WindowLevel, DesktopWidget, FileDialogFilter, FileDialogOptions, ScrollOrientation, ScrollPosition, ScrollSource, ScrollInfo, MotionProperty, NumericMotionProperty, MotionEasing, MotionTransition, MotionTransitions, MotionValues, MemoryReading, NativeStats, PhaseSummary } from "./protocol";
|
|
43
|
+
export type { VNode, Child, PastePayload, DragPosition, DragMoveEvent, DragEndEvent, DropEvent, DraggableProps, DropTargetProps } from "./jsx-runtime";
|
|
35
44
|
export { BunFfiBridge, openExternal } from "./bridge";
|
|
36
45
|
export type { NativeBridge, BunFfiBridgeOptions } from "./bridge";
|
|
46
|
+
export { CanvasRenderingContext2D, CanvasGradient, parseCanvasFont } from "./canvas";
|
|
47
|
+
export type { MediaController, MediaElementProps, MediaEventInfo } from "./media-element";
|
|
48
|
+
export { tw } from "./tailwind";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { TextRun } from "./protocol";
|
|
2
|
+
import { type Child } from "./jsx-runtime";
|
|
3
|
+
export declare const INLINE_TAG_NAMES: Set<string>;
|
|
4
|
+
type RunStyle = Record<string, unknown>;
|
|
5
|
+
export interface InlineContext {
|
|
6
|
+
/** Computed style of the text node itself: inheritance starts here. */
|
|
7
|
+
base: RunStyle;
|
|
8
|
+
linkColor: string;
|
|
9
|
+
/** Resolves theme tokens in a run style. */
|
|
10
|
+
resolve(style: RunStyle): RunStyle;
|
|
11
|
+
/** Registers a click target for a run and returns its id. */
|
|
12
|
+
register(id: string | undefined, onClick: () => void): string;
|
|
13
|
+
openExternal(href: string): void;
|
|
14
|
+
}
|
|
15
|
+
export declare function hasInlineElements(children: Child): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Flattens inline children into text plus runs, applying CSS white-space.
|
|
18
|
+
* `base` is the text node's computed style; `context` is built only when the
|
|
19
|
+
* children hold phrasing elements.
|
|
20
|
+
*/
|
|
21
|
+
export declare function compileInline(children: Child, whiteSpace: string, base: RunStyle, context: () => InlineContext): {
|
|
22
|
+
text: string;
|
|
23
|
+
runs: TextRun[];
|
|
24
|
+
};
|
|
25
|
+
export {};
|