@bendyline/squisq 0.1.1 → 1.0.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.
Files changed (329) hide show
  1. package/README.md +85 -0
  2. package/dist/{themeLibrary-DySHPcgj.d.ts → Doc-1hmT1LZl.d.ts} +1 -42
  3. package/dist/__tests__/animationUtils.test.d.ts +2 -0
  4. package/dist/__tests__/animationUtils.test.d.ts.map +1 -0
  5. package/dist/__tests__/animationUtils.test.js +60 -0
  6. package/dist/__tests__/animationUtils.test.js.map +1 -0
  7. package/dist/__tests__/contentExtractor.test.d.ts +2 -0
  8. package/dist/__tests__/contentExtractor.test.d.ts.map +1 -0
  9. package/dist/__tests__/contentExtractor.test.js +151 -0
  10. package/dist/__tests__/contentExtractor.test.js.map +1 -0
  11. package/dist/__tests__/geohash.test.d.ts +2 -0
  12. package/dist/__tests__/geohash.test.d.ts.map +1 -0
  13. package/dist/__tests__/geohash.test.js +87 -0
  14. package/dist/__tests__/geohash.test.js.map +1 -0
  15. package/dist/__tests__/getLayers.test.d.ts +2 -0
  16. package/dist/__tests__/getLayers.test.d.ts.map +1 -0
  17. package/dist/__tests__/getLayers.test.js +167 -0
  18. package/dist/__tests__/getLayers.test.js.map +1 -0
  19. package/dist/__tests__/haversine.test.d.ts +2 -0
  20. package/dist/__tests__/haversine.test.d.ts.map +1 -0
  21. package/dist/__tests__/haversine.test.js +56 -0
  22. package/dist/__tests__/haversine.test.js.map +1 -0
  23. package/dist/__tests__/localForageAdapter.test.d.ts +8 -0
  24. package/dist/__tests__/localForageAdapter.test.d.ts.map +1 -0
  25. package/dist/__tests__/localForageAdapter.test.js +130 -0
  26. package/dist/__tests__/localForageAdapter.test.js.map +1 -0
  27. package/dist/__tests__/markdown.test.d.ts +2 -0
  28. package/dist/__tests__/markdown.test.d.ts.map +1 -0
  29. package/dist/__tests__/markdown.test.js +654 -0
  30. package/dist/__tests__/markdown.test.js.map +1 -0
  31. package/dist/__tests__/markdownToDoc.test.d.ts +2 -0
  32. package/dist/__tests__/markdownToDoc.test.d.ts.map +1 -0
  33. package/dist/__tests__/markdownToDoc.test.js +313 -0
  34. package/dist/__tests__/markdownToDoc.test.js.map +1 -0
  35. package/dist/__tests__/seededRandom.test.d.ts +2 -0
  36. package/dist/__tests__/seededRandom.test.d.ts.map +1 -0
  37. package/dist/__tests__/seededRandom.test.js +125 -0
  38. package/dist/__tests__/seededRandom.test.js.map +1 -0
  39. package/dist/__tests__/slideshowGenerator.test.d.ts +2 -0
  40. package/dist/__tests__/slideshowGenerator.test.d.ts.map +1 -0
  41. package/dist/__tests__/slideshowGenerator.test.js +114 -0
  42. package/dist/__tests__/slideshowGenerator.test.js.map +1 -0
  43. package/dist/__tests__/storage.test.d.ts +2 -0
  44. package/dist/__tests__/storage.test.d.ts.map +1 -0
  45. package/dist/__tests__/storage.test.js +51 -0
  46. package/dist/__tests__/storage.test.js.map +1 -0
  47. package/dist/__tests__/templates.test.d.ts +2 -0
  48. package/dist/__tests__/templates.test.d.ts.map +1 -0
  49. package/dist/__tests__/templates.test.js +217 -0
  50. package/dist/__tests__/templates.test.js.map +1 -0
  51. package/dist/__tests__/timing.test.d.ts +2 -0
  52. package/dist/__tests__/timing.test.d.ts.map +1 -0
  53. package/dist/__tests__/timing.test.js +131 -0
  54. package/dist/__tests__/timing.test.js.map +1 -0
  55. package/dist/chunk-3E5F2XMR.js +129 -0
  56. package/dist/chunk-3E5F2XMR.js.map +1 -0
  57. package/dist/chunk-6YJPI6VI.js +35 -0
  58. package/dist/chunk-6YJPI6VI.js.map +1 -0
  59. package/dist/chunk-FVTQSNR7.js +100 -0
  60. package/dist/chunk-FVTQSNR7.js.map +1 -0
  61. package/dist/chunk-V543AI2F.js +1 -0
  62. package/dist/chunk-V543AI2F.js.map +1 -0
  63. package/dist/chunk-VP5SZTZ2.js +792 -0
  64. package/dist/chunk-VP5SZTZ2.js.map +1 -0
  65. package/dist/doc/docToMarkdown.d.ts +41 -0
  66. package/dist/doc/docToMarkdown.d.ts.map +1 -0
  67. package/dist/doc/docToMarkdown.js +88 -0
  68. package/dist/doc/docToMarkdown.js.map +1 -0
  69. package/dist/doc/getLayers.d.ts +65 -0
  70. package/dist/doc/getLayers.d.ts.map +1 -0
  71. package/dist/doc/getLayers.js +103 -0
  72. package/dist/doc/getLayers.js.map +1 -0
  73. package/dist/doc/index.d.ts +9 -3
  74. package/dist/doc/index.d.ts.map +1 -0
  75. package/dist/doc/index.js +6 -125
  76. package/dist/doc/index.js.map +1 -1
  77. package/dist/doc/markdownToDoc.d.ts +68 -0
  78. package/dist/doc/markdownToDoc.d.ts.map +1 -0
  79. package/dist/doc/markdownToDoc.js +225 -0
  80. package/dist/doc/markdownToDoc.js.map +1 -0
  81. package/dist/doc/templates/accentImage.d.ts +59 -0
  82. package/dist/doc/templates/accentImage.d.ts.map +1 -0
  83. package/dist/doc/templates/accentImage.js +275 -0
  84. package/dist/doc/templates/accentImage.js.map +1 -0
  85. package/dist/doc/templates/captionUtils.d.ts +20 -0
  86. package/dist/doc/templates/captionUtils.d.ts.map +1 -0
  87. package/dist/doc/templates/captionUtils.js +29 -0
  88. package/dist/doc/templates/captionUtils.js.map +1 -0
  89. package/dist/doc/templates/comparisonBar.d.ts +13 -0
  90. package/dist/doc/templates/comparisonBar.d.ts.map +1 -0
  91. package/dist/doc/templates/comparisonBar.js +127 -0
  92. package/dist/doc/templates/comparisonBar.js.map +1 -0
  93. package/dist/doc/templates/coverBlock.d.ts +51 -0
  94. package/dist/doc/templates/coverBlock.d.ts.map +1 -0
  95. package/dist/doc/templates/coverBlock.js +125 -0
  96. package/dist/doc/templates/coverBlock.js.map +1 -0
  97. package/dist/doc/templates/dateEvent.d.ts +15 -0
  98. package/dist/doc/templates/dateEvent.d.ts.map +1 -0
  99. package/dist/doc/templates/dateEvent.js +110 -0
  100. package/dist/doc/templates/dateEvent.js.map +1 -0
  101. package/dist/doc/templates/definitionCard.d.ts +13 -0
  102. package/dist/doc/templates/definitionCard.d.ts.map +1 -0
  103. package/dist/doc/templates/definitionCard.js +114 -0
  104. package/dist/doc/templates/definitionCard.js.map +1 -0
  105. package/dist/doc/templates/factCard.d.ts +15 -0
  106. package/dist/doc/templates/factCard.d.ts.map +1 -0
  107. package/dist/doc/templates/factCard.js +100 -0
  108. package/dist/doc/templates/factCard.js.map +1 -0
  109. package/dist/doc/templates/fullBleedQuote.d.ts +13 -0
  110. package/dist/doc/templates/fullBleedQuote.d.ts.map +1 -0
  111. package/dist/doc/templates/fullBleedQuote.js +54 -0
  112. package/dist/doc/templates/fullBleedQuote.js.map +1 -0
  113. package/dist/doc/templates/imageWithCaption.d.ts +13 -0
  114. package/dist/doc/templates/imageWithCaption.d.ts.map +1 -0
  115. package/dist/doc/templates/imageWithCaption.js +142 -0
  116. package/dist/doc/templates/imageWithCaption.js.map +1 -0
  117. package/dist/doc/templates/index.d.ts +104 -0
  118. package/dist/doc/templates/index.d.ts.map +1 -0
  119. package/dist/doc/templates/index.js +442 -0
  120. package/dist/doc/templates/index.js.map +1 -0
  121. package/dist/doc/templates/listBlock.d.ts +13 -0
  122. package/dist/doc/templates/listBlock.d.ts.map +1 -0
  123. package/dist/doc/templates/listBlock.js +89 -0
  124. package/dist/doc/templates/listBlock.js.map +1 -0
  125. package/dist/doc/templates/mapBlock.d.ts +17 -0
  126. package/dist/doc/templates/mapBlock.d.ts.map +1 -0
  127. package/dist/doc/templates/mapBlock.js +112 -0
  128. package/dist/doc/templates/mapBlock.js.map +1 -0
  129. package/dist/doc/templates/persistentLayers.d.ts +39 -0
  130. package/dist/doc/templates/persistentLayers.d.ts.map +1 -0
  131. package/dist/doc/templates/persistentLayers.js +447 -0
  132. package/dist/doc/templates/persistentLayers.js.map +1 -0
  133. package/dist/doc/templates/photoGrid.d.ts +20 -0
  134. package/dist/doc/templates/photoGrid.d.ts.map +1 -0
  135. package/dist/doc/templates/photoGrid.js +172 -0
  136. package/dist/doc/templates/photoGrid.js.map +1 -0
  137. package/dist/doc/templates/pullQuote.d.ts +13 -0
  138. package/dist/doc/templates/pullQuote.d.ts.map +1 -0
  139. package/dist/doc/templates/pullQuote.js +109 -0
  140. package/dist/doc/templates/pullQuote.js.map +1 -0
  141. package/dist/doc/templates/quoteBlock.d.ts +15 -0
  142. package/dist/doc/templates/quoteBlock.d.ts.map +1 -0
  143. package/dist/doc/templates/quoteBlock.js +97 -0
  144. package/dist/doc/templates/quoteBlock.js.map +1 -0
  145. package/dist/doc/templates/sectionHeader.d.ts +14 -0
  146. package/dist/doc/templates/sectionHeader.d.ts.map +1 -0
  147. package/dist/doc/templates/sectionHeader.js +96 -0
  148. package/dist/doc/templates/sectionHeader.js.map +1 -0
  149. package/dist/doc/templates/statHighlight.d.ts +15 -0
  150. package/dist/doc/templates/statHighlight.d.ts.map +1 -0
  151. package/dist/doc/templates/statHighlight.js +99 -0
  152. package/dist/doc/templates/statHighlight.js.map +1 -0
  153. package/dist/doc/templates/titleBlock.d.ts +13 -0
  154. package/dist/doc/templates/titleBlock.d.ts.map +1 -0
  155. package/dist/doc/templates/titleBlock.js +92 -0
  156. package/dist/doc/templates/titleBlock.js.map +1 -0
  157. package/dist/doc/templates/twoColumn.d.ts +15 -0
  158. package/dist/doc/templates/twoColumn.d.ts.map +1 -0
  159. package/dist/doc/templates/twoColumn.js +219 -0
  160. package/dist/doc/templates/twoColumn.js.map +1 -0
  161. package/dist/doc/templates/videoPullQuote.d.ts +20 -0
  162. package/dist/doc/templates/videoPullQuote.d.ts.map +1 -0
  163. package/dist/doc/templates/videoPullQuote.js +118 -0
  164. package/dist/doc/templates/videoPullQuote.js.map +1 -0
  165. package/dist/doc/templates/videoWithCaption.d.ts +20 -0
  166. package/dist/doc/templates/videoWithCaption.d.ts.map +1 -0
  167. package/dist/doc/templates/videoWithCaption.js +104 -0
  168. package/dist/doc/templates/videoWithCaption.js.map +1 -0
  169. package/dist/doc/utils/animationUtils.d.ts +34 -0
  170. package/dist/doc/utils/animationUtils.d.ts.map +1 -0
  171. package/dist/doc/utils/animationUtils.js +110 -0
  172. package/dist/doc/utils/animationUtils.js.map +1 -0
  173. package/dist/doc/utils/themeUtils.d.ts +55 -0
  174. package/dist/doc/utils/themeUtils.d.ts.map +1 -0
  175. package/dist/doc/utils/themeUtils.js +109 -0
  176. package/dist/doc/utils/themeUtils.js.map +1 -0
  177. package/dist/generate/contentExtractor.d.ts +112 -0
  178. package/dist/generate/contentExtractor.d.ts.map +1 -0
  179. package/dist/generate/contentExtractor.js +638 -0
  180. package/dist/generate/contentExtractor.js.map +1 -0
  181. package/dist/generate/index.d.ts +7 -0
  182. package/dist/generate/index.d.ts.map +1 -0
  183. package/dist/generate/index.js +4 -0
  184. package/dist/generate/index.js.map +1 -0
  185. package/dist/generate/slideshowGenerator.d.ts +72 -0
  186. package/dist/generate/slideshowGenerator.d.ts.map +1 -0
  187. package/dist/generate/slideshowGenerator.js +159 -0
  188. package/dist/generate/slideshowGenerator.js.map +1 -0
  189. package/dist/generate/templateMapper.d.ts +23 -0
  190. package/dist/generate/templateMapper.d.ts.map +1 -0
  191. package/dist/generate/templateMapper.js +114 -0
  192. package/dist/generate/templateMapper.js.map +1 -0
  193. package/dist/index.d.ts +9 -8
  194. package/dist/index.d.ts.map +1 -0
  195. package/dist/index.js +8 -216
  196. package/dist/index.js.map +1 -1
  197. package/dist/markdown/convert.d.ts +71 -0
  198. package/dist/markdown/convert.d.ts.map +1 -0
  199. package/dist/markdown/convert.js +746 -0
  200. package/dist/markdown/convert.js.map +1 -0
  201. package/dist/markdown/htmlParse.d.ts +26 -0
  202. package/dist/markdown/htmlParse.d.ts.map +1 -0
  203. package/dist/markdown/htmlParse.js +195 -0
  204. package/dist/markdown/htmlParse.js.map +1 -0
  205. package/dist/markdown/index.d.ts +19 -225
  206. package/dist/markdown/index.d.ts.map +1 -0
  207. package/dist/markdown/index.js +33 -32
  208. package/dist/markdown/index.js.map +1 -1
  209. package/dist/markdown/parse.d.ts +27 -0
  210. package/dist/markdown/parse.d.ts.map +1 -0
  211. package/dist/markdown/parse.js +90 -0
  212. package/dist/markdown/parse.js.map +1 -0
  213. package/dist/markdown/stringify.d.ts +32 -0
  214. package/dist/markdown/stringify.d.ts.map +1 -0
  215. package/dist/markdown/stringify.js +108 -0
  216. package/dist/markdown/stringify.js.map +1 -0
  217. package/dist/markdown/types.d.ts +496 -0
  218. package/dist/markdown/types.d.ts.map +1 -0
  219. package/dist/markdown/types.js +17 -0
  220. package/dist/markdown/types.js.map +1 -0
  221. package/dist/markdown/utils.d.ts +78 -0
  222. package/dist/markdown/utils.d.ts.map +1 -0
  223. package/dist/markdown/utils.js +149 -0
  224. package/dist/markdown/utils.js.map +1 -0
  225. package/dist/random/SeededRandom.d.ts +50 -0
  226. package/dist/random/SeededRandom.d.ts.map +1 -0
  227. package/dist/random/SeededRandom.js +115 -0
  228. package/dist/random/SeededRandom.js.map +1 -0
  229. package/dist/random/index.d.ts +2 -0
  230. package/dist/random/index.d.ts.map +1 -0
  231. package/dist/random/index.js +2 -0
  232. package/dist/random/index.js.map +1 -0
  233. package/dist/schemas/BlockTemplates.d.ts +583 -0
  234. package/dist/schemas/BlockTemplates.d.ts.map +1 -0
  235. package/dist/schemas/BlockTemplates.js +72 -0
  236. package/dist/schemas/BlockTemplates.js.map +1 -0
  237. package/dist/schemas/Doc.d.ts +411 -0
  238. package/dist/schemas/Doc.d.ts.map +1 -0
  239. package/dist/schemas/Doc.js +90 -0
  240. package/dist/schemas/Doc.js.map +1 -0
  241. package/dist/schemas/LayoutStrategy.d.ts +84 -0
  242. package/dist/schemas/LayoutStrategy.d.ts.map +1 -0
  243. package/dist/schemas/LayoutStrategy.js +123 -0
  244. package/dist/schemas/LayoutStrategy.js.map +1 -0
  245. package/dist/schemas/MediaProvider.d.ts +65 -0
  246. package/dist/schemas/MediaProvider.d.ts.map +1 -0
  247. package/dist/schemas/MediaProvider.js +13 -0
  248. package/dist/schemas/MediaProvider.js.map +1 -0
  249. package/dist/schemas/Theme.d.ts +163 -0
  250. package/dist/schemas/Theme.d.ts.map +1 -0
  251. package/dist/schemas/Theme.js +62 -0
  252. package/dist/schemas/Theme.js.map +1 -0
  253. package/dist/schemas/Types.d.ts +14 -0
  254. package/dist/schemas/Types.d.ts.map +1 -0
  255. package/dist/schemas/Types.js +5 -0
  256. package/dist/schemas/Types.js.map +1 -0
  257. package/dist/schemas/Viewport.d.ts +74 -0
  258. package/dist/schemas/Viewport.d.ts.map +1 -0
  259. package/dist/schemas/Viewport.js +63 -0
  260. package/dist/schemas/Viewport.js.map +1 -0
  261. package/dist/schemas/index.d.ts +10 -70
  262. package/dist/schemas/index.d.ts.map +1 -0
  263. package/dist/schemas/index.js +7 -60
  264. package/dist/schemas/index.js.map +1 -1
  265. package/dist/schemas/themeLibrary.d.ts +41 -0
  266. package/dist/schemas/themeLibrary.d.ts.map +1 -0
  267. package/dist/schemas/themeLibrary.js +466 -0
  268. package/dist/schemas/themeLibrary.js.map +1 -0
  269. package/dist/spatial/Geohash.d.ts +85 -0
  270. package/dist/spatial/Geohash.d.ts.map +1 -0
  271. package/dist/spatial/Geohash.js +142 -0
  272. package/dist/spatial/Geohash.js.map +1 -0
  273. package/dist/spatial/Haversine.d.ts +24 -0
  274. package/dist/spatial/Haversine.d.ts.map +1 -0
  275. package/dist/spatial/Haversine.js +48 -0
  276. package/dist/spatial/Haversine.js.map +1 -0
  277. package/dist/spatial/index.d.ts +3 -111
  278. package/dist/spatial/index.d.ts.map +1 -0
  279. package/dist/spatial/index.js +2 -24
  280. package/dist/spatial/index.js.map +1 -1
  281. package/dist/storage/LocalForageAdapter.d.ts +36 -0
  282. package/dist/storage/LocalForageAdapter.d.ts.map +1 -0
  283. package/dist/storage/LocalForageAdapter.js +82 -0
  284. package/dist/storage/LocalForageAdapter.js.map +1 -0
  285. package/dist/storage/LocalStorageAdapter.d.ts +16 -0
  286. package/dist/storage/LocalStorageAdapter.d.ts.map +1 -0
  287. package/dist/storage/LocalStorageAdapter.js +50 -0
  288. package/dist/storage/LocalStorageAdapter.js.map +1 -0
  289. package/dist/storage/MemoryStorageAdapter.d.ts +15 -0
  290. package/dist/storage/MemoryStorageAdapter.d.ts.map +1 -0
  291. package/dist/storage/MemoryStorageAdapter.js +34 -0
  292. package/dist/storage/MemoryStorageAdapter.js.map +1 -0
  293. package/dist/storage/Storage.d.ts +23 -0
  294. package/dist/storage/Storage.d.ts.map +1 -0
  295. package/dist/storage/Storage.js +9 -0
  296. package/dist/storage/Storage.js.map +1 -0
  297. package/dist/storage/index.d.ts +6 -91
  298. package/dist/storage/index.d.ts.map +1 -0
  299. package/dist/storage/index.js +3 -10
  300. package/dist/storage/index.js.map +1 -1
  301. package/dist/story/index.d.ts +3 -2
  302. package/dist/themeLibrary-DR1VRo-8.d.ts +44 -0
  303. package/dist/timing/index.d.ts +4 -0
  304. package/dist/timing/index.d.ts.map +1 -0
  305. package/dist/timing/index.js +3 -0
  306. package/dist/timing/index.js.map +1 -0
  307. package/dist/timing/narrationTiming.d.ts +54 -0
  308. package/dist/timing/narrationTiming.d.ts.map +1 -0
  309. package/dist/timing/narrationTiming.js +190 -0
  310. package/dist/timing/narrationTiming.js.map +1 -0
  311. package/dist/timing/readingTime.d.ts +54 -0
  312. package/dist/timing/readingTime.d.ts.map +1 -0
  313. package/dist/timing/readingTime.js +49 -0
  314. package/dist/timing/readingTime.js.map +1 -0
  315. package/package.json +19 -5
  316. package/src/__tests__/contentExtractor.test.ts +183 -0
  317. package/src/__tests__/seededRandom.test.ts +142 -0
  318. package/src/__tests__/slideshowGenerator.test.ts +128 -0
  319. package/src/__tests__/timing.test.ts +167 -0
  320. package/src/generate/contentExtractor.ts +808 -0
  321. package/src/generate/index.ts +21 -0
  322. package/src/generate/slideshowGenerator.ts +273 -0
  323. package/src/generate/templateMapper.ts +170 -0
  324. package/src/index.ts +3 -0
  325. package/src/random/SeededRandom.ts +127 -0
  326. package/src/random/index.ts +1 -0
  327. package/src/timing/index.ts +17 -0
  328. package/src/timing/narrationTiming.ts +220 -0
  329. package/src/timing/readingTime.ts +94 -0
package/README.md ADDED
@@ -0,0 +1,85 @@
1
+ # @bendyline/squisq
2
+
3
+ Headless utilities for doc/block rendering, spatial math, Markdown parsing, and storage. Framework-agnostic — runs in the browser or Node.js with zero framework dependencies.
4
+
5
+ Part of the [Squisq](https://github.com/bendyline/squisq) monorepo.
6
+
7
+ [![npm](https://img.shields.io/npm/v/@bendyline/squisq)](https://www.npmjs.com/package/@bendyline/squisq)
8
+ [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/bendyline/squisq/blob/main/LICENSE)
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ npm install @bendyline/squisq
14
+ ```
15
+
16
+ ## What's Inside
17
+
18
+ | Module | Description |
19
+ | ------------ | -------------------------------------------------------------------------------- |
20
+ | **schemas** | Type definitions — `Doc`, `BlockTemplate`, `Viewport`, `Theme`, `LayoutStrategy` |
21
+ | **doc** | Template registry, 17 block templates, animation/theme utilities |
22
+ | **markdown** | Markdown parsing, stringifying, AST types (`MarkdownDocument`), tree utilities |
23
+ | **spatial** | Haversine distance, Geohash encode/decode |
24
+ | **storage** | `StorageAdapter` interface, Memory + LocalStorage + LocalForage adapters |
25
+
26
+ ## Subpath Imports
27
+
28
+ Import only what you need:
29
+
30
+ ```ts
31
+ import type { Doc, BlockTemplate, Theme } from '@bendyline/squisq/schemas';
32
+ import { getLayers, expandDocBlocks } from '@bendyline/squisq/doc';
33
+ import { parseMarkdown, stringifyMarkdown } from '@bendyline/squisq/markdown';
34
+ import { haversineDistance, geohashEncode } from '@bendyline/squisq/spatial';
35
+ import { LocalStorageAdapter } from '@bendyline/squisq/storage';
36
+ ```
37
+
38
+ Or import everything from the root:
39
+
40
+ ```ts
41
+ import { parseMarkdown, haversineDistance, getLayers } from '@bendyline/squisq';
42
+ ```
43
+
44
+ ## Quick Examples
45
+
46
+ ### Parse Markdown
47
+
48
+ ```ts
49
+ import { parseMarkdown, stringifyMarkdown } from '@bendyline/squisq/markdown';
50
+
51
+ const doc = parseMarkdown('# Hello\n\nSome content');
52
+ console.log(doc.children); // AST nodes
53
+
54
+ const md = stringifyMarkdown(doc);
55
+ ```
56
+
57
+ ### Spatial Utilities
58
+
59
+ ```ts
60
+ import { haversineDistance, geohashEncode } from '@bendyline/squisq/spatial';
61
+
62
+ const meters = haversineDistance(47.6, -122.3, 37.7, -122.4);
63
+ const hash = geohashEncode(47.6, -122.3, 7);
64
+ ```
65
+
66
+ ### Theme System
67
+
68
+ ```ts
69
+ import { resolveTheme, getAvailableThemes } from '@bendyline/squisq/schemas';
70
+
71
+ const themes = getAvailableThemes(); // 8 built-in themes
72
+ const theme = resolveTheme('cinematic');
73
+ ```
74
+
75
+ ## Related Packages
76
+
77
+ | Package | Description |
78
+ | ---------------------------------------------------------------------------------------------- | ------------------------------------------- |
79
+ | [@bendyline/squisq-react](https://www.npmjs.com/package/@bendyline/squisq-react) | React components for rendering docs |
80
+ | [@bendyline/squisq-formats](https://www.npmjs.com/package/@bendyline/squisq-formats) | DOCX, PDF, HTML import/export |
81
+ | [@bendyline/squisq-editor-react](https://www.npmjs.com/package/@bendyline/squisq-editor-react) | React editor with raw/WYSIWYG/preview modes |
82
+
83
+ ## License
84
+
85
+ [MIT](https://github.com/bendyline/squisq/blob/main/LICENSE)
@@ -1308,45 +1308,4 @@ declare function getCaptionAtTime(captions: CaptionTrack | undefined, time: numb
1308
1308
  */
1309
1309
  declare function validateDoc(script: Doc): string[];
1310
1310
 
1311
- /**
1312
- * Built-in Theme Library
1313
- *
1314
- * Ships 8 curated themes covering documentary, editorial, minimal, and
1315
- * cinematic styles. Each theme is fully JSON-serializable.
1316
- *
1317
- * Usage:
1318
- * ```ts
1319
- * import { THEMES, resolveTheme } from '@bendyline/squisq/schemas';
1320
- *
1321
- * const theme = resolveTheme('minimalist'); // look up by id
1322
- * const theme = THEMES.documentary; // direct access
1323
- * ```
1324
- */
1325
-
1326
- /**
1327
- * All built-in themes, keyed by id.
1328
- */
1329
- declare const THEMES: Record<string, Theme>;
1330
- /** The default theme id. */
1331
- declare const DEFAULT_THEME_ID = "documentary";
1332
- /** The default theme (documentary — migrated from old DEFAULT_THEME). */
1333
- declare const DEFAULT_THEME: Theme;
1334
- /**
1335
- * Resolve a theme by id. Returns the default theme when `id` is
1336
- * undefined or not found in the library.
1337
- */
1338
- declare function resolveTheme(id: string | undefined): Theme;
1339
- /**
1340
- * Get all available theme ids.
1341
- */
1342
- declare function getAvailableThemes(): string[];
1343
- /**
1344
- * Get a summary of all themes (id + name + description) for theme pickers.
1345
- */
1346
- declare function getThemeSummaries(): Array<{
1347
- id: string;
1348
- name: string;
1349
- description?: string;
1350
- }>;
1351
-
1352
- export { type TemplateContext as $, type AccentImage as A, type Block as B, type CaptionPhrase as C, DEFAULT_DOC_FONT as D, type PersistentLayerConfig as E, type FactCardInput as F, type GradientBackgroundConfig as G, type PersistentLayerTemplate as H, type ImageBackgroundConfig as I, type PersistentLayerTemplateConfig as J, type PersistentLayerTemplateType as K, type Layer as L, type MapBlockInput as M, type PhotoGridInput as N, type Position as O, type PatternBackgroundConfig as P, type ProgressIndicatorConfig as Q, type PullQuoteInput as R, type QuoteBlockInput as S, type RenderStyle as T, type SectionHeaderInput as U, type ShapeLayer as V, type SolidBackgroundConfig as W, type StartBlockConfig as X, type StatHighlightInput as Y, THEMES as Z, type TemplateBlock as _, type AccentPosition as a, type TemplateFunction as a0, type TemplateRegistry as a1, type TextLayer as a2, type TextStyle as a3, type Theme as a4, type ThemeColorPalette as a5, type ThemeColorScheme as a6, type ThemeStyle as a7, type ThemeTypography as a8, type TitleBlockInput as a9, isPersistentLayerTemplate as aA, isTemplateBlock as aB, scaledFontSize$1 as aC, resolveTheme as aD, scaledFontSize as aE, validateDoc as aF, type TitleCaptionConfig as aa, type Transition as ab, type TransitionType as ac, type TwoColumnInput as ad, VIEWPORT_PRESETS as ae, type VideoLayer as af, type VideoPullQuoteInput as ag, type VideoWithCaptionInput as ah, type ViewportConfig as ai, type ViewportOrientation as aj, type ViewportPreset as ak, calculateDuration as al, calculateFontScale as am, createTemplateContext as an, createTheme as ao, getAspectRatioString as ap, getAvailableThemes as aq, getBlockAtTime as ar, getCaptionAtTime as as, getLayoutHints as at, getSafeTextBounds as au, getSegmentAtTime as av, getThemeSummaries as aw, getTwoColumnPositions as ax, getViewport as ay, getViewportOrientation as az, type Animation as b, type AnimationType as c, type AudioSegment as d, type AudioTrack as e, type CaptionTrack as f, type ColorScheme as g, type ComparisonBarInput as h, type CornerBrandingConfig as i, DEFAULT_THEME as j, DEFAULT_THEME_ID as k, DEFAULT_TITLE_FONT as l, type DateEventInput as m, type DeepPartial as n, type DefinitionCardInput as o, type Doc as p, type DocBlock as q, type FullBleedQuoteInput as r, type ImageLayer as s, type ImageWithCaptionInput as t, type LayoutHints as u, type ListBlockInput as v, type MapLayer as w, type MapMarker as x, type MapTileStyle as y, type PersistentLayer as z };
1311
+ export { type TextLayer as $, type AccentImage as A, type Block as B, type CaptionPhrase as C, DEFAULT_DOC_FONT as D, type PersistentLayerTemplateConfig as E, type FactCardInput as F, type GradientBackgroundConfig as G, type PersistentLayerTemplateType as H, type ImageBackgroundConfig as I, type PhotoGridInput as J, type Position as K, type Layer as L, type MapBlockInput as M, type ProgressIndicatorConfig as N, type PullQuoteInput as O, type PatternBackgroundConfig as P, type QuoteBlockInput as Q, type RenderStyle as R, type SectionHeaderInput as S, type ShapeLayer as T, type SolidBackgroundConfig as U, type StartBlockConfig as V, type StatHighlightInput as W, type TemplateBlock as X, type TemplateContext as Y, type TemplateFunction as Z, type TemplateRegistry as _, type AccentPosition as a, type TextStyle as a0, type Theme as a1, type ThemeColorPalette as a2, type ThemeColorScheme as a3, type ThemeStyle as a4, type ThemeTypography as a5, type TitleBlockInput as a6, type TitleCaptionConfig as a7, type Transition as a8, type TransitionType as a9, type TwoColumnInput as aa, VIEWPORT_PRESETS as ab, type VideoLayer as ac, type VideoPullQuoteInput as ad, type VideoWithCaptionInput as ae, type ViewportConfig as af, type ViewportOrientation as ag, type ViewportPreset as ah, calculateDuration as ai, calculateFontScale as aj, createTemplateContext as ak, createTheme as al, getAspectRatioString as am, getBlockAtTime as an, getCaptionAtTime as ao, getLayoutHints as ap, getSafeTextBounds as aq, getSegmentAtTime as ar, getTwoColumnPositions as as, getViewport as at, getViewportOrientation as au, isPersistentLayerTemplate as av, isTemplateBlock as aw, scaledFontSize$1 as ax, scaledFontSize as ay, validateDoc as az, type Animation as b, type AnimationType as c, type AudioSegment as d, type AudioTrack as e, type CaptionTrack as f, type ColorScheme as g, type ComparisonBarInput as h, type CornerBrandingConfig as i, DEFAULT_TITLE_FONT as j, type DateEventInput as k, type DeepPartial as l, type DefinitionCardInput as m, type Doc as n, type DocBlock as o, type FullBleedQuoteInput as p, type ImageLayer as q, type ImageWithCaptionInput as r, type LayoutHints as s, type ListBlockInput as t, type MapLayer as u, type MapMarker as v, type MapTileStyle as w, type PersistentLayer as x, type PersistentLayerConfig as y, type PersistentLayerTemplate as z };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=animationUtils.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animationUtils.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/animationUtils.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,60 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { getAnimationStyle, getDefaultAnimationDuration, getTransitionClass, getAnimationProgress, } from '../doc/utils/animationUtils';
3
+ describe('getAnimationStyle', () => {
4
+ it('returns empty for undefined animation', () => {
5
+ const result = getAnimationStyle(undefined);
6
+ expect(result.className).toBe('');
7
+ expect(result.style).toEqual({});
8
+ });
9
+ it('returns empty for type "none"', () => {
10
+ const result = getAnimationStyle({ type: 'none' });
11
+ expect(result.className).toBe('');
12
+ });
13
+ it('returns correct class for fadeIn', () => {
14
+ const result = getAnimationStyle({ type: 'fadeIn' });
15
+ expect(result.className).toBe('anim-fadeIn');
16
+ });
17
+ it('returns correct class for slowZoom with pan', () => {
18
+ const result = getAnimationStyle({ type: 'slowZoom', panDirection: 'left' });
19
+ expect(result.className).toBe('anim-slowZoom-panLeft');
20
+ });
21
+ it('includes CSS custom properties for duration and delay', () => {
22
+ const result = getAnimationStyle({ type: 'fadeIn', duration: 2, delay: 0.5 });
23
+ expect(result.style['--anim-duration']).toBe('2s');
24
+ expect(result.style['--anim-delay']).toBe('0.5s');
25
+ });
26
+ });
27
+ describe('getDefaultAnimationDuration', () => {
28
+ it('returns 8 for slowZoom', () => {
29
+ expect(getDefaultAnimationDuration('slowZoom')).toBe(8);
30
+ });
31
+ it('returns 1 for fadeIn', () => {
32
+ expect(getDefaultAnimationDuration('fadeIn')).toBe(1);
33
+ });
34
+ it('returns 0.5 for zoomIn', () => {
35
+ expect(getDefaultAnimationDuration('zoomIn')).toBe(0.5);
36
+ });
37
+ });
38
+ describe('getTransitionClass', () => {
39
+ it('returns enter class', () => {
40
+ expect(getTransitionClass('fade', true)).toBe('transition-fade-enter');
41
+ });
42
+ it('returns exit class', () => {
43
+ expect(getTransitionClass('dissolve', false)).toBe('transition-dissolve-exit');
44
+ });
45
+ });
46
+ describe('getAnimationProgress', () => {
47
+ it('returns 0 before delay', () => {
48
+ const progress = getAnimationProgress({ type: 'fadeIn', delay: 1, duration: 2 }, 0.5, 5);
49
+ expect(progress).toBe(0);
50
+ });
51
+ it('returns 1 after completion', () => {
52
+ const progress = getAnimationProgress({ type: 'fadeIn', delay: 0, duration: 2 }, 3, 5);
53
+ expect(progress).toBe(1);
54
+ });
55
+ it('returns 0.5 at midpoint', () => {
56
+ const progress = getAnimationProgress({ type: 'fadeIn', delay: 0, duration: 2 }, 1, 5);
57
+ expect(progress).toBeCloseTo(0.5);
58
+ });
59
+ });
60
+ //# sourceMappingURL=animationUtils.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animationUtils.test.js","sourceRoot":"","sources":["../../src/__tests__/animationUtils.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,M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BAA0B,CAAC,CAAC;IACjF,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,EAAE,CAAC,wBAAwB,EAAE,GAAG,EAAE;QAChC,MAAM,QAAQ,GAAG,oBAAoB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;QACzF,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4BAA4B,EAAE,GAAG,EAAE;QACpC,MAAM,QAAQ,GAAG,oBAAoB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACvF,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yBAAyB,EAAE,GAAG,EAAE;QACjC,MAAM,QAAQ,GAAG,oBAAoB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACvF,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=contentExtractor.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contentExtractor.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/contentExtractor.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,151 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import { extractContent, stripMarkdown, } from '../generate/contentExtractor.js';
3
+ const SAMPLE_TEXT = [
4
+ 'Mount Rainier is the largest volcano in the Cascades, standing at 14,411 feet.',
5
+ 'In July 1899, the mountain was designated a national park.',
6
+ 'The park sees roughly 2 million visitors each year.',
7
+ '"The mountain was calling me," wrote John Muir after his 1888 expedition.',
8
+ 'Temperatures range from 20 degrees to 70 degrees depending on elevation.',
9
+ 'The park features hiking, camping, fishing, and climbing.',
10
+ 'Imagine standing above the clouds at sunrise!',
11
+ 'Paradise is a popular visitor area known for its wildflower meadows.',
12
+ 'Rainier is the most glaciated peak in the lower 48 states.',
13
+ ].join(' ');
14
+ describe('extractContent', () => {
15
+ let result;
16
+ // Run extraction once for all tests
17
+ it('extracts elements from sample text', () => {
18
+ result = extractContent(SAMPLE_TEXT);
19
+ expect(result.elements.length).toBeGreaterThan(0);
20
+ expect(result.sourceLength).toBe(SAMPLE_TEXT.length);
21
+ });
22
+ it('finds stats', () => {
23
+ const stats = result.elements.filter((e) => e.type === 'stat');
24
+ expect(stats.length).toBeGreaterThan(0);
25
+ // Should find 14,411 feet and/or 2 million
26
+ const values = stats.map((s) => (s.data.type === 'stat' ? s.data.value : ''));
27
+ expect(values.some((v) => v.includes('14,411') || v.includes('2 million') || v.includes('feet'))).toBe(true);
28
+ });
29
+ it('finds dates', () => {
30
+ const dates = result.elements.filter((e) => e.type === 'date');
31
+ expect(dates.length).toBeGreaterThan(0);
32
+ });
33
+ it('finds quotes', () => {
34
+ const quotes = result.elements.filter((e) => e.type === 'quote');
35
+ expect(quotes.length).toBeGreaterThan(0);
36
+ const quoteData = quotes[0].data;
37
+ if (quoteData.type === 'quote') {
38
+ expect(quoteData.quote).toContain('mountain was calling me');
39
+ }
40
+ });
41
+ it('respects minConfidence filter', () => {
42
+ const strict = extractContent(SAMPLE_TEXT, { minConfidence: 0.9 });
43
+ const loose = extractContent(SAMPLE_TEXT, { minConfidence: 0.1 });
44
+ expect(loose.elements.length).toBeGreaterThanOrEqual(strict.elements.length);
45
+ });
46
+ it('respects types filter', () => {
47
+ const onlyStats = extractContent(SAMPLE_TEXT, { types: ['stat'] });
48
+ for (const elem of onlyStats.elements) {
49
+ expect(elem.type).toBe('stat');
50
+ }
51
+ });
52
+ it('respects maxPerType', () => {
53
+ const limited = extractContent(SAMPLE_TEXT, { maxPerType: 1 });
54
+ const typeCounts = new Map();
55
+ for (const elem of limited.elements) {
56
+ typeCounts.set(elem.type, (typeCounts.get(elem.type) ?? 0) + 1);
57
+ }
58
+ for (const count of typeCounts.values()) {
59
+ expect(count).toBeLessThanOrEqual(1);
60
+ }
61
+ });
62
+ it('deduplicates overlapping extractions', () => {
63
+ // Every element should have a unique source position range
64
+ for (let i = 0; i < result.elements.length; i++) {
65
+ for (let j = i + 1; j < result.elements.length; j++) {
66
+ const a = result.elements[i];
67
+ const b = result.elements[j];
68
+ // They shouldn't share the exact same start position
69
+ if (a.sourcePosition === b.sourcePosition) {
70
+ // If they overlap, one should have been removed by dedup
71
+ // (this is checking that the dedup is working at all)
72
+ expect(a.type).not.toBe(b.type);
73
+ }
74
+ }
75
+ }
76
+ });
77
+ it('returns correct stats counts', () => {
78
+ expect(result.stats.totalCount).toBe(result.elements.length);
79
+ expect(result.stats.statCount).toBe(result.elements.filter((e) => e.type === 'stat').length);
80
+ });
81
+ it('sorts elements by source position', () => {
82
+ for (let i = 1; i < result.elements.length; i++) {
83
+ expect(result.elements[i].sourcePosition).toBeGreaterThanOrEqual(result.elements[i - 1].sourcePosition);
84
+ }
85
+ });
86
+ });
87
+ describe('extractContent — comparisons', () => {
88
+ it('detects "from X to Y" comparisons', () => {
89
+ const text = 'Temperatures range from 20 degrees to 70 degrees depending on altitude.';
90
+ const result = extractContent(text, { types: ['comparison'] });
91
+ expect(result.elements.length).toBeGreaterThan(0);
92
+ const comp = result.elements[0].data;
93
+ if (comp.type === 'comparison') {
94
+ expect(comp.left.label).toBeTruthy();
95
+ expect(comp.right.label).toBeTruthy();
96
+ }
97
+ });
98
+ });
99
+ describe('extractContent — impact lines', () => {
100
+ it('detects short punchy sentences', () => {
101
+ const text = 'Imagine standing above the clouds! Discover the hidden valley. The weather is variable.';
102
+ const result = extractContent(text, { types: ['impactLine'] });
103
+ expect(result.elements.length).toBeGreaterThan(0);
104
+ });
105
+ });
106
+ describe('extractContent — lists', () => {
107
+ it('detects "including X, Y, and Z" lists', () => {
108
+ const text = 'Activities including hiking, camping, fishing, and climbing are popular.';
109
+ const result = extractContent(text, { types: ['list'] });
110
+ expect(result.elements.length).toBeGreaterThan(0);
111
+ const listData = result.elements[0].data;
112
+ if (listData.type === 'list') {
113
+ expect(listData.items.length).toBeGreaterThanOrEqual(3);
114
+ }
115
+ });
116
+ });
117
+ describe('extractContent — definitions', () => {
118
+ it('detects "Term is a definition" patterns', () => {
119
+ const text = 'Paradise is a popular visitor area known for its wildflower meadows and scenic viewpoints.';
120
+ const result = extractContent(text, { types: ['definition'] });
121
+ expect(result.elements.length).toBeGreaterThan(0);
122
+ const defData = result.elements[0].data;
123
+ if (defData.type === 'definition') {
124
+ expect(defData.term).toBe('Paradise');
125
+ }
126
+ });
127
+ });
128
+ describe('stripMarkdown', () => {
129
+ it('removes headers', () => {
130
+ expect(stripMarkdown('# Hello\n## World')).toBe('Hello\nWorld');
131
+ });
132
+ it('removes bold and italic', () => {
133
+ expect(stripMarkdown('**bold** and *italic*')).toBe('bold and italic');
134
+ });
135
+ it('removes links, keeping text', () => {
136
+ expect(stripMarkdown('[Click here](https://example.com)')).toBe('Click here');
137
+ });
138
+ it('removes images entirely', () => {
139
+ expect(stripMarkdown('![alt text](image.png)')).toBe('');
140
+ });
141
+ it('removes code blocks', () => {
142
+ expect(stripMarkdown('before\n```js\ncode\n```\nafter')).toBe('before\n\nafter');
143
+ });
144
+ it('removes blockquote markers', () => {
145
+ expect(stripMarkdown('> quoted text')).toBe('quoted text');
146
+ });
147
+ it('collapses excess newlines', () => {
148
+ expect(stripMarkdown('a\n\n\n\nb')).toBe('a\n\nb');
149
+ });
150
+ });
151
+ //# sourceMappingURL=contentExtractor.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contentExtractor.test.js","sourceRoot":"","sources":["../../src/__tests__/contentExtractor.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,cAAc,EACd,aAAa,GAEd,MAAM,iCAAiC,CAAC;AAEzC,MAAM,WAAW,GAAG;IAClB,gFAAgF;IAChF,4DAA4D;IAC5D,qDAAqD;IACrD,2EAA2E;IAC3E,0EAA0E;IAC1E,2DAA2D;IAC3D,+CAA+C;IAC/C,sEAAsE;IACtE,4DAA4D;CAC7D,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,IAAI,MAAwB,CAAC;IAE7B,oCAAoC;IACpC,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;QAC5C,MAAM,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;QACrC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;QAClD,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,aAAa,EAAE,GAAG,EAAE;QACrB,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC;QAC/D,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;QACxC,2CAA2C;QAC3C,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,C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export {};
2
+ //# sourceMappingURL=geohash.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geohash.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/geohash.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,87 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { encodeGeohash, decodeGeohash, getNeighbors, getGeohash4Neighbors, getGeohashPrefix, geohashToHierarchicalPath, getGeohashPath, geohashOverlapsBounds, } from '../spatial/Geohash';
3
+ describe('encodeGeohash / decodeGeohash round-trip', () => {
4
+ it('encodes and decodes Seattle', () => {
5
+ const lat = 47.6062;
6
+ const lng = -122.3321;
7
+ const hash = encodeGeohash(lat, lng, 6);
8
+ expect(hash).toHaveLength(6);
9
+ const decoded = decodeGeohash(hash);
10
+ expect(decoded.lat).toBeCloseTo(lat, 1);
11
+ expect(decoded.lng).toBeCloseTo(lng, 1);
12
+ });
13
+ it('encodes and decodes equator/prime meridian', () => {
14
+ const hash = encodeGeohash(0, 0, 4);
15
+ expect(hash).toHaveLength(4);
16
+ const decoded = decodeGeohash(hash);
17
+ expect(decoded.lat).toBeCloseTo(0, 0);
18
+ expect(decoded.lng).toBeCloseTo(0, 0);
19
+ });
20
+ it('defaults to precision 9', () => {
21
+ const hash = encodeGeohash(47.6, -122.3);
22
+ expect(hash).toHaveLength(9);
23
+ });
24
+ });
25
+ describe('getNeighbors', () => {
26
+ it('returns 8 neighbors', () => {
27
+ const neighbors = getNeighbors('c23n');
28
+ expect(neighbors).toHaveLength(8);
29
+ neighbors.forEach((n) => expect(n).toHaveLength(4));
30
+ });
31
+ });
32
+ describe('getGeohash4Neighbors', () => {
33
+ it('returns center + 8 neighbors (9 total)', () => {
34
+ const result = getGeohash4Neighbors('c23n');
35
+ expect(result).toHaveLength(9);
36
+ expect(result[0]).toBe('c23n');
37
+ });
38
+ it('throws for non-4-char input', () => {
39
+ expect(() => getGeohash4Neighbors('c2')).toThrow();
40
+ expect(() => getGeohash4Neighbors('c23nn')).toThrow();
41
+ });
42
+ });
43
+ describe('getGeohashPrefix', () => {
44
+ it('extracts prefix', () => {
45
+ expect(getGeohashPrefix('c23nxy', 4)).toBe('c23n');
46
+ expect(getGeohashPrefix('c23nxy', 2)).toBe('c2');
47
+ });
48
+ });
49
+ describe('geohashToHierarchicalPath', () => {
50
+ it('converts 4-char geohash to path', () => {
51
+ expect(geohashToHierarchicalPath('c23n')).toBe('c/2/3/n');
52
+ expect(geohashToHierarchicalPath('9q8y')).toBe('9/q/8/y');
53
+ });
54
+ it('throws for non-4-char input', () => {
55
+ expect(() => geohashToHierarchicalPath('c2')).toThrow();
56
+ });
57
+ });
58
+ describe('getGeohashPath', () => {
59
+ it('returns empty for same cell', () => {
60
+ expect(getGeohashPath('c23n', 'c23n')).toEqual([]);
61
+ });
62
+ it('returns intermediate cells between two geohashes', () => {
63
+ const path = getGeohashPath('c23n', 'c24k');
64
+ expect(path.length).toBeGreaterThan(0);
65
+ path.forEach((h) => {
66
+ expect(h).toHaveLength(4);
67
+ expect(h).not.toBe('c23n');
68
+ expect(h).not.toBe('c24k');
69
+ });
70
+ });
71
+ });
72
+ describe('geohashOverlapsBounds', () => {
73
+ it('detects overlap', () => {
74
+ // Seattle area: c23n
75
+ const bounds = { north: 48, south: 47, east: -122, west: -123 };
76
+ const hash = encodeGeohash(47.6, -122.3, 4);
77
+ expect(geohashOverlapsBounds(hash, bounds)).toBe(true);
78
+ });
79
+ it('detects non-overlap', () => {
80
+ // Tokyo area bounds
81
+ const bounds = { north: 36, south: 35, east: 140, west: 139 };
82
+ // Seattle geohash
83
+ const hash = encodeGeohash(47.6, -122.3, 4);
84
+ expect(geohashOverlapsBounds(hash, bounds)).toBe(false);
85
+ });
86
+ });
87
+ //# sourceMappingURL=geohash.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geohash.test.js","sourceRoot":"","sources":["../../src/__tests__/geohash.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE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ayers.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getLayers.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/getLayers.test.ts"],"names":[],"mappings":""}