platejs 54.0.0-beta.13 → 54.0.0-beta.14
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/{EditorStatic-CKG5xM3y.d.ts → EditorStatic-eXOA489B.d.ts} +4 -4
- package/dist/ai/index.d.ts +2 -2
- package/dist/ai/lib/aiDraftSession.js +9 -7
- package/dist/ai/lib/aiPolicy.internal.js +43 -6
- package/dist/ai/lib/editorAgent.js +30 -21
- package/dist/ai/lib/editorAgentSync.internal.js +2 -2
- package/dist/ai/lib/lockedContext.js +5 -4
- package/dist/ai/react/copilotInline.internal.js +6 -5
- package/dist/ai/react/index.d.ts +7 -7
- package/dist/ai/react/useEditorAgent.js +14 -3
- package/dist/authored/index.d.ts +4 -4
- package/dist/{authored-CJL7S8qI-BxC9ip4d.d.ts → authored-qetvpvU--DSWESzxK.d.ts} +3 -3
- package/dist/clipboard-format-key-BBu85J9m-BLhtd159.d.ts +1 -0
- package/dist/code-block/codemirror/index.d.ts +2 -2
- package/dist/{comment-anchor.internal-DTBP1huU.d.ts → comment-anchor.internal-CoNK9gTD.d.ts} +2 -2
- package/dist/compiler/index.d.ts +3 -3
- package/dist/{core-CTB0OBoh.d.ts → core-By92GWYW.d.ts} +45 -20
- package/dist/diff/index.d.ts +2 -2
- package/dist/docs/agents/skills.md +6 -2
- package/dist/docs/agents.md +1 -1
- package/dist/docs/ai-agents.md +8 -4
- package/dist/docs/ai.md +5 -0
- package/dist/docs/api/plate.md +15 -7
- package/dist/docs/api/react-hooks.md +32 -2
- package/dist/docs/authored-changes.md +4 -0
- package/dist/docs/block-menu.md +4 -0
- package/dist/docs/board.md +4 -0
- package/dist/docs/callout.md +63 -9
- package/dist/docs/collaboration.md +6 -1
- package/dist/docs/combobox.md +9 -2
- package/dist/docs/comment.md +4 -0
- package/dist/docs/components/toolbar-buttons.md +1 -1
- package/dist/docs/copilot.md +4 -0
- package/dist/docs/deck.md +173 -0
- package/dist/docs/details.md +4 -0
- package/dist/docs/diff.md +4 -0
- package/dist/docs/discussion.md +4 -0
- package/dist/docs/dnd.md +4 -0
- package/dist/docs/docx.md +6 -0
- package/dist/docs/emoji.md +2 -2
- package/dist/docs/equation.md +4 -0
- package/dist/docs/examples/collaboration-example.md +4 -0
- package/dist/docs/examples/export.md +40 -28
- package/dist/docs/examples/merge.md +4 -0
- package/dist/docs/examples/version-history.md +4 -0
- package/dist/docs/field.md +4 -0
- package/dist/docs/footnote.md +4 -0
- package/dist/docs/format-painter.md +1 -1
- package/dist/docs/html.md +4 -0
- package/dist/docs/index.md +4 -0
- package/dist/docs/ink.md +6 -0
- package/dist/docs/installation/manual.md +2 -4
- package/dist/docs/installation/next.md +1 -3
- package/dist/docs/installation/plate-ui.md +6 -2
- package/dist/docs/installation/rsc.md +1 -1
- package/dist/docs/installation.md +4 -0
- package/dist/docs/link.md +4 -0
- package/dist/docs/llms.txt +3 -1
- package/dist/docs/lock.md +34 -2
- package/dist/docs/markdown.md +4 -0
- package/dist/docs/media.md +4 -0
- package/dist/docs/mention.md +5 -0
- package/dist/docs/pagination.md +4 -0
- package/dist/docs/prompt-editor.md +17 -1
- package/dist/docs/reference.md +192 -0
- package/dist/docs/roots.md +4 -0
- package/dist/docs/serializing.md +23 -0
- package/dist/docs/slash-command.md +58 -4
- package/dist/docs/static.md +29 -20
- package/dist/docs/suggestion.md +4 -0
- package/dist/docs/sync.md +4 -0
- package/dist/docs/table.md +31 -0
- package/dist/docs/toolbar.md +4 -0
- package/dist/docs/unit-testing.md +4 -0
- package/dist/docs/upload.md +4 -0
- package/dist/docx/export/index.d.ts +5 -5
- package/dist/docx/import/index.d.ts +5 -5
- package/dist/docx/paste/index.d.ts +4 -4
- package/dist/dom/index.d.ts +1 -1
- package/dist/features/basic-nodes/lib/BaseMarkPlugins.js +1 -1
- package/dist/features/basic-styles/lib/BaseFormattingPlugin.js +61 -28
- package/dist/features/basic-styles/lib/BaseStylePlugins.js +28 -7
- package/dist/features/board/index.d.ts +1 -1
- package/dist/features/callout/index.d.ts +2 -160
- package/dist/features/callout/lib/BaseCalloutPlugin.js +109 -9
- package/dist/features/column/index.d.ts +1 -1
- package/dist/features/comments/index.d.ts +2 -2
- package/dist/features/date/index.d.ts +3 -3
- package/dist/features/details/index.d.ts +3 -3
- package/dist/features/field/index.d.ts +1 -1
- package/dist/features/field/lib/BaseFieldPlugin.js +111 -53
- package/dist/features/field/lib/fieldCache.internal.js +9 -21
- package/dist/features/find/index.d.ts +3 -3
- package/dist/features/footnote/index.d.ts +3 -3
- package/dist/features/ink/index.d.ts +1 -1
- package/dist/features/link/lib/BaseLinkPlugin.js +5 -2
- package/dist/features/lint/index.d.ts +3 -3
- package/dist/features/list/lib/listKeyboard.internal.js +7 -2
- package/dist/features/lock/index.d.ts +1 -1
- package/dist/features/media/index.d.ts +1 -1
- package/dist/features/mention/index.d.ts +1 -1
- package/dist/features/reference/index.d.ts +236 -0
- package/dist/features/reference/index.js +2 -0
- package/dist/features/reference/lib/BaseReferencePlugin.js +589 -0
- package/dist/features/table/index.d.ts +2 -2
- package/dist/features/toc/index.d.ts +1 -1
- package/dist/features/upload/index.d.ts +1 -1
- package/dist/history/index.d.ts +1 -1
- package/dist/html/index.d.ts +4 -4
- package/dist/html/server/index.d.ts +2 -2
- package/dist/html/server/serverCssParser.internal.js +14 -25
- package/dist/html/server/serverCssStyle.internal.js +4 -7
- package/dist/{htmlConversion-Y-M6PLRi.d.ts → htmlConversion-CRnxMGw-.d.ts} +2 -2
- package/dist/{htmlTypes-CNhoCFjK.d.ts → htmlTypes-3laowz-3.d.ts} +3 -3
- package/dist/hyperscript/index.d.ts +1 -1
- package/dist/{index-B-8L9f6a2.d.ts → index-B3VOCxNR.d.ts} +5 -5
- package/dist/{index-B8JeECEk.d.ts → index-B9UlNijk.d.ts} +2 -2
- package/dist/{index-Bqva6PJc.d.ts → index-BJPT0Tv_.d.ts} +3 -3
- package/dist/{index-CWutqVQ_-BO-UgVeK.d.ts → index-BKPWmnLg-Bp_vItjr.d.ts} +1 -1
- package/dist/{index-BFWK852j.d.ts → index-BcD2RAB9.d.ts} +3 -3
- package/dist/{index-DhsryaAC.d.ts → index-C5Xw3JDc.d.ts} +1 -1
- package/dist/{index-BEXBAmJf.d.ts → index-CAshLTjV.d.ts} +3 -3
- package/dist/{index-qqrnWAk_.d.ts → index-CHlITvuq.d.ts} +7 -7
- package/dist/index-CKSwab_O.d.ts +1 -0
- package/dist/{index-DJhwDkfd.d.ts → index-CRQoHk18.d.ts} +3 -3
- package/dist/index-CyY3O6c7.d.ts +3 -0
- package/dist/index-D8EGVCeT.d.ts +305 -0
- package/dist/{index-B0R9sXv2-T1dxG9oM.d.ts → index-DAKucat0--VOaL_NN.d.ts} +4 -4
- package/dist/{index-UYpvOBXG.d.ts → index-DCTRNYwy.d.ts} +2 -2
- package/dist/{index-CXd5hwaH.d.ts → index-DQpHoxDX.d.ts} +1 -1
- package/dist/{index-BfJKfAwk.d.ts → index-DTd1D-BF.d.ts} +3 -3
- package/dist/index-DUhUT9bV.d.ts +1 -0
- package/dist/{index-B4aToRMv.d.ts → index-DXm_v0Qq.d.ts} +3 -3
- package/dist/{index-D3bhjdRz.d.ts → index-Djwcl0Ff.d.ts} +3 -3
- package/dist/{index-DYuqsDrP.d.ts → index-Dyw6BJx8.d.ts} +3 -3
- package/dist/{index-CLPMcGC5.d.ts → index-KG95XVaC.d.ts} +4 -4
- package/dist/{index-mcBtG6pK-CitQV9Bq.d.ts → index-LEcSTRgn-BR_p4GVY.d.ts} +2 -2
- package/dist/{index-D54VPeky.d.ts → index-k-wvVxKl.d.ts} +2 -2
- package/dist/{index-CHud6Aa-.d.ts → index-s34W6hUI.d.ts} +3 -3
- package/dist/{index-DXCdafUk.d.ts → index-wEkvA-wI.d.ts} +43 -20
- package/dist/index.d.ts +3 -3
- package/dist/internal/plugin/pluginInjectNodeProps.js +33 -5
- package/dist/internal/utils/urlPolicy.js +11 -1
- package/dist/lib/editor/withPlite.js +8 -6
- package/dist/lib/plugins/html/cssLexer.internal.js +126 -29
- package/dist/lib/plugins/html/cssSafety.internal.js +100 -0
- package/dist/lib/plugins/html/htmlDecode.internal.js +2 -2
- package/dist/lib/plugins/html/htmlMatcher.internal.js +1 -1
- package/dist/lib/plugins/html/htmlRules.internal.js +2 -13
- package/dist/lib/plugins/html/htmlSafety.js +17 -24
- package/dist/lib/plugins/html/htmlSerialize.internal.js +16 -2
- package/dist/lib/plugins/html/htmlStyleInline.internal.js +22 -23
- package/dist/lib/plugins/input-rules/inputRuleVeto.internal.js +27 -1
- package/dist/markdown/index.d.ts +1 -1
- package/dist/markdown/lib/internal/markdownAttributes.js +16 -7
- package/dist/markdown/lib/internal/markdownMappings.js +123 -16
- package/dist/markdown/lib/serializer/convertPhrasingSerialize.js +16 -1
- package/dist/math/index.d.ts +3 -3
- package/dist/math/react/index.d.ts +4 -4
- package/dist/migrations/index.d.ts +4 -4
- package/dist/migrations/migratePlateV54Urls.internal.js +63 -1
- package/dist/pagination/index.d.ts +1 -1
- package/dist/pagination/react/index.d.ts +3 -3
- package/dist/{protocol-CSuP7AWG-DAorqpaF.d.ts → protocol-Cp9xayOe-0OSfTMnt.d.ts} +1 -1
- package/dist/react/authored/index.d.ts +4 -4
- package/dist/react/components/PlateView.js +7 -1
- package/dist/react/features/board/index.d.ts +5 -5
- package/dist/react/features/callout/index.d.ts +93 -4
- package/dist/react/features/column/index.d.ts +5 -5
- package/dist/react/features/combobox/combobox.internal.js +35 -22
- package/dist/react/features/combobox/comboboxOwner.internal.js +29 -2
- package/dist/react/features/combobox/index.d.ts +8 -6
- package/dist/react/features/comments/index.d.ts +6 -6
- package/dist/react/features/date/index.d.ts +4 -4
- package/dist/react/features/details/index.d.ts +4 -4
- package/dist/react/features/field/FieldPlugin.js +2 -2
- package/dist/react/features/field/index.d.ts +5 -5
- package/dist/react/features/footnote/index.d.ts +4 -4
- package/dist/react/features/format-painter/FormatPainterPlugin.js +27 -34
- package/dist/react/features/format-painter/index.d.ts +4 -4
- package/dist/react/features/ink/index.d.ts +5 -5
- package/dist/react/features/lock/index.d.ts +5 -5
- package/dist/react/features/media/index.d.ts +5 -5
- package/dist/react/features/mention/index.d.ts +4 -4
- package/dist/react/features/table/index.d.ts +6 -6
- package/dist/react/features/toc/index.d.ts +2 -2
- package/dist/react/features/upload/index.d.ts +5 -5
- package/dist/react/index.d.ts +6 -6
- package/dist/react/virtualized.d.ts +3 -3
- package/dist/refusal-CwFxNUf7-BLhtd159.d.ts +1 -0
- package/dist/{registerEditorTools-Cl-o_Wnq.d.ts → registerEditorTools-D_3hPpTx.d.ts} +16 -8
- package/dist/shared-room-26tNRhZE-BLhtd159.d.ts +1 -0
- package/dist/skills/plate/SKILL.md +4 -3
- package/dist/skills/plate/references/ai-and-agents.md +2 -2
- package/dist/skills/plate/references/pricing.md +3 -3
- package/dist/skills/plate/references/setup.md +6 -0
- package/dist/skills/plate/references/ui-and-sync.md +4 -3
- package/dist/{source-DUP5aKcT.d.ts → source-BW7JD_oS.d.ts} +3 -3
- package/dist/static/index.d.ts +23 -9
- package/dist/static/internal/staticPendingMedia.internal.js +2 -1
- package/dist/static/internal/staticPresentation.js +1 -0
- package/dist/static/renderStaticHtml.js +85 -39
- package/dist/{storage-EzfLDqRy-Cu4DQ-Rf.d.ts → storage-C7xSH1I5-BJLoUfo9.d.ts} +2 -2
- package/dist/sync/cloudflare/index.d.ts +3 -3
- package/dist/sync/index.d.ts +4 -4
- package/dist/sync/postgres/index.d.ts +1 -1
- package/dist/sync/react/index.d.ts +6 -6
- package/dist/sync/server/index.d.ts +5 -5
- package/dist/tabbable/react/index.d.ts +4 -4
- package/dist/testing/index.d.ts +3 -3
- package/dist/{transport-DAforzBt-BFwAhC-N.d.ts → transport-B-ON68Y4-DCfT5-eN.d.ts} +1 -1
- package/dist/utils/plate-keys.js +1 -0
- package/dist/{widths-BjIZxtaJ.d.ts → widths-9NNziDRW.d.ts} +5 -5
- package/package.json +9 -2
- package/dist/clipboard-format-key-D9rnh20X-CR00YA0H.d.ts +0 -1
- package/dist/index-CKAkaSJK.d.ts +0 -3
- package/dist/index-CxyK4HrT.d.ts +0 -1
- package/dist/index-zcb_RtZC.d.ts +0 -1
- package/dist/refusal-DCzeB9nD-CR00YA0H.d.ts +0 -1
- package/dist/shared-room-Bg8qMvm1-CR00YA0H.d.ts +0 -1
- /package/dist/{tx-only-CWT-IURY-BqIFhy44.d.ts → tx-only-sIj7BcYh-BMFkGMuq.d.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $o as Range, Al as TransferPlugin, Cl as TransferIntent, El as TransferOutcome, Hc as StateFieldValueInput, O as DecorationAttributes, Oi as HistoryOutcome, Qa as Plugin, Sl as TransferInput, Wa as Path, Wl as Value, Xc as Text, Yi as NamedRootKey, _t as EditorDocumentValue, d as AnyEditor, fo as PluginDependencyContractReference, fs as RootKey, gi as Element$1, ja as NodeTarget, ma as NodeKey, mo as PluginDependencyReferenceFor, ti as EditorUpdatePolicy, tr as EditorSelectorDependencies, vl as TransferApi, yl as TransferCheck } from "./tx-only-
|
|
2
|
-
import "./htmlTypes-
|
|
3
|
-
import { N as DataTransferDiagnostic, S as DOMEditor, V as ViewportRect, c as DOMApi, d as DOMCoverageCopyPolicy, f as DOMCoverageMaterializeRangeRole, h as DOMCoverageSelectionPolicy, l as DOMClipboardApi, m as DOMCoverageReason, n as DOMPluginTypes, p as DOMCoverageMaterializeReason, r as DropIndicator, t as DOMPlugin, u as DOMCoverageBoundary } from "./index-
|
|
4
|
-
import { o as Editor$2, st as BasePluginInput } from "./core-
|
|
1
|
+
import { $o as Range, Al as TransferPlugin, Cl as TransferIntent, El as TransferOutcome, Hc as StateFieldValueInput, O as DecorationAttributes, Oi as HistoryOutcome, Qa as Plugin, Sl as TransferInput, Wa as Path, Wl as Value, Xc as Text, Yi as NamedRootKey, _t as EditorDocumentValue, d as AnyEditor, fo as PluginDependencyContractReference, fs as RootKey, gi as Element$1, ja as NodeTarget, ma as NodeKey, mo as PluginDependencyReferenceFor, ti as EditorUpdatePolicy, tr as EditorSelectorDependencies, vl as TransferApi, yl as TransferCheck } from "./tx-only-sIj7BcYh-BMFkGMuq.js";
|
|
2
|
+
import "./htmlTypes-3laowz-3.js";
|
|
3
|
+
import { N as DataTransferDiagnostic, S as DOMEditor, V as ViewportRect, c as DOMApi, d as DOMCoverageCopyPolicy, f as DOMCoverageMaterializeRangeRole, h as DOMCoverageSelectionPolicy, l as DOMClipboardApi, m as DOMCoverageReason, n as DOMPluginTypes, p as DOMCoverageMaterializeReason, r as DropIndicator, t as DOMPlugin, u as DOMCoverageBoundary } from "./index-B9UlNijk.js";
|
|
4
|
+
import { o as Editor$2, st as BasePluginInput } from "./core-By92GWYW.js";
|
|
5
5
|
import React$1, { CSSProperties, KeyboardEvent as KeyboardEvent$1, MouseEventHandler, ReactNode, Ref, RefObject, TextareaHTMLAttributes } from "react";
|
|
6
6
|
type DecorationSlice = Readonly<{
|
|
7
7
|
attributes: DecorationAttributes;
|
package/dist/ai/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { AILockedBlockRef, EditorAgent, EditorAgentAccess, EditorAgentExecuteOptions, EditorAgentOptions, EditorAgentPresence, EditorAgentPresenceState, EditorAgentTraceEvent, EditorCommentAction, EditorCommentEntry, EditorCommentThreadItem, EditorCommentsListResult, EditorDebugResult, EditorFindResult, EditorIdempotencyEntry, EditorIdempotencyStore, EditorInkPassage, EditorInkPassageImage, EditorReadBlock, EditorReadInkResult, EditorReadResult, EditorReadSelection, EditorSuggestionsListResult, EditorToolAnnotation, EditorToolCall, EditorToolDefinition, EditorToolErrorCode, EditorToolErrorResult, EditorToolResult, EditorVisibilityFilter, EditorWriteReceipt, GetEditorToolsOptions, HasEditableAISelectionRefs, LOCKED_BLOCK_PLACEHOLDER_TAG, RegisterEditorToolsOptions, SerializeAIEditContextOptions, SerializeAISelectionMarkdownOptions, SerializedAIEditContext, type SyncServerAgentGrant, type SyncServerAgentHost, type SyncServerAgentOptions, type SyncServerAgentPresenceInput, type SyncServerAgentPresenceOptions, type SyncServerAgentPresencePoint, type SyncServerAgentPresenceSelection, type SyncServerAgentReceipt, type SyncServerAgentRunResult, WebMCPProducerContext, createEditorAgent, createSyncServerAgent, getEditorTools, hasEditableAISelection, registerEditorTools, serializeAIEditContext, serializeAISelectionMarkdown };
|
|
1
|
+
import { $ as SyncServerAgentPresencePoint, A as EditorReadBlock, B as EditorToolResult, C as EditorCommentsListResult, D as EditorIdempotencyStore, E as EditorIdempotencyEntry, F as EditorToolAnnotation, G as createEditorAgent, H as EditorVisibilityPredicate, I as EditorToolCall, J as SyncServerAgentGrant, K as createSyncServerAgent, L as EditorToolDefinition, M as EditorReadResult, N as EditorReadSelection, O as EditorInkPassage, P as EditorSuggestionsListResult, Q as SyncServerAgentPresenceOptions, R as EditorToolErrorCode, S as EditorCommentThreadItem, T as EditorFindResult, U as EditorWriteReceipt, V as EditorVisibilityFilter, W as GetEditorToolsOptions, X as SyncServerAgentOptions, Y as SyncServerAgentHost, Z as SyncServerAgentPresenceInput, _ as EditorAgentPresence, a as HasEditableAISelectionRefs, b as EditorCommentAction, c as SerializeAISelectionMarkdownOptions, d as serializeAIEditContext, et as SyncServerAgentPresenceSelection, f as serializeAISelectionMarkdown, g as EditorAgentOptions, h as EditorAgentExecuteOptions, i as AILockedBlockRef, j as EditorReadInkResult, k as EditorInkPassageImage, l as SerializedAIEditContext, m as EditorAgentAccess, n as WebMCPProducerContext, nt as SyncServerAgentRunResult, o as LOCKED_BLOCK_PLACEHOLDER_TAG, p as EditorAgent, q as getEditorTools, r as registerEditorTools, s as SerializeAIEditContextOptions, t as RegisterEditorToolsOptions, tt as SyncServerAgentReceipt, u as hasEditableAISelection, v as EditorAgentPresenceState, w as EditorDebugResult, x as EditorCommentEntry, y as EditorAgentTraceEvent, z as EditorToolErrorResult } from "../registerEditorTools-D_3hPpTx.js";
|
|
2
|
+
export { AILockedBlockRef, EditorAgent, EditorAgentAccess, EditorAgentExecuteOptions, EditorAgentOptions, EditorAgentPresence, EditorAgentPresenceState, EditorAgentTraceEvent, EditorCommentAction, EditorCommentEntry, EditorCommentThreadItem, EditorCommentsListResult, EditorDebugResult, EditorFindResult, EditorIdempotencyEntry, EditorIdempotencyStore, EditorInkPassage, EditorInkPassageImage, EditorReadBlock, EditorReadInkResult, EditorReadResult, EditorReadSelection, EditorSuggestionsListResult, EditorToolAnnotation, EditorToolCall, EditorToolDefinition, EditorToolErrorCode, EditorToolErrorResult, EditorToolResult, EditorVisibilityFilter, EditorVisibilityPredicate, EditorWriteReceipt, GetEditorToolsOptions, HasEditableAISelectionRefs, LOCKED_BLOCK_PLACEHOLDER_TAG, RegisterEditorToolsOptions, SerializeAIEditContextOptions, SerializeAISelectionMarkdownOptions, SerializedAIEditContext, type SyncServerAgentGrant, type SyncServerAgentHost, type SyncServerAgentOptions, type SyncServerAgentPresenceInput, type SyncServerAgentPresenceOptions, type SyncServerAgentPresencePoint, type SyncServerAgentPresenceSelection, type SyncServerAgentReceipt, type SyncServerAgentRunResult, WebMCPProducerContext, createEditorAgent, createSyncServerAgent, getEditorTools, hasEditableAISelection, registerEditorTools, serializeAIEditContext, serializeAISelectionMarkdown };
|
|
@@ -5,7 +5,7 @@ import { isListItem } from "../../features/list/lib/listIndex.internal.js";
|
|
|
5
5
|
import { AuthoredPlugin } from "../../authored/AuthoredPlugin.js";
|
|
6
6
|
import { MarkdownPlugin } from "../../markdown/lib/MarkdownPlugin.js";
|
|
7
7
|
import { applyMinimalTextBlockEdits, fillEmptyListItem, landAIOutput, normalizeUnlockedListRun, suggestionBlocks } from "./aiOutputLanding.internal.js";
|
|
8
|
-
import { findDisallowedRemoteMediaUrlsInMarkdown, hasHiddenDescendant, isPathVisible, isRangeVisible, pruneHiddenDescendants, sanitizeRemoteMediaNodes } from "./aiPolicy.internal.js";
|
|
8
|
+
import { findDisallowedRemoteMediaUrlsInMarkdown, hasHiddenDescendant, isEditorVisibilityFilter, isPathVisible, isRangeVisible, pruneHiddenDescendants, resolveVisibilityFilter, sanitizeRemoteMediaNodes } from "./aiPolicy.internal.js";
|
|
9
9
|
import { areAIBlockTargetsContiguous, isAIPathNonWritable, resolveAISelectedBlocks } from "./lockedContext.internal.js";
|
|
10
10
|
import { LOCKED_BLOCK_PLACEHOLDER_TAG } from "./lockedContext.js";
|
|
11
11
|
import isEqual from "lodash/isEqual.js";
|
|
@@ -85,9 +85,10 @@ const toElementValue = (nodes) => nodes.filter((node) => ElementApi.isElement(no
|
|
|
85
85
|
*/
|
|
86
86
|
const createAIDraftSession = (editor, options) => {
|
|
87
87
|
if (typeof options.authorId !== "string" || options.authorId.trim().length === 0) throw new TypeError("createAIDraftSession requires a non-empty authorId.");
|
|
88
|
-
if (options.filter
|
|
88
|
+
if (!isEditorVisibilityFilter(options.filter)) throw new TypeError("createAIDraftSession requires filter to be \"allow-all\", a function, or { forDocument }.");
|
|
89
89
|
const { authorId } = options;
|
|
90
90
|
const { filter } = options;
|
|
91
|
+
const currentFilter = (target = editor) => resolveVisibilityFilter(target, filter);
|
|
91
92
|
const { mode } = options;
|
|
92
93
|
const pinnedRoot = editor.read.view.root();
|
|
93
94
|
const baselineRevision = editor.read.revision();
|
|
@@ -95,8 +96,9 @@ const createAIDraftSession = (editor, options) => {
|
|
|
95
96
|
const capturedSelection = currentSelection ? cloneDeep(currentSelection) : null;
|
|
96
97
|
const resolvedSelection = resolveAISelectedBlocks(editor);
|
|
97
98
|
const initialRoots = editor.read.value().roots;
|
|
98
|
-
const
|
|
99
|
-
const
|
|
99
|
+
const initialFilter = currentFilter(editor);
|
|
100
|
+
const selectionContainsHiddenBlocks = resolvedSelection.entries.some(([node, path]) => !isPathVisible(editor, initialFilter, path, pinnedRoot) || hasHiddenDescendant(initialFilter, node, path, pinnedRoot, initialRoots));
|
|
101
|
+
const visibleEntries = resolvedSelection.entries.filter(([node, path]) => isPathVisible(editor, initialFilter, path, pinnedRoot) && pruneHiddenDescendants(initialFilter, node, path, pinnedRoot) !== null);
|
|
100
102
|
const selectionAnchor = capturedSelection && RangeApi.isExpanded(capturedSelection) ? editor.anchor(capturedSelection, {
|
|
101
103
|
association: "inward",
|
|
102
104
|
deletion: "drop"
|
|
@@ -333,7 +335,7 @@ const createAIDraftSession = (editor, options) => {
|
|
|
333
335
|
};
|
|
334
336
|
const hasHiddenEditableTarget = (entries) => {
|
|
335
337
|
const { roots } = editor.read.value();
|
|
336
|
-
return selectionContainsHiddenBlocks || entries.some(([node, path]) => hasHiddenDescendant(
|
|
338
|
+
return selectionContainsHiddenBlocks || entries.some(([node, path]) => hasHiddenDescendant(currentFilter(editor), node, path, pinnedRoot, roots));
|
|
337
339
|
};
|
|
338
340
|
const isRevisionCurrent = () => isTargetAnchorCurrent(getRootView());
|
|
339
341
|
const landLockedSuggestion = (proposeView, rawDisallowedUrls) => {
|
|
@@ -799,7 +801,7 @@ const createAIDraftSession = (editor, options) => {
|
|
|
799
801
|
const wasTargetAnchorCurrent = isTargetAnchorCurrent();
|
|
800
802
|
const cellEntry = proposeView.read.nodes.get(cellKey, { match: ElementApi.isElement });
|
|
801
803
|
if (!cellEntry || !isPathVisible(proposeView, filter, cellEntry[1], pinnedRoot)) return Object.freeze({ status: "stale" });
|
|
802
|
-
if (hasHiddenDescendant(
|
|
804
|
+
if (hasHiddenDescendant(currentFilter(proposeView), cellEntry[0], cellEntry[1], pinnedRoot, editor.read.value().roots)) return Object.freeze({
|
|
803
805
|
refusal: {
|
|
804
806
|
reason: "hidden-content",
|
|
805
807
|
ref: record.ref
|
|
@@ -904,7 +906,7 @@ const createAIDraftSession = (editor, options) => {
|
|
|
904
906
|
const segments = [];
|
|
905
907
|
let flat = "";
|
|
906
908
|
const appendBlockTexts = (node, blockPath, clipStart, clipEnd) => {
|
|
907
|
-
if (!pruneHiddenDescendants(
|
|
909
|
+
if (!pruneHiddenDescendants(currentFilter(rootView), node, blockPath, pinnedRoot)) return;
|
|
908
910
|
let addedAny = false;
|
|
909
911
|
for (const [textNode, relPath] of NodeApi.texts(node)) {
|
|
910
912
|
const leafPath = [...blockPath, ...relPath];
|
|
@@ -1,6 +1,38 @@
|
|
|
1
1
|
import { PLUGINS } from "../../utils/plate-keys.js";
|
|
2
2
|
import { ElementApi, SelectionApi, TextApi, createEditorView } from "../../core.js";
|
|
3
3
|
//#region src/ai/lib/aiPolicy.internal.ts
|
|
4
|
+
const visibilityFilterCache = /* @__PURE__ */ new WeakMap();
|
|
5
|
+
/**
|
|
6
|
+
* Validate that `value` is a supported `EditorVisibilityFilter` (`'allow-all'`,
|
|
7
|
+
* a per-block predicate, or `{ forDocument }`).
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
const isEditorVisibilityFilter = (value) => value === "allow-all" || typeof value === "function" || typeof value === "object" && value !== null && typeof value.forDocument === "function";
|
|
12
|
+
/**
|
|
13
|
+
* Compile a document-scoped `{ forDocument }` visibility filter once per stored
|
|
14
|
+
* document revision and cache the resulting predicate per `(filter, editor)`.
|
|
15
|
+
*
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
const resolveVisibilityFilter = (editor, filter) => {
|
|
19
|
+
if (filter === "allow-all" || typeof filter === "function") return filter;
|
|
20
|
+
const revision = editor.read.revision();
|
|
21
|
+
let perEditor = visibilityFilterCache.get(filter);
|
|
22
|
+
const cached = perEditor?.get(editor);
|
|
23
|
+
if (cached && cached.revision === revision) return cached.predicate;
|
|
24
|
+
const predicate = filter.forDocument(editor.read.value());
|
|
25
|
+
if (typeof predicate !== "function") throw new TypeError("EditorVisibilityFilter.forDocument must return a predicate function.");
|
|
26
|
+
if (!perEditor) {
|
|
27
|
+
perEditor = /* @__PURE__ */ new WeakMap();
|
|
28
|
+
visibilityFilterCache.set(filter, perEditor);
|
|
29
|
+
}
|
|
30
|
+
perEditor.set(editor, {
|
|
31
|
+
predicate,
|
|
32
|
+
revision
|
|
33
|
+
});
|
|
34
|
+
return predicate;
|
|
35
|
+
};
|
|
4
36
|
const REMOTE_URL_SCHEME_RE = /^(?:https?:|[/\\]{2})/i;
|
|
5
37
|
const REMOTE_URL_BASE = "https://editor.invalid";
|
|
6
38
|
const stripControlChars = (input) => {
|
|
@@ -56,10 +88,12 @@ const isElementAllowed = (filter, block, path, root) => {
|
|
|
56
88
|
*/
|
|
57
89
|
const isPathVisible = (editor, filter, path, root) => {
|
|
58
90
|
if (filter === "allow-all") return true;
|
|
91
|
+
const resolved = resolveVisibilityFilter(editor, filter);
|
|
92
|
+
if (resolved === "allow-all") return true;
|
|
59
93
|
for (let depth = 1; depth <= path.length; depth += 1) {
|
|
60
94
|
const ancestorPath = path.slice(0, depth);
|
|
61
95
|
const entry = editor.read.nodes.get(ancestorPath, { match: ElementApi.isElement });
|
|
62
|
-
if (entry && !isElementAllowed(
|
|
96
|
+
if (entry && !isElementAllowed(resolved, entry[0], entry[1], root)) return false;
|
|
63
97
|
}
|
|
64
98
|
return true;
|
|
65
99
|
};
|
|
@@ -158,12 +192,14 @@ const isRangeVisible = (editor, filter, range, root) => {
|
|
|
158
192
|
path: range.focus.path
|
|
159
193
|
}
|
|
160
194
|
};
|
|
161
|
-
|
|
162
|
-
if (
|
|
195
|
+
const resolved = resolveVisibilityFilter(editor, filter);
|
|
196
|
+
if (resolved === "allow-all") return true;
|
|
197
|
+
if (!isPathVisible(view, resolved, localRange.anchor.path, rangeRoot)) return false;
|
|
198
|
+
if (!isPathVisible(view, resolved, localRange.focus.path, rangeRoot)) return false;
|
|
163
199
|
for (const [node, path] of view.read.nodes.entries({
|
|
164
200
|
at: localRange,
|
|
165
201
|
match: ElementApi.isElement
|
|
166
|
-
})) if (!isElementAllowed(
|
|
202
|
+
})) if (!isElementAllowed(resolved, node, path, rangeRoot)) return false;
|
|
167
203
|
return true;
|
|
168
204
|
};
|
|
169
205
|
const hasChildRootRefs = (items) => {
|
|
@@ -187,6 +223,7 @@ const buildFilteredSerializeDocument = (editor, nodes, filter, options) => {
|
|
|
187
223
|
const needsRoots = hasChildRootRefs(nodes);
|
|
188
224
|
if (!includeRecords && !needsRoots) return { children: [...nodes] };
|
|
189
225
|
const value = editor.read.value();
|
|
226
|
+
const resolved = resolveVisibilityFilter(editor, filter);
|
|
190
227
|
const root = editor.read.view.root();
|
|
191
228
|
let roots;
|
|
192
229
|
if (needsRoots && value.roots) {
|
|
@@ -215,7 +252,7 @@ const buildFilteredSerializeDocument = (editor, nodes, filter, options) => {
|
|
|
215
252
|
for (let index = 0; index < rootNodes.length; index += 1) {
|
|
216
253
|
const child = rootNodes[index];
|
|
217
254
|
if (!child || !ElementApi.isElement(child)) continue;
|
|
218
|
-
const pruned = pruneHiddenDescendants(
|
|
255
|
+
const pruned = pruneHiddenDescendants(resolved, child, [index], key);
|
|
219
256
|
if (pruned) filteredRootNodes.push(pruned);
|
|
220
257
|
}
|
|
221
258
|
roots ??= {};
|
|
@@ -399,4 +436,4 @@ const sanitizeRemoteMediaNodes = (nodes, allowRemoteMediaUrl) => {
|
|
|
399
436
|
};
|
|
400
437
|
};
|
|
401
438
|
//#endregion
|
|
402
|
-
export { buildFilteredSerializeDocument, findDisallowedRemoteMediaUrls, findDisallowedRemoteMediaUrlsInMarkdown, hasHiddenDescendant, isElementAllowed, isPathVisible, isRangeVisible, isRemoteMediaUrl, pruneHiddenDescendants, sanitizeRemoteMediaNodes };
|
|
439
|
+
export { buildFilteredSerializeDocument, findDisallowedRemoteMediaUrls, findDisallowedRemoteMediaUrlsInMarkdown, hasHiddenDescendant, isEditorVisibilityFilter, isElementAllowed, isPathVisible, isRangeVisible, isRemoteMediaUrl, pruneHiddenDescendants, resolveVisibilityFilter, sanitizeRemoteMediaNodes };
|
|
@@ -9,7 +9,7 @@ import { BaseInkPlugin, renderInkPassageSvg } from "../../features/ink/lib/BaseI
|
|
|
9
9
|
import { BaseTableCellPlugin, BaseTableRowPlugin } from "../../features/table/lib/BaseTablePlugin.js";
|
|
10
10
|
import { MarkdownPlugin } from "../../markdown/lib/MarkdownPlugin.js";
|
|
11
11
|
import { applyMinimalTextBlockEdits, extractCopiedBlockProps, landAIOutput, suggestionBlocks, textEdits } from "./aiOutputLanding.internal.js";
|
|
12
|
-
import { buildFilteredSerializeDocument, findDisallowedRemoteMediaUrls, findDisallowedRemoteMediaUrlsInMarkdown, hasHiddenDescendant, isPathVisible, isRangeVisible, pruneHiddenDescendants } from "./aiPolicy.internal.js";
|
|
12
|
+
import { buildFilteredSerializeDocument, findDisallowedRemoteMediaUrls, findDisallowedRemoteMediaUrlsInMarkdown, hasHiddenDescendant, isEditorVisibilityFilter, isPathVisible, isRangeVisible, pruneHiddenDescendants, resolveVisibilityFilter } from "./aiPolicy.internal.js";
|
|
13
13
|
import { PRESENCE_ACTIVE_TTL_MS, PRESENCE_IDLE_TTL_MS, canonicalJson, createAgentDispatcher, createDefaultIdempotencyStore, hashString } from "./editorAgentDispatcher.internal.js";
|
|
14
14
|
import { buildPresenceMeta, rangesEqual, resolveBlockPresenceRange, withRangeRoot } from "./editorAgentPresence.internal.js";
|
|
15
15
|
import { bindConfinedSuggestAgent } from "./webmcpConfinement.internal.js";
|
|
@@ -643,7 +643,7 @@ const tryProjectLocalMainBlock = (editor, capability, rawValue, pruned, topIndex
|
|
|
643
643
|
};
|
|
644
644
|
};
|
|
645
645
|
const getProposedBlock = (editor, block, path, filter, root, context) => {
|
|
646
|
-
const pruned = pruneHiddenDescendants(filter, block, path, root);
|
|
646
|
+
const pruned = pruneHiddenDescendants(resolveVisibilityFilter(editor, filter), block, path, root);
|
|
647
647
|
if (!pruned) return null;
|
|
648
648
|
if (!editor.plugin(AuthoredPlugin).installed) return pruned;
|
|
649
649
|
if (context && !isBlockPotentiallyDirty(block, path, context)) return pruned;
|
|
@@ -785,11 +785,12 @@ const sliceContainsHiddenElement = (nodes, filter, basePath, root) => {
|
|
|
785
785
|
const summarizeAuthoredChange = (editor, change, filter, root) => {
|
|
786
786
|
const details = editor.plugin(AuthoredPlugin).read.details(change.id);
|
|
787
787
|
if (!details || details.parts.length === 0) return `${change.kind} suggestion`;
|
|
788
|
+
const resolvedFilter = resolveVisibilityFilter(editor, filter);
|
|
788
789
|
const fragments = [];
|
|
789
790
|
for (const part of details.parts) if (part.kind === "content") {
|
|
790
|
-
if (!isRangeVisible(editor,
|
|
791
|
+
if (!isRangeVisible(editor, resolvedFilter, part.range, root)) continue;
|
|
791
792
|
const basePath = part.range.anchor.path.slice(0, -1);
|
|
792
|
-
if (part.before && sliceContainsHiddenElement(part.before.content,
|
|
793
|
+
if (part.before && sliceContainsHiddenElement(part.before.content, resolvedFilter, basePath, root) || part.after && sliceContainsHiddenElement(part.after.content, resolvedFilter, basePath, root)) continue;
|
|
793
794
|
const beforeText = part.before ? part.before.content.map((n) => NodeApi.string(n)).join(" ") : "";
|
|
794
795
|
const afterText = part.after ? part.after.content.map((n) => NodeApi.string(n)).join(" ") : "";
|
|
795
796
|
if (part.action === "replace") fragments.push(`replace "${beforeText}" with "${afterText}"`);
|
|
@@ -812,15 +813,16 @@ const isChangeVisible = (editor, change, filter, root) => {
|
|
|
812
813
|
if ((SelectionApi.root(range) ?? "main") !== targetRoot) return false;
|
|
813
814
|
if (!isRangeVisible(editor, filter, range, root)) return false;
|
|
814
815
|
}
|
|
815
|
-
|
|
816
|
+
const resolvedFilter = resolveVisibilityFilter(editor, filter);
|
|
817
|
+
if (resolvedFilter === "allow-all") return true;
|
|
816
818
|
const details = editor.plugin(AuthoredPlugin).read.details(change.id);
|
|
817
819
|
if (details) {
|
|
818
820
|
for (const part of details.parts) if (part.kind === "content") {
|
|
819
821
|
if ((SelectionApi.root(part.range) ?? "main") !== targetRoot) return false;
|
|
820
|
-
if (!isRangeVisible(editor,
|
|
822
|
+
if (!isRangeVisible(editor, resolvedFilter, part.range, root)) return false;
|
|
821
823
|
const basePath = part.range.anchor.path.slice(0, -1);
|
|
822
|
-
if (part.before && sliceContainsHiddenElement(part.before.content,
|
|
823
|
-
} else if ((part.kind === "properties" || part.kind === "enclosure") && !isPathVisible(editor,
|
|
824
|
+
if (part.before && sliceContainsHiddenElement(part.before.content, resolvedFilter, basePath, root) || part.after && sliceContainsHiddenElement(part.after.content, resolvedFilter, basePath, root)) return false;
|
|
825
|
+
} else if ((part.kind === "properties" || part.kind === "enclosure") && !isPathVisible(editor, resolvedFilter, part.path, root)) return false;
|
|
824
826
|
}
|
|
825
827
|
return true;
|
|
826
828
|
};
|
|
@@ -901,7 +903,8 @@ const inspectCommentThreadVisibility = (editor, thread, attachment, filter, pinn
|
|
|
901
903
|
if (attachment.elementId) {
|
|
902
904
|
const { elementId: attachedElementId } = attachment;
|
|
903
905
|
const targetEntry = findBlockById(editor, attachedElementId);
|
|
904
|
-
|
|
906
|
+
const resolvedFilter = resolveVisibilityFilter(editor, filter);
|
|
907
|
+
if (targetEntry && (!isPathVisible(editor, resolvedFilter, targetEntry[1], pinnedRoot) || pruneHiddenDescendants(resolvedFilter, targetEntry[0], targetEntry[1], pinnedRoot) === null)) return { visible: false };
|
|
905
908
|
elementId = attachedElementId;
|
|
906
909
|
}
|
|
907
910
|
quote = filter === "allow-all" ? attachment.quote || thread.excerpt || void 0 : editor.read.text.string(attachment.range) || void 0;
|
|
@@ -1090,7 +1093,7 @@ const validateToolInput = (shortName, input, agentEditorId) => {
|
|
|
1090
1093
|
};
|
|
1091
1094
|
const createEditorAgentRuntime = (editor, options, runtimeConfig) => {
|
|
1092
1095
|
if (typeof options.authorId !== "string" || options.authorId.trim().length === 0) throw new TypeError("createEditorAgent requires a non-empty authorId.");
|
|
1093
|
-
if (options.filter
|
|
1096
|
+
if (!isEditorVisibilityFilter(options.filter)) throw new TypeError("createEditorAgent requires filter to be \"allow-all\", a function, or { forDocument }.");
|
|
1094
1097
|
const access = validateAccess(options.access);
|
|
1095
1098
|
const { authorId } = options;
|
|
1096
1099
|
const commentsEnabled = Boolean(options.comments);
|
|
@@ -1098,6 +1101,7 @@ const createEditorAgentRuntime = (editor, options, runtimeConfig) => {
|
|
|
1098
1101
|
const inkEnabled = Boolean(options.ink);
|
|
1099
1102
|
const renderInkImages = getInkImageRenderer(options);
|
|
1100
1103
|
const { filter } = options;
|
|
1104
|
+
const currentFilter = (target = editor) => resolveVisibilityFilter(target, filter);
|
|
1101
1105
|
const prefix = validatePrefix(options.prefix ?? "editor");
|
|
1102
1106
|
const pinnedRoot = editor.read.view.root();
|
|
1103
1107
|
const ephemeral = Boolean(runtimeConfig?.ephemeral);
|
|
@@ -1279,7 +1283,7 @@ const createEditorAgentRuntime = (editor, options, runtimeConfig) => {
|
|
|
1279
1283
|
selection: null,
|
|
1280
1284
|
truncated: false
|
|
1281
1285
|
};
|
|
1282
|
-
if (filter !== "allow-all" && hasHiddenDescendant(
|
|
1286
|
+
if (filter !== "allow-all" && hasHiddenDescendant(currentFilter(editor), node, path, pinnedRoot, editor.read.value().roots)) return {
|
|
1283
1287
|
selection: null,
|
|
1284
1288
|
truncated: false
|
|
1285
1289
|
};
|
|
@@ -1342,7 +1346,7 @@ const createEditorAgentRuntime = (editor, options, runtimeConfig) => {
|
|
|
1342
1346
|
selection: null,
|
|
1343
1347
|
truncated: false
|
|
1344
1348
|
};
|
|
1345
|
-
if (filter !== "allow-all" && hasHiddenDescendant(
|
|
1349
|
+
if (filter !== "allow-all" && hasHiddenDescendant(currentFilter(editor), node, path, pinnedRoot, editor.read.value().roots)) return {
|
|
1346
1350
|
selection: null,
|
|
1347
1351
|
truncated: false
|
|
1348
1352
|
};
|
|
@@ -1491,7 +1495,7 @@ const createEditorAgentRuntime = (editor, options, runtimeConfig) => {
|
|
|
1491
1495
|
if (!editor.read.schema.isVoid(child) && child.children.some((item) => ElementApi.isElement(item))) walkOutline(child.children, path);
|
|
1492
1496
|
continue;
|
|
1493
1497
|
}
|
|
1494
|
-
const proposed = dirty ? getProposedBlock(editor, child, path, filter, pinnedRoot, proposedContext) : pruneHiddenDescendants(
|
|
1498
|
+
const proposed = dirty ? getProposedBlock(editor, child, path, filter, pinnedRoot, proposedContext) : pruneHiddenDescendants(currentFilter(editor), child, path, pinnedRoot);
|
|
1495
1499
|
if (!proposed) continue;
|
|
1496
1500
|
const level = resolveHeadingLevel(editor, proposed);
|
|
1497
1501
|
if (level !== void 0) {
|
|
@@ -1776,7 +1780,7 @@ const createEditorAgentRuntime = (editor, options, runtimeConfig) => {
|
|
|
1776
1780
|
ok: false
|
|
1777
1781
|
};
|
|
1778
1782
|
} else {
|
|
1779
|
-
if (filter !== "allow-all" && hasHiddenDescendant(
|
|
1783
|
+
if (filter !== "allow-all" && hasHiddenDescendant(currentFilter(editor), node, path, pinnedRoot, editor.read.value().roots)) return {
|
|
1780
1784
|
error: makeError("denied", `Block "${blockId}" contains hidden content and cannot be edited.`, preRevision),
|
|
1781
1785
|
ok: false
|
|
1782
1786
|
};
|
|
@@ -2203,7 +2207,7 @@ const createEditorAgentRuntime = (editor, options, runtimeConfig) => {
|
|
|
2203
2207
|
let blockFilterPath = null;
|
|
2204
2208
|
if (blockIdFilter !== void 0) {
|
|
2205
2209
|
const targetEntry = findBlockById(editor, blockIdFilter);
|
|
2206
|
-
if (!targetEntry || !isPathVisible(editor, filter, targetEntry[1], pinnedRoot) || pruneHiddenDescendants(
|
|
2210
|
+
if (!targetEntry || !isPathVisible(editor, filter, targetEntry[1], pinnedRoot) || pruneHiddenDescendants(currentFilter(editor), targetEntry[0], targetEntry[1], pinnedRoot) === null) return Object.freeze({
|
|
2207
2211
|
code: "ok",
|
|
2208
2212
|
comments: Object.freeze([]),
|
|
2209
2213
|
kind: "comments",
|
|
@@ -2466,8 +2470,8 @@ const createEditorAgentRuntime = (editor, options, runtimeConfig) => {
|
|
|
2466
2470
|
const entry = findBlockById(editor, blockId);
|
|
2467
2471
|
if (!entry) return makeError("not_found", `Block "${blockId}" was not found.`, preRevision);
|
|
2468
2472
|
const [node, path] = entry;
|
|
2469
|
-
if (!isPathVisible(editor, filter, path, pinnedRoot) || pruneHiddenDescendants(
|
|
2470
|
-
if (filter !== "allow-all" && hasHiddenDescendant(
|
|
2473
|
+
if (!isPathVisible(editor, filter, path, pinnedRoot) || pruneHiddenDescendants(currentFilter(editor), node, path, pinnedRoot) === null) return makeError("not_found", `Block "${blockId}" was not found.`, preRevision);
|
|
2474
|
+
if (filter !== "allow-all" && hasHiddenDescendant(currentFilter(editor), node, path, pinnedRoot, editor.read.value().roots)) return makeError("denied", `Block "${blockId}" contains hidden content and cannot be commented on.`, preRevision);
|
|
2471
2475
|
if (typeof node.id !== "string" || node.id.length === 0) return makeError("invalid", `Block "${blockId}" does not have a persisted element id for commenting.`, preRevision);
|
|
2472
2476
|
if (quote !== void 0 && (editor.read.schema.isVoid(node) || NodeApi.string(node).length === 0)) return makeError("invalid", `Cannot quote text inside void or empty block "${blockId}".`, preRevision);
|
|
2473
2477
|
const hasAuthored = editor.plugin(AuthoredPlugin).installed;
|
|
@@ -2505,7 +2509,10 @@ const createEditorAgentRuntime = (editor, options, runtimeConfig) => {
|
|
|
2505
2509
|
}
|
|
2506
2510
|
return makeCommentMutationError(mutationResult, `Failed to create comment on block "${blockId}"`);
|
|
2507
2511
|
};
|
|
2508
|
-
const isInkBlockVisible = (node, path) =>
|
|
2512
|
+
const isInkBlockVisible = (node, path) => {
|
|
2513
|
+
const resolved = currentFilter(editor);
|
|
2514
|
+
return isPathVisible(editor, resolved, path, pinnedRoot) && pruneHiddenDescendants(resolved, node, path, pinnedRoot) !== null && (resolved === "allow-all" || !hasHiddenDescendant(resolved, node, path, pinnedRoot, editor.read.value().roots));
|
|
2515
|
+
};
|
|
2509
2516
|
const inspectInkMarkBlocks = (mark) => {
|
|
2510
2517
|
const ink = editor.plugin(BaseInkPlugin);
|
|
2511
2518
|
const resolved = [];
|
|
@@ -2821,8 +2828,9 @@ const createEditorAgentRuntime = (editor, options, runtimeConfig) => {
|
|
|
2821
2828
|
const child = children[index];
|
|
2822
2829
|
if (!child || !ElementApi.isElement(child)) continue;
|
|
2823
2830
|
const path = [index];
|
|
2824
|
-
|
|
2825
|
-
|
|
2831
|
+
const resolved = currentFilter(editor);
|
|
2832
|
+
if (!isPathVisible(editor, resolved, path, pinnedRoot)) continue;
|
|
2833
|
+
const pruned = pruneHiddenDescendants(resolved, child, path, pinnedRoot);
|
|
2826
2834
|
if (!pruned) continue;
|
|
2827
2835
|
const blockId = resolveBlockId(editor, child);
|
|
2828
2836
|
blocks.push(Object.freeze({
|
|
@@ -2836,8 +2844,9 @@ const createEditorAgentRuntime = (editor, options, runtimeConfig) => {
|
|
|
2836
2844
|
const selection = editor.read.selection();
|
|
2837
2845
|
let visibleSelection = null;
|
|
2838
2846
|
if (selection && (SelectionApi.root(selection) ?? "main") === (pinnedRoot ?? "main") && isRangeVisible(editor, filter, selection, pinnedRoot)) {
|
|
2847
|
+
const resolvedSelectionFilter = currentFilter(editor);
|
|
2839
2848
|
const selectedBlocks = [...editor.read.nodes.blocks({ at: selection })];
|
|
2840
|
-
if (selectedBlocks.length > 0 && selectedBlocks.every(([node, path]) => isPathVisible(editor,
|
|
2849
|
+
if (selectedBlocks.length > 0 && selectedBlocks.every(([node, path]) => isPathVisible(editor, resolvedSelectionFilter, path, pinnedRoot) && (resolvedSelectionFilter === "allow-all" || !hasHiddenDescendant(resolvedSelectionFilter, node, path, pinnedRoot, editor.read.value().roots)))) visibleSelection = Object.freeze({
|
|
2841
2850
|
anchor: selection.anchor,
|
|
2842
2851
|
focus: selection.focus
|
|
2843
2852
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { snapshotEditorJsonValue } from "../../facade.js";
|
|
2
2
|
import { createEditorView } from "../../core.js";
|
|
3
|
-
import { isPathVisible } from "./aiPolicy.internal.js";
|
|
3
|
+
import { isEditorVisibilityFilter, isPathVisible } from "./aiPolicy.internal.js";
|
|
4
4
|
import { PRESENCE_ACTIVE_TTL_MS, PRESENCE_IDLE_TTL_MS, canonicalJson, createAgentDispatcher, createDefaultIdempotencyStore, hashString } from "./editorAgentDispatcher.internal.js";
|
|
5
5
|
import { buildPresenceMeta, encodeRangeToWireSelection, resolveBlockPresenceRange, sanitizeLeaseId, withRangeRoot } from "./editorAgentPresence.internal.js";
|
|
6
6
|
import { bindConfinedSuggestAgent } from "./webmcpConfinement.internal.js";
|
|
@@ -21,7 +21,7 @@ const mapSyncRefusalCode = (reason) => {
|
|
|
21
21
|
const createSyncServerAgentInternal = (deps, server, options) => {
|
|
22
22
|
if (typeof options.authorId !== "string" || options.authorId.trim().length === 0) throw new TypeError("createSyncServerAgent requires a non-empty authorId.");
|
|
23
23
|
if (typeof options.room !== "string" || options.room.trim().length === 0) throw new TypeError("createSyncServerAgent requires a non-empty room.");
|
|
24
|
-
if (options.filter
|
|
24
|
+
if (!isEditorVisibilityFilter(options.filter)) throw new TypeError("createSyncServerAgent requires filter to be \"allow-all\", a function, or { forDocument }.");
|
|
25
25
|
const access = deps.validateAccess(options.access);
|
|
26
26
|
const { authorId, filter, room, root } = options;
|
|
27
27
|
const debugEnabled = Boolean(options.debug);
|
|
@@ -2,7 +2,7 @@ import { ElementApi, NodeApi, PathApi, RangeApi, TextApi } from "../../core.js";
|
|
|
2
2
|
import { AuthoredPlugin } from "../../authored/AuthoredPlugin.js";
|
|
3
3
|
import { BaseTableCellPlugin, BaseTablePlugin } from "../../features/table/lib/BaseTablePlugin.js";
|
|
4
4
|
import { MarkdownPlugin } from "../../markdown/lib/MarkdownPlugin.js";
|
|
5
|
-
import { buildFilteredSerializeDocument, hasHiddenDescendant, isElementAllowed, isPathVisible, pruneHiddenDescendants } from "./aiPolicy.internal.js";
|
|
5
|
+
import { buildFilteredSerializeDocument, hasHiddenDescendant, isElementAllowed, isPathVisible, pruneHiddenDescendants, resolveVisibilityFilter } from "./aiPolicy.internal.js";
|
|
6
6
|
import { areAIBlockTargetsContiguous, isAIPathNonWritable, resolveAISelectedBlocks } from "./lockedContext.internal.js";
|
|
7
7
|
//#region src/ai/lib/lockedContext.ts
|
|
8
8
|
/**
|
|
@@ -28,7 +28,7 @@ const getSelectedTableCells = (editor) => {
|
|
|
28
28
|
* writable block or table cell that AI can edit in place.
|
|
29
29
|
*/
|
|
30
30
|
const hasEditableAISelection = (editor, refs) => {
|
|
31
|
-
const filter = refs?.filter ?? "allow-all";
|
|
31
|
+
const filter = resolveVisibilityFilter(editor, refs?.filter ?? "allow-all");
|
|
32
32
|
const root = editor.read.view.root();
|
|
33
33
|
const { roots } = editor.read.value();
|
|
34
34
|
const selectedCells = getSelectedTableCells(editor);
|
|
@@ -68,7 +68,7 @@ const serializeUnlockedRun = (editor, nodes, filter) => {
|
|
|
68
68
|
* and collecting read-only `<locked-clauses>` context lines.
|
|
69
69
|
*/
|
|
70
70
|
const serializeAIEditContext = (editor, options) => {
|
|
71
|
-
const
|
|
71
|
+
const filter = resolveVisibilityFilter(editor, options.filter);
|
|
72
72
|
const root = editor.read.view.root();
|
|
73
73
|
const { entries } = resolveAISelectedBlocks(editor);
|
|
74
74
|
const providedByPath = new Map((options.lockedBlocks ?? []).map((entry) => [entry.path.join(","), entry.ref]));
|
|
@@ -217,7 +217,8 @@ const pruneByHiddenRelativePaths = (node, relativePath, hidden) => {
|
|
|
217
217
|
* stay readable by single-block edit and generate prompts.
|
|
218
218
|
*/
|
|
219
219
|
const serializeAISelectionMarkdown = (editor, options) => {
|
|
220
|
-
const {
|
|
220
|
+
const { includeSelectionMarkers = false } = options;
|
|
221
|
+
const filter = resolveVisibilityFilter(editor, options.filter);
|
|
221
222
|
const root = editor.read.view.root();
|
|
222
223
|
const entries = [...editor.read.nodes.blocks()].filter(([, blockPath]) => isPathVisible(editor, filter, blockPath, root));
|
|
223
224
|
if (entries.length === 0) return "";
|
|
@@ -2,7 +2,7 @@ import { PLUGINS } from "../../utils/plate-keys.js";
|
|
|
2
2
|
import { ElementApi, NodeApi, PathApi, SelectionApi, TextApi, createEditorView } from "../../core.js";
|
|
3
3
|
import { AuthoredPlugin } from "../../authored/AuthoredPlugin.js";
|
|
4
4
|
import { MarkdownPlugin } from "../../markdown/lib/MarkdownPlugin.js";
|
|
5
|
-
import { buildFilteredSerializeDocument, isPathVisible, pruneHiddenDescendants, sanitizeRemoteMediaNodes } from "../lib/aiPolicy.internal.js";
|
|
5
|
+
import { buildFilteredSerializeDocument, isPathVisible, pruneHiddenDescendants, resolveVisibilityFilter, sanitizeRemoteMediaNodes } from "../lib/aiPolicy.internal.js";
|
|
6
6
|
import { isAIPathNonWritable } from "../lib/lockedContext.internal.js";
|
|
7
7
|
import isEqual from "lodash/isEqual.js";
|
|
8
8
|
//#region src/ai/react/copilotInline.internal.ts
|
|
@@ -315,11 +315,12 @@ const buildCopilotFIMPrompt = (editor, filter) => {
|
|
|
315
315
|
const selectionRoot = SelectionApi.root(selection);
|
|
316
316
|
const view = selectionRoot !== void 0 && selectionRoot !== editor.read.view.root() ? createEditorView(editor, { root: selectionRoot }) : editor;
|
|
317
317
|
const root = view.read.view.root();
|
|
318
|
+
const resolvedFilter = resolveVisibilityFilter(view, filter);
|
|
318
319
|
const currentEntry = view.read.nodes.block({ at: selection });
|
|
319
320
|
if (!currentEntry) return "";
|
|
320
321
|
const [currentBlock, currentPath] = currentEntry;
|
|
321
|
-
if (isCopilotCodeBlock(view, currentBlock) || isAIPathNonWritable(view, currentPath) || !isPathVisible(view,
|
|
322
|
-
const visibleCurrent = pruneHiddenDescendants(
|
|
322
|
+
if (isCopilotCodeBlock(view, currentBlock) || isAIPathNonWritable(view, currentPath) || !isPathVisible(view, resolvedFilter, currentPath, root)) return "";
|
|
323
|
+
const visibleCurrent = pruneHiddenDescendants(resolvedFilter, currentBlock, currentPath, root);
|
|
323
324
|
if (!visibleCurrent) return "";
|
|
324
325
|
const parentPath = PathApi.parent(currentPath);
|
|
325
326
|
const parentChildren = parentPath.length === 0 ? view.read.children() : view.read.nodes.get(parentPath, { match: ElementApi.isElement })?.[0].children ?? [];
|
|
@@ -330,7 +331,7 @@ const buildCopilotFIMPrompt = (editor, filter) => {
|
|
|
330
331
|
if (!sibling || !ElementApi.isElement(sibling)) continue;
|
|
331
332
|
const siblingPath = [...parentPath, idx];
|
|
332
333
|
if (isCopilotCodeBlock(view, sibling) || isAIPathNonWritable(view, siblingPath) || !isPathVisible(view, filter, siblingPath, root)) continue;
|
|
333
|
-
const visibleSibling = pruneHiddenDescendants(
|
|
334
|
+
const visibleSibling = pruneHiddenDescendants(resolvedFilter, sibling, siblingPath, root);
|
|
334
335
|
if (visibleSibling) prefixSiblings.unshift(visibleSibling);
|
|
335
336
|
}
|
|
336
337
|
const suffixSiblings = [];
|
|
@@ -339,7 +340,7 @@ const buildCopilotFIMPrompt = (editor, filter) => {
|
|
|
339
340
|
if (!sibling || !ElementApi.isElement(sibling)) continue;
|
|
340
341
|
const siblingPath = [...parentPath, idx];
|
|
341
342
|
if (isCopilotCodeBlock(view, sibling) || isAIPathNonWritable(view, siblingPath) || !isPathVisible(view, filter, siblingPath, root)) continue;
|
|
342
|
-
const visibleSibling = pruneHiddenDescendants(
|
|
343
|
+
const visibleSibling = pruneHiddenDescendants(resolvedFilter, sibling, siblingPath, root);
|
|
343
344
|
if (visibleSibling) suffixSiblings.push(visibleSibling);
|
|
344
345
|
}
|
|
345
346
|
let prefix = serializeFIMBlocks(view, [...prefixSiblings, visibleCurrent], filter);
|
package/dist/ai/react/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $o as Range, N as Descendant, Vl as TxDeclaredMethod, Wl as Value, fs as RootKey, ma as NodeKey } from "../../tx-only-
|
|
2
|
-
import "../../htmlTypes-
|
|
3
|
-
import { Ra as DefinitionOf, ao as NormalizePluginSelectors, fo as PluginReference, p as BasePlugin, uo as PluginDependency, xo as PluginSelectorMethods } from "../../core-
|
|
4
|
-
import { Tt as Plugin, ot as Editor } from "../../index-
|
|
5
|
-
import { V as EditorVisibilityFilter, _ as EditorAgentPresence, g as EditorAgentOptions, i as AILockedBlockRef, p as EditorAgent, t as RegisterEditorToolsOptions } from "../../registerEditorTools-
|
|
6
|
-
import { dt as RangeGeometry } from "../../EditorStatic-
|
|
7
|
-
import { T as MarkdownSliceParseResult, b as MarkdownPlaceholderParseResult, c as Unsafe, d as MarkdownDocumentParseResult, f as MarkdownEditorSerializeOptions, g as MarkdownParseLimits, j as MarkdownSyncPlugin, k as MarkdownStreamSnapshot, o as Handle, s as Join, w as MarkdownSerializeResult } from "../../index-
|
|
1
|
+
import { $o as Range, N as Descendant, Vl as TxDeclaredMethod, Wl as Value, fs as RootKey, ma as NodeKey } from "../../tx-only-sIj7BcYh-BMFkGMuq.js";
|
|
2
|
+
import "../../htmlTypes-3laowz-3.js";
|
|
3
|
+
import { Ra as DefinitionOf, ao as NormalizePluginSelectors, fo as PluginReference, p as BasePlugin, uo as PluginDependency, xo as PluginSelectorMethods } from "../../core-By92GWYW.js";
|
|
4
|
+
import { Tt as Plugin, ot as Editor } from "../../index-wEkvA-wI.js";
|
|
5
|
+
import { V as EditorVisibilityFilter, _ as EditorAgentPresence, g as EditorAgentOptions, i as AILockedBlockRef, p as EditorAgent, t as RegisterEditorToolsOptions } from "../../registerEditorTools-D_3hPpTx.js";
|
|
6
|
+
import { dt as RangeGeometry } from "../../EditorStatic-eXOA489B.js";
|
|
7
|
+
import { T as MarkdownSliceParseResult, b as MarkdownPlaceholderParseResult, c as Unsafe, d as MarkdownDocumentParseResult, f as MarkdownEditorSerializeOptions, g as MarkdownParseLimits, j as MarkdownSyncPlugin, k as MarkdownStreamSnapshot, o as Handle, s as Join, w as MarkdownSerializeResult } from "../../index-s34W6hUI.js";
|
|
8
8
|
import React$1 from "react";
|
|
9
9
|
/** Streaming draft landing mode for inline AI sessions. */
|
|
10
10
|
type AIDraftMode = 'detached' | 'suggestion';
|
|
@@ -19,6 +19,9 @@ const createManagedEditorAgent = (editor, config) => {
|
|
|
19
19
|
for (const listener of [...presenceListeners]) listener();
|
|
20
20
|
};
|
|
21
21
|
const createInner = () => {
|
|
22
|
+
let cachedSourceFilter = null;
|
|
23
|
+
let cachedDocument = null;
|
|
24
|
+
let cachedPredicate = null;
|
|
22
25
|
const innerOptions = {
|
|
23
26
|
...config.access !== void 0 ? { access: config.access } : {},
|
|
24
27
|
allow: (call, ctx) => {
|
|
@@ -30,10 +33,18 @@ const createManagedEditorAgent = (editor, config) => {
|
|
|
30
33
|
...config.comments !== void 0 ? { comments: config.comments } : {},
|
|
31
34
|
...config.debug !== void 0 ? { debug: config.debug } : {},
|
|
32
35
|
...config.editorId !== void 0 ? { editorId: config.editorId } : {},
|
|
33
|
-
filter: config.isAllowAllFilter ? "allow-all" : (ctx) => {
|
|
36
|
+
filter: config.isAllowAllFilter ? "allow-all" : { forDocument: (document) => (ctx) => {
|
|
34
37
|
if (!latestOptions) return false;
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
const current = latestOptions.filter;
|
|
39
|
+
if (current === "allow-all") return true;
|
|
40
|
+
if (typeof current === "function") return current(ctx);
|
|
41
|
+
if (cachedSourceFilter !== current || cachedDocument !== document || !cachedPredicate) {
|
|
42
|
+
cachedSourceFilter = current;
|
|
43
|
+
cachedDocument = document;
|
|
44
|
+
cachedPredicate = current.forDocument(document);
|
|
45
|
+
}
|
|
46
|
+
return cachedPredicate(ctx);
|
|
47
|
+
} },
|
|
37
48
|
...config.hasIdempotencyStore ? { idempotencyStore: {
|
|
38
49
|
get: (key) => latestOptions?.idempotencyStore?.get(key),
|
|
39
50
|
set: (key, entry) => latestOptions?.idempotencyStore?.set(key, entry)
|
package/dist/authored/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as AuthoredDocumentProjection, m as AuthoredProjectionRefusal, p as AuthoredProjectionDiagnostic } from "../tx-only-
|
|
2
|
-
import { C as AuthoredView, D as isAuthoredRefusal, T as SplitGave, _ as AuthoredPlaceError, a as AuthoredChangeMember, b as AuthoredResult, c as AuthoredComparisonImportResult, d as AuthoredGroupPart, f as AuthoredGroupQuery, g as AuthoredPage, h as AuthoredOutcome, i as AuthoredChangeKind, l as AuthoredDecision, m as AuthoredOptions, n as AuthoredChangeDetails, o as AuthoredChangePart, p as AuthoredMark, r as AuthoredChangeGroup, s as AuthoredChangesDelta, t as AuthoredChange, u as AuthoredGroupDetails, v as AuthoredQuery, w as GaveWrite, x as AuthoredReview, y as AuthoredRefusal } from "../authored-
|
|
3
|
-
import { n as projectAuthoredDocument, t as AuthoredFormatProjection } from "../index-
|
|
4
|
-
import { n as suggestionColorOf, r as AuthoredPlugin, t as AUTHORED_COLOR_COUNT } from "../index-
|
|
1
|
+
import { f as AuthoredDocumentProjection, m as AuthoredProjectionRefusal, p as AuthoredProjectionDiagnostic } from "../tx-only-sIj7BcYh-BMFkGMuq.js";
|
|
2
|
+
import { C as AuthoredView, D as isAuthoredRefusal, T as SplitGave, _ as AuthoredPlaceError, a as AuthoredChangeMember, b as AuthoredResult, c as AuthoredComparisonImportResult, d as AuthoredGroupPart, f as AuthoredGroupQuery, g as AuthoredPage, h as AuthoredOutcome, i as AuthoredChangeKind, l as AuthoredDecision, m as AuthoredOptions, n as AuthoredChangeDetails, o as AuthoredChangePart, p as AuthoredMark, r as AuthoredChangeGroup, s as AuthoredChangesDelta, t as AuthoredChange, u as AuthoredGroupDetails, v as AuthoredQuery, w as GaveWrite, x as AuthoredReview, y as AuthoredRefusal } from "../authored-qetvpvU--DSWESzxK.js";
|
|
3
|
+
import { n as projectAuthoredDocument, t as AuthoredFormatProjection } from "../index-DCTRNYwy.js";
|
|
4
|
+
import { n as suggestionColorOf, r as AuthoredPlugin, t as AUTHORED_COLOR_COUNT } from "../index-CHlITvuq.js";
|
|
5
5
|
export { AUTHORED_COLOR_COUNT, type AuthoredChange, type AuthoredChangeDetails, type AuthoredChangeGroup, type AuthoredChangeKind, type AuthoredChangeMember, type AuthoredChangePart, type AuthoredChangesDelta, type AuthoredComparisonImportResult, type AuthoredDecision, type AuthoredDocumentProjection, type AuthoredFormatProjection, type AuthoredGroupDetails, type AuthoredGroupPart, type AuthoredGroupQuery, type AuthoredMark, type AuthoredOptions, type AuthoredOutcome, type AuthoredPage, AuthoredPlaceError, AuthoredPlugin, type AuthoredProjectionDiagnostic, type AuthoredProjectionRefusal, type AuthoredQuery, type AuthoredRefusal, type AuthoredResult, type AuthoredReview, type AuthoredView, type GaveWrite, type SplitGave, isAuthoredRefusal, projectAuthoredDocument, suggestionColorOf };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $o as Range, Bi as Location, Go as PropertySetDescriptor, Mt as EditorJsonValue, Po as Point, Qa as Plugin, Qs as SchemaPropertyCopyPolicy, Ul as TxOnlyMethod, Vl as TxDeclaredMethod, Vo as PropertyJsonDescriptor, Wa as Path, ac as SchemaPropertyLandingPolicy, cc as SchemaPropertySplitPolicy, d as AnyEditor, ec as SchemaPropertyExclusiveGroup, jt as EditorJsonObject, lc as SchemaPropertyTypeChangePolicy, ma as NodeKey, mi as EditorViewOptions, mo as PluginDependencyReferenceFor, sc as SchemaPropertyRole, w as ContentSlice } from "./tx-only-
|
|
2
|
-
import "./refusal-
|
|
3
|
-
import { r as Comparison } from "./index-
|
|
1
|
+
import { $o as Range, Bi as Location, Go as PropertySetDescriptor, Mt as EditorJsonValue, Po as Point, Qa as Plugin, Qs as SchemaPropertyCopyPolicy, Ul as TxOnlyMethod, Vl as TxDeclaredMethod, Vo as PropertyJsonDescriptor, Wa as Path, ac as SchemaPropertyLandingPolicy, cc as SchemaPropertySplitPolicy, d as AnyEditor, ec as SchemaPropertyExclusiveGroup, jt as EditorJsonObject, lc as SchemaPropertyTypeChangePolicy, ma as NodeKey, mi as EditorViewOptions, mo as PluginDependencyReferenceFor, sc as SchemaPropertyRole, w as ContentSlice } from "./tx-only-sIj7BcYh-BMFkGMuq.js";
|
|
2
|
+
import "./refusal-CwFxNUf7-BLhtd159.js";
|
|
3
|
+
import { r as Comparison } from "./index-LEcSTRgn-BR_p4GVY.js";
|
|
4
4
|
/** Outcome of proposing a validated document comparison as one native change. */
|
|
5
5
|
type AuthoredComparisonImportResult = Readonly<{
|
|
6
6
|
ids: readonly string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./tx-only-sIj7BcYh-BMFkGMuq.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../index-
|
|
2
|
-
import { S as ExternalTextAdapter } from "../../EditorStatic-
|
|
1
|
+
import "../../index-wEkvA-wI.js";
|
|
2
|
+
import { S as ExternalTextAdapter } from "../../EditorStatic-eXOA489B.js";
|
|
3
3
|
import { Extension } from "@codemirror/state";
|
|
4
4
|
type CodeBlockCodeMirrorConfig = Readonly<{
|
|
5
5
|
language?: string;
|
package/dist/{comment-anchor.internal-DTBP1huU.d.ts → comment-anchor.internal-CoNK9gTD.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Yi as NamedRootKey } from "./tx-only-
|
|
2
|
-
import "./core-
|
|
1
|
+
import { Yi as NamedRootKey } from "./tx-only-sIj7BcYh-BMFkGMuq.js";
|
|
2
|
+
import "./core-By92GWYW.js";
|
|
3
3
|
/** One endpoint of a durable `CommentAnchor`, identified by stable block `elementId` and character offset. */
|
|
4
4
|
type CommentAnchorEndpoint = Readonly<{
|
|
5
5
|
elementId: string;
|
package/dist/compiler/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Eu as readEditorSchemaContract, _n as EditorSchemaContractContentRoot, bn as EditorSchemaContractRoot, gn as EditorSchemaContractContentProgram, hn as EditorSchemaContractChangeKind, mn as EditorSchemaContractChange, ou as diffEditorSchemaContracts, pn as EditorSchemaContract, vn as EditorSchemaContractDiff, yn as EditorSchemaContractElement } from "../tx-only-
|
|
2
|
-
import { h as EditorApplicationSchema } from "../htmlTypes-
|
|
3
|
-
import { ft as EditorPropertyTypes, st as BasePluginInput, tt as EditorCompilation } from "../core-
|
|
1
|
+
import { Eu as readEditorSchemaContract, _n as EditorSchemaContractContentRoot, bn as EditorSchemaContractRoot, gn as EditorSchemaContractContentProgram, hn as EditorSchemaContractChangeKind, mn as EditorSchemaContractChange, ou as diffEditorSchemaContracts, pn as EditorSchemaContract, vn as EditorSchemaContractDiff, yn as EditorSchemaContractElement } from "../tx-only-sIj7BcYh-BMFkGMuq.js";
|
|
2
|
+
import { h as EditorApplicationSchema } from "../htmlTypes-3laowz-3.js";
|
|
3
|
+
import { ft as EditorPropertyTypes, st as BasePluginInput, tt as EditorCompilation } from "../core-By92GWYW.js";
|
|
4
4
|
/**
|
|
5
5
|
* Compile nominal plugins and optional application schema into immutable JSON data.
|
|
6
6
|
* Evaluates configuration, API factories and validators without activating plugins
|