@vue-skuilder/db 0.2.26 → 0.2.27

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.
@@ -1889,7 +1889,8 @@ var init_generators = __esm({
1889
1889
  // src/core/navigators/generators/prescribed.ts
1890
1890
  var prescribed_exports = {};
1891
1891
  __export(prescribed_exports, {
1892
- default: () => PrescribedCardsGenerator
1892
+ default: () => PrescribedCardsGenerator,
1893
+ unmetIntroExposeTags: () => unmetIntroExposeTags
1893
1894
  });
1894
1895
  function dedupe(arr) {
1895
1896
  return [...new Set(arr)];
@@ -1929,6 +1930,19 @@ function formatAge(ms) {
1929
1930
  if (hours < 24) return `${hours}h`;
1930
1931
  return `${Math.round(hours / 24)}d`;
1931
1932
  }
1933
+ function unmetIntroExposeTags(tags, userTagElo, minCount) {
1934
+ if (minCount <= 0) return [];
1935
+ const exposeTags = new Set(tags.filter((tag) => tag.startsWith("gpc:expose:")));
1936
+ for (const tag of tags) {
1937
+ if (!tag.startsWith("gpc:intro:")) continue;
1938
+ const suffix = tag.slice("gpc:intro:".length);
1939
+ if (suffix) exposeTags.add(`gpc:expose:${suffix}`);
1940
+ }
1941
+ return [...exposeTags].filter((tag) => {
1942
+ const tagElo = userTagElo[tag];
1943
+ return !tagElo || tagElo.count < minCount;
1944
+ });
1945
+ }
1932
1946
  function pickTopByScore(cards, limit) {
1933
1947
  return [...cards].sort((a, b) => b.score - a.score || a.cardId.localeCompare(b.cardId)).slice(0, limit);
1934
1948
  }
@@ -2227,6 +2241,7 @@ var init_prescribed = __esm({
2227
2241
  freshnessWindowSessions: typeof raw.freshnessWindowSessions === "number" ? raw.freshnessWindowSessions : DEFAULT_FRESHNESS_WINDOW,
2228
2242
  maxDirectTargetsPerRun: typeof raw.maxDirectTargetsPerRun === "number" ? raw.maxDirectTargetsPerRun : DEFAULT_MAX_DIRECT_PER_RUN,
2229
2243
  maxSupportCardsPerRun: typeof raw.maxSupportCardsPerRun === "number" ? raw.maxSupportCardsPerRun : DEFAULT_MAX_SUPPORT_PER_RUN,
2244
+ introExposeMinCount: typeof raw.introExposeMinCount === "number" ? raw.introExposeMinCount : DEFAULT_MIN_COUNT,
2230
2245
  hierarchyWalk: {
2231
2246
  enabled: raw.hierarchyWalk?.enabled !== false,
2232
2247
  maxDepth: typeof raw.hierarchyWalk?.maxDepth === "number" ? raw.hierarchyWalk.maxDepth : DEFAULT_HIERARCHY_DEPTH
@@ -2302,18 +2317,11 @@ var init_prescribed = __esm({
2302
2317
  group.hierarchyWalk?.enabled !== false,
2303
2318
  group.hierarchyWalk?.maxDepth ?? DEFAULT_HIERARCHY_DEPTH
2304
2319
  );
2305
- const introTags = tags.filter((tag) => tag.startsWith("gpc:intro:"));
2306
- const exposeTags = new Set(tags.filter((tag) => tag.startsWith("gpc:expose:")));
2307
- for (const introTag of introTags) {
2308
- const suffix = introTag.slice("gpc:intro:".length);
2309
- if (suffix) {
2310
- exposeTags.add(`gpc:expose:${suffix}`);
2311
- }
2312
- }
2313
- const unmetExposeTags = [...exposeTags].filter((tag) => {
2314
- const tagElo = userTagElo[tag];
2315
- return !tagElo || tagElo.count < DEFAULT_MIN_COUNT;
2316
- });
2320
+ const unmetExposeTags = unmetIntroExposeTags(
2321
+ tags,
2322
+ userTagElo,
2323
+ group.introExposeMinCount ?? DEFAULT_MIN_COUNT
2324
+ );
2317
2325
  if (unmetExposeTags.length > 0) {
2318
2326
  unmetExposeTags.forEach((tag) => supportTags.add(tag));
2319
2327
  }