@chisquare-tech/origine-ngx-apps-code 0.10.0 → 0.11.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.
@@ -1483,7 +1483,7 @@ class RepoHomePage extends RepoPage {
1483
1483
  @for (e of tree()?.entries ?? []; track e.path) {
1484
1484
  <a class="o-row o-click" [routerLink]="e.type === 'tree' ? link() : link('blob')" [queryParams]="qp(e.path)" [attr.data-testid]="'entry-' + e.name">
1485
1485
  <span class="ic" aria-hidden="true">{{ e.type === 'tree' ? '▸' : '·' }}</span>
1486
- <span class="o-mono o-sm" style="width:200px;flex:none" [class.o-b5]="e.type === 'tree'">{{ e.name }}</span>
1486
+ <span class="o-mono o-sm" style="width:200px;flex:none" [class.o-b5]="e.type === 'tree'">{{ e.name }}@if (e.lfs) {<span class="o-chip" style="margin-left:6px" title="Stored with Git LFS" [attr.data-testid]="'lfs-' + e.name">LFS</span>}</span>
1487
1487
  <span class="o-ell o-faint o-sm" style="flex:1">{{ e.lastCommit?.subject }}</span>
1488
1488
  <span class="o-faint o-sm">{{ ago(e.lastCommit?.committer?.when) }}</span>
1489
1489
  </a>
@@ -1615,7 +1615,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
1615
1615
  @for (e of tree()?.entries ?? []; track e.path) {
1616
1616
  <a class="o-row o-click" [routerLink]="e.type === 'tree' ? link() : link('blob')" [queryParams]="qp(e.path)" [attr.data-testid]="'entry-' + e.name">
1617
1617
  <span class="ic" aria-hidden="true">{{ e.type === 'tree' ? '▸' : '·' }}</span>
1618
- <span class="o-mono o-sm" style="width:200px;flex:none" [class.o-b5]="e.type === 'tree'">{{ e.name }}</span>
1618
+ <span class="o-mono o-sm" style="width:200px;flex:none" [class.o-b5]="e.type === 'tree'">{{ e.name }}@if (e.lfs) {<span class="o-chip" style="margin-left:6px" title="Stored with Git LFS" [attr.data-testid]="'lfs-' + e.name">LFS</span>}</span>
1619
1619
  <span class="o-ell o-faint o-sm" style="flex:1">{{ e.lastCommit?.subject }}</span>
1620
1620
  <span class="o-faint o-sm">{{ ago(e.lastCommit?.committer?.when) }}</span>
1621
1621
  </a>
@@ -1790,6 +1790,7 @@ class FilePage extends RepoPage {
1790
1790
  this.copied = signal(false, ...(ngDevMode ? [{ debugName: "copied" }] : /* istanbul ignore next */ []));
1791
1791
  this.ago = (s) => ago(s);
1792
1792
  this.initials = initials;
1793
+ this.size = size;
1793
1794
  this.crumbs = computed(() => {
1794
1795
  const parts = this.path().split('/').filter(Boolean);
1795
1796
  return parts.map((name, i) => ({ name, path: parts.slice(0, i + 1).join('/') }));
@@ -1798,7 +1799,7 @@ class FilePage extends RepoPage {
1798
1799
  const b = this.blob();
1799
1800
  if (!b)
1800
1801
  return '';
1801
- return [b.binary ? '' : `${b.lineCount} lines`, size(b.size), b.language ?? ''].filter(Boolean).join(' · ');
1802
+ return [b.lfs ? 'Stored with Git LFS' : '', b.binary || b.truncated ? '' : `${b.lineCount} lines`, size(b.size), b.language ?? ''].filter(Boolean).join(' · ');
1802
1803
  }, ...(ngDevMode ? [{ debugName: "meta" }] : /* istanbul ignore next */ []));
1803
1804
  this.mode = signal('', ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
1804
1805
  this.text = signal(null, ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
@@ -1949,12 +1950,12 @@ class FilePage extends RepoPage {
1949
1950
  @if (b.markdown) {
1950
1951
  <div class="o-seg" role="group" aria-label="View"><button type="button" [class.o-on]="view() === 'preview'" (click)="view.set('preview')">Preview</button><button type="button" [class.o-on]="view() === 'code'" (click)="view.set('code')">Code</button></div>
1951
1952
  }
1952
- @if (!b.binary && !b.truncated) {<button type="button" class="o-btn o-xs" [class.o-on]="blaming()" [attr.aria-pressed]="blaming()" (click)="toggleBlame()">Blame</button>}
1953
+ @if (!b.binary && !b.truncated && !b.lfs) {<button type="button" class="o-btn o-xs" [class.o-on]="blaming()" [attr.aria-pressed]="blaming()" (click)="toggleBlame()">Blame</button>}
1953
1954
  @if (b.rawUrl) {<a class="o-btn o-xs" [href]="b.rawUrl" target="_blank" rel="noopener">Raw</a>}
1954
1955
  @if (!b.binary) {<button type="button" class="o-btn o-xs" (click)="copyText()">{{ copied() ? 'Copied' : 'Copy' }}</button>}
1955
1956
  @if (b.downloadUrl) {<a class="o-btn o-xs" [href]="b.downloadUrl">Download</a>}
1956
1957
  @if (editable()) {
1957
- @if (!b.binary && !b.truncated) {<button type="button" class="o-btn o-xs" (click)="startEdit()" [disabled]="mode() !== ''" data-testid="file-edit">Edit</button>}
1958
+ @if (!b.binary && !b.truncated && !b.lfs) {<button type="button" class="o-btn o-xs" (click)="startEdit()" [disabled]="mode() !== ''" data-testid="file-edit">Edit</button>}
1958
1959
  <button type="button" class="o-btn o-xs" (click)="mode.set('delete')" [disabled]="mode() !== ''" data-testid="file-delete">Delete</button>
1959
1960
  }
1960
1961
  </span>
@@ -1975,6 +1976,8 @@ class FilePage extends RepoPage {
1975
1976
  }
1976
1977
  @if (b.image && b.rawUrl) {
1977
1978
  <div class="o-cb" style="text-align:center"><img [src]="b.rawUrl" [alt]="b.name" style="max-width:100%" /></div>
1979
+ } @else if (b.lfs && !b.lfs.stored) {
1980
+ <div class="o-empty" data-testid="lfs-missing">This file is a Git LFS pointer to an object that was never uploaded (<span class="o-mono">{{ b.lfs.oid.slice(0, 12) }}</span>, {{ size(b.lfs.size) }}).</div>
1978
1981
  } @else if (b.binary || b.truncated) {
1979
1982
  <div class="o-empty">{{ b.binary ? 'A binary file.' : 'Too large to show here.' }} @if (b.rawUrl) {<a [href]="b.rawUrl" target="_blank" rel="noopener">View raw</a>}</div>
1980
1983
  } @else if (b.markdown && view() === 'preview') {
@@ -2033,12 +2036,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
2033
2036
  @if (b.markdown) {
2034
2037
  <div class="o-seg" role="group" aria-label="View"><button type="button" [class.o-on]="view() === 'preview'" (click)="view.set('preview')">Preview</button><button type="button" [class.o-on]="view() === 'code'" (click)="view.set('code')">Code</button></div>
2035
2038
  }
2036
- @if (!b.binary && !b.truncated) {<button type="button" class="o-btn o-xs" [class.o-on]="blaming()" [attr.aria-pressed]="blaming()" (click)="toggleBlame()">Blame</button>}
2039
+ @if (!b.binary && !b.truncated && !b.lfs) {<button type="button" class="o-btn o-xs" [class.o-on]="blaming()" [attr.aria-pressed]="blaming()" (click)="toggleBlame()">Blame</button>}
2037
2040
  @if (b.rawUrl) {<a class="o-btn o-xs" [href]="b.rawUrl" target="_blank" rel="noopener">Raw</a>}
2038
2041
  @if (!b.binary) {<button type="button" class="o-btn o-xs" (click)="copyText()">{{ copied() ? 'Copied' : 'Copy' }}</button>}
2039
2042
  @if (b.downloadUrl) {<a class="o-btn o-xs" [href]="b.downloadUrl">Download</a>}
2040
2043
  @if (editable()) {
2041
- @if (!b.binary && !b.truncated) {<button type="button" class="o-btn o-xs" (click)="startEdit()" [disabled]="mode() !== ''" data-testid="file-edit">Edit</button>}
2044
+ @if (!b.binary && !b.truncated && !b.lfs) {<button type="button" class="o-btn o-xs" (click)="startEdit()" [disabled]="mode() !== ''" data-testid="file-edit">Edit</button>}
2042
2045
  <button type="button" class="o-btn o-xs" (click)="mode.set('delete')" [disabled]="mode() !== ''" data-testid="file-delete">Delete</button>
2043
2046
  }
2044
2047
  </span>
@@ -2059,6 +2062,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
2059
2062
  }
2060
2063
  @if (b.image && b.rawUrl) {
2061
2064
  <div class="o-cb" style="text-align:center"><img [src]="b.rawUrl" [alt]="b.name" style="max-width:100%" /></div>
2065
+ } @else if (b.lfs && !b.lfs.stored) {
2066
+ <div class="o-empty" data-testid="lfs-missing">This file is a Git LFS pointer to an object that was never uploaded (<span class="o-mono">{{ b.lfs.oid.slice(0, 12) }}</span>, {{ size(b.lfs.size) }}).</div>
2062
2067
  } @else if (b.binary || b.truncated) {
2063
2068
  <div class="o-empty">{{ b.binary ? 'A binary file.' : 'Too large to show here.' }} @if (b.rawUrl) {<a [href]="b.rawUrl" target="_blank" rel="noopener">View raw</a>}</div>
2064
2069
  } @else if (b.markdown && view() === 'preview') {