@bendyline/squisq 0.1.1
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/Types-sh2VRxfo.d.ts +15 -0
- package/dist/chunk-7UDSRZKG.js +103 -0
- package/dist/chunk-7UDSRZKG.js.map +1 -0
- package/dist/chunk-O5HCIUAD.js +577 -0
- package/dist/chunk-O5HCIUAD.js.map +1 -0
- package/dist/chunk-PJ7AODIM.js +3040 -0
- package/dist/chunk-PJ7AODIM.js.map +1 -0
- package/dist/chunk-QWVRN6I4.js +81 -0
- package/dist/chunk-QWVRN6I4.js.map +1 -0
- package/dist/chunk-S4F2RY37.js +92 -0
- package/dist/chunk-S4F2RY37.js.map +1 -0
- package/dist/chunk-URU6QMLY.js +888 -0
- package/dist/chunk-URU6QMLY.js.map +1 -0
- package/dist/chunk-VJN7UB2Z.js +145 -0
- package/dist/chunk-VJN7UB2Z.js.map +1 -0
- package/dist/doc/index.d.ts +3 -0
- package/dist/doc/index.js +126 -0
- package/dist/doc/index.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +217 -0
- package/dist/index.js.map +1 -0
- package/dist/markdown/index.d.ts +237 -0
- package/dist/markdown/index.js +33 -0
- package/dist/markdown/index.js.map +1 -0
- package/dist/schemas/index.d.ts +70 -0
- package/dist/schemas/index.js +61 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/spatial/index.d.ts +111 -0
- package/dist/spatial/index.js +25 -0
- package/dist/spatial/index.js.map +1 -0
- package/dist/storage/index.d.ts +91 -0
- package/dist/storage/index.js +11 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/story/index.d.ts +691 -0
- package/dist/story/index.js +126 -0
- package/dist/story/index.js.map +1 -0
- package/dist/themeLibrary-DySHPcgj.d.ts +1352 -0
- package/dist/types-DHiv_Pnm.d.ts +496 -0
- package/package.json +91 -0
- package/src/__tests__/animationUtils.test.ts +77 -0
- package/src/__tests__/geohash.test.ts +109 -0
- package/src/__tests__/getLayers.test.ts +200 -0
- package/src/__tests__/haversine.test.ts +63 -0
- package/src/__tests__/localForageAdapter.test.ts +155 -0
- package/src/__tests__/markdown.test.ts +806 -0
- package/src/__tests__/markdownToDoc.test.ts +374 -0
- package/src/__tests__/storage.test.ts +60 -0
- package/src/__tests__/templates.test.ts +247 -0
- package/src/doc/docToMarkdown.ts +98 -0
- package/src/doc/getLayers.ts +152 -0
- package/src/doc/index.ts +8 -0
- package/src/doc/markdownToDoc.ts +277 -0
- package/src/doc/templates/accentImage.ts +338 -0
- package/src/doc/templates/captionUtils.ts +33 -0
- package/src/doc/templates/comparisonBar.ts +140 -0
- package/src/doc/templates/coverBlock.ts +156 -0
- package/src/doc/templates/dateEvent.ts +122 -0
- package/src/doc/templates/definitionCard.ts +129 -0
- package/src/doc/templates/factCard.ts +114 -0
- package/src/doc/templates/fullBleedQuote.ts +59 -0
- package/src/doc/templates/imageWithCaption.ts +167 -0
- package/src/doc/templates/index.ts +571 -0
- package/src/doc/templates/listBlock.ts +101 -0
- package/src/doc/templates/mapBlock.ts +132 -0
- package/src/doc/templates/persistentLayers.ts +522 -0
- package/src/doc/templates/photoGrid.ts +199 -0
- package/src/doc/templates/pullQuote.ts +119 -0
- package/src/doc/templates/quoteBlock.ts +112 -0
- package/src/doc/templates/sectionHeader.ts +105 -0
- package/src/doc/templates/statHighlight.ts +113 -0
- package/src/doc/templates/titleBlock.ts +100 -0
- package/src/doc/templates/twoColumn.ts +239 -0
- package/src/doc/templates/videoPullQuote.ts +128 -0
- package/src/doc/templates/videoWithCaption.ts +126 -0
- package/src/doc/utils/animationUtils.ts +135 -0
- package/src/doc/utils/themeUtils.ts +139 -0
- package/src/index.ts +5 -0
- package/src/markdown/convert.ts +897 -0
- package/src/markdown/htmlParse.ts +212 -0
- package/src/markdown/index.ts +110 -0
- package/src/markdown/parse.ts +103 -0
- package/src/markdown/stringify.ts +122 -0
- package/src/markdown/types.ts +605 -0
- package/src/markdown/utils.ts +165 -0
- package/src/ngeohash.d.ts +11 -0
- package/src/schemas/BlockTemplates.ts +706 -0
- package/src/schemas/Doc.ts +565 -0
- package/src/schemas/LayoutStrategy.ts +178 -0
- package/src/schemas/MediaProvider.ts +70 -0
- package/src/schemas/Theme.ts +235 -0
- package/src/schemas/Types.ts +15 -0
- package/src/schemas/Viewport.ts +91 -0
- package/src/schemas/index.ts +14 -0
- package/src/schemas/themeLibrary.ts +492 -0
- package/src/spatial/Geohash.ts +168 -0
- package/src/spatial/Haversine.ts +59 -0
- package/src/spatial/index.ts +2 -0
- package/src/storage/LocalForageAdapter.ts +103 -0
- package/src/storage/LocalStorageAdapter.ts +57 -0
- package/src/storage/MemoryStorageAdapter.ts +37 -0
- package/src/storage/Storage.ts +28 -0
- package/src/storage/index.ts +5 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core geographic types shared across squisq.
|
|
3
|
+
*/
|
|
4
|
+
interface Coordinates {
|
|
5
|
+
lat: number;
|
|
6
|
+
lng: number;
|
|
7
|
+
}
|
|
8
|
+
interface BoundingBox {
|
|
9
|
+
north: number;
|
|
10
|
+
south: number;
|
|
11
|
+
east: number;
|
|
12
|
+
west: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type { BoundingBox as B, Coordinates as C };
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// src/spatial/Haversine.ts
|
|
2
|
+
function haversineDistance(from, to) {
|
|
3
|
+
const R = 6371;
|
|
4
|
+
const dLat = toRadians(to.lat - from.lat);
|
|
5
|
+
const dLng = toRadians(to.lng - from.lng);
|
|
6
|
+
const a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(toRadians(from.lat)) * Math.cos(toRadians(to.lat)) * Math.sin(dLng / 2) * Math.sin(dLng / 2);
|
|
7
|
+
const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
|
8
|
+
return R * c;
|
|
9
|
+
}
|
|
10
|
+
function calculateBearing(from, to) {
|
|
11
|
+
const dLng = toRadians(to.lng - from.lng);
|
|
12
|
+
const lat1 = toRadians(from.lat);
|
|
13
|
+
const lat2 = toRadians(to.lat);
|
|
14
|
+
const x = Math.sin(dLng) * Math.cos(lat2);
|
|
15
|
+
const y = Math.cos(lat1) * Math.sin(lat2) - Math.sin(lat1) * Math.cos(lat2) * Math.cos(dLng);
|
|
16
|
+
const bearing = Math.atan2(x, y);
|
|
17
|
+
return (bearing * 180 / Math.PI + 360) % 360;
|
|
18
|
+
}
|
|
19
|
+
function toRadians(degrees) {
|
|
20
|
+
return degrees * Math.PI / 180;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// src/spatial/Geohash.ts
|
|
24
|
+
import ngeohash from "ngeohash";
|
|
25
|
+
function encodeGeohash(lat, lng, precision = 9) {
|
|
26
|
+
return ngeohash.encode(lat, lng, precision);
|
|
27
|
+
}
|
|
28
|
+
function decodeGeohash(hash) {
|
|
29
|
+
const result = ngeohash.decode(hash);
|
|
30
|
+
return {
|
|
31
|
+
lat: result.latitude,
|
|
32
|
+
lng: result.longitude,
|
|
33
|
+
latErr: result.error.latitude,
|
|
34
|
+
lngErr: result.error.longitude
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function getNeighbors(hash) {
|
|
38
|
+
return ngeohash.neighbors(hash);
|
|
39
|
+
}
|
|
40
|
+
function getGeohash4Neighbors(geohash4) {
|
|
41
|
+
if (geohash4.length !== 4) {
|
|
42
|
+
throw new Error(`getGeohash4Neighbors requires 4-char geohash, got: ${geohash4}`);
|
|
43
|
+
}
|
|
44
|
+
const neighbors = getNeighbors(geohash4);
|
|
45
|
+
return [geohash4, ...neighbors];
|
|
46
|
+
}
|
|
47
|
+
function getGeohashPrefix(geohash, precision) {
|
|
48
|
+
return geohash.slice(0, precision);
|
|
49
|
+
}
|
|
50
|
+
function geohashToHierarchicalPath(geohash4) {
|
|
51
|
+
if (geohash4.length !== 4) {
|
|
52
|
+
throw new Error(`geohashToHierarchicalPath requires 4-char geohash, got: ${geohash4}`);
|
|
53
|
+
}
|
|
54
|
+
const [c1, c2, c3, c4] = geohash4.split("");
|
|
55
|
+
return `${c1}/${c2}/${c3}/${c4}`;
|
|
56
|
+
}
|
|
57
|
+
function getGeohashPath(from, to, precision = 4) {
|
|
58
|
+
if (from === to) return [];
|
|
59
|
+
const fromCenter = decodeGeohash(from);
|
|
60
|
+
const toCenter = decodeGeohash(to);
|
|
61
|
+
const dLat = Math.abs(toCenter.lat - fromCenter.lat);
|
|
62
|
+
const dLng = Math.abs(toCenter.lng - fromCenter.lng);
|
|
63
|
+
const midLatRad = (fromCenter.lat + toCenter.lat) / 2 * (Math.PI / 180);
|
|
64
|
+
const approxKm = Math.sqrt((dLat * 111) ** 2 + (dLng * 111 * Math.cos(midLatRad)) ** 2);
|
|
65
|
+
const steps = Math.max(2, Math.ceil(approxKm / 15));
|
|
66
|
+
const seen = /* @__PURE__ */ new Set();
|
|
67
|
+
seen.add(from);
|
|
68
|
+
seen.add(to);
|
|
69
|
+
const path = [];
|
|
70
|
+
for (let i = 1; i < steps; i++) {
|
|
71
|
+
const t = i / steps;
|
|
72
|
+
const lat = fromCenter.lat + t * (toCenter.lat - fromCenter.lat);
|
|
73
|
+
const lng = fromCenter.lng + t * (toCenter.lng - fromCenter.lng);
|
|
74
|
+
const hash = encodeGeohash(lat, lng, precision);
|
|
75
|
+
if (!seen.has(hash)) {
|
|
76
|
+
seen.add(hash);
|
|
77
|
+
path.push(hash);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return path;
|
|
81
|
+
}
|
|
82
|
+
function geohashOverlapsBounds(hash, bounds) {
|
|
83
|
+
const { lat, lng, latErr, lngErr } = decodeGeohash(hash);
|
|
84
|
+
const hashNorth = lat + latErr;
|
|
85
|
+
const hashSouth = lat - latErr;
|
|
86
|
+
const hashEast = lng + lngErr;
|
|
87
|
+
const hashWest = lng - lngErr;
|
|
88
|
+
return !(hashNorth < bounds.south || hashSouth > bounds.north || hashEast < bounds.west || hashWest > bounds.east);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export {
|
|
92
|
+
haversineDistance,
|
|
93
|
+
calculateBearing,
|
|
94
|
+
encodeGeohash,
|
|
95
|
+
decodeGeohash,
|
|
96
|
+
getNeighbors,
|
|
97
|
+
getGeohash4Neighbors,
|
|
98
|
+
getGeohashPrefix,
|
|
99
|
+
geohashToHierarchicalPath,
|
|
100
|
+
getGeohashPath,
|
|
101
|
+
geohashOverlapsBounds
|
|
102
|
+
};
|
|
103
|
+
//# sourceMappingURL=chunk-7UDSRZKG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/spatial/Haversine.ts","../src/spatial/Geohash.ts"],"sourcesContent":["/**\n * Haversine Distance Calculation\n *\n * Provides accurate distance calculation between two geographic coordinates\n * using the Haversine formula, which accounts for Earth's curvature.\n */\n\nimport type { Coordinates } from '../schemas/Types.js';\n\n/**\n * Calculate distance between two coordinates using Haversine formula.\n *\n * @param from Start coordinates\n * @param to End coordinates\n * @returns Distance in kilometers\n */\nexport function haversineDistance(from: Coordinates, to: Coordinates): number {\n const R = 6371; // Earth's radius in kilometers\n\n const dLat = toRadians(to.lat - from.lat);\n const dLng = toRadians(to.lng - from.lng);\n\n const a =\n Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(toRadians(from.lat)) *\n Math.cos(toRadians(to.lat)) *\n Math.sin(dLng / 2) *\n Math.sin(dLng / 2);\n\n const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\n return R * c;\n}\n\n/**\n * Calculate bearing from one coordinate to another.\n *\n * @param from Start coordinates\n * @param to End coordinates\n * @returns Bearing in degrees (0-360, where 0 = north, 90 = east)\n */\nexport function calculateBearing(from: Coordinates, to: Coordinates): number {\n const dLng = toRadians(to.lng - from.lng);\n const lat1 = toRadians(from.lat);\n const lat2 = toRadians(to.lat);\n\n const x = Math.sin(dLng) * Math.cos(lat2);\n const y = Math.cos(lat1) * Math.sin(lat2) - Math.sin(lat1) * Math.cos(lat2) * Math.cos(dLng);\n\n const bearing = Math.atan2(x, y);\n return ((bearing * 180) / Math.PI + 360) % 360;\n}\n\n/**\n * Convert degrees to radians.\n */\nfunction toRadians(degrees: number): number {\n return (degrees * Math.PI) / 180;\n}\n","/**\n * Geohash Utilities\n *\n * Provides geohash encoding/decoding and spatial utilities using the standard\n * ngeohash library for core operations, plus custom utilities for overlap checking\n * and distance calculation.\n *\n * Geohashes are a hierarchical spatial indexing system that divides the world\n * into a grid of cells. Each additional character narrows the area by ~1/32.\n *\n * Precision guide:\n * - 4 chars: ~39km x 19km (used for tile indexing)\n * - 5 chars: ~5km x 5km\n * - 6 chars: ~1.2km x 0.6km\n */\n\nimport ngeohash from 'ngeohash';\n\n/**\n * Encode latitude/longitude to a geohash string.\n * Uses the standard ngeohash library.\n */\nexport function encodeGeohash(lat: number, lng: number, precision = 9): string {\n return ngeohash.encode(lat, lng, precision);\n}\n\n/**\n * Decode a geohash to latitude/longitude center with error bounds.\n * Uses the standard ngeohash library.\n */\nexport function decodeGeohash(hash: string): {\n lat: number;\n lng: number;\n latErr: number;\n lngErr: number;\n} {\n const result = ngeohash.decode(hash);\n return {\n lat: result.latitude,\n lng: result.longitude,\n latErr: result.error.latitude,\n lngErr: result.error.longitude,\n };\n}\n\n/**\n * Get the 8 neighboring geohash cells.\n * Returns up to 8 neighbors (fewer at poles or antimeridian).\n * Uses the standard ngeohash library.\n */\nexport function getNeighbors(hash: string): string[] {\n return ngeohash.neighbors(hash);\n}\n\n/**\n * Get a 3x3 grid of geohash4 cells (center + 8 neighbors).\n * Used for landing bonus expansions in Fly mode.\n *\n * @param geohash4 - Center geohash4 cell\n * @returns Array of 9 geohash4 cells (center first, then neighbors)\n *\n * @example\n * getGeohash4Neighbors('c23n')\n * // => ['c23n', 'c23p', 'c23q', 'c23j', 'c23m', 'c23k', 'c23h', 'c23e', 'c23s']\n */\nexport function getGeohash4Neighbors(geohash4: string): string[] {\n if (geohash4.length !== 4) {\n throw new Error(`getGeohash4Neighbors requires 4-char geohash, got: ${geohash4}`);\n }\n const neighbors = getNeighbors(geohash4);\n return [geohash4, ...neighbors];\n}\n\n/**\n * Get the prefix of a geohash at a given precision.\n * Simple helper for extracting geohash prefixes for directory organization.\n */\nexport function getGeohashPrefix(geohash: string, precision: number): string {\n return geohash.slice(0, precision);\n}\n\n/**\n * Convert a geohash prefix to a hierarchical path.\n *\n * Examples:\n * \"9mud\" -> \"9/m/u/d\"\n * \"9q8y\" -> \"9/q/8/y\"\n * \"c24k\" -> \"c/2/4/k\"\n *\n * This is used for organizing files in hierarchical directories to avoid\n * thousands of folders in a single directory, which causes filesystem\n * performance issues.\n */\nexport function geohashToHierarchicalPath(geohash4: string): string {\n if (geohash4.length !== 4) {\n throw new Error(`geohashToHierarchicalPath requires 4-char geohash, got: ${geohash4}`);\n }\n const [c1, c2, c3, c4] = geohash4.split('');\n return `${c1}/${c2}/${c3}/${c4}`;\n}\n\n/**\n * Compute all geohash cells along the path between two geohash cells.\n * Interpolates lat/lng points between the centers of `from` and `to`,\n * encoding each to a geohash at the given precision, and returns the\n * deduplicated list of intermediate cells (excluding `from` and `to`).\n */\nexport function getGeohashPath(from: string, to: string, precision = 4): string[] {\n if (from === to) return [];\n\n const fromCenter = decodeGeohash(from);\n const toCenter = decodeGeohash(to);\n\n // Compute approximate distance to determine step count\n const dLat = Math.abs(toCenter.lat - fromCenter.lat);\n const dLng = Math.abs(toCenter.lng - fromCenter.lng);\n // Rough km: 1 degree lat ≈ 111km, 1 degree lng ≈ 111km * cos(midLat)\n const midLatRad = ((fromCenter.lat + toCenter.lat) / 2) * (Math.PI / 180);\n const approxKm = Math.sqrt((dLat * 111) ** 2 + (dLng * 111 * Math.cos(midLatRad)) ** 2);\n\n // Step every ~15km to avoid skipping any geohash4 cell (~39x19km)\n const steps = Math.max(2, Math.ceil(approxKm / 15));\n\n const seen = new Set<string>();\n seen.add(from);\n seen.add(to);\n\n const path: string[] = [];\n for (let i = 1; i < steps; i++) {\n const t = i / steps;\n const lat = fromCenter.lat + t * (toCenter.lat - fromCenter.lat);\n const lng = fromCenter.lng + t * (toCenter.lng - fromCenter.lng);\n const hash = encodeGeohash(lat, lng, precision);\n if (!seen.has(hash)) {\n seen.add(hash);\n path.push(hash);\n }\n }\n\n return path;\n}\n\n/**\n * Check if a geohash cell overlaps with a bounding box.\n * Custom implementation (not available in ngeohash).\n */\nexport function geohashOverlapsBounds(\n hash: string,\n bounds: { north: number; south: number; east: number; west: number },\n): boolean {\n const { lat, lng, latErr, lngErr } = decodeGeohash(hash);\n\n const hashNorth = lat + latErr;\n const hashSouth = lat - latErr;\n const hashEast = lng + lngErr;\n const hashWest = lng - lngErr;\n\n return !(\n hashNorth < bounds.south ||\n hashSouth > bounds.north ||\n hashEast < bounds.west ||\n hashWest > bounds.east\n );\n}\n\n// haversineDistance is now in shared/spatial/Haversine.ts (canonical location).\n// Re-export for backwards compatibility with existing imports.\nexport { haversineDistance } from './Haversine.js';\n"],"mappings":";AAgBO,SAAS,kBAAkB,MAAmB,IAAyB;AAC5E,QAAM,IAAI;AAEV,QAAM,OAAO,UAAU,GAAG,MAAM,KAAK,GAAG;AACxC,QAAM,OAAO,UAAU,GAAG,MAAM,KAAK,GAAG;AAExC,QAAM,IACJ,KAAK,IAAI,OAAO,CAAC,IAAI,KAAK,IAAI,OAAO,CAAC,IACtC,KAAK,IAAI,UAAU,KAAK,GAAG,CAAC,IAC1B,KAAK,IAAI,UAAU,GAAG,GAAG,CAAC,IAC1B,KAAK,IAAI,OAAO,CAAC,IACjB,KAAK,IAAI,OAAO,CAAC;AAErB,QAAM,IAAI,IAAI,KAAK,MAAM,KAAK,KAAK,CAAC,GAAG,KAAK,KAAK,IAAI,CAAC,CAAC;AAEvD,SAAO,IAAI;AACb;AASO,SAAS,iBAAiB,MAAmB,IAAyB;AAC3E,QAAM,OAAO,UAAU,GAAG,MAAM,KAAK,GAAG;AACxC,QAAM,OAAO,UA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