@orion-studios/payload-studio 0.6.0-beta.153 → 0.6.0-beta.154
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.
|
@@ -1399,6 +1399,24 @@ var decorateBuilderNumericSteppers = (root = document) => {
|
|
|
1399
1399
|
input.type = "text";
|
|
1400
1400
|
input.inputMode = "decimal";
|
|
1401
1401
|
field.querySelector("select")?.setAttribute("tabindex", "-1");
|
|
1402
|
+
input.addEventListener(
|
|
1403
|
+
"keydown",
|
|
1404
|
+
(event) => {
|
|
1405
|
+
if (event.key !== "-" || event.metaKey || event.ctrlKey || event.altKey) {
|
|
1406
|
+
return;
|
|
1407
|
+
}
|
|
1408
|
+
event.preventDefault();
|
|
1409
|
+
event.stopPropagation();
|
|
1410
|
+
const selectionStart = input.selectionStart ?? 0;
|
|
1411
|
+
const selectionEnd = input.selectionEnd ?? selectionStart;
|
|
1412
|
+
const value = input.value || "";
|
|
1413
|
+
const nextValue = value.startsWith("-") && selectionStart === 0 && selectionEnd <= 1 ? value.slice(1) : `${value.slice(0, selectionStart)}-${value.slice(selectionEnd)}`;
|
|
1414
|
+
input.value = nextValue;
|
|
1415
|
+
const nextCursor = Math.min(selectionStart + 1, nextValue.length);
|
|
1416
|
+
input.setSelectionRange(nextCursor, nextCursor);
|
|
1417
|
+
},
|
|
1418
|
+
true
|
|
1419
|
+
);
|
|
1402
1420
|
const stepper = document.createElement("span");
|
|
1403
1421
|
stepper.className = "orion-builder-v2-stepper";
|
|
1404
1422
|
stepper.addEventListener("pointerdown", (event) => {
|
|
@@ -1275,6 +1275,24 @@ var decorateBuilderNumericSteppers = (root = document) => {
|
|
|
1275
1275
|
input.type = "text";
|
|
1276
1276
|
input.inputMode = "decimal";
|
|
1277
1277
|
field.querySelector("select")?.setAttribute("tabindex", "-1");
|
|
1278
|
+
input.addEventListener(
|
|
1279
|
+
"keydown",
|
|
1280
|
+
(event) => {
|
|
1281
|
+
if (event.key !== "-" || event.metaKey || event.ctrlKey || event.altKey) {
|
|
1282
|
+
return;
|
|
1283
|
+
}
|
|
1284
|
+
event.preventDefault();
|
|
1285
|
+
event.stopPropagation();
|
|
1286
|
+
const selectionStart = input.selectionStart ?? 0;
|
|
1287
|
+
const selectionEnd = input.selectionEnd ?? selectionStart;
|
|
1288
|
+
const value = input.value || "";
|
|
1289
|
+
const nextValue = value.startsWith("-") && selectionStart === 0 && selectionEnd <= 1 ? value.slice(1) : `${value.slice(0, selectionStart)}-${value.slice(selectionEnd)}`;
|
|
1290
|
+
input.value = nextValue;
|
|
1291
|
+
const nextCursor = Math.min(selectionStart + 1, nextValue.length);
|
|
1292
|
+
input.setSelectionRange(nextCursor, nextCursor);
|
|
1293
|
+
},
|
|
1294
|
+
true
|
|
1295
|
+
);
|
|
1278
1296
|
const stepper = document.createElement("span");
|
|
1279
1297
|
stepper.className = "orion-builder-v2-stepper";
|
|
1280
1298
|
stepper.addEventListener("pointerdown", (event) => {
|
package/dist/index.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
admin_exports
|
|
3
3
|
} from "./chunk-KHK6RTGC.mjs";
|
|
4
|
+
import {
|
|
5
|
+
blocks_exports
|
|
6
|
+
} from "./chunk-JQAHXYAM.mjs";
|
|
4
7
|
import {
|
|
5
8
|
nextjs_exports
|
|
6
9
|
} from "./chunk-ZADL33R6.mjs";
|
|
7
10
|
import "./chunk-ZTXJG4K5.mjs";
|
|
8
|
-
import {
|
|
9
|
-
blocks_exports
|
|
10
|
-
} from "./chunk-JQAHXYAM.mjs";
|
|
11
11
|
import {
|
|
12
12
|
studio_pages_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-NGLIA2OE.mjs";
|
|
14
|
+
import "./chunk-OQSEJXC4.mjs";
|
|
14
15
|
import "./chunk-7ZMXZRBP.mjs";
|
|
15
16
|
import {
|
|
16
17
|
studio_exports
|
|
17
18
|
} from "./chunk-ADIIWIYL.mjs";
|
|
18
|
-
import "./chunk-OQSEJXC4.mjs";
|
|
19
19
|
import {
|
|
20
20
|
admin_app_exports
|
|
21
21
|
} from "./chunk-RKTIFEUY.mjs";
|
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
pageStudioModuleManifest,
|
|
8
8
|
resolveBuilderThemeTokens,
|
|
9
9
|
toEditorInitialDoc
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-NGLIA2OE.mjs";
|
|
11
|
+
import "../chunk-OQSEJXC4.mjs";
|
|
11
12
|
import {
|
|
12
13
|
createDefaultStudioDocument,
|
|
13
14
|
defaultBuilderThemeTokens,
|
|
@@ -15,7 +16,6 @@ import {
|
|
|
15
16
|
studioDocumentToLayout
|
|
16
17
|
} from "../chunk-7ZMXZRBP.mjs";
|
|
17
18
|
import "../chunk-ADIIWIYL.mjs";
|
|
18
|
-
import "../chunk-OQSEJXC4.mjs";
|
|
19
19
|
import "../chunk-6BWS3CLP.mjs";
|
|
20
20
|
export {
|
|
21
21
|
createDefaultStudioDocument,
|
package/package.json
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
sectionStyleDefaults
|
|
3
|
+
} from "./chunk-OQSEJXC4.mjs";
|
|
1
4
|
import {
|
|
2
5
|
createDefaultStudioDocument,
|
|
3
6
|
defaultBuilderThemeTokens,
|
|
@@ -11,9 +14,6 @@ import {
|
|
|
11
14
|
createEmptyStudioDocument,
|
|
12
15
|
validateStudioDocument
|
|
13
16
|
} from "./chunk-ADIIWIYL.mjs";
|
|
14
|
-
import {
|
|
15
|
-
sectionStyleDefaults
|
|
16
|
-
} from "./chunk-OQSEJXC4.mjs";
|
|
17
17
|
import {
|
|
18
18
|
__export
|
|
19
19
|
} from "./chunk-6BWS3CLP.mjs";
|