@jsenv/navi 0.29.521 → 0.29.523
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/dist/dev/jsenv_navi.js +144 -49
- package/dist/dev/jsenv_navi.js.map +16 -16
- package/dist/jsenv_navi.js +144 -49
- package/dist/jsenv_navi.js.map +16 -16
- package/docs/AI_INSTRUCTIONS.md +7 -5
- package/docs/actions.md +42 -4
- package/docs/data_states.md +8 -0
- package/docs/drag_to_travel.md +16 -6
- package/docs/navigation.md +17 -0
- package/docs/resource.md +38 -0
- package/package.json +2 -2
package/dist/dev/jsenv_navi.js
CHANGED
|
@@ -3956,11 +3956,13 @@ const actionWeakMap = new WeakMap();
|
|
|
3956
3956
|
* than a first load (data_states.md). Called at the start of every run whose
|
|
3957
3957
|
* value is undefined; the answer replaces it as usual, and `undefined` means
|
|
3958
3958
|
* "nothing known". A resource `GET` uses it to draw the row its store holds.
|
|
3959
|
-
* @param {boolean} [rootOptions.inheritData=
|
|
3960
|
-
* to new params starts the new instance
|
|
3961
|
-
* (see createActionProxyFromSignal). For an answer that
|
|
3962
|
-
*
|
|
3963
|
-
*
|
|
3959
|
+
* @param {boolean} [rootOptions.inheritData=false] - `true`: a binding moving
|
|
3960
|
+
* to new params starts the new instance holding the previous params' answer
|
|
3961
|
+
* until its own lands (see createActionProxyFromSignal). For an answer that
|
|
3962
|
+
* stands in while the next one comes (a list of search results), not for one
|
|
3963
|
+
* that would say something false about the new params (a profile, drawn under
|
|
3964
|
+
* the next person's name). A resource declares it for each of its reads:
|
|
3965
|
+
* docs/resource.md, "What a read shows while its params move".
|
|
3964
3966
|
* @param {{ ms?: number, max?: number }} [rootOptions.keep] - how long an
|
|
3965
3967
|
* answer stays good once it has landed. Without it an answer lives exactly as
|
|
3966
3968
|
* long as something references it: the screen that asked goes away, and
|
|
@@ -4021,7 +4023,7 @@ const createAction = (callback, rootOptions = {}) => {
|
|
|
4021
4023
|
resultToValue,
|
|
4022
4024
|
valueToData,
|
|
4023
4025
|
provisionalValue,
|
|
4024
|
-
inheritData =
|
|
4026
|
+
inheritData = false,
|
|
4025
4027
|
dataDefault,
|
|
4026
4028
|
data = dataDefault,
|
|
4027
4029
|
|
|
@@ -4260,6 +4262,11 @@ const createAction = (callback, rootOptions = {}) => {
|
|
|
4260
4262
|
* The instance follows where the signal settles, never a value it only
|
|
4261
4263
|
* passed through: a signal back where it started before the delay elapses
|
|
4262
4264
|
* asks nothing.
|
|
4265
|
+
* @param {boolean} [options.inheritData] - `inheritData` of createAction,
|
|
4266
|
+
* said for this binding, which it overrides: one action can serve a search
|
|
4267
|
+
* (the previous results stand in) and a page naming someone (they would be
|
|
4268
|
+
* someone else's). Only for a signal; params that cannot change hand over
|
|
4269
|
+
* nothing.
|
|
4263
4270
|
*/
|
|
4264
4271
|
const bindParams = (newParamsOrSignal, options = {}) => {
|
|
4265
4272
|
if (newParamsOrSignal === null) {
|
|
@@ -4821,15 +4828,14 @@ const createAction = (callback, rootOptions = {}) => {
|
|
|
4821
4828
|
* @param {boolean} options.rerunOnChange - Ensures the action is rerun every time a signal value is modified.
|
|
4822
4829
|
* This enables live updates - for example, performing an HTTP GET request every time
|
|
4823
4830
|
* a list of filters changes, providing real-time results without user interaction.
|
|
4824
|
-
* @param {boolean} options.inheritData -
|
|
4825
|
-
*
|
|
4826
|
-
*
|
|
4827
|
-
* This keeps the facade in sync with the latest known data: `action.dataSignal.value` only changes when a
|
|
4831
|
+
* @param {boolean} options.inheritData - Whether a new target action starts with the previous target's value
|
|
4832
|
+
* and error, instead of nothing. Defaults to what the action declares (createAction).
|
|
4833
|
+
* When true, the facade stays on the latest known data: `action.dataSignal.value` only changes when a
|
|
4828
4834
|
* new action completes, not when it starts loading. Code that needs to distinguish loading state can still
|
|
4829
4835
|
* check `action.runningState`, while code that just reads `action.data` always sees the most recent
|
|
4830
4836
|
* available data — even while a newer action is in flight.
|
|
4831
|
-
*
|
|
4832
|
-
*
|
|
4837
|
+
* It also serves "Apply Filters" workflows where parameters change but the action only reruns on an
|
|
4838
|
+
* explicit user trigger: the previous results remain visible until the new action completes.
|
|
4833
4839
|
* @param {function} options.onChange - Optional callback triggered when the target action changes
|
|
4834
4840
|
*/
|
|
4835
4841
|
const createActionProxyFromSignal = (
|
|
@@ -4838,7 +4844,7 @@ const createActionProxyFromSignal = (
|
|
|
4838
4844
|
{
|
|
4839
4845
|
runOnce = false,
|
|
4840
4846
|
rerunOnChange = false,
|
|
4841
|
-
inheritData =
|
|
4847
|
+
inheritData = getActionPrivateProperties(action).inheritData,
|
|
4842
4848
|
onChange,
|
|
4843
4849
|
syncParams,
|
|
4844
4850
|
paramsSettlingSignal = NOT_SETTLING_SIGNAL,
|
|
@@ -4870,16 +4876,10 @@ const createActionProxyFromSignal = (
|
|
|
4870
4876
|
let currentActionPrivateProperties = getActionPrivateProperties(action);
|
|
4871
4877
|
let actionTargetPreviousWeakRef = null;
|
|
4872
4878
|
|
|
4873
|
-
// An action whose answer for other params would be false for these (a
|
|
4874
|
-
// resource GET: another row) says so itself, and is not handed it. What it
|
|
4875
|
-
// does not know stays unknown: a skeleton, or its provisionalValue, never a
|
|
4876
|
-
// different row.
|
|
4877
|
-
const inheritsAnswer =
|
|
4878
|
-
inheritData && getActionPrivateProperties(action).inheritData;
|
|
4879
4879
|
const createTarget = (params) => {
|
|
4880
4880
|
// `undefined` is "nothing to ask": no answer is coming to replace a stand-in,
|
|
4881
4881
|
// and that one instance is shared by every binding of the action.
|
|
4882
|
-
if (
|
|
4882
|
+
if (inheritData && params !== undefined) {
|
|
4883
4883
|
const previousActionTarget = actionTargetPreviousWeakRef?.deref();
|
|
4884
4884
|
const previousTarget = previousActionTarget || action;
|
|
4885
4885
|
return action.bindParams(params, {
|
|
@@ -5298,6 +5298,8 @@ const isPlainObject$2 = (obj) => {
|
|
|
5298
5298
|
* ```
|
|
5299
5299
|
* The action will not fire while the user is actively changing filters; it fires once
|
|
5300
5300
|
* they pause for half a second.
|
|
5301
|
+
* @param {boolean} [options.inheritData] - whether the previous params' answer stands in until
|
|
5302
|
+
* the next one lands. By default what the action declares (see `inheritData` on createAction).
|
|
5301
5303
|
* @returns {object} the instance bound to the derived params: the one to read
|
|
5302
5304
|
* (`useAsyncData`), since the answer lands there and never on `action` itself.
|
|
5303
5305
|
*/
|
|
@@ -10063,6 +10065,9 @@ const ROUTE_ACTION_BINDING_OPTIONS = new Set([
|
|
|
10063
10065
|
* still before the action runs on them: a search param a field writes as
|
|
10064
10066
|
* the person types asks once typing stops (see `bindParams` in
|
|
10065
10067
|
* docs/actions.md).
|
|
10068
|
+
* @param {boolean} [options.inheritData] - whether the previous params' answer
|
|
10069
|
+
* stands in until the next one lands, for this route action. By default what
|
|
10070
|
+
* the action declares (see docs/actions.md, "While the next answer comes").
|
|
10066
10071
|
*/
|
|
10067
10072
|
const routeAction = (
|
|
10068
10073
|
routeOrRoutes,
|
|
@@ -29983,6 +29988,10 @@ const SCOPED_MANY_OPTIONS = new Set([
|
|
|
29983
29988
|
* relationship method, never as an `op`/`type` discriminator dispatched inside one
|
|
29984
29989
|
* verb's callback.
|
|
29985
29990
|
*
|
|
29991
|
+
* Bound to a signal, a read of one item starts new params on nothing and a list on
|
|
29992
|
+
* the previous list; a binding overrides it with `inheritData` (docs/resource.md,
|
|
29993
|
+
* "What a read shows while its params move").
|
|
29994
|
+
*
|
|
29986
29995
|
* @param {string} name - resource name, used in action names and error messages
|
|
29987
29996
|
* @param {Object} restCallbacks - `{ idKey, uniqueKeys, rerunOn, dependencies, persist, writes, GET, GET_MANY, GET_RANGE, POST, POST_MANY, PUT, PUT_MANY, PATCH, PATCH_MANY, DELETE, DELETE_MANY }`
|
|
29988
29997
|
* @param {string} [restCallbacks.idKey] - primary key property, defaults to `"id"`
|
|
@@ -30525,6 +30534,8 @@ const createResource = (
|
|
|
30525
30534
|
paramScope,
|
|
30526
30535
|
},
|
|
30527
30536
|
name: `${name}.${verb}`,
|
|
30537
|
+
// Another params' answer is another owner's.
|
|
30538
|
+
inheritData: verb !== "GET",
|
|
30528
30539
|
resultToValue: (result, action) => {
|
|
30529
30540
|
if (verb === "DELETE") {
|
|
30530
30541
|
if (!isProps(result) && !primitiveCanBeId(result)) {
|
|
@@ -30750,6 +30761,8 @@ ${name}.many("${propertyName}") source location: ${declarationSite}`,
|
|
|
30750
30761
|
return createAction(callback, {
|
|
30751
30762
|
meta: { verb, isMany: false, paramScope },
|
|
30752
30763
|
name: `${name}.${verb}`,
|
|
30764
|
+
// Another params' answer is another row.
|
|
30765
|
+
inheritData: verb !== "GET",
|
|
30753
30766
|
resultToValue: (result, action) => {
|
|
30754
30767
|
if (verb === "DELETE") {
|
|
30755
30768
|
if (!Array.isArray(result) || result.length !== 2) {
|
|
@@ -30852,6 +30865,9 @@ ${name}.many("${propertyName}") source location: ${declarationSite}`,
|
|
|
30852
30865
|
return createAction(callback, {
|
|
30853
30866
|
meta: { verb, isMany: true, paramScope },
|
|
30854
30867
|
name: `${name}.${verb}[many]`,
|
|
30868
|
+
// A list standing in for the next one beats a skeleton. A screen where
|
|
30869
|
+
// the previous owner's list would be false says so on its binding.
|
|
30870
|
+
inheritData: true,
|
|
30855
30871
|
resultToValue: (result, action) => {
|
|
30856
30872
|
if (verb === "GET") {
|
|
30857
30873
|
if (!isProps(result)) {
|
|
@@ -31064,6 +31080,8 @@ ${name}.many("${propertyName}") source location: ${declarationSite}`,
|
|
|
31064
31080
|
meta: writeName
|
|
31065
31081
|
? { verb, isMany: false, paramScope, writeName, writeRerunOn }
|
|
31066
31082
|
: { verb, isMany: false, paramScope },
|
|
31083
|
+
// Another params' answer is another owner's.
|
|
31084
|
+
inheritData: verb !== "GET",
|
|
31067
31085
|
resultToValue: (result) => {
|
|
31068
31086
|
if (!Array.isArray(result) || result.length !== 2) {
|
|
31069
31087
|
throw new TypeError(
|
|
@@ -31307,6 +31325,10 @@ ${name}.many("${propertyName}") source location: ${declarationSite}`,
|
|
|
31307
31325
|
meta: writeName
|
|
31308
31326
|
? { verb, isMany, paramScope, writeName, writeRerunOn }
|
|
31309
31327
|
: { verb, isMany, paramScope },
|
|
31328
|
+
// One item: another params' answer is another row. A list standing in
|
|
31329
|
+
// for the next one beats a skeleton, and a screen where the previous
|
|
31330
|
+
// owner's list would be false says so on its binding.
|
|
31331
|
+
inheritData: isMany || verb !== "GET",
|
|
31310
31332
|
resultToValue: (result) => {
|
|
31311
31333
|
if (!Array.isArray(result) || result.length < 2) {
|
|
31312
31334
|
throw new TypeError(
|
|
@@ -31640,10 +31662,11 @@ const createRestActionFactoryForRoot = (
|
|
|
31640
31662
|
// undefined so a screen can tell "not asked yet" from "answered: none".
|
|
31641
31663
|
valueToData: (idArray) =>
|
|
31642
31664
|
idArray === undefined ? undefined : store.selectAll(idArray),
|
|
31665
|
+
// A binding moving to new params hands over the previous answer: a list
|
|
31666
|
+
// standing in for the next one beats a skeleton.
|
|
31667
|
+
inheritData: true,
|
|
31643
31668
|
// The rows the page kept from the previous document (kept_reads.js),
|
|
31644
|
-
// drawn while the request is out
|
|
31645
|
-
// hands over the previous answer when there are none: a list standing
|
|
31646
|
-
// in for the next one beats a skeleton.
|
|
31669
|
+
// drawn while the request is out when nothing was handed over.
|
|
31647
31670
|
provisionalValue:
|
|
31648
31671
|
verb === "GET"
|
|
31649
31672
|
? (params, action) =>
|
|
@@ -32529,7 +32552,9 @@ const useForceRender = () => {
|
|
|
32529
32552
|
* Stale data is always returned: the previous `data` remains available while
|
|
32530
32553
|
* the action re-runs and after a run has failed, so a screen that had something
|
|
32531
32554
|
* to show never has it taken away. What is drawn over it — a loading indicator,
|
|
32532
|
-
* the error, nothing — is entirely up to the component.
|
|
32555
|
+
* the error, nothing — is entirely up to the component. A binding moving to other
|
|
32556
|
+
* params is another question: what it holds until its answer lands is what
|
|
32557
|
+
* `inheritData` says (createAction, docs/actions.md).
|
|
32533
32558
|
*
|
|
32534
32559
|
* `loading` covers the delay of a debounced binding
|
|
32535
32560
|
* (`bindParams(paramsSignal, { debounce })`, `actionRunEffect({ debounce })`)
|
|
@@ -41778,6 +41803,27 @@ const css$16 = /* css */`.navi_route_travel {
|
|
|
41778
41803
|
}
|
|
41779
41804
|
`;
|
|
41780
41805
|
|
|
41806
|
+
/**
|
|
41807
|
+
* The page a reader is still on while a hand travels: `{ route, params }`, the
|
|
41808
|
+
* page the travel set off from, or `null` when the URL is the truth.
|
|
41809
|
+
*
|
|
41810
|
+
* A travel changes the URL before it arrives, so what reads the URL reads where
|
|
41811
|
+
* the hand is heading. A counter, a title or a breadcrumb around the box must
|
|
41812
|
+
* not move for a pull that is let go of: it reads this first. It holds for as
|
|
41813
|
+
* long as the pictures move, whichever way they end up going, and is back to
|
|
41814
|
+
* `null` when they stop, which is when `scrollsnapchange` fires and a pager's
|
|
41815
|
+
* `settledPage` changes. A page walked whole under the hand has arrived too. A
|
|
41816
|
+
* travel no hand set off (a tab pressed, a wheel) holds nothing: it goes where
|
|
41817
|
+
* it goes.
|
|
41818
|
+
*
|
|
41819
|
+
* One for the document, as there is one view transition at a time. `route` says
|
|
41820
|
+
* which row, for a page holding several boxes.
|
|
41821
|
+
*/
|
|
41822
|
+
const routeTravelSettledPageSignal = signal(null);
|
|
41823
|
+
// Which travel wrote it, the only one that may clear it: a travel ending after
|
|
41824
|
+
// another has taken over leaves that one's answer alone.
|
|
41825
|
+
let travelHoldingSettledPage = null;
|
|
41826
|
+
|
|
41781
41827
|
/**
|
|
41782
41828
|
* @type {import("preact").FunctionComponent<{
|
|
41783
41829
|
* routes?: Array<object|{route: object, params?: object}>,
|
|
@@ -41901,8 +41947,8 @@ const RouteTravel = ({
|
|
|
41901
41947
|
const travel = {
|
|
41902
41948
|
page,
|
|
41903
41949
|
// The page this set off from, kept rather than looked up again: the URL
|
|
41904
|
-
// changes
|
|
41905
|
-
//
|
|
41950
|
+
// changes as it sets off, so a moment later nothing on screen remembers
|
|
41951
|
+
// where it started.
|
|
41906
41952
|
fromPage,
|
|
41907
41953
|
direction,
|
|
41908
41954
|
scrub,
|
|
@@ -41918,6 +41964,8 @@ const RouteTravel = ({
|
|
|
41918
41964
|
element: elementRef.current
|
|
41919
41965
|
};
|
|
41920
41966
|
travelRef.current = travel;
|
|
41967
|
+
travelHoldingSettledPage = travel;
|
|
41968
|
+
routeTravelSettledPageSignal.value = scrub ? fromPage : null;
|
|
41921
41969
|
// A press landing on a playing travel lands on the document root: the box
|
|
41922
41970
|
// is captured by the transition and cannot be pointed at, so neither its
|
|
41923
41971
|
// touch-action nor its own touchmove listener is on the touch's path. Left
|
|
@@ -41978,6 +42026,16 @@ const RouteTravel = ({
|
|
|
41978
42026
|
// screen and an error nobody asked for.
|
|
41979
42027
|
const renderWait = armRouteRenderWait();
|
|
41980
42028
|
const viewTransition = startViewTransition(async () => {
|
|
42029
|
+
// Let go of too early before the browser got here, a frame or several on
|
|
42030
|
+
// a slow phone. Skipping a transition does not cancel this callback, and
|
|
42031
|
+
// the router asked from here would take the page anyway, with nobody left
|
|
42032
|
+
// to bring it back.
|
|
42033
|
+
if (travel.reverting) {
|
|
42034
|
+
renderWait.stop();
|
|
42035
|
+
releaseRendering();
|
|
42036
|
+
return;
|
|
42037
|
+
}
|
|
42038
|
+
travel.calledBack = true;
|
|
41981
42039
|
// Whatever is awaited here must be able to resolve without the page being
|
|
41982
42040
|
// rendered: the document is frozen for the whole of this callback, and a
|
|
41983
42041
|
// frame never comes — waiting for one waits until the browser gives up on
|
|
@@ -42228,7 +42286,9 @@ const RouteTravel = ({
|
|
|
42228
42286
|
}
|
|
42229
42287
|
travel.viewTransition.skipTransition();
|
|
42230
42288
|
} finally {
|
|
42231
|
-
|
|
42289
|
+
// Refused before the browser called back, nothing was swapped: the
|
|
42290
|
+
// offset is still the page's own, and no render is on its way to say so.
|
|
42291
|
+
if (travel.scrollsDocument && travel.calledBack) {
|
|
42232
42292
|
// The page coming back was read somewhere else, and the offset
|
|
42233
42293
|
// currently on the document is the one the page that came in put
|
|
42234
42294
|
// there. Given back once the page is really back — the render is
|
|
@@ -42353,6 +42413,10 @@ const RouteTravel = ({
|
|
|
42353
42413
|
travel.ended = true;
|
|
42354
42414
|
travel.dropHold?.();
|
|
42355
42415
|
travel.dropHold = null;
|
|
42416
|
+
if (travelHoldingSettledPage === travel) {
|
|
42417
|
+
travelHoldingSettledPage = null;
|
|
42418
|
+
routeTravelSettledPageSignal.value = null;
|
|
42419
|
+
}
|
|
42356
42420
|
if (travelRef.current === travel) {
|
|
42357
42421
|
document.documentElement.removeEventListener("touchmove", keepTouchRefusable);
|
|
42358
42422
|
}
|
|
@@ -42442,25 +42506,46 @@ const RouteTravel = ({
|
|
|
42442
42506
|
if (!page || !size || scrollRoomTowards(target, elementRef.current, axis, sign)) {
|
|
42443
42507
|
return false;
|
|
42444
42508
|
}
|
|
42445
|
-
if (CAN_KEEP_PICTURE) {
|
|
42446
|
-
beginTravel({
|
|
42447
|
-
page,
|
|
42448
|
-
fromPage: pages[currentIndex],
|
|
42449
|
-
direction: sign > 0 ? "back" : "forward",
|
|
42450
|
-
scrub: true,
|
|
42451
|
-
change: () => travelTo(page, "drag")
|
|
42452
|
-
});
|
|
42453
|
-
} else {
|
|
42509
|
+
if (!CAN_KEEP_PICTURE) {
|
|
42454
42510
|
travelRef.current = {
|
|
42455
42511
|
page,
|
|
42456
42512
|
noPicture: true,
|
|
42457
42513
|
ended: false
|
|
42458
42514
|
};
|
|
42515
|
+
return {
|
|
42516
|
+
size,
|
|
42517
|
+
travelBack: sign > 0,
|
|
42518
|
+
travelOn: sign < 0
|
|
42519
|
+
};
|
|
42459
42520
|
}
|
|
42460
42521
|
return {
|
|
42461
42522
|
size,
|
|
42462
42523
|
travelBack: sign > 0,
|
|
42463
|
-
travelOn: sign < 0
|
|
42524
|
+
travelOn: sign < 0,
|
|
42525
|
+
// A page change costs what a slide does not, whatever the hand does
|
|
42526
|
+
// next: a navigation, a render, the requests of the page arriving, and
|
|
42527
|
+
// those of the page coming back. So nothing is asked of the router
|
|
42528
|
+
// until the hand has really pulled, and the neighbour is read then:
|
|
42529
|
+
// turned around before that, there is nothing to undo.
|
|
42530
|
+
setOff: ({
|
|
42531
|
+
sign: signNow
|
|
42532
|
+
}) => {
|
|
42533
|
+
const pageThatWay = signNow > 0 ? pages[currentIndex - 1] : pages[currentIndex + 1];
|
|
42534
|
+
if (!pageThatWay || travelRef.current) {
|
|
42535
|
+
return false;
|
|
42536
|
+
}
|
|
42537
|
+
beginTravel({
|
|
42538
|
+
page: pageThatWay,
|
|
42539
|
+
fromPage: pages[currentIndex],
|
|
42540
|
+
direction: signNow > 0 ? "back" : "forward",
|
|
42541
|
+
scrub: true,
|
|
42542
|
+
change: () => travelTo(pageThatWay, "drag")
|
|
42543
|
+
});
|
|
42544
|
+
return {
|
|
42545
|
+
travelBack: signNow > 0,
|
|
42546
|
+
travelOn: signNow < 0
|
|
42547
|
+
};
|
|
42548
|
+
}
|
|
42464
42549
|
};
|
|
42465
42550
|
},
|
|
42466
42551
|
onPull: ({
|
|
@@ -42513,9 +42598,9 @@ const RouteTravel = ({
|
|
|
42513
42598
|
// the start of a gesture that gap is invisible, the hand has barely
|
|
42514
42599
|
// moved; here the hand is at full speed, and this is what it costs.
|
|
42515
42600
|
//
|
|
42516
|
-
// Where we are is what THIS travel was bringing in — the URL changed
|
|
42517
|
-
//
|
|
42518
|
-
//
|
|
42601
|
+
// Where we are is what THIS travel was bringing in — the URL changed as
|
|
42602
|
+
// it set off, so `currentIndex` belongs to a render this gesture is
|
|
42603
|
+
// older than.
|
|
42519
42604
|
const fromIndex = pageIndexOf(pages, travel.page);
|
|
42520
42605
|
const page = direction === "back" ? pages[fromIndex - 1] : pages[fromIndex + 1];
|
|
42521
42606
|
if (fromIndex === -1 || !page) {
|
|
@@ -66169,6 +66254,7 @@ const css$M = /* css */`@layer navi {
|
|
|
66169
66254
|
--thumb-size: 16px;
|
|
66170
66255
|
--thumb-width: var(--thumb-size);
|
|
66171
66256
|
--thumb-height: var(--thumb-size);
|
|
66257
|
+
--press-height: var(--thumb-height);
|
|
66172
66258
|
--thumb-border-radius: 100%;
|
|
66173
66259
|
--thumb-cursor: pointer;
|
|
66174
66260
|
--font-size: var(--navi-control-font-size);
|
|
@@ -66256,6 +66342,8 @@ const css$M = /* css */`@layer navi {
|
|
|
66256
66342
|
position: relative;
|
|
66257
66343
|
|
|
66258
66344
|
& .navi_control_input {
|
|
66345
|
+
width: 100%;
|
|
66346
|
+
height: var(--press-height);
|
|
66259
66347
|
opacity: 0;
|
|
66260
66348
|
--webkit-appearance: none;
|
|
66261
66349
|
min-width: inherit;
|
|
@@ -66265,7 +66353,7 @@ const css$M = /* css */`@layer navi {
|
|
|
66265
66353
|
|
|
66266
66354
|
&::-webkit-slider-thumb {
|
|
66267
66355
|
width: var(--thumb-width);
|
|
66268
|
-
height: var(--
|
|
66356
|
+
height: var(--press-height);
|
|
66269
66357
|
border-radius: var(--thumb-border-radius);
|
|
66270
66358
|
-webkit-appearance: none;
|
|
66271
66359
|
cursor: var(--x-thumb-cursor);
|
|
@@ -66477,6 +66565,7 @@ const RangeNativeInput = props => {
|
|
|
66477
66565
|
});
|
|
66478
66566
|
};
|
|
66479
66567
|
const RangeStyleCSSVars = {
|
|
66568
|
+
"pressHeight": ["--press-height", "height"],
|
|
66480
66569
|
"outlineWidth": "--outline-width",
|
|
66481
66570
|
"borderRadius": "--border-radius",
|
|
66482
66571
|
"borderColor": "--border-color",
|
|
@@ -67983,6 +68072,7 @@ const InputPseudoElements = ["::-navi-loader"];
|
|
|
67983
68072
|
* boolean?: boolean,
|
|
67984
68073
|
* selectOnPress?: boolean,
|
|
67985
68074
|
* enterSendsNothing?: boolean,
|
|
68075
|
+
* pressHeight?: number | string,
|
|
67986
68076
|
* variant?: "checkbox" | "switch" | "icon" | "button",
|
|
67987
68077
|
* buttonVariant?: "discrete",
|
|
67988
68078
|
* actionVerb?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE",
|
|
@@ -68032,6 +68122,12 @@ const InputPseudoElements = ["::-navi-loader"];
|
|
|
68032
68122
|
* street before its suggestion filled the city) and whose Enter would send
|
|
68033
68123
|
* an answer still missing its other half. The browser's own Enter is kept (a
|
|
68034
68124
|
* datalist choice), except in a `<Form>`, where it is the submission.
|
|
68125
|
+
* @param {number|string} [pressHeight] How tall a press counts on a range, the
|
|
68126
|
+
* thumb's height by default, so a thin line stays easy to hit. The press area
|
|
68127
|
+
* only: nothing moves and nothing is drawn. It overflows the range, centered
|
|
68128
|
+
* on its line, over whatever is next to it and takes the presses aimed there,
|
|
68129
|
+
* so leave it the room it needs (`marginY`). Different for a mouse and a
|
|
68130
|
+
* finger: `--press-height` in a `@media (pointer: coarse)` rule.
|
|
68035
68131
|
*/
|
|
68036
68132
|
const Input = props => {
|
|
68037
68133
|
resolveInputProps(props);
|
|
@@ -68732,7 +68828,7 @@ const Editable = props => {
|
|
|
68732
68828
|
children: [children || jsx("span", {
|
|
68733
68829
|
children: value
|
|
68734
68830
|
}), jsx(Box, {
|
|
68735
|
-
|
|
68831
|
+
baseClassName: "navi_editable_wrapper",
|
|
68736
68832
|
ref: wrapperRef,
|
|
68737
68833
|
...wrapperProps,
|
|
68738
68834
|
// inert ensure input while not editing that:
|
|
@@ -93328,7 +93424,7 @@ const Color = ({
|
|
|
93328
93424
|
const color = children || undefined;
|
|
93329
93425
|
return jsx(Box, {
|
|
93330
93426
|
as: "span",
|
|
93331
|
-
|
|
93427
|
+
baseClassName: "navi_color",
|
|
93332
93428
|
"navi-color-empty": color ? undefined : ""
|
|
93333
93429
|
// propsCSSVars={COLOR_PROP_CSS_VAR}
|
|
93334
93430
|
,
|
|
@@ -98079,7 +98175,7 @@ const InputDuration = props => {
|
|
|
98079
98175
|
delete basePseudoState[":-navi-loading"];
|
|
98080
98176
|
return jsxs(Box, {
|
|
98081
98177
|
ref: groupRef,
|
|
98082
|
-
|
|
98178
|
+
baseClassName: "navi_input_duration",
|
|
98083
98179
|
"data-callout-arrow-x": "center",
|
|
98084
98180
|
width: "fit-content",
|
|
98085
98181
|
flex: true,
|
|
@@ -98593,8 +98689,7 @@ const Select = ({
|
|
|
98593
98689
|
as: "span",
|
|
98594
98690
|
inline: true,
|
|
98595
98691
|
flex: true,
|
|
98596
|
-
baseClassName: "navi_input",
|
|
98597
|
-
className: "navi_select",
|
|
98692
|
+
baseClassName: "navi_input navi_select",
|
|
98598
98693
|
...rootProps,
|
|
98599
98694
|
basePseudoState: basePseudoState,
|
|
98600
98695
|
styleCSSVars: InputStyleCSSVars,
|
|
@@ -106518,7 +106613,7 @@ const ButtonCopyToClipboard = ({
|
|
|
106518
106613
|
import.meta.css = [css$b, "@jsenv/navi/src/control/input/button_copy_to_clipboard.jsx"];
|
|
106519
106614
|
const [copied, copy] = useCopyToClipboard(children);
|
|
106520
106615
|
return jsxs(Box, {
|
|
106521
|
-
|
|
106616
|
+
baseClassName: "navi_clipboard_container",
|
|
106522
106617
|
...props,
|
|
106523
106618
|
children: [jsx(Box, {
|
|
106524
106619
|
className: "navi_copied_notif",
|
|
@@ -109110,7 +109205,7 @@ const SidePanelHead = props => jsx(Box, {
|
|
|
109110
109205
|
* @param {import("preact").ComponentChildren} props.children
|
|
109111
109206
|
*/
|
|
109112
109207
|
const SidePanelFoot = props => jsx(Box, {
|
|
109113
|
-
|
|
109208
|
+
baseClassName: "navi_side_panel_foot",
|
|
109114
109209
|
...props
|
|
109115
109210
|
});
|
|
109116
109211
|
SidePanel.Head = SidePanelHead;
|
|
@@ -109482,5 +109577,5 @@ const UserSvg = () => jsx("svg", {
|
|
|
109482
109577
|
})
|
|
109483
109578
|
});
|
|
109484
109579
|
|
|
109485
|
-
export { ActionRenderer, ActiveKeyboardShortcuts, Address, Badge, BadgeCount, BadgeList, Binder, Box, Button, ButtonCopyToClipboard, CalloutStatusIcon, Caption, CardLayout, CheckSvg, CheckboxGroup, CloseSvg, Code, Col, Colgroup, Color, ConstructionSvg, ControlGroup, ControlSwap, DaySpin, Details, Dialog, Editable, ErrorBoundary, ErrorBoundaryContext, ExclamationSvg, Expandable, EyeClosedSvg, EyeSvg, Field, FixedBar, Form, Group, Head, HeartSvg, HomeSvg, Icon, Image, InfoSvg, Input, InputDuration, Interpolate, Label, Link, LinkAnchorSvg, LinkBlankTargetSvg, LinkCurrentSvg, List, ListItem, ListItemGroup, ListItems, Loading, LoadingDotsSvg, LoadingIndicator, LoadingIndicatorFluid, LoadingOutline, MessageBox, Meter, Nav, NaviDebug, NetworkPolicyError, NumberSpin, Paragraph, Picker, Popover, Popup, PopupGroup, Quantity, RadioGroup, Route, RouteTransitionArea, RouteTravel, RowNumberCol, RowNumberTableCell, SVGMaskOverlay, SearchSvg, Select, SelectableInput, SelectionContext, Separator, SettingsSvg, SidePanel, Slide, SlideContainer, SortHeader, Spin, SpinGroup, SplitButton, StarSvg, Step, StepList, SummaryMarker, Svg, Table, TableCell, Tbody, Text, TextBox, Textarea, TextareaCharCount, Thead, Time, TimeRange, TimeRangeSpin, TimeRangeWheel, TimeSpin, TimeWheel, Title, Tr, UITransition, Unit, UserSvg, ViewportLayout, Wheel, WheelGroup, WheelItem, actionRunEffect, activeRouteActionsSignal, activeRouteReadsSignal, anyMatchingRouteSignal, applySearch, arraySignalMembership, askPopup, canNavBackSignal, canNavForwardSignal, coarsePointerSignal, compareTwoJsValues, constraintFromValidityRule, createAction, createAvailableConstraint, createRequestCanceller, createSearch, createSelectionKeyboardShortcuts, createSlot, defineInteractionDetector, defineRouteDefaultTransition, defineRouteTransition, detectHorizontalOverflow, dispatchRequestSetUIState, enableDebugActions, enableDebugOnDocumentLoading, enableVirtualKeyboardOverlay, ensureDocumentStartViewTransition, errorIsDisplayed, filterTableSelection, getNowHours, getNowHoursRoundedToStep, isCellSelected, isColumnSelected, isNetworkPolicyError, isPressOnControl, isRowSelected, isScrolling, isToday, keepPageOnScreen, languagesSignal, localStorageSignal, markAsOutsideTextFlow, markErrorAsDisplayedBy, moveArrayItemByIndex, moveFocusTo, navBack, navForward, navIntegratedVia, navTo, naviI18n, openCallout, preloadUrl, rawUrlPart, registerGlobalConstraint, reload, renderedPageSignal, rerunActions, resource, route, routeAction, routeFallback, scrollActivitySignal, setBaseUrl, setNetworkPolicy, setPreferredLanguage, setSupportedLanguages, setUrlTargetOptions, setupRoutes, smallTouchScreenSignal, stateSignal, stateSignalGroup, stopLoad, stringifyTableSelectionValue, swapArrayItemByIndex, syncOwnedResourceToSignals, syncResourceToSignals, todaySignal, triggerNaviCommand, updateActions, useActionStatus, useArraySignalMembership, useAsyncData, useCalloutElement, useCalloutRequestClose, useCanNavBack, useCanNavForward, useCancelPrevious, useCellGridFromRows, useConstraintValidityState, useCopyToClipboard, useDependenciesDiff, useDisplayedLayoutEffect, useDocumentResource, useDocumentState, useDocumentUrl, useEditionController, useFocusGroup, useHoldScrollRestoration, useInputGroup, useKeyboardShortcuts, useListItemState, useNavState, useNetworkPolicyReason, useOrderedColumns, usePickerState, usePopupMode, usePopupValue, useRouteStatus, useSearchText, useSelectableElement, useSelectionController, useSignalSync, useSlideContainer, useSlideValue, useStateArray, useTitleLevel, useTransitionCover, useUrlSearchParam, useUrlTargetId, valueInLocalStorage, windowWidthSignal };
|
|
109580
|
+
export { ActionRenderer, ActiveKeyboardShortcuts, Address, Badge, BadgeCount, BadgeList, Binder, Box, Button, ButtonCopyToClipboard, CalloutStatusIcon, Caption, CardLayout, CheckSvg, CheckboxGroup, CloseSvg, Code, Col, Colgroup, Color, ConstructionSvg, ControlGroup, ControlSwap, DaySpin, Details, Dialog, Editable, ErrorBoundary, ErrorBoundaryContext, ExclamationSvg, Expandable, EyeClosedSvg, EyeSvg, Field, FixedBar, Form, Group, Head, HeartSvg, HomeSvg, Icon, Image, InfoSvg, Input, InputDuration, Interpolate, Label, Link, LinkAnchorSvg, LinkBlankTargetSvg, LinkCurrentSvg, List, ListItem, ListItemGroup, ListItems, Loading, LoadingDotsSvg, LoadingIndicator, LoadingIndicatorFluid, LoadingOutline, MessageBox, Meter, Nav, NaviDebug, NetworkPolicyError, NumberSpin, Paragraph, Picker, Popover, Popup, PopupGroup, Quantity, RadioGroup, Route, RouteTransitionArea, RouteTravel, RowNumberCol, RowNumberTableCell, SVGMaskOverlay, SearchSvg, Select, SelectableInput, SelectionContext, Separator, SettingsSvg, SidePanel, Slide, SlideContainer, SortHeader, Spin, SpinGroup, SplitButton, StarSvg, Step, StepList, SummaryMarker, Svg, Table, TableCell, Tbody, Text, TextBox, Textarea, TextareaCharCount, Thead, Time, TimeRange, TimeRangeSpin, TimeRangeWheel, TimeSpin, TimeWheel, Title, Tr, UITransition, Unit, UserSvg, ViewportLayout, Wheel, WheelGroup, WheelItem, actionRunEffect, activeRouteActionsSignal, activeRouteReadsSignal, anyMatchingRouteSignal, applySearch, arraySignalMembership, askPopup, canNavBackSignal, canNavForwardSignal, coarsePointerSignal, compareTwoJsValues, constraintFromValidityRule, createAction, createAvailableConstraint, createRequestCanceller, createSearch, createSelectionKeyboardShortcuts, createSlot, defineInteractionDetector, defineRouteDefaultTransition, defineRouteTransition, detectHorizontalOverflow, dispatchRequestSetUIState, enableDebugActions, enableDebugOnDocumentLoading, enableVirtualKeyboardOverlay, ensureDocumentStartViewTransition, errorIsDisplayed, filterTableSelection, getNowHours, getNowHoursRoundedToStep, isCellSelected, isColumnSelected, isNetworkPolicyError, isPressOnControl, isRowSelected, isScrolling, isToday, keepPageOnScreen, languagesSignal, localStorageSignal, markAsOutsideTextFlow, markErrorAsDisplayedBy, moveArrayItemByIndex, moveFocusTo, navBack, navForward, navIntegratedVia, navTo, naviI18n, openCallout, preloadUrl, rawUrlPart, registerGlobalConstraint, reload, renderedPageSignal, rerunActions, resource, route, routeAction, routeFallback, routeTravelSettledPageSignal, scrollActivitySignal, setBaseUrl, setNetworkPolicy, setPreferredLanguage, setSupportedLanguages, setUrlTargetOptions, setupRoutes, smallTouchScreenSignal, stateSignal, stateSignalGroup, stopLoad, stringifyTableSelectionValue, swapArrayItemByIndex, syncOwnedResourceToSignals, syncResourceToSignals, todaySignal, triggerNaviCommand, updateActions, useActionStatus, useArraySignalMembership, useAsyncData, useCalloutElement, useCalloutRequestClose, useCanNavBack, useCanNavForward, useCancelPrevious, useCellGridFromRows, useConstraintValidityState, useCopyToClipboard, useDependenciesDiff, useDisplayedLayoutEffect, useDocumentResource, useDocumentState, useDocumentUrl, useEditionController, useFocusGroup, useHoldScrollRestoration, useInputGroup, useKeyboardShortcuts, useListItemState, useNavState, useNetworkPolicyReason, useOrderedColumns, usePickerState, usePopupMode, usePopupValue, useRouteStatus, useSearchText, useSelectableElement, useSelectionController, useSignalSync, useSlideContainer, useSlideValue, useStateArray, useTitleLevel, useTransitionCover, useUrlSearchParam, useUrlTargetId, valueInLocalStorage, windowWidthSignal };
|
|
109486
109581
|
//# sourceMappingURL=jsenv_navi.js.map
|