@estiva-app/ui 0.88.1 → 0.89.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/archivedLine.d.ts +11 -8
- package/dist/archivedLine.d.ts.map +1 -1
- package/dist/index.js +13 -6
- package/dist/index.js.map +4 -4
- package/package.json +3 -3
- package/registry.json +1 -1
- package/src/archivedLine.ts +14 -11
- package/src/archivedLine.test.ts +0 -34
package/dist/archivedLine.d.ts
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* archivedLine, the one sentence every app shows on an archived file (PEEKM-2).
|
|
3
|
-
*/
|
|
4
1
|
/**
|
|
5
2
|
* The line in the comment box's place on an archived file (CommentBox's
|
|
6
3
|
* `closed.reason`), in every app's words alike.
|
|
7
4
|
*
|
|
8
5
|
* A file archived itself says so; one archived with a file above it names the
|
|
9
6
|
* closest archived one by its kind — "Unarchive the page to comment." — so a
|
|
10
|
-
* person unarchives the right thing
|
|
11
|
-
*
|
|
12
|
-
*
|
|
7
|
+
* person unarchives the right thing. `options.in` names where to unarchive, for
|
|
8
|
+
* an app with no Unarchive of its own; `options.to` is what waits, "comment"
|
|
9
|
+
* unless said.
|
|
10
|
+
*
|
|
11
|
+
* Typed here rather than inferred, so this package's types never point at
|
|
12
|
+
* @estiva-app/conversation (bundled, not a dependency of an app's).
|
|
13
13
|
*
|
|
14
14
|
* why: https://github.com/estiva-app/estiva-docs/blob/main/decisions/a-file-is-archived-with-the-closest-archived-file-above-it.md
|
|
15
15
|
*/
|
|
16
|
-
export declare
|
|
16
|
+
export declare const archivedLine: (archive: {
|
|
17
17
|
with?: string;
|
|
18
|
-
} | undefined, noun?: string
|
|
18
|
+
} | undefined, noun?: string, options?: {
|
|
19
|
+
in?: string;
|
|
20
|
+
to?: string;
|
|
21
|
+
}) => string | undefined;
|
|
19
22
|
//# sourceMappingURL=archivedLine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archivedLine.d.ts","sourceRoot":"","sources":["../src/archivedLine.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"archivedLine.d.ts","sourceRoot":"","sources":["../src/archivedLine.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,YAAY,EAAE,CACzB,OAAO,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,EACtC,IAAI,CAAC,EAAE,MAAM,EACb,OAAO,CAAC,EAAE;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,KACnC,MAAM,GAAG,SAAoB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -4092,14 +4092,21 @@ function unavailableMemory(storageKey, limit = 300) {
|
|
|
4092
4092
|
};
|
|
4093
4093
|
}
|
|
4094
4094
|
|
|
4095
|
-
//
|
|
4096
|
-
function archivedLine(archive, noun) {
|
|
4097
|
-
if (!archive)
|
|
4098
|
-
|
|
4095
|
+
// node_modules/@estiva-app/conversation/dist/archivedLine.js
|
|
4096
|
+
function archivedLine(archive, noun, options = {}) {
|
|
4097
|
+
if (!archive)
|
|
4098
|
+
return void 0;
|
|
4099
|
+
const where = options.in?.trim() ? ` in ${options.in.trim()}` : "";
|
|
4100
|
+
const to = options.to?.trim() || "comment";
|
|
4101
|
+
if (!archive.with)
|
|
4102
|
+
return `Archived. Unarchive it${where} to ${to}.`;
|
|
4099
4103
|
const word = noun?.trim();
|
|
4100
|
-
return `Unarchive the ${word === "folder" ? "Folder" : word || "parent"} to
|
|
4104
|
+
return `Unarchive the ${word === "folder" ? "Folder" : word || "parent"}${where} to ${to}.`;
|
|
4101
4105
|
}
|
|
4102
4106
|
|
|
4107
|
+
// src/archivedLine.ts
|
|
4108
|
+
var archivedLine2 = archivedLine;
|
|
4109
|
+
|
|
4103
4110
|
// src/linkedFrom.ts
|
|
4104
4111
|
var CARD_ROWS = 7;
|
|
4105
4112
|
var KIND_PAGE = 30842;
|
|
@@ -5118,7 +5125,7 @@ export {
|
|
|
5118
5125
|
TopBar,
|
|
5119
5126
|
UnreadDot,
|
|
5120
5127
|
WithTooltip,
|
|
5121
|
-
archivedLine,
|
|
5128
|
+
archivedLine2 as archivedLine,
|
|
5122
5129
|
blockAtY,
|
|
5123
5130
|
calloutLook,
|
|
5124
5131
|
chosenOf,
|