@swiftbrowser/react 0.26.4 → 0.26.6
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 +10 -2
- package/dist/components/lists.d.ts +8 -0
- package/dist/components/lists.d.ts.map +1 -1
- package/dist/components/split.d.ts +16 -0
- package/dist/components/split.d.ts.map +1 -1
- package/dist/components/text.d.ts +6 -1
- package/dist/components/text.d.ts.map +1 -1
- package/dist/host/remote.d.ts.map +1 -1
- package/dist/index.js +19 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -162,7 +162,9 @@ props: `<VStack alignment="leading" spacing={8}>`, `<Text font="headline">`,
|
|
|
162
162
|
Text is plain strings and numbers inside `<Text>`; nested `<Text>`s and
|
|
163
163
|
inline `<Image>`s make a rich text (`Text + Text`), and `italic`,
|
|
164
164
|
`underline`, `strikethrough`, `tracking` and `monospacedDigit` (tabular
|
|
165
|
-
digits, also a modifier on any view) are its own props.
|
|
165
|
+
digits, also a modifier on any view) are its own props. A nested `<Text>`'s
|
|
166
|
+
`font`, `bold`, `foregroundStyle` and `background` (a colour behind its
|
|
167
|
+
glyphs, as `AttributedString`'s `backgroundColor`) style its own run.
|
|
166
168
|
|
|
167
169
|
### Modifiers as props
|
|
168
170
|
|
|
@@ -420,6 +422,12 @@ titles when regular and the first column when compact.
|
|
|
420
422
|
/>
|
|
421
423
|
```
|
|
422
424
|
|
|
425
|
+
`sidebarWidth` is SwiftUI's `.navigationSplitViewColumnWidth` on the sidebar:
|
|
426
|
+
a number fixes the column's width; `{ min, ideal, max }` starts it at `ideal`
|
|
427
|
+
and, on a Mac, lets the user drag it between `min` and `max`. Without it the
|
|
428
|
+
sidebar is the platform's default (140 on a Mac, 320 on an iPad); Apple's Mac
|
|
429
|
+
apps use about 200.
|
|
430
|
+
|
|
423
431
|
### Platform
|
|
424
432
|
|
|
425
433
|
`usePlatform()` is `ios` or `macos`: the platform the app is drawn as. A
|
|
@@ -1090,7 +1098,7 @@ loader answers (`request`, `swiftdata`, `defaults`).
|
|
|
1090
1098
|
`Layout` (with `layoutValue`s, priorities, view spacing, explicit
|
|
1091
1099
|
alignment guides and a cache), `containerRelativeFrame`, `safeAreaInset`.
|
|
1092
1100
|
- **Content**: `Text` (with `Text + Text` runs, inline images, italic,
|
|
1093
|
-
underline, strikethrough, tracking), `Image` (symbols, catalog images
|
|
1101
|
+
underline, strikethrough, tracking, a run's background colour), `Image` (symbols, catalog images
|
|
1094
1102
|
with the `assets` option, remote images and `AsyncImage`), `Label` and its
|
|
1095
1103
|
styles, `LabeledContent`, `Link`, `Color` as a view, shapes (built-in,
|
|
1096
1104
|
custom paths, `UnevenRoundedRectangle`, `ContainerRelativeShape`) with
|
|
@@ -8,6 +8,14 @@ export interface ListProps<T = unknown> extends ViewModifiers {
|
|
|
8
8
|
listStyle?: ListStyle;
|
|
9
9
|
/** A `Form`: on a Mac the rows are laid out in the columns style (labels in a column before their controls). */
|
|
10
10
|
form?: boolean;
|
|
11
|
+
/** `.formStyle(_:)` on a `Form`: on a Mac `grouped` lays it out in grouped sections, `columns` (and the default) in the columns style. */
|
|
12
|
+
formStyle?: 'automatic' | 'grouped' | 'columns';
|
|
13
|
+
/**
|
|
14
|
+
* `.environment(\.defaultMinListRowHeight, _)`: the rows are at least this
|
|
15
|
+
* tall. Absent, the platform's default (44 on iOS, 24 on a Mac); a Mac app
|
|
16
|
+
* spaces a content list's rows like a sidebar's, 32 (`usePlatform`).
|
|
17
|
+
*/
|
|
18
|
+
minRowHeight?: number;
|
|
11
19
|
/** Edit mode (`EditButton`). */
|
|
12
20
|
editing?: BindingValue<boolean>;
|
|
13
21
|
/** `List(selection:)`: rows with a `tag` (or a `NavigationLink` value) become selectable; a `Set` selects several. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../src/components/lists.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SA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AAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,CAyBtD"}
|
|
@@ -19,11 +19,27 @@ export interface SplitSelection {
|
|
|
19
19
|
retract(key: object): void;
|
|
20
20
|
}
|
|
21
21
|
export declare const SplitSelectionContext: import("react").Context<SplitSelection | null>;
|
|
22
|
+
/**
|
|
23
|
+
* `.navigationSplitViewColumnWidth`: a number is a fixed width; `{ min, ideal,
|
|
24
|
+
* max }` a flexible one, the column starting at `ideal` and, on a Mac, dragged
|
|
25
|
+
* between `min` and `max`.
|
|
26
|
+
*/
|
|
27
|
+
export type SplitColumnWidth = number | {
|
|
28
|
+
min?: number;
|
|
29
|
+
ideal: number;
|
|
30
|
+
max?: number;
|
|
31
|
+
};
|
|
22
32
|
export interface NavigationSplitViewProps extends ViewModifiers {
|
|
23
33
|
sidebar: ReactNode;
|
|
24
34
|
detail: ReactNode;
|
|
25
35
|
columnVisibility?: BindingValue<NavigationSplitViewVisibility>;
|
|
26
36
|
onColumnVisibilityChange?: (visibility: NavigationSplitViewVisibility) => void;
|
|
37
|
+
/**
|
|
38
|
+
* The sidebar column's width (SwiftUI's `.navigationSplitViewColumnWidth` on
|
|
39
|
+
* the sidebar's content); absent, the platform's default (140 on a Mac,
|
|
40
|
+
* 320 on an iPad).
|
|
41
|
+
*/
|
|
42
|
+
sidebarWidth?: SplitColumnWidth;
|
|
27
43
|
}
|
|
28
44
|
export declare function NavigationSplitView(props: NavigationSplitViewProps): ReactNode;
|
|
29
45
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split.d.ts","sourceRoot":"","sources":["../../src/components/split.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAoE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzG,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,YA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EhF;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtF,MAAM,WAAW,wBAAyB,SAAQ,aAAa;IAC7D,OAAO,EAAE,SAAS,CAAC;IACnB,MAAM,EAAE,SAAS,CAAC;IAClB,gBAAgB,CAAC,EAAE,YAAY,CAAC,6BAA6B,CAAC,CAAC;IAC/D,wBAAwB,CAAC,EAAE,CAAC,UAAU,EAAE,6BAA6B,KAAK,IAAI,CAAC;IAC/E;;;;OAIG;IACH,YAAY,CAAC,EAAE,gBAAgB,CAAC;CACjC;AAQD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,GAAG,SAAS,CAyD9E;AAsDD;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,cAAc,GAAG,IAAI,EAC5B,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,MAAM,IAAI,EACjB,MAAM,UAAO,GACZ,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,KAAK,IAAI,CAchD;AAED,oGAAoG;AACpG,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,GAAG,SAAS,CAE9E"}
|
|
@@ -2,7 +2,12 @@ import { type ReactNode } from 'react';
|
|
|
2
2
|
import { type ViewModifiers } from '../modifiers';
|
|
3
3
|
import { type ColorValue } from '../values';
|
|
4
4
|
export interface TextProps extends ViewModifiers {
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Strings and numbers, nested `<Text>`s (`Text + Text`) and inline
|
|
7
|
+
* `<Image>`s. A nested text's `font`, `bold`, `foregroundStyle` and
|
|
8
|
+
* `background` (a colour behind its glyphs, as `AttributedString`'s
|
|
9
|
+
* `backgroundColor`) style its own run; the outer text's wrap the whole.
|
|
10
|
+
*/
|
|
6
11
|
children?: ReactNode;
|
|
7
12
|
italic?: boolean;
|
|
8
13
|
underline?: boolean | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/components/text.tsx"],"names":[],"mappings":"AACA,OAAO,EAA+C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEpF,OAAO,EAAoD,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAEpG,OAAO,EAA2B,KAAK,UAAU,EAAmC,MAAM,WAAW,CAAC;AAGtG,MAAM,WAAW,SAAU,SAAQ,aAAa;IAC9C
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/components/text.tsx"],"names":[],"mappings":"AACA,OAAO,EAA+C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEpF,OAAO,EAAoD,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAEpG,OAAO,EAA2B,KAAK,UAAU,EAAmC,MAAM,WAAW,CAAC;AAGtG,MAAM,WAAW,SAAU,SAAQ,aAAa;IAC9C;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,GAAG;QAAE,KAAK,CAAC,EAAE,UAAU,CAAA;KAAE,CAAC;IAC7C,aAAa,CAAC,EAAE,OAAO,GAAG;QAAE,KAAK,CAAC,EAAE,UAAU,CAAA;KAAE,CAAC;IACjD,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AA+FD,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAyBhD;AAED;;;GAGG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K,EAAE,aAAa,KAAK,IAAI,GAAG,IAAI,CAAC;IACvD,sEAAsE;IACtE,aAAa,CAAC,OAAO,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,IAAI,GAAG,IAAI,CAAC;IACjE,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IACrC,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/C,uEAAuE;IACvE,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;IAC5C,UAAU,IAAI,MAAM,CAAC;IACrB,iHAAiH;IACjH,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,8EAA8E;IAC9E,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;IACzC,gHAAgH;IAChH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5C,qGAAqG;IACrG,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,CAAC;IACvC,kGAAkG;IAClG,MAAM,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,GAAG,IAAI,CAAC;IACpC,qFAAqF;IACrF,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,wBAAgB,gBAAgB,IAAI,UAAU,CAmJ7C"}
|
package/dist/index.js
CHANGED
|
@@ -605,7 +605,7 @@ function createRemoteRoot() {
|
|
|
605
605
|
eventHandler?.(event);
|
|
606
606
|
},
|
|
607
607
|
setEnvironment(environment) {
|
|
608
|
-
if (lastEnvironment && lastEnvironment.colorScheme === environment.colorScheme && lastEnvironment.dynamicTypeSize === environment.dynamicTypeSize && lastEnvironment.horizontalSizeClass === environment.horizontalSizeClass && lastEnvironment.scenePhase === environment.scenePhase)
|
|
608
|
+
if (lastEnvironment && lastEnvironment.colorScheme === environment.colorScheme && lastEnvironment.dynamicTypeSize === environment.dynamicTypeSize && lastEnvironment.horizontalSizeClass === environment.horizontalSizeClass && lastEnvironment.scenePhase === environment.scenePhase && lastEnvironment.platform === environment.platform)
|
|
609
609
|
return;
|
|
610
610
|
lastEnvironment = environment;
|
|
611
611
|
environmentHandler?.(environment);
|
|
@@ -1917,9 +1917,19 @@ function runStyleOf(props, inherited, nested) {
|
|
|
1917
1917
|
if (props.foregroundStyle !== void 0) {
|
|
1918
1918
|
style.foreground = shapeStyle(Array.isArray(props.foregroundStyle) ? props.foregroundStyle[0] : props.foregroundStyle);
|
|
1919
1919
|
}
|
|
1920
|
+
const background = runBackground(props.background);
|
|
1921
|
+
if (background) style.background = background;
|
|
1920
1922
|
}
|
|
1921
1923
|
return style;
|
|
1922
1924
|
}
|
|
1925
|
+
function runBackground(value) {
|
|
1926
|
+
if (typeof value === "string") {
|
|
1927
|
+
const made = color(value);
|
|
1928
|
+
return "hierarchical" in made ? void 0 : made;
|
|
1929
|
+
}
|
|
1930
|
+
if (typeof value !== "object" || value === null || isValidElement(value) || "in" in value) return void 0;
|
|
1931
|
+
return "r" in value || "name" in value || "named" in value ? value : void 0;
|
|
1932
|
+
}
|
|
1923
1933
|
function segmentsOf(children, style, into) {
|
|
1924
1934
|
const visit = (node) => {
|
|
1925
1935
|
if (node === null || node === void 0 || typeof node === "boolean") return;
|
|
@@ -2147,6 +2157,10 @@ function NavigationLink(props) {
|
|
|
2147
2157
|
return applyModifiers(sb("navlink", linkProps, { tap }, label), modifiers);
|
|
2148
2158
|
}
|
|
2149
2159
|
const SplitSelectionContext = createContext(null);
|
|
2160
|
+
function splitColumnWidthHint(width) {
|
|
2161
|
+
if (typeof width === "number") return { min: width, ideal: width, max: width };
|
|
2162
|
+
return { ...width.min !== void 0 ? { min: width.min } : {}, ideal: width.ideal, ...width.max !== void 0 ? { max: width.max } : {} };
|
|
2163
|
+
}
|
|
2150
2164
|
function NavigationSplitView(props) {
|
|
2151
2165
|
const { own, modifiers } = splitProps(props);
|
|
2152
2166
|
const sizeClass = useHorizontalSizeClass();
|
|
@@ -2180,9 +2194,10 @@ function NavigationSplitView(props) {
|
|
|
2180
2194
|
const sidebarVisible = visibility !== "detailOnly";
|
|
2181
2195
|
const toggle = () => withAnimation(() => setVisibility(sidebarVisible ? "detailOnly" : "all"));
|
|
2182
2196
|
const detail = isValidElement(own.detail) && own.detail.type === NavigationStack ? own.detail : /* @__PURE__ */ jsx(NavigationStack, { children: own.detail });
|
|
2197
|
+
const sidebar = own.sidebarWidth !== void 0 ? sb("styled", { style: { splitColumnWidth: splitColumnWidthHint(own.sidebarWidth) } }, void 0, own.sidebar) : own.sidebar;
|
|
2183
2198
|
return applyModifiers(
|
|
2184
2199
|
sb("navsplit", { sidebarVisible }, { tap: toggle }, [
|
|
2185
|
-
/* @__PURE__ */ jsx(SplitColumn, { report, children: /* @__PURE__ */ jsx(NavigationStack, { children:
|
|
2200
|
+
/* @__PURE__ */ jsx(SplitColumn, { report, children: /* @__PURE__ */ jsx(NavigationStack, { children: sidebar }) }, "sidebar"),
|
|
2186
2201
|
/* @__PURE__ */ jsx(SplitColumn, { report: null, children: detail }, "detail")
|
|
2187
2202
|
]),
|
|
2188
2203
|
modifiers
|
|
@@ -5727,6 +5742,8 @@ function List(props) {
|
|
|
5727
5742
|
const [editing] = own.editing !== void 0 ? readBinding(own.editing) : [false];
|
|
5728
5743
|
const listProps = { style: own.listStyle ?? "insetGrouped" };
|
|
5729
5744
|
if (own.form) listProps["form"] = true;
|
|
5745
|
+
if (own.form && own.formStyle && own.formStyle !== "automatic") listProps["formStyle"] = own.formStyle;
|
|
5746
|
+
if (own.minRowHeight !== void 0 && Number.isFinite(own.minRowHeight)) listProps["minRowHeight"] = Math.max(0, own.minRowHeight);
|
|
5730
5747
|
if (editing) listProps["editing"] = true;
|
|
5731
5748
|
let selection = null;
|
|
5732
5749
|
const split = useContext(SplitSelectionContext);
|