@gjsify/adwaita-react-native 0.48.0 → 0.49.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
CHANGED
|
@@ -73,7 +73,7 @@ a GTK-only consumer does not need it installed.
|
|
|
73
73
|
| `Adw.ButtonContent` | `iconName`, `label`, `useUnderline`, `canShrink` | Four derivations from the core, including the 6px gap that is `border-spacing` and not `GtkBox:spacing` |
|
|
74
74
|
| `Adw.ButtonRow` | `title`, `onActivated` | A row that behaves like a button — always activatable, and holds no children at all |
|
|
75
75
|
| `Adw.Clamp` | `children`, `maximumSize` (600), `tighteningThreshold` (400) | Constrain a child's width and centre it, on libadwaita's easing curve |
|
|
76
|
-
| `Adw.ComboRow` | `title`, `subtitle`, `model`, `selected`, `useSubtitle`, `onNotifySelected` | Pick one item of a list. `model` keeps libadwaita's NAME and takes `@gjsify/adwaita-core`'s option vocabulary instead of a `Gio.ListModel` —
|
|
76
|
+
| `Adw.ComboRow` | `title`, `subtitle`, `model`, `selected`, `useSubtitle`, `onNotifySelected` | Pick one item of a list. `model` keeps libadwaita's NAME and takes `@gjsify/adwaita-core`'s option vocabulary instead of a `Gio.ListModel` — `@gjsify/gtk-host`'s ParamSpec seam builds the real `Gtk.StringList` (ADR 0046 § Amendment), and the GTK half memoises the array so an unrelated re-render does not reset the selection. One item or none is not a choice: no chevron, and the row is not activatable. `useSubtitle` MOVES the value into the subtitle rather than adding a second copy of it |
|
|
77
77
|
| `Adw.EntryRow` | `title`, `text`, `maxLength` (0), `editable` (true), `showApplyButton` (false), `onNotifyText`, `onApply`, `onEntryActivated` | The row IS the entry. `max-length` counts CHARACTERS |
|
|
78
78
|
| `Adw.ExpanderRow` | `title`, `subtitle`, `expanded` (false), `onNotifyExpanded`, `children` | `children` are the DISCLOSED rows. The header toggles, the disclosure does not |
|
|
79
79
|
| `Adw.HeaderBar` | `start`, `titleWidget`, `title`, `subtitle`, `end` | The three slots as PROPS, in draw order. No window controls: a phone has none |
|
|
@@ -84,7 +84,7 @@ a GTK-only consumer does not need it installed.
|
|
|
84
84
|
| `Adw.PasswordEntryRow` | `title`, `text`, `maxLength`, `editable`, `showApplyButton`, `onNotifyText`, `onApply`, `onEntryActivated` | `Adw.EntryRow`'s surface exactly — the subclass declares no property of its own. `maxLength` counts CHARACTERS through the core, never `TextInput.maxLength`'s UTF-16 units |
|
|
85
85
|
| `Adw.PreferencesGroup` | `children` (the rows), `title`, `description` | A titled card. Five visibility answers from one `derivePreferencesGroupHeader` call; the card hides itself at zero rows while its header stays |
|
|
86
86
|
| `Adw.PreferencesPage` | `children` (the groups), `title`, `iconName`, `name`, `description`, `descriptionCentered`, `useUnderline` | Four of the five properties are identity a view switcher reads, drawn by neither half — as in libadwaita. Only `description` is painted |
|
|
87
|
-
| `Adw.SpinRow` | `title`, `subtitle`, `value`, `adjustment`, `digits`, `onNotifyValue` | The range is one `adjustment` — `@gjsify/adwaita-core`'s portable `Gtk.Adjustment` (ADR 0047), the same value the two sibling Adwaita renderers take. Every mutation clamps, including a bound that moves under the value |
|
|
87
|
+
| `Adw.SpinRow` | `title`, `subtitle`, `value`, `adjustment`, `digits`, `onNotifyValue` | The range is one `adjustment` — `@gjsify/adwaita-core`'s portable `Gtk.Adjustment` (ADR 0047), the same value the two sibling Adwaita renderers take, built into the real one by `@gjsify/gtk-host`'s ParamSpec seam (ADR 0047 § Amendment). Every mutation clamps, including a bound that moves under the value |
|
|
88
88
|
| `Adw.Spinner` | `widthRequest`, `heightRequest` | The BOX and the RING are two numbers: an unbounded box around a ring capped at 64 |
|
|
89
89
|
| `Adw.StatusPage` | `children`, `iconName`, `title`, `description` | A centred empty state. The icon draws on GTK only |
|
|
90
90
|
| `Adw.SwitchRow` | `title`, `subtitle`, `active` (false), `onNotifyActive` | Controlled. The whole row toggles, not only the handle |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{jsx as e}from"@gjsify/gtk-host/react/jsx-runtime";import{ADW_COMBO_NO_SELECTION as t
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{jsx as e}from"@gjsify/gtk-host/react/jsx-runtime";import{ADW_COMBO_NO_SELECTION as t}from"@gjsify/adwaita-core";import{useCallback as n,useRef as r}from"react";const i=4294967295,comboSelectedIndex=e=>e===4294967295?t:e;function AdwComboRow({title:t,subtitle:i,model:a,selected:o,useSubtitle:s,onNotifySelected:c}){let l=r(null),u=n(()=>{let e=l.current;e!==null&&c?.(comboSelectedIndex(e.selected))},[c]);return e(`adw-combo-row`,{ref:l,title:t,subtitle:i,model:a,selected:o,"use-subtitle":s,onNotifySelected:c===void 0?void 0:u})}export{AdwComboRow,i as GTK_INVALID_LIST_POSITION,comboSelectedIndex};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{jsx as e}from"@gjsify/gtk-host/react/jsx-runtime";import{ADW_ADJUSTMENT_DEFAULTS as t,clampAdjustmentValue as n,normalizeAdjustment as r}from"@gjsify/adwaita-core";import
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{jsx as e}from"@gjsify/gtk-host/react/jsx-runtime";import{ADW_ADJUSTMENT_DEFAULTS as t,clampAdjustmentValue as n,normalizeAdjustment as r}from"@gjsify/adwaita-core";import{useCallback as i,useMemo as a,useRef as o}from"react";const s=t;function AdwSpinRow({title:t,subtitle:s,value:c,adjustment:l,digits:u,onNotifyValue:d}){let f=o(null),p=r(l),m=n(p,c??p.value),h=a(()=>({...p,value:m}),[p.lower,p.upper,p.stepIncrement,p.pageIncrement,p.pageSize,m]),g=i(()=>{let e=f.current;e!==null&&d?.(e.value)},[d]);return e(`adw-spin-row`,{ref:f,title:t,subtitle:s,adjustment:h,digits:u,onNotifyValue:d===void 0?void 0:g})}export{s as ADW_SPIN_ROW_DEFAULTS,AdwSpinRow};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @jsxImportSource @gjsify/gtk-host/react */
|
|
2
2
|
import { type ReactElement } from 'react';
|
|
3
|
+
import { type AdwAdjustment } from '@gjsify/adwaita-core';
|
|
3
4
|
import type { AdwSpinRowProps } from '../props.js';
|
|
4
5
|
/**
|
|
5
6
|
* The defaults both halves fall back to — re-exported from `@gjsify/adwaita-core`, which is
|
|
@@ -9,6 +10,6 @@ import type { AdwSpinRowProps } from '../props.js';
|
|
|
9
10
|
* rather than each against its own literals. They are not libadwaita's: a bare
|
|
10
11
|
* `Gtk.Adjustment` is 0…0 with a step of 0, which is a spin row that cannot move.
|
|
11
12
|
*/
|
|
12
|
-
export declare const ADW_SPIN_ROW_DEFAULTS:
|
|
13
|
+
export declare const ADW_SPIN_ROW_DEFAULTS: AdwAdjustment;
|
|
13
14
|
/** {@link import('./spin-row.js').AdwSpinRow} on GTK. */
|
|
14
15
|
export declare function AdwSpinRow({ title, subtitle, value, adjustment, digits, onNotifyValue, }: AdwSpinRowProps): ReactElement | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/adwaita-react-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.0",
|
|
4
4
|
"description": "Adwaita widgets with one API surface and two implementations — the real Adw.* widget on GTK4, React Native primitives on a phone",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -182,8 +182,8 @@
|
|
|
182
182
|
"design-system"
|
|
183
183
|
],
|
|
184
184
|
"dependencies": {
|
|
185
|
-
"@gjsify/adwaita-core": "^0.
|
|
186
|
-
"@gjsify/gtk-host": "^0.
|
|
185
|
+
"@gjsify/adwaita-core": "^0.49.0",
|
|
186
|
+
"@gjsify/gtk-host": "^0.49.0"
|
|
187
187
|
},
|
|
188
188
|
"peerDependencies": {
|
|
189
189
|
"react": "^19.2.0",
|
|
@@ -198,8 +198,8 @@
|
|
|
198
198
|
"@girs/adw-1": "4.6.0",
|
|
199
199
|
"@girs/gjs": "4.6.0",
|
|
200
200
|
"@girs/gtk-4.0": "4.6.0",
|
|
201
|
-
"@gjsify/cli": "^0.
|
|
202
|
-
"@gjsify/unit": "^0.
|
|
201
|
+
"@gjsify/cli": "^0.49.0",
|
|
202
|
+
"@gjsify/unit": "^0.49.0",
|
|
203
203
|
"@types/node": "^25.9.2",
|
|
204
204
|
"@types/react": "^19.2.2",
|
|
205
205
|
"@types/react-test-renderer": "^19.1.0",
|