Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,6 @@ jobs:
key: deriveddata-build-app-macos26-${{ hashFiles('GhosttyTabs.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}-${{ hashFiles('GhosttyTabs.xcodeproj/project.pbxproj') }}
restore-keys: |
deriveddata-build-app-macos26-${{ hashFiles('GhosttyTabs.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}-
deriveddata-build-app-macos26-

- name: Cache Swift packages
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
Expand Down Expand Up @@ -543,7 +542,6 @@ jobs:
key: deriveddata-tests-macos26-shard${{ matrix.shard }}-${{ hashFiles('GhosttyTabs.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}-${{ hashFiles('GhosttyTabs.xcodeproj/project.pbxproj') }}
restore-keys: |
deriveddata-tests-macos26-shard${{ matrix.shard }}-${{ hashFiles('GhosttyTabs.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}-
deriveddata-tests-macos26-shard${{ matrix.shard }}-

- name: Cache Swift packages
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/nightly-extended-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ jobs:
key: deriveddata-build-app-macos26-${{ hashFiles('GhosttyTabs.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}-${{ hashFiles('GhosttyTabs.xcodeproj/project.pbxproj') }}
restore-keys: |
deriveddata-build-app-macos26-${{ hashFiles('GhosttyTabs.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}-
deriveddata-build-app-macos26-

- name: Cache Swift packages
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ jobs:
run: |
./scripts/verify_sparkle_artifact.sh \
"build-universal/Build/Products/Release/Programa.app" \
"2.9.6"
"2.10.1"

- name: Notarize app
env:
Expand Down
4 changes: 2 additions & 2 deletions GhosttyTabs.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2322,7 +2322,7 @@
repositoryURL = "https://github.com/sparkle-project/Sparkle";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 2.9.6;
minimumVersion = 2.10.1;
};
};
A5001292 /* XCRemoteSwiftPackageReference "swift-markdown-ui" */ = {
Expand Down Expand Up @@ -2350,7 +2350,7 @@
repositoryURL = "https://github.com/mattt/swift-toml";
requirement = {
kind = exactVersion;
version = 2.0.0;
version = 2.1.0;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 38 additions & 25 deletions Resources/review-diff-viewer/chunks/diff-vendor.mjs

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions Resources/review-diff-viewer/chunks/diff-worker.mjs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import{D as m,c as T,B as k}from"./stream-tokenizer-DK9xp5M5.mjs";import{f as v,a as L}from"./diff-worker.mjs";import{c as z,i as x,L as d}from"./pierre-highlights.mjs";import"./preload-helper.mjs";import"./pierre-theming.mjs";import"./shiki-core.mjs";var D=class{options;resolveOptions;#e;#t;#r=!1;#n;#i=!1;#o;#s;constructor(e,t){this.options=e,this.resolveOptions=t,this.#t=e.textDocument.version,this.#e=this.#h()}#h(){return new d({...this.resolveOptions({lang:this.options.textDocument.languageId,theme:this.options.theme,cssVariablePrefix:v("token"),tokenizeMaxLineLength:this.options.tokenizeMaxLineLength??1e3}),code:this.options.textDocument.getText(),renderRange:[0,0],onDeferTokenize:e=>this.#l(e)})}#l(e){const t=this.#o;if(t!=null){for(const[i,n]of e)t.set(i,n);return}const s=this.#n;if(s!=null){for(const i of e.keys())i>=s[0]&&i<s[1]&&e.delete(i);if(e.size===0)return}this.options.onDeferTokenize(e)}#u(e){const t=this.#s;if(t!=null){for(const[s,i]of e)t.set(s,i);return}this.#s=e,queueMicrotask(()=>{const s=this.#s;this.#s=void 0,s!=null&&s.size>0&&!this.#r&&this.options.onDeferTokenize(s)})}tokenize(e,t,s=!1){const i=this.options.textDocument,n=Math.min(t?.startingLine??0,i.lineCount),o=Math.min(n+(t?.totalLines??1/0),i.lineCount),r=Math.max(n,e.startLine);this.#i=!1;let h;if(this.#t!==i.version)this.#s=void 0,h=this.#c(e,[n,o]).lines,this.#t=i.version;else if(this.#e.lineCount!==i.lineCount)this.#s=void 0,h=this.#e.reset(i.getText(),{renderRange:[n,o]}).lines;else{if(h=new Map,this.#a(h,r,o),this.#s!=null)for(const l of h.keys())this.#s.delete(l);return h}return(e.lineDelta===0?e.changedLineChanges?.some(([,,l])=>l!==0)??!1:!s)&&this.#a(h,r,o),h}#c(e,t){const s=this.options.textDocument,i={renderRange:t};if(Math.abs(s.version-this.#t)===1&&e.changes.length>0&&this.#e.lineCount===e.previousLineCount)try{const n=this.#e.applyEdits(e.changes.map(({range:o,text:r})=>({range:o,newText:r})),i);if(this.#e.lineCount===s.lineCount)return n}catch(n){if(!(n instanceof RangeError))throw n}return this.#e.reset(s.getText(),i)}#a(e,t,s){this.#n=[t,s];try{this.#e.flush(s)}finally{this.#n=void 0}for(let i=t;i<s;i++){if(e.has(i))continue;const{tokens:n}=this.#e.getLineTokens(i);e.set(i,n.length===0?[[0,"",""]]:n.map(o=>[o.offset,o.color??"",o.content]))}}setTheme(e){e!==this.options.theme&&(this.options.theme=e,this.#e.dispose(),this.#s=void 0,this.#i=!1,this.#t=this.options.textDocument.version,this.#e=this.#h())}getStringCommentRegexpRangesInLine(e){const t=this.options.textDocument;if(this.options.matchBrackets===!1||e<0||e>=t.lineCount)return null;const s=new Map;this.#o=s;try{(this.#t!==t.version||this.#e.lineCount!==t.lineCount)&&(this.#s=void 0,this.#e.reset(t.getText(),{renderRange:[e,e+1]}),this.#t=t.version),this.#e.flush(e+1)}finally{this.#o=void 0,this.#i&&this.#e.pause()}return s.size>0&&this.#u(s),this.#e.getLineTokens(e).bracketIgnoredRanges}prebuildStateStack(){}stopBackgroundTokenize(){this.pauseBackgroundTokenize()}pauseBackgroundTokenize(){this.#i=!0,this.#e.pause()}resumeBackgroundTokenize(){this.#i=!1,this.#e.resume()}dispose(){this.#r=!0,this.#s=void 0,this.#e.dispose()}};const g=1024,p={line:0,character:0};var C=class f extends k{options;#e;#t=g;constructor(t){super(),this.options=t,this.#e=new d(t)}tokenizeChunk(t,s){const i=[...t.matchAll(/\r\n|\r|\n/g)],n=this.#e.lineCount-1,o={line:n,character:this.#e.getLineLength(n)};this.#e.applyEdits([{range:{start:o,end:o},newText:t}]);const r=this.#e.lineCount-1;let h=[];for(let a=n;a<=r;a++){const{tokens:u}=this.#e.getLineTokens(a);for(const c of u)c.offset+=this.stableOffset;a<r?(L(s,u),this.pushLineBreak(s,this.#e.getLineLength(a),i[a-n][0])):h=u}const l=this.#e.getLineLength(r);if(r>this.#t){const a=this.#e.getText(),{lineChanges:u}=this.#e.applyEdits([{range:{start:p,end:{line:r-1,character:0}},newText:""}]);if(u.every(c=>c.newEndLine<=1))this.#t=g;else{const c=this.#e.getText().length;this.#e.applyEdits([{range:{start:p,end:p},newText:a.slice(0,a.length-c)}]),this.#t=r*2}}return{unstable:h,tailLength:l}}clone(){this.assertActive();const t=new f(this.options);return t.#e.reset(this.#e.getText()),this.copyStateTo(t),t}resetSource(){this.#e.reset(""),this.#t=g}releaseSource(){this.#e.dispose()}},O=class extends m{usedThemes=new Map;constructor(){super("highlights",T("highlights"))}getTheme(e){this.assertNotDisposed();const t=this.themeResolver.getResolvedTheme(e)??this.usedThemes.get(e);if(t==null)throw new Error(`Theme "${e}" has not been resolved`);return this.usedThemes.set(e,t),t}codeToTokens(e,t){return this.assertNotDisposed(),z(e,this.resolveOptions(t))}createEditorTokenizer(e){return this.assertNotDisposed(),new D(e,t=>this.resolveOptions(t))}createStreamTokenizer(e){return new C(this.resolveOptions(e))}loadLanguages(){return this.assertNotDisposed(),Promise.resolve()}hasLoadedLanguages(){return!this.disposed}attachLanguages(){this.assertNotDisposed()}releaseResources(){this.usedThemes.clear()}resolveOptions({theme:e,themes:t,...s}){const i=x(s.lang)?s.lang:"text";if(e!=null)return{...s,lang:i,theme:this.getZedTheme(e)};if(t==null)throw new Error("A theme or themes option is required");const n={};for(const[o,r]of Object.entries(t))n[o]=this.getZedTheme(r);return{...s,lang:i,themes:n}}getZedTheme(e){const t=this.getTheme(e);if(t.zed==null)throw new Error(`Theme "${e}" does not support Highlights`);return t.zed}};export{O as HighlightsHighlighter};
1 change: 1 addition & 0 deletions Resources/review-diff-viewer/chunks/highlights.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import{f as m,B as T,b as k,D as v,c as L}from"./diff-vendor.mjs";import{L as d,c as z,i as x}from"./pierre-highlights.mjs";import"./shiki-core.mjs";import"./preload-helper.mjs";import"./pierre-theming.mjs";var D=class{options;resolveOptions;#e;#t;#r=!1;#n;#i=!1;#o;#s;constructor(e,t){this.options=e,this.resolveOptions=t,this.#t=e.textDocument.version,this.#e=this.#h()}#h(){return new d({...this.resolveOptions({lang:this.options.textDocument.languageId,theme:this.options.theme,cssVariablePrefix:m("token"),tokenizeMaxLineLength:this.options.tokenizeMaxLineLength??1e3}),code:this.options.textDocument.getText(),renderRange:[0,0],onDeferTokenize:e=>this.#l(e)})}#l(e){const t=this.#o;if(t!=null){for(const[i,n]of e)t.set(i,n);return}const s=this.#n;if(s!=null){for(const i of e.keys())i>=s[0]&&i<s[1]&&e.delete(i);if(e.size===0)return}this.options.onDeferTokenize(e)}#u(e){const t=this.#s;if(t!=null){for(const[s,i]of e)t.set(s,i);return}this.#s=e,queueMicrotask(()=>{const s=this.#s;this.#s=void 0,s!=null&&s.size>0&&!this.#r&&this.options.onDeferTokenize(s)})}tokenize(e,t,s=!1){const i=this.options.textDocument,n=Math.min(t?.startingLine??0,i.lineCount),o=Math.min(n+(t?.totalLines??1/0),i.lineCount),r=Math.max(n,e.startLine);this.#i=!1;let h;if(this.#t!==i.version)this.#s=void 0,h=this.#c(e,[n,o]).lines,this.#t=i.version;else if(this.#e.lineCount!==i.lineCount)this.#s=void 0,h=this.#e.reset(i.getText(),{renderRange:[n,o]}).lines;else{if(h=new Map,this.#a(h,r,o),this.#s!=null)for(const l of h.keys())this.#s.delete(l);return h}return(e.lineDelta===0?e.changedLineChanges?.some(([,,l])=>l!==0)??!1:!s)&&this.#a(h,r,o),h}#c(e,t){const s=this.options.textDocument,i={renderRange:t};if(Math.abs(s.version-this.#t)===1&&e.changes.length>0&&this.#e.lineCount===e.previousLineCount)try{const n=this.#e.applyEdits(e.changes.map(({range:o,text:r})=>({range:o,newText:r})),i);if(this.#e.lineCount===s.lineCount)return n}catch(n){if(!(n instanceof RangeError))throw n}return this.#e.reset(s.getText(),i)}#a(e,t,s){this.#n=[t,s];try{this.#e.flush(s)}finally{this.#n=void 0}for(let i=t;i<s;i++){if(e.has(i))continue;const{tokens:n}=this.#e.getLineTokens(i);e.set(i,n.length===0?[[0,"",""]]:n.map(o=>[o.offset,o.color??"",o.content]))}}setTheme(e){e!==this.options.theme&&(this.options.theme=e,this.#e.dispose(),this.#s=void 0,this.#i=!1,this.#t=this.options.textDocument.version,this.#e=this.#h())}getStringCommentRegexpRangesInLine(e){const t=this.options.textDocument;if(this.options.matchBrackets===!1||e<0||e>=t.lineCount)return null;const s=new Map;this.#o=s;try{(this.#t!==t.version||this.#e.lineCount!==t.lineCount)&&(this.#s=void 0,this.#e.reset(t.getText(),{renderRange:[e,e+1]}),this.#t=t.version),this.#e.flush(e+1)}finally{this.#o=void 0,this.#i&&this.#e.pause()}return s.size>0&&this.#u(s),this.#e.getLineTokens(e).bracketIgnoredRanges}prebuildStateStack(){}stopBackgroundTokenize(){this.pauseBackgroundTokenize()}pauseBackgroundTokenize(){this.#i=!0,this.#e.pause()}resumeBackgroundTokenize(){this.#i=!1,this.#e.resume()}dispose(){this.#r=!0,this.#s=void 0,this.#e.dispose()}};const g=1024,p={line:0,character:0};var C=class f extends T{options;#e;#t=g;constructor(t){super(),this.options=t,this.#e=new d(t)}tokenizeChunk(t,s){const i=[...t.matchAll(/\r\n|\r|\n/g)],n=this.#e.lineCount-1,o={line:n,character:this.#e.getLineLength(n)};this.#e.applyEdits([{range:{start:o,end:o},newText:t}]);const r=this.#e.lineCount-1;let h=[];for(let a=n;a<=r;a++){const{tokens:u}=this.#e.getLineTokens(a);for(const c of u)c.offset+=this.stableOffset;a<r?(k(s,u),this.pushLineBreak(s,this.#e.getLineLength(a),i[a-n][0])):h=u}const l=this.#e.getLineLength(r);if(r>this.#t){const a=this.#e.getText(),{lineChanges:u}=this.#e.applyEdits([{range:{start:p,end:{line:r-1,character:0}},newText:""}]);if(u.every(c=>c.newEndLine<=1))this.#t=g;else{const c=this.#e.getText().length;this.#e.applyEdits([{range:{start:p,end:p},newText:a.slice(0,a.length-c)}]),this.#t=r*2}}return{unstable:h,tailLength:l}}clone(){this.assertActive();const t=new f(this.options);return t.#e.reset(this.#e.getText()),this.copyStateTo(t),t}resetSource(){this.#e.reset(""),this.#t=g}releaseSource(){this.#e.dispose()}},M=class extends v{usedThemes=new Map;constructor(){super("highlights",L("highlights"))}getTheme(e){this.assertNotDisposed();const t=this.themeResolver.getResolvedTheme(e)??this.usedThemes.get(e);if(t==null)throw new Error(`Theme "${e}" has not been resolved`);return this.usedThemes.set(e,t),t}codeToTokens(e,t){return this.assertNotDisposed(),z(e,this.resolveOptions(t))}createEditorTokenizer(e){return this.assertNotDisposed(),new D(e,t=>this.resolveOptions(t))}createStreamTokenizer(e){return new C(this.resolveOptions(e))}loadLanguages(){return this.assertNotDisposed(),Promise.resolve()}hasLoadedLanguages(){return!this.disposed}attachLanguages(){this.assertNotDisposed()}releaseResources(){this.usedThemes.clear()}resolveOptions({theme:e,themes:t,...s}){const i=x(s.lang)?s.lang:"text";if(e!=null)return{...s,lang:i,theme:this.getZedTheme(e)};if(t==null)throw new Error("A theme or themes option is required");const n={};for(const[o,r]of Object.entries(t))n[o]=this.getZedTheme(r);return{...s,lang:i,themes:n}}getZedTheme(e){const t=this.getTheme(e);if(t.zed==null)throw new Error(`Theme "${e}" does not support Highlights`);return t.zed}};export{M as HighlightsHighlighter};
Loading
Loading