@nordcraft/std-lib 1.0.94 → 1.0.95
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.
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { toBoolean } from '@nordcraft/core/dist/utils/util';
|
|
2
|
+
const handler = ([elem, preventScroll]) => {
|
|
2
3
|
if (elem instanceof HTMLElement) {
|
|
3
|
-
elem.focus(
|
|
4
|
+
elem.focus({
|
|
5
|
+
preventScroll: toBoolean(preventScroll),
|
|
6
|
+
});
|
|
4
7
|
}
|
|
5
8
|
};
|
|
6
9
|
export default handler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../actions/focus/handler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../actions/focus/handler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAE3D,MAAM,OAAO,GAAkB,CAAC,CAAC,IAAI,EAAE,aAAa,CAAC,EAAE,EAAE;IACvD,IAAI,IAAI,YAAY,WAAW,EAAE,CAAC;QAChC,IAAI,CAAC,KAAK,CAAC;YACT,aAAa,EAAE,SAAS,CAAC,aAAa,CAAC;SACxC,CAAC,CAAA;IACJ,CAAC;AACH,CAAC,CAAA;AAED,eAAe,OAAO,CAAA"}
|
package/dist/lib.ts
CHANGED
|
@@ -3535,6 +3535,17 @@
|
|
|
3535
3535
|
"type": "value",
|
|
3536
3536
|
"value": null
|
|
3537
3537
|
}
|
|
3538
|
+
},
|
|
3539
|
+
{
|
|
3540
|
+
"name": "Prevent scroll",
|
|
3541
|
+
"description": "Prevent scrolling to the focused element.",
|
|
3542
|
+
"type": {
|
|
3543
|
+
"type": "String"
|
|
3544
|
+
},
|
|
3545
|
+
"formula": {
|
|
3546
|
+
"type": "value",
|
|
3547
|
+
"value": null
|
|
3548
|
+
}
|
|
3538
3549
|
}
|
|
3539
3550
|
]
|
|
3540
3551
|
},
|
package/package.json
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"fast-deep-equal": "3.1.3",
|
|
13
|
-
"@nordcraft/core": "1.0.
|
|
13
|
+
"@nordcraft/core": "1.0.95"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@types/node": "
|
|
16
|
+
"@types/node": "25.5.0",
|
|
17
17
|
"jsonschema": "1.5.0"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"watch": "tsgo --noEmit -w"
|
|
24
24
|
},
|
|
25
25
|
"files": ["dist"],
|
|
26
|
-
"version": "1.0.
|
|
26
|
+
"version": "1.0.95"
|
|
27
27
|
}
|