@singi-labs/sifa-sdk 0.9.9 → 0.9.10
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/index.cjs +12 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1657,6 +1657,16 @@ function countFilledDimensions(input) {
|
|
|
1657
1657
|
}
|
|
1658
1658
|
return n;
|
|
1659
1659
|
}
|
|
1660
|
+
|
|
1661
|
+
// src/logic/primary-position.ts
|
|
1662
|
+
function pickPrimaryPosition(positions) {
|
|
1663
|
+
if (!positions || positions.length === 0) return void 0;
|
|
1664
|
+
const active = positions.filter((p) => !p.endedAt);
|
|
1665
|
+
if (active.length === 0) return void 0;
|
|
1666
|
+
const flagged = active.find((p) => p.primary === true);
|
|
1667
|
+
if (flagged) return flagged;
|
|
1668
|
+
return [...active].sort((a, b) => (b.startedAt ?? "").localeCompare(a.startedAt ?? ""))[0];
|
|
1669
|
+
}
|
|
1660
1670
|
function maxGraphemes(max) {
|
|
1661
1671
|
return (value) => {
|
|
1662
1672
|
const segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
@@ -1820,7 +1830,7 @@ var ProfileVolunteeringRecordSchema = zod.z.object({
|
|
|
1820
1830
|
});
|
|
1821
1831
|
|
|
1822
1832
|
// src/index.ts
|
|
1823
|
-
var SIFA_SDK_VERSION = "0.9.
|
|
1833
|
+
var SIFA_SDK_VERSION = "0.9.10";
|
|
1824
1834
|
|
|
1825
1835
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
1826
1836
|
exports.APP_URL_PATTERNS = APP_URL_PATTERNS;
|
|
@@ -1902,6 +1912,7 @@ exports.maxGraphemes = maxGraphemes;
|
|
|
1902
1912
|
exports.meetsContrastAA = meetsContrastAA;
|
|
1903
1913
|
exports.parseLocationString = parseLocationString;
|
|
1904
1914
|
exports.pdsProviderFromApi = pdsProviderFromApi;
|
|
1915
|
+
exports.pickPrimaryPosition = pickPrimaryPosition;
|
|
1905
1916
|
exports.profileToDimensionInputs = profileToDimensionInputs;
|
|
1906
1917
|
exports.relativeLuminance = relativeLuminance;
|
|
1907
1918
|
exports.resolveCardUrl = resolveCardUrl;
|