@utilix-tech/sdk 0.96.0 → 0.98.0
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 +8 -0
- package/README.md +19 -1
- package/dist/{chunk-YQJ7CEUL.js → chunk-2YWKRNDM.js} +58 -1
- package/dist/{chunk-WUOZHCIC.js → chunk-PAMHORKV.js} +167 -1
- package/dist/{chunk-4EFSPTRH.js → chunk-X7IZ2OXW.js} +148 -1
- package/dist/index.cjs +370 -0
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/{json-Ca6gZCNB.d.ts → json-BtRszk1w.d.cts} +28 -2
- package/dist/{json-Ca6gZCNB.d.cts → json-BtRszk1w.d.ts} +28 -2
- package/dist/{text-DOopHoK3.d.cts → text-DFCNpyvH.d.cts} +26 -2
- package/dist/{text-DOopHoK3.d.ts → text-DFCNpyvH.d.ts} +26 -2
- package/dist/tools/json.cjs +166 -0
- package/dist/tools/json.d.cts +1 -1
- package/dist/tools/json.d.ts +1 -1
- package/dist/tools/json.js +1 -1
- package/dist/tools/text.cjs +57 -0
- package/dist/tools/text.d.cts +1 -1
- package/dist/tools/text.d.ts +1 -1
- package/dist/tools/text.js +1 -1
- package/dist/tools/units.cjs +147 -0
- package/dist/tools/units.d.cts +1 -1
- package/dist/tools/units.d.ts +1 -1
- package/dist/tools/units.js +1 -1
- package/dist/{units-CG7wn_qJ.d.ts → units-CGTx1S6B.d.cts} +74 -2
- package/dist/{units-CG7wn_qJ.d.cts → units-CGTx1S6B.d.ts} +74 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -71,6 +71,7 @@ __export(json_exports, {
|
|
|
71
71
|
resolveJsonPointer: () => resolveJsonPointer,
|
|
72
72
|
toPascalCase: () => toPascalCase,
|
|
73
73
|
toSnakeCase: () => toSnakeCase,
|
|
74
|
+
validateGeoJson: () => validateGeoJson,
|
|
74
75
|
validateJson: () => validateJson,
|
|
75
76
|
validateJsonPath: () => validateJsonPath,
|
|
76
77
|
validateJsonString: () => validateJsonString,
|
|
@@ -1689,6 +1690,171 @@ function generateJsonPatch(aJson, bJson) {
|
|
|
1689
1690
|
}
|
|
1690
1691
|
return { patch: diffJsonPatch(a, b) };
|
|
1691
1692
|
}
|
|
1693
|
+
var GEOJSON_GEOMETRY_TYPES = /* @__PURE__ */ new Set([
|
|
1694
|
+
"Point",
|
|
1695
|
+
"MultiPoint",
|
|
1696
|
+
"LineString",
|
|
1697
|
+
"MultiLineString",
|
|
1698
|
+
"Polygon",
|
|
1699
|
+
"MultiPolygon",
|
|
1700
|
+
"GeometryCollection"
|
|
1701
|
+
]);
|
|
1702
|
+
function _isGeoJsonNumber(v) {
|
|
1703
|
+
return typeof v === "number" && Number.isFinite(v);
|
|
1704
|
+
}
|
|
1705
|
+
function _isGeoJsonPosition(v) {
|
|
1706
|
+
return Array.isArray(v) && (v.length === 2 || v.length === 3) && v.every(_isGeoJsonNumber);
|
|
1707
|
+
}
|
|
1708
|
+
function _geoJsonPositionsEqual(a, b) {
|
|
1709
|
+
return a.length === b.length && a.every((v, i) => v === b[i]);
|
|
1710
|
+
}
|
|
1711
|
+
function _geoJsonRingSignedArea(ring) {
|
|
1712
|
+
let sum = 0;
|
|
1713
|
+
for (let i = 0; i < ring.length - 1; i++) {
|
|
1714
|
+
const [x1, y1] = ring[i];
|
|
1715
|
+
const [x2, y2] = ring[i + 1];
|
|
1716
|
+
sum += x1 * y2 - x2 * y1;
|
|
1717
|
+
}
|
|
1718
|
+
return sum / 2;
|
|
1719
|
+
}
|
|
1720
|
+
function _validateGeoJsonPolygonCoords(coords, path, errors, warnings) {
|
|
1721
|
+
if (!Array.isArray(coords) || coords.length === 0) {
|
|
1722
|
+
errors.push({ path, message: "Polygon coordinates must be a non-empty array of linear rings" });
|
|
1723
|
+
return;
|
|
1724
|
+
}
|
|
1725
|
+
coords.forEach((ring, i) => {
|
|
1726
|
+
const ringPath = `${path}[${i}]`;
|
|
1727
|
+
if (!Array.isArray(ring) || ring.length < 4 || !ring.every(_isGeoJsonPosition)) {
|
|
1728
|
+
errors.push({ path: ringPath, message: "each linear ring must have at least 4 positions" });
|
|
1729
|
+
return;
|
|
1730
|
+
}
|
|
1731
|
+
const first = ring[0];
|
|
1732
|
+
const last = ring[ring.length - 1];
|
|
1733
|
+
if (!_geoJsonPositionsEqual(first, last)) {
|
|
1734
|
+
errors.push({ path: ringPath, message: "the first and last positions of a linear ring must be identical (the ring must be closed)" });
|
|
1735
|
+
return;
|
|
1736
|
+
}
|
|
1737
|
+
const area = _geoJsonRingSignedArea(ring);
|
|
1738
|
+
const isExterior = i === 0;
|
|
1739
|
+
if (isExterior && area < 0) {
|
|
1740
|
+
warnings.push({ path: ringPath, message: "exterior ring winds clockwise; RFC 7946 recommends counterclockwise for exterior rings (right-hand rule)" });
|
|
1741
|
+
} else if (!isExterior && area > 0) {
|
|
1742
|
+
warnings.push({ path: ringPath, message: "interior ring (hole) winds counterclockwise; RFC 7946 recommends clockwise for interior rings (right-hand rule)" });
|
|
1743
|
+
}
|
|
1744
|
+
});
|
|
1745
|
+
}
|
|
1746
|
+
function _validateGeoJsonGeometry(geom, path, errors, warnings) {
|
|
1747
|
+
if (geom === null) return;
|
|
1748
|
+
if (typeof geom !== "object" || Array.isArray(geom)) {
|
|
1749
|
+
errors.push({ path, message: "geometry must be an object or null" });
|
|
1750
|
+
return;
|
|
1751
|
+
}
|
|
1752
|
+
const type = geom.type;
|
|
1753
|
+
if (typeof type !== "string" || !GEOJSON_GEOMETRY_TYPES.has(type)) {
|
|
1754
|
+
errors.push({ path: `${path}.type`, message: `geometry type must be one of ${[...GEOJSON_GEOMETRY_TYPES].join(", ")}` });
|
|
1755
|
+
return;
|
|
1756
|
+
}
|
|
1757
|
+
if (type === "GeometryCollection") {
|
|
1758
|
+
if (!Array.isArray(geom.geometries)) {
|
|
1759
|
+
errors.push({ path: `${path}.geometries`, message: 'GeometryCollection must have a "geometries" array' });
|
|
1760
|
+
return;
|
|
1761
|
+
}
|
|
1762
|
+
geom.geometries.forEach((g, i) => _validateGeoJsonGeometry(g, `${path}.geometries[${i}]`, errors, warnings));
|
|
1763
|
+
return;
|
|
1764
|
+
}
|
|
1765
|
+
const coords = geom.coordinates;
|
|
1766
|
+
const coordPath = `${path}.coordinates`;
|
|
1767
|
+
switch (type) {
|
|
1768
|
+
case "Point":
|
|
1769
|
+
if (!_isGeoJsonPosition(coords)) errors.push({ path: coordPath, message: "Point coordinates must be an array of 2 or 3 numbers" });
|
|
1770
|
+
break;
|
|
1771
|
+
case "MultiPoint":
|
|
1772
|
+
if (!Array.isArray(coords) || !coords.every(_isGeoJsonPosition)) {
|
|
1773
|
+
errors.push({ path: coordPath, message: "MultiPoint coordinates must be an array of positions" });
|
|
1774
|
+
}
|
|
1775
|
+
break;
|
|
1776
|
+
case "LineString":
|
|
1777
|
+
if (!Array.isArray(coords) || coords.length < 2 || !coords.every(_isGeoJsonPosition)) {
|
|
1778
|
+
errors.push({ path: coordPath, message: "LineString coordinates must be an array of at least 2 positions" });
|
|
1779
|
+
}
|
|
1780
|
+
break;
|
|
1781
|
+
case "MultiLineString":
|
|
1782
|
+
if (!Array.isArray(coords) || !coords.every((line) => Array.isArray(line) && line.length >= 2 && line.every(_isGeoJsonPosition))) {
|
|
1783
|
+
errors.push({ path: coordPath, message: "MultiLineString coordinates must be an array of LineString coordinate arrays" });
|
|
1784
|
+
}
|
|
1785
|
+
break;
|
|
1786
|
+
case "Polygon":
|
|
1787
|
+
_validateGeoJsonPolygonCoords(coords, coordPath, errors, warnings);
|
|
1788
|
+
break;
|
|
1789
|
+
case "MultiPolygon":
|
|
1790
|
+
if (!Array.isArray(coords)) {
|
|
1791
|
+
errors.push({ path: coordPath, message: "MultiPolygon coordinates must be an array of Polygon coordinate arrays" });
|
|
1792
|
+
} else {
|
|
1793
|
+
coords.forEach((poly, i) => _validateGeoJsonPolygonCoords(poly, `${coordPath}[${i}]`, errors, warnings));
|
|
1794
|
+
}
|
|
1795
|
+
break;
|
|
1796
|
+
}
|
|
1797
|
+
}
|
|
1798
|
+
function _validateGeoJsonBbox(bbox, path, errors) {
|
|
1799
|
+
if (bbox === void 0) return;
|
|
1800
|
+
if (!Array.isArray(bbox) || bbox.length % 2 !== 0 || bbox.length < 4 || !bbox.every(_isGeoJsonNumber)) {
|
|
1801
|
+
errors.push({ path: `${path}.bbox`, message: "bbox must be an array of 2*n numbers (min/max per axis)" });
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
function _validateGeoJsonFeature(feature, path, errors, warnings) {
|
|
1805
|
+
if (typeof feature !== "object" || feature === null || Array.isArray(feature)) {
|
|
1806
|
+
errors.push({ path, message: "Feature must be an object" });
|
|
1807
|
+
return;
|
|
1808
|
+
}
|
|
1809
|
+
if (feature.type !== "Feature") {
|
|
1810
|
+
errors.push({ path: `${path}.type`, message: '"type" must be "Feature"' });
|
|
1811
|
+
}
|
|
1812
|
+
if (!("properties" in feature) || typeof feature.properties !== "object") {
|
|
1813
|
+
errors.push({ path: `${path}.properties`, message: '"properties" member is required and must be an object or null' });
|
|
1814
|
+
}
|
|
1815
|
+
if (!("geometry" in feature)) {
|
|
1816
|
+
errors.push({ path: `${path}.geometry`, message: '"geometry" member is required (an object or null)' });
|
|
1817
|
+
} else {
|
|
1818
|
+
_validateGeoJsonGeometry(feature.geometry, `${path}.geometry`, errors, warnings);
|
|
1819
|
+
}
|
|
1820
|
+
_validateGeoJsonBbox(feature.bbox, path, errors);
|
|
1821
|
+
}
|
|
1822
|
+
function validateGeoJson(input) {
|
|
1823
|
+
let doc;
|
|
1824
|
+
if (typeof input === "string") {
|
|
1825
|
+
try {
|
|
1826
|
+
doc = JSON.parse(input);
|
|
1827
|
+
} catch (e) {
|
|
1828
|
+
return { valid: false, type: null, errors: [{ path: "$", message: `invalid JSON: ${e.message}` }], warnings: [] };
|
|
1829
|
+
}
|
|
1830
|
+
} else {
|
|
1831
|
+
doc = input;
|
|
1832
|
+
}
|
|
1833
|
+
if (typeof doc !== "object" || doc === null || Array.isArray(doc)) {
|
|
1834
|
+
return { valid: false, type: null, errors: [{ path: "$", message: "document must be a JSON object" }], warnings: [] };
|
|
1835
|
+
}
|
|
1836
|
+
const type = doc.type;
|
|
1837
|
+
if (typeof type !== "string") {
|
|
1838
|
+
return { valid: false, type: null, errors: [{ path: "$.type", message: '"type" member is required' }], warnings: [] };
|
|
1839
|
+
}
|
|
1840
|
+
const errors = [];
|
|
1841
|
+
const warnings = [];
|
|
1842
|
+
_validateGeoJsonBbox(doc.bbox, "$", errors);
|
|
1843
|
+
if (type === "FeatureCollection") {
|
|
1844
|
+
if (!Array.isArray(doc.features)) {
|
|
1845
|
+
errors.push({ path: "$.features", message: 'FeatureCollection must have a "features" array' });
|
|
1846
|
+
} else {
|
|
1847
|
+
doc.features.forEach((feature, i) => _validateGeoJsonFeature(feature, `$.features[${i}]`, errors, warnings));
|
|
1848
|
+
}
|
|
1849
|
+
} else if (type === "Feature") {
|
|
1850
|
+
_validateGeoJsonFeature(doc, "$", errors, warnings);
|
|
1851
|
+
} else if (GEOJSON_GEOMETRY_TYPES.has(type)) {
|
|
1852
|
+
_validateGeoJsonGeometry(doc, "$", errors, warnings);
|
|
1853
|
+
} else {
|
|
1854
|
+
errors.push({ path: "$.type", message: '"type" must be one of Feature, FeatureCollection, or a geometry type' });
|
|
1855
|
+
}
|
|
1856
|
+
return { valid: errors.length === 0, type, errors, warnings };
|
|
1857
|
+
}
|
|
1692
1858
|
|
|
1693
1859
|
// src/tools/encoding.ts
|
|
1694
1860
|
var encoding_exports = {};
|
|
@@ -2330,6 +2496,7 @@ __export(text_exports, {
|
|
|
2330
2496
|
detectDelimiter: () => detectDelimiter,
|
|
2331
2497
|
detectFillerWords: () => detectFillerWords,
|
|
2332
2498
|
detectPassiveVoice: () => detectPassiveVoice,
|
|
2499
|
+
detectWeaselWords: () => detectWeaselWords,
|
|
2333
2500
|
detectWordyPhrases: () => detectWordyPhrases,
|
|
2334
2501
|
diffLines: () => diffLines,
|
|
2335
2502
|
diffLinesSimple: () => diffLinesSimple,
|
|
@@ -5631,6 +5798,62 @@ function checkAcronymExpansion(text) {
|
|
|
5631
5798
|
issues.sort((a, b) => a.index - b.index);
|
|
5632
5799
|
return { acronyms, issues };
|
|
5633
5800
|
}
|
|
5801
|
+
var WEASEL_PHRASES = [
|
|
5802
|
+
"many experts believe",
|
|
5803
|
+
"some experts say",
|
|
5804
|
+
"experts agree",
|
|
5805
|
+
"critics argue",
|
|
5806
|
+
"studies show",
|
|
5807
|
+
"studies have shown",
|
|
5808
|
+
"research shows",
|
|
5809
|
+
"research suggests",
|
|
5810
|
+
"it is widely believed",
|
|
5811
|
+
"it is widely known",
|
|
5812
|
+
"it is widely regarded",
|
|
5813
|
+
"it is generally accepted",
|
|
5814
|
+
"it is often said",
|
|
5815
|
+
"it has been suggested",
|
|
5816
|
+
"it is said that",
|
|
5817
|
+
"some say",
|
|
5818
|
+
"some people believe",
|
|
5819
|
+
"some people think",
|
|
5820
|
+
"many believe",
|
|
5821
|
+
"many people think",
|
|
5822
|
+
"many claim",
|
|
5823
|
+
"observers note",
|
|
5824
|
+
"sources say",
|
|
5825
|
+
"according to some",
|
|
5826
|
+
"widely regarded as",
|
|
5827
|
+
"many consider",
|
|
5828
|
+
"some scientists believe",
|
|
5829
|
+
"some argue",
|
|
5830
|
+
"reportedly",
|
|
5831
|
+
"allegedly"
|
|
5832
|
+
];
|
|
5833
|
+
function _weaselRegex(phrase) {
|
|
5834
|
+
const tokens = phrase.split(/\s+/).map((t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
5835
|
+
return new RegExp("\\b" + tokens.join("\\s+") + "\\b", "gi");
|
|
5836
|
+
}
|
|
5837
|
+
function detectWeaselWords(text) {
|
|
5838
|
+
const totalWords = (text.match(/[A-Za-z0-9']+/g) ?? []).length;
|
|
5839
|
+
const matches = [];
|
|
5840
|
+
for (const phrase of WEASEL_PHRASES) {
|
|
5841
|
+
const re = _weaselRegex(phrase);
|
|
5842
|
+
const indices = [];
|
|
5843
|
+
let m;
|
|
5844
|
+
while ((m = re.exec(text)) !== null) {
|
|
5845
|
+
indices.push(m.index);
|
|
5846
|
+
if (m.index === re.lastIndex) re.lastIndex++;
|
|
5847
|
+
}
|
|
5848
|
+
if (indices.length > 0) {
|
|
5849
|
+
matches.push({ phrase, count: indices.length, indices });
|
|
5850
|
+
}
|
|
5851
|
+
}
|
|
5852
|
+
matches.sort((a, b) => b.count - a.count || a.phrase.localeCompare(b.phrase));
|
|
5853
|
+
const totalMatches = matches.reduce((s, x) => s + x.count, 0);
|
|
5854
|
+
const density = totalWords > 0 ? Math.round(totalMatches / totalWords * 1e3) / 10 : 0;
|
|
5855
|
+
return { totalWords, totalMatches, density, matches };
|
|
5856
|
+
}
|
|
5634
5857
|
|
|
5635
5858
|
// src/tools/data.ts
|
|
5636
5859
|
var data_exports = {};
|
|
@@ -9433,6 +9656,7 @@ __export(units_exports, {
|
|
|
9433
9656
|
calculateMovingAverages: () => calculateMovingAverages,
|
|
9434
9657
|
calculatePaybackPeriod: () => calculatePaybackPeriod,
|
|
9435
9658
|
calculatePercentageChange: () => calculatePercentageChange,
|
|
9659
|
+
calculatePositionSize: () => calculatePositionSize,
|
|
9436
9660
|
calculateRealRateOfReturn: () => calculateRealRateOfReturn,
|
|
9437
9661
|
calculateRequiredBandwidth: () => calculateRequiredBandwidth,
|
|
9438
9662
|
calculateRoi: () => calculateRoi,
|
|
@@ -9452,6 +9676,7 @@ __export(units_exports, {
|
|
|
9452
9676
|
convertAprApy: () => convertAprApy,
|
|
9453
9677
|
convertBytes: () => convertBytes,
|
|
9454
9678
|
convertIp: () => convertIp,
|
|
9679
|
+
convertTimecode: () => convertTimecode,
|
|
9455
9680
|
coverBox: () => coverBox,
|
|
9456
9681
|
decimalToIp: () => decimalToIp,
|
|
9457
9682
|
decimalToIpCidr: () => decimalToIpCidr,
|
|
@@ -12658,6 +12883,151 @@ function validateRoutingNumber(input) {
|
|
|
12658
12883
|
federalReserveDistrict: district
|
|
12659
12884
|
};
|
|
12660
12885
|
}
|
|
12886
|
+
function calculatePositionSize(input) {
|
|
12887
|
+
const { accountSize, riskPercent, entryPrice, stopLossPrice, targetPrice } = input;
|
|
12888
|
+
if (!(accountSize > 0)) return { error: "accountSize must be greater than 0" };
|
|
12889
|
+
if (!(riskPercent > 0) || riskPercent > 100) return { error: "riskPercent must be greater than 0 and at most 100" };
|
|
12890
|
+
if (!(entryPrice > 0)) return { error: "entryPrice must be greater than 0" };
|
|
12891
|
+
if (!(stopLossPrice > 0)) return { error: "stopLossPrice must be greater than 0" };
|
|
12892
|
+
if (entryPrice === stopLossPrice) return { error: "entryPrice and stopLossPrice must differ" };
|
|
12893
|
+
if (targetPrice !== void 0 && !(targetPrice > 0)) return { error: "targetPrice must be greater than 0" };
|
|
12894
|
+
const direction = stopLossPrice < entryPrice ? "long" : "short";
|
|
12895
|
+
const riskAmount = accountSize * (riskPercent / 100);
|
|
12896
|
+
const perUnitRisk = Math.abs(entryPrice - stopLossPrice);
|
|
12897
|
+
const positionSizeUnits = Math.floor(riskAmount / perUnitRisk);
|
|
12898
|
+
const positionValue = positionSizeUnits * entryPrice;
|
|
12899
|
+
const dollarRisk = positionSizeUnits * perUnitRisk;
|
|
12900
|
+
let riskRewardRatio = null;
|
|
12901
|
+
let targetOnCorrectSide = null;
|
|
12902
|
+
if (targetPrice !== void 0) {
|
|
12903
|
+
const reward = Math.abs(targetPrice - entryPrice);
|
|
12904
|
+
riskRewardRatio = Math.round(reward / perUnitRisk * 100) / 100;
|
|
12905
|
+
targetOnCorrectSide = direction === "long" ? targetPrice > entryPrice : targetPrice < entryPrice;
|
|
12906
|
+
}
|
|
12907
|
+
return {
|
|
12908
|
+
direction,
|
|
12909
|
+
riskAmount: Math.round(riskAmount * 100) / 100,
|
|
12910
|
+
perUnitRisk: Math.round(perUnitRisk * 1e4) / 1e4,
|
|
12911
|
+
positionSizeUnits,
|
|
12912
|
+
positionValue: Math.round(positionValue * 100) / 100,
|
|
12913
|
+
dollarRisk: Math.round(dollarRisk * 100) / 100,
|
|
12914
|
+
riskRewardRatio,
|
|
12915
|
+
targetOnCorrectSide
|
|
12916
|
+
};
|
|
12917
|
+
}
|
|
12918
|
+
var TIMECODE_NOMINAL_FPS = {
|
|
12919
|
+
"23.976": 24,
|
|
12920
|
+
"24": 24,
|
|
12921
|
+
"25": 25,
|
|
12922
|
+
"29.97": 30,
|
|
12923
|
+
"30": 30,
|
|
12924
|
+
"50": 50,
|
|
12925
|
+
"59.94": 60,
|
|
12926
|
+
"60": 60
|
|
12927
|
+
};
|
|
12928
|
+
function _timecodeNominalFps(frameRate) {
|
|
12929
|
+
return TIMECODE_NOMINAL_FPS[String(frameRate)] ?? null;
|
|
12930
|
+
}
|
|
12931
|
+
function _timecodeIsDropFrameEligible(frameRate) {
|
|
12932
|
+
return frameRate === 29.97 || frameRate === 59.94;
|
|
12933
|
+
}
|
|
12934
|
+
function _framesToPlainTimecode(frameNumber, nominalFps) {
|
|
12935
|
+
const framesPerDay = nominalFps * 86400;
|
|
12936
|
+
const fn = (frameNumber % framesPerDay + framesPerDay) % framesPerDay;
|
|
12937
|
+
const frames = fn % nominalFps;
|
|
12938
|
+
const totalSeconds = Math.floor(fn / nominalFps);
|
|
12939
|
+
return {
|
|
12940
|
+
hours: Math.floor(totalSeconds / 3600) % 24,
|
|
12941
|
+
minutes: Math.floor(totalSeconds / 60) % 60,
|
|
12942
|
+
seconds: totalSeconds % 60,
|
|
12943
|
+
frames
|
|
12944
|
+
};
|
|
12945
|
+
}
|
|
12946
|
+
function _plainTimecodeToFrames(hh, mm, ss, ff, nominalFps) {
|
|
12947
|
+
return nominalFps * 3600 * hh + nominalFps * 60 * mm + nominalFps * ss + ff;
|
|
12948
|
+
}
|
|
12949
|
+
function _framesToDropFrameTimecode(frameNumber, nominalFps, frameRate) {
|
|
12950
|
+
const dropFrames = nominalFps === 30 ? 2 : 4;
|
|
12951
|
+
const framesPer24Hours = Math.round(frameRate * 86400);
|
|
12952
|
+
const framesPer10Minutes = Math.round(frameRate * 600);
|
|
12953
|
+
const framesPerMinute = nominalFps * 60 - dropFrames;
|
|
12954
|
+
const fn = (frameNumber % framesPer24Hours + framesPer24Hours) % framesPer24Hours;
|
|
12955
|
+
const d = Math.floor(fn / framesPer10Minutes);
|
|
12956
|
+
const m = fn % framesPer10Minutes;
|
|
12957
|
+
let frameNumberOut = fn + 9 * dropFrames * d;
|
|
12958
|
+
if (m > dropFrames) {
|
|
12959
|
+
frameNumberOut += dropFrames * Math.floor((m - dropFrames) / framesPerMinute);
|
|
12960
|
+
}
|
|
12961
|
+
const frames = frameNumberOut % nominalFps;
|
|
12962
|
+
const totalSeconds = Math.floor(frameNumberOut / nominalFps);
|
|
12963
|
+
return {
|
|
12964
|
+
hours: Math.floor(totalSeconds / 3600) % 24,
|
|
12965
|
+
minutes: Math.floor(totalSeconds / 60) % 60,
|
|
12966
|
+
seconds: totalSeconds % 60,
|
|
12967
|
+
frames
|
|
12968
|
+
};
|
|
12969
|
+
}
|
|
12970
|
+
function _dropFrameTimecodeToFrames(hh, mm, ss, ff, nominalFps) {
|
|
12971
|
+
const dropFrames = nominalFps === 30 ? 2 : 4;
|
|
12972
|
+
const totalMinutes = 60 * hh + mm;
|
|
12973
|
+
return nominalFps * 3600 * hh + nominalFps * 60 * mm + nominalFps * ss + ff - dropFrames * (totalMinutes - Math.floor(totalMinutes / 10));
|
|
12974
|
+
}
|
|
12975
|
+
function _formatTimecode(parts, dropFrame) {
|
|
12976
|
+
const p2 = (n) => String(n).padStart(2, "0");
|
|
12977
|
+
const sep = dropFrame ? ";" : ":";
|
|
12978
|
+
return `${p2(parts.hours)}:${p2(parts.minutes)}:${p2(parts.seconds)}${sep}${p2(parts.frames)}`;
|
|
12979
|
+
}
|
|
12980
|
+
function convertTimecode(input) {
|
|
12981
|
+
const { mode, frameRate } = input;
|
|
12982
|
+
const dropFrame = input.dropFrame ?? false;
|
|
12983
|
+
const nominalFps = _timecodeNominalFps(frameRate);
|
|
12984
|
+
if (nominalFps === null) {
|
|
12985
|
+
return { error: "frameRate must be one of 23.976, 24, 25, 29.97, 30, 50, 59.94, 60" };
|
|
12986
|
+
}
|
|
12987
|
+
if (dropFrame && !_timecodeIsDropFrameEligible(frameRate)) {
|
|
12988
|
+
return { error: "dropFrame is only valid for frameRate 29.97 or 59.94" };
|
|
12989
|
+
}
|
|
12990
|
+
if (mode === "frames-to-timecode") {
|
|
12991
|
+
const { frameCount } = input;
|
|
12992
|
+
if (typeof frameCount !== "number" || !Number.isFinite(frameCount) || frameCount < 0 || Math.floor(frameCount) !== frameCount) {
|
|
12993
|
+
return { error: 'frameCount must be a non-negative integer for mode "frames-to-timecode"' };
|
|
12994
|
+
}
|
|
12995
|
+
const parts = dropFrame ? _framesToDropFrameTimecode(frameCount, nominalFps, frameRate) : _framesToPlainTimecode(frameCount, nominalFps);
|
|
12996
|
+
return {
|
|
12997
|
+
mode,
|
|
12998
|
+
frameRate,
|
|
12999
|
+
dropFrame,
|
|
13000
|
+
frameCount,
|
|
13001
|
+
timecode: _formatTimecode(parts, dropFrame),
|
|
13002
|
+
seconds: Math.round(frameCount / frameRate * 1e6) / 1e6
|
|
13003
|
+
};
|
|
13004
|
+
}
|
|
13005
|
+
if (mode === "timecode-to-frames") {
|
|
13006
|
+
const { timecode } = input;
|
|
13007
|
+
if (typeof timecode !== "string") return { error: 'timecode must be a string for mode "timecode-to-frames"' };
|
|
13008
|
+
const match = /^(\d{2}):(\d{2}):(\d{2})[:;](\d{2})$/.exec(timecode.trim());
|
|
13009
|
+
if (!match) return { error: "timecode must be in the form HH:MM:SS:FF (or HH:MM:SS;FF)" };
|
|
13010
|
+
const [, hhS, mmS, ssS, ffS] = match;
|
|
13011
|
+
const hh = Number(hhS), mm = Number(mmS), ss = Number(ssS), ff = Number(ffS);
|
|
13012
|
+
if (hh > 23) return { error: "hours must be 00-23" };
|
|
13013
|
+
if (mm > 59) return { error: "minutes must be 00-59" };
|
|
13014
|
+
if (ss > 59) return { error: "seconds must be 00-59" };
|
|
13015
|
+
if (ff >= nominalFps) return { error: `frames must be 00-${nominalFps - 1} at this frame rate` };
|
|
13016
|
+
if (dropFrame && ff <= 1 && ss === 0 && mm % 10 !== 0) {
|
|
13017
|
+
return { error: `frame ${ffS} at ${hhS}:${mmS}:${ssS} does not exist in drop-frame timecode: frames 00 and 01 are dropped at the start of every minute except every 10th minute` };
|
|
13018
|
+
}
|
|
13019
|
+
const frameCount = dropFrame ? _dropFrameTimecodeToFrames(hh, mm, ss, ff, nominalFps) : _plainTimecodeToFrames(hh, mm, ss, ff, nominalFps);
|
|
13020
|
+
return {
|
|
13021
|
+
mode,
|
|
13022
|
+
frameRate,
|
|
13023
|
+
dropFrame,
|
|
13024
|
+
frameCount,
|
|
13025
|
+
timecode: _formatTimecode({ hours: hh, minutes: mm, seconds: ss, frames: ff }, dropFrame),
|
|
13026
|
+
seconds: Math.round(frameCount / frameRate * 1e6) / 1e6
|
|
13027
|
+
};
|
|
13028
|
+
}
|
|
13029
|
+
return { error: 'mode must be "frames-to-timecode" or "timecode-to-frames"' };
|
|
13030
|
+
}
|
|
12661
13031
|
|
|
12662
13032
|
// src/tools/network.ts
|
|
12663
13033
|
var network_exports = {};
|
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { j as json } from './json-
|
|
1
|
+
export { j as json } from './json-BtRszk1w.cjs';
|
|
2
2
|
export { e as encoding } from './encoding-Dk3wpmb3.cjs';
|
|
3
3
|
export { h as hashing } from './hashing-CJjlvqS_.cjs';
|
|
4
|
-
export { t as text } from './text-
|
|
4
|
+
export { t as text } from './text-DFCNpyvH.cjs';
|
|
5
5
|
export { d as data } from './data-Dg5dEwWl.cjs';
|
|
6
6
|
export { g as generators } from './generators-DAXXrMvG.cjs';
|
|
7
7
|
export { t as time } from './time-VMAy_SrV.cjs';
|
|
8
|
-
export { u as units } from './units-
|
|
8
|
+
export { u as units } from './units-CGTx1S6B.cjs';
|
|
9
9
|
export { n as network } from './network-B6fQrsCc.cjs';
|
|
10
10
|
export { a as api } from './api-CQnIUrVB.cjs';
|
|
11
11
|
export { c as code } from './code-CZHElFHu.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { j as json } from './json-
|
|
1
|
+
export { j as json } from './json-BtRszk1w.js';
|
|
2
2
|
export { e as encoding } from './encoding-Dk3wpmb3.js';
|
|
3
3
|
export { h as hashing } from './hashing-CJjlvqS_.js';
|
|
4
|
-
export { t as text } from './text-
|
|
4
|
+
export { t as text } from './text-DFCNpyvH.js';
|
|
5
5
|
export { d as data } from './data-Dg5dEwWl.js';
|
|
6
6
|
export { g as generators } from './generators-DAXXrMvG.js';
|
|
7
7
|
export { t as time } from './time-VMAy_SrV.js';
|
|
8
|
-
export { u as units } from './units-
|
|
8
|
+
export { u as units } from './units-CGTx1S6B.js';
|
|
9
9
|
export { n as network } from './network-B6fQrsCc.js';
|
|
10
10
|
export { a as api } from './api-CQnIUrVB.js';
|
|
11
11
|
export { c as code } from './code-CZHElFHu.js';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { media_exports as media } from './chunk-YSS4VVZU.js';
|
|
2
|
-
export { units_exports as units } from './chunk-
|
|
2
|
+
export { units_exports as units } from './chunk-X7IZ2OXW.js';
|
|
3
3
|
export { network_exports as network } from './chunk-K242OOF4.js';
|
|
4
4
|
export { api_exports as api } from './chunk-U2HREMZU.js';
|
|
5
5
|
export { code_exports as code } from './chunk-KRPIOHJ4.js';
|
|
@@ -7,10 +7,10 @@ export { color_exports as color } from './chunk-BPVAB4P2.js';
|
|
|
7
7
|
export { css_exports as css } from './chunk-6YPV2AB5.js';
|
|
8
8
|
export { misc_exports as misc } from './chunk-GX7H6TAX.js';
|
|
9
9
|
export { ai_agent_exports as ai_agent } from './chunk-5VVC7BHS.js';
|
|
10
|
-
export { json_exports as json } from './chunk-
|
|
10
|
+
export { json_exports as json } from './chunk-PAMHORKV.js';
|
|
11
11
|
export { encoding_exports as encoding } from './chunk-DOWQZUTP.js';
|
|
12
12
|
export { hashing_exports as hashing } from './chunk-PET2CGTH.js';
|
|
13
|
-
export { text_exports as text } from './chunk-
|
|
13
|
+
export { text_exports as text } from './chunk-2YWKRNDM.js';
|
|
14
14
|
export { data_exports as data } from './chunk-NTHUTIZH.js';
|
|
15
15
|
export { generators_exports as generators } from './chunk-422ICOZX.js';
|
|
16
16
|
export { time_exports as time } from './chunk-6EJVNQSY.js';
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* - json-schema-to-typescript : jsonSchemaToTypescript
|
|
17
17
|
* - json-merge-patch : mergeJsonPatch, applyJsonMergePatch
|
|
18
18
|
* - json-patch : diffJsonPatch, applyJsonPatch, generateJsonPatch
|
|
19
|
+
* - geojson-validator : validateGeoJson
|
|
19
20
|
*/
|
|
20
21
|
type ParseStatus = 'idle' | 'valid' | 'error';
|
|
21
22
|
interface JsonParseResult {
|
|
@@ -258,11 +259,35 @@ declare function generateJsonPatch(aJson: string, bJson: string): {
|
|
|
258
259
|
} | {
|
|
259
260
|
error: string;
|
|
260
261
|
};
|
|
262
|
+
interface GeoJsonIssue {
|
|
263
|
+
path: string;
|
|
264
|
+
message: string;
|
|
265
|
+
}
|
|
266
|
+
interface GeoJsonValidateResult {
|
|
267
|
+
valid: boolean;
|
|
268
|
+
type: string | null;
|
|
269
|
+
errors: GeoJsonIssue[];
|
|
270
|
+
warnings: GeoJsonIssue[];
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Validate a GeoJSON document's structure against RFC 7946: the correct
|
|
274
|
+
* geometry type and coordinates shape for each of the seven geometry types,
|
|
275
|
+
* linear ring closure (first and last position identical) for Polygon and
|
|
276
|
+
* MultiPolygon, a Feature's required `properties`/`geometry` members, and a
|
|
277
|
+
* FeatureCollection's required `features` array. Also warns, without
|
|
278
|
+
* failing validation, when a Polygon ring winds the "wrong" way under RFC
|
|
279
|
+
* 7946's right-hand rule, since that's a SHOULD, not a MUST, and plenty of
|
|
280
|
+
* real-world producers don't follow it. Pure structural validation; no map
|
|
281
|
+
* is rendered and no tile server is ever contacted.
|
|
282
|
+
*/
|
|
283
|
+
declare function validateGeoJson(input: string | object): GeoJsonValidateResult;
|
|
261
284
|
|
|
262
285
|
type json_ConvertOptions = ConvertOptions;
|
|
263
286
|
type json_CsvOptions = CsvOptions;
|
|
264
287
|
type json_DiffNode = DiffNode;
|
|
265
288
|
type json_DiffType = DiffType;
|
|
289
|
+
type json_GeoJsonIssue = GeoJsonIssue;
|
|
290
|
+
type json_GeoJsonValidateResult = GeoJsonValidateResult;
|
|
266
291
|
type json_GoField = GoField;
|
|
267
292
|
type json_GoStruct = GoStruct;
|
|
268
293
|
type json_JsonDiffResult = JsonDiffResult;
|
|
@@ -310,12 +335,13 @@ declare const json_parseStructs: typeof parseStructs;
|
|
|
310
335
|
declare const json_resolveJsonPointer: typeof resolveJsonPointer;
|
|
311
336
|
declare const json_toPascalCase: typeof toPascalCase;
|
|
312
337
|
declare const json_toSnakeCase: typeof toSnakeCase;
|
|
338
|
+
declare const json_validateGeoJson: typeof validateGeoJson;
|
|
313
339
|
declare const json_validateJson: typeof validateJson;
|
|
314
340
|
declare const json_validateJsonPath: typeof validateJsonPath;
|
|
315
341
|
declare const json_validateJsonString: typeof validateJsonString;
|
|
316
342
|
declare const json_yamlToJson: typeof yamlToJson;
|
|
317
343
|
declare namespace json {
|
|
318
|
-
export { type json_ConvertOptions as ConvertOptions, type json_CsvOptions as CsvOptions, type json_DiffNode as DiffNode, type json_DiffType as DiffType, type json_GoField as GoField, type json_GoStruct as GoStruct, type json_JsonDiffResult as JsonDiffResult, type json_JsonParseResult as JsonParseResult, type json_JsonPatchOp as JsonPatchOp, type json_JsonPatchOperation as JsonPatchOperation, type json_JsonPathResult as JsonPathResult, type json_JsonPointerResult as JsonPointerResult, type json_JsonSchemaLike as JsonSchemaLike, type json_JsonSchemaToTsOptions as JsonSchemaToTsOptions, type json_MergePatchResult as MergePatchResult, type json_ParseStatus as ParseStatus, type json_PythonClass as PythonClass, type json_PythonField as PythonField, type json_PythonMode as PythonMode, type json_ValidationError as ValidationError, type json_ValidationResult as ValidationResult, type json_ZodOptions as ZodOptions, json_applyJsonMergePatch as applyJsonMergePatch, json_applyJsonPatch as applyJsonPatch, json_csvToJson as csvToJson, json_detectFormat as detectFormat, json_diffJson as diffJson, json_diffJsonPatch as diffJsonPatch, json_evaluateJsonPath as evaluateJsonPath, json_formatDiffLine as formatDiffLine, json_formatJson as formatJson, json_generateExample as generateExample, json_generateJsonPatch as generateJsonPatch, json_getJsonStats as getJsonStats, json_inferGoType as inferGoType, json_inferPythonType as inferPythonType, json_inferType as inferType, json_jsonSchemaToTypescript as jsonSchemaToTypescript, json_jsonToCsv as jsonToCsv, json_jsonToGo as jsonToGo, json_jsonToPython as jsonToPython, json_jsonToTypescript as jsonToTypescript, json_jsonToYaml as jsonToYaml, json_jsonToZod as jsonToZod, json_mergeJsonPatch as mergeJsonPatch, json_minifyJson as minifyJson, json_parseJson as parseJson, json_parseStructs as parseStructs, json_resolveJsonPointer as resolveJsonPointer, json_toPascalCase as toPascalCase, json_toSnakeCase as toSnakeCase, json_validateJson as validateJson, json_validateJsonPath as validateJsonPath, json_validateJsonString as validateJsonString, json_yamlToJson as yamlToJson };
|
|
344
|
+
export { type json_ConvertOptions as ConvertOptions, type json_CsvOptions as CsvOptions, type json_DiffNode as DiffNode, type json_DiffType as DiffType, type json_GeoJsonIssue as GeoJsonIssue, type json_GeoJsonValidateResult as GeoJsonValidateResult, type json_GoField as GoField, type json_GoStruct as GoStruct, type json_JsonDiffResult as JsonDiffResult, type json_JsonParseResult as JsonParseResult, type json_JsonPatchOp as JsonPatchOp, type json_JsonPatchOperation as JsonPatchOperation, type json_JsonPathResult as JsonPathResult, type json_JsonPointerResult as JsonPointerResult, type json_JsonSchemaLike as JsonSchemaLike, type json_JsonSchemaToTsOptions as JsonSchemaToTsOptions, type json_MergePatchResult as MergePatchResult, type json_ParseStatus as ParseStatus, type json_PythonClass as PythonClass, type json_PythonField as PythonField, type json_PythonMode as PythonMode, type json_ValidationError as ValidationError, type json_ValidationResult as ValidationResult, type json_ZodOptions as ZodOptions, json_applyJsonMergePatch as applyJsonMergePatch, json_applyJsonPatch as applyJsonPatch, json_csvToJson as csvToJson, json_detectFormat as detectFormat, json_diffJson as diffJson, json_diffJsonPatch as diffJsonPatch, json_evaluateJsonPath as evaluateJsonPath, json_formatDiffLine as formatDiffLine, json_formatJson as formatJson, json_generateExample as generateExample, json_generateJsonPatch as generateJsonPatch, json_getJsonStats as getJsonStats, json_inferGoType as inferGoType, json_inferPythonType as inferPythonType, json_inferType as inferType, json_jsonSchemaToTypescript as jsonSchemaToTypescript, json_jsonToCsv as jsonToCsv, json_jsonToGo as jsonToGo, json_jsonToPython as jsonToPython, json_jsonToTypescript as jsonToTypescript, json_jsonToYaml as jsonToYaml, json_jsonToZod as jsonToZod, json_mergeJsonPatch as mergeJsonPatch, json_minifyJson as minifyJson, json_parseJson as parseJson, json_parseStructs as parseStructs, json_resolveJsonPointer as resolveJsonPointer, json_toPascalCase as toPascalCase, json_toSnakeCase as toSnakeCase, json_validateGeoJson as validateGeoJson, json_validateJson as validateJson, json_validateJsonPath as validateJsonPath, json_validateJsonString as validateJsonString, json_yamlToJson as yamlToJson };
|
|
319
345
|
}
|
|
320
346
|
|
|
321
|
-
export {
|
|
347
|
+
export { toSnakeCase as $, generateExample as A, generateJsonPatch as B, type ConvertOptions as C, type DiffNode as D, getJsonStats as E, inferGoType as F, type GeoJsonIssue as G, inferPythonType as H, inferType as I, type JsonDiffResult as J, jsonSchemaToTypescript as K, jsonToCsv as L, type MergePatchResult as M, jsonToGo as N, jsonToPython as O, type ParseStatus as P, jsonToTypescript as Q, jsonToYaml as R, jsonToZod as S, mergeJsonPatch as T, minifyJson as U, type ValidationError as V, parseJson as W, parseStructs as X, resolveJsonPointer as Y, type ZodOptions as Z, toPascalCase as _, type CsvOptions as a, validateGeoJson as a0, validateJson as a1, validateJsonPath as a2, validateJsonString as a3, yamlToJson as a4, type DiffType as b, type GeoJsonValidateResult as c, type GoField as d, type GoStruct as e, type JsonParseResult as f, type JsonPatchOp as g, type JsonPatchOperation as h, type JsonPathResult as i, json as j, type JsonPointerResult as k, type JsonSchemaLike as l, type JsonSchemaToTsOptions as m, type PythonClass as n, type PythonField as o, type PythonMode as p, type ValidationResult as q, applyJsonMergePatch as r, applyJsonPatch as s, csvToJson as t, detectFormat as u, diffJson as v, diffJsonPatch as w, evaluateJsonPath as x, formatDiffLine as y, formatJson as z };
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* - json-schema-to-typescript : jsonSchemaToTypescript
|
|
17
17
|
* - json-merge-patch : mergeJsonPatch, applyJsonMergePatch
|
|
18
18
|
* - json-patch : diffJsonPatch, applyJsonPatch, generateJsonPatch
|
|
19
|
+
* - geojson-validator : validateGeoJson
|
|
19
20
|
*/
|
|
20
21
|
type ParseStatus = 'idle' | 'valid' | 'error';
|
|
21
22
|
interface JsonParseResult {
|
|
@@ -258,11 +259,35 @@ declare function generateJsonPatch(aJson: string, bJson: string): {
|
|
|
258
259
|
} | {
|
|
259
260
|
error: string;
|
|
260
261
|
};
|
|
262
|
+
interface GeoJsonIssue {
|
|
263
|
+
path: string;
|
|
264
|
+
message: string;
|
|
265
|
+
}
|
|
266
|
+
interface GeoJsonValidateResult {
|
|
267
|
+
valid: boolean;
|
|
268
|
+
type: string | null;
|
|
269
|
+
errors: GeoJsonIssue[];
|
|
270
|
+
warnings: GeoJsonIssue[];
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Validate a GeoJSON document's structure against RFC 7946: the correct
|
|
274
|
+
* geometry type and coordinates shape for each of the seven geometry types,
|
|
275
|
+
* linear ring closure (first and last position identical) for Polygon and
|
|
276
|
+
* MultiPolygon, a Feature's required `properties`/`geometry` members, and a
|
|
277
|
+
* FeatureCollection's required `features` array. Also warns, without
|
|
278
|
+
* failing validation, when a Polygon ring winds the "wrong" way under RFC
|
|
279
|
+
* 7946's right-hand rule, since that's a SHOULD, not a MUST, and plenty of
|
|
280
|
+
* real-world producers don't follow it. Pure structural validation; no map
|
|
281
|
+
* is rendered and no tile server is ever contacted.
|
|
282
|
+
*/
|
|
283
|
+
declare function validateGeoJson(input: string | object): GeoJsonValidateResult;
|
|
261
284
|
|
|
262
285
|
type json_ConvertOptions = ConvertOptions;
|
|
263
286
|
type json_CsvOptions = CsvOptions;
|
|
264
287
|
type json_DiffNode = DiffNode;
|
|
265
288
|
type json_DiffType = DiffType;
|
|
289
|
+
type json_GeoJsonIssue = GeoJsonIssue;
|
|
290
|
+
type json_GeoJsonValidateResult = GeoJsonValidateResult;
|
|
266
291
|
type json_GoField = GoField;
|
|
267
292
|
type json_GoStruct = GoStruct;
|
|
268
293
|
type json_JsonDiffResult = JsonDiffResult;
|
|
@@ -310,12 +335,13 @@ declare const json_parseStructs: typeof parseStructs;
|
|
|
310
335
|
declare const json_resolveJsonPointer: typeof resolveJsonPointer;
|
|
311
336
|
declare const json_toPascalCase: typeof toPascalCase;
|
|
312
337
|
declare const json_toSnakeCase: typeof toSnakeCase;
|
|
338
|
+
declare const json_validateGeoJson: typeof validateGeoJson;
|
|
313
339
|
declare const json_validateJson: typeof validateJson;
|
|
314
340
|
declare const json_validateJsonPath: typeof validateJsonPath;
|
|
315
341
|
declare const json_validateJsonString: typeof validateJsonString;
|
|
316
342
|
declare const json_yamlToJson: typeof yamlToJson;
|
|
317
343
|
declare namespace json {
|
|
318
|
-
export { type json_ConvertOptions as ConvertOptions, type json_CsvOptions as CsvOptions, type json_DiffNode as DiffNode, type json_DiffType as DiffType, type json_GoField as GoField, type json_GoStruct as GoStruct, type json_JsonDiffResult as JsonDiffResult, type json_JsonParseResult as JsonParseResult, type json_JsonPatchOp as JsonPatchOp, type json_JsonPatchOperation as JsonPatchOperation, type json_JsonPathResult as JsonPathResult, type json_JsonPointerResult as JsonPointerResult, type json_JsonSchemaLike as JsonSchemaLike, type json_JsonSchemaToTsOptions as JsonSchemaToTsOptions, type json_MergePatchResult as MergePatchResult, type json_ParseStatus as ParseStatus, type json_PythonClass as PythonClass, type json_PythonField as PythonField, type json_PythonMode as PythonMode, type json_ValidationError as ValidationError, type json_ValidationResult as ValidationResult, type json_ZodOptions as ZodOptions, json_applyJsonMergePatch as applyJsonMergePatch, json_applyJsonPatch as applyJsonPatch, json_csvToJson as csvToJson, json_detectFormat as detectFormat, json_diffJson as diffJson, json_diffJsonPatch as diffJsonPatch, json_evaluateJsonPath as evaluateJsonPath, json_formatDiffLine as formatDiffLine, json_formatJson as formatJson, json_generateExample as generateExample, json_generateJsonPatch as generateJsonPatch, json_getJsonStats as getJsonStats, json_inferGoType as inferGoType, json_inferPythonType as inferPythonType, json_inferType as inferType, json_jsonSchemaToTypescript as jsonSchemaToTypescript, json_jsonToCsv as jsonToCsv, json_jsonToGo as jsonToGo, json_jsonToPython as jsonToPython, json_jsonToTypescript as jsonToTypescript, json_jsonToYaml as jsonToYaml, json_jsonToZod as jsonToZod, json_mergeJsonPatch as mergeJsonPatch, json_minifyJson as minifyJson, json_parseJson as parseJson, json_parseStructs as parseStructs, json_resolveJsonPointer as resolveJsonPointer, json_toPascalCase as toPascalCase, json_toSnakeCase as toSnakeCase, json_validateJson as validateJson, json_validateJsonPath as validateJsonPath, json_validateJsonString as validateJsonString, json_yamlToJson as yamlToJson };
|
|
344
|
+
export { type json_ConvertOptions as ConvertOptions, type json_CsvOptions as CsvOptions, type json_DiffNode as DiffNode, type json_DiffType as DiffType, type json_GeoJsonIssue as GeoJsonIssue, type json_GeoJsonValidateResult as GeoJsonValidateResult, type json_GoField as GoField, type json_GoStruct as GoStruct, type json_JsonDiffResult as JsonDiffResult, type json_JsonParseResult as JsonParseResult, type json_JsonPatchOp as JsonPatchOp, type json_JsonPatchOperation as JsonPatchOperation, type json_JsonPathResult as JsonPathResult, type json_JsonPointerResult as JsonPointerResult, type json_JsonSchemaLike as JsonSchemaLike, type json_JsonSchemaToTsOptions as JsonSchemaToTsOptions, type json_MergePatchResult as MergePatchResult, type json_ParseStatus as ParseStatus, type json_PythonClass as PythonClass, type json_PythonField as PythonField, type json_PythonMode as PythonMode, type json_ValidationError as ValidationError, type json_ValidationResult as ValidationResult, type json_ZodOptions as ZodOptions, json_applyJsonMergePatch as applyJsonMergePatch, json_applyJsonPatch as applyJsonPatch, json_csvToJson as csvToJson, json_detectFormat as detectFormat, json_diffJson as diffJson, json_diffJsonPatch as diffJsonPatch, json_evaluateJsonPath as evaluateJsonPath, json_formatDiffLine as formatDiffLine, json_formatJson as formatJson, json_generateExample as generateExample, json_generateJsonPatch as generateJsonPatch, json_getJsonStats as getJsonStats, json_inferGoType as inferGoType, json_inferPythonType as inferPythonType, json_inferType as inferType, json_jsonSchemaToTypescript as jsonSchemaToTypescript, json_jsonToCsv as jsonToCsv, json_jsonToGo as jsonToGo, json_jsonToPython as jsonToPython, json_jsonToTypescript as jsonToTypescript, json_jsonToYaml as jsonToYaml, json_jsonToZod as jsonToZod, json_mergeJsonPatch as mergeJsonPatch, json_minifyJson as minifyJson, json_parseJson as parseJson, json_parseStructs as parseStructs, json_resolveJsonPointer as resolveJsonPointer, json_toPascalCase as toPascalCase, json_toSnakeCase as toSnakeCase, json_validateGeoJson as validateGeoJson, json_validateJson as validateJson, json_validateJsonPath as validateJsonPath, json_validateJsonString as validateJsonString, json_yamlToJson as yamlToJson };
|
|
319
345
|
}
|
|
320
346
|
|
|
321
|
-
export {
|
|
347
|
+
export { toSnakeCase as $, generateExample as A, generateJsonPatch as B, type ConvertOptions as C, type DiffNode as D, getJsonStats as E, inferGoType as F, type GeoJsonIssue as G, inferPythonType as H, inferType as I, type JsonDiffResult as J, jsonSchemaToTypescript as K, jsonToCsv as L, type MergePatchResult as M, jsonToGo as N, jsonToPython as O, type ParseStatus as P, jsonToTypescript as Q, jsonToYaml as R, jsonToZod as S, mergeJsonPatch as T, minifyJson as U, type ValidationError as V, parseJson as W, parseStructs as X, resolveJsonPointer as Y, type ZodOptions as Z, toPascalCase as _, type CsvOptions as a, validateGeoJson as a0, validateJson as a1, validateJsonPath as a2, validateJsonString as a3, yamlToJson as a4, type DiffType as b, type GeoJsonValidateResult as c, type GoField as d, type GoStruct as e, type JsonParseResult as f, type JsonPatchOp as g, type JsonPatchOperation as h, type JsonPathResult as i, json as j, type JsonPointerResult as k, type JsonSchemaLike as l, type JsonSchemaToTsOptions as m, type PythonClass as n, type PythonField as o, type PythonMode as p, type ValidationResult as q, applyJsonMergePatch as r, applyJsonPatch as s, csvToJson as t, detectFormat as u, diffJson as v, diffJsonPatch as w, evaluateJsonPath as x, formatDiffLine as y, formatJson as z };
|