Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(kcodeblock): improve matching perf #2562

Merged
merged 24 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
495aecb
feat(kcodeblock): support line highlight syntax
Justineo Jan 7, 2025
904eb3f
fix(kcodeblock): improve matching perf
Justineo Jan 7, 2025
ce0a2a8
fix(kcodeblock): fix review comments
Justineo Jan 7, 2025
f1bee08
fix(kcodeblock): fix the issue that single line number is beyond `max…
Justineo Jan 8, 2025
ef763b1
chore(kcodeblock): move code to minimize diff
Justineo Jan 8, 2025
c47d5ce
feat(kcodeblock): performance optimization
Justineo Jan 9, 2025
1ce3d09
chore: merge main
Justineo Jan 9, 2025
d00d86b
chore: make eslint happy
Justineo Jan 9, 2025
ad91532
fix(kcodeblock): fix sandbox
Justineo Jan 9, 2025
2632d71
fix(kcodeblock): do not need debounce update, just remove unnecessary…
Justineo Jan 9, 2025
adb51cd
fix(ktabledata): fix review comments
Justineo Jan 10, 2025
9bc3cf3
fix(ktabledata): address pr comments
Justineo Jan 10, 2025
6f7c4d0
feat(kcodeblock): precompute and cache line offsets
Justineo Jan 11, 2025
123eccc
feat(kcodeblock): optimize for empty input
Justineo Jan 12, 2025
63f8aaa
feat(kcodeblock): use regex exec instead of split
Justineo Jan 12, 2025
b20c7af
feat(kcodeblock): use regex exec for fast path too
Justineo Jan 13, 2025
76018cc
feat(kcodeblock): optimize rendering performance
Justineo Jan 13, 2025
59391a4
feat(kcodeblock): do not blow up rendered html on mode switch
Justineo Jan 14, 2025
394e705
chore(kcodeblock): add comments to reason why we have move actions ahead
Justineo Jan 14, 2025
d881970
chore(kcodeblock): add more comments
Justineo Jan 14, 2025
58dec25
feat(kcodeblock): use virtua to further improve performance
Justineo Jan 15, 2025
f0a779f
chore(kcodeblock): merge main
Justineo Jan 15, 2025
339f040
fix(kcodeblock): address review comments
Justineo Jan 16, 2025
5a061a6
chore(kcodeblock): merge main
Justineo Jan 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@
"scss.scannerExclude": [
"**/.git",
"**/bower_components"
]
],
"eslint.useFlatConfig": true
adamdehaven marked this conversation as resolved.
Show resolved Hide resolved
}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@
"date-fns-tz": "^2.0.1",
"focus-trap": "^7.6.0",
"focus-trap-vue": "^4.0.3",
"lodash-es": "^4.17.21",
"nanoid": "^5.0.9",
"sortablejs": "^1.15.3",
"swrv": "^1.0.4",
"v-calendar": "^3.1.2",
"virtua": "^0.39.3",
"vue-draggable-next": "^2.2.1"
},
"peerDependencies": {
Expand All @@ -86,6 +88,7 @@
"@semantic-release/git": "^10.0.1",
"@stylistic/stylelint-plugin": "^3.1.1",
"@types/inquirer": "^9.0.7",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.17.1",
"@types/sortablejs": "^1.15.8",
"@vitejs/plugin-vue": "^5.1.4",
Expand Down
168 changes: 104 additions & 64 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions sandbox/pages/SandboxCodeBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<KCodeBlock
v-if="highlighter"
id="syntax-highlighted-codeblock"
:code="code"
:code="`${code}\n`.repeat(100)"
:highlighted-line-numbers="highlightedLines"
language="json"
max-height="500"
Expand Down Expand Up @@ -122,7 +122,7 @@
>
<KCodeBlock
id="max-height-prop"
:code="code"
:code="`${code}\n`.repeat(100)"
language="json"
max-height="200"
searchable
Expand Down
Loading
Loading