@orion-studios/payload-studio 0.6.0-beta.153 → 0.6.0-beta.155
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,25 @@ 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
|
+
input.dispatchEvent(new InputEvent("input", { bubbles: true, inputType: "insertText" }));
|
|
1418
|
+
},
|
|
1419
|
+
true
|
|
1420
|
+
);
|
|
1402
1421
|
const stepper = document.createElement("span");
|
|
1403
1422
|
stepper.className = "orion-builder-v2-stepper";
|
|
1404
1423
|
stepper.addEventListener("pointerdown", (event) => {
|
|
@@ -1275,6 +1275,25 @@ 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
|
+
input.dispatchEvent(new InputEvent("input", { bubbles: true, inputType: "insertText" }));
|
|
1294
|
+
},
|
|
1295
|
+
true
|
|
1296
|
+
);
|
|
1278
1297
|
const stepper = document.createElement("span");
|
|
1279
1298
|
stepper.className = "orion-builder-v2-stepper";
|
|
1280
1299
|
stepper.addEventListener("pointerdown", (event) => {
|
package/dist/index.mjs
CHANGED
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
} from "./chunk-JQAHXYAM.mjs";
|
|
11
11
|
import {
|
|
12
12
|
studio_pages_exports
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-276KAPGM.mjs";
|
|
14
14
|
import "./chunk-7ZMXZRBP.mjs";
|
|
15
|
+
import "./chunk-OQSEJXC4.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,15 +7,15 @@ import {
|
|
|
7
7
|
pageStudioModuleManifest,
|
|
8
8
|
resolveBuilderThemeTokens,
|
|
9
9
|
toEditorInitialDoc
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-276KAPGM.mjs";
|
|
11
11
|
import {
|
|
12
12
|
createDefaultStudioDocument,
|
|
13
13
|
defaultBuilderThemeTokens,
|
|
14
14
|
layoutToStudioDocument,
|
|
15
15
|
studioDocumentToLayout
|
|
16
16
|
} from "../chunk-7ZMXZRBP.mjs";
|
|
17
|
-
import "../chunk-ADIIWIYL.mjs";
|
|
18
17
|
import "../chunk-OQSEJXC4.mjs";
|
|
18
|
+
import "../chunk-ADIIWIYL.mjs";
|
|
19
19
|
import "../chunk-6BWS3CLP.mjs";
|
|
20
20
|
export {
|
|
21
21
|
createDefaultStudioDocument,
|
package/package.json
CHANGED
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
migrateBlockToSettingsV2,
|
|
6
6
|
studioDocumentToLayout
|
|
7
7
|
} from "./chunk-7ZMXZRBP.mjs";
|
|
8
|
+
import {
|
|
9
|
+
sectionStyleDefaults
|
|
10
|
+
} from "./chunk-OQSEJXC4.mjs";
|
|
8
11
|
import {
|
|
9
12
|
assertStudioDocumentV1,
|
|
10
13
|
compileStudioDocument,
|
|
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";
|