@ai-matrx/vault 0.1.41 → 0.1.42
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/CHANGELOG.md +6 -1
- package/dist/index.cjs +16 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.1.
|
|
3
|
+
## 0.1.42
|
|
4
4
|
|
|
5
5
|
UNVERIFIED: this release has no Unreleased entry and the source comparison could not be made (the caller supplied no source comparison). Whether source changed is unknown; consumer action is unknown.
|
|
6
6
|
Check the package's gitHead on npm against this version's gitHead: `git diff <previous gitHead> <this gitHead> -- apps/shared/vault/src`.
|
|
7
7
|
|
|
8
|
+
## 0.1.41
|
|
9
|
+
|
|
10
|
+
Automatic changed-only republish (docs/metadata drift since the last published version; verified: `git diff 7448cb2ff1 f1984cb2e2 -- apps/shared/vault/src`
|
|
11
|
+
has no shipped-source changes outside tests, fixtures and docs). No consumer action required.
|
|
12
|
+
|
|
8
13
|
## 0.1.40
|
|
9
14
|
|
|
10
15
|
Automatic changed-only republish (docs/metadata drift since the last published version; verified: `git diff dcbf369af4 7448cb2ff1 -- apps/shared/vault/src`
|
package/dist/index.cjs
CHANGED
|
@@ -3242,7 +3242,6 @@ function positiveKnob(resolved, key) {
|
|
|
3242
3242
|
}
|
|
3243
3243
|
|
|
3244
3244
|
// src/organizations.ts
|
|
3245
|
-
var import_record_id_format = require("@ai-matrx/design-system/record-id-format");
|
|
3246
3245
|
function orderOrganizations(orgs, items, recentItemIds) {
|
|
3247
3246
|
const counts = /* @__PURE__ */ new Map();
|
|
3248
3247
|
for (const i of items) if (i.owner.organizationId) counts.set(i.owner.organizationId, (counts.get(i.owner.organizationId) ?? 0) + 1);
|
|
@@ -3256,9 +3255,22 @@ function orderOrganizations(orgs, items, recentItemIds) {
|
|
|
3256
3255
|
return [...orgs].sort((a, b) => group(a) - group(b) || (recent.get(a.id) ?? 0) - (recent.get(b.id) ?? 0) || a.name.localeCompare(b.name, void 0, { sensitivity: "base" }) || a.id.localeCompare(b.id));
|
|
3257
3256
|
}
|
|
3258
3257
|
function organizationHints(orgs) {
|
|
3259
|
-
const
|
|
3260
|
-
for (const o of orgs)
|
|
3261
|
-
|
|
3258
|
+
const groups = /* @__PURE__ */ new Map();
|
|
3259
|
+
for (const o of orgs) {
|
|
3260
|
+
const key = o.name.trim().toLowerCase();
|
|
3261
|
+
groups.set(key, [...groups.get(key) ?? [], o]);
|
|
3262
|
+
}
|
|
3263
|
+
const hints = /* @__PURE__ */ new Map();
|
|
3264
|
+
for (const group of groups.values()) {
|
|
3265
|
+
if (group.length < 2) continue;
|
|
3266
|
+
const longest = Math.max(...group.map((o) => o.id.length));
|
|
3267
|
+
const fragment = (o, n2) => o.id.slice(0, n2);
|
|
3268
|
+
let n = 8;
|
|
3269
|
+
while (n < longest && new Set(group.map((o) => fragment(o, n))).size < group.length) n += 1;
|
|
3270
|
+
const useSuffix = new Set(group.map((o) => fragment(o, n))).size < group.length;
|
|
3271
|
+
for (const o of group) hints.set(o.id, useSuffix ? o.id.slice(-8) : fragment(o, n));
|
|
3272
|
+
}
|
|
3273
|
+
return hints;
|
|
3262
3274
|
}
|
|
3263
3275
|
|
|
3264
3276
|
// src/shown-until-move.ts
|