@swiftbrowser/react 0.0.0-stage → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +435 -2
- package/dist/binding.d.ts +9 -0
- package/dist/binding.d.ts.map +1 -0
- package/dist/bridge.d.ts +17 -0
- package/dist/bridge.d.ts.map +1 -0
- package/dist/components/animators.d.ts +40 -0
- package/dist/components/animators.d.ts.map +1 -0
- package/dist/components/canvas.d.ts +138 -0
- package/dist/components/canvas.d.ts.map +1 -0
- package/dist/components/charts.d.ts +100 -0
- package/dist/components/charts.d.ts.map +1 -0
- package/dist/components/containers.d.ts +78 -0
- package/dist/components/containers.d.ts.map +1 -0
- package/dist/components/controls.d.ts +106 -0
- package/dist/components/controls.d.ts.map +1 -0
- package/dist/components/geometry.d.ts +131 -0
- package/dist/components/geometry.d.ts.map +1 -0
- package/dist/components/host.d.ts +24 -0
- package/dist/components/host.d.ts.map +1 -0
- package/dist/components/images.d.ts +18 -0
- package/dist/components/images.d.ts.map +1 -0
- package/dist/components/lists.d.ts +26 -0
- package/dist/components/lists.d.ts.map +1 -0
- package/dist/components/media.d.ts +105 -0
- package/dist/components/media.d.ts.map +1 -0
- package/dist/components/menus.d.ts +20 -0
- package/dist/components/menus.d.ts.map +1 -0
- package/dist/components/navigation.d.ts +22 -0
- package/dist/components/navigation.d.ts.map +1 -0
- package/dist/components/row.d.ts +34 -0
- package/dist/components/row.d.ts.map +1 -0
- package/dist/components/shapes.d.ts +107 -0
- package/dist/components/shapes.d.ts.map +1 -0
- package/dist/components/split.d.ts +25 -0
- package/dist/components/split.d.ts.map +1 -0
- package/dist/components/stacks.d.ts +138 -0
- package/dist/components/stacks.d.ts.map +1 -0
- package/dist/components/system.d.ts +25 -0
- package/dist/components/system.d.ts.map +1 -0
- package/dist/components/table.d.ts +36 -0
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/tabs.d.ts +20 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/text.d.ts +63 -0
- package/dist/components/text.d.ts.map +1 -0
- package/dist/coordinateSpace.d.ts +20 -0
- package/dist/coordinateSpace.d.ts.map +1 -0
- package/dist/dragDrop.d.ts +16 -0
- package/dist/dragDrop.d.ts.map +1 -0
- package/dist/environment.d.ts +54 -0
- package/dist/environment.d.ts.map +1 -0
- package/dist/host/instance.d.ts +67 -0
- package/dist/host/instance.d.ts.map +1 -0
- package/dist/host/reconciler.d.ts +9 -0
- package/dist/host/reconciler.d.ts.map +1 -0
- package/dist/host/root.d.ts +29 -0
- package/dist/host/root.d.ts.map +1 -0
- package/dist/host/sb.d.ts +5 -0
- package/dist/host/sb.d.ts.map +1 -0
- package/dist/host/tree.d.ts +35 -0
- package/dist/host/tree.d.ts.map +1 -0
- package/dist/index.d.ts +41 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4038 -0
- package/dist/index.js.map +1 -0
- package/dist/inspector.d.ts +11 -0
- package/dist/inspector.d.ts.map +1 -0
- package/dist/island.d.ts +25 -0
- package/dist/island.d.ts.map +1 -0
- package/dist/lazy.d.ts +19 -0
- package/dist/lazy.d.ts.map +1 -0
- package/dist/lifecycle.d.ts +11 -0
- package/dist/lifecycle.d.ts.map +1 -0
- package/dist/modifiers.d.ts +330 -0
- package/dist/modifiers.d.ts.map +1 -0
- package/dist/mount.d.ts +41 -0
- package/dist/mount.d.ts.map +1 -0
- package/dist/navigation-context.d.ts +15 -0
- package/dist/navigation-context.d.ts.map +1 -0
- package/dist/path.d.ts +48 -0
- package/dist/path.d.ts.map +1 -0
- package/dist/pointer.d.ts +65 -0
- package/dist/pointer.d.ts.map +1 -0
- package/dist/presentation.d.ts +38 -0
- package/dist/presentation.d.ts.map +1 -0
- package/dist/scrollReader.d.ts +27 -0
- package/dist/scrollReader.d.ts.map +1 -0
- package/dist/values.d.ts +118 -0
- package/dist/values.d.ts.map +1 -0
- package/package.json +47 -4
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sheets and alerts: presented content becomes a root-level `sheet` / `alert`
|
|
3
|
+
* element after the app's tree, as the Swift core emits them.
|
|
4
|
+
*/
|
|
5
|
+
import type { Detent } from '@swiftbrowser/web/src/protocol';
|
|
6
|
+
import { type ReactNode } from 'react';
|
|
7
|
+
import { type BindingValue } from './binding';
|
|
8
|
+
export interface SheetModifier {
|
|
9
|
+
isPresented: BindingValue<boolean>;
|
|
10
|
+
onDismiss?: () => void;
|
|
11
|
+
content: ReactNode;
|
|
12
|
+
/** `.fullScreenCover` */
|
|
13
|
+
fullScreen?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function SheetPresenter({ isPresented, onDismiss, content, fullScreen }: SheetModifier): ReactNode;
|
|
16
|
+
/** `.presentationDetents([.medium])`, inside a sheet's content. */
|
|
17
|
+
export type DetentValue = Detent | {
|
|
18
|
+
height: number;
|
|
19
|
+
} | {
|
|
20
|
+
fraction: number;
|
|
21
|
+
};
|
|
22
|
+
export declare function presentationDetents(detents: DetentValue[]): ReactNode;
|
|
23
|
+
export interface AlertModifier {
|
|
24
|
+
title: string;
|
|
25
|
+
isPresented: BindingValue<boolean>;
|
|
26
|
+
message?: string;
|
|
27
|
+
/** The buttons; each dismisses the alert when tapped. */
|
|
28
|
+
actions?: ReactNode;
|
|
29
|
+
/** `.confirmationDialog` */
|
|
30
|
+
style?: 'alert' | 'dialog';
|
|
31
|
+
}
|
|
32
|
+
export declare function AlertPresenter({ title, isPresented, message, actions, style }: AlertModifier): ReactNode;
|
|
33
|
+
/** `.onAppear` / `.onDisappear` */
|
|
34
|
+
export declare function Lifecycle({ onAppear, onDisappear }: {
|
|
35
|
+
onAppear?: () => void;
|
|
36
|
+
onDisappear?: () => void;
|
|
37
|
+
}): null;
|
|
38
|
+
//# sourceMappingURL=presentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation.d.ts","sourceRoot":"","sources":["../src/presentation.tsx"],"names":[],"mappings":"AAAA;;;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AM,IAAI,CAAA;CAAE,GAAG,IAAI,CAO9G"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ScrollViewReader` and `.id` (the `scrollID` modifier): `proxy.scrollTo(id)`
|
|
3
|
+
* marks the view with that id with a `scrollTo` command whose serial is new,
|
|
4
|
+
* and the page scrolls every scrolling ancestor to it after the pass.
|
|
5
|
+
*/
|
|
6
|
+
import type { UnitPoint } from '@swiftbrowser/web/src/protocol';
|
|
7
|
+
import { type ReactNode } from 'react';
|
|
8
|
+
import { type UnitPointValue } from './values';
|
|
9
|
+
interface ScrollRequest {
|
|
10
|
+
id: string | number;
|
|
11
|
+
anchor: UnitPoint | null;
|
|
12
|
+
serial: number;
|
|
13
|
+
}
|
|
14
|
+
export declare const ScrollRequestContext: import("react").Context<ScrollRequest | null>;
|
|
15
|
+
export interface ScrollViewProxy {
|
|
16
|
+
/** Scroll so `anchor` of the view with that `scrollID` meets the same point of the visible area; no anchor: as little as shows it. */
|
|
17
|
+
scrollTo(id: string | number, anchor?: UnitPointValue): void;
|
|
18
|
+
}
|
|
19
|
+
export declare function ScrollViewReader({ children }: {
|
|
20
|
+
children: (proxy: ScrollViewProxy) => ReactNode;
|
|
21
|
+
}): ReactNode;
|
|
22
|
+
export declare function ScrollTarget({ id, children }: {
|
|
23
|
+
id: string | number;
|
|
24
|
+
children?: ReactNode;
|
|
25
|
+
}): ReactNode;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=scrollReader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrollReader.d.ts","sourceRoot":"","sources":["../src/scrollReader.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAuC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5E,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1D,UAAU,aAAa;IACrB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,oBAAoB,+CAA4C,CAAC;AAG9E,MAAM,WAAW,eAAe;IAC9B,sIAAsI;IACtI,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;CAC9D;AAED,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,SAAS,CAAA;CAAE,GAAG,SAAS,CAM7G;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,GAAG,SAAS,CAIvG"}
|
package/dist/values.d.ts
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Value types of the SwiftUI API as plain data: colors and shape styles,
|
|
3
|
+
* fonts, frames, insets and gradients, encoded as the ops protocol wants them.
|
|
4
|
+
*/
|
|
5
|
+
import type { Color as ProtocolColor, EdgeInsets, Font as ProtocolFont, FontDesign, FontWeight, Frame, FrameAlignment, RGBAColor, SemanticColorName, ShapeStyle, TextStyle, UnitPoint } from '@swiftbrowser/web/src/protocol';
|
|
6
|
+
export type { EdgeInsets, FontDesign, FontWeight, Frame, FrameAlignment, ShapeStyle, TextStyle, UnitPoint };
|
|
7
|
+
/** The protocol's color value (the `Color` export is the view, with the color helpers as members). */
|
|
8
|
+
export type ColorType = ProtocolColor;
|
|
9
|
+
/** The protocol's font value (the `Font` export is the helper object). */
|
|
10
|
+
export type FontType = ProtocolFont;
|
|
11
|
+
/** `.primary` … `.quaternary` as foreground styles (the label colors) or fills. */
|
|
12
|
+
export type HierarchyName = 'primary' | 'secondary' | 'tertiary' | 'quaternary';
|
|
13
|
+
/**
|
|
14
|
+
* A style as a prop: a protocol value, or a name. A hierarchy name
|
|
15
|
+
* (`"secondary"`) is the hierarchical style, as `.foregroundStyle(.secondary)`
|
|
16
|
+
* is; a palette or UIKit name (`"red"`, `"secondarySystemBackground"`) is that
|
|
17
|
+
* semantic color; `"white"`, `"black"` and `"#rrggbb[aa]"` are explicit colors.
|
|
18
|
+
*/
|
|
19
|
+
export type StyleValue = ShapeStyle | HierarchyName | SemanticColorName | 'white' | 'black' | `#${string}`;
|
|
20
|
+
export declare function rgb(r: number, g: number, b: number, a?: number): RGBAColor;
|
|
21
|
+
export declare function hex(value: string): RGBAColor;
|
|
22
|
+
export declare function shapeStyle(value: StyleValue): ShapeStyle;
|
|
23
|
+
/** A color as a prop: a protocol color or a name (hierarchy names are not colors). */
|
|
24
|
+
export type ColorValue = ProtocolColor | SemanticColorName | 'white' | 'black' | `#${string}`;
|
|
25
|
+
export declare function color(value: ColorValue): ProtocolColor;
|
|
26
|
+
/** `color.opacity(a)` */
|
|
27
|
+
export declare function opacity(value: ColorValue, a: number): ProtocolColor;
|
|
28
|
+
export declare function opacity(value: StyleValue, a: number): ShapeStyle;
|
|
29
|
+
/** `color.gradient`: the subtle vertical gradient iOS derives from a color. */
|
|
30
|
+
export declare function gradient(value: ColorValue): ShapeStyle;
|
|
31
|
+
/** `Color.red`, `Color.white`, `Color(.secondarySystemBackground)`… (`Color` itself, a view, carries these as members). */
|
|
32
|
+
export declare const ColorValues: {
|
|
33
|
+
red: ProtocolColor;
|
|
34
|
+
orange: ProtocolColor;
|
|
35
|
+
yellow: ProtocolColor;
|
|
36
|
+
green: ProtocolColor;
|
|
37
|
+
mint: ProtocolColor;
|
|
38
|
+
teal: ProtocolColor;
|
|
39
|
+
cyan: ProtocolColor;
|
|
40
|
+
blue: ProtocolColor;
|
|
41
|
+
indigo: ProtocolColor;
|
|
42
|
+
purple: ProtocolColor;
|
|
43
|
+
pink: ProtocolColor;
|
|
44
|
+
brown: ProtocolColor;
|
|
45
|
+
gray: ProtocolColor;
|
|
46
|
+
white: ProtocolColor;
|
|
47
|
+
black: ProtocolColor;
|
|
48
|
+
clear: ProtocolColor;
|
|
49
|
+
primary: ProtocolColor;
|
|
50
|
+
secondary: ProtocolColor;
|
|
51
|
+
accent: ProtocolColor;
|
|
52
|
+
/** `Color(uiColor:)` / `Color(.name)`: a UIKit semantic color by its iOS name. */
|
|
53
|
+
system: (name: SemanticColorName) => ProtocolColor;
|
|
54
|
+
rgb: typeof rgb;
|
|
55
|
+
hex: typeof hex;
|
|
56
|
+
opacity: typeof opacity;
|
|
57
|
+
gradient: typeof gradient;
|
|
58
|
+
};
|
|
59
|
+
export type UnitPointName = 'center' | 'top' | 'bottom' | 'leading' | 'trailing' | 'topLeading' | 'topTrailing' | 'bottomLeading' | 'bottomTrailing';
|
|
60
|
+
export type UnitPointValue = UnitPoint | UnitPointName;
|
|
61
|
+
export declare function unitPoint(value: UnitPointValue): UnitPoint;
|
|
62
|
+
export interface GradientColors {
|
|
63
|
+
/** Evenly spaced colors, or explicit stops. */
|
|
64
|
+
colors?: ColorValue[];
|
|
65
|
+
stops?: {
|
|
66
|
+
color: ColorValue;
|
|
67
|
+
location: number;
|
|
68
|
+
}[];
|
|
69
|
+
}
|
|
70
|
+
export declare function LinearGradient(spec: GradientColors & {
|
|
71
|
+
startPoint: UnitPointValue;
|
|
72
|
+
endPoint: UnitPointValue;
|
|
73
|
+
}): ShapeStyle;
|
|
74
|
+
export declare function RadialGradient(spec: GradientColors & {
|
|
75
|
+
center: UnitPointValue;
|
|
76
|
+
startRadius: number;
|
|
77
|
+
endRadius: number;
|
|
78
|
+
}): ShapeStyle;
|
|
79
|
+
export declare function AngularGradient(spec: GradientColors & {
|
|
80
|
+
center: UnitPointValue;
|
|
81
|
+
startAngle?: number;
|
|
82
|
+
endAngle?: number;
|
|
83
|
+
}): ShapeStyle;
|
|
84
|
+
/** A font as a prop: a text style name (`"headline"`) or a `Font` object. */
|
|
85
|
+
export type FontValue = TextStyle | ProtocolFont;
|
|
86
|
+
export declare function font(value: FontValue): ProtocolFont;
|
|
87
|
+
/** `Font.system(size:weight:design:)` */
|
|
88
|
+
export declare function system(size: number, weight?: FontWeight, design?: FontDesign): ProtocolFont;
|
|
89
|
+
/** `Font.system(.body, design:weight:)` */
|
|
90
|
+
export declare function system(textStyle: TextStyle, design?: FontDesign, weight?: FontWeight): ProtocolFont;
|
|
91
|
+
/** `.font(.title2.bold())`, `.font(.subheadline.weight(.semibold))` */
|
|
92
|
+
export declare function weighted(value: FontValue, weight: FontWeight): ProtocolFont;
|
|
93
|
+
export declare const Font: {
|
|
94
|
+
system: typeof system;
|
|
95
|
+
weighted: typeof weighted;
|
|
96
|
+
bold: (value: FontValue) => ProtocolFont;
|
|
97
|
+
};
|
|
98
|
+
/** `Infinity` stands for `.infinity`. */
|
|
99
|
+
export interface FrameValue {
|
|
100
|
+
width?: number;
|
|
101
|
+
height?: number;
|
|
102
|
+
minWidth?: number;
|
|
103
|
+
maxWidth?: number;
|
|
104
|
+
minHeight?: number;
|
|
105
|
+
maxHeight?: number;
|
|
106
|
+
alignment?: FrameAlignment;
|
|
107
|
+
}
|
|
108
|
+
export declare function frame(value: FrameValue): Frame;
|
|
109
|
+
export type EdgeName = 'top' | 'bottom' | 'leading' | 'trailing' | 'horizontal' | 'vertical' | 'all';
|
|
110
|
+
/**
|
|
111
|
+
* `.padding()` (`true`), `.padding(12)`, `.padding(.vertical, 6)` (`["vertical", 6]`),
|
|
112
|
+
* `.padding([.top, .leading], 8)`, or explicit insets.
|
|
113
|
+
*/
|
|
114
|
+
export type PaddingValue = true | number | EdgeInsets | [EdgeName | EdgeName[], number?];
|
|
115
|
+
export declare const DEFAULT_PADDING = 16;
|
|
116
|
+
export declare function padding(value: PaddingValue): EdgeInsets;
|
|
117
|
+
export declare function insets(edges: EdgeName[], amount: number): EdgeInsets;
|
|
118
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MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,YAAY,GAAG,UAAU,GAAG,KAAK,CAAC;AACrG;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,MAAM,GAAG,UAAU,GAAG,CAAC,QAAQ,GAAG,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC;AAEzF,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,UAAU,CAQvD;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CASpE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,49 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swiftbrowser/react",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
6
|
-
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "SwiftUI's components for React: a react-reconciler host that emits SwiftBrowser render ops into the @swiftbrowser/web renderer, so a pure React/TypeScript web app gets the same iOS UI as a SwiftUI app in the browser.",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/noya-app/SwiftBrowser.git",
|
|
9
|
+
"directory": "packages/react"
|
|
10
|
+
},
|
|
11
|
+
"main": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"README.md"
|
|
22
|
+
],
|
|
23
|
+
"sideEffects": false,
|
|
24
|
+
"scripts": {
|
|
25
|
+
"dev": "vite",
|
|
26
|
+
"build": "tsc --noEmit -p tsconfig.json && vite build --config vite.lib.config.ts && tsc -p tsconfig.build.json",
|
|
27
|
+
"build:demo": "vite build",
|
|
28
|
+
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
29
|
+
"test:unit": "vitest run"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@swiftbrowser/web": "0.4.0",
|
|
33
|
+
"react-reconciler": "^0.34.0"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"react": "^19.0.0",
|
|
37
|
+
"react-dom": "^19.0.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/react": "^19.3.0",
|
|
41
|
+
"@types/react-dom": "^19.3.0",
|
|
42
|
+
"@types/react-reconciler": "^0.33.1",
|
|
43
|
+
"react": "^19.3.0",
|
|
44
|
+
"react-dom": "^19.3.0",
|
|
45
|
+
"typescript": "^5.9.2",
|
|
46
|
+
"vite": "^7.1.7",
|
|
47
|
+
"vitest": "^5.0.3"
|
|
48
|
+
}
|
|
49
|
+
}
|