@singi-labs/sifa-sdk 0.20.1 → 0.20.2

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.
Files changed (35) hide show
  1. package/dist/index.cjs +53 -1
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +11 -1
  4. package/dist/index.d.ts +11 -1
  5. package/dist/index.js +5 -1
  6. package/dist/index.js.map +1 -1
  7. package/dist/query/fetchers/index.cjs +55 -5
  8. package/dist/query/fetchers/index.cjs.map +1 -1
  9. package/dist/query/fetchers/index.d.cts +1 -1
  10. package/dist/query/fetchers/index.d.ts +1 -1
  11. package/dist/query/fetchers/index.js +6 -0
  12. package/dist/query/fetchers/index.js.map +1 -1
  13. package/dist/query/fetchers/roadmap.js +56 -3
  14. package/dist/query/fetchers/roadmap.js.map +1 -1
  15. package/dist/query/hooks/index.cjs +66 -5
  16. package/dist/query/hooks/index.cjs.map +1 -1
  17. package/dist/query/hooks/index.d.cts +2 -2
  18. package/dist/query/hooks/index.d.ts +2 -2
  19. package/dist/query/hooks/index.js +8 -1
  20. package/dist/query/hooks/index.js.map +1 -1
  21. package/dist/query/hooks/use-roadmap-mutations.js +36 -0
  22. package/dist/query/hooks/use-roadmap-mutations.js.map +1 -1
  23. package/dist/query/index.cjs +89 -5
  24. package/dist/query/index.cjs.map +1 -1
  25. package/dist/query/index.d.cts +3 -3
  26. package/dist/query/index.d.ts +3 -3
  27. package/dist/query/index.js +14 -1
  28. package/dist/query/index.js.map +1 -1
  29. package/dist/roadmap/board-body.js +55 -0
  30. package/dist/roadmap/board-body.js.map +1 -0
  31. package/dist/{use-user-settings-YIv1C3qN.d.cts → use-user-settings-Cq_AHkkM.d.cts} +14 -2
  32. package/dist/{use-user-settings-CrS3ZXoW.d.ts → use-user-settings-DoNP3tNl.d.ts} +14 -2
  33. package/dist/{user-settings-Bvafly0r.d.ts → user-settings-CBtacio1.d.ts} +52 -1
  34. package/dist/{user-settings-DWq91Gj-.d.cts → user-settings-DDP76dZH.d.cts} +52 -1
  35. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -7848,6 +7848,57 @@ function roadmapIssueUrl(issue) {
7848
7848
  return `https://github.com/${ROADMAP_ISSUES_REPO}/issues/${issue}`;
7849
7849
  }
7850
7850
 
7851
+ // src/roadmap/board-body.ts
7852
+ var TRACKING_PREFIX = "tracking:";
7853
+ var ISSUE_PATH_PREFIX = `/${ROADMAP_ISSUES_REPO}/issues/`;
7854
+ var TRAILING_PUNCTUATION = /* @__PURE__ */ new Set([">", ".", ",", ";", ")"]);
7855
+ function roadmapIssueNumber(candidate) {
7856
+ let url;
7857
+ try {
7858
+ url = new URL(candidate);
7859
+ } catch {
7860
+ return null;
7861
+ }
7862
+ if (url.protocol !== "https:" || url.hostname !== "github.com") return null;
7863
+ if (url.search || url.hash || !url.pathname.startsWith(ISSUE_PATH_PREFIX)) return null;
7864
+ const rest = url.pathname.slice(ISSUE_PATH_PREFIX.length);
7865
+ if (rest.length === 0 || rest.length > 9) return null;
7866
+ for (const ch of rest) if (ch < "0" || ch > "9") return null;
7867
+ return Number(rest);
7868
+ }
7869
+ function trimEntry(raw) {
7870
+ const start = raw.startsWith("<") ? 1 : 0;
7871
+ let end = raw.length;
7872
+ while (end > start && TRAILING_PUNCTUATION.has(raw[end - 1] ?? "")) end--;
7873
+ return raw.slice(start, end);
7874
+ }
7875
+ function parseTrackingLine(entries) {
7876
+ const numbers = [];
7877
+ for (const raw of entries.split(",").flatMap((part) => part.split(" "))) {
7878
+ const candidate = trimEntry(raw.trim());
7879
+ if (!candidate) continue;
7880
+ const number = roadmapIssueNumber(candidate);
7881
+ if (number === null) return null;
7882
+ numbers.push(number);
7883
+ }
7884
+ return numbers.length > 0 ? numbers : null;
7885
+ }
7886
+ function splitRoadmapBody(body) {
7887
+ const issues = [];
7888
+ const kept = [];
7889
+ for (const line of (body ?? "").split("\n")) {
7890
+ const trimmed = line.trim();
7891
+ const numbers = trimmed.toLowerCase().startsWith(TRACKING_PREFIX) ? parseTrackingLine(trimmed.slice(TRACKING_PREFIX.length)) : null;
7892
+ if (!numbers) {
7893
+ kept.push(line);
7894
+ continue;
7895
+ }
7896
+ for (const number of numbers) issues.push({ number, url: roadmapIssueUrl(number) });
7897
+ }
7898
+ const description = kept.join("\n").trim();
7899
+ return { description: description || null, issues };
7900
+ }
7901
+
7851
7902
  // src/repo/groups.ts
7852
7903
  var SIFA_REPO_GROUPS = [
7853
7904
  {
@@ -8044,7 +8095,7 @@ function describeSifaRecord(collection, value) {
8044
8095
  }
8045
8096
 
8046
8097
  // src/index.ts
8047
- var SIFA_SDK_VERSION = "0.20.1";
8098
+ var SIFA_SDK_VERSION = "0.20.2";
8048
8099
 
8049
8100
  exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
8050
8101
  exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
@@ -8391,6 +8442,7 @@ exports.sortPositions = sortPositions;
8391
8442
  exports.sortProjects = sortProjects;
8392
8443
  exports.sortPublications = sortPublications;
8393
8444
  exports.splitCoursesByRole = splitCoursesByRole;
8445
+ exports.splitRoadmapBody = splitRoadmapBody;
8394
8446
  exports.streamAddressSchema = streamAddressSchema;
8395
8447
  exports.streamAuthorSchema = streamAuthorSchema;
8396
8448
  exports.streamCardBodyContent = streamCardBodyContent;