@swiftbrowser/react 0.9.11 → 0.9.12
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 +5 -1
- package/dist/components/split.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -304,7 +304,11 @@ it as on iOS: `NavigationSplitView` is two columns when regular (the
|
|
|
304
304
|
sidebar's toggle button hides and shows the sidebar) and one stack when
|
|
305
305
|
compact, which pushes the detail while a `List(selection:)` in the sidebar
|
|
306
306
|
has a selection and clears it on back (lists without a selection, and
|
|
307
|
-
anything a sheet, popover or inspector presents, have no say)
|
|
307
|
+
anything a sheet, popover or inspector presents, have no say). A detail
|
|
308
|
+
that is a `NavigationStack` with a `path` binding keeps what it pushes in
|
|
309
|
+
that binding in both widths, so an app that mirrors the path in the URL
|
|
310
|
+
sees the same path on a phone as in a wide window, and a path it starts
|
|
311
|
+
with (a reload onto a deep link) is shown over the detail; `.inspector` is a trailing panel when
|
|
308
312
|
regular and a sheet when compact; `Table` shows every column under sortable
|
|
309
313
|
titles when regular and the first column when compact.
|
|
310
314
|
|
|
@@ -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,YAAY,CAAC;AAI5D,OAAO,EAA8B,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAI9E,MAAM,MAAM,6BAA6B,GAAG,WAAW,GAAG,KAAK,GAAG,cAAc,GAAG,YAAY,CAAC;AAEhG;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,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AE,6BAA6B,KAAK,IAAI,CAAC;CAChF;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,GAAG,SAAS,CAqD9E;AAwCD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,EAAE,MAAM,UAAO,GAAG,IAAI,CAO/H;AAED,oGAAoG;AACpG,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,GAAG,SAAS,CAE9E"}
|
package/dist/index.js
CHANGED
|
@@ -1416,7 +1416,9 @@ function SplitColumn({ report, children }) {
|
|
|
1416
1416
|
return /* @__PURE__ */ jsx(NavigationContext.Provider, { value: null, children: /* @__PURE__ */ jsx(SplitSelectionContext.Provider, { value: report, children }) });
|
|
1417
1417
|
}
|
|
1418
1418
|
function CompactSplit({ sidebar, detail, selected, clear }) {
|
|
1419
|
-
const [
|
|
1419
|
+
const [internal, setInternal] = useState([]);
|
|
1420
|
+
const detailStack = isValidElement(detail) && detail.type === NavigationStack ? detail.props : null;
|
|
1421
|
+
const [extra, setExtra] = detailStack?.path !== void 0 ? readBinding(detailStack.path, detailStack.onPathChange) : [internal, setInternal];
|
|
1420
1422
|
const base = selected ? [{ view: /* @__PURE__ */ jsx(DetailScope, { children: detail }) }] : [];
|
|
1421
1423
|
const path = [...base, ...extra];
|
|
1422
1424
|
const setPath = (next) => {
|