@swiftbrowser/react 0.9.3 → 0.9.4
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 +14 -0
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/island.d.ts +9 -1
- package/dist/island.d.ts.map +1 -1
- package/dist/mount.d.ts +10 -0
- package/dist/mount.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/island.d.ts
CHANGED
|
@@ -26,6 +26,14 @@ export interface SwiftUIViewProps {
|
|
|
26
26
|
* bars off a window's edge where there is no status bar; `content` has none.
|
|
27
27
|
*/
|
|
28
28
|
safeArea?: number | Partial<SafeAreaInsets>;
|
|
29
|
+
/**
|
|
30
|
+
* Mirror navigation in the browser's history (the default): a pushed
|
|
31
|
+
* screen or a presented sheet adds an entry, and the browser's back and
|
|
32
|
+
* edge swipe pop or dismiss it. The URL is left alone; set paths with
|
|
33
|
+
* `history.replaceState`. `false` for an island in a page whose own router
|
|
34
|
+
* owns the history.
|
|
35
|
+
*/
|
|
36
|
+
history?: boolean;
|
|
29
37
|
className?: string;
|
|
30
38
|
style?: CSSProperties;
|
|
31
39
|
}
|
|
@@ -36,6 +44,6 @@ interface SafeAreaInsets {
|
|
|
36
44
|
trailing: number;
|
|
37
45
|
}
|
|
38
46
|
export declare function insetsOf(safeArea: SwiftUIViewProps['safeArea'], fit: 'fill' | 'content'): SafeAreaInsets;
|
|
39
|
-
export declare function SwiftUIView({ children, fit, colorScheme, dynamicTypeSize, contexts, assets, safeArea, className, style, }: SwiftUIViewProps): ReactNode;
|
|
47
|
+
export declare function SwiftUIView({ children, fit, colorScheme, dynamicTypeSize, contexts, assets, safeArea, history, className, style, }: SwiftUIViewProps): ReactNode;
|
|
40
48
|
export {};
|
|
41
49
|
//# sourceMappingURL=island.d.ts.map
|
package/dist/island.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"island.d.ts","sourceRoot":"","sources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,SAAS,CAmD9B"}
|
package/dist/mount.d.ts
CHANGED
|
@@ -27,6 +27,16 @@ export interface MountOptions {
|
|
|
27
27
|
* of your own: `{ images: { name: { src, width, height, scale, kind } }, colors: {} }`).
|
|
28
28
|
*/
|
|
29
29
|
assets?: AssetCatalog;
|
|
30
|
+
/**
|
|
31
|
+
* Mirror navigation in the browser's history (the default): pushing a
|
|
32
|
+
* screen or presenting a sheet adds an entry, and the browser's back and
|
|
33
|
+
* edge swipe pop or dismiss it (the renderer's own swipe back is then off).
|
|
34
|
+
* The URL is left alone; map screens to paths yourself with
|
|
35
|
+
* `history.replaceState` (not `pushState`, which would add a second entry).
|
|
36
|
+
* `false` leaves the history untouched, for an island in a page whose own
|
|
37
|
+
* router owns it.
|
|
38
|
+
*/
|
|
39
|
+
history?: boolean;
|
|
30
40
|
}
|
|
31
41
|
export interface Mounted {
|
|
32
42
|
root: SwiftUIRoot;
|
package/dist/mount.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mount.d.ts","sourceRoot":"","sources":["../src/mount.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAA0B,KAAK,WAAW,EAAE,KAAK,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAChH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"mount.d.ts","sourceRoot":"","sources":["../src/mount.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAA0B,KAAK,WAAW,EAAE,KAAK,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAChH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAElE,MAAM,WAAW,YAAY;IAC3B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,4EAA4E;IAC5E,QAAQ,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACrF,mFAAmF;IACnF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,WAAW,CAAC;IAClB,QAAQ,EAAE,QAAQ,CAAC;IACnB,cAAc,CAAC,WAAW,EAAE;QAAE,WAAW,CAAC,EAAE,WAAW,CAAC;QAAC,eAAe,CAAC,EAAE,eAAe,CAAA;KAAE,GAAG,IAAI,CAAC;IACpG,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,wBAAgB,KAAK,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,GAAE,YAAiB,GAAG,OAAO,CAmElG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swiftbrowser/react",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"type": "module",
|
|
5
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
6
|
"repository": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"test:unit": "vitest run"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@swiftbrowser/web": "0.9.
|
|
32
|
+
"@swiftbrowser/web": "0.9.4"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"react": "^19.0.0",
|