@jsenv/navi 0.18.23 → 0.18.25
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/jsenv_navi.js +34 -19
- package/dist/jsenv_navi.js.map +20 -16
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -1248,7 +1248,11 @@ ${lines.join("\n")}`);
|
|
|
1248
1248
|
for (const actionToReset of willResetSet) {
|
|
1249
1249
|
const actionToResetPrivateProperties =
|
|
1250
1250
|
getActionPrivateProperties(actionToReset);
|
|
1251
|
-
actionToResetPrivateProperties.performReset({
|
|
1251
|
+
actionToResetPrivateProperties.performReset({
|
|
1252
|
+
reason,
|
|
1253
|
+
willRunOrPrerun:
|
|
1254
|
+
willRunSet.has(actionToReset) || willPrerunSet.has(actionToReset),
|
|
1255
|
+
});
|
|
1252
1256
|
activationWeakSet.delete(actionToReset);
|
|
1253
1257
|
}
|
|
1254
1258
|
}
|
|
@@ -1897,7 +1901,7 @@ const createAction = (callback, rootOptions = {}) => {
|
|
|
1897
1901
|
}
|
|
1898
1902
|
};
|
|
1899
1903
|
|
|
1900
|
-
const performReset = ({ reason }) => {
|
|
1904
|
+
const performReset = ({ reason, willRunOrPrerun }) => {
|
|
1901
1905
|
abort(reason);
|
|
1902
1906
|
if (DEBUG$3) {
|
|
1903
1907
|
console.log(`"${action}": resetting (reason: ${reason})`);
|
|
@@ -1913,11 +1917,11 @@ const createAction = (callback, rootOptions = {}) => {
|
|
|
1913
1917
|
actionPromiseMap.delete(action);
|
|
1914
1918
|
batch(() => {
|
|
1915
1919
|
errorSignal.value = null;
|
|
1916
|
-
if (!keepOldData) {
|
|
1920
|
+
if (!keepOldData && !willRunOrPrerun) {
|
|
1917
1921
|
valueSignal.value = valueInitial;
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1922
|
+
if (outputSignal) {
|
|
1923
|
+
outputSignal.value = undefined;
|
|
1924
|
+
}
|
|
1921
1925
|
}
|
|
1922
1926
|
isPrerunSignal.value = true;
|
|
1923
1927
|
runningStateSignal.value = IDLE;
|
|
@@ -2319,7 +2323,7 @@ getActionPrivateProperties(COMPLETED_ACTION).performRun({});
|
|
|
2319
2323
|
const actionRunEffect = (
|
|
2320
2324
|
action,
|
|
2321
2325
|
deriveActionParamsFromSignals,
|
|
2322
|
-
{ debounce,
|
|
2326
|
+
{ debounce, actionOptions } = {},
|
|
2323
2327
|
) => {
|
|
2324
2328
|
if (typeof action === "function") action = createAction(action);
|
|
2325
2329
|
let lastTruthyParams;
|
|
@@ -2389,7 +2393,7 @@ const actionRunEffect = (
|
|
|
2389
2393
|
}
|
|
2390
2394
|
}
|
|
2391
2395
|
},
|
|
2392
|
-
|
|
2396
|
+
...actionOptions,
|
|
2393
2397
|
});
|
|
2394
2398
|
if (actionParamsSignal.peek()) {
|
|
2395
2399
|
actionRunnedByThisEffect.run({ reason: "initial truthy params" });
|
|
@@ -6485,7 +6489,6 @@ const PSEUDO_CLASSES_DEFAULT = [];
|
|
|
6485
6489
|
const PSEUDO_ELEMENTS_DEFAULT = [];
|
|
6486
6490
|
const STYLE_CSS_VARS_DEFAULT = {};
|
|
6487
6491
|
const PROPS_CSS_VARS_DEFAULT = {};
|
|
6488
|
-
const CHILD_PROP_SET_DEFAULT = new Set();
|
|
6489
6492
|
const Box = props => {
|
|
6490
6493
|
const {
|
|
6491
6494
|
as = "div",
|
|
@@ -6512,7 +6515,8 @@ const Box = props => {
|
|
|
6512
6515
|
// -> introduced for <Input /> with a wrapped for loading, checkboxes, etc
|
|
6513
6516
|
pseudoStateSelector,
|
|
6514
6517
|
hasChildFunction,
|
|
6515
|
-
|
|
6518
|
+
baseChildPropSet,
|
|
6519
|
+
childPropSet,
|
|
6516
6520
|
// preventInitialTransition can be used to prevent transition on mount
|
|
6517
6521
|
// (when transition is set via props, this is done automatically)
|
|
6518
6522
|
// so this prop is useful only when transition is enabled from "outside" (via CSS)
|
|
@@ -6767,7 +6771,7 @@ const Box = props => {
|
|
|
6767
6771
|
}
|
|
6768
6772
|
for (const propName of remainingPropKeySet) {
|
|
6769
6773
|
const propValue = rest[propName];
|
|
6770
|
-
if (childPropSet
|
|
6774
|
+
if (baseChildPropSet?.has(propName) || childPropSet?.has(propName)) {
|
|
6771
6775
|
childForwardedProps[propName] = propValue;
|
|
6772
6776
|
continue;
|
|
6773
6777
|
}
|
|
@@ -22279,6 +22283,11 @@ const normalizeColorString = (color, el) => {
|
|
|
22279
22283
|
return String(colorRgba);
|
|
22280
22284
|
};
|
|
22281
22285
|
|
|
22286
|
+
const fieldPropSet = new Set([
|
|
22287
|
+
...CONSTRAINT_ATTRIBUTE_SET,
|
|
22288
|
+
"data-testid",
|
|
22289
|
+
]);
|
|
22290
|
+
|
|
22282
22291
|
installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
22283
22292
|
@layer navi {
|
|
22284
22293
|
label {
|
|
@@ -22736,6 +22745,7 @@ const CheckboxButtonStyleCSSVars = {
|
|
|
22736
22745
|
};
|
|
22737
22746
|
const CheckboxPseudoClasses = [":hover", ":active", ":focus", ":focus-visible", ":read-only", ":disabled", ":checked", ":-navi-loading"];
|
|
22738
22747
|
const CheckboxPseudoElements = ["::-navi-loader", "::-navi-checkmark"];
|
|
22748
|
+
const CheckboxChildPropSet = new Set([...fieldPropSet]);
|
|
22739
22749
|
const InputCheckboxBasic = props => {
|
|
22740
22750
|
const contextFieldName = useContext(FieldNameContext);
|
|
22741
22751
|
const contextReadOnly = useContext(ReadOnlyContext);
|
|
@@ -22838,6 +22848,7 @@ const InputCheckboxBasic = props => {
|
|
|
22838
22848
|
},
|
|
22839
22849
|
accentColor: accentColor,
|
|
22840
22850
|
hasChildFunction: true,
|
|
22851
|
+
baseChildPropSet: CheckboxChildPropSet,
|
|
22841
22852
|
preventInitialTransition: true,
|
|
22842
22853
|
children: [jsx(LoaderBackground, {
|
|
22843
22854
|
loading: innerLoading,
|
|
@@ -23457,6 +23468,7 @@ const RadioButtonStyleCSSVars = {
|
|
|
23457
23468
|
};
|
|
23458
23469
|
const RadioPseudoClasses = [":hover", ":active", ":focus", ":focus-visible", ":read-only", ":disabled", ":checked", ":-navi-loading"];
|
|
23459
23470
|
const RadioPseudoElements = ["::-navi-loader", "::-navi-radiomark"];
|
|
23471
|
+
const RadioChildPropSet = new Set([...fieldPropSet]);
|
|
23460
23472
|
const InputRadioBasic = props => {
|
|
23461
23473
|
const contextName = useContext(FieldNameContext);
|
|
23462
23474
|
const contextReadOnly = useContext(ReadOnlyContext);
|
|
@@ -23585,6 +23597,7 @@ const InputRadioBasic = props => {
|
|
|
23585
23597
|
},
|
|
23586
23598
|
color: color,
|
|
23587
23599
|
hasChildFunction: true,
|
|
23600
|
+
baseChildPropSet: RadioChildPropSet,
|
|
23588
23601
|
children: [jsx(LoaderBackground, {
|
|
23589
23602
|
loading: innerLoading,
|
|
23590
23603
|
inset: -1,
|
|
@@ -23847,7 +23860,7 @@ const InputRange = props => {
|
|
|
23847
23860
|
})
|
|
23848
23861
|
});
|
|
23849
23862
|
};
|
|
23850
|
-
const
|
|
23863
|
+
const RangeStyleCSSVars = {
|
|
23851
23864
|
"outlineWidth": "--outline-width",
|
|
23852
23865
|
"borderRadius": "--border-radius",
|
|
23853
23866
|
"borderColor": "--border-color",
|
|
@@ -23878,8 +23891,9 @@ const InputStyleCSSVars$1 = {
|
|
|
23878
23891
|
thumbColor: "--thumb-color-disabled"
|
|
23879
23892
|
}
|
|
23880
23893
|
};
|
|
23881
|
-
const
|
|
23882
|
-
const
|
|
23894
|
+
const RangePseudoClasses = [":hover", ":active", ":focus", ":focus-visible", ":read-only", ":disabled", ":-navi-loading"];
|
|
23895
|
+
const RangePseudoElements = ["::-navi-loader"];
|
|
23896
|
+
const RangeChildPropSet = new Set([...fieldPropSet]);
|
|
23883
23897
|
const InputRangeBasic = props => {
|
|
23884
23898
|
const contextReadOnly = useContext(ReadOnlyContext);
|
|
23885
23899
|
const contextDisabled = useContext(DisabledContext);
|
|
@@ -23990,7 +24004,7 @@ const InputRangeBasic = props => {
|
|
|
23990
24004
|
as: "span",
|
|
23991
24005
|
box: true,
|
|
23992
24006
|
baseClassName: "navi_input_range",
|
|
23993
|
-
styleCSSVars:
|
|
24007
|
+
styleCSSVars: RangeStyleCSSVars,
|
|
23994
24008
|
pseudoStateSelector: ".navi_native_input",
|
|
23995
24009
|
visualSelector: ".navi_native_input",
|
|
23996
24010
|
basePseudoState: {
|
|
@@ -23998,9 +24012,10 @@ const InputRangeBasic = props => {
|
|
|
23998
24012
|
":disabled": innerDisabled,
|
|
23999
24013
|
":-navi-loading": innerLoading
|
|
24000
24014
|
},
|
|
24001
|
-
pseudoClasses:
|
|
24002
|
-
pseudoElements:
|
|
24015
|
+
pseudoClasses: RangePseudoClasses,
|
|
24016
|
+
pseudoElements: RangePseudoElements,
|
|
24003
24017
|
hasChildFunction: true,
|
|
24018
|
+
baseChildPropSet: RangeChildPropSet,
|
|
24004
24019
|
...remainingProps,
|
|
24005
24020
|
ref: undefined,
|
|
24006
24021
|
children: [jsx(LoaderBackground, {
|
|
@@ -24380,7 +24395,7 @@ Object.assign(PSEUDO_CLASSES, {
|
|
|
24380
24395
|
}
|
|
24381
24396
|
});
|
|
24382
24397
|
const InputPseudoElements = ["::-navi-loader"];
|
|
24383
|
-
const
|
|
24398
|
+
const InputChildPropSet = new Set([...fieldPropSet]);
|
|
24384
24399
|
const InputTextualBasic = props => {
|
|
24385
24400
|
const contextReadOnly = useContext(ReadOnlyContext);
|
|
24386
24401
|
const contextDisabled = useContext(DisabledContext);
|
|
@@ -24483,7 +24498,7 @@ const InputTextualBasic = props => {
|
|
|
24483
24498
|
pseudoClasses: InputPseudoClasses,
|
|
24484
24499
|
pseudoElements: InputPseudoElements,
|
|
24485
24500
|
hasChildFunction: true,
|
|
24486
|
-
|
|
24501
|
+
baseChildPropSet: InputChildPropSet,
|
|
24487
24502
|
"data-start-icon": innerIcon ? "" : undefined,
|
|
24488
24503
|
"data-end-icon": cancelButton ? "" : undefined,
|
|
24489
24504
|
...remainingProps,
|