sanity 6.9.2-next.21 → 6.9.2-next.22
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/{AddonDatasetProvider-B5npf4J4.js → AddonDatasetProvider-CfAw3oMr.js} +2 -2
- package/lib/{AddonDatasetProvider-B5npf4J4.js.map → AddonDatasetProvider-CfAw3oMr.js.map} +1 -1
- package/lib/{CalendarFilter-DYJEZDCP.js → CalendarFilter-OHGevGRx.js} +3 -3
- package/lib/{CalendarFilter-DYJEZDCP.js.map → CalendarFilter-OHGevGRx.js.map} +1 -1
- package/lib/{CommentsDocumentLayout-CTL7lt6a.js → CommentsDocumentLayout-p8p-oNuH.js} +2 -2
- package/lib/{CommentsDocumentLayout-CTL7lt6a.js.map → CommentsDocumentLayout-p8p-oNuH.js.map} +1 -1
- package/lib/{CommentsField-BE_CI2SY.js → CommentsField-CqXs722Y.js} +3 -3
- package/lib/{CommentsField-BE_CI2SY.js.map → CommentsField-CqXs722Y.js.map} +1 -1
- package/lib/{CommentsInput-D_EM-t5a.js → CommentsInput-B3rd8HlF.js} +5 -5
- package/lib/{CommentsInput-D_EM-t5a.js.map → CommentsInput-B3rd8HlF.js.map} +1 -1
- package/lib/{CommentsInspector-DtBIUadl.js → CommentsInspector-DTHmjTFc.js} +5 -5
- package/lib/{CommentsInspector-DtBIUadl.js.map → CommentsInspector-DTHmjTFc.js.map} +1 -1
- package/lib/{CommentsListItem-BFRqZMJ6.js → CommentsListItem-C2Ac0esL.js} +3 -3
- package/lib/{CommentsListItem-BFRqZMJ6.js.map → CommentsListItem-C2Ac0esL.js.map} +1 -1
- package/lib/{CommentsSelectedPathProvider-CIKpHpK3.js → CommentsSelectedPathProvider-DwDw8s-s.js} +3 -3
- package/lib/{CommentsSelectedPathProvider-CIKpHpK3.js.map → CommentsSelectedPathProvider-DwDw8s-s.js.map} +1 -1
- package/lib/{CommentsStudioLayout-Dx0jIDle.js → CommentsStudioLayout-e2hCA_5z.js} +4 -4
- package/lib/{CommentsStudioLayout-Dx0jIDle.js.map → CommentsStudioLayout-e2hCA_5z.js.map} +1 -1
- package/lib/{ReleasesMetadataProvider-hILX90V4.js → ReleasesMetadataProvider-BWsmHWkh.js} +2 -2
- package/lib/{ReleasesMetadataProvider-hILX90V4.js.map → ReleasesMetadataProvider-BWsmHWkh.js.map} +1 -1
- package/lib/{ReleasesNav-DIv-1iR7.js → ReleasesNav-DPSjEs29.js} +14 -14
- package/lib/{ReleasesNav-DIv-1iR7.js.map → ReleasesNav-DPSjEs29.js.map} +1 -1
- package/lib/{ReleasesStudioLayout-DW7fJSfG.js → ReleasesStudioLayout-CtyE88nI.js} +8 -8
- package/lib/{ReleasesStudioLayout-DW7fJSfG.js.map → ReleasesStudioLayout-CtyE88nI.js.map} +1 -1
- package/lib/{ReleasesTool-BQjO7osC.js → ReleasesTool-BjbRMZlc.js} +15 -15
- package/lib/{ReleasesTool-BQjO7osC.js.map → ReleasesTool-BjbRMZlc.js.map} +1 -1
- package/lib/{SchedulePublishingStudioLayout-Cwmdz7HZ.js → SchedulePublishingStudioLayout-gZWH97ZL.js} +3 -3
- package/lib/{SchedulePublishingStudioLayout-Cwmdz7HZ.js.map → SchedulePublishingStudioLayout-gZWH97ZL.js.map} +1 -1
- package/lib/{SchedulePublishingUpsellProvider-C5B21VDh.js → SchedulePublishingUpsellProvider-DsI8OUg-.js} +2 -2
- package/lib/{SchedulePublishingUpsellProvider-C5B21VDh.js.map → SchedulePublishingUpsellProvider-DsI8OUg-.js.map} +1 -1
- package/lib/{ScheduledPublishingEnabledProvider-BNMAVqrS.js → ScheduledPublishingEnabledProvider-BDRtV8OB.js} +3 -3
- package/lib/{ScheduledPublishingEnabledProvider-BNMAVqrS.js.map → ScheduledPublishingEnabledProvider-BDRtV8OB.js.map} +1 -1
- package/lib/{SearchProvider-DkGUk8a6.js → SearchProvider-Hk7IMQqR.js} +4 -4
- package/lib/{SearchProvider-DkGUk8a6.js.map → SearchProvider-Hk7IMQqR.js.map} +1 -1
- package/lib/{SingleDocReleaseLayout-fW8U-ktp.js → SingleDocReleaseLayout-evCp37zs.js} +2 -2
- package/lib/{SingleDocReleaseLayout-fW8U-ktp.js.map → SingleDocReleaseLayout-evCp37zs.js.map} +1 -1
- package/lib/{SingleDocReleaseUpsellProvider-BNF2Rj3j.js → SingleDocReleaseUpsellProvider-BOe2BACb.js} +4 -4
- package/lib/{SingleDocReleaseUpsellProvider-BNF2Rj3j.js.map → SingleDocReleaseUpsellProvider-BOe2BACb.js.map} +1 -1
- package/lib/{TasksStudioActiveToolLayout-CHazNA61.js → TasksStudioActiveToolLayout-Dbs-1GX6.js} +11 -11
- package/lib/{TasksStudioActiveToolLayout-CHazNA61.js.map → TasksStudioActiveToolLayout-Dbs-1GX6.js.map} +1 -1
- package/lib/{TasksStudioLayout-B7bCL28Q.js → TasksStudioLayout-Pn-RwtPi.js} +5 -5
- package/lib/{TasksStudioLayout-B7bCL28Q.js.map → TasksStudioLayout-Pn-RwtPi.js.map} +1 -1
- package/lib/{Tool-rkq_tjXo.js → Tool-D4-WLZtb.js} +12 -12
- package/lib/{Tool-rkq_tjXo.js.map → Tool-D4-WLZtb.js.map} +1 -1
- package/lib/{UnpublishVersionDialog-DWYCXGkz.js → UnpublishVersionDialog-DmFHVqhI.js} +4 -4
- package/lib/{UnpublishVersionDialog-DWYCXGkz.js.map → UnpublishVersionDialog-DmFHVqhI.js.map} +1 -1
- package/lib/{UpsellDialog-BiDSVmne.js → UpsellDialog-DRhOCOce.js} +2 -2
- package/lib/{UpsellDialog-BiDSVmne.js.map → UpsellDialog-DRhOCOce.js.map} +1 -1
- package/lib/{VariantsStudioNavbar-Bae9LOIN.js → VariantsStudioNavbar-CXpr7UUl.js} +7 -7
- package/lib/{VariantsStudioNavbar-Bae9LOIN.js.map → VariantsStudioNavbar-CXpr7UUl.js.map} +1 -1
- package/lib/{VariantsTool-E4ptTHik.js → VariantsTool-BCtrSWfP.js} +7 -7
- package/lib/{VariantsTool-E4ptTHik.js.map → VariantsTool-BCtrSWfP.js.map} +1 -1
- package/lib/{WorkspaceLoader-sdFQ9rkh.js → WorkspaceLoader-_w6NnbDb.js} +21 -21
- package/lib/{WorkspaceLoader-sdFQ9rkh.js.map → WorkspaceLoader-_w6NnbDb.js.map} +1 -1
- package/lib/_createContext.js +1 -1
- package/lib/{buildTextSelectionFromFragment-CuXpitEZ.js → buildTextSelectionFromFragment-Egmw5rNs.js} +3 -3
- package/lib/{buildTextSelectionFromFragment-CuXpitEZ.js.map → buildTextSelectionFromFragment-Egmw5rNs.js.map} +1 -1
- package/lib/{datastores-XTDIa3jc.js → datastores-DpJ5Y313.js} +2 -2
- package/lib/{datastores-XTDIa3jc.js.map → datastores-DpJ5Y313.js.map} +1 -1
- package/lib/index.js +28 -28
- package/lib/{inputResolver-DLP8YZcM.js → inputResolver-BX-VuloN.js} +4 -4
- package/lib/{inputResolver-DLP8YZcM.js.map → inputResolver-BX-VuloN.js.map} +1 -1
- package/lib/{navigation.telemetry-4pppJENG.js → navigation.telemetry-VbqjOek0.js} +7 -7
- package/lib/{navigation.telemetry-4pppJENG.js.map → navigation.telemetry-VbqjOek0.js.map} +1 -1
- package/lib/{plugin-BmARoHKH.js → plugin-DGOEvpWT.js} +4 -4
- package/lib/{plugin-BmARoHKH.js.map → plugin-DGOEvpWT.js.map} +1 -1
- package/lib/{plugin-BUox1zeI.js → plugin-Da_fKb0U.js} +3 -3
- package/lib/{plugin-BUox1zeI.js.map → plugin-Da_fKb0U.js.map} +1 -1
- package/lib/{plugin-CjN39wwt.js → plugin-DqqaZdOH.js} +5 -5
- package/lib/{plugin-CjN39wwt.js.map → plugin-DqqaZdOH.js.map} +1 -1
- package/lib/{plugin-BRnqEpCl.js → plugin-qHXYpO99.js} +6 -6
- package/lib/{plugin-BRnqEpCl.js.map → plugin-qHXYpO99.js.map} +1 -1
- package/lib/{scheduleItem-Dtb26ejO.js → scheduleItem-DcC1HE9G.js} +8 -8
- package/lib/{scheduleItem-Dtb26ejO.js.map → scheduleItem-DcC1HE9G.js.map} +1 -1
- package/lib/{schedules-6qsR7E_I.js → schedules-CbnXaXM9.js} +3 -3
- package/lib/{schedules-6qsR7E_I.js.map → schedules-CbnXaXM9.js.map} +1 -1
- package/lib/{searchDocumentRelease-CUk7BiST.js → searchDocumentRelease-C5sClmGF.js} +4 -4
- package/lib/{searchDocumentRelease-CUk7BiST.js.map → searchDocumentRelease-C5sClmGF.js.map} +1 -1
- package/lib/{studioClient-D1Z2zK3C.js → studioClient-CwMJwOTd.js} +2 -2
- package/lib/{studioClient-D1Z2zK3C.js.map → studioClient-CwMJwOTd.js.map} +1 -1
- package/lib/{useBundleDocuments-BnCBcbdJ.js → useBundleDocuments-DvVAF6cf.js} +7 -7
- package/lib/{useBundleDocuments-BnCBcbdJ.js.map → useBundleDocuments-DvVAF6cf.js.map} +1 -1
- package/lib/{useComments-Bm-0CwNH.js → useComments-DuEOnDkA.js} +2 -2
- package/lib/{useComments-Bm-0CwNH.js.map → useComments-DuEOnDkA.js.map} +1 -1
- package/lib/{useCommentsTelemetry-D1kYRuPU.js → useCommentsTelemetry-BgNdQdz5.js} +3 -3
- package/lib/{useCommentsTelemetry-D1kYRuPU.js.map → useCommentsTelemetry-BgNdQdz5.js.map} +1 -1
- package/lib/{useDocumentPreviewValues-DJvES8Wi.js → useDocumentPreviewValues-B1zNjl_D.js} +3 -3
- package/lib/{useDocumentPreviewValues-DJvES8Wi.js.map → useDocumentPreviewValues-B1zNjl_D.js.map} +1 -1
- package/lib/{useFeatureEnabled-g8eZoiLM.js → useFeatureEnabled-4qCpV_mX.js} +2 -2
- package/lib/{useFeatureEnabled-g8eZoiLM.js.map → useFeatureEnabled-4qCpV_mX.js.map} +1 -1
- package/lib/{useFieldActions-BV_qfe65.js → useFieldActions-uDe2qh98.js} +2 -2
- package/lib/{useFieldActions-BV_qfe65.js.map → useFieldActions-uDe2qh98.js.map} +1 -1
- package/lib/{useReleasesToolAvailable-Duu10qV0.js → useReleasesToolAvailable-DDuNc6HV.js} +3 -3
- package/lib/{useReleasesToolAvailable-Duu10qV0.js.map → useReleasesToolAvailable-DDuNc6HV.js.map} +1 -1
- package/lib/{useScheduledDraftMenuActions-Byiy3-k3.js → useScheduledDraftMenuActions-DqkHlC0c.js} +5 -5
- package/lib/{useScheduledDraftMenuActions-Byiy3-k3.js.map → useScheduledDraftMenuActions-DqkHlC0c.js.map} +1 -1
- package/lib/{useStudioUrl-BEb30_UK.js → useStudioUrl-B4w58A2i.js} +5 -5
- package/lib/{useStudioUrl-BEb30_UK.js.map → useStudioUrl-B4w58A2i.js.map} +1 -1
- package/lib/{useTimeZone-zs0ybzXu.js → useTimeZone-8Wd1UR4j.js} +2 -2
- package/lib/{useTimeZone-zs0ybzXu.js.map → useTimeZone-8Wd1UR4j.js.map} +1 -1
- package/lib/{validationUtils-LdwtMTh5.js → validationUtils-Cuk0jhWJ.js} +4 -4
- package/lib/{validationUtils-LdwtMTh5.js.map → validationUtils-Cuk0jhWJ.js.map} +1 -1
- package/lib/{version-XEmBTnIh.js → version-BVcB_xWL.js} +2 -2
- package/lib/{version-XEmBTnIh.js.map → version-BVcB_xWL.js.map} +1 -1
- package/package.json +10 -10
package/lib/_createContext.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as getValueAtPath } from "./useFieldActions-
|
|
2
|
-
import { f as isTextSelectionComment, n as COMMENTS_HIGHLIGHT_HUE_KEY, p as parseCommentFieldPath, v as applyInlineCommentIdAttr } from "./useComments-
|
|
1
|
+
import { s as getValueAtPath } from "./useFieldActions-uDe2qh98.js";
|
|
2
|
+
import { f as isTextSelectionComment, n as COMMENTS_HIGHLIGHT_HUE_KEY, p as parseCommentFieldPath, v as applyInlineCommentIdAttr } from "./useComments-DuEOnDkA.js";
|
|
3
3
|
import { memo, useEffect, useRef, useState } from "react";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -290,4 +290,4 @@ function findBlockByKey(arrays, key) {
|
|
|
290
290
|
}
|
|
291
291
|
export { CommentInlineHighlightSpan as a, buildRangeDecorationSelectionsFromComments as i, getCommentFieldPath as n, CommentDisabledIcon as o, buildCommentRangeDecorations as r, buildTextSelectionFromFragment as t };
|
|
292
292
|
|
|
293
|
-
//# sourceMappingURL=buildTextSelectionFromFragment-
|
|
293
|
+
//# sourceMappingURL=buildTextSelectionFromFragment-Egmw5rNs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildTextSelectionFromFragment-CuXpitEZ.js","names":["RefAttributes","SVGProps","CommentDisabledIcon","props","$","_c","ref","rest","t0","t1","Symbol","for","t2","hues","Theme","RefAttributes","css","styled","COMMENTS_HIGHLIGHT_HUE_KEY","HighlightSpan","span","theme","isDark","sanity","v2","color","_dark","addedBg","hex","addedBorder","addedHoverBg","addedHoverBorder","addedNestedBg","addedNesterBorder","authoringBg","authoringBorder","CommentInlineHighlightSpanProps","children","React","ReactNode","isAdded","isAuthoring","isHovered","isNested","CommentInlineHighlightSpan","props","$","_c","ref","rest","state","undefined","t0","t1","t2","RangeDecoration","applyPatches","cleanupEfficiency","Diff","DIFF_DELETE","DIFF_EQUAL","DIFF_INSERT","makeDiff","makePatches","Patch","isPortableTextSpan","isPortableTextTextBlock","Path","PortableTextBlock","PortableTextTextBlock","PathUtils","getValueAtPath","isTextSelectionComment","parseCommentFieldPath","CommentDocument","CommentsTextSelectionItem","DMP_MARGIN","diffText","current","next","diff","diffs","levenshtein","diffsLevenshtein","patches","margin","diffApply","allowExceedingIndices","CHILD_SYMBOL","toPlainTextWithChildSeparators","inputBlock","children","map","child","text","replaceAll","join","COMMENT_INDICATORS","COMMENT_INDICATORS_REGEX","RegExp","EMPTY_ARRAY","BuildCommentsRangeDecorationsProps","value","comments","documentValue","basePath","BuildCommentsRangeDecorationsResultItem","selection","comment","range","buildRangeDecorationSelectionsFromComments","props","length","textSelections","filter","decorators","forEach","relative","undefined","fieldPath","target","path","field","startsWith","slice","selectionMember","matchedBlock","_key","find","block","selectionText","textWithChildSeparators","diffedText","startIndex","indexOf","endIndex","textWithoutCommentTags","oldCommentedText","newCommentedText","threshold","Math","round","nullSelection","childIndexAnchor","anchorOffset","childIndexFocus","focusOffset","i","push","anchor","offset","focus","ValidateTextSelectionCommentProps","validateTextSelectionComment","selections","insertions","deletions","x","op","data","max","RangeDecoration","RangeDecorationOnMovedDetails","Path","PortableTextBlock","memo","useCallback","useEffect","useRef","useState","CommentInlineHighlightSpan","applyInlineCommentIdAttr","CommentDocument","buildRangeDecorationSelectionsFromComments","CommentRangeDecorationProps","children","React","ReactNode","commentId","currentHoveredCommentId","onClick","onHoverEnd","onHoverStart","selectedThreadId","threadId","CommentRangeDecoration","props","$","_c","decoratorRef","isNested","setIsNested","parentCommentId","setParentCommentId","t0","t1","Symbol","for","prevEl","current","previousSibling","HTMLElement","nextEl","nextSibling","key","Object","keys","prevId","getAttribute","nextId","isEqual","isNestedDecorator","Boolean","t2","handleMouseEnter","t3","handleMouseLeave","t4","handleClick","hovered","selected","t5","t6","t7","displayName","BuildRangeDecorationsProps","comments","onDecorationClick","onDecorationHoverEnd","onDecorationHoverStart","onDecorationMoved","details","value","documentValue","basePath","buildCommentRangeDecorations","rangeSelections","decorations","map","selection","comment","range","decoration","component","_id","onMoved","payload","EditorSelection","toPlainText","isPortableTextSpan","isPortableTextTextBlock","Path","PortableTextBlock","PortableTextTextBlock","PathUtils","getValueAtPath","CommentTextSelection","COMMENT_INDICATORS","BuildSelectionFromFragmentProps","fragment","documentValue","basePath","selection","buildTextSelectionFromFragment","props","Error","normalizedSelection","backward","anchor","focus","block","anchorBlock","path","anchorBlockPath","findEnclosingTextBlock","focusBlock","focusBlockPath","containingArrays","Array","blockPath","containingArray","slice","isArray","includes","push","textSelection","type","value","map","fragmentBlock","originalBlock","findBlockByKey","_key","text","anchorBlockKey","focusBlockKey","fragmentBlockText","fragmentStartSpan","children","undefined","fragmentEndSpan","length","originalTextBeforeSelection","startChildIndex","child","Math","max","offset","originalTextAfterSelection","reverse","getCommentFieldPath","selectionPath","enclosingBlockPath","toString","end","relative","candidate","arrays","key","array"],"sources":["../src/core/comments/components/icons/CommentDisabledIcon.tsx","../src/core/comments/components/pte/CommentInlineHighlightSpan.tsx","../src/core/comments/utils/inline-comments/buildRangeDecorationSelectionsFromComments.ts","../src/core/comments/utils/inline-comments/buildCommentRangeDecorations.tsx","../src/core/comments/utils/inline-comments/buildTextSelectionFromFragment.ts"],"sourcesContent":["import {type RefAttributes, type SVGProps} from 'react'\n\n/**\n * @internal\n */\nexport function CommentDisabledIcon(props: SVGProps<SVGSVGElement> & RefAttributes<SVGSVGElement>) {\n const {ref, ...rest} = props\n return (\n <svg\n data-sanity-icon=\"comment-disabled\"\n width=\"1em\"\n height=\"1em\"\n ref={ref}\n viewBox=\"0 0 25 25\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...rest}\n >\n <path\n d=\"M5.92627 14.5381H7.92627V18.5381L11.9263 14.5381H15.9263C17.0308 14.5381 17.9263 13.6427 17.9263 12.5381V6.53809C17.9263 5.43352 17.0308 4.53809 15.9263 4.53809H5.92627C4.8217 4.53809 3.92627 5.43352 3.92627 6.53809V12.5381C3.92627 13.6427 4.8217 14.5381 5.92627 14.5381Z\"\n stroke=\"currentColor\"\n strokeWidth=\"1.2\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M2.77256 2.66835C2.54413 2.51319 2.23317 2.57259 2.07802 2.80103L1.40378 3.7937C1.32927 3.9034 1.30139 4.0382 1.32627 4.16845C1.35115 4.29871 1.42676 4.41374 1.53646 4.48825L19.5861 16.7479C19.8146 16.903 20.1255 16.8436 20.2807 16.6152L20.9549 15.6225C21.0294 15.5128 21.0573 15.378 21.0324 15.2478C21.0076 15.1175 20.9319 15.0025 20.8222 14.928L2.77256 2.66835Z\"\n fill=\"currentColor\"\n strokeLinejoin=\"round\"\n />\n </svg>\n )\n}\n","import {hues} from '@sanity/color'\nimport {type Theme} from '@sanity/ui'\nimport {type RefAttributes} from 'react'\nimport {css, styled} from 'styled-components'\n\nimport {COMMENTS_HIGHLIGHT_HUE_KEY} from '../../constants'\n\n// oxlint-disable-next-line no-deprecated -- will fix in follow up PR\nconst HighlightSpan = styled.span(({theme}: {theme: Theme}) => {\n const isDark = theme.sanity.v2?.color._dark\n\n // Colors used when a comment is added\n const addedBg = hues[COMMENTS_HIGHLIGHT_HUE_KEY][isDark ? 800 : 100].hex\n const addedBorder = hues[COMMENTS_HIGHLIGHT_HUE_KEY][isDark ? 700 : 300].hex\n\n const addedHoverBg = hues[COMMENTS_HIGHLIGHT_HUE_KEY][isDark ? 700 : 200].hex\n const addedHoverBorder = hues[COMMENTS_HIGHLIGHT_HUE_KEY][isDark ? 600 : 400].hex\n\n // Colors used when a comment is added and it is a nested comment\n const addedNestedBg = hues[COMMENTS_HIGHLIGHT_HUE_KEY][isDark ? 700 : 200].hex\n const addedNesterBorder = hues[COMMENTS_HIGHLIGHT_HUE_KEY][isDark ? 600 : 400].hex\n\n // Colors used when a comment is being authored.\n // For now, we use the same colors as when a comment is added.\n const authoringBg = addedBg\n const authoringBorder = addedBorder\n\n return css`\n box-sizing: border-box;\n transition:\n background-color 100ms ease,\n border-color 100ms ease;\n\n // Make sure that child elements appropriately blend with the\n // background of the highlight span\n * {\n mix-blend-mode: ${isDark ? 'screen' : 'multiply'};\n }\n\n &[data-inline-comment-state='added'][data-inline-comment-nested='false'] {\n background-color: ${addedBg};\n border-bottom: 2px solid ${addedBorder};\n }\n\n &[data-inline-comment-state='added'][data-inline-comment-nested='true'] {\n background-color: ${addedNestedBg};\n border-bottom: 2px solid ${addedNesterBorder};\n }\n\n &[data-inline-comment-state='added'][data-inline-comment-nested='false'][data-hovered='true'] {\n background-color: ${addedHoverBg};\n border-bottom: 2px solid ${addedHoverBorder};\n }\n\n &[data-inline-comment-state='authoring'] {\n background-color: ${authoringBg};\n border-bottom: 2px solid ${authoringBorder};\n }\n `\n})\n\ninterface CommentInlineHighlightSpanProps {\n children: React.ReactNode\n isAdded?: boolean\n isAuthoring?: boolean\n isHovered?: boolean\n isNested?: boolean\n}\n\n/**\n * @internal\n */\nexport function CommentInlineHighlightSpan(\n props: CommentInlineHighlightSpanProps &\n React.HTMLProps<HTMLSpanElement> &\n RefAttributes<HTMLSpanElement>,\n) {\n const {ref, children, isAdded, isAuthoring, isHovered, isNested, ...rest} = props\n\n const state = isAdded ? 'added' : isAuthoring ? 'authoring' : undefined\n\n return (\n <HighlightSpan\n {...rest}\n data-hovered={isHovered ? 'true' : 'false'}\n data-inline-comment-nested={isNested ? 'true' : 'false'}\n data-inline-comment-state={state}\n ref={ref}\n >\n {children}\n </HighlightSpan>\n )\n}\n","import {type RangeDecoration} from '@portabletext/editor'\nimport {\n applyPatches,\n cleanupEfficiency,\n type Diff,\n DIFF_DELETE,\n DIFF_EQUAL,\n DIFF_INSERT,\n makeDiff,\n makePatches,\n type Patch,\n} from '@sanity/diff-match-patch'\nimport {\n isPortableTextSpan,\n isPortableTextTextBlock,\n type Path,\n type PortableTextBlock,\n type PortableTextTextBlock,\n} from '@sanity/types'\nimport * as PathUtils from '@sanity/util/paths'\n\nimport {getValueAtPath} from '../../../field/paths/helpers'\nimport {isTextSelectionComment, parseCommentFieldPath} from '../../helpers'\nimport {type CommentDocument, type CommentsTextSelectionItem} from '../../types'\n\n// This must be set high to avoid false positives\n// (for example, when there are multiple occurrences of the same word, and you delete the original commented word)\n// Don't set it above 15, as it will cause performance issues\nconst DMP_MARGIN = 15\n\nfunction diffText(current: string, next: string) {\n const diff = makeDiff(current, next)\n const diffs = cleanupEfficiency(diff)\n const levenshtein = diffsLevenshtein(diffs)\n return {patches: makePatches(current, diffs, {margin: DMP_MARGIN}), levenshtein}\n}\n\nfunction diffApply(current: string, patches: Patch[]) {\n return applyPatches(patches, current, {\n allowExceedingIndices: true,\n margin: DMP_MARGIN,\n })[0]\n}\n\nconst CHILD_SYMBOL = '\\uF0D0'\nfunction toPlainTextWithChildSeparators(inputBlock: PortableTextTextBlock) {\n return inputBlock.children\n .map((child) => (isPortableTextSpan(child) ? child.text.replaceAll(CHILD_SYMBOL, ' ') : ''))\n .join(CHILD_SYMBOL)\n}\n\nexport const COMMENT_INDICATORS = ['\\uF000', '\\uF001']\nconst COMMENT_INDICATORS_REGEX = new RegExp(`[${COMMENT_INDICATORS.join('')}]`, 'g')\n\nconst EMPTY_ARRAY: [] = []\n\n/**\n * @internal\n */\nexport interface BuildCommentsRangeDecorationsProps {\n value: PortableTextBlock[] | undefined\n comments: CommentDocument[]\n /**\n * Document value the stored `field` paths resolve against. Falls back to a\n * top-level `value.find` on the editor slice when absent.\n */\n documentValue?: unknown\n /** The editor's own document path. */\n basePath?: Path\n}\n\n/**\n * @internal\n */\nexport interface BuildCommentsRangeDecorationsResultItem {\n selection: RangeDecoration['selection']\n comment: CommentDocument\n range: CommentsTextSelectionItem\n}\n\n/**\n * A function that builds range decoration selections from comments and their associated text.\n * @internal\n */\nexport function buildRangeDecorationSelectionsFromComments(\n props: BuildCommentsRangeDecorationsProps,\n): BuildCommentsRangeDecorationsResultItem[] {\n const {value, comments, documentValue, basePath} = props\n\n if (!value || value.length === 0) return EMPTY_ARRAY\n\n const textSelections = comments.filter(isTextSelectionComment)\n const decorators: BuildCommentsRangeDecorationsResultItem[] = []\n\n textSelections.forEach((comment) => {\n let relative: Path = []\n if (documentValue !== undefined && basePath) {\n const fieldPath = parseCommentFieldPath(comment.target.path?.field)\n if (!fieldPath) {\n // A comment without a parseable `field` cannot resolve to a block.\n return\n }\n if (!PathUtils.startsWith(basePath, fieldPath)) return\n relative = fieldPath.slice(basePath.length)\n }\n\n comment.target.path?.selection?.value.forEach((selectionMember) => {\n const matchedBlock =\n documentValue !== undefined && basePath\n ? (getValueAtPath(documentValue, [\n ...basePath,\n ...relative,\n {_key: selectionMember._key},\n ]) as PortableTextBlock | undefined)\n : value.find((block) => block._key === selectionMember._key)\n if (!matchedBlock || !isPortableTextTextBlock(matchedBlock)) {\n return\n }\n const selectionText = selectionMember.text.replaceAll(COMMENT_INDICATORS_REGEX, '')\n const textWithChildSeparators = toPlainTextWithChildSeparators(matchedBlock)\n const {patches} = diffText(selectionText, selectionMember.text)\n const diffedText = diffApply(textWithChildSeparators, patches)\n const startIndex = diffedText.indexOf(COMMENT_INDICATORS[0])\n const endIndex = diffedText\n .replaceAll(COMMENT_INDICATORS[0], '')\n .indexOf(COMMENT_INDICATORS[1])\n const textWithoutCommentTags = diffedText.replaceAll(COMMENT_INDICATORS_REGEX, '')\n const oldCommentedText = selectionMember.text.slice(\n selectionMember.text.indexOf(COMMENT_INDICATORS[0]) + 1,\n selectionMember.text.indexOf(COMMENT_INDICATORS[1]),\n )\n const newCommentedText = textWithoutCommentTags.slice(startIndex, endIndex)\n const {levenshtein} = diffText(newCommentedText, oldCommentedText)\n const threshold = Math.round(newCommentedText.length + oldCommentedText.length / 2)\n\n let nullSelection = false\n\n if (newCommentedText.length === 0) {\n nullSelection = true\n }\n\n if (levenshtein > threshold) {\n nullSelection = true\n }\n\n // If there no longer is any text within the range, we don't need to create a decoration\n if (startIndex + 1 === endIndex) {\n nullSelection = true\n }\n\n if (startIndex !== -1 && endIndex !== -1) {\n let childIndexAnchor = 0\n let anchorOffset = 0\n let childIndexFocus = 0\n let focusOffset = 0\n for (let i = 0; i < textWithoutCommentTags.length; i++) {\n if (textWithoutCommentTags[i] === CHILD_SYMBOL) {\n if (i <= startIndex) {\n anchorOffset = -1\n childIndexAnchor++\n }\n focusOffset = -1\n childIndexFocus++\n }\n if (i < startIndex) {\n anchorOffset++\n }\n if (i < startIndex + newCommentedText.length) {\n focusOffset++\n }\n if (i === startIndex + newCommentedText.length) {\n break\n }\n }\n\n decorators.push({\n selection: {\n anchor: {\n path: [\n ...relative,\n {_key: matchedBlock._key},\n 'children',\n {_key: matchedBlock.children[childIndexAnchor]._key},\n ],\n offset: anchorOffset,\n },\n focus: {\n path: [\n ...relative,\n {_key: matchedBlock._key},\n 'children',\n {_key: matchedBlock.children[childIndexFocus]._key},\n ],\n offset: focusOffset,\n },\n },\n comment,\n range: {_key: matchedBlock._key, text: nullSelection ? '' : diffedText},\n })\n }\n })\n })\n if (decorators.length === 0) return EMPTY_ARRAY\n return decorators\n}\n\ninterface ValidateTextSelectionCommentProps {\n comment: CommentDocument\n value: PortableTextBlock[]\n}\n\nfunction validateTextSelectionComment(props: ValidateTextSelectionCommentProps): boolean {\n const {comment, value} = props\n if (!isTextSelectionComment(comment)) return false\n\n const selections = buildRangeDecorationSelectionsFromComments({comments: [comment], value})\n\n return selections.length > 0\n}\n\nfunction diffsLevenshtein(diffs: Diff[]): number {\n let levenshtein = 0\n let insertions = 0\n let deletions = 0\n for (let x = 0; x < diffs.length; x++) {\n const op = diffs[x][0]\n const data = diffs[x][1]\n switch (op) {\n case DIFF_INSERT:\n insertions += data.length\n break\n case DIFF_DELETE:\n deletions += data.length\n break\n case DIFF_EQUAL:\n // A deletion and an insertion is one substitution.\n levenshtein += Math.max(insertions, deletions)\n insertions = 0\n deletions = 0\n break\n default:\n // Do nothing\n }\n }\n levenshtein += Math.max(insertions, deletions)\n return levenshtein\n}\n","import {type RangeDecoration, type RangeDecorationOnMovedDetails} from '@portabletext/editor'\nimport {type Path, type PortableTextBlock} from '@sanity/types'\nimport {memo, useCallback, useEffect, useRef, useState} from 'react'\n\nimport {CommentInlineHighlightSpan} from '../../components/pte/CommentInlineHighlightSpan'\nimport {applyInlineCommentIdAttr} from '../../hooks/useCommentsScroll'\nimport {type CommentDocument} from '../../types'\nimport {buildRangeDecorationSelectionsFromComments} from './buildRangeDecorationSelectionsFromComments'\n\ninterface CommentRangeDecorationProps {\n children: React.ReactNode\n commentId: string\n currentHoveredCommentId: string | null\n onClick: (commentId: string) => void\n onHoverEnd: (commentId: null) => void\n onHoverStart: (commentId: string) => void\n selectedThreadId: string | null\n threadId: string\n}\n\nconst CommentRangeDecoration = memo(function CommentRangeDecoration(\n props: CommentRangeDecorationProps,\n) {\n const {\n children,\n commentId,\n currentHoveredCommentId,\n onClick,\n onHoverEnd,\n onHoverStart,\n selectedThreadId,\n threadId,\n } = props\n const decoratorRef = useRef<HTMLSpanElement | null>(null)\n const [isNested, setIsNested] = useState(false)\n const [parentCommentId, setParentCommentId] = useState<string | null>(null)\n\n useEffect(() => {\n // Get the previous and next sibling of the decorator element\n const prevEl = decoratorRef.current?.previousSibling as HTMLElement | null\n const nextEl = decoratorRef.current?.nextSibling as HTMLElement | null\n\n // If there is no previous or next sibling, then the decorator is not nested\n if (!prevEl || !nextEl) {\n setIsNested(false)\n return\n }\n\n // We use the `applyInlineCommentIdAttr` to get the key of the data attribute\n // used for the inline comment id on the decorator element.\n const [key] = Object.keys(applyInlineCommentIdAttr(''))\n\n const prevId = prevEl.getAttribute(key)\n const nextId = nextEl.getAttribute(key)\n\n const isEqual = prevId === nextId\n\n const isNestedDecorator = Boolean(prevId && nextId && isEqual)\n setParentCommentId(isNestedDecorator ? prevId : null)\n\n setIsNested(isNestedDecorator)\n }, [])\n\n const handleMouseEnter = useCallback(() => onHoverStart(commentId), [commentId, onHoverStart])\n const handleMouseLeave = useCallback(() => onHoverEnd(null), [onHoverEnd])\n const handleClick = useCallback(() => onClick(commentId), [commentId, onClick])\n\n const hovered =\n currentHoveredCommentId === commentId ||\n (currentHoveredCommentId === parentCommentId && isNested)\n\n const selected = selectedThreadId === threadId\n\n return (\n <CommentInlineHighlightSpan\n isAdded\n isHovered={hovered || selected}\n isNested={isNested}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n ref={decoratorRef}\n {...applyInlineCommentIdAttr(threadId)}\n >\n {children}\n </CommentInlineHighlightSpan>\n )\n})\nCommentRangeDecoration.displayName = 'Memo(CommentRangeDecoration)'\n\ninterface BuildRangeDecorationsProps {\n comments: CommentDocument[]\n currentHoveredCommentId: string | null\n onDecorationClick: (commentId: string) => void\n onDecorationHoverEnd: (commentId: null) => void\n onDecorationHoverStart: (commentId: string) => void\n onDecorationMoved: (details: RangeDecorationOnMovedDetails) => void\n selectedThreadId: string | null\n value: PortableTextBlock[] | undefined\n documentValue?: unknown\n basePath?: Path\n}\n\n/**\n * @internal\n */\nexport function buildCommentRangeDecorations(props: BuildRangeDecorationsProps) {\n const {\n comments,\n currentHoveredCommentId,\n onDecorationClick,\n onDecorationHoverEnd,\n onDecorationHoverStart,\n onDecorationMoved,\n selectedThreadId,\n value,\n documentValue,\n basePath,\n } = props\n const rangeSelections = buildRangeDecorationSelectionsFromComments({\n comments,\n value,\n documentValue,\n basePath,\n })\n\n const decorations = rangeSelections.map(({selection, comment, range}) => {\n const decoration: RangeDecoration = {\n component: ({children}) => (\n <CommentRangeDecoration\n commentId={comment._id}\n currentHoveredCommentId={currentHoveredCommentId}\n onClick={onDecorationClick}\n onHoverEnd={onDecorationHoverEnd}\n onHoverStart={onDecorationHoverStart}\n selectedThreadId={selectedThreadId}\n threadId={comment.threadId}\n >\n {children}\n </CommentRangeDecoration>\n ),\n onMoved: onDecorationMoved,\n selection,\n payload: {\n commentId: comment._id,\n range,\n },\n }\n return decoration\n })\n return decorations\n}\n","import {type EditorSelection} from '@portabletext/editor'\nimport {toPlainText} from '@portabletext/react'\nimport {\n isPortableTextSpan,\n isPortableTextTextBlock,\n type Path,\n type PortableTextBlock,\n type PortableTextTextBlock,\n} from '@sanity/types'\nimport * as PathUtils from '@sanity/util/paths'\n\nimport {getValueAtPath} from '../../../field/paths/helpers'\nimport {type CommentTextSelection} from '../../types'\nimport {COMMENT_INDICATORS} from './buildRangeDecorationSelectionsFromComments'\n\ninterface BuildSelectionFromFragmentProps {\n fragment: PortableTextBlock[]\n documentValue: unknown\n basePath: Path\n selection: EditorSelection\n}\n\n/**\n * @internal\n */\nexport function buildTextSelectionFromFragment(\n props: BuildSelectionFromFragmentProps,\n): CommentTextSelection {\n const {fragment, documentValue, basePath, selection} = props\n if (!selection) {\n throw new Error('Selection is required')\n }\n const normalizedSelection: EditorSelection = selection.backward\n ? {backward: false, anchor: selection.focus, focus: selection.anchor}\n : selection\n\n const {block: anchorBlock, path: anchorBlockPath} =\n findEnclosingTextBlock(documentValue, basePath, normalizedSelection.anchor.path) ?? {}\n const {block: focusBlock, path: focusBlockPath} =\n findEnclosingTextBlock(documentValue, basePath, normalizedSelection.focus.path) ?? {}\n\n // A selection spanning three or more blocks has fragment blocks that are\n // neither the anchor nor the focus block. They live in the same containing\n // arrays, so resolve every fragment block by `_key` within those arrays.\n const containingArrays: Array<Array<unknown>> = []\n for (const blockPath of [anchorBlockPath, focusBlockPath]) {\n if (!blockPath) continue\n const containingArray = getValueAtPath(documentValue, [...basePath, ...blockPath.slice(0, -1)])\n if (Array.isArray(containingArray) && !containingArrays.includes(containingArray)) {\n containingArrays.push(containingArray)\n }\n }\n\n const textSelection: CommentTextSelection = {\n type: 'text',\n value: fragment.map((fragmentBlock) => {\n const originalBlock = findBlockByKey(containingArrays, fragmentBlock._key)\n if (!isPortableTextTextBlock(originalBlock)) {\n return {\n _key: fragmentBlock._key,\n text: '',\n }\n }\n const anchorBlockKey = anchorBlock?._key\n const focusBlockKey = focusBlock?._key\n const fragmentBlockText = toPlainText([fragmentBlock])\n const fragmentStartSpan = isPortableTextTextBlock(fragmentBlock)\n ? fragmentBlock.children[0]\n : undefined\n const fragmentEndSpan = isPortableTextTextBlock(fragmentBlock)\n ? fragmentBlock.children[fragmentBlock.children.length - 1]\n : undefined\n let originalTextBeforeSelection = ''\n let startChildIndex = -1\n if (anchorBlockKey === originalBlock._key) {\n for (const child of originalBlock.children) {\n startChildIndex++\n if (child._key === fragmentStartSpan?._key) {\n originalTextBeforeSelection +=\n (isPortableTextSpan(child) &&\n child.text.slice(0, Math.max(0, normalizedSelection.anchor.offset))) ||\n ''\n break\n }\n originalTextBeforeSelection += child.text\n }\n }\n let originalTextAfterSelection = ''\n if (focusBlockKey === originalBlock._key) {\n for (const child of originalBlock.children.slice(startChildIndex).reverse()) {\n if (child._key === fragmentEndSpan?._key) {\n originalTextAfterSelection =\n ((isPortableTextSpan(child) &&\n child.text.slice(normalizedSelection.focus.offset, child.text.length)) ||\n '') + originalTextAfterSelection\n break\n }\n originalTextAfterSelection = child.text + originalTextAfterSelection\n }\n }\n return {\n _key: originalBlock._key,\n text: `${originalTextBeforeSelection}${COMMENT_INDICATORS[0]}${fragmentBlockText}${COMMENT_INDICATORS[1]}${originalTextAfterSelection}`,\n }\n }),\n }\n\n return textSelection\n}\n\n/**\n * The data path to the block's containing array. Returns `undefined` if no\n * enclosing text block exists at the selection path.\n *\n * @internal\n */\nexport function getCommentFieldPath(\n documentValue: unknown,\n basePath: Path,\n selectionPath: Path,\n): string | undefined {\n const enclosingBlockPath = findEnclosingTextBlock(documentValue, basePath, selectionPath)?.path\n if (!enclosingBlockPath) return undefined\n return PathUtils.toString([...basePath, ...enclosingBlockPath.slice(0, -1)])\n}\n\n/**\n * Walk `path` up to root against the document value from `basePath`, returning\n * the deepest enclosing text block and the segments (relative to `basePath`)\n * that reach it. Selection paths from PTE are editor-relative.\n */\nfunction findEnclosingTextBlock(\n documentValue: unknown,\n basePath: Path,\n path: Path,\n): {block: PortableTextTextBlock; path: Path} | undefined {\n for (let end = path.length; end > 0; end--) {\n const relative = path.slice(0, end)\n const candidate = getValueAtPath(documentValue, [...basePath, ...relative])\n if (isPortableTextTextBlock(candidate)) {\n return {block: candidate, path: relative}\n }\n }\n return undefined\n}\n\nfunction findBlockByKey(\n arrays: Array<Array<unknown>>,\n key: string,\n): PortableTextTextBlock | undefined {\n for (const array of arrays) {\n for (const block of array) {\n if (isPortableTextTextBlock(block) && block._key === key) {\n return block\n }\n }\n }\n return undefined\n}\n"],"mappings":";;;;;;;;;;;;;;AAKA,SAAOE,oBAAAC,OAAA;CAAA,IAAAC,IAAAC,EAAA,CAAA,GAAAC,KAAAC;CAAA,AAAAH,EAAA,OAAAD,SACuBG,MAAAF,EAAA,IAAAG,OAAAH,EAAA,OAA5B,CAAAE,QAAAC,QAAuBJ,OAAKC,EAAA,K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W,MACwD;CACxD,KAAK,IAAI0C,MAAM1C,KAAK6B,QAAQa,MAAM,GAAGA,OAAO;EAC1C,IAAMC,WAAW3C,KAAKS,MAAM,GAAGiC,GAAG,GAC5BE,YAAY7D,eAAeK,eAAe,CAAC,GAAGC,UAAU,GAAGsD,QAAQ,CAAC;EAC1E,IAAIjE,wBAAwBkE,SAAS,GACnC,OAAO;GAAC9C,OAAO8C;GAAW5C,MAAM2C;EAAQ;CAE5C;AAEF;AAEA,SAASxB,eACP0B,QACAC,KACmC;CACnC,KAAK,IAAMC,SAASF,QAClB,KAAK,IAAM/C,SAASiD,OAClB,IAAIrE,wBAAwBoB,KAAK,KAAKA,MAAMsB,SAAS0B,KACnD,OAAOhD;AAKf"}
|
|
1
|
+
{"version":3,"file":"buildTextSelectionFromFragment-Egmw5rNs.js","names":["RefAttributes","SVGProps","CommentDisabledIcon","props","$","_c","ref","rest","t0","t1","Symbol","for","t2","hues","Theme","RefAttributes","css","styled","COMMENTS_HIGHLIGHT_HUE_KEY","HighlightSpan","span","theme","isDark","sanity","v2","color","_dark","addedBg","hex","addedBorder","addedHoverBg","addedHoverBorder","addedNestedBg","addedNesterBorder","authoringBg","authoringBorder","CommentInlineHighlightSpanProps","children","React","ReactNode","isAdded","isAuthoring","isHovered","isNested","CommentInlineHighlightSpan","props","$","_c","ref","rest","state","undefined","t0","t1","t2","RangeDecoration","applyPatches","cleanupEfficiency","Diff","DIFF_DELETE","DIFF_EQUAL","DIFF_INSERT","makeDiff","makePatches","Patch","isPortableTextSpan","isPortableTextTextBlock","Path","PortableTextBlock","PortableTextTextBlock","PathUtils","getValueAtPath","isTextSelectionComment","parseCommentFieldPath","CommentDocument","CommentsTextSelectionItem","DMP_MARGIN","diffText","current","next","diff","diffs","levenshtein","diffsLevenshtein","patches","margin","diffApply","allowExceedingIndices","CHILD_SYMBOL","toPlainTextWithChildSeparators","inputBlock","children","map","child","text","replaceAll","join","COMMENT_INDICATORS","COMMENT_INDICATORS_REGEX","RegExp","EMPTY_ARRAY","BuildCommentsRangeDecorationsProps","value","comments","documentValue","basePath","BuildCommentsRangeDecorationsResultItem","selection","comment","range","buildRangeDecorationSelectionsFromComments","props","length","textSelections","filter","decorators","forEach","relative","undefined","fieldPath","target","path","field","startsWith","slice","selectionMember","matchedBlock","_key","find","block","selectionText","textWithChildSeparators","diffedText","startIndex","indexOf","endIndex","textWithoutCommentTags","oldCommentedText","newCommentedText","threshold","Math","round","nullSelection","childIndexAnchor","anchorOffset","childIndexFocus","focusOffset","i","push","anchor","offset","focus","ValidateTextSelectionCommentProps","validateTextSelectionComment","selections","insertions","deletions","x","op","data","max","RangeDecoration","RangeDecorationOnMovedDetails","Path","PortableTextBlock","memo","useCallback","useEffect","useRef","useState","CommentInlineHighlightSpan","applyInlineCommentIdAttr","CommentDocument","buildRangeDecorationSelectionsFromComments","CommentRangeDecorationProps","children","React","ReactNode","commentId","currentHoveredCommentId","onClick","onHoverEnd","onHoverStart","selectedThreadId","threadId","CommentRangeDecoration","props","$","_c","decoratorRef","isNested","setIsNested","parentCommentId","setParentCommentId","t0","t1","Symbol","for","prevEl","current","previousSibling","HTMLElement","nextEl","nextSibling","key","Object","keys","prevId","getAttribute","nextId","isEqual","isNestedDecorator","Boolean","t2","handleMouseEnter","t3","handleMouseLeave","t4","handleClick","hovered","selected","t5","t6","t7","displayName","BuildRangeDecorationsProps","comments","onDecorationClick","onDecorationHoverEnd","onDecorationHoverStart","onDecorationMoved","details","value","documentValue","basePath","buildCommentRangeDecorations","rangeSelections","decorations","map","selection","comment","range","decoration","component","_id","onMoved","payload","EditorSelection","toPlainText","isPortableTextSpan","isPortableTextTextBlock","Path","PortableTextBlock","PortableTextTextBlock","PathUtils","getValueAtPath","CommentTextSelection","COMMENT_INDICATORS","BuildSelectionFromFragmentProps","fragment","documentValue","basePath","selection","buildTextSelectionFromFragment","props","Error","normalizedSelection","backward","anchor","focus","block","anchorBlock","path","anchorBlockPath","findEnclosingTextBlock","focusBlock","focusBlockPath","containingArrays","Array","blockPath","containingArray","slice","isArray","includes","push","textSelection","type","value","map","fragmentBlock","originalBlock","findBlockByKey","_key","text","anchorBlockKey","focusBlockKey","fragmentBlockText","fragmentStartSpan","children","undefined","fragmentEndSpan","length","originalTextBeforeSelection","startChildIndex","child","Math","max","offset","originalTextAfterSelection","reverse","getCommentFieldPath","selectionPath","enclosingBlockPath","toString","end","relative","candidate","arrays","key","array"],"sources":["../src/core/comments/components/icons/CommentDisabledIcon.tsx","../src/core/comments/components/pte/CommentInlineHighlightSpan.tsx","../src/core/comments/utils/inline-comments/buildRangeDecorationSelectionsFromComments.ts","../src/core/comments/utils/inline-comments/buildCommentRangeDecorations.tsx","../src/core/comments/utils/inline-comments/buildTextSelectionFromFragment.ts"],"sourcesContent":["import {type RefAttributes, type SVGProps} from 'react'\n\n/**\n * @internal\n */\nexport function CommentDisabledIcon(props: SVGProps<SVGSVGElement> & RefAttributes<SVGSVGElement>) {\n const {ref, ...rest} = props\n return (\n <svg\n data-sanity-icon=\"comment-disabled\"\n width=\"1em\"\n height=\"1em\"\n ref={ref}\n viewBox=\"0 0 25 25\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...rest}\n >\n <path\n d=\"M5.92627 14.5381H7.92627V18.5381L11.9263 14.5381H15.9263C17.0308 14.5381 17.9263 13.6427 17.9263 12.5381V6.53809C17.9263 5.43352 17.0308 4.53809 15.9263 4.53809H5.92627C4.8217 4.53809 3.92627 5.43352 3.92627 6.53809V12.5381C3.92627 13.6427 4.8217 14.5381 5.92627 14.5381Z\"\n stroke=\"currentColor\"\n strokeWidth=\"1.2\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M2.77256 2.66835C2.54413 2.51319 2.23317 2.57259 2.07802 2.80103L1.40378 3.7937C1.32927 3.9034 1.30139 4.0382 1.32627 4.16845C1.35115 4.29871 1.42676 4.41374 1.53646 4.48825L19.5861 16.7479C19.8146 16.903 20.1255 16.8436 20.2807 16.6152L20.9549 15.6225C21.0294 15.5128 21.0573 15.378 21.0324 15.2478C21.0076 15.1175 20.9319 15.0025 20.8222 14.928L2.77256 2.66835Z\"\n fill=\"currentColor\"\n strokeLinejoin=\"round\"\n />\n </svg>\n )\n}\n","import {hues} from '@sanity/color'\nimport {type Theme} from '@sanity/ui'\nimport {type RefAttributes} from 'react'\nimport {css, styled} from 'styled-components'\n\nimport {COMMENTS_HIGHLIGHT_HUE_KEY} from '../../constants'\n\n// oxlint-disable-next-line no-deprecated -- will fix in follow up PR\nconst HighlightSpan = styled.span(({theme}: {theme: Theme}) => {\n const isDark = theme.sanity.v2?.color._dark\n\n // Colors used when a comment is added\n const addedBg = hues[COMMENTS_HIGHLIGHT_HUE_KEY][isDark ? 800 : 100].hex\n const addedBorder = hues[COMMENTS_HIGHLIGHT_HUE_KEY][isDark ? 700 : 300].hex\n\n const addedHoverBg = hues[COMMENTS_HIGHLIGHT_HUE_KEY][isDark ? 700 : 200].hex\n const addedHoverBorder = hues[COMMENTS_HIGHLIGHT_HUE_KEY][isDark ? 600 : 400].hex\n\n // Colors used when a comment is added and it is a nested comment\n const addedNestedBg = hues[COMMENTS_HIGHLIGHT_HUE_KEY][isDark ? 700 : 200].hex\n const addedNesterBorder = hues[COMMENTS_HIGHLIGHT_HUE_KEY][isDark ? 600 : 400].hex\n\n // Colors used when a comment is being authored.\n // For now, we use the same colors as when a comment is added.\n const authoringBg = addedBg\n const authoringBorder = addedBorder\n\n return css`\n box-sizing: border-box;\n transition:\n background-color 100ms ease,\n border-color 100ms ease;\n\n // Make sure that child elements appropriately blend with the\n // background of the highlight span\n * {\n mix-blend-mode: ${isDark ? 'screen' : 'multiply'};\n }\n\n &[data-inline-comment-state='added'][data-inline-comment-nested='false'] {\n background-color: ${addedBg};\n border-bottom: 2px solid ${addedBorder};\n }\n\n &[data-inline-comment-state='added'][data-inline-comment-nested='true'] {\n background-color: ${addedNestedBg};\n border-bottom: 2px solid ${addedNesterBorder};\n }\n\n &[data-inline-comment-state='added'][data-inline-comment-nested='false'][data-hovered='true'] {\n background-color: ${addedHoverBg};\n border-bottom: 2px solid ${addedHoverBorder};\n }\n\n &[data-inline-comment-state='authoring'] {\n background-color: ${authoringBg};\n border-bottom: 2px solid ${authoringBorder};\n }\n `\n})\n\ninterface CommentInlineHighlightSpanProps {\n children: React.ReactNode\n isAdded?: boolean\n isAuthoring?: boolean\n isHovered?: boolean\n isNested?: boolean\n}\n\n/**\n * @internal\n */\nexport function CommentInlineHighlightSpan(\n props: CommentInlineHighlightSpanProps &\n React.HTMLProps<HTMLSpanElement> &\n RefAttributes<HTMLSpanElement>,\n) {\n const {ref, children, isAdded, isAuthoring, isHovered, isNested, ...rest} = props\n\n const state = isAdded ? 'added' : isAuthoring ? 'authoring' : undefined\n\n return (\n <HighlightSpan\n {...rest}\n data-hovered={isHovered ? 'true' : 'false'}\n data-inline-comment-nested={isNested ? 'true' : 'false'}\n data-inline-comment-state={state}\n ref={ref}\n >\n {children}\n </HighlightSpan>\n )\n}\n","import {type RangeDecoration} from '@portabletext/editor'\nimport {\n applyPatches,\n cleanupEfficiency,\n type Diff,\n DIFF_DELETE,\n DIFF_EQUAL,\n DIFF_INSERT,\n makeDiff,\n makePatches,\n type Patch,\n} from '@sanity/diff-match-patch'\nimport {\n isPortableTextSpan,\n isPortableTextTextBlock,\n type Path,\n type PortableTextBlock,\n type PortableTextTextBlock,\n} from '@sanity/types'\nimport * as PathUtils from '@sanity/util/paths'\n\nimport {getValueAtPath} from '../../../field/paths/helpers'\nimport {isTextSelectionComment, parseCommentFieldPath} from '../../helpers'\nimport {type CommentDocument, type CommentsTextSelectionItem} from '../../types'\n\n// This must be set high to avoid false positives\n// (for example, when there are multiple occurrences of the same word, and you delete the original commented word)\n// Don't set it above 15, as it will cause performance issues\nconst DMP_MARGIN = 15\n\nfunction diffText(current: string, next: string) {\n const diff = makeDiff(current, next)\n const diffs = cleanupEfficiency(diff)\n const levenshtein = diffsLevenshtein(diffs)\n return {patches: makePatches(current, diffs, {margin: DMP_MARGIN}), levenshtein}\n}\n\nfunction diffApply(current: string, patches: Patch[]) {\n return applyPatches(patches, current, {\n allowExceedingIndices: true,\n margin: DMP_MARGIN,\n })[0]\n}\n\nconst CHILD_SYMBOL = '\\uF0D0'\nfunction toPlainTextWithChildSeparators(inputBlock: PortableTextTextBlock) {\n return inputBlock.children\n .map((child) => (isPortableTextSpan(child) ? child.text.replaceAll(CHILD_SYMBOL, ' ') : ''))\n .join(CHILD_SYMBOL)\n}\n\nexport const COMMENT_INDICATORS = ['\\uF000', '\\uF001']\nconst COMMENT_INDICATORS_REGEX = new RegExp(`[${COMMENT_INDICATORS.join('')}]`, 'g')\n\nconst EMPTY_ARRAY: [] = []\n\n/**\n * @internal\n */\nexport interface BuildCommentsRangeDecorationsProps {\n value: PortableTextBlock[] | undefined\n comments: CommentDocument[]\n /**\n * Document value the stored `field` paths resolve against. Falls back to a\n * top-level `value.find` on the editor slice when absent.\n */\n documentValue?: unknown\n /** The editor's own document path. */\n basePath?: Path\n}\n\n/**\n * @internal\n */\nexport interface BuildCommentsRangeDecorationsResultItem {\n selection: RangeDecoration['selection']\n comment: CommentDocument\n range: CommentsTextSelectionItem\n}\n\n/**\n * A function that builds range decoration selections from comments and their associated text.\n * @internal\n */\nexport function buildRangeDecorationSelectionsFromComments(\n props: BuildCommentsRangeDecorationsProps,\n): BuildCommentsRangeDecorationsResultItem[] {\n const {value, comments, documentValue, basePath} = props\n\n if (!value || value.length === 0) return EMPTY_ARRAY\n\n const textSelections = comments.filter(isTextSelectionComment)\n const decorators: BuildCommentsRangeDecorationsResultItem[] = []\n\n textSelections.forEach((comment) => {\n let relative: Path = []\n if (documentValue !== undefined && basePath) {\n const fieldPath = parseCommentFieldPath(comment.target.path?.field)\n if (!fieldPath) {\n // A comment without a parseable `field` cannot resolve to a block.\n return\n }\n if (!PathUtils.startsWith(basePath, fieldPath)) return\n relative = fieldPath.slice(basePath.length)\n }\n\n comment.target.path?.selection?.value.forEach((selectionMember) => {\n const matchedBlock =\n documentValue !== undefined && basePath\n ? (getValueAtPath(documentValue, [\n ...basePath,\n ...relative,\n {_key: selectionMember._key},\n ]) as PortableTextBlock | undefined)\n : value.find((block) => block._key === selectionMember._key)\n if (!matchedBlock || !isPortableTextTextBlock(matchedBlock)) {\n return\n }\n const selectionText = selectionMember.text.replaceAll(COMMENT_INDICATORS_REGEX, '')\n const textWithChildSeparators = toPlainTextWithChildSeparators(matchedBlock)\n const {patches} = diffText(selectionText, selectionMember.text)\n const diffedText = diffApply(textWithChildSeparators, patches)\n const startIndex = diffedText.indexOf(COMMENT_INDICATORS[0])\n const endIndex = diffedText\n .replaceAll(COMMENT_INDICATORS[0], '')\n .indexOf(COMMENT_INDICATORS[1])\n const textWithoutCommentTags = diffedText.replaceAll(COMMENT_INDICATORS_REGEX, '')\n const oldCommentedText = selectionMember.text.slice(\n selectionMember.text.indexOf(COMMENT_INDICATORS[0]) + 1,\n selectionMember.text.indexOf(COMMENT_INDICATORS[1]),\n )\n const newCommentedText = textWithoutCommentTags.slice(startIndex, endIndex)\n const {levenshtein} = diffText(newCommentedText, oldCommentedText)\n const threshold = Math.round(newCommentedText.length + oldCommentedText.length / 2)\n\n let nullSelection = false\n\n if (newCommentedText.length === 0) {\n nullSelection = true\n }\n\n if (levenshtein > threshold) {\n nullSelection = true\n }\n\n // If there no longer is any text within the range, we don't need to create a decoration\n if (startIndex + 1 === endIndex) {\n nullSelection = true\n }\n\n if (startIndex !== -1 && endIndex !== -1) {\n let childIndexAnchor = 0\n let anchorOffset = 0\n let childIndexFocus = 0\n let focusOffset = 0\n for (let i = 0; i < textWithoutCommentTags.length; i++) {\n if (textWithoutCommentTags[i] === CHILD_SYMBOL) {\n if (i <= startIndex) {\n anchorOffset = -1\n childIndexAnchor++\n }\n focusOffset = -1\n childIndexFocus++\n }\n if (i < startIndex) {\n anchorOffset++\n }\n if (i < startIndex + newCommentedText.length) {\n focusOffset++\n }\n if (i === startIndex + newCommentedText.length) {\n break\n }\n }\n\n decorators.push({\n selection: {\n anchor: {\n path: [\n ...relative,\n {_key: matchedBlock._key},\n 'children',\n {_key: matchedBlock.children[childIndexAnchor]._key},\n ],\n offset: anchorOffset,\n },\n focus: {\n path: [\n ...relative,\n {_key: matchedBlock._key},\n 'children',\n {_key: matchedBlock.children[childIndexFocus]._key},\n ],\n offset: focusOffset,\n },\n },\n comment,\n range: {_key: matchedBlock._key, text: nullSelection ? '' : diffedText},\n })\n }\n })\n })\n if (decorators.length === 0) return EMPTY_ARRAY\n return decorators\n}\n\ninterface ValidateTextSelectionCommentProps {\n comment: CommentDocument\n value: PortableTextBlock[]\n}\n\nfunction validateTextSelectionComment(props: ValidateTextSelectionCommentProps): boolean {\n const {comment, value} = props\n if (!isTextSelectionComment(comment)) return false\n\n const selections = buildRangeDecorationSelectionsFromComments({comments: [comment], value})\n\n return selections.length > 0\n}\n\nfunction diffsLevenshtein(diffs: Diff[]): number {\n let levenshtein = 0\n let insertions = 0\n let deletions = 0\n for (let x = 0; x < diffs.length; x++) {\n const op = diffs[x][0]\n const data = diffs[x][1]\n switch (op) {\n case DIFF_INSERT:\n insertions += data.length\n break\n case DIFF_DELETE:\n deletions += data.length\n break\n case DIFF_EQUAL:\n // A deletion and an insertion is one substitution.\n levenshtein += Math.max(insertions, deletions)\n insertions = 0\n deletions = 0\n break\n default:\n // Do nothing\n }\n }\n levenshtein += Math.max(insertions, deletions)\n return levenshtein\n}\n","import {type RangeDecoration, type RangeDecorationOnMovedDetails} from '@portabletext/editor'\nimport {type Path, type PortableTextBlock} from '@sanity/types'\nimport {memo, useCallback, useEffect, useRef, useState} from 'react'\n\nimport {CommentInlineHighlightSpan} from '../../components/pte/CommentInlineHighlightSpan'\nimport {applyInlineCommentIdAttr} from '../../hooks/useCommentsScroll'\nimport {type CommentDocument} from '../../types'\nimport {buildRangeDecorationSelectionsFromComments} from './buildRangeDecorationSelectionsFromComments'\n\ninterface CommentRangeDecorationProps {\n children: React.ReactNode\n commentId: string\n currentHoveredCommentId: string | null\n onClick: (commentId: string) => void\n onHoverEnd: (commentId: null) => void\n onHoverStart: (commentId: string) => void\n selectedThreadId: string | null\n threadId: string\n}\n\nconst CommentRangeDecoration = memo(function CommentRangeDecoration(\n props: CommentRangeDecorationProps,\n) {\n const {\n children,\n commentId,\n currentHoveredCommentId,\n onClick,\n onHoverEnd,\n onHoverStart,\n selectedThreadId,\n threadId,\n } = props\n const decoratorRef = useRef<HTMLSpanElement | null>(null)\n const [isNested, setIsNested] = useState(false)\n const [parentCommentId, setParentCommentId] = useState<string | null>(null)\n\n useEffect(() => {\n // Get the previous and next sibling of the decorator element\n const prevEl = decoratorRef.current?.previousSibling as HTMLElement | null\n const nextEl = decoratorRef.current?.nextSibling as HTMLElement | null\n\n // If there is no previous or next sibling, then the decorator is not nested\n if (!prevEl || !nextEl) {\n setIsNested(false)\n return\n }\n\n // We use the `applyInlineCommentIdAttr` to get the key of the data attribute\n // used for the inline comment id on the decorator element.\n const [key] = Object.keys(applyInlineCommentIdAttr(''))\n\n const prevId = prevEl.getAttribute(key)\n const nextId = nextEl.getAttribute(key)\n\n const isEqual = prevId === nextId\n\n const isNestedDecorator = Boolean(prevId && nextId && isEqual)\n setParentCommentId(isNestedDecorator ? prevId : null)\n\n setIsNested(isNestedDecorator)\n }, [])\n\n const handleMouseEnter = useCallback(() => onHoverStart(commentId), [commentId, onHoverStart])\n const handleMouseLeave = useCallback(() => onHoverEnd(null), [onHoverEnd])\n const handleClick = useCallback(() => onClick(commentId), [commentId, onClick])\n\n const hovered =\n currentHoveredCommentId === commentId ||\n (currentHoveredCommentId === parentCommentId && isNested)\n\n const selected = selectedThreadId === threadId\n\n return (\n <CommentInlineHighlightSpan\n isAdded\n isHovered={hovered || selected}\n isNested={isNested}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n ref={decoratorRef}\n {...applyInlineCommentIdAttr(threadId)}\n >\n {children}\n </CommentInlineHighlightSpan>\n )\n})\nCommentRangeDecoration.displayName = 'Memo(CommentRangeDecoration)'\n\ninterface BuildRangeDecorationsProps {\n comments: CommentDocument[]\n currentHoveredCommentId: string | null\n onDecorationClick: (commentId: string) => void\n onDecorationHoverEnd: (commentId: null) => void\n onDecorationHoverStart: (commentId: string) => void\n onDecorationMoved: (details: RangeDecorationOnMovedDetails) => void\n selectedThreadId: string | null\n value: PortableTextBlock[] | undefined\n documentValue?: unknown\n basePath?: Path\n}\n\n/**\n * @internal\n */\nexport function buildCommentRangeDecorations(props: BuildRangeDecorationsProps) {\n const {\n comments,\n currentHoveredCommentId,\n onDecorationClick,\n onDecorationHoverEnd,\n onDecorationHoverStart,\n onDecorationMoved,\n selectedThreadId,\n value,\n documentValue,\n basePath,\n } = props\n const rangeSelections = buildRangeDecorationSelectionsFromComments({\n comments,\n value,\n documentValue,\n basePath,\n })\n\n const decorations = rangeSelections.map(({selection, comment, range}) => {\n const decoration: RangeDecoration = {\n component: ({children}) => (\n <CommentRangeDecoration\n commentId={comment._id}\n currentHoveredCommentId={currentHoveredCommentId}\n onClick={onDecorationClick}\n onHoverEnd={onDecorationHoverEnd}\n onHoverStart={onDecorationHoverStart}\n selectedThreadId={selectedThreadId}\n threadId={comment.threadId}\n >\n {children}\n </CommentRangeDecoration>\n ),\n onMoved: onDecorationMoved,\n selection,\n payload: {\n commentId: comment._id,\n range,\n },\n }\n return decoration\n })\n return decorations\n}\n","import {type EditorSelection} from '@portabletext/editor'\nimport {toPlainText} from '@portabletext/react'\nimport {\n isPortableTextSpan,\n isPortableTextTextBlock,\n type Path,\n type PortableTextBlock,\n type PortableTextTextBlock,\n} from '@sanity/types'\nimport * as PathUtils from '@sanity/util/paths'\n\nimport {getValueAtPath} from '../../../field/paths/helpers'\nimport {type CommentTextSelection} from '../../types'\nimport {COMMENT_INDICATORS} from './buildRangeDecorationSelectionsFromComments'\n\ninterface BuildSelectionFromFragmentProps {\n fragment: PortableTextBlock[]\n documentValue: unknown\n basePath: Path\n selection: EditorSelection\n}\n\n/**\n * @internal\n */\nexport function buildTextSelectionFromFragment(\n props: BuildSelectionFromFragmentProps,\n): CommentTextSelection {\n const {fragment, documentValue, basePath, selection} = props\n if (!selection) {\n throw new Error('Selection is required')\n }\n const normalizedSelection: EditorSelection = selection.backward\n ? {backward: false, anchor: selection.focus, focus: selection.anchor}\n : selection\n\n const {block: anchorBlock, path: anchorBlockPath} =\n findEnclosingTextBlock(documentValue, basePath, normalizedSelection.anchor.path) ?? {}\n const {block: focusBlock, path: focusBlockPath} =\n findEnclosingTextBlock(documentValue, basePath, normalizedSelection.focus.path) ?? {}\n\n // A selection spanning three or more blocks has fragment blocks that are\n // neither the anchor nor the focus block. They live in the same containing\n // arrays, so resolve every fragment block by `_key` within those arrays.\n const containingArrays: Array<Array<unknown>> = []\n for (const blockPath of [anchorBlockPath, focusBlockPath]) {\n if (!blockPath) continue\n const containingArray = getValueAtPath(documentValue, [...basePath, ...blockPath.slice(0, -1)])\n if (Array.isArray(containingArray) && !containingArrays.includes(containingArray)) {\n containingArrays.push(containingArray)\n }\n }\n\n const textSelection: CommentTextSelection = {\n type: 'text',\n value: fragment.map((fragmentBlock) => {\n const originalBlock = findBlockByKey(containingArrays, fragmentBlock._key)\n if (!isPortableTextTextBlock(originalBlock)) {\n return {\n _key: fragmentBlock._key,\n text: '',\n }\n }\n const anchorBlockKey = anchorBlock?._key\n const focusBlockKey = focusBlock?._key\n const fragmentBlockText = toPlainText([fragmentBlock])\n const fragmentStartSpan = isPortableTextTextBlock(fragmentBlock)\n ? fragmentBlock.children[0]\n : undefined\n const fragmentEndSpan = isPortableTextTextBlock(fragmentBlock)\n ? fragmentBlock.children[fragmentBlock.children.length - 1]\n : undefined\n let originalTextBeforeSelection = ''\n let startChildIndex = -1\n if (anchorBlockKey === originalBlock._key) {\n for (const child of originalBlock.children) {\n startChildIndex++\n if (child._key === fragmentStartSpan?._key) {\n originalTextBeforeSelection +=\n (isPortableTextSpan(child) &&\n child.text.slice(0, Math.max(0, normalizedSelection.anchor.offset))) ||\n ''\n break\n }\n originalTextBeforeSelection += child.text\n }\n }\n let originalTextAfterSelection = ''\n if (focusBlockKey === originalBlock._key) {\n for (const child of originalBlock.children.slice(startChildIndex).reverse()) {\n if (child._key === fragmentEndSpan?._key) {\n originalTextAfterSelection =\n ((isPortableTextSpan(child) &&\n child.text.slice(normalizedSelection.focus.offset, child.text.length)) ||\n '') + originalTextAfterSelection\n break\n }\n originalTextAfterSelection = child.text + originalTextAfterSelection\n }\n }\n return {\n _key: originalBlock._key,\n text: `${originalTextBeforeSelection}${COMMENT_INDICATORS[0]}${fragmentBlockText}${COMMENT_INDICATORS[1]}${originalTextAfterSelection}`,\n }\n }),\n }\n\n return textSelection\n}\n\n/**\n * The data path to the block's containing array. Returns `undefined` if no\n * enclosing text block exists at the selection path.\n *\n * @internal\n */\nexport function getCommentFieldPath(\n documentValue: unknown,\n basePath: Path,\n selectionPath: Path,\n): string | undefined {\n const enclosingBlockPath = findEnclosingTextBlock(documentValue, basePath, selectionPath)?.path\n if (!enclosingBlockPath) return undefined\n return PathUtils.toString([...basePath, ...enclosingBlockPath.slice(0, -1)])\n}\n\n/**\n * Walk `path` up to root against the document value from `basePath`, returning\n * the deepest enclosing text block and the segments (relative to `basePath`)\n * that reach it. Selection paths from PTE are editor-relative.\n */\nfunction findEnclosingTextBlock(\n documentValue: unknown,\n basePath: Path,\n path: Path,\n): {block: PortableTextTextBlock; path: Path} | undefined {\n for (let end = path.length; end > 0; end--) {\n const relative = path.slice(0, end)\n const candidate = getValueAtPath(documentValue, [...basePath, ...relative])\n if (isPortableTextTextBlock(candidate)) {\n return {block: candidate, path: relative}\n }\n }\n return undefined\n}\n\nfunction findBlockByKey(\n arrays: Array<Array<unknown>>,\n key: string,\n): PortableTextTextBlock | undefined {\n for (const array of arrays) {\n for (const block of array) {\n if (isPortableTextTextBlock(block) && block._key === key) {\n return block\n }\n }\n }\n return undefined\n}\n"],"mappings":";;;;;;;;;;;;;;AAKA,SAAOE,oBAAAC,OAAA;CAAA,IAAAC,IA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wC,wBACL,OAAO1D,UAAU2D,SAAS,CAAC,GAAGpD,UAAU,GAAGmD,mBAAmB/B,MAAM,GAAG,EAAE,CAAC,CAAC;AAC7E;;;;;;AAOA,SAASP,uBACPd,eACAC,UACAW,MACwD;CACxD,KAAK,IAAI0C,MAAM1C,KAAK6B,QAAQa,MAAM,GAAGA,OAAO;EAC1C,IAAMC,WAAW3C,KAAKS,MAAM,GAAGiC,GAAG,GAC5BE,YAAY7D,eAAeK,eAAe,CAAC,GAAGC,UAAU,GAAGsD,QAAQ,CAAC;EAC1E,IAAIjE,wBAAwBkE,SAAS,GACnC,OAAO;GAAC9C,OAAO8C;GAAW5C,MAAM2C;EAAQ;CAE5C;AAEF;AAEA,SAASxB,eACP0B,QACAC,KACmC;CACnC,KAAK,IAAMC,SAASF,QAClB,KAAK,IAAM/C,SAASiD,OAClB,IAAIrE,wBAAwBoB,KAAK,KAAKA,MAAMsB,SAAS0B,KACnD,OAAOhD;AAKf"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as isNonNullable$1, c as getIdPair, d as getVersionId, f as idMatchesPerspective, h as isDraftId$1, l as getPublishedId$1, o as documentIdEquals, s as getDraftId, u as getVersionFromId$1, y as isVersionId$1 } from "./draftUtils-D3HJGQaW.js";
|
|
2
|
-
import { c as useWorkspace, i as useClient, n as DEFAULT_STUDIO_CLIENT_OPTIONS, o as useSource, r as versionedClient, t as DEFAULT_STUDIO_CLIENT_HEADERS } from "./studioClient-
|
|
2
|
+
import { c as useWorkspace, i as useClient, n as DEFAULT_STUDIO_CLIENT_OPTIONS, o as useSource, r as versionedClient, t as DEFAULT_STUDIO_CLIENT_HEADERS } from "./studioClient-CwMJwOTd.js";
|
|
3
3
|
import { t as useTranslation } from "./useTranslation-Cqs6Itwv.js";
|
|
4
4
|
import { i as isStaticResourceBundle, r as defineLocalesResources, t as defineLocale } from "./helpers-ClQf2qOB.js";
|
|
5
5
|
import { useContext, useMemo, useState } from "react";
|
|
@@ -8180,4 +8180,4 @@ function useComlinkStore() {
|
|
|
8180
8180
|
}
|
|
8181
8181
|
export { feedbackLocaleNamespace as $, escapeField as $t, wrapValue as A, getVariantIdFromDocument as At, RESOLVE_INITIAL_VALUE_TIMEOUT_MS as B, useStudioErrorHandler as Bt, createKeyValueStore as C, createObservableBufferedDocument as Ct, TimelineController as D, getVariantConditionsText as Dt, removeMissingReferences as E, filterVariantsForSearch as Et, createDocumentStore as F, getDocumentVariantType as Ft, validateTemplates as G, isClientRequestError as Gt, resolveInitialObjectValue as H, passthroughErrorHandler as Ht, normalizeDocumentPairTarget as I, CONNECTING as It, validateDocumentWithReferences as J, parseRetryAfter as Jt, postTask as K, isNetworkError as Kt, listenQuery as L, createConnectionStatusStore as Lt, isProd as M, isPublishedBundleId as Mt, createGrantsStore as N, isReleaseBundle as Nt, getJsonStream as O, getVariantDescription as Ot, grantsPermissionOn as P, variantMatchesConditionFilters as Pt, usEnglishLocale as Q, createDocumentPreviewStore as Qt, getInitialValueStream as R, onRetry as Rt, createPresenceStore as S, createBufferedDocument as St, createHistoryStore as T, decodeVariantIdFromRoute as Tt, resolveInitialValue as U, classifyConfigError as Ut, isBuilder as V, createRequestErrorChannel as Vt, resolveInitialValueForType as W, classifyRequestError as Wt, validateItem as X, isInvalidSessionError as Xt, validateDocument as Y, getApiErrorCode as Yt, defaultLocale as Z, isUnauthorizedError as Zt, useResourceCache as _, memoizedPair as _t, useGrantsStore as a, VARIANT_DOCUMENT_TYPE as an, pathToString as at, getProjectGrants as b, checkoutPair as bt, usePresenceStore as c, prepareForPreview as cn, measureFirstMatch as ct, useUserStore as d, applyMendozaPatch as dn, RELEASE_DOCUMENTS_PATH as dt, fieldNeedsEscape as en, studioLocaleNamespace as et, createUserStore as f, DOCUMENT_SYSTEM_FIELD as fn, RELEASE_DOCUMENT_TYPE as ft, ResourceCacheProvider as g, useSchema as gn, snapshotPair as gt, createHookFromObservableFactory as h, useTemplates as hn, variantsClient as ht, useDocumentStore as i, VARIANT_DOCUMENTS_PATH as in, Rule$1 as it, isDev as j, getVariantTitle as jt, Timeline as k, getVariantId as kt, useProjectStore as l, getPreviewPaths as ln, getReleaseIdFromReleaseDocumentId as lt, useUser as m, isRecord$4 as mn, operationEvents as mt, useConnectionStatusStore as n, variantApiVersion as nn, inferFromSchema as nt, useHistoryStore as o, RELEASES_STUDIO_CLIENT_OPTIONS as on, editState as ot, useCurrentUser as p, createSWR as pn, emitOperation as pt, validation as q, isTimeoutError as qt, useDocumentPreviewStore as r, VARIANTS_STUDIO_CLIENT_OPTIONS as rn, normalizeValidationRules as rt, useKeyValueStore as s, isReleasePerspective as sn, measureFirstEmission as st, useComlinkStore as t, joinPath as tn, resolveConditionalProperty as tt, useRenderingContextStore as u, createPathObserver as un, isReleaseDocumentId as ut, createMultiKeyWeakMap as v, memoizeKeyGen as vt, supportsLocalStorage as w, buildConditionFacets as wt, SESSION_ID as x, getPairListener as xt, createProjectStore as y, memoize$1 as yt, DEFAULT_MAX_RECURSION_DEPTH as z, catchWithCount as zt };
|
|
8182
8182
|
|
|
8183
|
-
//# sourceMappingURL=datastores-
|
|
8183
|
+
//# sourceMappingURL=datastores-DpJ5Y313.js.map
|