@punica/editor 1.11.2 → 1.12.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@punica/editor",
3
- "version": "1.11.2",
3
+ "version": "1.12.0",
4
4
  "description": "Punica Editor",
5
5
  "private": false,
6
6
  "type": "module",
@@ -55,11 +55,32 @@ declare module 'punica' {
55
55
  command?: string;
56
56
  menu?: AppBarMenuItem[];
57
57
  /**
58
- * Command id returning a one-line summary rendered as the menu header
59
- * (e.g. the licence state). Dropped when the command is not registered,
60
- * which is how a host without the surface stays quiet.
58
+ * Command id returning the summary rendered as the menu header (e.g. the
59
+ * licence state, or who the app is licensed to). Dropped when the
60
+ * command is not registered, which is how a host without the surface
61
+ * stays quiet.
62
+ *
63
+ * A returned string may carry newlines, and each line is rendered as its
64
+ * own row with the first one emphasised — enough for a name over an
65
+ * address. Lines are clipped rather than wrapped, so a long address
66
+ * cannot widen the menu.
61
67
  */
62
68
  summaryCommand?: string;
69
+ /**
70
+ * Command id returning the avatar's glyph, at most two characters (a
71
+ * user's initials). Avatar items only.
72
+ *
73
+ * This exists because the glyph is identity and identity is not known
74
+ * when a profile is written: `label` is static, and a host cannot patch
75
+ * one item without re-declaring the whole thing, menu included. So the
76
+ * profile names a command and the host answers it.
77
+ *
78
+ * Called when the item renders and again whenever its menu opens, which
79
+ * is what makes a licence activated mid-session show up. Anything other
80
+ * than a non-empty string leaves the glyph as `label`'s first letter, so
81
+ * a host with no account has nothing to implement.
82
+ */
83
+ initialsCommand?: string;
63
84
  }
64
85
 
65
86
  /** A profile's app bar composition (see `ProfileShellSpec.appBar`). */