@ggts-sh/svelte 0.43.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.
Files changed (656) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +97 -0
  3. package/bin/ggts-codemod.js +47 -0
  4. package/dist/GGPlot.svelte +491 -0
  5. package/dist/GGPlot.svelte.d.ts +67 -0
  6. package/dist/a11y/CanvasA11y.svelte +115 -0
  7. package/dist/a11y/CanvasA11y.svelte.d.ts +15 -0
  8. package/dist/a11y/canvas-a11y.d.ts +1 -0
  9. package/dist/a11y/canvas-a11y.js +2 -0
  10. package/dist/assembly/assemble.d.ts +1 -0
  11. package/dist/assembly/assemble.js +1 -0
  12. package/dist/assembly/labels.d.ts +43 -0
  13. package/dist/assembly/labels.js +126 -0
  14. package/dist/assembly/layout.d.ts +158 -0
  15. package/dist/assembly/layout.js +175 -0
  16. package/dist/chrome/StatusChrome.svelte +125 -0
  17. package/dist/chrome/StatusChrome.svelte.d.ts +16 -0
  18. package/dist/chrome/ToolRail.svelte +293 -0
  19. package/dist/chrome/ToolRail.svelte.d.ts +26 -0
  20. package/dist/chrome/chrome-state.svelte.d.ts +63 -0
  21. package/dist/chrome/chrome-state.svelte.js +158 -0
  22. package/dist/chrome/theme-css.d.ts +16 -0
  23. package/dist/chrome/theme-css.js +16 -0
  24. package/dist/codemod/cli.d.ts +16 -0
  25. package/dist/codemod/cli.js +150 -0
  26. package/dist/codemod/edits.d.ts +28 -0
  27. package/dist/codemod/edits.js +36 -0
  28. package/dist/codemod/index.d.ts +10 -0
  29. package/dist/codemod/index.js +10 -0
  30. package/dist/codemod/migrate-plot-props-rewrite.d.ts +86 -0
  31. package/dist/codemod/migrate-plot-props-rewrite.js +228 -0
  32. package/dist/codemod/migrate-plot-props.d.ts +38 -0
  33. package/dist/codemod/migrate-plot-props.js +159 -0
  34. package/dist/coord/Coord.svelte +21 -0
  35. package/dist/coord/Coord.svelte.d.ts +16 -0
  36. package/dist/coord/CoordCartesian.svelte +11 -0
  37. package/dist/coord/CoordCartesian.svelte.d.ts +18 -0
  38. package/dist/coord/CoordFixed.svelte +17 -0
  39. package/dist/coord/CoordFixed.svelte.d.ts +10 -0
  40. package/dist/coord/CoordFlip.svelte +11 -0
  41. package/dist/coord/CoordFlip.svelte.d.ts +18 -0
  42. package/dist/coord/CoordPolar.svelte +16 -0
  43. package/dist/coord/CoordPolar.svelte.d.ts +9 -0
  44. package/dist/coord/CoordRadial.svelte +16 -0
  45. package/dist/coord/CoordRadial.svelte.d.ts +9 -0
  46. package/dist/coord/CoordSf.svelte +16 -0
  47. package/dist/coord/CoordSf.svelte.d.ts +9 -0
  48. package/dist/coord/CoordTransform.svelte +16 -0
  49. package/dist/coord/CoordTransform.svelte.d.ts +9 -0
  50. package/dist/data/index.d.ts +1 -0
  51. package/dist/data/index.js +2 -0
  52. package/dist/diagnostics/composition.d.ts +112 -0
  53. package/dist/diagnostics/composition.js +203 -0
  54. package/dist/diagnostics/deprecation.d.ts +58 -0
  55. package/dist/diagnostics/deprecation.js +27 -0
  56. package/dist/diagnostics/plot-engine-diagnostics.svelte.d.ts +44 -0
  57. package/dist/diagnostics/plot-engine-diagnostics.svelte.js +193 -0
  58. package/dist/facet/Facet.svelte +23 -0
  59. package/dist/facet/Facet.svelte.d.ts +16 -0
  60. package/dist/facet/FacetGrid.svelte +32 -0
  61. package/dist/facet/FacetGrid.svelte.d.ts +16 -0
  62. package/dist/facet/FacetWrap.svelte +32 -0
  63. package/dist/facet/FacetWrap.svelte.d.ts +16 -0
  64. package/dist/fonts/RobotoCondensed-Bold.ttf +0 -0
  65. package/dist/fonts/RobotoCondensed-Light.ttf +0 -0
  66. package/dist/fonts/RobotoCondensed-Regular.ttf +0 -0
  67. package/dist/fonts/THIRD_PARTY_NOTICES.txt +416 -0
  68. package/dist/geoms/GeomAbline.svelte +25 -0
  69. package/dist/geoms/GeomAbline.svelte.d.ts +7 -0
  70. package/dist/geoms/GeomArea.svelte +12 -0
  71. package/dist/geoms/GeomArea.svelte.d.ts +7 -0
  72. package/dist/geoms/GeomBar.svelte +12 -0
  73. package/dist/geoms/GeomBar.svelte.d.ts +7 -0
  74. package/dist/geoms/GeomBin2d.svelte +21 -0
  75. package/dist/geoms/GeomBin2d.svelte.d.ts +7 -0
  76. package/dist/geoms/GeomBlank.svelte +12 -0
  77. package/dist/geoms/GeomBlank.svelte.d.ts +7 -0
  78. package/dist/geoms/GeomBoxplot.svelte +25 -0
  79. package/dist/geoms/GeomBoxplot.svelte.d.ts +7 -0
  80. package/dist/geoms/GeomCol.svelte +12 -0
  81. package/dist/geoms/GeomCol.svelte.d.ts +7 -0
  82. package/dist/geoms/GeomContour.svelte +25 -0
  83. package/dist/geoms/GeomContour.svelte.d.ts +7 -0
  84. package/dist/geoms/GeomCount.svelte +12 -0
  85. package/dist/geoms/GeomCount.svelte.d.ts +7 -0
  86. package/dist/geoms/GeomCrossbar.svelte +25 -0
  87. package/dist/geoms/GeomCrossbar.svelte.d.ts +7 -0
  88. package/dist/geoms/GeomCurve.svelte +21 -0
  89. package/dist/geoms/GeomCurve.svelte.d.ts +7 -0
  90. package/dist/geoms/GeomDensity.svelte +25 -0
  91. package/dist/geoms/GeomDensity.svelte.d.ts +7 -0
  92. package/dist/geoms/GeomDensity2d.svelte +25 -0
  93. package/dist/geoms/GeomDensity2d.svelte.d.ts +7 -0
  94. package/dist/geoms/GeomDensity2dFilled.svelte +25 -0
  95. package/dist/geoms/GeomDensity2dFilled.svelte.d.ts +7 -0
  96. package/dist/geoms/GeomDotplot.svelte +25 -0
  97. package/dist/geoms/GeomDotplot.svelte.d.ts +7 -0
  98. package/dist/geoms/GeomErrorbar.svelte +25 -0
  99. package/dist/geoms/GeomErrorbar.svelte.d.ts +7 -0
  100. package/dist/geoms/GeomFreqpoly.svelte +25 -0
  101. package/dist/geoms/GeomFreqpoly.svelte.d.ts +7 -0
  102. package/dist/geoms/GeomFunction.svelte +25 -0
  103. package/dist/geoms/GeomFunction.svelte.d.ts +7 -0
  104. package/dist/geoms/GeomHex.svelte +21 -0
  105. package/dist/geoms/GeomHex.svelte.d.ts +7 -0
  106. package/dist/geoms/GeomHistogram.svelte +25 -0
  107. package/dist/geoms/GeomHistogram.svelte.d.ts +7 -0
  108. package/dist/geoms/GeomHline.svelte +12 -0
  109. package/dist/geoms/GeomHline.svelte.d.ts +7 -0
  110. package/dist/geoms/GeomJitter.svelte +35 -0
  111. package/dist/geoms/GeomJitter.svelte.d.ts +13 -0
  112. package/dist/geoms/GeomLabel.svelte +12 -0
  113. package/dist/geoms/GeomLabel.svelte.d.ts +7 -0
  114. package/dist/geoms/GeomLine.svelte +12 -0
  115. package/dist/geoms/GeomLine.svelte.d.ts +7 -0
  116. package/dist/geoms/GeomLinerange.svelte +25 -0
  117. package/dist/geoms/GeomLinerange.svelte.d.ts +7 -0
  118. package/dist/geoms/GeomMap.svelte +21 -0
  119. package/dist/geoms/GeomMap.svelte.d.ts +7 -0
  120. package/dist/geoms/GeomPath.svelte +12 -0
  121. package/dist/geoms/GeomPath.svelte.d.ts +7 -0
  122. package/dist/geoms/GeomPoint.svelte +12 -0
  123. package/dist/geoms/GeomPoint.svelte.d.ts +7 -0
  124. package/dist/geoms/GeomPointrange.svelte +25 -0
  125. package/dist/geoms/GeomPointrange.svelte.d.ts +7 -0
  126. package/dist/geoms/GeomPolygon.svelte +25 -0
  127. package/dist/geoms/GeomPolygon.svelte.d.ts +7 -0
  128. package/dist/geoms/GeomQq.svelte +21 -0
  129. package/dist/geoms/GeomQq.svelte.d.ts +7 -0
  130. package/dist/geoms/GeomQqLine.svelte +25 -0
  131. package/dist/geoms/GeomQqLine.svelte.d.ts +7 -0
  132. package/dist/geoms/GeomQuantile.svelte +25 -0
  133. package/dist/geoms/GeomQuantile.svelte.d.ts +7 -0
  134. package/dist/geoms/GeomRaster.svelte +25 -0
  135. package/dist/geoms/GeomRaster.svelte.d.ts +7 -0
  136. package/dist/geoms/GeomRect.svelte +12 -0
  137. package/dist/geoms/GeomRect.svelte.d.ts +7 -0
  138. package/dist/geoms/GeomRibbon.svelte +16 -0
  139. package/dist/geoms/GeomRibbon.svelte.d.ts +7 -0
  140. package/dist/geoms/GeomRug.svelte +21 -0
  141. package/dist/geoms/GeomRug.svelte.d.ts +7 -0
  142. package/dist/geoms/GeomRule.svelte +12 -0
  143. package/dist/geoms/GeomRule.svelte.d.ts +7 -0
  144. package/dist/geoms/GeomSegment.svelte +16 -0
  145. package/dist/geoms/GeomSegment.svelte.d.ts +7 -0
  146. package/dist/geoms/GeomSf.svelte +21 -0
  147. package/dist/geoms/GeomSf.svelte.d.ts +7 -0
  148. package/dist/geoms/GeomSfLabel.svelte +25 -0
  149. package/dist/geoms/GeomSfLabel.svelte.d.ts +7 -0
  150. package/dist/geoms/GeomSfText.svelte +25 -0
  151. package/dist/geoms/GeomSfText.svelte.d.ts +7 -0
  152. package/dist/geoms/GeomSmooth.svelte +25 -0
  153. package/dist/geoms/GeomSmooth.svelte.d.ts +7 -0
  154. package/dist/geoms/GeomSpoke.svelte +21 -0
  155. package/dist/geoms/GeomSpoke.svelte.d.ts +7 -0
  156. package/dist/geoms/GeomStep.svelte +12 -0
  157. package/dist/geoms/GeomStep.svelte.d.ts +7 -0
  158. package/dist/geoms/GeomText.svelte +12 -0
  159. package/dist/geoms/GeomText.svelte.d.ts +7 -0
  160. package/dist/geoms/GeomTile.svelte +21 -0
  161. package/dist/geoms/GeomTile.svelte.d.ts +7 -0
  162. package/dist/geoms/GeomViolin.svelte +25 -0
  163. package/dist/geoms/GeomViolin.svelte.d.ts +7 -0
  164. package/dist/geoms/GeomVline.svelte +12 -0
  165. package/dist/geoms/GeomVline.svelte.d.ts +7 -0
  166. package/dist/geoms/factory.svelte.d.ts +41 -0
  167. package/dist/geoms/factory.svelte.js +60 -0
  168. package/dist/geoms/registry.svelte.d.ts +71 -0
  169. package/dist/geoms/registry.svelte.js +177 -0
  170. package/dist/guides/GuideAxis.svelte +20 -0
  171. package/dist/guides/GuideAxis.svelte.d.ts +14 -0
  172. package/dist/guides/GuideColorbar.svelte +22 -0
  173. package/dist/guides/GuideColorbar.svelte.d.ts +13 -0
  174. package/dist/guides/GuideColorsteps.svelte +22 -0
  175. package/dist/guides/GuideColorsteps.svelte.d.ts +13 -0
  176. package/dist/guides/GuideLegend.svelte +90 -0
  177. package/dist/guides/GuideLegend.svelte.d.ts +37 -0
  178. package/dist/guides/GuideNone.svelte +19 -0
  179. package/dist/guides/GuideNone.svelte.d.ts +7 -0
  180. package/dist/guides/Guides.svelte +14 -0
  181. package/dist/guides/Guides.svelte.d.ts +13 -0
  182. package/dist/guides/factory.svelte.d.ts +36 -0
  183. package/dist/guides/factory.svelte.js +15 -0
  184. package/dist/index.d.ts +418 -0
  185. package/dist/index.js +376 -0
  186. package/dist/inspection/Inspect.svelte +71 -0
  187. package/dist/inspection/Inspect.svelte.d.ts +36 -0
  188. package/dist/inspection/Tooltip.svelte +439 -0
  189. package/dist/inspection/Tooltip.svelte.d.ts +32 -0
  190. package/dist/inspection/apply.d.ts +120 -0
  191. package/dist/inspection/apply.js +99 -0
  192. package/dist/inspection/coordinator.d.ts +51 -0
  193. package/dist/inspection/coordinator.js +354 -0
  194. package/dist/inspection/display-members.d.ts +1 -0
  195. package/dist/inspection/display-members.js +2 -0
  196. package/dist/inspection/frame.d.ts +90 -0
  197. package/dist/inspection/frame.js +76 -0
  198. package/dist/inspection/group-total.d.ts +1 -0
  199. package/dist/inspection/group-total.js +2 -0
  200. package/dist/inspection/inspect-guide-axes.d.ts +10 -0
  201. package/dist/inspection/inspect-guide-axes.js +24 -0
  202. package/dist/inspection/inspection-reconcile.svelte.d.ts +37 -0
  203. package/dist/inspection/inspection-reconcile.svelte.js +33 -0
  204. package/dist/inspection/inspection-state.svelte.d.ts +86 -0
  205. package/dist/inspection/inspection-state.svelte.js +347 -0
  206. package/dist/inspection/inspection-traversal.svelte.d.ts +29 -0
  207. package/dist/inspection/inspection-traversal.svelte.js +52 -0
  208. package/dist/inspection/pointer-inspect.d.ts +74 -0
  209. package/dist/inspection/pointer-inspect.js +158 -0
  210. package/dist/inspection/resolver.d.ts +3 -0
  211. package/dist/inspection/resolver.js +4 -0
  212. package/dist/inspection/teardown.d.ts +199 -0
  213. package/dist/inspection/teardown.js +181 -0
  214. package/dist/inspection/tooltip-chrome.d.ts +19 -0
  215. package/dist/inspection/tooltip-chrome.js +17 -0
  216. package/dist/inspection/tooltip-motion.d.ts +25 -0
  217. package/dist/inspection/tooltip-motion.js +32 -0
  218. package/dist/inspection/tooltip-presence.svelte.d.ts +49 -0
  219. package/dist/inspection/tooltip-presence.svelte.js +110 -0
  220. package/dist/inspection/tooltip-total.d.ts +1 -0
  221. package/dist/inspection/tooltip-total.js +2 -0
  222. package/dist/interaction/capability-resolution.svelte.d.ts +42 -0
  223. package/dist/interaction/capability-resolution.svelte.js +40 -0
  224. package/dist/interaction/capability.d.ts +129 -0
  225. package/dist/interaction/capability.js +134 -0
  226. package/dist/interaction/controller.svelte.d.ts +4 -0
  227. package/dist/interaction/controller.svelte.js +43 -0
  228. package/dist/interaction/inspect-geom-advisories.d.ts +10 -0
  229. package/dist/interaction/inspect-geom-advisories.js +10 -0
  230. package/dist/interaction/interaction-context.svelte.d.ts +57 -0
  231. package/dist/interaction/interaction-context.svelte.js +4 -0
  232. package/dist/interaction/interaction-diagnostics.d.ts +11 -0
  233. package/dist/interaction/interaction-diagnostics.js +173 -0
  234. package/dist/interaction/interaction-states.svelte.d.ts +84 -0
  235. package/dist/interaction/interaction-states.svelte.js +55 -0
  236. package/dist/interaction/interaction.d.ts +304 -0
  237. package/dist/interaction/interaction.js +7 -0
  238. package/dist/interaction/normalize-interaction-config.d.ts +9 -0
  239. package/dist/interaction/normalize-interaction-config.js +112 -0
  240. package/dist/interaction/reducer.d.ts +97 -0
  241. package/dist/interaction/reducer.js +117 -0
  242. package/dist/interaction/resolve-inspect-capability.d.ts +40 -0
  243. package/dist/interaction/resolve-inspect-capability.js +50 -0
  244. package/dist/interaction/scoped-store.svelte.d.ts +73 -0
  245. package/dist/interaction/scoped-store.svelte.js +93 -0
  246. package/dist/interaction/target.d.ts +91 -0
  247. package/dist/interaction/target.js +68 -0
  248. package/dist/interaction/transition-owner.d.ts +19 -0
  249. package/dist/interaction/transition-owner.js +10 -0
  250. package/dist/interaction/wiring-advisories.d.ts +33 -0
  251. package/dist/interaction/wiring-advisories.js +46 -0
  252. package/dist/interval/BoundsEditor.svelte +332 -0
  253. package/dist/interval/BoundsEditor.svelte.d.ts +10 -0
  254. package/dist/interval/bounds-editor.d.ts +1 -0
  255. package/dist/interval/bounds-editor.js +2 -0
  256. package/dist/interval/consumption.d.ts +1 -0
  257. package/dist/interval/consumption.js +2 -0
  258. package/dist/interval/interval-bounds-state.svelte.d.ts +53 -0
  259. package/dist/interval/interval-bounds-state.svelte.js +117 -0
  260. package/dist/interval/interval-state-helpers.d.ts +10 -0
  261. package/dist/interval/interval-state-helpers.js +34 -0
  262. package/dist/interval/interval-state.svelte.d.ts +60 -0
  263. package/dist/interval/interval-state.svelte.js +360 -0
  264. package/dist/interval/interval.d.ts +1 -0
  265. package/dist/interval/interval.js +2 -0
  266. package/dist/interval/precise-bounds.d.ts +1 -0
  267. package/dist/interval/precise-bounds.js +2 -0
  268. package/dist/interval/query.d.ts +1 -0
  269. package/dist/interval/query.js +2 -0
  270. package/dist/labs/Labs.svelte +29 -0
  271. package/dist/labs/Labs.svelte.d.ts +16 -0
  272. package/dist/layers/fold.d.ts +2 -0
  273. package/dist/layers/fold.js +1 -0
  274. package/dist/layers/grammar-families.d.ts +2 -0
  275. package/dist/layers/grammar-families.js +1 -0
  276. package/dist/layers/plot-layer-contract.d.ts +1 -0
  277. package/dist/layers/plot-layer-contract.js +29 -0
  278. package/dist/layers/plot-layer.svelte.d.ts +42 -0
  279. package/dist/layers/plot-layer.svelte.js +34 -0
  280. package/dist/layers/types.d.ts +2 -0
  281. package/dist/layers/types.js +1 -0
  282. package/dist/legend/Legend.svelte +24 -0
  283. package/dist/legend/Legend.svelte.d.ts +5 -0
  284. package/dist/legend/LegendFilters.svelte +196 -0
  285. package/dist/legend/LegendFilters.svelte.d.ts +8 -0
  286. package/dist/legend/LegendTargets.svelte +393 -0
  287. package/dist/legend/LegendTargets.svelte.d.ts +31 -0
  288. package/dist/legend/entry-key-index.d.ts +1 -0
  289. package/dist/legend/entry-key-index.js +2 -0
  290. package/dist/legend/entry-key-index.svelte.d.ts +34 -0
  291. package/dist/legend/entry-key-index.svelte.js +35 -0
  292. package/dist/legend/filter-state.svelte.d.ts +66 -0
  293. package/dist/legend/filter-state.svelte.js +284 -0
  294. package/dist/legend/filter.d.ts +1 -0
  295. package/dist/legend/filter.js +2 -0
  296. package/dist/legend/focus-emphasis.d.ts +72 -0
  297. package/dist/legend/focus-emphasis.js +91 -0
  298. package/dist/legend/focus-plans.d.ts +89 -0
  299. package/dist/legend/focus-plans.js +72 -0
  300. package/dist/legend/focus-reconcile.svelte.d.ts +53 -0
  301. package/dist/legend/focus-reconcile.svelte.js +113 -0
  302. package/dist/legend/focus-state.svelte.d.ts +73 -0
  303. package/dist/legend/focus-state.svelte.js +338 -0
  304. package/dist/legend/focus.d.ts +1 -0
  305. package/dist/legend/focus.js +2 -0
  306. package/dist/legend/resolve-legend-capability.d.ts +52 -0
  307. package/dist/legend/resolve-legend-capability.js +68 -0
  308. package/dist/legend/resolve-legend-filter.d.ts +65 -0
  309. package/dist/legend/resolve-legend-filter.js +54 -0
  310. package/dist/legend/resolve-legend-focus.d.ts +58 -0
  311. package/dist/legend/resolve-legend-focus.js +36 -0
  312. package/dist/legend/surface.d.ts +190 -0
  313. package/dist/legend/surface.js +158 -0
  314. package/dist/plot-engine-deriveds.svelte.d.ts +75 -0
  315. package/dist/plot-engine-deriveds.svelte.js +166 -0
  316. package/dist/plot-engine.svelte.d.ts +116 -0
  317. package/dist/plot-engine.svelte.js +316 -0
  318. package/dist/plot-props.d.ts +144 -0
  319. package/dist/plot-props.js +81 -0
  320. package/dist/runtime/announcer.svelte.d.ts +17 -0
  321. package/dist/runtime/announcer.svelte.js +28 -0
  322. package/dist/runtime/paint.d.ts +38 -0
  323. package/dist/runtime/paint.js +45 -0
  324. package/dist/runtime/resolve-datum-key.d.ts +53 -0
  325. package/dist/runtime/resolve-datum-key.js +73 -0
  326. package/dist/runtime/runtime.svelte.d.ts +37 -0
  327. package/dist/runtime/runtime.svelte.js +233 -0
  328. package/dist/runtime/semantic-candidate-projection.svelte.d.ts +29 -0
  329. package/dist/runtime/semantic-candidate-projection.svelte.js +137 -0
  330. package/dist/runtime/semantic-data-identity.d.ts +64 -0
  331. package/dist/runtime/semantic-data-identity.js +153 -0
  332. package/dist/runtime/semantic-keys-projection.d.ts +22 -0
  333. package/dist/runtime/semantic-keys-projection.js +40 -0
  334. package/dist/runtime/semantic-keys-resolve.d.ts +69 -0
  335. package/dist/runtime/semantic-keys-resolve.js +122 -0
  336. package/dist/runtime/semantic-keys.svelte.d.ts +30 -0
  337. package/dist/runtime/semantic-keys.svelte.js +69 -0
  338. package/dist/runtime/semantic-source-identity.d.ts +9 -0
  339. package/dist/runtime/semantic-source-identity.js +16 -0
  340. package/dist/scale/Scale.svelte +26 -0
  341. package/dist/scale/Scale.svelte.d.ts +21 -0
  342. package/dist/scale/ScaleAlphaBinned.svelte +14 -0
  343. package/dist/scale/ScaleAlphaBinned.svelte.d.ts +4 -0
  344. package/dist/scale/ScaleAlphaContinuous.svelte +14 -0
  345. package/dist/scale/ScaleAlphaContinuous.svelte.d.ts +4 -0
  346. package/dist/scale/ScaleAlphaDate.svelte +15 -0
  347. package/dist/scale/ScaleAlphaDate.svelte.d.ts +5 -0
  348. package/dist/scale/ScaleAlphaDatetime.svelte +15 -0
  349. package/dist/scale/ScaleAlphaDatetime.svelte.d.ts +5 -0
  350. package/dist/scale/ScaleAlphaDiscrete.svelte +14 -0
  351. package/dist/scale/ScaleAlphaDiscrete.svelte.d.ts +4 -0
  352. package/dist/scale/ScaleAlphaIdentity.svelte +14 -0
  353. package/dist/scale/ScaleAlphaIdentity.svelte.d.ts +4 -0
  354. package/dist/scale/ScaleAlphaManual.svelte +14 -0
  355. package/dist/scale/ScaleAlphaManual.svelte.d.ts +4 -0
  356. package/dist/scale/ScaleColorBinned.svelte +14 -0
  357. package/dist/scale/ScaleColorBinned.svelte.d.ts +3 -0
  358. package/dist/scale/ScaleColorBrewer.svelte +14 -0
  359. package/dist/scale/ScaleColorBrewer.svelte.d.ts +4 -0
  360. package/dist/scale/ScaleColorContinuous.svelte +14 -0
  361. package/dist/scale/ScaleColorContinuous.svelte.d.ts +4 -0
  362. package/dist/scale/ScaleColorDate.svelte +15 -0
  363. package/dist/scale/ScaleColorDate.svelte.d.ts +5 -0
  364. package/dist/scale/ScaleColorDatetime.svelte +15 -0
  365. package/dist/scale/ScaleColorDatetime.svelte.d.ts +5 -0
  366. package/dist/scale/ScaleColorDiscrete.svelte +14 -0
  367. package/dist/scale/ScaleColorDiscrete.svelte.d.ts +4 -0
  368. package/dist/scale/ScaleColorDistiller.svelte +14 -0
  369. package/dist/scale/ScaleColorDistiller.svelte.d.ts +4 -0
  370. package/dist/scale/ScaleColorFermenter.svelte +14 -0
  371. package/dist/scale/ScaleColorFermenter.svelte.d.ts +4 -0
  372. package/dist/scale/ScaleColorGradient.svelte +11 -0
  373. package/dist/scale/ScaleColorGradient.svelte.d.ts +4 -0
  374. package/dist/scale/ScaleColorGradient2.svelte +14 -0
  375. package/dist/scale/ScaleColorGradient2.svelte.d.ts +4 -0
  376. package/dist/scale/ScaleColorGradientn.svelte +14 -0
  377. package/dist/scale/ScaleColorGradientn.svelte.d.ts +4 -0
  378. package/dist/scale/ScaleColorGrey.svelte +11 -0
  379. package/dist/scale/ScaleColorGrey.svelte.d.ts +4 -0
  380. package/dist/scale/ScaleColorHue.svelte +11 -0
  381. package/dist/scale/ScaleColorHue.svelte.d.ts +4 -0
  382. package/dist/scale/ScaleColorIdentity.svelte +14 -0
  383. package/dist/scale/ScaleColorIdentity.svelte.d.ts +4 -0
  384. package/dist/scale/ScaleColorLog10.svelte +14 -0
  385. package/dist/scale/ScaleColorLog10.svelte.d.ts +4 -0
  386. package/dist/scale/ScaleColorManual.svelte +14 -0
  387. package/dist/scale/ScaleColorManual.svelte.d.ts +4 -0
  388. package/dist/scale/ScaleColorOrdinal.svelte +14 -0
  389. package/dist/scale/ScaleColorOrdinal.svelte.d.ts +3 -0
  390. package/dist/scale/ScaleColorSqrt.svelte +14 -0
  391. package/dist/scale/ScaleColorSqrt.svelte.d.ts +4 -0
  392. package/dist/scale/ScaleColorSteps.svelte +11 -0
  393. package/dist/scale/ScaleColorSteps.svelte.d.ts +4 -0
  394. package/dist/scale/ScaleColorSteps2.svelte +11 -0
  395. package/dist/scale/ScaleColorSteps2.svelte.d.ts +4 -0
  396. package/dist/scale/ScaleColorStepsn.svelte +11 -0
  397. package/dist/scale/ScaleColorStepsn.svelte.d.ts +4 -0
  398. package/dist/scale/ScaleColorViridisB.svelte +11 -0
  399. package/dist/scale/ScaleColorViridisB.svelte.d.ts +4 -0
  400. package/dist/scale/ScaleColorViridisC.svelte +11 -0
  401. package/dist/scale/ScaleColorViridisC.svelte.d.ts +4 -0
  402. package/dist/scale/ScaleColorViridisD.svelte +11 -0
  403. package/dist/scale/ScaleColorViridisD.svelte.d.ts +4 -0
  404. package/dist/scale/ScaleFillBinned.svelte +11 -0
  405. package/dist/scale/ScaleFillBinned.svelte.d.ts +3 -0
  406. package/dist/scale/ScaleFillBrewer.svelte +11 -0
  407. package/dist/scale/ScaleFillBrewer.svelte.d.ts +4 -0
  408. package/dist/scale/ScaleFillContinuous.svelte +14 -0
  409. package/dist/scale/ScaleFillContinuous.svelte.d.ts +4 -0
  410. package/dist/scale/ScaleFillDate.svelte +12 -0
  411. package/dist/scale/ScaleFillDate.svelte.d.ts +5 -0
  412. package/dist/scale/ScaleFillDatetime.svelte +15 -0
  413. package/dist/scale/ScaleFillDatetime.svelte.d.ts +5 -0
  414. package/dist/scale/ScaleFillDiscrete.svelte +14 -0
  415. package/dist/scale/ScaleFillDiscrete.svelte.d.ts +4 -0
  416. package/dist/scale/ScaleFillDistiller.svelte +14 -0
  417. package/dist/scale/ScaleFillDistiller.svelte.d.ts +4 -0
  418. package/dist/scale/ScaleFillFermenter.svelte +14 -0
  419. package/dist/scale/ScaleFillFermenter.svelte.d.ts +4 -0
  420. package/dist/scale/ScaleFillGradient.svelte +11 -0
  421. package/dist/scale/ScaleFillGradient.svelte.d.ts +4 -0
  422. package/dist/scale/ScaleFillGradient2.svelte +14 -0
  423. package/dist/scale/ScaleFillGradient2.svelte.d.ts +4 -0
  424. package/dist/scale/ScaleFillGradientn.svelte +14 -0
  425. package/dist/scale/ScaleFillGradientn.svelte.d.ts +4 -0
  426. package/dist/scale/ScaleFillGrey.svelte +11 -0
  427. package/dist/scale/ScaleFillGrey.svelte.d.ts +4 -0
  428. package/dist/scale/ScaleFillHue.svelte +11 -0
  429. package/dist/scale/ScaleFillHue.svelte.d.ts +4 -0
  430. package/dist/scale/ScaleFillIdentity.svelte +14 -0
  431. package/dist/scale/ScaleFillIdentity.svelte.d.ts +4 -0
  432. package/dist/scale/ScaleFillLog10.svelte +14 -0
  433. package/dist/scale/ScaleFillLog10.svelte.d.ts +4 -0
  434. package/dist/scale/ScaleFillManual.svelte +11 -0
  435. package/dist/scale/ScaleFillManual.svelte.d.ts +4 -0
  436. package/dist/scale/ScaleFillOrdinal.svelte +14 -0
  437. package/dist/scale/ScaleFillOrdinal.svelte.d.ts +3 -0
  438. package/dist/scale/ScaleFillSqrt.svelte +14 -0
  439. package/dist/scale/ScaleFillSqrt.svelte.d.ts +4 -0
  440. package/dist/scale/ScaleFillSteps.svelte +11 -0
  441. package/dist/scale/ScaleFillSteps.svelte.d.ts +4 -0
  442. package/dist/scale/ScaleFillSteps2.svelte +11 -0
  443. package/dist/scale/ScaleFillSteps2.svelte.d.ts +4 -0
  444. package/dist/scale/ScaleFillStepsn.svelte +11 -0
  445. package/dist/scale/ScaleFillStepsn.svelte.d.ts +4 -0
  446. package/dist/scale/ScaleFillViridisB.svelte +11 -0
  447. package/dist/scale/ScaleFillViridisB.svelte.d.ts +4 -0
  448. package/dist/scale/ScaleFillViridisC.svelte +11 -0
  449. package/dist/scale/ScaleFillViridisC.svelte.d.ts +4 -0
  450. package/dist/scale/ScaleFillViridisD.svelte +11 -0
  451. package/dist/scale/ScaleFillViridisD.svelte.d.ts +4 -0
  452. package/dist/scale/ScaleLinetypeBinned.svelte +15 -0
  453. package/dist/scale/ScaleLinetypeBinned.svelte.d.ts +4 -0
  454. package/dist/scale/ScaleLinetypeDiscrete.svelte +15 -0
  455. package/dist/scale/ScaleLinetypeDiscrete.svelte.d.ts +4 -0
  456. package/dist/scale/ScaleLinetypeIdentity.svelte +15 -0
  457. package/dist/scale/ScaleLinetypeIdentity.svelte.d.ts +4 -0
  458. package/dist/scale/ScaleLinetypeManual.svelte +15 -0
  459. package/dist/scale/ScaleLinetypeManual.svelte.d.ts +4 -0
  460. package/dist/scale/ScaleLinewidthBinned.svelte +14 -0
  461. package/dist/scale/ScaleLinewidthBinned.svelte.d.ts +4 -0
  462. package/dist/scale/ScaleLinewidthContinuous.svelte +14 -0
  463. package/dist/scale/ScaleLinewidthContinuous.svelte.d.ts +4 -0
  464. package/dist/scale/ScaleLinewidthDate.svelte +15 -0
  465. package/dist/scale/ScaleLinewidthDate.svelte.d.ts +5 -0
  466. package/dist/scale/ScaleLinewidthDatetime.svelte +15 -0
  467. package/dist/scale/ScaleLinewidthDatetime.svelte.d.ts +5 -0
  468. package/dist/scale/ScaleLinewidthDiscrete.svelte +14 -0
  469. package/dist/scale/ScaleLinewidthDiscrete.svelte.d.ts +4 -0
  470. package/dist/scale/ScaleLinewidthIdentity.svelte +14 -0
  471. package/dist/scale/ScaleLinewidthIdentity.svelte.d.ts +4 -0
  472. package/dist/scale/ScaleLinewidthManual.svelte +14 -0
  473. package/dist/scale/ScaleLinewidthManual.svelte.d.ts +4 -0
  474. package/dist/scale/ScaleRadius.svelte +11 -0
  475. package/dist/scale/ScaleRadius.svelte.d.ts +4 -0
  476. package/dist/scale/ScaleShapeBinned.svelte +15 -0
  477. package/dist/scale/ScaleShapeBinned.svelte.d.ts +4 -0
  478. package/dist/scale/ScaleShapeDiscrete.svelte +15 -0
  479. package/dist/scale/ScaleShapeDiscrete.svelte.d.ts +4 -0
  480. package/dist/scale/ScaleShapeIdentity.svelte +15 -0
  481. package/dist/scale/ScaleShapeIdentity.svelte.d.ts +4 -0
  482. package/dist/scale/ScaleShapeManual.svelte +15 -0
  483. package/dist/scale/ScaleShapeManual.svelte.d.ts +4 -0
  484. package/dist/scale/ScaleSizeArea.svelte +11 -0
  485. package/dist/scale/ScaleSizeArea.svelte.d.ts +4 -0
  486. package/dist/scale/ScaleSizeBinned.svelte +14 -0
  487. package/dist/scale/ScaleSizeBinned.svelte.d.ts +4 -0
  488. package/dist/scale/ScaleSizeBinnedArea.svelte +14 -0
  489. package/dist/scale/ScaleSizeBinnedArea.svelte.d.ts +4 -0
  490. package/dist/scale/ScaleSizeContinuous.svelte +14 -0
  491. package/dist/scale/ScaleSizeContinuous.svelte.d.ts +4 -0
  492. package/dist/scale/ScaleSizeDate.svelte +15 -0
  493. package/dist/scale/ScaleSizeDate.svelte.d.ts +5 -0
  494. package/dist/scale/ScaleSizeDatetime.svelte +15 -0
  495. package/dist/scale/ScaleSizeDatetime.svelte.d.ts +5 -0
  496. package/dist/scale/ScaleSizeDiscrete.svelte +14 -0
  497. package/dist/scale/ScaleSizeDiscrete.svelte.d.ts +4 -0
  498. package/dist/scale/ScaleSizeIdentity.svelte +14 -0
  499. package/dist/scale/ScaleSizeIdentity.svelte.d.ts +4 -0
  500. package/dist/scale/ScaleSizeManual.svelte +14 -0
  501. package/dist/scale/ScaleSizeManual.svelte.d.ts +4 -0
  502. package/dist/scale/ScaleXBinned.svelte +14 -0
  503. package/dist/scale/ScaleXBinned.svelte.d.ts +4 -0
  504. package/dist/scale/ScaleXContinuous.svelte +14 -0
  505. package/dist/scale/ScaleXContinuous.svelte.d.ts +4 -0
  506. package/dist/scale/ScaleXDate.svelte +12 -0
  507. package/dist/scale/ScaleXDate.svelte.d.ts +5 -0
  508. package/dist/scale/ScaleXDatetime.svelte +12 -0
  509. package/dist/scale/ScaleXDatetime.svelte.d.ts +5 -0
  510. package/dist/scale/ScaleXDiscrete.svelte +14 -0
  511. package/dist/scale/ScaleXDiscrete.svelte.d.ts +4 -0
  512. package/dist/scale/ScaleXLog10.svelte +14 -0
  513. package/dist/scale/ScaleXLog10.svelte.d.ts +4 -0
  514. package/dist/scale/ScaleXMonthDay.svelte +12 -0
  515. package/dist/scale/ScaleXMonthDay.svelte.d.ts +5 -0
  516. package/dist/scale/ScaleXReverse.svelte +15 -0
  517. package/dist/scale/ScaleXReverse.svelte.d.ts +4 -0
  518. package/dist/scale/ScaleXSqrt.svelte +14 -0
  519. package/dist/scale/ScaleXSqrt.svelte.d.ts +4 -0
  520. package/dist/scale/ScaleXTime.svelte +12 -0
  521. package/dist/scale/ScaleXTime.svelte.d.ts +5 -0
  522. package/dist/scale/ScaleYBinned.svelte +14 -0
  523. package/dist/scale/ScaleYBinned.svelte.d.ts +4 -0
  524. package/dist/scale/ScaleYContinuous.svelte +14 -0
  525. package/dist/scale/ScaleYContinuous.svelte.d.ts +4 -0
  526. package/dist/scale/ScaleYDate.svelte +12 -0
  527. package/dist/scale/ScaleYDate.svelte.d.ts +5 -0
  528. package/dist/scale/ScaleYDatetime.svelte +12 -0
  529. package/dist/scale/ScaleYDatetime.svelte.d.ts +5 -0
  530. package/dist/scale/ScaleYDiscrete.svelte +14 -0
  531. package/dist/scale/ScaleYDiscrete.svelte.d.ts +4 -0
  532. package/dist/scale/ScaleYLog10.svelte +14 -0
  533. package/dist/scale/ScaleYLog10.svelte.d.ts +4 -0
  534. package/dist/scale/ScaleYMonthDay.svelte +12 -0
  535. package/dist/scale/ScaleYMonthDay.svelte.d.ts +5 -0
  536. package/dist/scale/ScaleYReverse.svelte +15 -0
  537. package/dist/scale/ScaleYReverse.svelte.d.ts +4 -0
  538. package/dist/scale/ScaleYSqrt.svelte +14 -0
  539. package/dist/scale/ScaleYSqrt.svelte.d.ts +4 -0
  540. package/dist/scale/ScaleYTime.svelte +12 -0
  541. package/dist/scale/ScaleYTime.svelte.d.ts +5 -0
  542. package/dist/scene/Axis.svelte +159 -0
  543. package/dist/scene/Axis.svelte.d.ts +12 -0
  544. package/dist/scene/Batch.svelte +252 -0
  545. package/dist/scene/Batch.svelte.d.ts +23 -0
  546. package/dist/scene/InteractionOverlay.svelte +402 -0
  547. package/dist/scene/InteractionOverlay.svelte.d.ts +44 -0
  548. package/dist/scene/Legend.svelte +278 -0
  549. package/dist/scene/Legend.svelte.d.ts +8 -0
  550. package/dist/scene/MarkStrata.svelte +129 -0
  551. package/dist/scene/MarkStrata.svelte.d.ts +15 -0
  552. package/dist/scene/SceneOverlays.svelte +118 -0
  553. package/dist/scene/SceneOverlays.svelte.d.ts +49 -0
  554. package/dist/scene/SceneView.svelte +478 -0
  555. package/dist/scene/SceneView.svelte.d.ts +32 -0
  556. package/dist/scene/batch-presentation.svelte.d.ts +111 -0
  557. package/dist/scene/batch-presentation.svelte.js +207 -0
  558. package/dist/scene/geometry.d.ts +2 -0
  559. package/dist/scene/geometry.js +3 -0
  560. package/dist/scene/stratum-paint.d.ts +25 -0
  561. package/dist/scene/stratum-paint.js +40 -0
  562. package/dist/selection/selection-state.svelte.d.ts +23 -0
  563. package/dist/selection/selection-state.svelte.js +73 -0
  564. package/dist/selection/selection.d.ts +1 -0
  565. package/dist/selection/selection.js +2 -0
  566. package/dist/surface/CaptureSurface.svelte +109 -0
  567. package/dist/surface/CaptureSurface.svelte.d.ts +27 -0
  568. package/dist/surface/area-brush.d.ts +48 -0
  569. package/dist/surface/area-brush.js +44 -0
  570. package/dist/surface/brush-finish.d.ts +49 -0
  571. package/dist/surface/brush-finish.js +44 -0
  572. package/dist/surface/keyboard.d.ts +97 -0
  573. package/dist/surface/keyboard.js +105 -0
  574. package/dist/surface/pointer.d.ts +241 -0
  575. package/dist/surface/pointer.js +179 -0
  576. package/dist/surface/surface-description.d.ts +10 -0
  577. package/dist/surface/surface-description.js +11 -0
  578. package/dist/surface/surface-handlers.svelte.d.ts +53 -0
  579. package/dist/surface/surface-handlers.svelte.js +418 -0
  580. package/dist/surface/surface-state.svelte.d.ts +90 -0
  581. package/dist/surface/surface-state.svelte.js +161 -0
  582. package/dist/theme/Theme.svelte +27 -0
  583. package/dist/theme/Theme.svelte.d.ts +23 -0
  584. package/dist/theme/ThemeBase.svelte +13 -0
  585. package/dist/theme/ThemeBase.svelte.d.ts +8 -0
  586. package/dist/theme/ThemeBw.svelte +13 -0
  587. package/dist/theme/ThemeBw.svelte.d.ts +8 -0
  588. package/dist/theme/ThemeClassic.svelte +13 -0
  589. package/dist/theme/ThemeClassic.svelte.d.ts +8 -0
  590. package/dist/theme/ThemeClean.svelte +13 -0
  591. package/dist/theme/ThemeClean.svelte.d.ts +8 -0
  592. package/dist/theme/ThemeDark.svelte +13 -0
  593. package/dist/theme/ThemeDark.svelte.d.ts +8 -0
  594. package/dist/theme/ThemeDefault.svelte +13 -0
  595. package/dist/theme/ThemeDefault.svelte.d.ts +8 -0
  596. package/dist/theme/ThemeEconomist.svelte +13 -0
  597. package/dist/theme/ThemeEconomist.svelte.d.ts +8 -0
  598. package/dist/theme/ThemeEconomistwhite.svelte +13 -0
  599. package/dist/theme/ThemeEconomistwhite.svelte.d.ts +8 -0
  600. package/dist/theme/ThemeFew.svelte +13 -0
  601. package/dist/theme/ThemeFew.svelte.d.ts +8 -0
  602. package/dist/theme/ThemeFivethirtyeight.svelte +14 -0
  603. package/dist/theme/ThemeFivethirtyeight.svelte.d.ts +9 -0
  604. package/dist/theme/ThemeGgplot2.svelte +13 -0
  605. package/dist/theme/ThemeGgplot2.svelte.d.ts +8 -0
  606. package/dist/theme/ThemeGray.svelte +13 -0
  607. package/dist/theme/ThemeGray.svelte.d.ts +8 -0
  608. package/dist/theme/ThemeGrey.svelte +13 -0
  609. package/dist/theme/ThemeGrey.svelte.d.ts +8 -0
  610. package/dist/theme/ThemeHc.svelte +13 -0
  611. package/dist/theme/ThemeHc.svelte.d.ts +8 -0
  612. package/dist/theme/ThemeHcdark.svelte +13 -0
  613. package/dist/theme/ThemeHcdark.svelte.d.ts +8 -0
  614. package/dist/theme/ThemeHrbr.svelte +13 -0
  615. package/dist/theme/ThemeHrbr.svelte.d.ts +8 -0
  616. package/dist/theme/ThemeIgray.svelte +13 -0
  617. package/dist/theme/ThemeIgray.svelte.d.ts +8 -0
  618. package/dist/theme/ThemeLight.svelte +13 -0
  619. package/dist/theme/ThemeLight.svelte.d.ts +8 -0
  620. package/dist/theme/ThemeLinedraw.svelte +13 -0
  621. package/dist/theme/ThemeLinedraw.svelte.d.ts +8 -0
  622. package/dist/theme/ThemeMap.svelte +13 -0
  623. package/dist/theme/ThemeMap.svelte.d.ts +8 -0
  624. package/dist/theme/ThemeMinimal.svelte +13 -0
  625. package/dist/theme/ThemeMinimal.svelte.d.ts +8 -0
  626. package/dist/theme/ThemePander.svelte +13 -0
  627. package/dist/theme/ThemePander.svelte.d.ts +8 -0
  628. package/dist/theme/ThemeSolarized.svelte +13 -0
  629. package/dist/theme/ThemeSolarized.svelte.d.ts +8 -0
  630. package/dist/theme/ThemeSolarized2.svelte +13 -0
  631. package/dist/theme/ThemeSolarized2.svelte.d.ts +8 -0
  632. package/dist/theme/ThemeSolarized2dark.svelte +13 -0
  633. package/dist/theme/ThemeSolarized2dark.svelte.d.ts +8 -0
  634. package/dist/theme/ThemeSolarizeddark.svelte +14 -0
  635. package/dist/theme/ThemeSolarizeddark.svelte.d.ts +9 -0
  636. package/dist/theme/ThemeSolid.svelte +13 -0
  637. package/dist/theme/ThemeSolid.svelte.d.ts +8 -0
  638. package/dist/theme/ThemeStata.svelte +13 -0
  639. package/dist/theme/ThemeStata.svelte.d.ts +8 -0
  640. package/dist/theme/ThemeStatas1color.svelte +13 -0
  641. package/dist/theme/ThemeStatas1color.svelte.d.ts +8 -0
  642. package/dist/theme/ThemeTest.svelte +14 -0
  643. package/dist/theme/ThemeTest.svelte.d.ts +9 -0
  644. package/dist/theme/ThemeTufte.svelte +13 -0
  645. package/dist/theme/ThemeTufte.svelte.d.ts +8 -0
  646. package/dist/theme/ThemeVoid.svelte +14 -0
  647. package/dist/theme/ThemeVoid.svelte.d.ts +9 -0
  648. package/dist/theme/ThemeWsj.svelte +13 -0
  649. package/dist/theme/ThemeWsj.svelte.d.ts +8 -0
  650. package/dist/theme/factory.svelte.d.ts +36 -0
  651. package/dist/theme/factory.svelte.js +100 -0
  652. package/dist/zoom/zoom-state.svelte.d.ts +44 -0
  653. package/dist/zoom/zoom-state.svelte.js +121 -0
  654. package/dist/zoom/zoom.d.ts +1 -0
  655. package/dist/zoom/zoom.js +2 -0
  656. package/package.json +83 -0
@@ -0,0 +1,228 @@
1
+ export function isRecord(value) {
2
+ return typeof value === "object" && value !== null;
3
+ }
4
+ /**
5
+ * Every object reachable one step down, arrays flattened.
6
+ *
7
+ * Deliberately not filtered to {@link isNode}: `Fragment` carries the children
8
+ * of an element but has no start/end, so a node-only walk stops at the first
9
+ * `<div>` and silently skips every plot nested inside one.
10
+ */
11
+ export function childObjects(value) {
12
+ if (!isRecord(value))
13
+ return [];
14
+ const out = [];
15
+ for (const child of Object.values(value)) {
16
+ if (Array.isArray(child))
17
+ out.push(...child.filter((item) => isRecord(item)));
18
+ else if (isRecord(child))
19
+ out.push(child);
20
+ }
21
+ return out;
22
+ }
23
+ export function isNode(value) {
24
+ return (isRecord(value) &&
25
+ typeof value["type"] === "string" &&
26
+ typeof value["start"] === "number" &&
27
+ typeof value["end"] === "number");
28
+ }
29
+ // ---------------------------------------------------------------------------
30
+ // Source helpers
31
+ // ---------------------------------------------------------------------------
32
+ export function lineOf(source, offset) {
33
+ let line = 1;
34
+ for (let i = 0; i < offset && i < source.length; i += 1) {
35
+ if (source[i] === "\n")
36
+ line += 1;
37
+ }
38
+ return line;
39
+ }
40
+ /** Leading whitespace of the line `offset` sits on, or "" if code precedes it. */
41
+ export function indentAt(source, offset) {
42
+ const lineStart = source.lastIndexOf("\n", offset - 1) + 1;
43
+ const prefix = source.slice(lineStart, offset);
44
+ return /^[\t ]*$/.test(prefix) ? prefix : "";
45
+ }
46
+ const IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
47
+ /** A double-quoted string literal with nothing an attribute value must escape. */
48
+ function plainDoubleQuoted(raw) {
49
+ return raw !== undefined && /^"[^"\\\n]*"$/.test(raw);
50
+ }
51
+ // ---------------------------------------------------------------------------
52
+ // Attribute → child element
53
+ // ---------------------------------------------------------------------------
54
+ /** The `{ … }` expression tag of an attribute, or undefined for other shapes. */
55
+ function expressionTag(attribute) {
56
+ const value = attribute["value"];
57
+ const nodes = Array.isArray(value) ? value : [value];
58
+ if (nodes.length !== 1)
59
+ return undefined;
60
+ const only = nodes[0];
61
+ return isNode(only) && only.type === "ExpressionTag" ? only : undefined;
62
+ }
63
+ /** The single quoted-text value of an attribute, or undefined. */
64
+ function textValue(attribute) {
65
+ const value = attribute["value"];
66
+ if (!Array.isArray(value) || value.length !== 1)
67
+ return undefined;
68
+ const only = value[0];
69
+ return isNode(only) && only.type === "Text" ? only : undefined;
70
+ }
71
+ /**
72
+ * Attributes for a flat prop bag whose value is an object literal made only of
73
+ * plain `key: value` properties.
74
+ *
75
+ * Anything else — shorthand, spread, computed keys, methods, getters, a
76
+ * non-identifier key — falls back to `{...expr}` rather than being partially
77
+ * expanded. Both forms are correct; expansion only exists so the common
78
+ * `labs={{ title: "Sales" }}` migrates to code a human would have written.
79
+ */
80
+ function expandObjectLiteral(source, expression) {
81
+ if (!isRecord(expression) || expression["type"] !== "ObjectExpression")
82
+ return undefined;
83
+ const properties = expression["properties"];
84
+ if (!Array.isArray(properties) || properties.length === 0)
85
+ return undefined;
86
+ const parts = [];
87
+ for (const raw of properties) {
88
+ if (!isRecord(raw) || raw["type"] !== "Property")
89
+ return undefined;
90
+ const property = raw;
91
+ if (property.kind !== "init" || property.computed || property.method || property.shorthand) {
92
+ return undefined;
93
+ }
94
+ const key = property.key.type === "Identifier"
95
+ ? property.key.name
96
+ : property.key.type === "Literal" && typeof property.key.value === "string"
97
+ ? property.key.value
98
+ : undefined;
99
+ if (key === undefined || !IDENTIFIER.test(key))
100
+ return undefined;
101
+ const valueSource = source.slice(property.value.start, property.value.end);
102
+ parts.push(property.value.type === "Literal" && plainDoubleQuoted(property.value.raw)
103
+ ? `${key}=${valueSource}`
104
+ : `${key}={${valueSource}}`);
105
+ }
106
+ return parts.join(" ");
107
+ }
108
+ /**
109
+ * Build the replacement child for one deprecated attribute.
110
+ *
111
+ * @returns the element source, or a skip reason when the shape is one the
112
+ * codemod refuses to guess at.
113
+ */
114
+ export function childFor(source, prop, rule, attribute) {
115
+ const tag = expressionTag(attribute);
116
+ const text = textValue(attribute);
117
+ if (rule.form === "theme") {
118
+ if (text !== undefined) {
119
+ return { element: `<Theme name="${source.slice(text.start, text.end)}" />` };
120
+ }
121
+ if (tag !== undefined) {
122
+ const expression = tag["expression"];
123
+ if (isRecord(expression) &&
124
+ expression["type"] === "Literal" &&
125
+ typeof expression["value"] === "string") {
126
+ return { element: `<Theme name="${expression["value"]}" />` };
127
+ }
128
+ }
129
+ return {
130
+ skip: "theme is ThemeName | ThemeSpec and <Theme> has no `value` hatch, so only a string literal can be rewritten mechanically",
131
+ };
132
+ }
133
+ if (text !== undefined) {
134
+ const quoted = `"${source.slice(text.start, text.end)}"`;
135
+ return rule.form === "value"
136
+ ? { element: `<${rule.component} value=${quoted} />` }
137
+ : { skip: `${prop} is an object-valued prop, so a quoted string is not a shape it can hold` };
138
+ }
139
+ if (tag === undefined) {
140
+ return { skip: `${prop} has no single expression value to move onto <${rule.component}>` };
141
+ }
142
+ const inner = source.slice(tag.start + 1, tag.end - 1);
143
+ if (rule.form === "value") {
144
+ return { element: `<${rule.component} value={${inner}} />` };
145
+ }
146
+ const expanded = expandObjectLiteral(source, tag["expression"]);
147
+ return {
148
+ element: expanded === undefined
149
+ ? `<${rule.component} {...${inner}} />`
150
+ : `<${rule.component} ${expanded} />`,
151
+ };
152
+ }
153
+ /**
154
+ * The named-import statement that brought ggts's `GGPlot` into scope.
155
+ *
156
+ * Scoped by module specifier on purpose: a `GGPlot` imported from a consumer's
157
+ * own `./local.js` is somebody else's component, and rewriting its props would
158
+ * be exactly the wrong-rewrite blast radius ADR 0013 weighs. `sources` exists
159
+ * so this repo can still migrate its own files, which import the package
160
+ * through relative paths because the workspace has no self-link.
161
+ */
162
+ export function findGGPlotImport(program, sources) {
163
+ if (!isRecord(program))
164
+ return undefined;
165
+ const body = program["body"];
166
+ if (!Array.isArray(body))
167
+ return undefined;
168
+ for (const statement of body) {
169
+ if (!isRecord(statement) || statement["type"] !== "ImportDeclaration")
170
+ continue;
171
+ const source = statement["source"];
172
+ if (!isRecord(source) || typeof source["value"] !== "string")
173
+ continue;
174
+ if (!sources.includes(source["value"]))
175
+ continue;
176
+ const rawSpecifiers = statement["specifiers"];
177
+ if (!Array.isArray(rawSpecifiers))
178
+ continue;
179
+ const specifiers = [];
180
+ let hasGGPlot = false;
181
+ for (const specifier of rawSpecifiers) {
182
+ if (!isRecord(specifier) || specifier["type"] !== "ImportSpecifier")
183
+ continue;
184
+ const local = specifier["local"];
185
+ const imported = specifier["imported"];
186
+ if (!isNode(specifier) || !isRecord(local) || typeof local["name"] !== "string")
187
+ continue;
188
+ if (isRecord(imported) && imported["name"] === "GGPlot")
189
+ hasGGPlot = true;
190
+ specifiers.push({ local: local["name"], start: specifier.start, end: specifier.end });
191
+ }
192
+ if (hasGGPlot && specifiers.length > 0)
193
+ return { specifiers };
194
+ }
195
+ return undefined;
196
+ }
197
+ function isSortedCaseInsensitive(names) {
198
+ for (let i = 1; i < names.length; i += 1) {
199
+ if (names[i - 1].toLowerCase() > names[i].toLowerCase())
200
+ return false;
201
+ }
202
+ return true;
203
+ }
204
+ /**
205
+ * Edits that add `additions` to an existing named-import list.
206
+ *
207
+ * Sorted lists stay sorted (case-insensitively — the repo's own convention,
208
+ * e.g. `{ coordFixed, GGPlot, GeomLine }`); an unsorted list is appended to,
209
+ * so the codemod never reorders a line the author arranged deliberately.
210
+ */
211
+ export function importEdits(site, additions) {
212
+ const existing = site.specifiers.map((specifier) => specifier.local);
213
+ const missing = additions.filter((name) => !existing.includes(name));
214
+ if (missing.length === 0)
215
+ return [];
216
+ const last = site.specifiers.at(-1);
217
+ if (!isSortedCaseInsensitive(existing)) {
218
+ return [{ start: last.end, end: last.end, text: missing.map((n) => `, ${n}`).join("") }];
219
+ }
220
+ const edits = [];
221
+ for (const name of missing) {
222
+ const before = site.specifiers.find((specifier) => specifier.local.toLowerCase() > name.toLowerCase());
223
+ edits.push(before === undefined
224
+ ? { start: last.end, end: last.end, text: `, ${name}` }
225
+ : { start: before.start, end: before.start, text: `${name}, ` });
226
+ }
227
+ return edits;
228
+ }
@@ -0,0 +1,38 @@
1
+ /** A prop this run rewrote. */
2
+ export interface PropChange {
3
+ readonly prop: string;
4
+ readonly component: string;
5
+ readonly line: number;
6
+ }
7
+ /** A prop this run deliberately left alone, with the manual-change pointer. */
8
+ export interface PropSkip {
9
+ readonly prop: string;
10
+ readonly line: number;
11
+ readonly reason: string;
12
+ readonly docUrl: string;
13
+ }
14
+ /** The module specifier a consumer imports `GGPlot` from. */
15
+ export declare const PACKAGE_SPECIFIER = "@ggts-sh/svelte";
16
+ export interface MigrateOptions {
17
+ /**
18
+ * Extra module specifiers that also count as ggts, on top of
19
+ * {@link PACKAGE_SPECIFIER}. Exists for this repo's own sources, which
20
+ * import through relative paths; consumers never need it.
21
+ */
22
+ readonly sources?: readonly string[];
23
+ }
24
+ export interface MigrationResult {
25
+ /** Migrated source. Byte-identical to the input when nothing was rewritten. */
26
+ readonly code: string;
27
+ readonly changes: readonly PropChange[];
28
+ readonly skipped: readonly PropSkip[];
29
+ }
30
+ /**
31
+ * Rewrite deprecated `<GGPlot>` grammar props into child layers.
32
+ *
33
+ * Returns the source unchanged (and no changes) when the file imports no
34
+ * `GGPlot`, uses none of the deprecated props, or only uses shapes the
35
+ * codemod refuses to guess at — the second run of any file is therefore a
36
+ * no-op, which is ADR 0013's idempotence criterion.
37
+ */
38
+ export declare function migratePlotProps(source: string, options?: MigrateOptions): MigrationResult;
@@ -0,0 +1,159 @@
1
+ /**
2
+ * Codemod: deprecated <GGPlot> grammar props → declaration-only child layers
3
+ * (#659 slice 7, closes #290).
4
+ *
5
+ * Rewrites the seven props deprecated in 0.11.0 — facet, coord, scales,
6
+ * guides, legend, theme, labs — into the child components that replace them,
7
+ * and adds the components to whichever import statement already provided
8
+ * `GGPlot`.
9
+ *
10
+ * ## Why children go first
11
+ *
12
+ * D2: assemblePortableSpec applies props first, then child plotLayers in
13
+ * registration order. A prop that becomes a child must therefore register
14
+ * BEFORE any child the file already had, or a pre-existing `<ScaleColorDiscrete/>`
15
+ * would stop winning over the migrated `scales` prop. Inserting immediately
16
+ * after the open tag preserves the old precedence exactly.
17
+ *
18
+ * Attribute rewrite and import edits live in migrate-plot-props-rewrite.ts.
19
+ */
20
+ import { parse } from "svelte/compiler";
21
+ import { grammarCodemodRules } from "../layers/grammar-families.js";
22
+ import { applyEdits } from "./edits.js";
23
+ import { childFor, childObjects, findGGPlotImport, importEdits, indentAt, isNode, isRecord, lineOf, } from "./migrate-plot-props-rewrite.js";
24
+ /** The module specifier a consumer imports `GGPlot` from. */
25
+ export const PACKAGE_SPECIFIER = "@ggts-sh/svelte";
26
+ /**
27
+ * The seven props deprecated in 0.11.0, in GGPlotProps declaration order.
28
+ * Built from GRAMMAR_FAMILIES / GGPLOT_PROP_ORDER (#785) so codemod rules
29
+ * cannot drift from deprecation metadata.
30
+ */
31
+ const RULES = grammarCodemodRules();
32
+ function migrateElement(source, plotName, element, output) {
33
+ const attributes = Array.isArray(element["attributes"]) ? element["attributes"] : [];
34
+ const elementStart = element.start;
35
+ const elementEnd = element.end;
36
+ const children = [];
37
+ let previousEnd = elementStart + 1 + plotName.length;
38
+ for (const raw of attributes) {
39
+ if (!isRecord(raw) || !isNode(raw))
40
+ continue;
41
+ const attributeEnd = raw.end;
42
+ const attributeStart = raw.start;
43
+ const name = raw["name"];
44
+ if (raw["type"] !== "Attribute" || typeof name !== "string") {
45
+ previousEnd = attributeEnd;
46
+ continue;
47
+ }
48
+ const rule = Object.hasOwn(RULES, name) ? RULES[name] : undefined;
49
+ if (rule === undefined) {
50
+ previousEnd = attributeEnd;
51
+ continue;
52
+ }
53
+ const built = childFor(source, name, rule, raw);
54
+ if ("skip" in built) {
55
+ output.skipped.push({
56
+ prop: name,
57
+ line: lineOf(source, attributeStart),
58
+ reason: built.skip,
59
+ docUrl: rule.docUrl,
60
+ });
61
+ previousEnd = attributeEnd;
62
+ continue;
63
+ }
64
+ children.push(built.element);
65
+ output.needed.add(rule.component);
66
+ output.changes.push({
67
+ prop: name,
68
+ component: rule.component,
69
+ line: lineOf(source, attributeStart),
70
+ });
71
+ output.edits.push({ start: previousEnd, end: attributeEnd, text: "" });
72
+ previousEnd = attributeEnd;
73
+ }
74
+ if (children.length === 0)
75
+ return;
76
+ const fragment = element["fragment"];
77
+ const fragmentNodes = !Array.isArray(fragment) && isRecord(fragment) && Array.isArray(fragment["nodes"])
78
+ ? fragment["nodes"]
79
+ : [];
80
+ const firstChild = fragmentNodes.find((node) => isNode(node));
81
+ const elementIndent = indentAt(source, elementStart);
82
+ const childIndent = `${elementIndent} `;
83
+ const block = children.map((child) => `\n${childIndent}${child}`).join("");
84
+ if (firstChild === undefined) {
85
+ output.edits.push({
86
+ start: previousEnd,
87
+ end: elementEnd,
88
+ text: `>${block}\n${elementIndent}</${plotName}>`,
89
+ });
90
+ }
91
+ else {
92
+ output.edits.push({
93
+ start: firstChild.start,
94
+ end: firstChild.start,
95
+ text: block,
96
+ });
97
+ }
98
+ }
99
+ // ---------------------------------------------------------------------------
100
+ // Transform
101
+ // ---------------------------------------------------------------------------
102
+ /**
103
+ * Rewrite deprecated `<GGPlot>` grammar props into child layers.
104
+ *
105
+ * Returns the source unchanged (and no changes) when the file imports no
106
+ * `GGPlot`, uses none of the deprecated props, or only uses shapes the
107
+ * codemod refuses to guess at — the second run of any file is therefore a
108
+ * no-op, which is ADR 0013's idempotence criterion.
109
+ */
110
+ export function migratePlotProps(source, options = {}) {
111
+ const sources = [PACKAGE_SPECIFIER, ...(options.sources ?? [])];
112
+ const ast = parse(source, { modern: true });
113
+ const importSite = findGGPlotImport(isRecord(ast.instance) ? ast.instance["content"] : undefined, sources) ??
114
+ findGGPlotImport(isRecord(ast.module) ? ast.module["content"] : undefined, sources);
115
+ if (importSite === undefined)
116
+ return { code: source, changes: [], skipped: [] };
117
+ const localName = importSite.specifiers.find((specifier) => {
118
+ // The local name for the GGPlot binding: re-derived here so `import
119
+ // { GGPlot as Plot }` rewrites <Plot> rather than silently doing nothing.
120
+ return specifier.local === "GGPlot";
121
+ })?.local;
122
+ const plotName = localName ?? aliasedGGPlotName(source, importSite);
123
+ if (plotName === undefined)
124
+ return { code: source, changes: [], skipped: [] };
125
+ const edits = [];
126
+ const changes = [];
127
+ const skipped = [];
128
+ const needed = new Set();
129
+ const output = { edits, changes, skipped, needed };
130
+ for (const element of collectComponents(ast.fragment, plotName))
131
+ migrateElement(source, plotName, element, output);
132
+ if (changes.length === 0)
133
+ return { code: source, changes: [], skipped };
134
+ edits.push(...importEdits(importSite, [...needed].toSorted()));
135
+ return { code: applyEdits(source, edits), changes, skipped };
136
+ }
137
+ /** Local name of an aliased `import { GGPlot as X }`, read back from source. */
138
+ function aliasedGGPlotName(source, site) {
139
+ for (const specifier of site.specifiers) {
140
+ const text = source.slice(specifier.start, specifier.end);
141
+ if (/^GGPlot\s+as\s+/.test(text))
142
+ return specifier.local;
143
+ }
144
+ return undefined;
145
+ }
146
+ /** Every `<plotName>` component in the template, including nested ones. */
147
+ function collectComponents(fragment, plotName) {
148
+ const found = [];
149
+ const walk = (node) => {
150
+ if (!isRecord(node))
151
+ return;
152
+ if (node["type"] === "Component" && node["name"] === plotName)
153
+ found.push(node);
154
+ for (const child of childObjects(node))
155
+ walk(child);
156
+ };
157
+ walk(fragment);
158
+ return found;
159
+ }
@@ -0,0 +1,21 @@
1
+ <script lang="ts">
2
+ /**
3
+ * <Coord> — declaration-only coordinate layer for <GGPlot> (#659 slice 5).
4
+ * Escape hatch: pass a whole `CoordSpec | "flip"` via `value`. Named shells
5
+ * (<CoordFlip/>, <CoordFixed/>, …) are preferred when the form is known at
6
+ * authoring time; use this for computed fragments or variable references.
7
+ *
8
+ * Emits NO markup; registers a live coord layer during component init and
9
+ * unregisters on destroy. Inert without a <GGPlot> ancestor.
10
+ */
11
+ import type { CoordSpec } from "@ggts-sh/spec";
12
+
13
+ import { createPlotLayer } from "../layers/plot-layer.svelte.js";
14
+
15
+ type Props = {
16
+ value: CoordSpec | "flip";
17
+ };
18
+
19
+ const props: Props = $props();
20
+ createPlotLayer("coord", () => props.value);
21
+ </script>
@@ -0,0 +1,16 @@
1
+ /**
2
+ * <Coord> — declaration-only coordinate layer for <GGPlot> (#659 slice 5).
3
+ * Escape hatch: pass a whole `CoordSpec | "flip"` via `value`. Named shells
4
+ * (<CoordFlip/>, <CoordFixed/>, …) are preferred when the form is known at
5
+ * authoring time; use this for computed fragments or variable references.
6
+ *
7
+ * Emits NO markup; registers a live coord layer during component init and
8
+ * unregisters on destroy. Inert without a <GGPlot> ancestor.
9
+ */
10
+ import type { CoordSpec } from "@ggts-sh/spec";
11
+ type Props = {
12
+ value: CoordSpec | "flip";
13
+ };
14
+ declare const Coord: import("svelte").Component<Props, {}, "">;
15
+ type Coord = ReturnType<typeof Coord>;
16
+ export default Coord;
@@ -0,0 +1,11 @@
1
+ <script lang="ts">
2
+ /**
3
+ * <CoordCartesian> — declaration-only default Cartesian layer for <GGPlot>
4
+ * (#659 slice 5). Registers `{ type: "cartesian" }`, which normalize() drops
5
+ * when bare (no other keys). Useful mid-migration under REPLACE so a child
6
+ * can clear a prior `coord="flip"` prop. Emits NO markup.
7
+ */
8
+ import { createPlotLayer } from "../layers/plot-layer.svelte.js";
9
+
10
+ createPlotLayer("coord", () => ({ type: "cartesian" }));
11
+ </script>
@@ -0,0 +1,18 @@
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const CoordCartesian: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, string>;
17
+ type CoordCartesian = InstanceType<typeof CoordCartesian>;
18
+ export default CoordCartesian;
@@ -0,0 +1,17 @@
1
+ <script lang="ts">
2
+ /**
3
+ * <CoordFixed> — declaration-only fixed-aspect coordinate layer for
4
+ * <GGPlot> (#659 slice 5). Accepts the same options as `coordFixed(…)`.
5
+ * Also exported as `CoordEqual` (alias of `coordEqual = coordFixed`).
6
+ * Emits NO markup.
7
+ */
8
+ import { coordFixed, type CoordFixedOptions } from "@ggts-sh/spec";
9
+
10
+ import {
11
+ createPlotLayer,
12
+ definedProps,
13
+ } from "../layers/plot-layer.svelte.js";
14
+
15
+ const props: CoordFixedOptions = $props();
16
+ createPlotLayer("coord", () => coordFixed(definedProps(props)));
17
+ </script>
@@ -0,0 +1,10 @@
1
+ /**
2
+ * <CoordFixed> — declaration-only fixed-aspect coordinate layer for
3
+ * <GGPlot> (#659 slice 5). Accepts the same options as `coordFixed(…)`.
4
+ * Also exported as `CoordEqual` (alias of `coordEqual = coordFixed`).
5
+ * Emits NO markup.
6
+ */
7
+ import { type CoordFixedOptions } from "@ggts-sh/spec";
8
+ declare const CoordFixed: import("svelte").Component<CoordFixedOptions, {}, "">;
9
+ type CoordFixed = ReturnType<typeof CoordFixed>;
10
+ export default CoordFixed;
@@ -0,0 +1,11 @@
1
+ <script lang="ts">
2
+ /**
3
+ * <CoordFlip> — declaration-only flipped Cartesian layer for <GGPlot>
4
+ * (#659 slice 5). Registers the canonical `{ type: "flip" }` object (not the
5
+ * bare string), matching `builder.coord("flip")` / `coordFlip()`.
6
+ * Emits NO markup.
7
+ */
8
+ import { createPlotLayer } from "../layers/plot-layer.svelte.js";
9
+
10
+ createPlotLayer("coord", () => ({ type: "flip" }));
11
+ </script>
@@ -0,0 +1,18 @@
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const CoordFlip: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, string>;
17
+ type CoordFlip = InstanceType<typeof CoordFlip>;
18
+ export default CoordFlip;
@@ -0,0 +1,16 @@
1
+ <script lang="ts">
2
+ /**
3
+ * <CoordPolar> — ggplot2 coord_polar alias for polar coordinates.
4
+ * Emits `{ type: "radial", clip: true, … }` via `coordPolar(…)`.
5
+ * Prefer <CoordRadial> for new work (partial arcs, inner radius, reverse).
6
+ */
7
+ import { coordPolar, type CoordPolarOptions } from "@ggts-sh/spec";
8
+
9
+ import {
10
+ createPlotLayer,
11
+ definedProps,
12
+ } from "../layers/plot-layer.svelte.js";
13
+
14
+ const props: CoordPolarOptions = $props();
15
+ createPlotLayer("coord", () => coordPolar(definedProps(props)));
16
+ </script>
@@ -0,0 +1,9 @@
1
+ /**
2
+ * <CoordPolar> — ggplot2 coord_polar alias for polar coordinates.
3
+ * Emits `{ type: "radial", clip: true, … }` via `coordPolar(…)`.
4
+ * Prefer <CoordRadial> for new work (partial arcs, inner radius, reverse).
5
+ */
6
+ import { type CoordPolarOptions } from "@ggts-sh/spec";
7
+ declare const CoordPolar: import("svelte").Component<CoordPolarOptions, {}, "">;
8
+ type CoordPolar = ReturnType<typeof CoordPolar>;
9
+ export default CoordPolar;
@@ -0,0 +1,16 @@
1
+ <script lang="ts">
2
+ /**
3
+ * <CoordRadial> — declaration-only polar/radial coordinate layer for
4
+ * <GGPlot>. Accepts the same options as `coordRadial(…)`. Emits NO markup.
5
+ * Also exported as `CoordPolar` (ggplot2 coord_polar alias shell).
6
+ */
7
+ import { coordRadial, type CoordRadialOptions } from "@ggts-sh/spec";
8
+
9
+ import {
10
+ createPlotLayer,
11
+ definedProps,
12
+ } from "../layers/plot-layer.svelte.js";
13
+
14
+ const props: CoordRadialOptions = $props();
15
+ createPlotLayer("coord", () => coordRadial(definedProps(props)));
16
+ </script>
@@ -0,0 +1,9 @@
1
+ /**
2
+ * <CoordRadial> — declaration-only polar/radial coordinate layer for
3
+ * <GGPlot>. Accepts the same options as `coordRadial(…)`. Emits NO markup.
4
+ * Also exported as `CoordPolar` (ggplot2 coord_polar alias shell).
5
+ */
6
+ import { type CoordRadialOptions } from "@ggts-sh/spec";
7
+ declare const CoordRadial: import("svelte").Component<CoordRadialOptions, {}, "">;
8
+ type CoordRadial = ReturnType<typeof CoordRadial>;
9
+ export default CoordRadial;
@@ -0,0 +1,16 @@
1
+ <script lang="ts">
2
+ /**
3
+ * <CoordSf> — declaration-only simple-features fixed-aspect coordinate layer
4
+ * for <GGPlot> (#809 phase 8). Accepts the same options as `coordSf(…)`.
5
+ * Already-projected data only (no CRS reproject in v1). Emits NO markup.
6
+ */
7
+ import { coordSf, type CoordSfOptions } from "@ggts-sh/spec";
8
+
9
+ import {
10
+ createPlotLayer,
11
+ definedProps,
12
+ } from "../layers/plot-layer.svelte.js";
13
+
14
+ const props: CoordSfOptions = $props();
15
+ createPlotLayer("coord", () => coordSf(definedProps(props)));
16
+ </script>
@@ -0,0 +1,9 @@
1
+ /**
2
+ * <CoordSf> — declaration-only simple-features fixed-aspect coordinate layer
3
+ * for <GGPlot> (#809 phase 8). Accepts the same options as `coordSf(…)`.
4
+ * Already-projected data only (no CRS reproject in v1). Emits NO markup.
5
+ */
6
+ import { type CoordSfOptions } from "@ggts-sh/spec";
7
+ declare const CoordSf: import("svelte").Component<CoordSfOptions, {}, "">;
8
+ type CoordSf = ReturnType<typeof CoordSf>;
9
+ export default CoordSf;
@@ -0,0 +1,16 @@
1
+ <script lang="ts">
2
+ /**
3
+ * <CoordTransform> — declaration-only post-stat coordinate transform for
4
+ * <GGPlot> (#659 slice 5). Accepts the same options as `coordTransform(…)`.
5
+ * Emits NO markup.
6
+ */
7
+ import { coordTransform, type CoordTransformOptions } from "@ggts-sh/spec";
8
+
9
+ import {
10
+ createPlotLayer,
11
+ definedProps,
12
+ } from "../layers/plot-layer.svelte.js";
13
+
14
+ const props: CoordTransformOptions = $props();
15
+ createPlotLayer("coord", () => coordTransform(definedProps(props)));
16
+ </script>