sanity 6.6.0-next.128 → 6.6.0-next.130
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/lib/_chunks-es/index2.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { Badge, Grid, Stack, Box, rem, Layer, Card, Spinner, Text as Text$1, usePrefersDark, Flex, Heading, Container as Container$4, Dialog, useTheme, Button as Button$2, Skeleton, Avatar, AvatarStack, Inline, Breadcrumbs, Code, useClickOutsideEvent, useLayer, Portal, LayerProvider, MenuDivider, Menu, useElementRect, useBoundaryElement, Autocomplete, useToast, useMediaIndex, useGlobalKeyDown, TextInput as TextInput$1, TabList, Tab, MenuItem as MenuItem$1, Tooltip as Tooltip$1, Checkbox as Checkbox$1, Switch as Switch$1, Select as Select$1, ElementQuery, rgba, BoundaryElementProvider, usePortal, PortalProvider, ThemeProvider, studioTheme, _responsive, useRootTheme, useArrayProp, TextArea, TextSkeleton, useElementSize, isHTMLElement, Radio, TabPanel, AvatarCounter, ThemeColorProvider, DialogProvider, focusLastDescendant, focusFirstDescendant, Label, ToastProvider, VirtualList } from "@sanity/ui";
|
|
4
4
|
import * as PathUtils from "@sanity/util/paths";
|
|
5
|
-
import { toString, FOCUS_TERMINATOR, startsWith, isEqual as isEqual$2, pathFor, fromString, get as get$1, trimChildPath as trimChildPath$1, trimLeft } from "@sanity/util/paths";
|
|
5
|
+
import { toString, FOCUS_TERMINATOR, startsWith, isEqual as isEqual$2, pathFor, fromString, get as get$1, trimChildPath as trimChildPath$1, trimLeft, resolveKeyedPath } from "@sanity/util/paths";
|
|
6
6
|
import { forwardRef, useRef, useState, useId, useCallback, useMemo, useImperativeHandle, useEffect, isValidElement, Fragment, cloneElement, memo, useSyncExternalStore, Suspense, useContext, useReducer, Component, startTransition, use, useLayoutEffect, useEffectEvent, PureComponent, Children, lazy, useTransition, useInsertionEffect, useDeferredValue, version, StrictMode } from "react";
|
|
7
7
|
import deepEquals from "react-fast-compare";
|
|
8
8
|
import { LocaleContext, VisibleWorkspacesContext, ConfigErrorContext, WorkspacesContext, MediaLibraryIdsContext, PerspectiveContext, UserColorManagerContext, DocumentChangeContext, ReviewChangesContext, DiffContext, PresenceContext, FormBuilderContext, PortableTextMemberSchemaTypesContext, SelectedAnnotationsContext, ValidationContext, PortableTextMarkersContext, PortableTextMemberItemsContext, ChangeIndicatorTrackerContextGetSnapshot, ChangeIndicatorTrackerContextStore, FormCallbacksContext, ParseErrorsContext, ReferenceInputOptionsContext, WorkspaceContext, DocumentDivergencesContext, ActiveWorkspaceMatcherContext, DocumentIdContext, HoveredFieldContext, FieldActionsContext, FormValueContext, ArrayItemRootElementContext, ReferenceItemRefContext, GetFormValueContext, EnhancedObjectDialogContext, DocumentFieldActionsContext, ArrayValidationContext, SortableItemIdContext, EditDialogOuterBoundaryContext, SourceContext, VirtualizerScrollInstanceContext, PortableTextMemberItemElementRefsContext, ScrollContext, FullscreenPTEContext, ColorSchemeSetValueContext, ColorSchemeValueContext, AssetLimitUpsellContext, DialogStackContext, ResourceCacheContext, EventsContext, ReleasesUpsellContext, SingleDocReleaseContext, SingleDocReleaseEnabledContext, SingleDocReleaseUpsellContext, PresenceTrackerContextStore, PresenceTrackerContextGetSnapshot, FormFieldPresenceContext, SearchContext, CalendarContext, AppIdCacheContext, CommentsIntentContext, CommentInputContext, CommentsContext, CommentsEnabledContext, CommentsSelectedPathContext, ScheduledPublishingEnabledContext, DocumentActionPropsContext, SchedulePublishUpsellContext, TasksEnabledContext, IsLastPaneContext, MentionUserContext, TasksNavigationContext, TasksContext, TasksUpsellContext, LoggedOutReasonContext, StudioErrorHandlerContext, RouterHistoryContext, AddonDatasetContext, DocumentLimitUpsellContext, NavbarContext, FreeTrialContext, FeedbackContext, LiveUserApplicationContext, PackageVersionInfoContext, StudioAnnouncementContext, CopyPasteContext, UserApplicationCacheContext, PreviewCardContext, ZIndexContext, zIndexContextDefaults, CommentsAuthoringPathContext } from "sanity/_singletons";
|
|
@@ -54346,7 +54346,7 @@ function useComlinkViewHistory(t0) {
|
|
|
54346
54346
|
$[13] !== displayed || $[14] !== editState2.ready || $[15] !== recordEvent || $[16] !== t7 ? (t8 = [t7, displayed, editState2.ready, recordEvent], $[13] = displayed, $[14] = editState2.ready, $[15] = recordEvent, $[16] = t7, $[17] = t8) : t8 = $[17], useEffect(t6, t8);
|
|
54347
54347
|
}
|
|
54348
54348
|
function useDocumentForm(options) {
|
|
54349
|
-
const $ = c(
|
|
54349
|
+
const $ = c(181), {
|
|
54350
54350
|
documentType,
|
|
54351
54351
|
getFormDocumentValue,
|
|
54352
54352
|
documentId,
|
|
@@ -54673,7 +54673,21 @@ function useDocumentForm(options) {
|
|
|
54673
54673
|
}, $[151] = onFocusPath, $[152] = t46) : t46 = $[152];
|
|
54674
54674
|
const handleProgrammaticFocus = t46;
|
|
54675
54675
|
let t47;
|
|
54676
|
-
|
|
54676
|
+
$[153] !== initialFocusPath || $[154] !== onFocusPath ? (t47 = () => {
|
|
54677
|
+
if (!initialFocusPath || initialFocusPath.length === 0)
|
|
54678
|
+
return;
|
|
54679
|
+
const resolvedPath = resolveKeyedPath(formStateRef.current?.value, initialFocusPath);
|
|
54680
|
+
setFocusPath(resolvedPath), handleSetOpenPath(resolvedPath), onFocusPath?.(resolvedPath), focusPathRef.current = resolvedPath;
|
|
54681
|
+
}, $[153] = initialFocusPath, $[154] = onFocusPath, $[155] = t47) : t47 = $[155];
|
|
54682
|
+
const applyInitialFocusPath = useEffectEvent(t47), initialFocusPathAppliedRef = useRef(!1);
|
|
54683
|
+
let t48;
|
|
54684
|
+
$[156] !== applyInitialFocusPath || $[157] !== ready ? (t48 = () => {
|
|
54685
|
+
!ready || initialFocusPathAppliedRef.current || (initialFocusPathAppliedRef.current = !0, applyInitialFocusPath());
|
|
54686
|
+
}, $[156] = applyInitialFocusPath, $[157] = ready, $[158] = t48) : t48 = $[158];
|
|
54687
|
+
let t49;
|
|
54688
|
+
$[159] !== ready ? (t49 = [ready], $[159] = ready, $[160] = t49) : t49 = $[160], useEffect(t48, t49);
|
|
54689
|
+
let t50;
|
|
54690
|
+
return $[161] !== collapsedFieldSets || $[162] !== collapsedPaths || $[163] !== connectionState2 || $[164] !== editState2 || $[165] !== focusPath || $[166] !== formState || $[167] !== handleBlur || $[168] !== handleFocus || $[169] !== handleProgrammaticFocus || $[170] !== hasUpstreamVersion || $[171] !== isPermissionsLoading || $[172] !== openPath || $[173] !== permissions || $[174] !== ready || $[175] !== schemaType || $[176] !== syncState || $[177] !== upstreamEditState || $[178] !== validation2 || $[179] !== value ? (t50 = {
|
|
54677
54691
|
editState: editState2,
|
|
54678
54692
|
upstreamEditState,
|
|
54679
54693
|
connectionState: connectionState2,
|
|
@@ -54699,7 +54713,7 @@ function useDocumentForm(options) {
|
|
|
54699
54713
|
onSetActiveFieldGroup: handleSetActiveFieldGroup,
|
|
54700
54714
|
onSetCollapsedPath: handleOnSetCollapsedPath,
|
|
54701
54715
|
onSetCollapsedFieldSet: handleOnSetCollapsedFieldSet
|
|
54702
|
-
}, $[
|
|
54716
|
+
}, $[161] = collapsedFieldSets, $[162] = collapsedPaths, $[163] = connectionState2, $[164] = editState2, $[165] = focusPath, $[166] = formState, $[167] = handleBlur, $[168] = handleFocus, $[169] = handleProgrammaticFocus, $[170] = hasUpstreamVersion, $[171] = isPermissionsLoading, $[172] = openPath, $[173] = permissions, $[174] = ready, $[175] = schemaType, $[176] = syncState, $[177] = upstreamEditState, $[178] = validation2, $[179] = value, $[180] = t50) : t50 = $[180], t50;
|
|
54703
54717
|
}
|
|
54704
54718
|
function _temp2$D() {
|
|
54705
54719
|
throw new Error("Attempted to patch a read-only document");
|