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
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { Vl as TxDeclaredMethod, Wa as Path, _t as EditorDocumentValue, qo as PropertyStringDescriptor, wi as ElementOf } from "../../tx-only-sIj7BcYh-BMFkGMuq.js";
|
|
2
|
+
import "../../htmlTypes-3laowz-3.js";
|
|
3
|
+
import { Ra as DefinitionOf, p as BasePlugin, vt as NodeInsertOptions } from "../../core-By92GWYW.js";
|
|
4
|
+
declare const isValidReferenceString: (value: unknown) => value is string;
|
|
5
|
+
/** Input payload for inserting an inline cross-document reference or citation. */
|
|
6
|
+
type ReferenceInsertInput = Readonly<{
|
|
7
|
+
/** Explicit display override that remains stable when the target document is renamed. */
|
|
8
|
+
alias?: string;
|
|
9
|
+
/** Optional target block or clause element ID inside the target document. */
|
|
10
|
+
blockId?: string;
|
|
11
|
+
/** Offline and export fallback title snapshot; yields to live target title on rename. */
|
|
12
|
+
label?: string;
|
|
13
|
+
/** Optional pinned verbatim quote used for citation drift detection. */
|
|
14
|
+
quote?: string;
|
|
15
|
+
/** Stable target document or source identifier. */
|
|
16
|
+
ref: string;
|
|
17
|
+
/** Optional opaque app or content revision token pinned alongside the citation. */
|
|
18
|
+
revision?: string;
|
|
19
|
+
/** Optional target named root for whole-tab references. */
|
|
20
|
+
root?: string;
|
|
21
|
+
}>;
|
|
22
|
+
/** Options for inserting a reference node through `BaseReferencePlugin`. */
|
|
23
|
+
type ReferenceInsertOptions = NodeInsertOptions & {
|
|
24
|
+
/**
|
|
25
|
+
* Insert a trailing space when inserting at the current selection at the end
|
|
26
|
+
* of a block.
|
|
27
|
+
*/
|
|
28
|
+
trailingSpace?: boolean;
|
|
29
|
+
};
|
|
30
|
+
/** Extracted outgoing reference occurrence from a detached `EditorDocumentValue`. */
|
|
31
|
+
type ExtractedDocumentReference = Readonly<{
|
|
32
|
+
/** Explicit display override when authored on the node. */
|
|
33
|
+
alias?: string;
|
|
34
|
+
/** Target block element ID when pinned to a specific block or clause. */
|
|
35
|
+
blockId?: string;
|
|
36
|
+
/** Fallback display title snapshot stored on the node. */
|
|
37
|
+
label?: string;
|
|
38
|
+
/** Path of the reference node within `sourceRoot`. */
|
|
39
|
+
path: Path;
|
|
40
|
+
/** Pinned verbatim quote when present on the node. */
|
|
41
|
+
quote?: string;
|
|
42
|
+
/** Stable target document or source identifier. */
|
|
43
|
+
ref: string;
|
|
44
|
+
/** Opaque pinned revision token when present on the node. */
|
|
45
|
+
revision?: string;
|
|
46
|
+
/** Target named root when addressing a whole tab. */
|
|
47
|
+
root?: string;
|
|
48
|
+
/** Persisted ID of the enclosing block containing this reference, if present. */
|
|
49
|
+
sourceBlockId?: string;
|
|
50
|
+
/** Root name (`'main'` or named root) where this reference occurs. */
|
|
51
|
+
sourceRoot: string;
|
|
52
|
+
}>;
|
|
53
|
+
/** Options for `extractDocumentReferences`. */
|
|
54
|
+
type ExtractDocumentReferencesOptions = Readonly<{
|
|
55
|
+
/** Include references inside authored-deleted nodes when `true`. Defaults to `false`. */
|
|
56
|
+
includeDeleted?: boolean;
|
|
57
|
+
/** Custom persisted element type name when `BaseReferencePlugin` was configured with a different type. */
|
|
58
|
+
type?: string;
|
|
59
|
+
}>;
|
|
60
|
+
/** Resolved target document or text input passed to `evaluateReferenceDrift`. */
|
|
61
|
+
type ReferenceDriftTarget = Readonly<{
|
|
62
|
+
/** Target document value (accepted or viewer-redacted). */
|
|
63
|
+
document?: EditorDocumentValue;
|
|
64
|
+
/** Pre-extracted visible target text; overrides text extraction from `document` when provided. */
|
|
65
|
+
liveText?: string;
|
|
66
|
+
/** Set `true` when redaction hid part of the target so drift cannot be truthfully asserted. */
|
|
67
|
+
partialVisibility?: boolean;
|
|
68
|
+
/** Current opaque app or content revision token of the target. */
|
|
69
|
+
revision?: string;
|
|
70
|
+
}>;
|
|
71
|
+
/** Discriminated drift evaluation result returned by `evaluateReferenceDrift`. */
|
|
72
|
+
type ReferenceDriftResult = Readonly<{
|
|
73
|
+
status: 'unpinned';
|
|
74
|
+
}> | Readonly<{
|
|
75
|
+
status: 'unavailable';
|
|
76
|
+
}> | Readonly<{
|
|
77
|
+
status: 'unverifiable';
|
|
78
|
+
}> | Readonly<{
|
|
79
|
+
currentRevision?: string;
|
|
80
|
+
liveText?: string;
|
|
81
|
+
status: 'current';
|
|
82
|
+
}> | Readonly<{
|
|
83
|
+
currentRevision?: string;
|
|
84
|
+
liveText?: string;
|
|
85
|
+
pinnedQuote?: string;
|
|
86
|
+
pinnedRevision?: string;
|
|
87
|
+
reanchoredBlockId?: string;
|
|
88
|
+
reason: 'quote-changed' | 'revision-changed' | 'target-not-found';
|
|
89
|
+
status: 'drifted';
|
|
90
|
+
}>;
|
|
91
|
+
/**
|
|
92
|
+
* Stateless inline markable-void primitive unifying rename-safe wikilinks,
|
|
93
|
+
* block references, hover-transclusion anchors, and version-pinned citations.
|
|
94
|
+
*/
|
|
95
|
+
declare const BaseReferencePlugin: BasePlugin<Readonly<{
|
|
96
|
+
formats: true;
|
|
97
|
+
}> & Readonly<{
|
|
98
|
+
name: "reference";
|
|
99
|
+
}> & Readonly<Record<never, never>> & Readonly<{
|
|
100
|
+
update: {
|
|
101
|
+
readonly insert: TxDeclaredMethod<(input: ReferenceInsertInput, options?: ReferenceInsertOptions) => void>;
|
|
102
|
+
};
|
|
103
|
+
}> & Readonly<{
|
|
104
|
+
__pluginWritableProperties: Readonly<{
|
|
105
|
+
descriptor: PropertyStringDescriptor<{
|
|
106
|
+
readonly validate: typeof isValidReferenceString;
|
|
107
|
+
readonly validationVersion: 1;
|
|
108
|
+
}>;
|
|
109
|
+
key: "alias";
|
|
110
|
+
localId: "alias";
|
|
111
|
+
ownerName: "reference";
|
|
112
|
+
placement: "element";
|
|
113
|
+
unaliased: true;
|
|
114
|
+
value: string;
|
|
115
|
+
}> | Readonly<{
|
|
116
|
+
descriptor: PropertyStringDescriptor<{
|
|
117
|
+
readonly validate: typeof isValidReferenceString;
|
|
118
|
+
readonly validationVersion: 1;
|
|
119
|
+
}>;
|
|
120
|
+
key: "blockId";
|
|
121
|
+
localId: "blockId";
|
|
122
|
+
ownerName: "reference";
|
|
123
|
+
placement: "element";
|
|
124
|
+
unaliased: true;
|
|
125
|
+
value: string;
|
|
126
|
+
}> | Readonly<{
|
|
127
|
+
descriptor: PropertyStringDescriptor<{
|
|
128
|
+
readonly validate: typeof isValidReferenceString;
|
|
129
|
+
readonly validationVersion: 1;
|
|
130
|
+
}>;
|
|
131
|
+
key: "label";
|
|
132
|
+
localId: "label";
|
|
133
|
+
ownerName: "reference";
|
|
134
|
+
placement: "element";
|
|
135
|
+
unaliased: true;
|
|
136
|
+
value: string;
|
|
137
|
+
}> | Readonly<{
|
|
138
|
+
descriptor: PropertyStringDescriptor<{
|
|
139
|
+
readonly validate: typeof isValidReferenceString;
|
|
140
|
+
readonly validationVersion: 1;
|
|
141
|
+
}>;
|
|
142
|
+
key: "quote";
|
|
143
|
+
localId: "quote";
|
|
144
|
+
ownerName: "reference";
|
|
145
|
+
placement: "element";
|
|
146
|
+
unaliased: true;
|
|
147
|
+
value: string;
|
|
148
|
+
}> | Readonly<{
|
|
149
|
+
descriptor: PropertyStringDescriptor<{
|
|
150
|
+
readonly required: true;
|
|
151
|
+
readonly validate: typeof isValidReferenceString;
|
|
152
|
+
readonly validationVersion: 1;
|
|
153
|
+
}>;
|
|
154
|
+
key: "ref";
|
|
155
|
+
localId: "ref";
|
|
156
|
+
ownerName: "reference";
|
|
157
|
+
placement: "element";
|
|
158
|
+
unaliased: true;
|
|
159
|
+
value: string;
|
|
160
|
+
}> | Readonly<{
|
|
161
|
+
descriptor: PropertyStringDescriptor<{
|
|
162
|
+
readonly validate: typeof isValidReferenceString;
|
|
163
|
+
readonly validationVersion: 1;
|
|
164
|
+
}>;
|
|
165
|
+
key: "revision";
|
|
166
|
+
localId: "revision";
|
|
167
|
+
ownerName: "reference";
|
|
168
|
+
placement: "element";
|
|
169
|
+
unaliased: true;
|
|
170
|
+
value: string;
|
|
171
|
+
}> | Readonly<{
|
|
172
|
+
descriptor: PropertyStringDescriptor<{
|
|
173
|
+
readonly validate: typeof isValidReferenceString;
|
|
174
|
+
readonly validationVersion: 1;
|
|
175
|
+
}>;
|
|
176
|
+
key: "root";
|
|
177
|
+
localId: "root";
|
|
178
|
+
ownerName: "reference";
|
|
179
|
+
placement: "element";
|
|
180
|
+
unaliased: true;
|
|
181
|
+
value: string;
|
|
182
|
+
}>;
|
|
183
|
+
schema: {
|
|
184
|
+
readonly element: {
|
|
185
|
+
readonly properties: {
|
|
186
|
+
alias: PropertyStringDescriptor<{
|
|
187
|
+
readonly validate: typeof isValidReferenceString;
|
|
188
|
+
readonly validationVersion: 1;
|
|
189
|
+
}>;
|
|
190
|
+
blockId: PropertyStringDescriptor<{
|
|
191
|
+
readonly validate: typeof isValidReferenceString;
|
|
192
|
+
readonly validationVersion: 1;
|
|
193
|
+
}>;
|
|
194
|
+
label: PropertyStringDescriptor<{
|
|
195
|
+
readonly validate: typeof isValidReferenceString;
|
|
196
|
+
readonly validationVersion: 1;
|
|
197
|
+
}>;
|
|
198
|
+
quote: PropertyStringDescriptor<{
|
|
199
|
+
readonly validate: typeof isValidReferenceString;
|
|
200
|
+
readonly validationVersion: 1;
|
|
201
|
+
}>;
|
|
202
|
+
ref: PropertyStringDescriptor<{
|
|
203
|
+
readonly required: true;
|
|
204
|
+
readonly validate: typeof isValidReferenceString;
|
|
205
|
+
readonly validationVersion: 1;
|
|
206
|
+
}>;
|
|
207
|
+
revision: PropertyStringDescriptor<{
|
|
208
|
+
readonly validate: typeof isValidReferenceString;
|
|
209
|
+
readonly validationVersion: 1;
|
|
210
|
+
}>;
|
|
211
|
+
root: PropertyStringDescriptor<{
|
|
212
|
+
readonly validate: typeof isValidReferenceString;
|
|
213
|
+
readonly validationVersion: 1;
|
|
214
|
+
}>;
|
|
215
|
+
};
|
|
216
|
+
readonly void: "markable-inline";
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
}>>;
|
|
220
|
+
/** Inferred definition type of `BaseReferencePlugin`. */
|
|
221
|
+
type ReferenceDefinition = DefinitionOf<typeof BaseReferencePlugin>;
|
|
222
|
+
/** Inferred element node type produced by `BaseReferencePlugin`. */
|
|
223
|
+
type ReferenceElement = ElementOf<typeof BaseReferencePlugin>;
|
|
224
|
+
/**
|
|
225
|
+
* Extract all outgoing reference occurrences across `main` and all named `roots`
|
|
226
|
+
* of a detached `EditorDocumentValue` without constructing an editor.
|
|
227
|
+
*/
|
|
228
|
+
declare function extractDocumentReferences(document: EditorDocumentValue, options?: ExtractDocumentReferencesOptions): readonly ExtractedDocumentReference[];
|
|
229
|
+
/**
|
|
230
|
+
* Evaluate whether a pinned reference or citation has drifted from its target.
|
|
231
|
+
*
|
|
232
|
+
* When `quote` is present, quote matching always runs even if `revision` equals
|
|
233
|
+
* `target.revision`, preventing silent drift or spoofed revision tokens.
|
|
234
|
+
*/
|
|
235
|
+
declare function evaluateReferenceDrift(reference: Pick<ReferenceInsertInput, 'blockId' | 'quote' | 'ref' | 'revision' | 'root'>, target: ReferenceDriftTarget | null): ReferenceDriftResult;
|
|
236
|
+
export { BaseReferencePlugin, ExtractDocumentReferencesOptions, ExtractedDocumentReference, ReferenceDefinition, ReferenceDriftResult, ReferenceDriftTarget, ReferenceElement, ReferenceInsertInput, ReferenceInsertOptions, evaluateReferenceDrift, extractDocumentReferences };
|