@sanity/assist 6.1.18 → 6.1.19
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/index.js +11 -9
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -3458,9 +3458,11 @@ function useCustomFieldActions(props) {
|
|
|
3458
3458
|
expanded: !0
|
|
3459
3459
|
}] : []) ?? [];
|
|
3460
3460
|
}, [
|
|
3461
|
+
addSyntheticTask,
|
|
3461
3462
|
configActions,
|
|
3462
3463
|
fieldActions,
|
|
3463
|
-
pushToast
|
|
3464
|
+
pushToast,
|
|
3465
|
+
removeSyntheticTask
|
|
3464
3466
|
]);
|
|
3465
3467
|
}
|
|
3466
3468
|
function createSafeNode(args) {
|
|
@@ -4477,7 +4479,7 @@ function Selectable(t0) {
|
|
|
4477
4479
|
}
|
|
4478
4480
|
const PteMods = styled(Box).withConfig({
|
|
4479
4481
|
displayName: "PteMods",
|
|
4480
|
-
componentId: "sc-
|
|
4482
|
+
componentId: "sc-lrz2c-0"
|
|
4481
4483
|
})`& [data-testid='pt-editor__toolbar-card'] > div > div:last-child{display:none;}& [data-testid='pt-editor']{min-height:300px;}& [data-testid='pt-editor'] .pt-inline-object *{max-width:400px;}`;
|
|
4482
4484
|
function PromptInput(props) {
|
|
4483
4485
|
let $ = c(5);
|
|
@@ -4509,9 +4511,11 @@ function PromptInput(props) {
|
|
|
4509
4511
|
}) }), $[3] = t1, $[4] = t2), t2;
|
|
4510
4512
|
}
|
|
4511
4513
|
function useOnlyInlineBlocks(props) {
|
|
4512
|
-
let $ = c(
|
|
4513
|
-
$[0]
|
|
4514
|
-
|
|
4514
|
+
let $ = c(4), { value, onChange } = props, didRunRef = useRef(!1), t0, t1;
|
|
4515
|
+
$[0] !== onChange || $[1] !== value ? (t0 = () => {
|
|
4516
|
+
if (didRunRef.current) return;
|
|
4517
|
+
didRunRef.current = !0;
|
|
4518
|
+
let needsFix = !1, val = (value ?? []).map((block) => block._type === "block" ? block : (needsFix = !0, typed({
|
|
4515
4519
|
_key: randomKey(12),
|
|
4516
4520
|
_type: "block",
|
|
4517
4521
|
level: 0,
|
|
@@ -4519,10 +4523,8 @@ function useOnlyInlineBlocks(props) {
|
|
|
4519
4523
|
style: "normal",
|
|
4520
4524
|
children: [block]
|
|
4521
4525
|
})));
|
|
4522
|
-
needsFix &&
|
|
4523
|
-
}, $[0] =
|
|
4524
|
-
let t1;
|
|
4525
|
-
$[2] === Symbol.for("react.memo_cache_sentinel") ? (t1 = [], $[2] = t1) : t1 = $[2], useEffect(t0, t1);
|
|
4526
|
+
needsFix && onChange(set(val));
|
|
4527
|
+
}, t1 = [onChange, value], $[0] = onChange, $[1] = value, $[2] = t0, $[3] = t1) : (t0 = $[2], t1 = $[3]), useEffect(t0, t1);
|
|
4526
4528
|
}
|
|
4527
4529
|
function InstructionsArrayField(props) {
|
|
4528
4530
|
return props.renderDefault({
|