@wildwinter/app-shell 0.25.0 → 0.27.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/dist/index.d.cts CHANGED
@@ -70,6 +70,14 @@ declare const icon: {
70
70
  /** Read-only on disk with no other holder: the resting state of everything
71
71
  * in a lock-based working copy that nobody has checked out yet. */
72
72
  readonly readOnly: "○";
73
+ /** YOU hold this one: checked out / opened by the current user, still yours to
74
+ * edit. Shares its glyph with `note`, which the table permits: an entry is a
75
+ * MEANING, and two meanings may draw the same shape. */
76
+ readonly checkedOut: "✎";
77
+ /** Tracked, with local changes not yet committed. */
78
+ readonly modified: "●";
79
+ /** Not in version control yet: new since the last commit. */
80
+ readonly untracked: "+";
73
81
  /** Something needs attention but is not fatal. */
74
82
  readonly warning: "‼";
75
83
  /** A live thing: the running position, an active marker. */
@@ -367,6 +375,12 @@ interface ShardVc {
367
375
  writable: boolean;
368
376
  lockedBy?: string[];
369
377
  outOfDate?: boolean;
378
+ /** WE hold it: still ours to edit. */
379
+ checkedOutByMe?: boolean;
380
+ /** Tracked, with uncommitted local changes. */
381
+ dirty?: boolean;
382
+ /** Not in version control yet. */
383
+ untracked?: boolean;
370
384
  }
371
385
  /** A snapshot, keyed by shard key. Absent = clean, writable, up to date. */
372
386
  type VcMap = ReadonlyMap<string, ShardVc>;
package/dist/index.d.ts CHANGED
@@ -70,6 +70,14 @@ declare const icon: {
70
70
  /** Read-only on disk with no other holder: the resting state of everything
71
71
  * in a lock-based working copy that nobody has checked out yet. */
72
72
  readonly readOnly: "○";
73
+ /** YOU hold this one: checked out / opened by the current user, still yours to
74
+ * edit. Shares its glyph with `note`, which the table permits: an entry is a
75
+ * MEANING, and two meanings may draw the same shape. */
76
+ readonly checkedOut: "✎";
77
+ /** Tracked, with local changes not yet committed. */
78
+ readonly modified: "●";
79
+ /** Not in version control yet: new since the last commit. */
80
+ readonly untracked: "+";
73
81
  /** Something needs attention but is not fatal. */
74
82
  readonly warning: "‼";
75
83
  /** A live thing: the running position, an active marker. */
@@ -367,6 +375,12 @@ interface ShardVc {
367
375
  writable: boolean;
368
376
  lockedBy?: string[];
369
377
  outOfDate?: boolean;
378
+ /** WE hold it: still ours to edit. */
379
+ checkedOutByMe?: boolean;
380
+ /** Tracked, with uncommitted local changes. */
381
+ dirty?: boolean;
382
+ /** Not in version control yet. */
383
+ untracked?: boolean;
370
384
  }
371
385
  /** A snapshot, keyed by shard key. Absent = clean, writable, up to date. */
372
386
  type VcMap = ReadonlyMap<string, ShardVc>;
package/dist/index.js CHANGED
@@ -131,6 +131,14 @@ var icon = {
131
131
  /** Read-only on disk with no other holder: the resting state of everything
132
132
  * in a lock-based working copy that nobody has checked out yet. */
133
133
  readOnly: "\u25CB",
134
+ /** YOU hold this one: checked out / opened by the current user, still yours to
135
+ * edit. Shares its glyph with `note`, which the table permits: an entry is a
136
+ * MEANING, and two meanings may draw the same shape. */
137
+ checkedOut: "\u270E",
138
+ /** Tracked, with local changes not yet committed. */
139
+ modified: "\u25CF",
140
+ /** Not in version control yet: new since the last commit. */
141
+ untracked: "+",
134
142
  /** Something needs attention but is not fatal. */
135
143
  warning: "\u203C",
136
144
  /** A live thing: the running position, an active marker. */
@@ -465,7 +473,9 @@ function pinButton(opts) {
465
473
  const reflect = () => {
466
474
  b.classList.toggle("on", pinned);
467
475
  b.setAttribute("aria-pressed", String(pinned));
468
- b.title = pinned ? "Pinned on top: click to unpin" : "Click to keep on top";
476
+ const label2 = pinned ? "Pinned on top: click to unpin" : "Click to keep on top";
477
+ b.dataset["tip"] = label2;
478
+ b.setAttribute("aria-label", label2);
469
479
  };
470
480
  reflect();
471
481
  b.addEventListener("click", () => {
@@ -772,12 +782,18 @@ function foldVc(shards, keys) {
772
782
  if (!s.writable) out.writable = false;
773
783
  if (s.lockedBy?.length) out.lockedBy = [.../* @__PURE__ */ new Set([...out.lockedBy ?? [], ...s.lockedBy])];
774
784
  if (s.outOfDate) out.outOfDate = true;
785
+ if (s.checkedOutByMe) out.checkedOutByMe = true;
786
+ if (s.dirty) out.dirty = true;
787
+ if (s.untracked) out.untracked = true;
775
788
  }
776
789
  return out;
777
790
  }
778
791
  function vcBadgeFor(s) {
779
792
  if (s?.lockedBy?.length) return { glyph: icon.locked, cls: "vc-locked", title: `Locked by ${s.lockedBy.join(", ")}` };
780
793
  if (s?.outOfDate) return { glyph: icon.down, cls: "vc-stale", title: "Out of date - a newer version is on the server" };
794
+ if (s?.checkedOutByMe) return { glyph: icon.checkedOut, cls: "vc-mine", title: "Checked out by you" };
795
+ if (s?.dirty) return { glyph: icon.modified, cls: "vc-dirty", title: "Modified - uncommitted local changes" };
796
+ if (s?.untracked) return { glyph: icon.untracked, cls: "vc-new", title: "New - not yet committed" };
781
797
  if (s && !s.writable) return { glyph: icon.readOnly, cls: "vc-frozen", title: "Read-only on disk - saving checks it out" };
782
798
  return null;
783
799
  }