@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.
@@ -1698,7 +1698,8 @@ var init_generators = __esm({
1698
1698
  // src/core/navigators/generators/prescribed.ts
1699
1699
  var prescribed_exports = {};
1700
1700
  __export(prescribed_exports, {
1701
- default: () => PrescribedCardsGenerator
1701
+ default: () => PrescribedCardsGenerator,
1702
+ unmetIntroExposeTags: () => unmetIntroExposeTags
1702
1703
  });
1703
1704
  function dedupe(arr) {
1704
1705
  return [...new Set(arr)];
@@ -1738,6 +1739,19 @@ function formatAge(ms) {
1738
1739
  if (hours < 24) return `${hours}h`;
1739
1740
  return `${Math.round(hours / 24)}d`;
1740
1741
  }
1742
+ function unmetIntroExposeTags(tags, userTagElo, minCount) {
1743
+ if (minCount <= 0) return [];
1744
+ const exposeTags = new Set(tags.filter((tag) => tag.startsWith("gpc:expose:")));
1745
+ for (const tag of tags) {
1746
+ if (!tag.startsWith("gpc:intro:")) continue;
1747
+ const suffix = tag.slice("gpc:intro:".length);
1748
+ if (suffix) exposeTags.add(`gpc:expose:${suffix}`);
1749
+ }
1750
+ return [...exposeTags].filter((tag) => {
1751
+ const tagElo = userTagElo[tag];
1752
+ return !tagElo || tagElo.count < minCount;
1753
+ });
1754
+ }
1741
1755
  function pickTopByScore(cards, limit) {
1742
1756
  return [...cards].sort((a, b) => b.score - a.score || a.cardId.localeCompare(b.cardId)).slice(0, limit);
1743
1757
  }
@@ -2036,6 +2050,7 @@ var init_prescribed = __esm({
2036
2050
  freshnessWindowSessions: typeof raw.freshnessWindowSessions === "number" ? raw.freshnessWindowSessions : DEFAULT_FRESHNESS_WINDOW,
2037
2051
  maxDirectTargetsPerRun: typeof raw.maxDirectTargetsPerRun === "number" ? raw.maxDirectTargetsPerRun : DEFAULT_MAX_DIRECT_PER_RUN,
2038
2052
  maxSupportCardsPerRun: typeof raw.maxSupportCardsPerRun === "number" ? raw.maxSupportCardsPerRun : DEFAULT_MAX_SUPPORT_PER_RUN,
2053
+ introExposeMinCount: typeof raw.introExposeMinCount === "number" ? raw.introExposeMinCount : DEFAULT_MIN_COUNT,
2039
2054
  hierarchyWalk: {
2040
2055
  enabled: raw.hierarchyWalk?.enabled !== false,
2041
2056
  maxDepth: typeof raw.hierarchyWalk?.maxDepth === "number" ? raw.hierarchyWalk.maxDepth : DEFAULT_HIERARCHY_DEPTH
@@ -2111,18 +2126,11 @@ var init_prescribed = __esm({
2111
2126
  group.hierarchyWalk?.enabled !== false,
2112
2127
  group.hierarchyWalk?.maxDepth ?? DEFAULT_HIERARCHY_DEPTH
2113
2128
  );
2114
- const introTags = tags.filter((tag) => tag.startsWith("gpc:intro:"));
2115
- const exposeTags = new Set(tags.filter((tag) => tag.startsWith("gpc:expose:")));
2116
- for (const introTag of introTags) {
2117
- const suffix = introTag.slice("gpc:intro:".length);
2118
- if (suffix) {
2119
- exposeTags.add(`gpc:expose:${suffix}`);
2120
- }
2121
- }
2122
- const unmetExposeTags = [...exposeTags].filter((tag) => {
2123
- const tagElo = userTagElo[tag];
2124
- return !tagElo || tagElo.count < DEFAULT_MIN_COUNT;
2125
- });
2129
+ const unmetExposeTags = unmetIntroExposeTags(
2130
+ tags,
2131
+ userTagElo,
2132
+ group.introExposeMinCount ?? DEFAULT_MIN_COUNT
2133
+ );
2126
2134
  if (unmetExposeTags.length > 0) {
2127
2135
  unmetExposeTags.forEach((tag) => supportTags.add(tag));
2128
2136
  }