@lostgradient/cinder 0.16.1 → 0.17.0
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/CHANGELOG.md +185 -0
- package/README.md +33 -11
- package/components.json +53 -102
- package/dist/_internal/chart/chart-utilities.d.ts +1 -0
- package/dist/cli/index.js +63 -10
- package/dist/cli/mcp-dependencies.d.ts +4 -0
- package/dist/components/approval-card/approval-card.css +1 -6
- package/dist/components/approval-card/index.js +94 -55
- package/dist/components/area-chart/index.js +40 -6
- package/dist/components/bar-chart/index.js +132 -83
- package/dist/components/code-block/index.js +58 -9
- package/dist/components/command-menu/command-menu.css +9 -0
- package/dist/components/command-menu/index.js +7 -2
- package/dist/components/diff-statistics/diff-statistics.svelte.d.ts +3 -3
- package/dist/components/file-upload/file-upload.schema.js +5 -1
- package/dist/components/file-upload/file-upload.types.d.ts +2 -0
- package/dist/components/file-upload/index.js +37 -27
- package/dist/components/invocation-rule-builder/index.d.ts +1 -1
- package/dist/components/invocation-rule-builder/index.js +244 -199
- package/dist/components/invocation-rule-builder/invocation-rule-builder.css +8 -0
- package/dist/components/invocation-rule-builder/invocation-rule-builder.schema.d.ts +2 -2
- package/dist/components/invocation-rule-builder/invocation-rule-builder.schema.js +309 -193
- package/dist/components/invocation-rule-builder/invocation-rule-builder.svelte.d.ts +3 -2
- package/dist/components/invocation-rule-builder/invocation-rule-builder.types.d.ts +98 -31
- package/dist/components/json-editor/index.d.ts +5 -0
- package/dist/components/json-editor/index.js +261 -0
- package/dist/components/json-editor/json-editor.css +49 -0
- package/dist/components/{diff-viewer/diff-viewer.schema.js → json-editor/json-editor.schema.js} +37 -49
- package/dist/components/json-editor/json-editor.svelte.d.ts +21 -0
- package/dist/components/json-editor/json-editor.types.d.ts +25 -0
- package/dist/components/{diff-viewer/diff-viewer.variables.js → json-editor/json-editor.variables.js} +4 -4
- package/dist/components/json-schema-editor/index.js +2041 -4165
- package/dist/components/json-schema-editor/json-schema-editor-state.svelte.d.ts +17 -1
- package/dist/components/json-schema-editor/json-schema-editor-types.d.ts +8 -1
- package/dist/components/json-schema-editor/json-schema-editor.css +35 -0
- package/dist/components/json-schema-editor/json-schema-editor.svelte.d.ts +0 -1
- package/dist/components/json-schema-editor/json-schema-validator.d.ts +9 -4
- package/dist/components/line-chart/index.js +40 -6
- package/dist/components/matrix-chart/index.js +40 -6
- package/dist/components/payload-inspector/index.js +10 -2
- package/dist/components/payload-inspector/payload-inspector.schema.js +11 -1
- package/dist/components/payload-inspector/payload-inspector.types.d.ts +20 -0
- package/dist/components/run-step-timeline/index.js +158 -110
- package/dist/components/run-step-timeline/run-step-timeline.css +46 -0
- package/dist/components/run-step-timeline/run-step-timeline.schema.js +26 -1
- package/dist/components/run-step-timeline/run-step-timeline.types.d.ts +22 -2
- package/dist/components/schedule-builder/index.js +165 -93
- package/dist/components/schedule-builder/schedule-builder.schema.js +8 -1
- package/dist/components/schedule-builder/schedule-builder.svelte.d.ts +1 -1
- package/dist/components/schedule-builder/schedule-builder.types.d.ts +12 -0
- package/dist/components/schema-form/index.d.ts +1 -1
- package/dist/components/schema-form/index.js +107 -25
- package/dist/components/schema-form/schema-form.schema.js +9 -1
- package/dist/components/schema-form/schema-form.svelte.d.ts +1 -1
- package/dist/components/schema-form/schema-form.types.d.ts +8 -0
- package/dist/components/sidebar/index.js +93 -42
- package/dist/components/sidebar/sidebar.css +7 -16
- package/dist/components/sidebar/sidebar.schema.js +8 -9
- package/dist/components/sidebar/sidebar.types.d.ts +14 -12
- package/dist/components/source-diff-viewer/source-diff-viewer.svelte.d.ts +2 -2
- package/dist/components/spectrogram/index.js +40 -6
- package/dist/components/spectrum-chart/index.js +40 -6
- package/dist/components/tabs/tabs.css +2 -0
- package/dist/components/textarea/textarea.svelte.d.ts +1 -1
- package/dist/components/toast-region/index.js +2 -2
- package/dist/components/toast-region/toast-region.css +1 -1
- package/dist/components/waveform/index.js +40 -6
- package/dist/highlighters/shiki/index.d.ts +47 -5
- package/dist/highlighters/shiki/index.js +58 -9
- package/dist/index.d.ts +4 -4
- package/dist/index.js +15347 -16138
- package/dist/server/components/access-gate/index.js +2 -5
- package/dist/server/components/approval-card/index.js +2 -2
- package/dist/server/components/area-chart/index.js +3 -3
- package/dist/server/components/bar-chart/index.js +3 -3
- package/dist/server/components/command-menu/index.js +1 -1
- package/dist/server/components/context-menu/index.js +5 -5
- package/dist/server/components/data-table/index.js +2 -2
- package/dist/server/components/diff-statistics/index.js +3 -5
- package/dist/server/components/dropdown/index.js +6 -7
- package/dist/server/components/file-upload/index.js +2 -3
- package/dist/server/components/icons/index.js +17 -26
- package/dist/server/components/inline-loading/index.js +1 -1
- package/dist/server/components/invocation-rule-builder/index.js +1 -1
- package/dist/server/components/json-editor/index.js +13 -0
- package/dist/server/components/json-schema-editor/index.js +4 -16
- package/dist/server/components/line-chart/index.js +3 -3
- package/dist/server/components/matrix-chart/index.js +2 -2
- package/dist/server/components/menu-bar/index.js +4 -4
- package/dist/server/components/payload-inspector/index.js +2 -2
- package/dist/server/components/run-step-timeline/index.js +1 -1
- package/dist/server/components/schedule-builder/index.js +3 -3
- package/dist/server/components/schema-form/index.js +1 -1
- package/dist/server/components/selection-popover/index.js +3 -5
- package/dist/server/components/sidebar/index.js +1 -1
- package/dist/server/components/spectrogram/index.js +2 -2
- package/dist/server/components/spectrum-chart/index.js +2 -2
- package/dist/server/components/surface/index.js +3 -5
- package/dist/server/components/table/index.js +2 -2
- package/dist/server/components/tabs/index.js +5 -5
- package/dist/server/components/toast-region/index.js +1 -1
- package/dist/server/components/toolbar/index.js +2 -3
- package/dist/server/components/waveform/index.js +2 -2
- package/dist/server/highlighters/shiki/index.js +61 -25
- package/dist/server/index.js +105 -115
- package/dist/server/{index.server-7yfz2t73.js → index.server-003t81xk.js} +1 -1
- package/dist/server/{index.server-gwgm8gqg.js → index.server-032p855q.js} +4 -4
- package/dist/server/{index.server-tf2n3ccm.js → index.server-1vfhzhkj.js} +1 -1
- package/dist/server/{index.server-jz5yxwde.js → index.server-4cbqjf14.js} +16 -7
- package/dist/server/{index.server-aqethy0w.js → index.server-66nm5gd5.js} +102 -26
- package/dist/server/{index.server-m0ezemav.js → index.server-6mnbznbt.js} +4 -2
- package/dist/server/{index.server-1nq8h5yb.js → index.server-6vbpz6dd.js} +40 -6
- package/dist/server/{index.server-796hb0r8.js → index.server-7qak74fg.js} +1 -1
- package/dist/server/{index.server-5exh7rmw.js → index.server-7ygdwxre.js} +57 -5
- package/dist/server/{index.server-q1d48s9t.js → index.server-8c6cck0y.js} +6 -4
- package/dist/server/index.server-93vt8ktj.js +95 -0
- package/dist/server/{index.server-ep81fn23.js → index.server-9eccb2fc.js} +2 -2
- package/dist/server/{index.server-zncgb7mw.js → index.server-9nac5z11.js} +92 -49
- package/dist/server/{index.server-bf7d81b4.js → index.server-9vqfmhez.js} +16 -18
- package/dist/server/{index.server-nt304e00.js → index.server-dx58qant.js} +1 -1
- package/dist/server/{index.server-zh3r8vfd.js → index.server-fhrqsg97.js} +1 -1
- package/dist/server/{index.server-dq0k0qf6.js → index.server-geq56xaz.js} +10 -10
- package/dist/server/{index.server-51sxnete.js → index.server-hxveaqg1.js} +10 -10
- package/dist/server/{index.server-c5qv3p61.js → index.server-j87v28yy.js} +59 -30
- package/dist/server/{index.server-s5g7reqp.js → index.server-mewms9dg.js} +2 -2
- package/dist/server/index.server-mm728d0w.js +20 -0
- package/dist/server/{index.server-5mc2vsy0.js → index.server-n0rbn5yf.js} +4 -2
- package/dist/server/{index.server-qv0kkre4.js → index.server-ng8y854r.js} +188 -107
- package/dist/server/{index.server-wasj5rbh.js → index.server-q5gvb174.js} +4 -4
- package/dist/server/{index.server-g5jgq3jp.js → index.server-qxneqxf8.js} +40 -6
- package/dist/server/{index.server-x1dha7bk.js → index.server-rnddtcb3.js} +4 -2
- package/dist/server/{index.server-7zpzspk6.js → index.server-s4wm4g2a.js} +30 -2
- package/dist/server/index.server-szgghcdh.js +887 -0
- package/dist/server/{index.server-thcda9ny.js → index.server-vd302sxz.js} +11 -4
- package/dist/server/{index.server-3sq9d73w.js → index.server-vz9hqkdq.js} +2 -2
- package/dist/server/{index.server-mvjzcna5.js → index.server-wg6ddzpa.js} +42 -20
- package/dist/server/{index.server-67q8dmbp.js → index.server-y2ncgt7p.js} +1 -1
- package/dist/server/{index.server-4x91gzy1.js → index.server-yqhww50r.js} +4 -4
- package/dist/server/{index.server-7798gc22.js → index.server-zfx4magq.js} +4 -2
- package/package.json +45 -288
- package/src/_internal/chart/chart-utilities.ts +74 -5
- package/src/components/approval-card/approval-card-actions.svelte +12 -28
- package/src/components/approval-card/approval-card.css +1 -6
- package/src/components/bar-chart/bar-chart.examples.json +1 -1
- package/src/components/bar-chart/bar-chart.svelte +3 -1
- package/src/components/command-menu/command-menu.css +9 -0
- package/src/components/command-menu/command-menu.svelte +9 -2
- package/src/components/file-upload/file-upload.schema.json +4 -0
- package/src/components/file-upload/file-upload.schema.ts +4 -0
- package/src/components/file-upload/file-upload.svelte +3 -3
- package/src/components/file-upload/file-upload.types.ts +2 -0
- package/src/components/invocation-rule-builder/index.ts +1 -0
- package/src/components/invocation-rule-builder/invocation-rule-builder.css +8 -0
- package/src/components/invocation-rule-builder/invocation-rule-builder.examples.json +6 -0
- package/src/components/invocation-rule-builder/invocation-rule-builder.schema.json +70 -7
- package/src/components/invocation-rule-builder/invocation-rule-builder.schema.ts +5 -250
- package/src/components/invocation-rule-builder/invocation-rule-builder.svelte +106 -83
- package/src/components/invocation-rule-builder/invocation-rule-builder.types.ts +145 -62
- package/src/components/json-editor/index.ts +6 -0
- package/src/components/json-editor/json-editor.css +49 -0
- package/src/components/json-editor/json-editor.examples.json +13 -0
- package/src/components/json-editor/json-editor.schema.json +57 -0
- package/src/components/json-editor/json-editor.schema.ts +62 -0
- package/src/components/json-editor/json-editor.svelte +104 -0
- package/src/components/json-editor/json-editor.types.ts +29 -0
- package/src/components/json-schema-editor/diff-view.svelte +26 -8
- package/src/components/json-schema-editor/form-view.svelte +1 -1
- package/src/components/json-schema-editor/json-schema-editor-state.svelte.ts +163 -56
- package/src/components/json-schema-editor/json-schema-editor-types.ts +8 -1
- package/src/components/json-schema-editor/json-schema-editor.css +35 -0
- package/src/components/json-schema-editor/json-schema-validator.ts +59 -25
- package/src/components/json-schema-editor/json-view.svelte +52 -18
- package/src/components/payload-inspector/payload-inspector.schema.json +8 -0
- package/src/components/payload-inspector/payload-inspector.schema.ts +10 -0
- package/src/components/payload-inspector/payload-inspector.svelte +2 -2
- package/src/components/payload-inspector/payload-inspector.types.ts +20 -0
- package/src/components/run-step-timeline/run-step-timeline.css +46 -0
- package/src/components/run-step-timeline/run-step-timeline.examples.json +3 -3
- package/src/components/run-step-timeline/run-step-timeline.schema.json +24 -0
- package/src/components/run-step-timeline/run-step-timeline.schema.ts +26 -0
- package/src/components/run-step-timeline/run-step-timeline.svelte +41 -4
- package/src/components/run-step-timeline/run-step-timeline.types.ts +22 -1
- package/src/components/run-step-timeline/run-step-timeline.utilities.ts +9 -1
- package/src/components/schedule-builder/schedule-builder.schema.json +7 -0
- package/src/components/schedule-builder/schedule-builder.schema.ts +8 -0
- package/src/components/schedule-builder/schedule-builder.svelte +94 -22
- package/src/components/schedule-builder/schedule-builder.types.ts +12 -0
- package/src/components/schema-form/index.ts +1 -0
- package/src/components/schema-form/schema-form-body.svelte +94 -17
- package/src/components/schema-form/schema-form.examples.json +1 -1
- package/src/components/schema-form/schema-form.schema.json +5 -0
- package/src/components/schema-form/schema-form.schema.ts +6 -0
- package/src/components/schema-form/schema-form.svelte +4 -0
- package/src/components/schema-form/schema-form.types.ts +9 -0
- package/src/components/side-navigation/side-navigation.examples.json +1 -1
- package/src/components/sidebar/sidebar.css +7 -16
- package/src/components/sidebar/sidebar.examples.json +3 -3
- package/src/components/sidebar/sidebar.schema.json +7 -8
- package/src/components/sidebar/sidebar.schema.ts +8 -8
- package/src/components/sidebar/sidebar.svelte +65 -27
- package/src/components/sidebar/sidebar.types.ts +14 -12
- package/src/components/tabs/tabs.css +2 -0
- package/src/components/toast-region/toast-region.css +1 -1
- package/src/components/toast-region/toast-region.examples.json +1 -1
- package/src/components/toast-region/toast-region.svelte +2 -2
- package/src/highlighters/shiki/index.ts +157 -17
- package/src/index.ts +5 -7
- package/src/styles/components.css +1 -1
- package/src/utilities/change-tracker.svelte.ts +1 -1
- package/dist/commentary/anchor-decorations.d.ts +0 -86
- package/dist/commentary/anchor-decorations.js +0 -490
- package/dist/commentary/anchoring.d.ts +0 -93
- package/dist/commentary/anchoring.js +0 -157
- package/dist/commentary/comments/index.d.ts +0 -12
- package/dist/commentary/comments/index.js +0 -14
- package/dist/commentary/comments/mentions.d.ts +0 -43
- package/dist/commentary/comments/mentions.js +0 -65
- package/dist/commentary/comments/reanchor.d.ts +0 -86
- package/dist/commentary/comments/reanchor.js +0 -220
- package/dist/commentary/comments/types.d.ts +0 -260
- package/dist/commentary/comments/types.js +0 -83
- package/dist/commentary/comments/updates.d.ts +0 -102
- package/dist/commentary/comments/updates.js +0 -226
- package/dist/commentary/export/comments-export.d.ts +0 -42
- package/dist/commentary/export/comments-export.js +0 -258
- package/dist/commentary/export/index.d.ts +0 -12
- package/dist/commentary/export/index.js +0 -12
- package/dist/commentary/export/markdown-summary.d.ts +0 -31
- package/dist/commentary/export/markdown-summary.js +0 -218
- package/dist/commentary/export/types.d.ts +0 -162
- package/dist/commentary/export/types.js +0 -7
- package/dist/commentary/export/unified-diff.d.ts +0 -28
- package/dist/commentary/export/unified-diff.js +0 -250
- package/dist/commentary/index.d.ts +0 -6
- package/dist/commentary/index.js +0 -6
- package/dist/commentary/session/index.d.ts +0 -12
- package/dist/commentary/session/index.js +0 -14
- package/dist/commentary/session/persistence.d.ts +0 -92
- package/dist/commentary/session/persistence.js +0 -253
- package/dist/commentary/session/types.d.ts +0 -208
- package/dist/commentary/session/types.js +0 -26
- package/dist/commentary/session/updates.d.ts +0 -155
- package/dist/commentary/session/updates.js +0 -362
- package/dist/commentary/shared/anchor-types.d.ts +0 -116
- package/dist/commentary/shared/anchor-types.js +0 -9
- package/dist/components/diff-viewer/diff-controller.svelte.d.ts +0 -75
- package/dist/components/diff-viewer/diff-front-matter.svelte.d.ts +0 -28
- package/dist/components/diff-viewer/diff-line.svelte.d.ts +0 -22
- package/dist/components/diff-viewer/diff-summary-bar.svelte.d.ts +0 -13
- package/dist/components/diff-viewer/diff-toolbar.svelte.d.ts +0 -36
- package/dist/components/diff-viewer/diff-viewer.svelte.d.ts +0 -22
- package/dist/components/diff-viewer/diff-viewer.types.d.ts +0 -53
- package/dist/components/diff-viewer/front-matter-header.svelte.d.ts +0 -26
- package/dist/components/diff-viewer/index.d.ts +0 -4
- package/dist/components/diff-viewer/index.js +0 -2848
- package/dist/components/markdown-editor/editor-skeleton.svelte.d.ts +0 -10
- package/dist/components/markdown-editor/editor-toolbar/editor-toolbar.svelte.d.ts +0 -37
- package/dist/components/markdown-editor/editor-toolbar/index.d.ts +0 -11
- package/dist/components/markdown-editor/editor-toolbar/link-popover.svelte.d.ts +0 -30
- package/dist/components/markdown-editor/editor-toolbar/toolbar-button.svelte.d.ts +0 -19
- package/dist/components/markdown-editor/editor-toolbar/toolbar-dropdown.svelte.d.ts +0 -24
- package/dist/components/markdown-editor/editor-toolbar/toolbar-separator.svelte.d.ts +0 -7
- package/dist/components/markdown-editor/editor-toolbar/types.d.ts +0 -13
- package/dist/components/markdown-editor/index.css +0 -61
- package/dist/components/markdown-editor/index.d.ts +0 -4
- package/dist/components/markdown-editor/index.js +0 -7494
- package/dist/components/markdown-editor/markdown-editor.schema.d.ts +0 -3
- package/dist/components/markdown-editor/markdown-editor.schema.js +0 -177
- package/dist/components/markdown-editor/markdown-editor.svelte.d.ts +0 -29
- package/dist/components/markdown-editor/markdown-editor.types.d.ts +0 -100
- package/dist/components/markdown-editor/markdown-editor.variables.d.ts +0 -2
- package/dist/components/markdown-editor/markdown-editor.variables.js +0 -61
- package/dist/components/review-editor/comment-composer.svelte.d.ts +0 -37
- package/dist/components/review-editor/comment-list.svelte.d.ts +0 -19
- package/dist/components/review-editor/comment-sidebar.svelte.d.ts +0 -22
- package/dist/components/review-editor/export-actions.svelte.d.ts +0 -18
- package/dist/components/review-editor/focus-navigation.d.ts +0 -105
- package/dist/components/review-editor/front-matter-fields.svelte.d.ts +0 -10
- package/dist/components/review-editor/index.d.ts +0 -20
- package/dist/components/review-editor/index.js +0 -14731
- package/dist/components/review-editor/live-region.svelte.d.ts +0 -23
- package/dist/components/review-editor/review-editor-anchors.svelte.d.ts +0 -96
- package/dist/components/review-editor/review-editor-controls.svelte.d.ts +0 -41
- package/dist/components/review-editor/review-editor-exports.d.ts +0 -80
- package/dist/components/review-editor/review-editor-front-matter.d.ts +0 -28
- package/dist/components/review-editor/review-editor-impl.svelte.d.ts +0 -31
- package/dist/components/review-editor/review-editor-selection-geometry.d.ts +0 -10
- package/dist/components/review-editor/review-editor-selection-types.d.ts +0 -62
- package/dist/components/review-editor/review-editor-selection.svelte.d.ts +0 -50
- package/dist/components/review-editor/review-editor-state.svelte.d.ts +0 -77
- package/dist/components/review-editor/review-editor-threads.svelte.d.ts +0 -137
- package/dist/components/review-editor/review-editor.css +0 -273
- package/dist/components/review-editor/review-editor.schema.d.ts +0 -3
- package/dist/components/review-editor/review-editor.schema.js +0 -143
- package/dist/components/review-editor/review-editor.svelte.d.ts +0 -19
- package/dist/components/review-editor/review-editor.types.d.ts +0 -77
- package/dist/components/review-editor/review-editor.variables.d.ts +0 -2
- package/dist/components/review-editor/review-editor.variables.js +0 -61
- package/dist/components/review-editor/thread-popover.svelte.d.ts +0 -32
- package/dist/diff/index.d.ts +0 -2
- package/dist/diff/index.js +0 -1
- package/dist/diff/line-diff.d.ts +0 -84
- package/dist/diff/line-diff.js +0 -372
- package/dist/diff/types.d.ts +0 -1
- package/dist/diff/types.js +0 -1
- package/dist/editor/attach.d.ts +0 -30
- package/dist/editor/attach.js +0 -86
- package/dist/editor/bridge.d.ts +0 -110
- package/dist/editor/bridge.js +0 -260
- package/dist/editor/clipboard.d.ts +0 -19
- package/dist/editor/clipboard.js +0 -189
- package/dist/editor/commands.d.ts +0 -167
- package/dist/editor/commands.js +0 -728
- package/dist/editor/component-runtime.d.ts +0 -21
- package/dist/editor/component-runtime.js +0 -20
- package/dist/editor/editor.d.ts +0 -23
- package/dist/editor/editor.js +0 -256
- package/dist/editor/index.d.ts +0 -30
- package/dist/editor/index.js +0 -42
- package/dist/editor/keymap-plugin.d.ts +0 -56
- package/dist/editor/keymap-plugin.js +0 -157
- package/dist/editor/link-input-rule.d.ts +0 -4
- package/dist/editor/link-input-rule.js +0 -26
- package/dist/editor/milkdown-plugin-runtime.d.ts +0 -20
- package/dist/editor/milkdown-plugin-runtime.js +0 -43
- package/dist/editor/placeholder-security.d.ts +0 -22
- package/dist/editor/placeholder-security.js +0 -36
- package/dist/editor/placeholder.d.ts +0 -14
- package/dist/editor/placeholder.js +0 -56
- package/dist/editor/sanitize-html.d.ts +0 -32
- package/dist/editor/sanitize-html.js +0 -111
- package/dist/editor/template-completion-plugin.d.ts +0 -159
- package/dist/editor/template-completion-plugin.js +0 -615
- package/dist/editor/template-invalid-decoration-plugin.d.ts +0 -73
- package/dist/editor/template-invalid-decoration-plugin.js +0 -155
- package/dist/editor/template-placeholders.d.ts +0 -96
- package/dist/editor/template-placeholders.js +0 -355
- package/dist/editor/template-position-utilities.d.ts +0 -34
- package/dist/editor/template-position-utilities.js +0 -63
- package/dist/editor/template-render.d.ts +0 -37
- package/dist/editor/template-render.js +0 -45
- package/dist/editor/test-utilities.d.ts +0 -49
- package/dist/editor/test-utilities.js +0 -93
- package/dist/editor/types.d.ts +0 -234
- package/dist/editor/types.js +0 -8
- package/dist/markdown/diff/compute.d.ts +0 -28
- package/dist/markdown/diff/compute.js +0 -250
- package/dist/markdown/diff/frontmatter.d.ts +0 -66
- package/dist/markdown/diff/frontmatter.js +0 -135
- package/dist/markdown/diff/index.d.ts +0 -27
- package/dist/markdown/diff/index.js +0 -28
- package/dist/markdown/diff/line-diff.d.ts +0 -2
- package/dist/markdown/diff/line-diff.js +0 -1
- package/dist/markdown/diff/positions.d.ts +0 -66
- package/dist/markdown/diff/positions.js +0 -147
- package/dist/markdown/diff/types.d.ts +0 -78
- package/dist/markdown/diff/types.js +0 -7
- package/dist/markdown/index.d.ts +0 -2
- package/dist/markdown/index.js +0 -8
- package/dist/markdown/pipeline/ast.d.ts +0 -302
- package/dist/markdown/pipeline/ast.js +0 -417
- package/dist/markdown/pipeline/errors.d.ts +0 -37
- package/dist/markdown/pipeline/errors.js +0 -49
- package/dist/markdown/pipeline/frontmatter.d.ts +0 -127
- package/dist/markdown/pipeline/frontmatter.js +0 -438
- package/dist/markdown/pipeline/index.d.ts +0 -37
- package/dist/markdown/pipeline/index.js +0 -40
- package/dist/markdown/pipeline/parser.d.ts +0 -65
- package/dist/markdown/pipeline/parser.js +0 -106
- package/dist/markdown/pipeline/serializer.d.ts +0 -67
- package/dist/markdown/pipeline/serializer.js +0 -78
- package/dist/markdown/pipeline/strip-positions.d.ts +0 -20
- package/dist/markdown/pipeline/strip-positions.js +0 -28
- package/dist/markdown/pipeline/types.d.ts +0 -116
- package/dist/markdown/pipeline/types.js +0 -8
- package/dist/markdown/rendering/extract-code-blocks.d.ts +0 -16
- package/dist/markdown/rendering/extract-code-blocks.js +0 -27
- package/dist/markdown/rendering/highlighter.d.ts +0 -109
- package/dist/markdown/rendering/highlighter.js +0 -251
- package/dist/markdown/rendering/index.d.ts +0 -41
- package/dist/markdown/rendering/index.js +0 -46
- package/dist/markdown/rendering/mermaid-cache.d.ts +0 -55
- package/dist/markdown/rendering/mermaid-cache.js +0 -123
- package/dist/markdown/rendering/rehype-shiki-sync.d.ts +0 -57
- package/dist/markdown/rendering/rehype-shiki-sync.js +0 -354
- package/dist/markdown/rendering/render-async.d.ts +0 -43
- package/dist/markdown/rendering/render-async.js +0 -114
- package/dist/markdown/rendering/render-streaming.d.ts +0 -33
- package/dist/markdown/rendering/render-streaming.js +0 -123
- package/dist/markdown/rendering/render-worker.d.ts +0 -19
- package/dist/markdown/rendering/render-worker.js +0 -35
- package/dist/markdown/rendering/render.d.ts +0 -123
- package/dist/markdown/rendering/render.js +0 -477
- package/dist/markdown/rendering/sanitize-schema.d.ts +0 -24
- package/dist/markdown/rendering/sanitize-schema.js +0 -105
- package/dist/markdown/rendering/transform-urls.d.ts +0 -37
- package/dist/markdown/rendering/transform-urls.js +0 -51
- package/dist/markdown/rendering/types.d.ts +0 -51
- package/dist/markdown/rendering/types.js +0 -8
- package/dist/markdown/rendering/worker-dom-shim.d.ts +0 -87
- package/dist/markdown/rendering/worker-dom-shim.js +0 -50
- package/dist/markdown/utilities/safe-url.d.ts +0 -100
- package/dist/markdown/utilities/safe-url.js +0 -236
- package/dist/markdown/utilities/sort-keys.d.ts +0 -19
- package/dist/markdown/utilities/sort-keys.js +0 -33
- package/dist/server/commentary/anchor-decorations.js +0 -490
- package/dist/server/commentary/anchoring.js +0 -157
- package/dist/server/commentary/comments/index.js +0 -14
- package/dist/server/commentary/comments/mentions.js +0 -65
- package/dist/server/commentary/comments/reanchor.js +0 -220
- package/dist/server/commentary/comments/types.js +0 -83
- package/dist/server/commentary/comments/updates.js +0 -226
- package/dist/server/commentary/export/comments-export.js +0 -258
- package/dist/server/commentary/export/index.js +0 -12
- package/dist/server/commentary/export/markdown-summary.js +0 -218
- package/dist/server/commentary/export/types.js +0 -7
- package/dist/server/commentary/export/unified-diff.js +0 -250
- package/dist/server/commentary/index.js +0 -6
- package/dist/server/commentary/session/index.js +0 -14
- package/dist/server/commentary/session/persistence.js +0 -253
- package/dist/server/commentary/session/types.js +0 -26
- package/dist/server/commentary/session/updates.js +0 -362
- package/dist/server/commentary/shared/anchor-types.js +0 -9
- package/dist/server/components/diff-viewer/index.js +0 -33
- package/dist/server/components/markdown-editor/index.js +0 -52
- package/dist/server/components/review-editor/index.js +0 -3493
- package/dist/server/diff/index.js +0 -1
- package/dist/server/diff/line-diff.js +0 -372
- package/dist/server/diff/types.js +0 -1
- package/dist/server/editor/attach.js +0 -86
- package/dist/server/editor/bridge.js +0 -260
- package/dist/server/editor/clipboard.js +0 -189
- package/dist/server/editor/commands.js +0 -728
- package/dist/server/editor/component-runtime.js +0 -20
- package/dist/server/editor/editor.js +0 -256
- package/dist/server/editor/index.js +0 -42
- package/dist/server/editor/keymap-plugin.js +0 -157
- package/dist/server/editor/link-input-rule.js +0 -26
- package/dist/server/editor/milkdown-plugin-runtime.js +0 -43
- package/dist/server/editor/placeholder-security.js +0 -36
- package/dist/server/editor/placeholder.js +0 -56
- package/dist/server/editor/sanitize-html.js +0 -111
- package/dist/server/editor/template-completion-plugin.js +0 -615
- package/dist/server/editor/template-invalid-decoration-plugin.js +0 -155
- package/dist/server/editor/template-placeholders.js +0 -355
- package/dist/server/editor/template-position-utilities.js +0 -63
- package/dist/server/editor/template-render.js +0 -45
- package/dist/server/editor/test-utilities.js +0 -93
- package/dist/server/editor/types.js +0 -8
- package/dist/server/index.server-25wmev4e.js +0 -2
- package/dist/server/index.server-2c56kqws.js +0 -187
- package/dist/server/index.server-45n4s30n.js +0 -35
- package/dist/server/index.server-4jkqgp17.js +0 -1026
- package/dist/server/index.server-8nm871y8.js +0 -176
- package/dist/server/index.server-d04aj37r.js +0 -62
- package/dist/server/index.server-dg19y3m7.js +0 -9
- package/dist/server/index.server-g3726bja.js +0 -9
- package/dist/server/index.server-gyzmkrnz.js +0 -2
- package/dist/server/index.server-jp19145t.js +0 -9
- package/dist/server/index.server-n4jxy52q.js +0 -2
- package/dist/server/index.server-sghkqw5x.js +0 -421
- package/dist/server/index.server-w6am2dxc.js +0 -12
- package/dist/server/index.server-x66zvjfc.js +0 -1163
- package/dist/server/index.server-zdhv33ph.js +0 -124
- package/dist/server/index.server-zke5zt13.js +0 -9
- package/dist/server/markdown/diff/compute.js +0 -250
- package/dist/server/markdown/diff/frontmatter.js +0 -135
- package/dist/server/markdown/diff/index.js +0 -28
- package/dist/server/markdown/diff/line-diff.js +0 -1
- package/dist/server/markdown/diff/positions.js +0 -147
- package/dist/server/markdown/diff/types.js +0 -7
- package/dist/server/markdown/index.js +0 -8
- package/dist/server/markdown/pipeline/ast.js +0 -417
- package/dist/server/markdown/pipeline/errors.js +0 -49
- package/dist/server/markdown/pipeline/frontmatter.js +0 -438
- package/dist/server/markdown/pipeline/index.js +0 -40
- package/dist/server/markdown/pipeline/parser.js +0 -106
- package/dist/server/markdown/pipeline/serializer.js +0 -78
- package/dist/server/markdown/pipeline/strip-positions.js +0 -28
- package/dist/server/markdown/pipeline/types.js +0 -8
- package/dist/server/markdown/rendering/extract-code-blocks.js +0 -27
- package/dist/server/markdown/rendering/highlighter.js +0 -251
- package/dist/server/markdown/rendering/index.js +0 -46
- package/dist/server/markdown/rendering/mermaid-cache.js +0 -123
- package/dist/server/markdown/rendering/rehype-shiki-sync.js +0 -354
- package/dist/server/markdown/rendering/render-async.js +0 -114
- package/dist/server/markdown/rendering/render-streaming.js +0 -123
- package/dist/server/markdown/rendering/render-worker.js +0 -35
- package/dist/server/markdown/rendering/render.js +0 -477
- package/dist/server/markdown/rendering/sanitize-schema.js +0 -105
- package/dist/server/markdown/rendering/transform-urls.js +0 -51
- package/dist/server/markdown/rendering/types.js +0 -8
- package/dist/server/markdown/rendering/worker-dom-shim.js +0 -50
- package/dist/server/markdown/utilities/safe-url.js +0 -236
- package/dist/server/markdown/utilities/sort-keys.js +0 -33
- package/src/components/diff-viewer/diff-controller.svelte.ts +0 -250
- package/src/components/diff-viewer/diff-front-matter.svelte +0 -52
- package/src/components/diff-viewer/diff-line.svelte +0 -340
- package/src/components/diff-viewer/diff-summary-bar.svelte +0 -106
- package/src/components/diff-viewer/diff-toolbar.svelte +0 -182
- package/src/components/diff-viewer/diff-viewer.examples.json +0 -25
- package/src/components/diff-viewer/diff-viewer.schema.json +0 -61
- package/src/components/diff-viewer/diff-viewer.schema.ts +0 -70
- package/src/components/diff-viewer/diff-viewer.svelte +0 -400
- package/src/components/diff-viewer/diff-viewer.types.ts +0 -56
- package/src/components/diff-viewer/front-matter-header.svelte +0 -137
- package/src/components/diff-viewer/index.ts +0 -5
- package/src/components/markdown-editor/editor-skeleton.svelte +0 -85
- package/src/components/markdown-editor/editor-toolbar/editor-toolbar.svelte +0 -318
- package/src/components/markdown-editor/editor-toolbar/index.ts +0 -18
- package/src/components/markdown-editor/editor-toolbar/link-popover.svelte +0 -314
- package/src/components/markdown-editor/editor-toolbar/toolbar-button.svelte +0 -97
- package/src/components/markdown-editor/editor-toolbar/toolbar-dropdown.svelte +0 -106
- package/src/components/markdown-editor/editor-toolbar/toolbar-separator.svelte +0 -30
- package/src/components/markdown-editor/editor-toolbar/types.ts +0 -15
- package/src/components/markdown-editor/index.ts +0 -10
- package/src/components/markdown-editor/markdown-editor.examples.json +0 -19
- package/src/components/markdown-editor/markdown-editor.schema.json +0 -111
- package/src/components/markdown-editor/markdown-editor.schema.ts +0 -122
- package/src/components/markdown-editor/markdown-editor.svelte +0 -872
- package/src/components/markdown-editor/markdown-editor.types.ts +0 -124
- package/src/components/markdown-editor/markdown-editor.variables.json +0 -1
- package/src/components/markdown-editor/markdown-editor.variables.ts +0 -3
- package/src/components/markdown-editor/prosemirror.css +0 -76
- package/src/components/review-editor/comment-composer.svelte +0 -271
- package/src/components/review-editor/comment-list.svelte +0 -311
- package/src/components/review-editor/comment-sidebar.svelte +0 -449
- package/src/components/review-editor/export-actions.svelte +0 -188
- package/src/components/review-editor/focus-navigation.ts +0 -220
- package/src/components/review-editor/front-matter-fields.svelte +0 -159
- package/src/components/review-editor/index.ts +0 -59
- package/src/components/review-editor/live-region.svelte +0 -109
- package/src/components/review-editor/review-editor-anchors.svelte.ts +0 -219
- package/src/components/review-editor/review-editor-controls.svelte +0 -201
- package/src/components/review-editor/review-editor-exports.ts +0 -145
- package/src/components/review-editor/review-editor-front-matter.ts +0 -237
- package/src/components/review-editor/review-editor-impl.svelte +0 -1509
- package/src/components/review-editor/review-editor-selection-geometry.ts +0 -31
- package/src/components/review-editor/review-editor-selection-types.ts +0 -68
- package/src/components/review-editor/review-editor-selection.svelte.ts +0 -292
- package/src/components/review-editor/review-editor-state.svelte.ts +0 -117
- package/src/components/review-editor/review-editor-threads.svelte.ts +0 -435
- package/src/components/review-editor/review-editor.css +0 -273
- package/src/components/review-editor/review-editor.examples.json +0 -19
- package/src/components/review-editor/review-editor.schema.json +0 -83
- package/src/components/review-editor/review-editor.schema.ts +0 -88
- package/src/components/review-editor/review-editor.svelte +0 -18
- package/src/components/review-editor/review-editor.types.ts +0 -92
- package/src/components/review-editor/review-editor.variables.json +0 -1
- package/src/components/review-editor/review-editor.variables.ts +0 -3
- package/src/components/review-editor/thread-popover.svelte +0 -261
- /package/dist/components/{review-editor/review-editor.css.d.ts → json-editor/json-editor.css.d.ts} +0 -0
- /package/dist/components/{diff-viewer/diff-viewer.schema.d.ts → json-editor/json-editor.schema.d.ts} +0 -0
- /package/dist/components/{diff-viewer/diff-viewer.variables.d.ts → json-editor/json-editor.variables.d.ts} +0 -0
- /package/src/components/{diff-viewer/diff-viewer.variables.json → json-editor/json-editor.variables.json} +0 -0
- /package/src/components/{diff-viewer/diff-viewer.variables.ts → json-editor/json-editor.variables.ts} +0 -0
|
@@ -1,362 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pure update helpers for review session state management.
|
|
3
|
-
*
|
|
4
|
-
* All functions are pure (no side effects, no ID/timestamp generation).
|
|
5
|
-
* They return new objects for Svelte 5 reactivity.
|
|
6
|
-
* The `changed` flag indicates whether the operation had any effect.
|
|
7
|
-
*
|
|
8
|
-
* @module
|
|
9
|
-
*/
|
|
10
|
-
// ============================================================================
|
|
11
|
-
// Draft Comment Operations
|
|
12
|
-
// ============================================================================
|
|
13
|
-
/**
|
|
14
|
-
* Add a draft comment to the session.
|
|
15
|
-
*
|
|
16
|
-
* The comment can either create a new thread (has anchor, no threadId)
|
|
17
|
-
* or reply to an existing thread (has threadId, no anchor).
|
|
18
|
-
*
|
|
19
|
-
* @param session - Current session
|
|
20
|
-
* @param comment - The draft comment to add (caller provides complete DraftComment)
|
|
21
|
-
*/
|
|
22
|
-
export function addDraftComment(session, comment) {
|
|
23
|
-
// Ensure session updatedAt never goes backwards
|
|
24
|
-
const updatedAt = session.updatedAt && session.updatedAt > comment.createdAt
|
|
25
|
-
? session.updatedAt
|
|
26
|
-
: comment.createdAt;
|
|
27
|
-
return {
|
|
28
|
-
session: {
|
|
29
|
-
...session,
|
|
30
|
-
draftComments: [...session.draftComments, comment],
|
|
31
|
-
updatedAt,
|
|
32
|
-
},
|
|
33
|
-
changed: true,
|
|
34
|
-
value: { comment },
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Update a draft comment's body and mentions.
|
|
39
|
-
*
|
|
40
|
-
* No-op if comment does not exist.
|
|
41
|
-
*
|
|
42
|
-
* @param session - Current session
|
|
43
|
-
* @param commentId - ID of the draft comment to update
|
|
44
|
-
* @param update - The update with body, mentions, and updatedAt (caller provides timestamp)
|
|
45
|
-
*/
|
|
46
|
-
export function updateDraftComment(session, commentId, update) {
|
|
47
|
-
const exists = session.draftComments.some((c) => c.id === commentId);
|
|
48
|
-
if (!exists) {
|
|
49
|
-
return { session, changed: false };
|
|
50
|
-
}
|
|
51
|
-
return {
|
|
52
|
-
session: {
|
|
53
|
-
...session,
|
|
54
|
-
draftComments: session.draftComments.map((c) => {
|
|
55
|
-
if (c.id !== commentId)
|
|
56
|
-
return c;
|
|
57
|
-
const updatedComment = {
|
|
58
|
-
...c,
|
|
59
|
-
body: update.body,
|
|
60
|
-
updatedAt: update.updatedAt,
|
|
61
|
-
};
|
|
62
|
-
if (update.mentions !== undefined) {
|
|
63
|
-
updatedComment.mentions = update.mentions;
|
|
64
|
-
}
|
|
65
|
-
return updatedComment;
|
|
66
|
-
}),
|
|
67
|
-
updatedAt: update.updatedAt,
|
|
68
|
-
},
|
|
69
|
-
changed: true,
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Delete a draft comment from the session.
|
|
74
|
-
*
|
|
75
|
-
* No-op if comment does not exist.
|
|
76
|
-
*
|
|
77
|
-
* @param session - Current session
|
|
78
|
-
* @param commentId - ID of the draft comment to delete
|
|
79
|
-
* @param updatedAt - Timestamp for the update (caller provides)
|
|
80
|
-
*/
|
|
81
|
-
export function deleteDraftComment(session, commentId, updatedAt) {
|
|
82
|
-
const exists = session.draftComments.some((c) => c.id === commentId);
|
|
83
|
-
if (!exists) {
|
|
84
|
-
return { session, changed: false };
|
|
85
|
-
}
|
|
86
|
-
return {
|
|
87
|
-
session: {
|
|
88
|
-
...session,
|
|
89
|
-
draftComments: session.draftComments.filter((c) => c.id !== commentId),
|
|
90
|
-
updatedAt,
|
|
91
|
-
},
|
|
92
|
-
changed: true,
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Find a draft comment by ID.
|
|
97
|
-
*
|
|
98
|
-
* @param session - Current session
|
|
99
|
-
* @param commentId - ID of the draft comment to find
|
|
100
|
-
*/
|
|
101
|
-
export function findDraftComment(session, commentId) {
|
|
102
|
-
return session.draftComments.find((c) => c.id === commentId);
|
|
103
|
-
}
|
|
104
|
-
// ============================================================================
|
|
105
|
-
// Outcome Operations
|
|
106
|
-
// ============================================================================
|
|
107
|
-
/**
|
|
108
|
-
* Set the review outcome.
|
|
109
|
-
*
|
|
110
|
-
* @param session - Current session
|
|
111
|
-
* @param outcome - The review outcome to set
|
|
112
|
-
* @param updatedAt - Timestamp for the update (caller provides)
|
|
113
|
-
*/
|
|
114
|
-
export function setReviewOutcome(session, outcome, updatedAt) {
|
|
115
|
-
if (session.outcome === outcome) {
|
|
116
|
-
return { session, changed: false };
|
|
117
|
-
}
|
|
118
|
-
return {
|
|
119
|
-
session: {
|
|
120
|
-
...session,
|
|
121
|
-
outcome,
|
|
122
|
-
updatedAt,
|
|
123
|
-
},
|
|
124
|
-
changed: true,
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Clear the review outcome.
|
|
129
|
-
*
|
|
130
|
-
* @param session - Current session
|
|
131
|
-
* @param updatedAt - Timestamp for the update (caller provides)
|
|
132
|
-
*/
|
|
133
|
-
export function clearReviewOutcome(session, updatedAt) {
|
|
134
|
-
if (session.outcome === undefined) {
|
|
135
|
-
return { session, changed: false };
|
|
136
|
-
}
|
|
137
|
-
// Destructure to omit outcome property entirely
|
|
138
|
-
const { outcome: _, ...rest } = session;
|
|
139
|
-
return {
|
|
140
|
-
session: {
|
|
141
|
-
...rest,
|
|
142
|
-
updatedAt,
|
|
143
|
-
},
|
|
144
|
-
changed: true,
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
// ============================================================================
|
|
148
|
-
// Count Helpers
|
|
149
|
-
// ============================================================================
|
|
150
|
-
/**
|
|
151
|
-
* Get counts of draft items in the session.
|
|
152
|
-
*
|
|
153
|
-
* @param session - Current session
|
|
154
|
-
*/
|
|
155
|
-
export function getDraftCounts(session) {
|
|
156
|
-
const threads = session.draftComments.filter((c) => c.anchor !== undefined && c.threadId === undefined).length;
|
|
157
|
-
const replies = session.draftComments.filter((c) => c.threadId !== undefined && c.anchor === undefined).length;
|
|
158
|
-
return {
|
|
159
|
-
threads,
|
|
160
|
-
replies,
|
|
161
|
-
total: threads + replies,
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Get draft comments that create new threads (have anchor, no threadId).
|
|
166
|
-
*
|
|
167
|
-
* @param session - Current session
|
|
168
|
-
*/
|
|
169
|
-
export function getDraftThreads(session) {
|
|
170
|
-
return session.draftComments.filter((c) => c.anchor !== undefined && c.threadId === undefined);
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Get draft comments that are replies to existing threads (have threadId, no anchor).
|
|
174
|
-
*
|
|
175
|
-
* @param session - Current session
|
|
176
|
-
*/
|
|
177
|
-
export function getDraftReplies(session) {
|
|
178
|
-
return session.draftComments.filter((c) => c.threadId !== undefined && c.anchor === undefined);
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Get draft replies for a specific thread.
|
|
182
|
-
*
|
|
183
|
-
* @param session - Current session
|
|
184
|
-
* @param threadId - The thread ID to get replies for
|
|
185
|
-
*/
|
|
186
|
-
export function getDraftRepliesForThread(session, threadId) {
|
|
187
|
-
return session.draftComments.filter((c) => c.threadId === threadId);
|
|
188
|
-
}
|
|
189
|
-
// ============================================================================
|
|
190
|
-
// Session Lifecycle
|
|
191
|
-
// ============================================================================
|
|
192
|
-
/**
|
|
193
|
-
* Clear all drafts from the session.
|
|
194
|
-
*
|
|
195
|
-
* Removes all draft comments and resets outcome.
|
|
196
|
-
*
|
|
197
|
-
* @param session - Current session
|
|
198
|
-
* @param updatedAt - Timestamp for the update (caller provides)
|
|
199
|
-
*/
|
|
200
|
-
export function clearSession(session, updatedAt) {
|
|
201
|
-
const hasDrafts = session.draftComments.length > 0 || session.outcome !== undefined;
|
|
202
|
-
if (!hasDrafts) {
|
|
203
|
-
return { session, changed: false };
|
|
204
|
-
}
|
|
205
|
-
const { outcome: _outcome, ...sessionWithoutOutcome } = session;
|
|
206
|
-
return {
|
|
207
|
-
session: {
|
|
208
|
-
...sessionWithoutOutcome,
|
|
209
|
-
draftComments: [],
|
|
210
|
-
updatedAt,
|
|
211
|
-
},
|
|
212
|
-
changed: true,
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
/**
|
|
216
|
-
* Create a new empty session.
|
|
217
|
-
*
|
|
218
|
-
* @param id - Session ID (caller provides)
|
|
219
|
-
* @param startedAt - Start timestamp (caller provides)
|
|
220
|
-
*/
|
|
221
|
-
export function createSession(id, startedAt) {
|
|
222
|
-
return {
|
|
223
|
-
id,
|
|
224
|
-
status: 'drafting',
|
|
225
|
-
draftComments: [],
|
|
226
|
-
startedAt,
|
|
227
|
-
updatedAt: startedAt,
|
|
228
|
-
};
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* Mark a session as submitted.
|
|
232
|
-
*
|
|
233
|
-
* @param session - Current session
|
|
234
|
-
* @param outcome - The final review outcome
|
|
235
|
-
* @param submittedAt - Submission timestamp (caller provides)
|
|
236
|
-
*/
|
|
237
|
-
export function submitSession(session, outcome, submittedAt) {
|
|
238
|
-
if (session.status === 'submitted') {
|
|
239
|
-
return { session, changed: false };
|
|
240
|
-
}
|
|
241
|
-
return {
|
|
242
|
-
session: {
|
|
243
|
-
...session,
|
|
244
|
-
status: 'submitted',
|
|
245
|
-
outcome,
|
|
246
|
-
submittedAt,
|
|
247
|
-
updatedAt: submittedAt,
|
|
248
|
-
},
|
|
249
|
-
changed: true,
|
|
250
|
-
};
|
|
251
|
-
}
|
|
252
|
-
// ============================================================================
|
|
253
|
-
// Serialization Helpers
|
|
254
|
-
// ============================================================================
|
|
255
|
-
/**
|
|
256
|
-
* Convert a draft comment to persisted format.
|
|
257
|
-
* Strips runtime anchor positions (from/to).
|
|
258
|
-
*
|
|
259
|
-
* @param comment - Runtime draft comment
|
|
260
|
-
*/
|
|
261
|
-
export function toPersistedDraftComment(comment) {
|
|
262
|
-
let persistedAnchor;
|
|
263
|
-
if (comment.anchor) {
|
|
264
|
-
const { anchor } = comment;
|
|
265
|
-
// Strip runtime positions (from, to) from anchor
|
|
266
|
-
persistedAnchor = {
|
|
267
|
-
quote: anchor.quote,
|
|
268
|
-
prefix: anchor.prefix,
|
|
269
|
-
suffix: anchor.suffix,
|
|
270
|
-
status: anchor.status,
|
|
271
|
-
};
|
|
272
|
-
if (anchor.type !== undefined)
|
|
273
|
-
persistedAnchor.type = anchor.type;
|
|
274
|
-
if (anchor.originalQuote !== undefined)
|
|
275
|
-
persistedAnchor.originalQuote = anchor.originalQuote;
|
|
276
|
-
if (anchor.lastKnownOffset !== undefined)
|
|
277
|
-
persistedAnchor.lastKnownOffset = anchor.lastKnownOffset;
|
|
278
|
-
if (anchor.blockId !== undefined)
|
|
279
|
-
persistedAnchor.blockId = anchor.blockId;
|
|
280
|
-
if (anchor.originalPosition !== undefined)
|
|
281
|
-
persistedAnchor.originalPosition = anchor.originalPosition;
|
|
282
|
-
}
|
|
283
|
-
const persisted = {
|
|
284
|
-
id: comment.id,
|
|
285
|
-
body: comment.body,
|
|
286
|
-
authorId: comment.authorId,
|
|
287
|
-
createdAt: comment.createdAt,
|
|
288
|
-
updatedAt: comment.updatedAt,
|
|
289
|
-
};
|
|
290
|
-
if (comment.threadId !== undefined)
|
|
291
|
-
persisted.threadId = comment.threadId;
|
|
292
|
-
if (persistedAnchor !== undefined)
|
|
293
|
-
persisted.anchor = persistedAnchor;
|
|
294
|
-
if (comment.mentions !== undefined)
|
|
295
|
-
persisted.mentions = comment.mentions;
|
|
296
|
-
return persisted;
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* Convert a session to persisted format for storage.
|
|
300
|
-
*
|
|
301
|
-
* @param session - Runtime session
|
|
302
|
-
*/
|
|
303
|
-
export function toPersistedSession(session) {
|
|
304
|
-
const persisted = {
|
|
305
|
-
id: session.id,
|
|
306
|
-
status: session.status,
|
|
307
|
-
draftComments: session.draftComments.map(toPersistedDraftComment),
|
|
308
|
-
startedAt: session.startedAt,
|
|
309
|
-
updatedAt: session.updatedAt,
|
|
310
|
-
};
|
|
311
|
-
if (session.outcome !== undefined)
|
|
312
|
-
persisted.outcome = session.outcome;
|
|
313
|
-
if (session.submittedAt !== undefined)
|
|
314
|
-
persisted.submittedAt = session.submittedAt;
|
|
315
|
-
return persisted;
|
|
316
|
-
}
|
|
317
|
-
/**
|
|
318
|
-
* Convert a persisted draft comment back to runtime format.
|
|
319
|
-
* Initializes anchor positions to 0 (caller must re-anchor).
|
|
320
|
-
*
|
|
321
|
-
* @param persisted - Persisted draft comment
|
|
322
|
-
*/
|
|
323
|
-
export function fromPersistedDraftComment(persisted) {
|
|
324
|
-
const draftComment = {
|
|
325
|
-
id: persisted.id,
|
|
326
|
-
body: persisted.body,
|
|
327
|
-
authorId: persisted.authorId,
|
|
328
|
-
createdAt: persisted.createdAt,
|
|
329
|
-
updatedAt: persisted.updatedAt,
|
|
330
|
-
};
|
|
331
|
-
if (persisted.threadId !== undefined)
|
|
332
|
-
draftComment.threadId = persisted.threadId;
|
|
333
|
-
if (persisted.anchor !== undefined) {
|
|
334
|
-
draftComment.anchor = {
|
|
335
|
-
...persisted.anchor,
|
|
336
|
-
from: 0, // Placeholder, caller must re-anchor
|
|
337
|
-
to: 0,
|
|
338
|
-
};
|
|
339
|
-
}
|
|
340
|
-
if (persisted.mentions !== undefined)
|
|
341
|
-
draftComment.mentions = persisted.mentions;
|
|
342
|
-
return draftComment;
|
|
343
|
-
}
|
|
344
|
-
/**
|
|
345
|
-
* Convert a persisted session back to runtime format.
|
|
346
|
-
*
|
|
347
|
-
* @param persisted - Persisted session
|
|
348
|
-
*/
|
|
349
|
-
export function fromPersistedSession(persisted) {
|
|
350
|
-
const session = {
|
|
351
|
-
id: persisted.id,
|
|
352
|
-
status: persisted.status,
|
|
353
|
-
draftComments: persisted.draftComments.map(fromPersistedDraftComment),
|
|
354
|
-
startedAt: persisted.startedAt,
|
|
355
|
-
updatedAt: persisted.updatedAt,
|
|
356
|
-
};
|
|
357
|
-
if (persisted.outcome !== undefined)
|
|
358
|
-
session.outcome = persisted.outcome;
|
|
359
|
-
if (persisted.submittedAt !== undefined)
|
|
360
|
-
session.submittedAt = persisted.submittedAt;
|
|
361
|
-
return session;
|
|
362
|
-
}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared anchor types for the editor module.
|
|
3
|
-
*
|
|
4
|
-
* These types are extracted to break the circular dependency between
|
|
5
|
-
* comments/types.ts and session/types.ts.
|
|
6
|
-
*
|
|
7
|
-
* @module
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Anchor type discriminator.
|
|
11
|
-
*
|
|
12
|
-
* - 'text': Anchored to specific text selection (default for backwards compatibility)
|
|
13
|
-
* - 'document': Document-level comment with no specific text anchor
|
|
14
|
-
*/
|
|
15
|
-
export type AnchorType = 'text' | 'document';
|
|
16
|
-
/**
|
|
17
|
-
* Anchor status indicates whether the anchor is successfully placed.
|
|
18
|
-
*
|
|
19
|
-
* - 'anchored': Anchor is confidently placed at the correct location
|
|
20
|
-
*
|
|
21
|
-
* Note: When anchor text is deleted (anchor cannot be placed), the thread is
|
|
22
|
-
* automatically deleted. There is no 'orphaned' state - threads either have
|
|
23
|
-
* valid anchors or they don't exist.
|
|
24
|
-
*/
|
|
25
|
-
export type AnchorStatus = 'anchored';
|
|
26
|
-
/**
|
|
27
|
-
* TextQuoteSelector-style anchor for comment persistence.
|
|
28
|
-
*
|
|
29
|
-
* This format survives document edits by storing context around the selection.
|
|
30
|
-
* Re-anchoring algorithm:
|
|
31
|
-
* 1. Try exact position first
|
|
32
|
-
* 2. Search for quote with prefix/suffix context
|
|
33
|
-
* 3. Mark as orphaned if not found
|
|
34
|
-
*
|
|
35
|
-
* Based on W3C Web Annotation Data Model TextQuoteSelector.
|
|
36
|
-
* @see https://www.w3.org/TR/annotation-model/#text-quote-selector
|
|
37
|
-
*/
|
|
38
|
-
export interface TextQuoteAnchor {
|
|
39
|
-
/** The exact text that was selected */
|
|
40
|
-
quote: string;
|
|
41
|
-
/** ~50 characters before the selection for context matching */
|
|
42
|
-
prefix: string;
|
|
43
|
-
/** ~50 characters after the selection for context matching */
|
|
44
|
-
suffix: string;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Runtime anchor with ProseMirror positions.
|
|
48
|
-
*
|
|
49
|
-
* These positions are computed at runtime and updated through
|
|
50
|
-
* ProseMirror's transaction mapping (tr.mapping.map()).
|
|
51
|
-
*/
|
|
52
|
-
export interface RuntimeAnchor {
|
|
53
|
-
/** Start position in ProseMirror document */
|
|
54
|
-
from: number;
|
|
55
|
-
/** End position in ProseMirror document */
|
|
56
|
-
to: number;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Complete comment anchor combining persistence and runtime data.
|
|
60
|
-
*
|
|
61
|
-
* For document-level comments (type='document'), the quote/prefix/suffix
|
|
62
|
-
* will be empty strings and from/to will be 0.
|
|
63
|
-
*/
|
|
64
|
-
export interface CommentAnchor extends TextQuoteAnchor, RuntimeAnchor {
|
|
65
|
-
/**
|
|
66
|
-
* Anchor type: 'text' (default) or 'document'.
|
|
67
|
-
* When undefined, treated as 'text' for backwards compatibility.
|
|
68
|
-
*/
|
|
69
|
-
type?: AnchorType | undefined;
|
|
70
|
-
/** Current anchor status */
|
|
71
|
-
status: AnchorStatus;
|
|
72
|
-
/**
|
|
73
|
-
* Original quote text when the anchor was created.
|
|
74
|
-
* Preserved for history/debugging - never updated when edits occur inside the anchor.
|
|
75
|
-
*/
|
|
76
|
-
originalQuote?: string | undefined;
|
|
77
|
-
/**
|
|
78
|
-
* Last known text offset (not ProseMirror position).
|
|
79
|
-
* Updated on each edit, used for re-anchoring disambiguation.
|
|
80
|
-
* Prevents bias toward the original position when the anchor has moved.
|
|
81
|
-
*/
|
|
82
|
-
lastKnownOffset?: number | undefined;
|
|
83
|
-
/** Optional block-level anchor (for comments on headings, code blocks, etc.) */
|
|
84
|
-
blockId?: string | undefined;
|
|
85
|
-
/**
|
|
86
|
-
* Original position when anchor was created.
|
|
87
|
-
* Stored as text offset (via proseMirrorPositionToTextOffset), not PM position.
|
|
88
|
-
* Used as fallback for disambiguation when lastKnownOffset is not available.
|
|
89
|
-
*/
|
|
90
|
-
originalPosition?: {
|
|
91
|
-
/** Text offset (matching doc.textBetween() semantics) */
|
|
92
|
-
offset: number;
|
|
93
|
-
/** Line number (1-based) */
|
|
94
|
-
line: number;
|
|
95
|
-
/** Column number (1-based) */
|
|
96
|
-
column: number;
|
|
97
|
-
} | undefined;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Anchor data for persistence (excludes runtime positions).
|
|
101
|
-
* Used when serializing review state to storage.
|
|
102
|
-
*/
|
|
103
|
-
export interface PersistedAnchor extends TextQuoteAnchor {
|
|
104
|
-
/**
|
|
105
|
-
* Anchor type: 'text' (default) or 'document'.
|
|
106
|
-
* When undefined, treated as 'text' for backwards compatibility.
|
|
107
|
-
*/
|
|
108
|
-
type?: AnchorType | undefined;
|
|
109
|
-
status: AnchorStatus;
|
|
110
|
-
/** Original quote text (optional for backwards compatibility) */
|
|
111
|
-
originalQuote?: string | undefined;
|
|
112
|
-
/** Last known text offset for re-anchoring disambiguation */
|
|
113
|
-
lastKnownOffset?: number | undefined;
|
|
114
|
-
blockId?: string | undefined;
|
|
115
|
-
originalPosition?: CommentAnchor['originalPosition'] | undefined;
|
|
116
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DiffController with size-based gating (DEP-47).
|
|
3
|
-
*
|
|
4
|
-
* Manages diff computation strategy based on document size:
|
|
5
|
-
* - <20KB: Real-time diff computation
|
|
6
|
-
* - 20-100KB: Debounced (500ms) with warning badge
|
|
7
|
-
* - >100KB: Manual trigger only, shows stale diff with "Outdated" badge
|
|
8
|
-
*
|
|
9
|
-
* This protects UI responsiveness for large documents while maintaining
|
|
10
|
-
* full functionality for typical document sizes.
|
|
11
|
-
*/
|
|
12
|
-
import type { LineDiff } from '@lostgradient/cinder/markdown/diff/line-diff';
|
|
13
|
-
export type DiffTier = 'realtime' | 'debounced' | 'manual';
|
|
14
|
-
export interface DiffControllerOptions {
|
|
15
|
-
/** Threshold for debounced mode (bytes). Default: 20000 (20KB) */
|
|
16
|
-
debouncedThreshold?: number;
|
|
17
|
-
/** Threshold for manual mode (bytes). Default: 100000 (100KB) */
|
|
18
|
-
manualThreshold?: number;
|
|
19
|
-
/** Debounce delay for medium documents (ms). Default: 500 */
|
|
20
|
-
debounceMs?: number;
|
|
21
|
-
}
|
|
22
|
-
export interface DiffState {
|
|
23
|
-
/** Current size tier */
|
|
24
|
-
tier: DiffTier;
|
|
25
|
-
/** Computed diffs (may be stale if tier is 'manual') */
|
|
26
|
-
diffs: LineDiff[];
|
|
27
|
-
/** Whether diff computation is in progress */
|
|
28
|
-
isComputing: boolean;
|
|
29
|
-
/** Time taken for last computation (ms) */
|
|
30
|
-
lastComputeTime: number | null;
|
|
31
|
-
/** Max document size (bytes) */
|
|
32
|
-
documentSize: number;
|
|
33
|
-
/** Warning message for user (null if no warning) */
|
|
34
|
-
warning: string | null;
|
|
35
|
-
/** Whether the current diffs are stale (for manual tier) */
|
|
36
|
-
isStale: boolean;
|
|
37
|
-
}
|
|
38
|
-
export interface DiffController {
|
|
39
|
-
/** Current diff state */
|
|
40
|
-
readonly state: DiffState;
|
|
41
|
-
/** Original/baseline content */
|
|
42
|
-
original: string;
|
|
43
|
-
/** Current/modified content */
|
|
44
|
-
current: string;
|
|
45
|
-
/** Set original/baseline content */
|
|
46
|
-
setOriginal(value: string): void;
|
|
47
|
-
/** Set current/modified content */
|
|
48
|
-
setCurrent(value: string): void;
|
|
49
|
-
/** Trigger manual diff computation (for >100KB tier) */
|
|
50
|
-
triggerCompute(): void;
|
|
51
|
-
/** Cleanup resources */
|
|
52
|
-
destroy(): void;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Create a diff controller with size-based gating.
|
|
56
|
-
*
|
|
57
|
-
* @example
|
|
58
|
-
* ```svelte
|
|
59
|
-
* <script>
|
|
60
|
-
* import { createDiffController } from './diff-controller.svelte';
|
|
61
|
-
*
|
|
62
|
-
* const controller = createDiffController();
|
|
63
|
-
*
|
|
64
|
-
* $effect(() => controller.setOriginal(normalizedOriginal));
|
|
65
|
-
* $effect(() => controller.setCurrent(normalizedCurrent));
|
|
66
|
-
*
|
|
67
|
-
* const { state } = controller;
|
|
68
|
-
* </script>
|
|
69
|
-
*
|
|
70
|
-
* {#if state.warning}
|
|
71
|
-
* <div class="warning">{state.warning}</div>
|
|
72
|
-
* {/if}
|
|
73
|
-
* ```
|
|
74
|
-
*/
|
|
75
|
-
export declare function createDiffController(options?: DiffControllerOptions): DiffController;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
import type { LineDiff, WordChange } from '@lostgradient/cinder/markdown/diff/line-diff';
|
|
4
|
-
import type { BadgeVariant } from '../badge/badge.types.ts';
|
|
5
|
-
import type { DiffViewerMode } from './diff-viewer.types.ts';
|
|
6
|
-
export type DiffFrontMatterProps = Omit<HTMLAttributes<HTMLDivElement>, 'class'> & {
|
|
7
|
-
/** Unique id for the front matter section */
|
|
8
|
-
id?: string;
|
|
9
|
-
/** Line diffs for front matter content */
|
|
10
|
-
diffs: LineDiff[];
|
|
11
|
-
/** Current view mode */
|
|
12
|
-
viewMode: DiffViewerMode;
|
|
13
|
-
/** Whether the section is expanded (bindable) */
|
|
14
|
-
expanded?: boolean;
|
|
15
|
-
/** Badge label to show (e.g., "Changed") */
|
|
16
|
-
badgeLabel?: string | null;
|
|
17
|
-
/** Badge variant */
|
|
18
|
-
badgeVariant?: BadgeVariant;
|
|
19
|
-
/** Optional: custom word change renderer (passed to DiffLine) */
|
|
20
|
-
wordChangeRenderer?: Snippet<[{
|
|
21
|
-
changes: WordChange[];
|
|
22
|
-
}]> | undefined;
|
|
23
|
-
/** Additional CSS classes */
|
|
24
|
-
class?: string;
|
|
25
|
-
};
|
|
26
|
-
declare const DiffFrontMatter: import("svelte").Component<DiffFrontMatterProps, {}, "expanded">;
|
|
27
|
-
type DiffFrontMatter = ReturnType<typeof DiffFrontMatter>;
|
|
28
|
-
export default DiffFrontMatter;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Snippet } from 'svelte';
|
|
2
|
-
import type { LineDiff, WordChange } from '@lostgradient/cinder/markdown/diff/line-diff';
|
|
3
|
-
import type { DiffViewerMode } from './diff-viewer.types.ts';
|
|
4
|
-
export type DiffLineProps = {
|
|
5
|
-
/** The line diff data */
|
|
6
|
-
diff: LineDiff;
|
|
7
|
-
/** Current view mode */
|
|
8
|
-
viewMode: DiffViewerMode;
|
|
9
|
-
/** Whether this line is selected */
|
|
10
|
-
selected?: boolean;
|
|
11
|
-
/** Called when user clicks this line (for navigation) */
|
|
12
|
-
onselect?: (() => void) | undefined;
|
|
13
|
-
/** Optional: custom word change renderer */
|
|
14
|
-
wordChangeRenderer?: Snippet<[{
|
|
15
|
-
changes: WordChange[];
|
|
16
|
-
}]> | undefined;
|
|
17
|
-
/** Additional CSS classes */
|
|
18
|
-
class?: string;
|
|
19
|
-
};
|
|
20
|
-
declare const DiffLine: import("svelte").Component<DiffLineProps, {}, "">;
|
|
21
|
-
type DiffLine = ReturnType<typeof DiffLine>;
|
|
22
|
-
export default DiffLine;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
-
import type { LineDiffStats } from '@lostgradient/cinder/markdown/diff/line-diff';
|
|
3
|
-
export type DiffSummaryBarProps = Omit<HTMLAttributes<HTMLDivElement>, 'class'> & {
|
|
4
|
-
/** Diff statistics from getDiffStats() */
|
|
5
|
-
stats: LineDiffStats;
|
|
6
|
-
/** Whether the diff viewer is expanded */
|
|
7
|
-
expanded?: boolean;
|
|
8
|
-
/** Additional CSS classes */
|
|
9
|
-
class?: string;
|
|
10
|
-
};
|
|
11
|
-
declare const DiffSummaryBar: import("svelte").Component<DiffSummaryBarProps, {}, "expanded">;
|
|
12
|
-
type DiffSummaryBar = ReturnType<typeof DiffSummaryBar>;
|
|
13
|
-
export default DiffSummaryBar;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
import type { LineDiffStats } from '@lostgradient/cinder/markdown/diff/line-diff';
|
|
4
|
-
import type { DiffState } from './diff-controller.svelte';
|
|
5
|
-
import type { DiffViewerMode } from './diff-viewer.types.ts';
|
|
6
|
-
export type DiffToolbarProps = Omit<HTMLAttributes<HTMLDivElement>, 'class'> & {
|
|
7
|
-
/** Current view mode (bindable) */
|
|
8
|
-
viewMode?: DiffViewerMode;
|
|
9
|
-
/** Diff statistics */
|
|
10
|
-
stats: LineDiffStats;
|
|
11
|
-
/** Number of navigable changes */
|
|
12
|
-
changeCount: number;
|
|
13
|
-
/** Current position in change navigation (0-based, -1 if none selected) */
|
|
14
|
-
currentChangeIndex: number;
|
|
15
|
-
/** Whether there are any changes (body or front matter) */
|
|
16
|
-
hasChanges: boolean;
|
|
17
|
-
/** Whether the viewer is read-only (hides revert buttons) */
|
|
18
|
-
readonly?: boolean;
|
|
19
|
-
/** Diff computation state for size-based gating UI */
|
|
20
|
-
diffState?: Pick<DiffState, 'tier' | 'isStale' | 'isComputing' | 'warning' | 'lastComputeTime'>;
|
|
21
|
-
/** Called when user clicks next change */
|
|
22
|
-
onjumpnext?: (() => void) | undefined;
|
|
23
|
-
/** Called when user clicks previous change */
|
|
24
|
-
onjumpprevious?: (() => void) | undefined;
|
|
25
|
-
/** Called when user wants to revert all changes */
|
|
26
|
-
onrevertall?: (() => void) | undefined;
|
|
27
|
-
/** Called when user triggers manual diff compute (for large docs) */
|
|
28
|
-
ontriggercompute?: (() => void) | undefined;
|
|
29
|
-
/** Additional toolbar actions rendered in the right section */
|
|
30
|
-
actions?: Snippet;
|
|
31
|
-
/** Additional CSS classes */
|
|
32
|
-
class?: string;
|
|
33
|
-
};
|
|
34
|
-
declare const DiffToolbar: import("svelte").Component<DiffToolbarProps, {}, "viewMode">;
|
|
35
|
-
type DiffToolbar = ReturnType<typeof DiffToolbar>;
|
|
36
|
-
export default DiffToolbar;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @cinder
|
|
3
|
-
* @category domain
|
|
4
|
-
* @status domain-suite
|
|
5
|
-
* @purpose Side-by-side or unified Markdown diff surface with hunk grouping, word-level inline changes, and size-based debounce gating.
|
|
6
|
-
* @tag diff
|
|
7
|
-
* @tag markdown
|
|
8
|
-
* @tag domain-suite
|
|
9
|
-
* @useWhen Comparing two Markdown documents and wanting the bundled toolbar, view-mode toggle, front-matter handling, and large-payload safeguards.
|
|
10
|
-
* @useWhen Building a review workflow that needs hunked, line-anchored Markdown diffs out of the box as a heavyweight suite.
|
|
11
|
-
* @avoidWhen Showing only a counts summary — use diff-statistics on its own for a lightweight presentation.
|
|
12
|
-
* @avoidWhen Diffing non-Markdown source code where syntax-aware highlighting matters more than prose-aware rendering.
|
|
13
|
-
* @related diff-statistics, code-block
|
|
14
|
-
*/
|
|
15
|
-
export type { DiffToolbarContext, DiffViewerMode, DiffViewerProps } from './diff-viewer.types.ts';
|
|
16
|
-
import type { DiffHunk } from '@lostgradient/cinder/markdown/diff/line-diff';
|
|
17
|
-
import type { DiffViewerProps } from './diff-viewer.types.ts';
|
|
18
|
-
declare const DiffViewer: import("svelte").Component<DiffViewerProps, {
|
|
19
|
-
getHunks: () => DiffHunk[];
|
|
20
|
-
}, "viewMode" | "hunks">;
|
|
21
|
-
type DiffViewer = ReturnType<typeof DiffViewer>;
|
|
22
|
-
export default DiffViewer;
|