@swiftbrowser/react 0.26.3 → 0.26.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 +2 -1
- package/dist/components/lists.d.ts +4 -2
- package/dist/components/lists.d.ts.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/modifiers.d.ts +2 -0
- package/dist/modifiers.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -189,7 +189,8 @@ ordered list. A layered style is an array: `foregroundStyle={['white',
|
|
|
189
189
|
`symbolRenderingMode="palette"` symbol draws its disc in. The environment
|
|
190
190
|
modifiers (`buttonStyle`, `controlSize`, `pickerStyle`, `toggleStyle`, `labelsHidden`,
|
|
191
191
|
`symbolRenderingMode`) are React contexts the views below read, and
|
|
192
|
-
`navigationTitle`, `
|
|
192
|
+
`navigationTitle`, `navigationSubtitle` (the Mac idiom's title bar draws it; iOS
|
|
193
|
+
ignores it), `toolbar`, `toolbarRole`, `toolbarVisibility` (the
|
|
193
194
|
navigation bar or the bottom bar hidden, as `.toolbar(.hidden, for:)`),
|
|
194
195
|
`statusBarHidden`, `searchable`, `sheet`, `alert`,
|
|
195
196
|
`presentationDetents` and `preferredColorScheme` attach to the enclosing
|
|
@@ -6,6 +6,8 @@ import { type ViewModifiers } from '../modifiers';
|
|
|
6
6
|
export type Selection<T> = T | null | Set<T>;
|
|
7
7
|
export interface ListProps<T = unknown> extends ViewModifiers {
|
|
8
8
|
listStyle?: ListStyle;
|
|
9
|
+
/** A `Form`: on a Mac the rows are laid out in the columns style (labels in a column before their controls). */
|
|
10
|
+
form?: boolean;
|
|
9
11
|
/** Edit mode (`EditButton`). */
|
|
10
12
|
editing?: BindingValue<boolean>;
|
|
11
13
|
/** `List(selection:)`: rows with a `tag` (or a `NavigationLink` value) become selectable; a `Set` selects several. */
|
|
@@ -14,8 +16,8 @@ export interface ListProps<T = unknown> extends ViewModifiers {
|
|
|
14
16
|
children?: ReactNode;
|
|
15
17
|
}
|
|
16
18
|
export declare function List<T = unknown>(props: ListProps<T>): ReactNode;
|
|
17
|
-
/** `Form { }`: an inset grouped list, as the shim draws it. */
|
|
18
|
-
export declare function Form(props: Omit<ListProps, 'listStyle' | 'selection' | 'onSelectionChange'>): ReactNode;
|
|
19
|
+
/** `Form { }`: an inset grouped list, as the shim draws it; on a Mac its rows are laid out in the columns style. */
|
|
20
|
+
export declare function Form(props: Omit<ListProps, 'listStyle' | 'selection' | 'onSelectionChange' | 'form'>): ReactNode;
|
|
19
21
|
export interface SectionProps extends ViewModifiers {
|
|
20
22
|
/** A string or a `<Text>` becomes the section's header text; any other view is a view header. */
|
|
21
23
|
header?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../src/components/lists.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAA2D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEhG,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAE5D,OAAO,EAA4C,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAW5F,gEAAgE;AAChE,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AAE7C,MAAM,WAAW,SAAS,CAAC,CAAC,GAAG,OAAO,CAAE,SAAQ,aAAa;IAC3D,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,gCAAgC;IAChC,OAAO,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IAChC,sHAAsH;IACtH,SAAS,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;IACtE,iBAAiB,CAAC,EAAE,CAA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AC,CAAC,GAAG,SAAS,CAoDhE;AAED,oHAAoH;AACpH,wBAAgB,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,WAAW,GAAG,WAAW,GAAG,mBAAmB,GAAG,MAAM,CAAC,GAAG,SAAS,CAEhH;AAED,MAAM,WAAW,YAAa,SAAQ,aAAa;IACjD,iGAAiG;IACjG,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,2HAA2H;IAC3H,UAAU,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IACnC,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,CAyBtD"}
|
package/dist/index.js
CHANGED
|
@@ -667,7 +667,7 @@ function RegisterDestination({ destination }) {
|
|
|
667
667
|
navigation?.registerDestination(destination);
|
|
668
668
|
return null;
|
|
669
669
|
}
|
|
670
|
-
const SCREEN_PROPS = ["title", "displayMode", "toolbarRole", "navigationBarHidden", "bottomBarHidden", "statusBarHidden"];
|
|
670
|
+
const SCREEN_PROPS = ["title", "subtitle", "displayMode", "toolbarRole", "navigationBarHidden", "bottomBarHidden", "statusBarHidden"];
|
|
671
671
|
function screenPrefs(props, key) {
|
|
672
672
|
const picked = {};
|
|
673
673
|
for (const name of SCREEN_PROPS) if (name in props) picked[name] = props[name];
|
|
@@ -2530,6 +2530,7 @@ const MODIFIER_KEYS = /* @__PURE__ */ new Set([
|
|
|
2530
2530
|
"toggleStyle",
|
|
2531
2531
|
"labelsHidden",
|
|
2532
2532
|
"navigationTitle",
|
|
2533
|
+
"navigationSubtitle",
|
|
2533
2534
|
"navigationBarTitleDisplayMode",
|
|
2534
2535
|
"toolbarRole",
|
|
2535
2536
|
"toolbarVisibility",
|
|
@@ -2949,6 +2950,9 @@ function apply(key, value, node, sides) {
|
|
|
2949
2950
|
case "navigationTitle":
|
|
2950
2951
|
sides.push(sb(PREF_KIND, { title: value }, void 0, void 0, "navscreen"));
|
|
2951
2952
|
return node;
|
|
2953
|
+
case "navigationSubtitle":
|
|
2954
|
+
sides.push(sb(PREF_KIND, { subtitle: value }, void 0, void 0, "navscreen"));
|
|
2955
|
+
return node;
|
|
2952
2956
|
case "navigationBarTitleDisplayMode":
|
|
2953
2957
|
sides.push(sb(PREF_KIND, { displayMode: value }, void 0, void 0, "navscreen"));
|
|
2954
2958
|
return node;
|
|
@@ -5722,6 +5726,7 @@ function List(props) {
|
|
|
5722
5726
|
const { own, modifiers } = splitProps(props);
|
|
5723
5727
|
const [editing] = own.editing !== void 0 ? readBinding(own.editing) : [false];
|
|
5724
5728
|
const listProps = { style: own.listStyle ?? "insetGrouped" };
|
|
5729
|
+
if (own.form) listProps["form"] = true;
|
|
5725
5730
|
if (editing) listProps["editing"] = true;
|
|
5726
5731
|
let selection = null;
|
|
5727
5732
|
const split = useContext(SplitSelectionContext);
|
|
@@ -5765,7 +5770,7 @@ function List(props) {
|
|
|
5765
5770
|
);
|
|
5766
5771
|
}
|
|
5767
5772
|
function Form(props) {
|
|
5768
|
-
return /* @__PURE__ */ jsx(List, { ...props });
|
|
5773
|
+
return /* @__PURE__ */ jsx(List, { ...props, form: true });
|
|
5769
5774
|
}
|
|
5770
5775
|
function Section(props) {
|
|
5771
5776
|
const { own, modifiers } = splitProps(props);
|