@bendyline/squisq 2.11.3 → 2.11.5

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.
Files changed (33) hide show
  1. package/dist/{Doc-Dy6o3neL.d.ts → Doc-BkxT7G80.d.ts} +21 -6
  2. package/dist/{ImageEditDoc-iIG0_ea6.d.ts → ImageEditDoc-C8ZB54Vv.d.ts} +1 -1
  3. package/dist/{chunk-PWBXEZE3.js → chunk-2P44EZLI.js} +1 -1
  4. package/dist/{chunk-BQVTXRAN.js → chunk-AIB5WEK2.js} +5609 -4791
  5. package/dist/{chunk-6ATZOUCQ.js → chunk-C3NAY5YP.js} +8 -3
  6. package/dist/{chunk-UBFT2CDQ.js → chunk-CW24CH7I.js} +1 -1
  7. package/dist/{chunk-ECOSKKMS.js → chunk-NUS5YAI5.js} +8 -21
  8. package/dist/{chunk-O7JILDEF.js → chunk-X7BNDUNI.js} +1 -1
  9. package/dist/{chunk-64I44JAP.js → chunk-XJXBI3N5.js} +2 -2
  10. package/dist/{chunk-AE3IUKMM.js → chunk-ZSU5DJLX.js} +1 -1
  11. package/dist/doc/index.d.ts +124 -16
  12. package/dist/doc/index.js +5 -5
  13. package/dist/fence/index.d.ts +1 -1
  14. package/dist/generate/index.d.ts +1 -1
  15. package/dist/imageEdit/index.d.ts +3 -3
  16. package/dist/index.d.ts +6 -5
  17. package/dist/index.js +8 -8
  18. package/dist/jsonForm/index.d.ts +1 -1
  19. package/dist/markdown/index.js +3 -3
  20. package/dist/{materializePageSection-BEegGWnv.d.ts → materializePageSection-Dp2aHFbc.d.ts} +1 -1
  21. package/dist/narration/index.d.ts +1 -1
  22. package/dist/narration/index.js +4 -4
  23. package/dist/proof/index.d.ts +3 -45
  24. package/dist/recommend/index.d.ts +6 -0
  25. package/dist/recommend/index.js +2 -2
  26. package/dist/review/index.d.ts +141 -0
  27. package/dist/review/index.js +29 -0
  28. package/dist/schemas/index.d.ts +4 -4
  29. package/dist/{themeLibrary-i8f6QydX.d.ts → themeLibrary-BbSjnGmd.d.ts} +1 -1
  30. package/dist/transform/index.d.ts +2 -2
  31. package/dist/transform/index.js +2 -2
  32. package/dist/types-BQWu0gzi.d.ts +46 -0
  33. package/package.json +6 -1
@@ -14,7 +14,7 @@ import {
14
14
  stringifyMarkdown,
15
15
  unwrapMarkdownSource,
16
16
  wrapMarkdownSource
17
- } from "../chunk-64I44JAP.js";
17
+ } from "../chunk-XJXBI3N5.js";
18
18
  import {
19
19
  DEFAULT_MARKDOWN_SAFETY_LIMITS,
20
20
  MarkdownLimitError,
@@ -26,7 +26,7 @@ import {
26
26
  resolveMarkdownSafetyLimits,
27
27
  serializePandocAttributes,
28
28
  toMdast
29
- } from "../chunk-UBFT2CDQ.js";
29
+ } from "../chunk-CW24CH7I.js";
30
30
  import {
31
31
  BLOCK_META_KEY_DESCRIPTORS,
32
32
  KNOWN_BLOCK_META_KEYS,
@@ -60,7 +60,7 @@ import {
60
60
  splitFrontmatterBlock,
61
61
  stringifyHtmlNodes,
62
62
  walkMarkdownTree
63
- } from "../chunk-O7JILDEF.js";
63
+ } from "../chunk-X7BNDUNI.js";
64
64
  import "../chunk-4VOD55SX.js";
65
65
  export {
66
66
  BLOCK_META_KEY_DESCRIPTORS,
@@ -1,4 +1,4 @@
1
- import { k as Block, aF as PageSectionKind, aD as PageEmphasis, bj as ThemeColorScheme, aB as PageBackground, bh as Theme, bM as ViewportConfig, w as CustomTemplateDefinition, b5 as StartBlockConfig, O as Doc, bk as ThemePageStyle } from './Doc-Dy6o3neL.js';
1
+ import { k as Block, aF as PageSectionKind, aD as PageEmphasis, bj as ThemeColorScheme, aB as PageBackground, bh as Theme, bM as ViewportConfig, w as CustomTemplateDefinition, b5 as StartBlockConfig, O as Doc, bk as ThemePageStyle } from './Doc-BkxT7G80.js';
2
2
  import { M as MarkdownBlockNode } from './types-Be6sBUBx.js';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { O as Doc, f as AudioBookmark } from '../Doc-Dy6o3neL.js';
1
+ import { O as Doc, f as AudioBookmark } from '../Doc-BkxT7G80.js';
2
2
  import '../types-Be6sBUBx.js';
3
3
 
4
4
  /**
@@ -27,7 +27,7 @@ import {
27
27
  recordSlideShown,
28
28
  traceWordPosAt,
29
29
  vadStep
30
- } from "../chunk-PWBXEZE3.js";
30
+ } from "../chunk-2P44EZLI.js";
31
31
  import {
32
32
  buildNarrationScript,
33
33
  buildNarrationTimingJson,
@@ -37,13 +37,13 @@ import {
37
37
  wordIndexAtChar,
38
38
  wordIndexAtTime,
39
39
  wordPosAtExpectedSyllables
40
- } from "../chunk-BQVTXRAN.js";
40
+ } from "../chunk-AIB5WEK2.js";
41
41
  import "../chunk-PUS54YU6.js";
42
- import "../chunk-6ATZOUCQ.js";
42
+ import "../chunk-C3NAY5YP.js";
43
43
  import "../chunk-RXYKU6EX.js";
44
44
  import "../chunk-BAOV476U.js";
45
45
  import "../chunk-TMOHAFYE.js";
46
- import "../chunk-O7JILDEF.js";
46
+ import "../chunk-X7BNDUNI.js";
47
47
  import "../chunk-4VOD55SX.js";
48
48
  import "../chunk-XOFT65EX.js";
49
49
  import "../chunk-67L6WRJN.js";
@@ -1,47 +1,5 @@
1
- /**
2
- * Plain-data types for the proofing (grammar + spellcheck) pipeline.
3
- *
4
- * These types are engine-agnostic: an editor host adapts a concrete
5
- * engine (harper.js, a service, a test fake) to produce `ProofFinding`s,
6
- * while this module stays pure and dependency-free so the mapping and
7
- * masking helpers can run in Node tests and any consumer bundle.
8
- */
9
- /** Severity/color tier of a finding: red, green, or blue squiggle. */
10
- type ProofCategory = 'spelling' | 'grammar' | 'style';
11
- /** How a suggestion is applied relative to the finding's span. */
12
- type ProofSuggestionKind = 'replace' | 'remove' | 'insertAfter';
13
- /** One candidate fix for a finding. */
14
- interface ProofSuggestion {
15
- /** Replacement/insertion text (empty for `remove`). */
16
- text: string;
17
- kind: ProofSuggestionKind;
18
- }
19
- /** A half-open `[start, end)` range in UTF-16 code units. */
20
- interface ProofRange {
21
- start: number;
22
- end: number;
23
- }
24
- /**
25
- * One issue found in a linted text. Offsets index into the exact string
26
- * that was linted (UTF-16 code units — the same coordinate space as
27
- * ProseMirror, Monaco, and DOM Range).
28
- */
29
- interface ProofFinding extends ProofRange {
30
- /** Stable within one lint pass; the provider maps id → engine handle. */
31
- id: string;
32
- category: ProofCategory;
33
- /** Raw engine kind (e.g. `Typo`), for diagnostics and future filtering. */
34
- kind: string;
35
- /** Human-readable description of the issue. */
36
- message: string;
37
- /** Text at `[start, end)` when linted — staleness check before applying. */
38
- originalText: string;
39
- suggestions: ProofSuggestion[];
40
- }
41
- /** English dialects supported by the proofing engine. */
42
- type ProofDialect = 'American' | 'British' | 'Australian' | 'Canadian' | 'Indian';
43
- /** All supported dialects, in display order. */
44
- declare const PROOF_DIALECTS: readonly ProofDialect[];
1
+ import { a as ProofCategory, d as ProofRange, b as ProofDialect } from '../types-BQWu0gzi.js';
2
+ export { P as PROOF_DIALECTS, c as ProofFinding, e as ProofSuggestion, f as ProofSuggestionKind } from '../types-BQWu0gzi.js';
45
3
 
46
4
  /**
47
5
  * Mapping from harper's `LintKind` vocabulary to squisq's three proofing
@@ -195,4 +153,4 @@ declare function formatProofDictionary(words: readonly string[]): string | null;
195
153
  /** Read all proofing settings from a parsed frontmatter record. */
196
154
  declare function readProofingSettings(frontmatter: Record<string, unknown> | undefined): ProofingSettings;
197
155
 
198
- export { type BlankProtectedSpansOptions, type BlankedText, DEFAULT_PROOF_SETTINGS, type JoinedSegments, LINT_KIND_CATEGORIES, PROOF_DIALECTS, PROOF_FRONTMATTER_KEYS, PROOF_JOIN_SEPARATOR, type ProofCategory, type ProofDialect, type ProofFinding, type ProofRange, type ProofSuggestion, type ProofSuggestionKind, type ProofingSettings, type SegmentSpan, blankProtectedSpans, buildJoinedText, categorizeLintKind, dropMaskedFindings, formatProofDictionary, mapJoinedSpanToSegment, parseProofDictionary, readProofingSettings, resolveProofDialect };
156
+ export { type BlankProtectedSpansOptions, type BlankedText, DEFAULT_PROOF_SETTINGS, type JoinedSegments, LINT_KIND_CATEGORIES, PROOF_FRONTMATTER_KEYS, PROOF_JOIN_SEPARATOR, ProofCategory, ProofDialect, ProofRange, type ProofingSettings, type SegmentSpan, blankProtectedSpans, buildJoinedText, categorizeLintKind, dropMaskedFindings, formatProofDictionary, mapJoinedSpanToSegment, parseProofDictionary, readProofingSettings, resolveProofDialect };
@@ -20,6 +20,12 @@ interface BlockContentProfile {
20
20
  hasDate: boolean;
21
21
  hasNumberHighlight: boolean;
22
22
  wordCount: number;
23
+ /**
24
+ * True when a structural body node (list, table, quote, fence, etc.) has
25
+ * top-level siblings. Specialized templates generally consume only one
26
+ * structure; the complete-body template is the safe recommendation.
27
+ */
28
+ hasCompoundBody?: boolean;
23
29
  /**
24
30
  * True when the body is dominated by exactly one code fence whose content
25
31
  * is an ASCII box-and-line diagram (see `doc/asciiDiagram/detect.ts`).
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  profileBlockContents,
3
3
  recommendTemplatesForBlock
4
- } from "../chunk-6ATZOUCQ.js";
5
- import "../chunk-O7JILDEF.js";
4
+ } from "../chunk-C3NAY5YP.js";
5
+ import "../chunk-X7BNDUNI.js";
6
6
  export {
7
7
  profileBlockContents,
8
8
  recommendTemplatesForBlock
@@ -0,0 +1,141 @@
1
+ import { c as ProofFinding } from '../types-BQWu0gzi.js';
2
+
3
+ /**
4
+ * Plain-data types for the review pipeline.
5
+ *
6
+ * Review generalizes proofing. Spellcheck asks "is this word wrong?"; a
7
+ * reviewer may also ask "is this paragraph clear?", and the two differ in three
8
+ * ways the {@link ProofFinding} shape cannot express: a reviewer is slow enough
9
+ * that results must stream and be cancellable, it needs document structure
10
+ * rather than one flat string, and its suggestion is often a rewritten
11
+ * paragraph rather than a replaced word.
12
+ *
13
+ * `@bendyline/squisq/proof` is untouched and keeps working. A
14
+ * {@link ProofingProvider} is adapted into this pipeline by the editor, so
15
+ * there is one renderer rather than two.
16
+ */
17
+
18
+ /**
19
+ * How much a finding matters.
20
+ *
21
+ * Separate from the hue a provider draws in: severity orders findings within a
22
+ * provider, while the hue says which provider they came from. Conflating them
23
+ * is what makes a style hint and a spelling mistake indistinguishable.
24
+ */
25
+ type ReviewSeverity = 'info' | 'suggestion' | 'warning' | 'error';
26
+ /** How a suggestion is applied relative to the finding. */
27
+ type ReviewSuggestionKind = 'replace' | 'remove' | 'insertAfter' | 'replaceBlock';
28
+ interface ReviewSuggestion {
29
+ /** Replacement text. Empty for `remove`. */
30
+ text: string;
31
+ /**
32
+ * `replaceBlock` swaps the whole owning block rather than the finding's span.
33
+ * A model asked to improve a sentence rewrites the sentence; forcing that
34
+ * into a span replacement is what produces the mangled half-edits.
35
+ */
36
+ kind: ReviewSuggestionKind;
37
+ /** Button label, e.g. "Tighten". Falls back to a kind-derived default. */
38
+ label?: string;
39
+ }
40
+ /**
41
+ * One issue in a reviewed document.
42
+ *
43
+ * Offsets are UTF-16 code units into {@link ReviewRequest.source} — the same
44
+ * coordinate space as ProseMirror, Monaco and DOM Range.
45
+ */
46
+ interface ReviewFinding {
47
+ /** Unique within one pass of one provider. */
48
+ id: string;
49
+ /**
50
+ * Which provider produced this. Namespaces decorations and groups the panel,
51
+ * so two providers can report the same span without colliding.
52
+ */
53
+ source: string;
54
+ start: number;
55
+ end: number;
56
+ /**
57
+ * The block this finding is about.
58
+ *
59
+ * Present even when the span is exact, because a span goes stale as soon as
60
+ * the user types while the block does not — a finding that can still be
61
+ * navigated to is worth more than one that can only be discarded.
62
+ */
63
+ blockKey?: number;
64
+ severity: ReviewSeverity;
65
+ /** Provider-defined grouping, e.g. `spelling` or `clarity`. */
66
+ category: string;
67
+ /** One sentence. Shown inline. */
68
+ message: string;
69
+ /** The longer "why", shown on expand. A linter rarely has one; a model does. */
70
+ rationale?: string;
71
+ /** Text at `[start, end)` when reviewed — the staleness check before applying. */
72
+ originalText: string;
73
+ suggestions: ReviewSuggestion[];
74
+ }
75
+ /** One block handed to a provider. */
76
+ interface ReviewBlockInput {
77
+ /** Matches the editor's block key, so a finding can navigate back. */
78
+ key: number;
79
+ /** 1-based line where the block starts in `source`. */
80
+ startLine: number;
81
+ /** Nearest enclosing heading, for context. Null at the top of a document. */
82
+ heading: string | null;
83
+ /** Block text, with machine vocabulary already masked. */
84
+ text: string;
85
+ /** UTF-16 offset of `text` within {@link ReviewRequest.source}. */
86
+ offset: number;
87
+ }
88
+ /** Identifies the document under review. */
89
+ interface ReviewDocumentRef {
90
+ articleId: string;
91
+ fileName?: string;
92
+ }
93
+ interface ReviewRequest {
94
+ /** The whole document, for a provider that wants surrounding context. */
95
+ source: string;
96
+ blocks: readonly ReviewBlockInput[];
97
+ /**
98
+ * Blocks changed since this provider's last pass, when the editor knows.
99
+ *
100
+ * A hint, not a restriction: a cheap provider may ignore it and re-scan
101
+ * everything, while an expensive one can review only what moved. Absent on
102
+ * a first pass.
103
+ */
104
+ changedBlockKeys?: readonly number[];
105
+ language?: 'plaintext' | 'markdown';
106
+ documentRef: ReviewDocumentRef;
107
+ }
108
+ /**
109
+ * Progress from one provider pass.
110
+ *
111
+ * `findings` is additive and may arrive many times: a reviewer that takes
112
+ * seconds per block should show its first result immediately rather than
113
+ * holding everything until the last block returns.
114
+ */
115
+ type ReviewEvent = {
116
+ type: 'findings';
117
+ findings: readonly ReviewFinding[];
118
+ } | {
119
+ type: 'progress';
120
+ blockKey: number;
121
+ } | {
122
+ type: 'done';
123
+ } | {
124
+ type: 'error';
125
+ message: string;
126
+ };
127
+ /** The provider id the editor adapts harper under. */
128
+ declare const PROOFING_REVIEW_SOURCE = "harper";
129
+ /**
130
+ * Adapt one proofing finding into a review finding.
131
+ *
132
+ * `offset` shifts engine-relative offsets into document coordinates, for a
133
+ * provider that linted a block or a joined run rather than the whole source.
134
+ */
135
+ declare function proofFindingToReviewFinding(finding: ProofFinding, options?: {
136
+ source?: string;
137
+ offset?: number;
138
+ blockKey?: number;
139
+ }): ReviewFinding;
140
+
141
+ export { PROOFING_REVIEW_SOURCE, type ReviewBlockInput, type ReviewDocumentRef, type ReviewEvent, type ReviewFinding, type ReviewRequest, type ReviewSeverity, type ReviewSuggestion, type ReviewSuggestionKind, proofFindingToReviewFinding };
@@ -0,0 +1,29 @@
1
+ // src/review/types.ts
2
+ var PROOF_SEVERITY = Object.freeze({
3
+ spelling: "error",
4
+ grammar: "warning",
5
+ style: "suggestion"
6
+ });
7
+ var PROOFING_REVIEW_SOURCE = "harper";
8
+ function proofFindingToReviewFinding(finding, options = {}) {
9
+ const offset = options.offset ?? 0;
10
+ return {
11
+ id: finding.id,
12
+ source: options.source ?? PROOFING_REVIEW_SOURCE,
13
+ start: finding.start + offset,
14
+ end: finding.end + offset,
15
+ ...options.blockKey === void 0 ? {} : { blockKey: options.blockKey },
16
+ severity: PROOF_SEVERITY[finding.category],
17
+ category: finding.category,
18
+ message: finding.message,
19
+ originalText: finding.originalText,
20
+ suggestions: finding.suggestions.map((suggestion) => ({
21
+ text: suggestion.text,
22
+ kind: suggestion.kind
23
+ }))
24
+ };
25
+ }
26
+ export {
27
+ PROOFING_REVIEW_SOURCE,
28
+ proofFindingToReviewFinding
29
+ };
@@ -1,10 +1,10 @@
1
1
  export { B as BoundingBox, C as Coordinates } from '../Types-sh2VRxfo.js';
2
- import { O as Doc, bh as Theme, bk as ThemePageStyle, bj as ThemeColorScheme, I as DeepPartial, bn as ThemeSeedColors, bi as ThemeColorPalette, X as FontFamilyKind, W as FontFamily } from '../Doc-Dy6o3neL.js';
3
- export { A as AccentImage, a as AccentPosition, b as AmbientGradientConfig, c as Animation, d as AnimationType, e as AreaChartInput, f as AudioBookmark, g as AudioSegment, h as AudioTimingData, i as AudioTrack, B as BarChartInput, j as BigTextInput, k as Block, l as BlockConnection, m as BorderStyle, C as CaptionPhrase, n as CaptionTrack, o as CaptionWord, p as ChartBaseFields, q as ChartTemplateInput, r as ColorScheme, s as ColumnChartInput, t as ComparisonBarInput, u as ContentBlockInput, v as CornerBrandingConfig, w as CustomTemplateDefinition, x as CustomTemplateLayer, y as CustomTemplateValidationError, z as CustomTemplateValidationResult, D as DARK_SURFACE, E as DEFAULT_DOC_FONT, F as DEFAULT_TITLE_FONT, G as DataTableInput, H as DateEventInput, J as DefinitionCardInput, K as DiagramBlockInput, L as DiagramEdgeAnchor, M as DiagramTemplateEdge, N as DiagramTemplateNode, P as DocBlock, Q as DocDiagnostic, R as DonutChartInput, S as DrawingBlockInput, T as FRONTMATTER_CUSTOM_TEMPLATES_KEY, U as FRONTMATTER_CUSTOM_THEMES_KEY, V as FactCardInput, Y as FullBleedQuoteInput, Z as GradientBackgroundConfig, _ as ImageBackgroundConfig, $ as ImageLayer, a0 as ImageTreatment, a1 as ImageWithCaptionInput, a2 as LIGHT_SURFACE, a3 as Layer, a4 as LayerRepeat, a5 as LayoutHints, a6 as LeftFeatureInput, a7 as LineChartInput, a8 as LinearGradient, a9 as ListBlockInput, aa as MapBlockInput, ab as MapLayer, ac as MapMarker, ad as MapTileStyle, ae as MarkerStyle, af as MediaClip, ag as MediaScheduleOptions, ah as MermaidLayer, ai as PAGE_ACCENT_STRATEGIES, aj as PAGE_BACKGROUNDS, ak as PAGE_BACKGROUND_RHYTHMS, al as PAGE_DESIGN_FAMILIES, am as PAGE_DIVIDERS, an as PAGE_EMPHASES, ao as PAGE_EYEBROWS, ap as PAGE_HEADING_CASES, aq as PAGE_HEADING_SCALES, ar as PAGE_HEADING_UNDERLINES, as as PAGE_HERO_STYLES, at as PAGE_IMAGE_FRAMINGS, au as PAGE_NUMERAL_STYLES, av as PAGE_PATTERNS, aw as PAGE_QUOTE_MARKS, ax as PAGE_SECTION_KINDS, ay as PAGE_SECTION_SPACINGS, az as PAGE_SHADOWS, aA as PageAccentRotation, aB as PageBackground, aC as PageDesignFamily, aD as PageEmphasis, aE as PageHeadingTreatment, aF as PageSectionKind, aG as PageSectionOverride, aH as PageTokens, aI as PathLayer, aJ as PatternBackgroundConfig, aK as PersistentLayer, aL as PersistentLayerConfig, aM as PersistentLayerTemplate, aN as PersistentLayerTemplateConfig, aO as PersistentLayerTemplateType, aP as PhotoGridInput, aQ as PieChartInput, aR as PipStyle, aS as Position, aT as ProgressIndicatorConfig, aU as PromotedBodyAnnotation, aV as PullQuoteInput, aW as QuoteBlockInput, aX as RawLayersInput, aY as RenderStyle, aZ as RightFeatureInput, a_ as ScatterChartInput, a$ as ScheduledClip, b0 as SectionHeaderInput, b1 as ShapeFilter, b2 as ShapeLayer, b3 as ShapePattern, b4 as SolidBackgroundConfig, b5 as StartBlockConfig, b6 as StatHighlightInput, b7 as SurfaceScheme, b8 as THEME_SCHEMA_VERSION, b9 as TableLayer, ba as TableLayerStyle, bb as TemplateBlock, bc as TemplateContext, bd as TemplateFunction, be as TemplateRegistry, bf as TextLayer, bg as TextStyle, bl as ThemeRegistry, bm as ThemeSchemaVersion, bo as ThemeStyle, bp as ThemeTypography, bq as TimelineBlockInput, br as TimelineTemplateEvent, bs as TimelineTemplateLink, bt as TimelineTemplateTrack, bu as TitleBlockInput, bv as TitleCaptionConfig, bw as TranscriptBlockInput, bx as TreeBlockInput, by as TreeLayer, bz as TreeLayerItem, bA as TreeLayerStyle, bB as TreeTemplateItem, bC as TwoColumnInput, bD as VIEWPORT_PRESETS, bE as VideoLayer, bF as VideoPipPosition, bG as VideoPipShape, bH as VideoPipSize, bI as VideoPlacement, bJ as VideoPresentation, bK as VideoPullQuoteInput, bL as VideoWithCaptionInput, bM as ViewportConfig, bN as ViewportOrientation, bO as ViewportPreset, bP as VignetteConfig, bQ as applySurface, bR as calculateDuration, bS as calculateFontScale, bT as createTemplateContext, bU as createTheme, bV as createThemeRegistry, bW as getAspectRatioString, bX as getBlockAtTime, bY as getCaptionAtTime, bZ as getDocPlaybackDuration, b_ as getLayoutHints, b$ as getSafeTextBounds, c0 as getSegmentAtTime, c1 as getTwoColumnPositions, c2 as getViewport, c3 as getViewportOrientation, c4 as isCustomTemplateDefinition, c5 as isPersistentLayerTemplate, c6 as isTemplateBlock, c7 as layoutScaledFontSize, c8 as resolveMediaSchedule, c9 as scaledFontSize, ca as validateCustomTemplateDefinition } from '../Doc-Dy6o3neL.js';
2
+ import { O as Doc, bh as Theme, bk as ThemePageStyle, bj as ThemeColorScheme, I as DeepPartial, bn as ThemeSeedColors, bi as ThemeColorPalette, X as FontFamilyKind, W as FontFamily } from '../Doc-BkxT7G80.js';
3
+ export { A as AccentImage, a as AccentPosition, b as AmbientGradientConfig, c as Animation, d as AnimationType, e as AreaChartInput, f as AudioBookmark, g as AudioSegment, h as AudioTimingData, i as AudioTrack, B as BarChartInput, j as BigTextInput, k as Block, l as BlockConnection, m as BorderStyle, C as CaptionPhrase, n as CaptionTrack, o as CaptionWord, p as ChartBaseFields, q as ChartTemplateInput, r as ColorScheme, s as ColumnChartInput, t as ComparisonBarInput, u as ContentBlockInput, v as CornerBrandingConfig, w as CustomTemplateDefinition, x as CustomTemplateLayer, y as CustomTemplateValidationError, z as CustomTemplateValidationResult, D as DARK_SURFACE, E as DEFAULT_DOC_FONT, F as DEFAULT_TITLE_FONT, G as DataTableInput, H as DateEventInput, J as DefinitionCardInput, K as DiagramBlockInput, L as DiagramEdgeAnchor, M as DiagramTemplateEdge, N as DiagramTemplateNode, P as DocBlock, Q as DocDiagnostic, R as DonutChartInput, S as DrawingBlockInput, T as FRONTMATTER_CUSTOM_TEMPLATES_KEY, U as FRONTMATTER_CUSTOM_THEMES_KEY, V as FactCardInput, Y as FullBleedQuoteInput, Z as GradientBackgroundConfig, _ as ImageBackgroundConfig, $ as ImageLayer, a0 as ImageTreatment, a1 as ImageWithCaptionInput, a2 as LIGHT_SURFACE, a3 as Layer, a4 as LayerRepeat, a5 as LayoutHints, a6 as LeftFeatureInput, a7 as LineChartInput, a8 as LinearGradient, a9 as ListBlockInput, aa as MapBlockInput, ab as MapLayer, ac as MapMarker, ad as MapTileStyle, ae as MarkerStyle, af as MediaClip, ag as MediaScheduleOptions, ah as MermaidLayer, ai as PAGE_ACCENT_STRATEGIES, aj as PAGE_BACKGROUNDS, ak as PAGE_BACKGROUND_RHYTHMS, al as PAGE_DESIGN_FAMILIES, am as PAGE_DIVIDERS, an as PAGE_EMPHASES, ao as PAGE_EYEBROWS, ap as PAGE_HEADING_CASES, aq as PAGE_HEADING_SCALES, ar as PAGE_HEADING_UNDERLINES, as as PAGE_HERO_STYLES, at as PAGE_IMAGE_FRAMINGS, au as PAGE_NUMERAL_STYLES, av as PAGE_PATTERNS, aw as PAGE_QUOTE_MARKS, ax as PAGE_SECTION_KINDS, ay as PAGE_SECTION_SPACINGS, az as PAGE_SHADOWS, aA as PageAccentRotation, aB as PageBackground, aC as PageDesignFamily, aD as PageEmphasis, aE as PageHeadingTreatment, aF as PageSectionKind, aG as PageSectionOverride, aH as PageTokens, aI as PathLayer, aJ as PatternBackgroundConfig, aK as PersistentLayer, aL as PersistentLayerConfig, aM as PersistentLayerTemplate, aN as PersistentLayerTemplateConfig, aO as PersistentLayerTemplateType, aP as PhotoGridInput, aQ as PieChartInput, aR as PipStyle, aS as Position, aT as ProgressIndicatorConfig, aU as PromotedBodyAnnotation, aV as PullQuoteInput, aW as QuoteBlockInput, aX as RawLayersInput, aY as RenderStyle, aZ as RightFeatureInput, a_ as ScatterChartInput, a$ as ScheduledClip, b0 as SectionHeaderInput, b1 as ShapeFilter, b2 as ShapeLayer, b3 as ShapePattern, b4 as SolidBackgroundConfig, b5 as StartBlockConfig, b6 as StatHighlightInput, b7 as SurfaceScheme, b8 as THEME_SCHEMA_VERSION, b9 as TableLayer, ba as TableLayerStyle, bb as TemplateBlock, bc as TemplateContext, bd as TemplateFunction, be as TemplateRegistry, bf as TextLayer, bg as TextStyle, bl as ThemeRegistry, bm as ThemeSchemaVersion, bo as ThemeStyle, bp as ThemeTypography, bq as TimelineBlockInput, br as TimelineTemplateEvent, bs as TimelineTemplateLink, bt as TimelineTemplateTrack, bu as TitleBlockInput, bv as TitleCaptionConfig, bw as TranscriptBlockInput, bx as TreeBlockInput, by as TreeLayer, bz as TreeLayerItem, bA as TreeLayerStyle, bB as TreeTemplateItem, bC as TwoColumnInput, bD as VIEWPORT_PRESETS, bE as VideoLayer, bF as VideoPipPosition, bG as VideoPipShape, bH as VideoPipSize, bI as VideoPlacement, bJ as VideoPresentation, bK as VideoPullQuoteInput, bL as VideoWithCaptionInput, bM as ViewportConfig, bN as ViewportOrientation, bO as ViewportPreset, bP as VignetteConfig, bQ as applySurface, bR as calculateDuration, bS as calculateFontScale, bT as createTemplateContext, bU as createTheme, bV as createThemeRegistry, bW as getAspectRatioString, bX as getBlockAtTime, bY as getCaptionAtTime, bZ as getDocPlaybackDuration, b_ as getLayoutHints, b$ as getSafeTextBounds, c0 as getSegmentAtTime, c1 as getTwoColumnPositions, c2 as getViewport, c3 as getViewportOrientation, c4 as isCustomTemplateDefinition, c5 as isPersistentLayerTemplate, c6 as isTemplateBlock, c7 as layoutScaledFontSize, c8 as resolveMediaSchedule, c9 as scaledFontSize, ca as validateCustomTemplateDefinition } from '../Doc-BkxT7G80.js';
4
4
  export { a as DEFAULT_TRANSITION_DURATION_SECONDS, a1 as TRANSITION_DIRECTIONS, a2 as TRANSITION_TYPES, a3 as Transition, a4 as TransitionDirection, a5 as TransitionType, a8 as isTransitionType, a9 as normalizeTransitionDirection, aa as normalizeTransitionType, ab as resolveBlockTransition, ad as resolveTransitionDuration } from '../types-Be6sBUBx.js';
5
- export { D as DEFAULT_THEME, a as DEFAULT_THEME_ID, T as THEMES, g as getAvailableThemes, b as getThemeSummaries, r as resolveTheme } from '../themeLibrary-i8f6QydX.js';
5
+ export { D as DEFAULT_THEME, a as DEFAULT_THEME_ID, T as THEMES, g as getAvailableThemes, b as getThemeSummaries, r as resolveTheme } from '../themeLibrary-BbSjnGmd.js';
6
6
  export { M as MediaEntry, a as MediaProvider } from '../MediaProvider-wpSe21B3.js';
7
- export { E as EditorLayerMeta, I as ImageEditCanvas, a as ImageEditDoc, b as ImageEditLayer, c as ImageEditLayerKind, d as ImageEditMeta } from '../ImageEditDoc-iIG0_ea6.js';
7
+ export { E as EditorLayerMeta, I as ImageEditCanvas, a as ImageEditDoc, b as ImageEditLayer, c as ImageEditLayerKind, d as ImageEditMeta } from '../ImageEditDoc-C8ZB54Vv.js';
8
8
 
9
9
  /**
10
10
  * Runtime validation for the canonical {@link Doc} JSON shape.
@@ -1,4 +1,4 @@
1
- import { bh as Theme, bl as ThemeRegistry } from './Doc-Dy6o3neL.js';
1
+ import { bh as Theme, bl as ThemeRegistry } from './Doc-BkxT7G80.js';
2
2
 
3
3
  /**
4
4
  * Built-in Theme Library
@@ -1,5 +1,5 @@
1
- import { r as ColorScheme, O as Doc, k as Block } from '../Doc-Dy6o3neL.js';
2
- import { i as PageTransformHints } from '../materializePageSection-BEegGWnv.js';
1
+ import { r as ColorScheme, O as Doc, k as Block } from '../Doc-BkxT7G80.js';
2
+ import { i as PageTransformHints } from '../materializePageSection-Dp2aHFbc.js';
3
3
  import { d as ExtractionType, E as ExtractedElement, b as ExtractionOptions } from '../contentExtractor-BNfVJV2U.js';
4
4
  import '../types-Be6sBUBx.js';
5
5
 
@@ -7,10 +7,10 @@ import {
7
7
  getTransformStyleIds,
8
8
  getTransformStyleSummaries,
9
9
  resolveTransformStyle
10
- } from "../chunk-AE3IUKMM.js";
10
+ } from "../chunk-ZSU5DJLX.js";
11
11
  import "../chunk-NKNMGIIN.js";
12
12
  import "../chunk-BAOV476U.js";
13
- import "../chunk-O7JILDEF.js";
13
+ import "../chunk-X7BNDUNI.js";
14
14
  import "../chunk-67L6WRJN.js";
15
15
  import "../chunk-XRW6P7IF.js";
16
16
  export {
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Plain-data types for the proofing (grammar + spellcheck) pipeline.
3
+ *
4
+ * These types are engine-agnostic: an editor host adapts a concrete
5
+ * engine (harper.js, a service, a test fake) to produce `ProofFinding`s,
6
+ * while this module stays pure and dependency-free so the mapping and
7
+ * masking helpers can run in Node tests and any consumer bundle.
8
+ */
9
+ /** Severity/color tier of a finding: red, green, or blue squiggle. */
10
+ type ProofCategory = 'spelling' | 'grammar' | 'style';
11
+ /** How a suggestion is applied relative to the finding's span. */
12
+ type ProofSuggestionKind = 'replace' | 'remove' | 'insertAfter';
13
+ /** One candidate fix for a finding. */
14
+ interface ProofSuggestion {
15
+ /** Replacement/insertion text (empty for `remove`). */
16
+ text: string;
17
+ kind: ProofSuggestionKind;
18
+ }
19
+ /** A half-open `[start, end)` range in UTF-16 code units. */
20
+ interface ProofRange {
21
+ start: number;
22
+ end: number;
23
+ }
24
+ /**
25
+ * One issue found in a linted text. Offsets index into the exact string
26
+ * that was linted (UTF-16 code units — the same coordinate space as
27
+ * ProseMirror, Monaco, and DOM Range).
28
+ */
29
+ interface ProofFinding extends ProofRange {
30
+ /** Stable within one lint pass; the provider maps id → engine handle. */
31
+ id: string;
32
+ category: ProofCategory;
33
+ /** Raw engine kind (e.g. `Typo`), for diagnostics and future filtering. */
34
+ kind: string;
35
+ /** Human-readable description of the issue. */
36
+ message: string;
37
+ /** Text at `[start, end)` when linted — staleness check before applying. */
38
+ originalText: string;
39
+ suggestions: ProofSuggestion[];
40
+ }
41
+ /** English dialects supported by the proofing engine. */
42
+ type ProofDialect = 'American' | 'British' | 'Australian' | 'Canadian' | 'Indian';
43
+ /** All supported dialects, in display order. */
44
+ declare const PROOF_DIALECTS: readonly ProofDialect[];
45
+
46
+ export { PROOF_DIALECTS as P, type ProofCategory as a, type ProofDialect as b, type ProofFinding as c, type ProofRange as d, type ProofSuggestion as e, type ProofSuggestionKind as f };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bendyline/squisq",
3
- "version": "2.11.3",
3
+ "version": "2.11.5",
4
4
  "description": "Headless utilities for doc/block rendering, spatial math, Markdown, and storage",
5
5
  "license": "MIT",
6
6
  "author": "Bendyline",
@@ -132,6 +132,11 @@
132
132
  "import": "./dist/proof/index.js",
133
133
  "default": "./dist/proof/index.js"
134
134
  },
135
+ "./review": {
136
+ "types": "./dist/review/index.d.ts",
137
+ "import": "./dist/review/index.js",
138
+ "default": "./dist/review/index.js"
139
+ },
135
140
  "./table": {
136
141
  "types": "./dist/table/index.d.ts",
137
142
  "import": "./dist/table/index.js",