@peaske7/readit 0.2.1 → 0.3.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +1111 -0
- package/dist/assets/_basePickBy-BMMA4Tou.js +1 -0
- package/dist/assets/_baseUniq-D40qku1I.js +1 -0
- package/dist/assets/arc-Ckg65iy8.js +1 -0
- package/dist/assets/architecture-YZFGNWBL-Dv3EY0zV.js +1 -0
- package/dist/assets/architectureDiagram-Q4EWVU46-ClRss4cm.js +36 -0
- package/dist/assets/array-Bjz-wYpJ.js +1 -0
- package/dist/assets/blockDiagram-DXYQGD6D-CBcFvoK1.js +132 -0
- package/dist/assets/c4Diagram-AHTNJAMY-D4d3ZLam.js +10 -0
- package/dist/assets/channel-D9EJxDy_.js +1 -0
- package/dist/assets/chunk-2KRD3SAO-DaFfaCGO.js +1 -0
- package/dist/assets/chunk-336JU56O-yLEQoF0v.js +2 -0
- package/dist/assets/chunk-426QAEUC-Uyzd4wAA.js +1 -0
- package/dist/assets/chunk-4BX2VUAB-DRuTD7x5.js +1 -0
- package/dist/assets/chunk-4TB4RGXK-3xbpIi_o.js +206 -0
- package/dist/assets/chunk-55IACEB6-BExiaAoD.js +1 -0
- package/dist/assets/chunk-5FUZZQ4R-DatVvHnF.js +62 -0
- package/dist/assets/chunk-5PVQY5BW-BKgvrGh8.js +2 -0
- package/dist/assets/chunk-67CJDMHE-DMt8LNEX.js +1 -0
- package/dist/assets/chunk-7N4EOEYR-CzLGefVf.js +1 -0
- package/dist/assets/chunk-AA7GKIK3-B6GFAk4U.js +1 -0
- package/dist/assets/chunk-BSJP7CBP-BK29yehL.js +1 -0
- package/dist/assets/chunk-CIAEETIT-D7hBXImP.js +1 -0
- package/dist/assets/chunk-Dlc7tRH4.js +1 -0
- package/dist/assets/chunk-EDXVE4YY-PYJdlmyH.js +1 -0
- package/dist/assets/chunk-ENJZ2VHE-DUHKBv6x.js +10 -0
- package/dist/assets/chunk-FMBD7UC4-2FWyCCAV.js +15 -0
- package/dist/assets/chunk-FOC6F5B3-DKFHrt4K.js +1 -0
- package/dist/assets/chunk-ICPOFSXX-Bh__D0ec.js +122 -0
- package/dist/assets/chunk-K5T4RW27-D51O7IkG.js +94 -0
- package/dist/assets/chunk-KGLVRYIC-DMHSCH4T.js +1 -0
- package/dist/assets/chunk-LIHQZDEY-C2aANxt9.js +1 -0
- package/dist/assets/chunk-ORNJ4GCN-Db_37NRX.js +1 -0
- package/dist/assets/chunk-OYMX7WX6-BltXOJLJ.js +231 -0
- package/dist/assets/chunk-QZHKN3VN-8Lcg9gti.js +1 -0
- package/dist/assets/chunk-U2HBQHQK-ByS6tilY.js +70 -0
- package/dist/assets/chunk-X2U36JSP-Bm-4Gqg_.js +1 -0
- package/dist/assets/chunk-XPW4576I-Bqbompq4.js +32 -0
- package/dist/assets/chunk-YZCP3GAM-CsC0imPb.js +1 -0
- package/dist/assets/chunk-ZZ45TVLE-CG-CqfPC.js +1 -0
- package/dist/assets/classDiagram-6PBFFD2Q-Jy1uFUk4.js +1 -0
- package/dist/assets/classDiagram-v2-HSJHXN6E-ChiLl3rR.js +1 -0
- package/dist/assets/clone-BBjvuERA.js +1 -0
- package/dist/assets/cose-bilkent-S5V4N54A-q90QeGKv.js +1 -0
- package/dist/assets/cytoscape.esm-BfXff3fb.js +321 -0
- package/dist/assets/dagre-KV5264BT-BQWiLFJB.js +4 -0
- package/dist/assets/dagre-nn_aIZ2E.js +1 -0
- package/dist/assets/defaultLocale-BwmRmqJp.js +1 -0
- package/dist/assets/diagram-5BDNPKRD-CJa7Y97H.js +10 -0
- package/dist/assets/diagram-G4DWMVQ6-tVQGBWfY.js +24 -0
- package/dist/assets/diagram-MMDJMWI5-CpimFldm.js +43 -0
- package/dist/assets/diagram-TYMM5635-D11WQVgy.js +24 -0
- package/dist/assets/dist-BNz65Ibc.js +1 -0
- package/dist/assets/erDiagram-SMLLAGMA-C2bLd0jS.js +85 -0
- package/dist/assets/flowDiagram-DWJPFMVM-Kw3fOOLT.js +162 -0
- package/dist/assets/ganttDiagram-T4ZO3ILL-fyMhyE2X.js +292 -0
- package/dist/assets/gitGraph-7Q5UKJZL-BGFRt2qs.js +1 -0
- package/dist/assets/gitGraphDiagram-UUTBAWPF-D4JoiOvg.js +106 -0
- package/dist/assets/graphlib-DGcD9J2L.js +1 -0
- package/dist/assets/index-Cow3qpoq.css +2 -0
- package/dist/assets/index-DUf7okYi.js +14 -0
- package/dist/assets/info-OMHHGYJF-DI6-Z9vh.js +1 -0
- package/dist/assets/infoDiagram-42DDH7IO-D1ZkeMBy.js +2 -0
- package/dist/assets/init-TPm5RB77.js +1 -0
- package/dist/assets/isArrayLikeObject-69BLnVNM.js +1 -0
- package/dist/assets/isEmpty-DUS28g5f.js +1 -0
- package/dist/assets/ishikawaDiagram-UXIWVN3A-Dv8hzjZB.js +70 -0
- package/dist/assets/journeyDiagram-VCZTEJTY-COeB7F5r.js +139 -0
- package/dist/assets/kanban-definition-6JOO6SKY-BbYmxCYU.js +89 -0
- package/dist/assets/katex-5SGEXwpi.js +261 -0
- package/dist/assets/line-_v2NGEdn.js +1 -0
- package/dist/assets/linear-CXMqTN8N.js +1 -0
- package/dist/assets/mermaid-config-C8a4L22x.js +1 -0
- package/dist/assets/mermaid-parser.core-CFmphzPP.js +4 -0
- package/dist/assets/mermaid.core-DnHAupTp.js +11 -0
- package/dist/assets/mindmap-definition-QFDTVHPH-D7_lIep7.js +96 -0
- package/dist/assets/ordinal-D7l-8DAO.js +1 -0
- package/dist/assets/packet-4T2RLAQJ-DidW3JFc.js +1 -0
- package/dist/assets/path-BVpCanzE.js +1 -0
- package/dist/assets/pie-ZZUOXDRM-Bff2e5hg.js +1 -0
- package/dist/assets/pieDiagram-DEJITSTG-DDvYHCT_.js +30 -0
- package/dist/assets/quadrantDiagram-34T5L4WZ-DcLcIrdi.js +7 -0
- package/dist/assets/radar-PYXPWWZC-CsdZBH3M.js +1 -0
- package/dist/assets/requirementDiagram-MS252O5E-DLX6ld7D.js +84 -0
- package/dist/assets/rough.esm-BoTisKeL.js +1 -0
- package/dist/assets/sankeyDiagram-XADWPNL6-D-1GtsHM.js +10 -0
- package/dist/assets/sequenceDiagram-FGHM5R23-Bwxs0YQg.js +157 -0
- package/dist/assets/src-CrmkjRpa.js +1 -0
- package/dist/assets/stateDiagram-FHFEXIEX-DW7rOcnQ.js +1 -0
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-Jm-24vQ2.js +1 -0
- package/dist/assets/timeline-definition-GMOUNBTQ-DVdHyzxS.js +120 -0
- package/dist/assets/treeView-SZITEDCU-DPKseaET.js +1 -0
- package/dist/assets/treemap-W4RFUUIX-DH-7GZe_.js +1 -0
- package/dist/assets/vennDiagram-DHZGUBPP-DJaC6xmI.js +34 -0
- package/dist/assets/wardley-RL74JXVD-AgyXyBN5.js +1 -0
- package/dist/assets/wardleyDiagram-NUSXRM2D-CTKERPKv.js +20 -0
- package/dist/assets/xychartDiagram-5P7HB3ND-BuExiLXc.js +7 -0
- package/{index.html → dist/index.html} +2 -1
- package/dist/index.js +2539 -0
- package/package.json +11 -1
- package/.agents/skills/remotion-best-practices/SKILL.md +0 -61
- package/.agents/skills/remotion-best-practices/rules/3d.md +0 -86
- package/.agents/skills/remotion-best-practices/rules/animations.md +0 -27
- package/.agents/skills/remotion-best-practices/rules/assets/charts-bar-chart.tsx +0 -178
- package/.agents/skills/remotion-best-practices/rules/assets/text-animations-typewriter.tsx +0 -100
- package/.agents/skills/remotion-best-practices/rules/assets/text-animations-word-highlight.tsx +0 -108
- package/.agents/skills/remotion-best-practices/rules/assets.md +0 -78
- package/.agents/skills/remotion-best-practices/rules/audio-visualization.md +0 -198
- package/.agents/skills/remotion-best-practices/rules/audio.md +0 -169
- package/.agents/skills/remotion-best-practices/rules/calculate-metadata.md +0 -134
- package/.agents/skills/remotion-best-practices/rules/can-decode.md +0 -75
- package/.agents/skills/remotion-best-practices/rules/charts.md +0 -120
- package/.agents/skills/remotion-best-practices/rules/compositions.md +0 -154
- package/.agents/skills/remotion-best-practices/rules/display-captions.md +0 -184
- package/.agents/skills/remotion-best-practices/rules/extract-frames.md +0 -229
- package/.agents/skills/remotion-best-practices/rules/ffmpeg.md +0 -38
- package/.agents/skills/remotion-best-practices/rules/fonts.md +0 -152
- package/.agents/skills/remotion-best-practices/rules/get-audio-duration.md +0 -58
- package/.agents/skills/remotion-best-practices/rules/get-video-dimensions.md +0 -68
- package/.agents/skills/remotion-best-practices/rules/get-video-duration.md +0 -60
- package/.agents/skills/remotion-best-practices/rules/gifs.md +0 -141
- package/.agents/skills/remotion-best-practices/rules/images.md +0 -134
- package/.agents/skills/remotion-best-practices/rules/import-srt-captions.md +0 -69
- package/.agents/skills/remotion-best-practices/rules/light-leaks.md +0 -73
- package/.agents/skills/remotion-best-practices/rules/lottie.md +0 -70
- package/.agents/skills/remotion-best-practices/rules/maps.md +0 -412
- package/.agents/skills/remotion-best-practices/rules/measuring-dom-nodes.md +0 -34
- package/.agents/skills/remotion-best-practices/rules/measuring-text.md +0 -140
- package/.agents/skills/remotion-best-practices/rules/parameters.md +0 -109
- package/.agents/skills/remotion-best-practices/rules/sequencing.md +0 -118
- package/.agents/skills/remotion-best-practices/rules/sfx.md +0 -26
- package/.agents/skills/remotion-best-practices/rules/subtitles.md +0 -36
- package/.agents/skills/remotion-best-practices/rules/tailwind.md +0 -11
- package/.agents/skills/remotion-best-practices/rules/text-animations.md +0 -20
- package/.agents/skills/remotion-best-practices/rules/timing.md +0 -179
- package/.agents/skills/remotion-best-practices/rules/transcribe-captions.md +0 -70
- package/.agents/skills/remotion-best-practices/rules/transitions.md +0 -197
- package/.agents/skills/remotion-best-practices/rules/transparent-videos.md +0 -106
- package/.agents/skills/remotion-best-practices/rules/trimming.md +0 -51
- package/.agents/skills/remotion-best-practices/rules/videos.md +0 -171
- package/.agents/skills/remotion-best-practices/rules/voiceover.md +0 -99
- package/.agents/skills/simple/SKILL.md +0 -52
- package/.agents/skills/vercel-react-best-practices/AGENTS.md +0 -3254
- package/.agents/skills/vercel-react-best-practices/README.md +0 -123
- package/.agents/skills/vercel-react-best-practices/SKILL.md +0 -141
- package/.agents/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +0 -55
- package/.agents/skills/vercel-react-best-practices/rules/advanced-init-once.md +0 -42
- package/.agents/skills/vercel-react-best-practices/rules/advanced-use-latest.md +0 -39
- package/.agents/skills/vercel-react-best-practices/rules/async-api-routes.md +0 -38
- package/.agents/skills/vercel-react-best-practices/rules/async-defer-await.md +0 -80
- package/.agents/skills/vercel-react-best-practices/rules/async-dependencies.md +0 -51
- package/.agents/skills/vercel-react-best-practices/rules/async-parallel.md +0 -28
- package/.agents/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +0 -99
- package/.agents/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +0 -59
- package/.agents/skills/vercel-react-best-practices/rules/bundle-conditional.md +0 -31
- package/.agents/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +0 -49
- package/.agents/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +0 -35
- package/.agents/skills/vercel-react-best-practices/rules/bundle-preload.md +0 -50
- package/.agents/skills/vercel-react-best-practices/rules/client-event-listeners.md +0 -74
- package/.agents/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +0 -71
- package/.agents/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +0 -48
- package/.agents/skills/vercel-react-best-practices/rules/client-swr-dedup.md +0 -56
- package/.agents/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +0 -107
- package/.agents/skills/vercel-react-best-practices/rules/js-cache-function-results.md +0 -80
- package/.agents/skills/vercel-react-best-practices/rules/js-cache-property-access.md +0 -28
- package/.agents/skills/vercel-react-best-practices/rules/js-cache-storage.md +0 -70
- package/.agents/skills/vercel-react-best-practices/rules/js-combine-iterations.md +0 -32
- package/.agents/skills/vercel-react-best-practices/rules/js-early-exit.md +0 -50
- package/.agents/skills/vercel-react-best-practices/rules/js-flatmap-filter.md +0 -60
- package/.agents/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +0 -45
- package/.agents/skills/vercel-react-best-practices/rules/js-index-maps.md +0 -37
- package/.agents/skills/vercel-react-best-practices/rules/js-length-check-first.md +0 -49
- package/.agents/skills/vercel-react-best-practices/rules/js-min-max-loop.md +0 -82
- package/.agents/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +0 -24
- package/.agents/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +0 -57
- package/.agents/skills/vercel-react-best-practices/rules/rendering-activity.md +0 -26
- package/.agents/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +0 -47
- package/.agents/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +0 -40
- package/.agents/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +0 -38
- package/.agents/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +0 -46
- package/.agents/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +0 -82
- package/.agents/skills/vercel-react-best-practices/rules/rendering-hydration-suppress-warning.md +0 -30
- package/.agents/skills/vercel-react-best-practices/rules/rendering-resource-hints.md +0 -85
- package/.agents/skills/vercel-react-best-practices/rules/rendering-script-defer-async.md +0 -68
- package/.agents/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +0 -28
- package/.agents/skills/vercel-react-best-practices/rules/rendering-usetransition-loading.md +0 -75
- package/.agents/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +0 -39
- package/.agents/skills/vercel-react-best-practices/rules/rerender-dependencies.md +0 -45
- package/.agents/skills/vercel-react-best-practices/rules/rerender-derived-state-no-effect.md +0 -40
- package/.agents/skills/vercel-react-best-practices/rules/rerender-derived-state.md +0 -29
- package/.agents/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +0 -74
- package/.agents/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +0 -58
- package/.agents/skills/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +0 -38
- package/.agents/skills/vercel-react-best-practices/rules/rerender-memo.md +0 -44
- package/.agents/skills/vercel-react-best-practices/rules/rerender-move-effect-to-event.md +0 -45
- package/.agents/skills/vercel-react-best-practices/rules/rerender-no-inline-components.md +0 -82
- package/.agents/skills/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +0 -35
- package/.agents/skills/vercel-react-best-practices/rules/rerender-transitions.md +0 -40
- package/.agents/skills/vercel-react-best-practices/rules/rerender-use-ref-transient-values.md +0 -73
- package/.agents/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +0 -73
- package/.agents/skills/vercel-react-best-practices/rules/server-auth-actions.md +0 -96
- package/.agents/skills/vercel-react-best-practices/rules/server-cache-lru.md +0 -41
- package/.agents/skills/vercel-react-best-practices/rules/server-cache-react.md +0 -76
- package/.agents/skills/vercel-react-best-practices/rules/server-dedup-props.md +0 -65
- package/.agents/skills/vercel-react-best-practices/rules/server-hoist-static-io.md +0 -142
- package/.agents/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +0 -83
- package/.agents/skills/vercel-react-best-practices/rules/server-serialization.md +0 -38
- package/.claude/CLAUDE.md +0 -184
- package/.claude/commands/review.md +0 -120
- package/.claude/commands/sync-docs.md +0 -71
- package/.claude/roadmap.md +0 -121
- package/.claude/rules/style-guide.md +0 -830
- package/.claude/settings.json +0 -18
- package/.claude/user-stories.md +0 -333
- package/AGENTS.md +0 -68
- package/Makefile +0 -32
- package/biome.json +0 -79
- package/bun.lock +0 -854
- package/bunfig.toml +0 -2
- package/docs/design.md +0 -563
- package/docs/perf-baseline.md +0 -130
- package/docs/plans/2026-03-13-client-mode-design.md +0 -86
- package/docs/plans/2026-03-13-client-mode-plan.md +0 -605
- package/docs/plans/2026-03-13-keyboard-shortcuts-design.md +0 -129
- package/docs/plans/2026-03-13-keyboard-shortcuts-plan.md +0 -1471
- package/docs/plans/2026-03-13-multi-document-design.md +0 -183
- package/docs/plans/2026-03-13-performance-benchmarks-design.md +0 -121
- package/docs/superpowers/plans/2026-03-26-surgical-pruning.md +0 -1176
- package/docs/superpowers/specs/2026-03-27-go-server-rewrite-design.md +0 -284
- package/e2e/comments.spec.ts +0 -81
- package/e2e/document-load.spec.ts +0 -32
- package/e2e/export.spec.ts +0 -58
- package/e2e/fixtures/sample.md +0 -7
- package/e2e/perf/add-comment.spec.ts +0 -116
- package/e2e/perf/fixtures/generate.ts +0 -327
- package/e2e/perf/initial-load.spec.ts +0 -49
- package/e2e/perf/perf.setup.ts +0 -23
- package/e2e/perf/perf.teardown.ts +0 -9
- package/e2e/perf/screenshot-final.png +0 -0
- package/e2e/perf/scroll.spec.ts +0 -39
- package/e2e/perf/tab-switch.spec.ts +0 -69
- package/e2e/perf/text-selection.spec.ts +0 -119
- package/e2e/perf/utils/metrics.ts +0 -350
- package/e2e/perf/utils/perf-cli.ts +0 -86
- package/e2e/persistence-file.spec.ts +0 -357
- package/e2e/utils/cli.ts +0 -84
- package/e2e/utils/selection.ts +0 -79
- package/go/cmd/readit/main.go +0 -416
- package/go/go.mod +0 -20
- package/go/go.sum +0 -41
- package/go/internal/server/anchor.go +0 -302
- package/go/internal/server/anchor_test.go +0 -111
- package/go/internal/server/comments.go +0 -390
- package/go/internal/server/documents.go +0 -113
- package/go/internal/server/embed.go +0 -17
- package/go/internal/server/headings.go +0 -33
- package/go/internal/server/headings_test.go +0 -75
- package/go/internal/server/htmltext.go +0 -123
- package/go/internal/server/markdown.go +0 -157
- package/go/internal/server/markdown_bench_test.go +0 -42
- package/go/internal/server/markdown_test.go +0 -79
- package/go/internal/server/server.go +0 -453
- package/go/internal/server/server_bench_test.go +0 -122
- package/go/internal/server/settings.go +0 -110
- package/go/internal/server/sse.go +0 -140
- package/go/internal/server/storage.go +0 -275
- package/go/internal/server/storage_test.go +0 -118
- package/go/internal/server/template.go +0 -66
- package/go/internal/server/types.go +0 -101
- package/go/internal/server/watcher.go +0 -74
- package/lefthook.yml +0 -8
- package/nvim-readit/lua/readit/health.lua +0 -64
- package/nvim-readit/lua/readit/init.lua +0 -463
- package/nvim-readit/plugin/readit.lua +0 -19
- package/playwright.config.ts +0 -34
- package/skills-lock.json +0 -20
- package/src/App.svelte +0 -881
- package/src/cli.ts +0 -881
- package/src/components/ActionsMenu.svelte +0 -95
- package/src/components/CommentBadge.svelte +0 -67
- package/src/components/CommentErrorBanner.svelte +0 -33
- package/src/components/CommentInput.svelte +0 -75
- package/src/components/CommentListItem.svelte +0 -95
- package/src/components/CommentManager.svelte +0 -129
- package/src/components/CommentNav.svelte +0 -109
- package/src/components/DocumentViewer.svelte +0 -218
- package/src/components/FloatingComment.svelte +0 -107
- package/src/components/Header.svelte +0 -76
- package/src/components/InlineEditor.svelte +0 -72
- package/src/components/MarginNote.svelte +0 -167
- package/src/components/MarginNotesContainer.svelte +0 -33
- package/src/components/RawModal.svelte +0 -126
- package/src/components/ReanchorConfirm.svelte +0 -30
- package/src/components/SettingsModal.svelte +0 -220
- package/src/components/ShortcutCapture.svelte +0 -82
- package/src/components/ShortcutList.svelte +0 -145
- package/src/components/TabBar.svelte +0 -52
- package/src/components/TableOfContents.svelte +0 -125
- package/src/components/ui/ActionLink.svelte +0 -40
- package/src/components/ui/Button.svelte +0 -53
- package/src/components/ui/Dialog.svelte +0 -97
- package/src/components/ui/DropdownMenu.svelte +0 -85
- package/src/components/ui/DropdownMenuItem.svelte +0 -38
- package/src/components/ui/DropdownMenuSeparator.svelte +0 -11
- package/src/components/ui/Text.svelte +0 -42
- package/src/env.d.ts +0 -6
- package/src/index.css +0 -754
- package/src/lib/__fixtures__/bench-data.ts +0 -114
- package/src/lib/anchor.bench.ts +0 -91
- package/src/lib/anchor.test.ts +0 -527
- package/src/lib/anchor.ts +0 -381
- package/src/lib/comment-storage.bench.ts +0 -49
- package/src/lib/comment-storage.test.ts +0 -632
- package/src/lib/comment-storage.ts +0 -222
- package/src/lib/export.bench.ts +0 -21
- package/src/lib/export.ts +0 -36
- package/src/lib/headings.test.ts +0 -103
- package/src/lib/headings.ts +0 -44
- package/src/lib/highlight/core.test.ts +0 -93
- package/src/lib/highlight/dom.ts +0 -187
- package/src/lib/highlight/highlight-registry.ts +0 -221
- package/src/lib/highlight/highlight.bench.ts +0 -92
- package/src/lib/highlight/highlighter.ts +0 -247
- package/src/lib/highlight/resolver.ts +0 -38
- package/src/lib/highlight/types.ts +0 -17
- package/src/lib/html-text.test.ts +0 -162
- package/src/lib/html-text.ts +0 -161
- package/src/lib/i18n/en.ts +0 -116
- package/src/lib/i18n/index.ts +0 -3
- package/src/lib/i18n/ja.ts +0 -118
- package/src/lib/i18n/translations.ts +0 -27
- package/src/lib/i18n/types.ts +0 -122
- package/src/lib/margin-layout.bench.ts +0 -61
- package/src/lib/margin-layout.ts +0 -71
- package/src/lib/markdown-renderer.test.ts +0 -154
- package/src/lib/markdown-renderer.ts +0 -177
- package/src/lib/mermaid-config.ts +0 -38
- package/src/lib/mermaid-renderer.ts +0 -162
- package/src/lib/mermaid-worker.ts +0 -60
- package/src/lib/positions.ts +0 -157
- package/src/lib/shortcut-registry.ts +0 -244
- package/src/lib/utils.ts +0 -15
- package/src/main.ts +0 -16
- package/src/schema.ts +0 -92
- package/src/server.ts +0 -1220
- package/src/stores/app.svelte.ts +0 -231
- package/src/stores/locale.svelte.ts +0 -46
- package/src/stores/settings.svelte.ts +0 -90
- package/src/stores/shortcuts.svelte.ts +0 -104
- package/src/stores/ui.svelte.ts +0 -12
- package/src/template.ts +0 -104
- package/src/test-setup.ts +0 -48
- package/svelte.config.js +0 -5
- package/test.md +0 -74
- package/tsconfig.cli.json +0 -12
- package/tsconfig.json +0 -20
- package/vite.config.ts +0 -47
- package/vitest.config.ts +0 -15
- package/vscode-readit/.mcp.json +0 -7
- package/vscode-readit/.vscodeignore +0 -7
- package/vscode-readit/bun.lock +0 -78
- package/vscode-readit/icon.svg +0 -10
- package/vscode-readit/package.json +0 -110
- package/vscode-readit/src/extension.ts +0 -117
- package/vscode-readit/src/server-manager.ts +0 -272
- package/vscode-readit/src/webview-provider.ts +0 -204
- package/vscode-readit/tsconfig.json +0 -20
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import { JSDOM } from "jsdom";
|
|
2
|
-
import { describe, expect, it } from "vitest";
|
|
3
|
-
import { getDOMTextContent } from "./highlight/dom";
|
|
4
|
-
import { extractTextFromHtml } from "./html-text";
|
|
5
|
-
import { renderMarkdown } from "./markdown-renderer";
|
|
6
|
-
|
|
7
|
-
const DOM_GLOBALS = ["document", "NodeFilter"] as const;
|
|
8
|
-
|
|
9
|
-
function browserExtract(html: string): string {
|
|
10
|
-
const dom = new JSDOM(
|
|
11
|
-
`<!DOCTYPE html><body><article>${html}</article></body>`,
|
|
12
|
-
);
|
|
13
|
-
const saved = Object.fromEntries(
|
|
14
|
-
DOM_GLOBALS.map((k) => [k, (globalThis as Record<string, unknown>)[k]]),
|
|
15
|
-
);
|
|
16
|
-
try {
|
|
17
|
-
for (const k of DOM_GLOBALS) {
|
|
18
|
-
(globalThis as Record<string, unknown>)[k] = dom.window[k];
|
|
19
|
-
}
|
|
20
|
-
const container = dom.window.document.querySelector("article")!;
|
|
21
|
-
return getDOMTextContent(container);
|
|
22
|
-
} finally {
|
|
23
|
-
for (const k of DOM_GLOBALS) {
|
|
24
|
-
if (saved[k] !== undefined) {
|
|
25
|
-
(globalThis as Record<string, unknown>)[k] = saved[k];
|
|
26
|
-
} else {
|
|
27
|
-
delete (globalThis as Record<string, unknown>)[k];
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
describe("extractTextFromHtml", () => {
|
|
34
|
-
it("extracts plain text from paragraphs", () => {
|
|
35
|
-
const html = "<p>Hello world</p><p>Second paragraph</p>";
|
|
36
|
-
expect(extractTextFromHtml(html)).toBe("Hello world\nSecond paragraph");
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
it("handles headings", () => {
|
|
40
|
-
const html = "<h1>Title</h1><p>Content</p>";
|
|
41
|
-
expect(extractTextFromHtml(html)).toBe("Title\nContent");
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
it("handles nested block elements (no extra newline)", () => {
|
|
45
|
-
const html = "<blockquote><p>Quoted text</p></blockquote><p>After</p>";
|
|
46
|
-
const result = extractTextFromHtml(html);
|
|
47
|
-
expect(result).toContain("Quoted text");
|
|
48
|
-
expect(result).toContain("After");
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
it("handles lists", () => {
|
|
52
|
-
const html = "<ul><li>Item 1</li><li>Item 2</li></ul>";
|
|
53
|
-
expect(extractTextFromHtml(html)).toBe("Item 1\nItem 2");
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
it("handles inline elements within blocks", () => {
|
|
57
|
-
const html = "<p>Text with <strong>bold</strong> and <em>italic</em></p>";
|
|
58
|
-
expect(extractTextFromHtml(html)).toBe("Text with bold and italic");
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
it("decodes HTML entities", () => {
|
|
62
|
-
const html = "<p><div> & "quotes"</p>";
|
|
63
|
-
expect(extractTextFromHtml(html)).toBe('<div> & "quotes"');
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
it("handles code blocks", () => {
|
|
67
|
-
const html =
|
|
68
|
-
'<pre><code>function hello() {\n return "world";\n}</code></pre>';
|
|
69
|
-
expect(extractTextFromHtml(html)).toContain("function hello()");
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
describe("extractTextFromHtml conformance with getDOMTextContent", () => {
|
|
74
|
-
it("matches browser extraction for simple markdown", async () => {
|
|
75
|
-
const md = `# Hello
|
|
76
|
-
|
|
77
|
-
This is a paragraph.
|
|
78
|
-
|
|
79
|
-
## Section
|
|
80
|
-
|
|
81
|
-
Another paragraph here.
|
|
82
|
-
`;
|
|
83
|
-
const { html } = await renderMarkdown(md);
|
|
84
|
-
const serverText = extractTextFromHtml(html);
|
|
85
|
-
const browserText = browserExtract(html);
|
|
86
|
-
expect(serverText).toBe(browserText);
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
it("matches browser extraction for lists", async () => {
|
|
90
|
-
const md = `- Item 1
|
|
91
|
-
- Item 2
|
|
92
|
-
- Item 3
|
|
93
|
-
`;
|
|
94
|
-
const { html } = await renderMarkdown(md);
|
|
95
|
-
const serverText = extractTextFromHtml(html);
|
|
96
|
-
const browserText = browserExtract(html);
|
|
97
|
-
expect(serverText).toBe(browserText);
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
it("matches browser extraction for code blocks", async () => {
|
|
101
|
-
const md = `# Code
|
|
102
|
-
|
|
103
|
-
\`\`\`typescript
|
|
104
|
-
function hello() {
|
|
105
|
-
return "world";
|
|
106
|
-
}
|
|
107
|
-
\`\`\`
|
|
108
|
-
|
|
109
|
-
After code.
|
|
110
|
-
`;
|
|
111
|
-
const { html } = await renderMarkdown(md);
|
|
112
|
-
const serverText = extractTextFromHtml(html);
|
|
113
|
-
const browserText = browserExtract(html);
|
|
114
|
-
expect(serverText).toBe(browserText);
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
it("matches browser extraction for tables", async () => {
|
|
118
|
-
const md = `| A | B |
|
|
119
|
-
|---|---|
|
|
120
|
-
| 1 | 2 |
|
|
121
|
-
| 3 | 4 |
|
|
122
|
-
`;
|
|
123
|
-
const { html } = await renderMarkdown(md);
|
|
124
|
-
const serverText = extractTextFromHtml(html);
|
|
125
|
-
const browserText = browserExtract(html);
|
|
126
|
-
expect(serverText).toBe(browserText);
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
it("matches browser extraction for complex document", async () => {
|
|
130
|
-
const md = `# Performance Test Document
|
|
131
|
-
|
|
132
|
-
This section covers topic 1 in detail. It contains various formatting including **bold**, *italic*, and \`inline code\`.
|
|
133
|
-
|
|
134
|
-
## Section 2
|
|
135
|
-
|
|
136
|
-
- Item 1 in section 2
|
|
137
|
-
- Item 2 in section 2
|
|
138
|
-
- Item 3 in section 2
|
|
139
|
-
|
|
140
|
-
\`\`\`typescript
|
|
141
|
-
function section2() {
|
|
142
|
-
const value = 2 * 42;
|
|
143
|
-
return "result from section 2: " + value;
|
|
144
|
-
}
|
|
145
|
-
\`\`\`
|
|
146
|
-
|
|
147
|
-
The conclusion of section 2 summarizes the key findings.
|
|
148
|
-
|
|
149
|
-
| Column A | Column B | Column C |
|
|
150
|
-
|----------|----------|----------|
|
|
151
|
-
| Cell 1 | Cell 2 | Cell 3 |
|
|
152
|
-
|
|
153
|
-
> A blockquote with some text.
|
|
154
|
-
|
|
155
|
-
Final paragraph.
|
|
156
|
-
`;
|
|
157
|
-
const { html } = await renderMarkdown(md);
|
|
158
|
-
const serverText = extractTextFromHtml(html);
|
|
159
|
-
const browserText = browserExtract(html);
|
|
160
|
-
expect(serverText).toBe(browserText);
|
|
161
|
-
});
|
|
162
|
-
});
|
package/src/lib/html-text.ts
DELETED
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
const BLOCK_ELEMENTS = new Set([
|
|
2
|
-
"p",
|
|
3
|
-
"div",
|
|
4
|
-
"h1",
|
|
5
|
-
"h2",
|
|
6
|
-
"h3",
|
|
7
|
-
"h4",
|
|
8
|
-
"h5",
|
|
9
|
-
"h6",
|
|
10
|
-
"pre",
|
|
11
|
-
"blockquote",
|
|
12
|
-
"li",
|
|
13
|
-
"tr",
|
|
14
|
-
"br",
|
|
15
|
-
]);
|
|
16
|
-
|
|
17
|
-
interface TextNode {
|
|
18
|
-
text: string;
|
|
19
|
-
blockAncestorPath: string[];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function extractTextFromHtml(html: string): string {
|
|
23
|
-
const textNodes = collectTextNodesFromHtml(html);
|
|
24
|
-
if (textNodes.length === 0) return "";
|
|
25
|
-
|
|
26
|
-
let result = "";
|
|
27
|
-
let lastBlockPath: string[] | null = null;
|
|
28
|
-
|
|
29
|
-
for (const node of textNodes) {
|
|
30
|
-
if (lastBlockPath) {
|
|
31
|
-
const lastBlock = lastBlockPath;
|
|
32
|
-
const currBlock = node.blockAncestorPath;
|
|
33
|
-
|
|
34
|
-
if (
|
|
35
|
-
lastBlock.length > 0 &&
|
|
36
|
-
currBlock.length > 0 &&
|
|
37
|
-
!isNested(lastBlock, currBlock)
|
|
38
|
-
) {
|
|
39
|
-
if (
|
|
40
|
-
lastBlock[lastBlock.length - 1] !== currBlock[currBlock.length - 1]
|
|
41
|
-
) {
|
|
42
|
-
result += "\n";
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
result += node.text;
|
|
48
|
-
lastBlockPath = node.blockAncestorPath;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return result;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function isNested(pathA: string[], pathB: string[]): boolean {
|
|
55
|
-
const blockA = pathA[pathA.length - 1];
|
|
56
|
-
const blockB = pathB[pathB.length - 1];
|
|
57
|
-
|
|
58
|
-
if (pathB.includes(blockA)) return true;
|
|
59
|
-
if (pathA.includes(blockB)) return true;
|
|
60
|
-
return false;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function collectTextNodesFromHtml(html: string): TextNode[] {
|
|
64
|
-
const nodes: TextNode[] = [];
|
|
65
|
-
const stack: { tag: string; id: string }[] = [];
|
|
66
|
-
let idCounter = 0;
|
|
67
|
-
|
|
68
|
-
const tagPattern = /<\/?([a-zA-Z][a-zA-Z0-9]*)[^>]*\/?>/g;
|
|
69
|
-
let lastIndex = 0;
|
|
70
|
-
let match: RegExpExecArray | null;
|
|
71
|
-
|
|
72
|
-
match = tagPattern.exec(html);
|
|
73
|
-
while (match !== null) {
|
|
74
|
-
if (match.index > lastIndex) {
|
|
75
|
-
const text = decodeEntities(html.slice(lastIndex, match.index));
|
|
76
|
-
if (text) {
|
|
77
|
-
nodes.push({
|
|
78
|
-
text,
|
|
79
|
-
blockAncestorPath: getBlockAncestorPath(stack),
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
const fullTag = match[0];
|
|
85
|
-
const tagName = match[1].toLowerCase();
|
|
86
|
-
const isClosing = fullTag.startsWith("</");
|
|
87
|
-
const isSelfClosing = fullTag.endsWith("/>") || isVoidElement(tagName);
|
|
88
|
-
|
|
89
|
-
if (isClosing) {
|
|
90
|
-
for (let i = stack.length - 1; i >= 0; i--) {
|
|
91
|
-
if (stack[i].tag === tagName) {
|
|
92
|
-
stack.splice(i);
|
|
93
|
-
break;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
} else if (!isSelfClosing) {
|
|
97
|
-
stack.push({ tag: tagName, id: `e${idCounter++}` });
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
lastIndex = match.index + fullTag.length;
|
|
101
|
-
match = tagPattern.exec(html);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
if (lastIndex < html.length) {
|
|
105
|
-
const text = decodeEntities(html.slice(lastIndex));
|
|
106
|
-
if (text) {
|
|
107
|
-
nodes.push({
|
|
108
|
-
text,
|
|
109
|
-
blockAncestorPath: getBlockAncestorPath(stack),
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
return nodes;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
function getBlockAncestorPath(stack: { tag: string; id: string }[]): string[] {
|
|
118
|
-
const path: string[] = [];
|
|
119
|
-
for (const entry of stack) {
|
|
120
|
-
if (BLOCK_ELEMENTS.has(entry.tag)) {
|
|
121
|
-
path.push(entry.id);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
return path;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
const VOID_ELEMENTS = new Set([
|
|
128
|
-
"area",
|
|
129
|
-
"base",
|
|
130
|
-
"br",
|
|
131
|
-
"col",
|
|
132
|
-
"embed",
|
|
133
|
-
"hr",
|
|
134
|
-
"img",
|
|
135
|
-
"input",
|
|
136
|
-
"link",
|
|
137
|
-
"meta",
|
|
138
|
-
"param",
|
|
139
|
-
"source",
|
|
140
|
-
"track",
|
|
141
|
-
"wbr",
|
|
142
|
-
]);
|
|
143
|
-
|
|
144
|
-
function isVoidElement(tag: string): boolean {
|
|
145
|
-
return VOID_ELEMENTS.has(tag);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
function decodeEntities(text: string): string {
|
|
149
|
-
return text
|
|
150
|
-
.replace(/&/g, "&")
|
|
151
|
-
.replace(/</g, "<")
|
|
152
|
-
.replace(/>/g, ">")
|
|
153
|
-
.replace(/"/g, '"')
|
|
154
|
-
.replace(/'/g, "'")
|
|
155
|
-
.replace(/'/g, "'")
|
|
156
|
-
.replace(/ /g, "\u00A0")
|
|
157
|
-
.replace(/&#(\d+);/g, (_, code) => String.fromCharCode(Number(code)))
|
|
158
|
-
.replace(/&#x([0-9a-fA-F]+);/g, (_, hex) =>
|
|
159
|
-
String.fromCharCode(Number.parseInt(hex, 16)),
|
|
160
|
-
);
|
|
161
|
-
}
|
package/src/lib/i18n/en.ts
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import type { Translations } from "./types";
|
|
2
|
-
|
|
3
|
-
export const en: Translations = {
|
|
4
|
-
// App
|
|
5
|
-
"app.loading": "Loading...",
|
|
6
|
-
"app.noDocuments": "No documents open.",
|
|
7
|
-
"app.noDocumentsHintPrefix": "Run",
|
|
8
|
-
"app.noDocumentsHintSuffix": "to add a file.",
|
|
9
|
-
"app.footer": "Made with ❤️ by Jay and Claude",
|
|
10
|
-
|
|
11
|
-
// Header
|
|
12
|
-
"header.selectTextToReanchor": "Select text to re-anchor",
|
|
13
|
-
|
|
14
|
-
// Actions menu
|
|
15
|
-
"actions.ariaLabel": "Actions menu",
|
|
16
|
-
"actions.settings": "Settings",
|
|
17
|
-
"actions.reload": "Reload",
|
|
18
|
-
"actions.copyAll": "Copy All",
|
|
19
|
-
"actions.exportJson": "Export JSON",
|
|
20
|
-
"actions.viewRaw": "View Raw",
|
|
21
|
-
|
|
22
|
-
// Settings
|
|
23
|
-
"settings.title": "Settings",
|
|
24
|
-
"settings.theme": "Theme",
|
|
25
|
-
"settings.font": "Font",
|
|
26
|
-
"settings.language": "Language",
|
|
27
|
-
"settings.theme.system": "System",
|
|
28
|
-
"settings.theme.light": "Light",
|
|
29
|
-
"settings.theme.dark": "Dark",
|
|
30
|
-
"settings.font.serif": "Serif",
|
|
31
|
-
"settings.font.sansSerif": "Sans-serif",
|
|
32
|
-
|
|
33
|
-
// Comment input
|
|
34
|
-
"comment.placeholder": "Add your comment...",
|
|
35
|
-
"comment.cancel": "Cancel",
|
|
36
|
-
"comment.addNote": "Add Note",
|
|
37
|
-
"comment.highlight": "Highlight",
|
|
38
|
-
|
|
39
|
-
// Margin note
|
|
40
|
-
"marginNote.addNote": "Add note",
|
|
41
|
-
"marginNote.delete": "Delete",
|
|
42
|
-
"marginNote.edit": "Edit",
|
|
43
|
-
"marginNote.copy": "Copy",
|
|
44
|
-
|
|
45
|
-
// Comment manager
|
|
46
|
-
"commentManager.unresolved": "unresolved",
|
|
47
|
-
"commentManager.deleteAllConfirm": "Delete all {{count}} comments?",
|
|
48
|
-
"commentManager.delete": "Delete",
|
|
49
|
-
"commentManager.cancel": "Cancel",
|
|
50
|
-
"commentManager.copyAllTitle": "Copy all comments",
|
|
51
|
-
"commentManager.deleteAllTitle": "Delete all comments",
|
|
52
|
-
"commentManager.noComments": "No comments yet",
|
|
53
|
-
|
|
54
|
-
// Comment list item
|
|
55
|
-
"commentList.edit": "Edit",
|
|
56
|
-
"commentList.delete": "Delete",
|
|
57
|
-
"commentList.goTo": "Go to",
|
|
58
|
-
"commentList.reanchor": "Re-anchor",
|
|
59
|
-
"commentList.unresolved": "unresolved",
|
|
60
|
-
|
|
61
|
-
// Comment nav
|
|
62
|
-
"commentNav.previous": "Previous comment (Alt+↑)",
|
|
63
|
-
"commentNav.next": "Next comment (Alt+↓)",
|
|
64
|
-
"commentNav.of": "{{current}} of {{total}}",
|
|
65
|
-
|
|
66
|
-
// Inline editor
|
|
67
|
-
"editor.save": "Save",
|
|
68
|
-
"editor.cancel": "Cancel",
|
|
69
|
-
|
|
70
|
-
// Reanchor confirm
|
|
71
|
-
"reanchor.question": "Re-anchor to this selection?",
|
|
72
|
-
"reanchor.confirm": "Confirm",
|
|
73
|
-
"reanchor.cancel": "Cancel",
|
|
74
|
-
|
|
75
|
-
// Raw comments modal
|
|
76
|
-
"rawModal.title": "Raw Comments",
|
|
77
|
-
"rawModal.copyTitle": "Copy to clipboard",
|
|
78
|
-
"rawModal.loading": "Loading...",
|
|
79
|
-
"rawModal.noComments": "No comments file yet. Add comments to create one.",
|
|
80
|
-
"rawModal.copiedToClipboard": "Copied to clipboard",
|
|
81
|
-
"rawModal.failedToCopy": "Failed to copy",
|
|
82
|
-
|
|
83
|
-
// Toast messages
|
|
84
|
-
"toast.copied": 'Copied: "{{text}}"',
|
|
85
|
-
"toast.copiedAllComments": "Copied all comments",
|
|
86
|
-
|
|
87
|
-
// Comment badge
|
|
88
|
-
"commentBadge.title": "{{count}} comment",
|
|
89
|
-
"commentBadge.titlePlural": "{{count}} comments",
|
|
90
|
-
|
|
91
|
-
// Keyboard shortcuts
|
|
92
|
-
"shortcuts.title": "Keyboard Shortcuts",
|
|
93
|
-
"shortcutGroup.copy": "Copy",
|
|
94
|
-
"shortcutGroup.navigate": "Navigate",
|
|
95
|
-
"shortcutGroup.other": "Other",
|
|
96
|
-
"shortcuts.resetToDefaults": "Reset to defaults",
|
|
97
|
-
"shortcuts.enableDisable": "Enable/disable shortcut",
|
|
98
|
-
"shortcutCapture.pressKeys": "Press keys...",
|
|
99
|
-
"shortcutCapture.reserved": "{{binding}} is reserved",
|
|
100
|
-
"shortcutCapture.ariaLabel": "Press a key combination",
|
|
101
|
-
"shortcut.copyAll.label": "Copy All (AI)",
|
|
102
|
-
"shortcut.copyAll.description": "Copy all comments in AI prompt format",
|
|
103
|
-
"shortcut.copyAllRaw.label": "Copy All (Raw)",
|
|
104
|
-
"shortcut.copyAllRaw.description": "Copy all comments as raw text",
|
|
105
|
-
"shortcut.navigateNext.label": "Next Comment",
|
|
106
|
-
"shortcut.navigateNext.description": "Navigate to next comment",
|
|
107
|
-
"shortcut.navigatePrevious.label": "Previous Comment",
|
|
108
|
-
"shortcut.navigatePrevious.description": "Navigate to previous comment",
|
|
109
|
-
"shortcut.copySelectionRaw.label": "Copy Selection",
|
|
110
|
-
"shortcut.copySelectionRaw.description": "Copy selected text",
|
|
111
|
-
"shortcut.copySelectionLLM.label": "Copy Selection (LLM)",
|
|
112
|
-
"shortcut.copySelectionLLM.description":
|
|
113
|
-
"Copy selected text with context for LLM",
|
|
114
|
-
"shortcut.clearSelection.label": "Clear Selection",
|
|
115
|
-
"shortcut.clearSelection.description": "Clear text selection",
|
|
116
|
-
};
|
package/src/lib/i18n/index.ts
DELETED
package/src/lib/i18n/ja.ts
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import type { Translations } from "./types";
|
|
2
|
-
|
|
3
|
-
export const ja: Translations = {
|
|
4
|
-
// App
|
|
5
|
-
"app.loading": "読み込み中...",
|
|
6
|
-
"app.noDocuments": "開いているドキュメントがありません。",
|
|
7
|
-
"app.noDocumentsHintPrefix": "",
|
|
8
|
-
"app.noDocumentsHintSuffix": "を実行してファイルを追加してください。",
|
|
9
|
-
"app.footer": "Made with ❤️ by Jay and Claude",
|
|
10
|
-
|
|
11
|
-
// Header
|
|
12
|
-
"header.selectTextToReanchor": "テキストを選択して再アンカー",
|
|
13
|
-
|
|
14
|
-
// Actions menu
|
|
15
|
-
"actions.ariaLabel": "操作メニュー",
|
|
16
|
-
"actions.settings": "設定",
|
|
17
|
-
"actions.reload": "再読み込み",
|
|
18
|
-
"actions.copyAll": "全てコピー",
|
|
19
|
-
"actions.exportJson": "JSONエクスポート",
|
|
20
|
-
"actions.viewRaw": "生データを表示",
|
|
21
|
-
|
|
22
|
-
// Settings
|
|
23
|
-
"settings.title": "設定",
|
|
24
|
-
"settings.theme": "テーマ",
|
|
25
|
-
"settings.font": "フォント",
|
|
26
|
-
"settings.language": "言語",
|
|
27
|
-
"settings.theme.system": "システム",
|
|
28
|
-
"settings.theme.light": "ライト",
|
|
29
|
-
"settings.theme.dark": "ダーク",
|
|
30
|
-
"settings.font.serif": "明朝体",
|
|
31
|
-
"settings.font.sansSerif": "ゴシック体",
|
|
32
|
-
|
|
33
|
-
// Comment input
|
|
34
|
-
"comment.placeholder": "コメントを入力...",
|
|
35
|
-
"comment.cancel": "キャンセル",
|
|
36
|
-
"comment.addNote": "メモを追加",
|
|
37
|
-
"comment.highlight": "ハイライト",
|
|
38
|
-
|
|
39
|
-
// Margin note
|
|
40
|
-
"marginNote.addNote": "メモを追加",
|
|
41
|
-
"marginNote.delete": "削除",
|
|
42
|
-
"marginNote.edit": "編集",
|
|
43
|
-
"marginNote.copy": "コピー",
|
|
44
|
-
|
|
45
|
-
// Comment manager
|
|
46
|
-
"commentManager.unresolved": "未解決",
|
|
47
|
-
"commentManager.deleteAllConfirm":
|
|
48
|
-
"{{count}}件のコメントを全て削除しますか?",
|
|
49
|
-
"commentManager.delete": "削除",
|
|
50
|
-
"commentManager.cancel": "キャンセル",
|
|
51
|
-
"commentManager.copyAllTitle": "全てのコメントをコピー",
|
|
52
|
-
"commentManager.deleteAllTitle": "全てのコメントを削除",
|
|
53
|
-
"commentManager.noComments": "コメントはまだありません",
|
|
54
|
-
|
|
55
|
-
// Comment list item
|
|
56
|
-
"commentList.edit": "編集",
|
|
57
|
-
"commentList.delete": "削除",
|
|
58
|
-
"commentList.goTo": "移動",
|
|
59
|
-
"commentList.reanchor": "再アンカー",
|
|
60
|
-
"commentList.unresolved": "未解決",
|
|
61
|
-
|
|
62
|
-
// Comment nav
|
|
63
|
-
"commentNav.previous": "前のコメント (Alt+↑)",
|
|
64
|
-
"commentNav.next": "次のコメント (Alt+↓)",
|
|
65
|
-
"commentNav.of": "{{current}} / {{total}}",
|
|
66
|
-
|
|
67
|
-
// Inline editor
|
|
68
|
-
"editor.save": "保存",
|
|
69
|
-
"editor.cancel": "キャンセル",
|
|
70
|
-
|
|
71
|
-
// Reanchor confirm
|
|
72
|
-
"reanchor.question": "この選択範囲に再アンカーしますか?",
|
|
73
|
-
"reanchor.confirm": "確認",
|
|
74
|
-
"reanchor.cancel": "キャンセル",
|
|
75
|
-
|
|
76
|
-
// Raw comments modal
|
|
77
|
-
"rawModal.title": "コメント生データ",
|
|
78
|
-
"rawModal.copyTitle": "クリップボードにコピー",
|
|
79
|
-
"rawModal.loading": "読み込み中...",
|
|
80
|
-
"rawModal.noComments":
|
|
81
|
-
"コメントファイルはまだありません。コメントを追加して作成してください。",
|
|
82
|
-
"rawModal.copiedToClipboard": "クリップボードにコピーしました",
|
|
83
|
-
"rawModal.failedToCopy": "コピーに失敗しました",
|
|
84
|
-
|
|
85
|
-
// Toast messages
|
|
86
|
-
"toast.copied": 'コピーしました: "{{text}}"',
|
|
87
|
-
"toast.copiedAllComments": "全てのコメントをコピーしました",
|
|
88
|
-
|
|
89
|
-
// Comment badge
|
|
90
|
-
"commentBadge.title": "{{count}}件のコメント",
|
|
91
|
-
"commentBadge.titlePlural": "{{count}}件のコメント",
|
|
92
|
-
|
|
93
|
-
// Keyboard shortcuts
|
|
94
|
-
"shortcuts.title": "キーボードショートカット",
|
|
95
|
-
"shortcutGroup.copy": "コピー",
|
|
96
|
-
"shortcutGroup.navigate": "ナビゲーション",
|
|
97
|
-
"shortcutGroup.other": "その他",
|
|
98
|
-
"shortcuts.resetToDefaults": "初期設定に戻す",
|
|
99
|
-
"shortcuts.enableDisable": "ショートカットの有効/無効",
|
|
100
|
-
"shortcutCapture.pressKeys": "キーを入力...",
|
|
101
|
-
"shortcutCapture.reserved": "{{binding}} は予約されています",
|
|
102
|
-
"shortcutCapture.ariaLabel": "キーの組み合わせを入力",
|
|
103
|
-
"shortcut.copyAll.label": "全てコピー (AI)",
|
|
104
|
-
"shortcut.copyAll.description": "全コメントをAIプロンプト形式でコピー",
|
|
105
|
-
"shortcut.copyAllRaw.label": "全てコピー (テキスト)",
|
|
106
|
-
"shortcut.copyAllRaw.description": "全コメントをテキストとしてコピー",
|
|
107
|
-
"shortcut.navigateNext.label": "次のコメント",
|
|
108
|
-
"shortcut.navigateNext.description": "次のコメントに移動",
|
|
109
|
-
"shortcut.navigatePrevious.label": "前のコメント",
|
|
110
|
-
"shortcut.navigatePrevious.description": "前のコメントに移動",
|
|
111
|
-
"shortcut.copySelectionRaw.label": "選択をコピー",
|
|
112
|
-
"shortcut.copySelectionRaw.description": "選択テキストをコピー",
|
|
113
|
-
"shortcut.copySelectionLLM.label": "選択をコピー (LLM)",
|
|
114
|
-
"shortcut.copySelectionLLM.description":
|
|
115
|
-
"選択テキストをLLMコンテキスト付きでコピー",
|
|
116
|
-
"shortcut.clearSelection.label": "選択を解除",
|
|
117
|
-
"shortcut.clearSelection.description": "テキスト選択を解除",
|
|
118
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { en } from "./en";
|
|
2
|
-
import { ja } from "./ja";
|
|
3
|
-
import type { Locale, TranslationKey, Translations } from "./types";
|
|
4
|
-
import { Locales } from "./types";
|
|
5
|
-
|
|
6
|
-
const translationMap: Record<Locale, Translations> = {
|
|
7
|
-
[Locales.JA]: ja,
|
|
8
|
-
[Locales.EN]: en,
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export function createT(locale: Locale) {
|
|
12
|
-
const translations = translationMap[locale];
|
|
13
|
-
|
|
14
|
-
return function t(
|
|
15
|
-
key: TranslationKey,
|
|
16
|
-
params?: Record<string, string | number>,
|
|
17
|
-
): string {
|
|
18
|
-
let value = translations[key];
|
|
19
|
-
if (!params) return value;
|
|
20
|
-
|
|
21
|
-
for (const [param, replacement] of Object.entries(params)) {
|
|
22
|
-
value = value.replaceAll(`{{${param}}}`, String(replacement));
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return value;
|
|
26
|
-
};
|
|
27
|
-
}
|