@orion-studios/payload-studio 0.6.0-beta.166 → 0.6.0-beta.168
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.
|
@@ -1415,8 +1415,14 @@ var decorateBuilderNumericSteppers = (root = document) => {
|
|
|
1415
1415
|
const selectionStart2 = input.selectionStart ?? 0;
|
|
1416
1416
|
const selectionEnd2 = input.selectionEnd ?? selectionStart2;
|
|
1417
1417
|
const value2 = input.dataset.orionPaddingDraft || input.value || "";
|
|
1418
|
-
const
|
|
1418
|
+
const displayedValue = input.value || "";
|
|
1419
|
+
const isReplacingAll = selectionStart2 === 0 && (selectionEnd2 === value2.length || selectionEnd2 === displayedValue.length);
|
|
1419
1420
|
const isNegativeEntry = value2.startsWith("-") || Boolean(input.dataset.orionPaddingDraft?.startsWith("-")) || event.key === "-";
|
|
1421
|
+
if (input.dataset.orionPaddingDraft?.startsWith("-") && isReplacingAll && event.key !== "-" && event.key.length === 1 && /^[.\d]$/.test(event.key)) {
|
|
1422
|
+
delete input.dataset.orionPaddingBase;
|
|
1423
|
+
delete input.dataset.orionPaddingDraft;
|
|
1424
|
+
return;
|
|
1425
|
+
}
|
|
1420
1426
|
if (isNegativeEntry && event.key.length === 1 && /^[-.\d]$/.test(event.key)) {
|
|
1421
1427
|
event.preventDefault();
|
|
1422
1428
|
event.stopImmediatePropagation();
|
|
@@ -1291,8 +1291,14 @@ var decorateBuilderNumericSteppers = (root = document) => {
|
|
|
1291
1291
|
const selectionStart2 = input.selectionStart ?? 0;
|
|
1292
1292
|
const selectionEnd2 = input.selectionEnd ?? selectionStart2;
|
|
1293
1293
|
const value2 = input.dataset.orionPaddingDraft || input.value || "";
|
|
1294
|
-
const
|
|
1294
|
+
const displayedValue = input.value || "";
|
|
1295
|
+
const isReplacingAll = selectionStart2 === 0 && (selectionEnd2 === value2.length || selectionEnd2 === displayedValue.length);
|
|
1295
1296
|
const isNegativeEntry = value2.startsWith("-") || Boolean(input.dataset.orionPaddingDraft?.startsWith("-")) || event.key === "-";
|
|
1297
|
+
if (input.dataset.orionPaddingDraft?.startsWith("-") && isReplacingAll && event.key !== "-" && event.key.length === 1 && /^[.\d]$/.test(event.key)) {
|
|
1298
|
+
delete input.dataset.orionPaddingBase;
|
|
1299
|
+
delete input.dataset.orionPaddingDraft;
|
|
1300
|
+
return;
|
|
1301
|
+
}
|
|
1296
1302
|
if (isNegativeEntry && event.key.length === 1 && /^[-.\d]$/.test(event.key)) {
|
|
1297
1303
|
event.preventDefault();
|
|
1298
1304
|
event.stopImmediatePropagation();
|
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-7HME6R2V.mjs";
|
|
14
14
|
import "./chunk-7ZMXZRBP.mjs";
|
|
15
|
-
import "./chunk-OQSEJXC4.mjs";
|
|
16
15
|
import {
|
|
17
16
|
studio_exports
|
|
18
17
|
} 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-7HME6R2V.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-OQSEJXC4.mjs";
|
|
18
17
|
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
|
@@ -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";
|
|
11
8
|
import {
|
|
12
9
|
assertStudioDocumentV1,
|
|
13
10
|
compileStudioDocument,
|
|
14
11
|
createEmptyStudioDocument,
|
|
15
12
|
validateStudioDocument
|
|
16
13
|
} 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";
|