@open-pencil/scene-graph 0.16.0 → 0.17.0-beta.2

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 (885) hide show
  1. package/dist/arrow-caps.d.ts +35 -14
  2. package/dist/arrow-caps.d.ts.map +1 -1
  3. package/dist/arrow-caps.js +286 -55
  4. package/dist/arrow-caps.js.map +1 -1
  5. package/dist/asset-keys.d.ts +17 -0
  6. package/dist/asset-keys.d.ts.map +1 -0
  7. package/dist/asset-keys.js.map +1 -0
  8. package/dist/behaviours/index.d.ts +6 -0
  9. package/dist/behaviours/index.js +6 -0
  10. package/dist/behaviours/kinds.d.ts +62 -0
  11. package/dist/behaviours/kinds.d.ts.map +1 -0
  12. package/dist/{chunks/behaviours → behaviours}/kinds.js +76 -75
  13. package/dist/behaviours/kinds.js.map +1 -0
  14. package/dist/behaviours/layers.d.ts +16 -0
  15. package/dist/behaviours/layers.d.ts.map +1 -0
  16. package/dist/behaviours/layers.js +43 -0
  17. package/dist/behaviours/layers.js.map +1 -0
  18. package/dist/behaviours/model.d.ts +48 -0
  19. package/dist/behaviours/model.d.ts.map +1 -0
  20. package/dist/behaviours/model.js +156 -0
  21. package/dist/behaviours/model.js.map +1 -0
  22. package/dist/behaviours/schema.d.ts +228 -0
  23. package/dist/behaviours/schema.d.ts.map +1 -0
  24. package/dist/behaviours/schema.js +86 -0
  25. package/dist/behaviours/schema.js.map +1 -0
  26. package/dist/behaviours/spec.d.ts +26 -0
  27. package/dist/behaviours/spec.d.ts.map +1 -0
  28. package/dist/{chunks/behaviours → behaviours}/spec.js +6 -29
  29. package/dist/behaviours/spec.js.map +1 -0
  30. package/dist/bindings.js +26 -0
  31. package/dist/bindings.js.map +1 -0
  32. package/dist/buffered-events.d.ts +21 -0
  33. package/dist/buffered-events.d.ts.map +1 -0
  34. package/dist/buffered-events.js.map +1 -0
  35. package/dist/checkpoint.d.ts +42 -0
  36. package/dist/checkpoint.d.ts.map +1 -0
  37. package/dist/checkpoint.js +249 -0
  38. package/dist/checkpoint.js.map +1 -0
  39. package/dist/clipping.d.ts +31 -0
  40. package/dist/clipping.d.ts.map +1 -0
  41. package/dist/clipping.js +125 -0
  42. package/dist/clipping.js.map +1 -0
  43. package/dist/color/contrast.d.ts +17 -0
  44. package/dist/color/contrast.d.ts.map +1 -0
  45. package/dist/{chunks/color → color}/contrast.js +2 -24
  46. package/dist/color/contrast.js.map +1 -0
  47. package/dist/color/index.d.ts +38 -0
  48. package/dist/color/index.d.ts.map +1 -0
  49. package/dist/color/index.js +110 -0
  50. package/dist/color/index.js.map +1 -0
  51. package/dist/color/management.d.ts +32 -0
  52. package/dist/color/management.d.ts.map +1 -0
  53. package/dist/color/management.js +187 -0
  54. package/dist/color/management.js.map +1 -0
  55. package/dist/color/normalize.d.ts +6 -0
  56. package/dist/color/normalize.d.ts.map +1 -0
  57. package/dist/color/normalize.js +15 -0
  58. package/dist/color/normalize.js.map +1 -0
  59. package/dist/color/okhcl.d.ts +33 -0
  60. package/dist/color/okhcl.d.ts.map +1 -0
  61. package/dist/color/okhcl.js +146 -0
  62. package/dist/color/okhcl.js.map +1 -0
  63. package/dist/color/schema.d.ts +11 -0
  64. package/dist/color/schema.d.ts.map +1 -0
  65. package/dist/color/schema.js +13 -0
  66. package/dist/color/schema.js.map +1 -0
  67. package/dist/comments/document.d.ts +23 -0
  68. package/dist/comments/document.d.ts.map +1 -0
  69. package/dist/{chunks/comments → comments}/document.js +2 -1
  70. package/dist/comments/document.js.map +1 -0
  71. package/dist/comments/index.d.ts +6 -0
  72. package/dist/comments/index.js +6 -0
  73. package/dist/comments/list.d.ts +25 -0
  74. package/dist/comments/list.d.ts.map +1 -0
  75. package/dist/comments/list.js +33 -0
  76. package/dist/comments/list.js.map +1 -0
  77. package/dist/comments/merge.d.ts +16 -0
  78. package/dist/comments/merge.d.ts.map +1 -0
  79. package/dist/{chunks/comments → comments}/merge.js +1 -1
  80. package/dist/comments/merge.js.map +1 -0
  81. package/dist/comments/schema.d.ts +8 -0
  82. package/dist/comments/schema.d.ts.map +1 -0
  83. package/dist/comments/schema.js +50 -0
  84. package/dist/comments/schema.js.map +1 -0
  85. package/dist/comments/threads.d.ts +59 -0
  86. package/dist/comments/threads.d.ts.map +1 -0
  87. package/dist/{chunks/comments/list.js → comments/threads.js} +3 -53
  88. package/dist/comments/threads.js.map +1 -0
  89. package/dist/components/exposure.d.ts +24 -0
  90. package/dist/components/exposure.d.ts.map +1 -0
  91. package/dist/components/exposure.js +51 -0
  92. package/dist/components/exposure.js.map +1 -0
  93. package/dist/components/index.d.ts +4 -0
  94. package/dist/components/index.js +4 -0
  95. package/dist/components/properties.d.ts +32 -0
  96. package/dist/components/properties.d.ts.map +1 -0
  97. package/dist/components/properties.js +180 -0
  98. package/dist/components/properties.js.map +1 -0
  99. package/dist/components/variants.d.ts +33 -0
  100. package/dist/components/variants.d.ts.map +1 -0
  101. package/dist/components/variants.js +58 -0
  102. package/dist/components/variants.js.map +1 -0
  103. package/dist/connectors/controls.d.ts +34 -0
  104. package/dist/connectors/controls.d.ts.map +1 -0
  105. package/dist/connectors/controls.js +196 -0
  106. package/dist/connectors/controls.js.map +1 -0
  107. package/dist/connectors/create.d.ts +23 -0
  108. package/dist/connectors/create.d.ts.map +1 -0
  109. package/dist/connectors/create.js +33 -0
  110. package/dist/connectors/create.js.map +1 -0
  111. package/dist/connectors/elbow.js +191 -0
  112. package/dist/connectors/elbow.js.map +1 -0
  113. package/dist/connectors/gaps.d.ts +10 -0
  114. package/dist/connectors/gaps.d.ts.map +1 -0
  115. package/dist/connectors/gaps.js +86 -0
  116. package/dist/connectors/gaps.js.map +1 -0
  117. package/dist/connectors/hit.d.ts +11 -0
  118. package/dist/connectors/hit.d.ts.map +1 -0
  119. package/dist/connectors/hit.js +47 -0
  120. package/dist/connectors/hit.js.map +1 -0
  121. package/dist/connectors/index.d.ts +11 -0
  122. package/dist/connectors/index.js +11 -0
  123. package/dist/connectors/label.d.ts +32 -0
  124. package/dist/connectors/label.d.ts.map +1 -0
  125. package/dist/connectors/label.js +213 -0
  126. package/dist/connectors/label.js.map +1 -0
  127. package/dist/connectors/layout.d.ts +46 -0
  128. package/dist/connectors/layout.d.ts.map +1 -0
  129. package/dist/connectors/layout.js +234 -0
  130. package/dist/connectors/layout.js.map +1 -0
  131. package/dist/connectors/pieces.d.ts +22 -0
  132. package/dist/connectors/pieces.d.ts.map +1 -0
  133. package/dist/connectors/pieces.js +156 -0
  134. package/dist/connectors/pieces.js.map +1 -0
  135. package/dist/connectors/route.d.ts +23 -0
  136. package/dist/connectors/route.d.ts.map +1 -0
  137. package/dist/connectors/route.js +107 -0
  138. package/dist/connectors/route.js.map +1 -0
  139. package/dist/connectors/sides.d.ts +23 -0
  140. package/dist/connectors/sides.d.ts.map +1 -0
  141. package/dist/connectors/sides.js +98 -0
  142. package/dist/connectors/sides.js.map +1 -0
  143. package/dist/connectors/sublayers.d.ts +76 -0
  144. package/dist/connectors/sublayers.d.ts.map +1 -0
  145. package/dist/connectors/sublayers.js +208 -0
  146. package/dist/connectors/sublayers.js.map +1 -0
  147. package/dist/constants.d.ts +11 -2
  148. package/dist/constants.d.ts.map +1 -0
  149. package/dist/constants.js +25 -1
  150. package/dist/constants.js.map +1 -0
  151. package/dist/coordinate.d.ts +94 -2
  152. package/dist/coordinate.d.ts.map +1 -0
  153. package/dist/coordinate.js +268 -1
  154. package/dist/coordinate.js.map +1 -0
  155. package/dist/copy.d.ts +49 -2
  156. package/dist/copy.d.ts.map +1 -0
  157. package/dist/copy.js +264 -2
  158. package/dist/copy.js.map +1 -0
  159. package/dist/css/blend.d.ts +11 -0
  160. package/dist/css/blend.d.ts.map +1 -0
  161. package/dist/css/blend.js +30 -0
  162. package/dist/css/blend.js.map +1 -0
  163. package/dist/css/grid.d.ts +7 -0
  164. package/dist/css/grid.d.ts.map +1 -0
  165. package/dist/{chunks/css → css}/grid.js +2 -33
  166. package/dist/css/grid.js.map +1 -0
  167. package/dist/css/index.d.ts +7 -0
  168. package/dist/css/index.js +7 -0
  169. package/dist/css/layout.d.ts +17 -0
  170. package/dist/css/layout.d.ts.map +1 -0
  171. package/dist/css/layout.js +45 -0
  172. package/dist/css/layout.js.map +1 -0
  173. package/dist/css/shadows.d.ts +10 -0
  174. package/dist/css/shadows.d.ts.map +1 -0
  175. package/dist/css/shadows.js +64 -0
  176. package/dist/css/shadows.js.map +1 -0
  177. package/dist/css/text.d.ts +22 -0
  178. package/dist/css/text.d.ts.map +1 -0
  179. package/dist/css/text.js +76 -0
  180. package/dist/css/text.js.map +1 -0
  181. package/dist/css/values.d.ts +14 -0
  182. package/dist/css/values.d.ts.map +1 -0
  183. package/dist/css/values.js +36 -0
  184. package/dist/css/values.js.map +1 -0
  185. package/dist/cubic.d.ts +7 -0
  186. package/dist/cubic.d.ts.map +1 -0
  187. package/dist/cubic.js +17 -0
  188. package/dist/cubic.js.map +1 -0
  189. package/dist/events.js.map +1 -0
  190. package/dist/export-format.d.ts +25 -0
  191. package/dist/export-format.d.ts.map +1 -0
  192. package/dist/export-format.js +47 -0
  193. package/dist/export-format.js.map +1 -0
  194. package/dist/export-scale.d.ts +14 -0
  195. package/dist/export-scale.d.ts.map +1 -0
  196. package/dist/export-scale.js +19 -0
  197. package/dist/export-scale.js.map +1 -0
  198. package/dist/fields/appearance.d.ts +9 -0
  199. package/dist/fields/appearance.d.ts.map +1 -0
  200. package/dist/fields/appearance.js +36 -0
  201. package/dist/fields/appearance.js.map +1 -0
  202. package/dist/fields/geometry.d.ts +7 -0
  203. package/dist/fields/geometry.d.ts.map +1 -0
  204. package/dist/fields/geometry.js.map +1 -0
  205. package/dist/fields/index.d.ts +5 -0
  206. package/dist/fields/index.js +5 -0
  207. package/dist/fields/layout.d.ts +10 -0
  208. package/dist/fields/layout.d.ts.map +1 -0
  209. package/dist/fields/layout.js +49 -0
  210. package/dist/fields/layout.js.map +1 -0
  211. package/dist/fields/text.d.ts +11 -0
  212. package/dist/fields/text.d.ts.map +1 -0
  213. package/dist/fields/text.js +64 -0
  214. package/dist/fields/text.js.map +1 -0
  215. package/dist/fig-compression.d.ts +11 -0
  216. package/dist/fig-compression.d.ts.map +1 -0
  217. package/dist/fig-compression.js +15 -0
  218. package/dist/fig-compression.js.map +1 -0
  219. package/dist/figjam/index.d.ts +3 -0
  220. package/dist/figjam/index.js +3 -0
  221. package/dist/figjam/palette.d.ts +270 -0
  222. package/dist/figjam/palette.d.ts.map +1 -0
  223. package/dist/figjam/palette.js +439 -0
  224. package/dist/figjam/palette.js.map +1 -0
  225. package/dist/figjam/text.d.ts +70 -0
  226. package/dist/figjam/text.d.ts.map +1 -0
  227. package/dist/figjam/text.js +95 -0
  228. package/dist/figjam/text.js.map +1 -0
  229. package/dist/font-style.d.ts +46 -0
  230. package/dist/font-style.d.ts.map +1 -0
  231. package/dist/font-style.js +127 -0
  232. package/dist/font-style.js.map +1 -0
  233. package/dist/generated/index.d.ts +44 -0
  234. package/dist/generated/index.d.ts.map +1 -0
  235. package/dist/generated/index.js +58 -0
  236. package/dist/generated/index.js.map +1 -0
  237. package/dist/generated/kind.d.ts +27 -0
  238. package/dist/generated/kind.d.ts.map +1 -0
  239. package/dist/generated/shape-with-text.d.ts +43 -0
  240. package/dist/generated/shape-with-text.d.ts.map +1 -0
  241. package/dist/generated/shape-with-text.js +135 -0
  242. package/dist/generated/shape-with-text.js.map +1 -0
  243. package/dist/generated/sticky.d.ts +128 -0
  244. package/dist/generated/sticky.d.ts.map +1 -0
  245. package/dist/generated/sticky.js +233 -0
  246. package/dist/generated/sticky.js.map +1 -0
  247. package/dist/geometry.d.ts +89 -2
  248. package/dist/geometry.d.ts.map +1 -0
  249. package/dist/geometry.js +306 -2
  250. package/dist/geometry.js.map +1 -0
  251. package/dist/gradient.d.ts +9 -2
  252. package/dist/gradient.d.ts.map +1 -1
  253. package/dist/gradient.js +13 -1
  254. package/dist/gradient.js.map +1 -1
  255. package/dist/graph.d.ts +178 -0
  256. package/dist/graph.d.ts.map +1 -0
  257. package/dist/graph.js +625 -0
  258. package/dist/graph.js.map +1 -0
  259. package/dist/group-bounds.d.ts +42 -0
  260. package/dist/group-bounds.d.ts.map +1 -0
  261. package/dist/{chunks/group-bounds.js → group-bounds.js} +56 -14
  262. package/dist/group-bounds.js.map +1 -0
  263. package/dist/guides.d.ts +21 -2
  264. package/dist/guides.d.ts.map +1 -0
  265. package/dist/guides.js +5 -1
  266. package/dist/guides.js.map +1 -1
  267. package/dist/hit-test.d.ts +48 -2
  268. package/dist/hit-test.d.ts.map +1 -0
  269. package/dist/hit-test.js +75 -57
  270. package/dist/hit-test.js.map +1 -1
  271. package/dist/icons/glyph.d.ts +22 -0
  272. package/dist/icons/glyph.d.ts.map +1 -0
  273. package/dist/{chunks/icons → icons}/glyph.js +2 -40
  274. package/dist/icons/glyph.js.map +1 -0
  275. package/dist/icons/index.d.ts +4 -0
  276. package/dist/icons/index.js +4 -0
  277. package/dist/icons/model.d.ts +29 -0
  278. package/dist/icons/model.d.ts.map +1 -0
  279. package/dist/icons/model.js +51 -0
  280. package/dist/icons/model.js.map +1 -0
  281. package/dist/icons/schema.d.ts +31 -0
  282. package/dist/icons/schema.d.ts.map +1 -0
  283. package/dist/icons/schema.js +28 -0
  284. package/dist/icons/schema.js.map +1 -0
  285. package/dist/ids.d.ts +12 -0
  286. package/dist/ids.d.ts.map +1 -0
  287. package/dist/ids.js +31 -0
  288. package/dist/ids.js.map +1 -0
  289. package/dist/images.d.ts +39 -2
  290. package/dist/images.d.ts.map +1 -0
  291. package/dist/images.js +67 -9
  292. package/dist/images.js.map +1 -1
  293. package/dist/index.d.ts +5 -7
  294. package/dist/index.js +5 -23
  295. package/dist/instances/assignments.js +89 -0
  296. package/dist/instances/assignments.js.map +1 -0
  297. package/dist/instances/content-size.js +60 -0
  298. package/dist/instances/content-size.js.map +1 -0
  299. package/dist/instances/copies.js +161 -0
  300. package/dist/instances/copies.js.map +1 -0
  301. package/dist/instances/cycles.d.ts +20 -0
  302. package/dist/instances/cycles.d.ts.map +1 -0
  303. package/dist/instances/cycles.js +53 -0
  304. package/dist/instances/cycles.js.map +1 -0
  305. package/dist/instances/fields.d.ts +18 -0
  306. package/dist/instances/fields.d.ts.map +1 -0
  307. package/dist/instances/fields.js +90 -0
  308. package/dist/instances/fields.js.map +1 -0
  309. package/dist/instances/index.d.ts +38 -0
  310. package/dist/instances/index.d.ts.map +1 -0
  311. package/dist/instances/index.js +180 -0
  312. package/dist/instances/index.js.map +1 -0
  313. package/dist/instances/kept-overrides.js +204 -0
  314. package/dist/instances/kept-overrides.js.map +1 -0
  315. package/dist/instances/main-component.d.ts +13 -0
  316. package/dist/instances/main-component.d.ts.map +1 -0
  317. package/dist/instances/main-component.js +50 -0
  318. package/dist/instances/main-component.js.map +1 -0
  319. package/dist/instances/overrides.d.ts +51 -0
  320. package/dist/instances/overrides.d.ts.map +1 -0
  321. package/dist/instances/overrides.js +158 -0
  322. package/dist/instances/overrides.js.map +1 -0
  323. package/dist/instances/placement.js +30 -0
  324. package/dist/instances/placement.js.map +1 -0
  325. package/dist/instances/source-walk.js +31 -0
  326. package/dist/instances/source-walk.js.map +1 -0
  327. package/dist/instances/swap.js +288 -0
  328. package/dist/instances/swap.js.map +1 -0
  329. package/dist/instances/sync.js +327 -0
  330. package/dist/instances/sync.js.map +1 -0
  331. package/dist/instances/vector-geometry.js +70 -0
  332. package/dist/instances/vector-geometry.js.map +1 -0
  333. package/dist/layout/aspect-ratio.d.ts +27 -0
  334. package/dist/layout/aspect-ratio.d.ts.map +1 -0
  335. package/dist/layout/aspect-ratio.js +45 -0
  336. package/dist/layout/aspect-ratio.js.map +1 -0
  337. package/dist/layout/guides.d.ts +25 -0
  338. package/dist/layout/guides.d.ts.map +1 -0
  339. package/dist/layout/guides.js +105 -0
  340. package/dist/layout/guides.js.map +1 -0
  341. package/dist/layout/index.d.ts +5 -0
  342. package/dist/{layout.js → layout/index.js} +4 -3
  343. package/dist/layout/keywords.d.ts +26 -0
  344. package/dist/layout/keywords.d.ts.map +1 -0
  345. package/dist/layout/keywords.js +59 -0
  346. package/dist/layout/keywords.js.map +1 -0
  347. package/dist/layout/sizing.d.ts +40 -0
  348. package/dist/layout/sizing.d.ts.map +1 -0
  349. package/dist/layout/sizing.js +122 -0
  350. package/dist/layout/sizing.js.map +1 -0
  351. package/dist/layout/writes.js +55 -0
  352. package/dist/layout/writes.js.map +1 -0
  353. package/dist/matrix.d.ts +16 -2
  354. package/dist/matrix.d.ts.map +1 -0
  355. package/dist/matrix.js +119 -1
  356. package/dist/matrix.js.map +1 -0
  357. package/dist/mutation-impact.d.ts +23 -0
  358. package/dist/mutation-impact.d.ts.map +1 -0
  359. package/dist/mutation-impact.js +67 -0
  360. package/dist/mutation-impact.js.map +1 -0
  361. package/dist/node-defaults.d.ts +22 -2
  362. package/dist/node-defaults.d.ts.map +1 -0
  363. package/dist/node-defaults.js +254 -2
  364. package/dist/node-defaults.js.map +1 -0
  365. package/dist/outline/flatten.d.ts +15 -0
  366. package/dist/outline/flatten.d.ts.map +1 -0
  367. package/dist/outline/flatten.js +189 -0
  368. package/dist/outline/flatten.js.map +1 -0
  369. package/dist/outline/heads.js +34 -0
  370. package/dist/outline/heads.js.map +1 -0
  371. package/dist/outline/hit.d.ts +21 -0
  372. package/dist/outline/hit.d.ts.map +1 -0
  373. package/dist/outline/hit.js +276 -0
  374. package/dist/outline/hit.js.map +1 -0
  375. package/dist/outline/index.d.ts +5 -0
  376. package/dist/outline/index.js +5 -0
  377. package/dist/outline/point.d.ts +16 -0
  378. package/dist/outline/point.d.ts.map +1 -0
  379. package/dist/outline/point.js +42 -0
  380. package/dist/outline/point.js.map +1 -0
  381. package/dist/outline/shapes.d.ts +35 -0
  382. package/dist/outline/shapes.d.ts.map +1 -0
  383. package/dist/outline/shapes.js +181 -0
  384. package/dist/outline/shapes.js.map +1 -0
  385. package/dist/paints/index.d.ts +2 -0
  386. package/dist/paints/index.js +2 -0
  387. package/dist/paints/schema.d.ts +77 -0
  388. package/dist/paints/schema.d.ts.map +1 -0
  389. package/dist/paints/schema.js +56 -0
  390. package/dist/paints/schema.js.map +1 -0
  391. package/dist/parse-path.d.ts +9 -1
  392. package/dist/parse-path.d.ts.map +1 -1
  393. package/dist/parse-path.js +39 -2
  394. package/dist/parse-path.js.map +1 -1
  395. package/dist/plugin-data/field.d.ts +47 -0
  396. package/dist/plugin-data/field.d.ts.map +1 -0
  397. package/dist/plugin-data/field.js +73 -0
  398. package/dist/plugin-data/field.js.map +1 -0
  399. package/dist/plugin-data/fields.d.ts +143 -0
  400. package/dist/plugin-data/fields.d.ts.map +1 -0
  401. package/dist/plugin-data/fields.js +168 -0
  402. package/dist/plugin-data/fields.js.map +1 -0
  403. package/dist/plugin-data/index.d.ts +3 -0
  404. package/dist/plugin-data/index.js +3 -0
  405. package/dist/polygon.d.ts +4 -2
  406. package/dist/polygon.d.ts.map +1 -1
  407. package/dist/polygon.js +17 -2
  408. package/dist/polygon.js.map +1 -1
  409. package/dist/preview.d.ts +12 -2
  410. package/dist/preview.d.ts.map +1 -0
  411. package/dist/preview.js +62 -1
  412. package/dist/preview.js.map +1 -0
  413. package/dist/{primitives2.d.ts → primitives/index.d.ts} +4 -3
  414. package/dist/primitives/index.d.ts.map +1 -0
  415. package/dist/primitives/index.js +2 -0
  416. package/dist/primitives/schema.d.ts +18 -0
  417. package/dist/primitives/schema.d.ts.map +1 -0
  418. package/dist/primitives/schema.js +19 -0
  419. package/dist/primitives/schema.js.map +1 -0
  420. package/dist/random.js +24 -1
  421. package/dist/random.js.map +1 -0
  422. package/dist/resize.d.ts +6 -4
  423. package/dist/resize.d.ts.map +1 -1
  424. package/dist/resize.js +287 -2
  425. package/dist/resize.js.map +1 -0
  426. package/dist/scaling/index.d.ts +3 -0
  427. package/dist/scaling/index.js +3 -0
  428. package/dist/scaling/node.d.ts +6 -0
  429. package/dist/scaling/node.d.ts.map +1 -0
  430. package/dist/scaling/node.js +148 -0
  431. package/dist/scaling/node.js.map +1 -0
  432. package/dist/scaling/tree.d.ts +7 -0
  433. package/dist/scaling/tree.d.ts.map +1 -0
  434. package/dist/scaling/tree.js +47 -0
  435. package/dist/scaling/tree.js.map +1 -0
  436. package/dist/shaders/index.d.ts +4 -0
  437. package/dist/shaders/index.js +4 -0
  438. package/dist/shaders/model.d.ts +41 -0
  439. package/dist/shaders/model.d.ts.map +1 -0
  440. package/dist/shaders/model.js +71 -0
  441. package/dist/shaders/model.js.map +1 -0
  442. package/dist/shaders/schema.d.ts +41 -0
  443. package/dist/shaders/schema.d.ts.map +1 -0
  444. package/dist/shaders/schema.js +36 -0
  445. package/dist/shaders/schema.js.map +1 -0
  446. package/dist/shaders/still.d.ts +18 -0
  447. package/dist/shaders/still.d.ts.map +1 -0
  448. package/dist/shaders/still.js +36 -0
  449. package/dist/shaders/still.js.map +1 -0
  450. package/dist/shape-with-text/fit.d.ts +28 -0
  451. package/dist/shape-with-text/fit.d.ts.map +1 -0
  452. package/dist/shape-with-text/fit.js +271 -0
  453. package/dist/shape-with-text/fit.js.map +1 -0
  454. package/dist/shape-with-text/geometry.d.ts +20 -0
  455. package/dist/shape-with-text/geometry.d.ts.map +1 -0
  456. package/dist/shape-with-text/geometry.js +539 -0
  457. package/dist/shape-with-text/geometry.js.map +1 -0
  458. package/dist/shape-with-text/index.d.ts +4 -0
  459. package/dist/shape-with-text/index.js +4 -0
  460. package/dist/shape-with-text/kinds.d.ts +20 -0
  461. package/dist/shape-with-text/kinds.d.ts.map +1 -0
  462. package/dist/shape-with-text/kinds.js +86 -0
  463. package/dist/shape-with-text/kinds.js.map +1 -0
  464. package/dist/shared-styles.d.ts +51 -0
  465. package/dist/shared-styles.d.ts.map +1 -0
  466. package/dist/shared-styles.js +186 -0
  467. package/dist/shared-styles.js.map +1 -0
  468. package/dist/slots/authoring.d.ts +27 -0
  469. package/dist/slots/authoring.d.ts.map +1 -0
  470. package/dist/slots/authoring.js +77 -0
  471. package/dist/slots/authoring.js.map +1 -0
  472. package/dist/slots/content.d.ts +41 -0
  473. package/dist/slots/content.d.ts.map +1 -0
  474. package/dist/slots/content.js +105 -0
  475. package/dist/slots/content.js.map +1 -0
  476. package/dist/slots/frames.d.ts +40 -0
  477. package/dist/slots/frames.d.ts.map +1 -0
  478. package/dist/slots/frames.js +118 -0
  479. package/dist/slots/frames.js.map +1 -0
  480. package/dist/slots/index.d.ts +5 -0
  481. package/dist/slots/index.js +5 -0
  482. package/dist/slots/limits.d.ts +14 -0
  483. package/dist/slots/limits.d.ts.map +1 -0
  484. package/dist/slots/limits.js +28 -0
  485. package/dist/slots/limits.js.map +1 -0
  486. package/dist/snap.d.ts +21 -2
  487. package/dist/snap.d.ts.map +1 -0
  488. package/dist/snap.js +109 -1
  489. package/dist/snap.js.map +1 -0
  490. package/dist/source-metadata.js +10 -1
  491. package/dist/source-metadata.js.map +1 -0
  492. package/dist/statuses/impact.d.ts +18 -0
  493. package/dist/statuses/impact.d.ts.map +1 -0
  494. package/dist/statuses/impact.js +33 -0
  495. package/dist/statuses/impact.js.map +1 -0
  496. package/dist/statuses/index.d.ts +5 -0
  497. package/dist/statuses/index.js +5 -0
  498. package/dist/statuses/node.d.ts +22 -0
  499. package/dist/statuses/node.d.ts.map +1 -0
  500. package/dist/statuses/node.js +47 -0
  501. package/dist/statuses/node.js.map +1 -0
  502. package/dist/statuses/schema.d.ts +59 -0
  503. package/dist/statuses/schema.d.ts.map +1 -0
  504. package/dist/statuses/schema.js +27 -0
  505. package/dist/statuses/schema.js.map +1 -0
  506. package/dist/statuses/workflow.d.ts +120 -0
  507. package/dist/statuses/workflow.d.ts.map +1 -0
  508. package/dist/statuses/workflow.js +135 -0
  509. package/dist/statuses/workflow.js.map +1 -0
  510. package/dist/{text-direction.d.ts → text/direction.d.ts} +2 -2
  511. package/dist/text/direction.d.ts.map +1 -0
  512. package/dist/{text-direction.js → text/direction.js} +1 -1
  513. package/dist/text/direction.js.map +1 -0
  514. package/dist/text/index.d.ts +7 -0
  515. package/dist/text/index.js +7 -0
  516. package/dist/text/lengths.d.ts +24 -0
  517. package/dist/text/lengths.d.ts.map +1 -0
  518. package/dist/text/lengths.js +49 -0
  519. package/dist/text/lengths.js.map +1 -0
  520. package/dist/text/lists.d.ts +44 -0
  521. package/dist/text/lists.d.ts.map +1 -0
  522. package/dist/text/lists.js +100 -0
  523. package/dist/text/lists.js.map +1 -0
  524. package/dist/text/overflow.d.ts +11 -0
  525. package/dist/text/overflow.d.ts.map +1 -0
  526. package/dist/text/overflow.js +13 -0
  527. package/dist/text/overflow.js.map +1 -0
  528. package/dist/text/paragraphs.d.ts +62 -0
  529. package/dist/text/paragraphs.d.ts.map +1 -0
  530. package/dist/text/paragraphs.js +166 -0
  531. package/dist/text/paragraphs.js.map +1 -0
  532. package/dist/{text-picture.d.ts → text/picture.d.ts} +3 -4
  533. package/dist/text/picture.d.ts.map +1 -0
  534. package/dist/text/picture.js +38 -0
  535. package/dist/text/picture.js.map +1 -0
  536. package/dist/text/references.d.ts +21 -0
  537. package/dist/text/references.d.ts.map +1 -0
  538. package/dist/text/references.js +43 -0
  539. package/dist/text/references.js.map +1 -0
  540. package/dist/text/schema.d.ts +10 -0
  541. package/dist/text/schema.d.ts.map +1 -0
  542. package/dist/text/schema.js +11 -0
  543. package/dist/text/schema.js.map +1 -0
  544. package/dist/transfer/apply.d.ts +9 -0
  545. package/dist/transfer/apply.d.ts.map +1 -0
  546. package/dist/transfer/apply.js +65 -0
  547. package/dist/transfer/apply.js.map +1 -0
  548. package/dist/transfer/copied.d.ts +14 -0
  549. package/dist/transfer/copied.d.ts.map +1 -0
  550. package/dist/transfer/copied.js +52 -0
  551. package/dist/transfer/copied.js.map +1 -0
  552. package/dist/transfer/history.d.ts +8 -0
  553. package/dist/transfer/history.d.ts.map +1 -0
  554. package/dist/transfer/history.js +32 -0
  555. package/dist/transfer/history.js.map +1 -0
  556. package/dist/transfer/identity.js +12 -0
  557. package/dist/transfer/identity.js.map +1 -0
  558. package/dist/transfer/index.d.ts +8 -0
  559. package/dist/transfer/index.js +8 -0
  560. package/dist/transfer/nodes.d.ts +14 -0
  561. package/dist/transfer/nodes.d.ts.map +1 -0
  562. package/dist/transfer/nodes.js +78 -0
  563. package/dist/transfer/nodes.js.map +1 -0
  564. package/dist/transfer/plan.d.ts +29 -0
  565. package/dist/transfer/plan.d.ts.map +1 -0
  566. package/dist/transfer/plan.js +106 -0
  567. package/dist/transfer/plan.js.map +1 -0
  568. package/dist/transfer/references.js +10 -0
  569. package/dist/transfer/references.js.map +1 -0
  570. package/dist/transfer/remove.d.ts +8 -0
  571. package/dist/transfer/remove.d.ts.map +1 -0
  572. package/dist/transfer/remove.js +34 -0
  573. package/dist/transfer/remove.js.map +1 -0
  574. package/dist/transfer/validation.js +39 -0
  575. package/dist/transfer/validation.js.map +1 -0
  576. package/dist/transfer/variables.d.ts +15 -0
  577. package/dist/transfer/variables.d.ts.map +1 -0
  578. package/dist/transfer/variables.js +52 -0
  579. package/dist/transfer/variables.js.map +1 -0
  580. package/dist/types.d.ts +195 -2007
  581. package/dist/types.d.ts.map +1 -1
  582. package/dist/types.js +89 -2
  583. package/dist/types.js.map +1 -0
  584. package/dist/undo.d.ts +93 -2
  585. package/dist/undo.d.ts.map +1 -0
  586. package/dist/undo.js +235 -1
  587. package/dist/undo.js.map +1 -0
  588. package/dist/variables/bindings.d.ts +83 -0
  589. package/dist/variables/bindings.d.ts.map +1 -0
  590. package/dist/variables/bindings.js +314 -0
  591. package/dist/variables/bindings.js.map +1 -0
  592. package/dist/variables/corners.d.ts +12 -0
  593. package/dist/variables/corners.d.ts.map +1 -0
  594. package/dist/variables/corners.js +38 -0
  595. package/dist/variables/corners.js.map +1 -0
  596. package/dist/variables/fields.d.ts +43 -0
  597. package/dist/variables/fields.d.ts.map +1 -0
  598. package/dist/variables/fields.js +104 -0
  599. package/dist/variables/fields.js.map +1 -0
  600. package/dist/variables/formula/check.d.ts +14 -0
  601. package/dist/variables/formula/check.d.ts.map +1 -0
  602. package/dist/variables/formula/check.js +73 -0
  603. package/dist/variables/formula/check.js.map +1 -0
  604. package/dist/variables/formula/evaluate.d.ts +7 -0
  605. package/dist/variables/formula/evaluate.d.ts.map +1 -0
  606. package/dist/variables/formula/evaluate.js +30 -0
  607. package/dist/variables/formula/evaluate.js.map +1 -0
  608. package/dist/variables/formula/index.d.ts +21 -0
  609. package/dist/variables/formula/index.d.ts.map +1 -0
  610. package/dist/variables/formula/index.js +77 -0
  611. package/dist/variables/formula/index.js.map +1 -0
  612. package/dist/variables/formula/parse.js +141 -0
  613. package/dist/variables/formula/parse.js.map +1 -0
  614. package/dist/variables/formula/print.d.ts +25 -0
  615. package/dist/variables/formula/print.d.ts.map +1 -0
  616. package/dist/variables/formula/print.js +105 -0
  617. package/dist/variables/formula/print.js.map +1 -0
  618. package/dist/variables/formula/schema.d.ts +7 -0
  619. package/dist/variables/formula/schema.d.ts.map +1 -0
  620. package/dist/variables/formula/schema.js +62 -0
  621. package/dist/variables/formula/schema.js.map +1 -0
  622. package/dist/variables/formula/signatures.d.ts +9 -0
  623. package/dist/variables/formula/signatures.d.ts.map +1 -0
  624. package/dist/variables/formula/signatures.js +238 -0
  625. package/dist/variables/formula/signatures.js.map +1 -0
  626. package/dist/variables/formula/tokens.d.ts +26 -0
  627. package/dist/variables/formula/tokens.d.ts.map +1 -0
  628. package/dist/variables/formula/tokens.js +82 -0
  629. package/dist/variables/formula/tokens.js.map +1 -0
  630. package/dist/variables/formula/tree.d.ts +22 -0
  631. package/dist/variables/formula/tree.d.ts.map +1 -0
  632. package/dist/variables/formula/tree.js +35 -0
  633. package/dist/variables/formula/tree.js.map +1 -0
  634. package/dist/variables/index.d.ts +41 -0
  635. package/dist/variables/index.d.ts.map +1 -0
  636. package/dist/variables/index.js +238 -0
  637. package/dist/variables/index.js.map +1 -0
  638. package/dist/variables/resolution.d.ts +39 -0
  639. package/dist/variables/resolution.d.ts.map +1 -0
  640. package/dist/variables/resolution.js +154 -0
  641. package/dist/variables/resolution.js.map +1 -0
  642. package/dist/variables/schema.d.ts +40 -0
  643. package/dist/variables/schema.d.ts.map +1 -0
  644. package/dist/variables/schema.js +32 -0
  645. package/dist/variables/schema.js.map +1 -0
  646. package/dist/variables/text.d.ts +16 -0
  647. package/dist/variables/text.d.ts.map +1 -0
  648. package/dist/variables/text.js +49 -0
  649. package/dist/variables/text.js.map +1 -0
  650. package/dist/variables/token.d.ts +18 -0
  651. package/dist/variables/token.d.ts.map +1 -0
  652. package/dist/variables/token.js +39 -0
  653. package/dist/variables/token.js.map +1 -0
  654. package/dist/variables/units.js +19 -0
  655. package/dist/variables/units.js.map +1 -0
  656. package/dist/variables/value.d.ts +12 -0
  657. package/dist/variables/value.d.ts.map +1 -0
  658. package/dist/variables/value.js +70 -0
  659. package/dist/variables/value.js.map +1 -0
  660. package/dist/vector-network.d.ts +65 -2
  661. package/dist/vector-network.d.ts.map +1 -0
  662. package/dist/vector-network.js +375 -2
  663. package/dist/vector-network.js.map +1 -0
  664. package/package.json +303 -137
  665. package/src/arrow-caps.ts +279 -62
  666. package/src/behaviours/index.ts +5 -0
  667. package/src/behaviours/kinds.ts +51 -34
  668. package/src/behaviours/layers.ts +5 -3
  669. package/src/behaviours/model.ts +25 -22
  670. package/src/behaviours/schema.ts +64 -13
  671. package/src/behaviours/spec.ts +11 -50
  672. package/src/bindings.ts +11 -2
  673. package/src/checkpoint.ts +252 -5
  674. package/src/clipping.ts +112 -0
  675. package/src/color/index.ts +1 -0
  676. package/src/color/schema.ts +10 -0
  677. package/src/comments/document.ts +1 -1
  678. package/src/comments/index.ts +5 -0
  679. package/src/comments/schema.ts +51 -0
  680. package/src/comments/threads.ts +1 -1
  681. package/src/components/exposure.ts +1 -1
  682. package/src/components/index.ts +8 -0
  683. package/src/components/properties.ts +94 -4
  684. package/src/components/variants.ts +52 -31
  685. package/src/connectors/controls.ts +229 -0
  686. package/src/connectors/create.ts +48 -0
  687. package/src/connectors/elbow.ts +235 -0
  688. package/src/connectors/gaps.ts +72 -0
  689. package/src/connectors/hit.ts +49 -0
  690. package/src/connectors/index.ts +28 -0
  691. package/src/connectors/label.ts +238 -0
  692. package/src/connectors/layout.ts +280 -0
  693. package/src/connectors/pieces.ts +141 -0
  694. package/src/connectors/route.ts +148 -0
  695. package/src/connectors/sides.ts +94 -0
  696. package/src/connectors/sublayers.ts +203 -0
  697. package/src/coordinate.ts +10 -3
  698. package/src/copy.ts +71 -31
  699. package/src/css/blend.ts +27 -0
  700. package/src/css/index.ts +2 -0
  701. package/src/css/text.ts +84 -0
  702. package/src/cubic.ts +14 -0
  703. package/src/export-format.ts +30 -1
  704. package/src/fields/appearance.ts +35 -0
  705. package/src/fields/index.ts +4 -0
  706. package/src/fields/layout.ts +48 -0
  707. package/src/fields/text.ts +32 -1
  708. package/src/fig-compression.ts +9 -0
  709. package/src/figjam/index.ts +2 -0
  710. package/src/figjam/palette.ts +473 -0
  711. package/src/figjam/text.ts +83 -0
  712. package/src/font-style.ts +58 -14
  713. package/src/generated/index.ts +76 -0
  714. package/src/generated/kind.ts +24 -0
  715. package/src/generated/shape-with-text.ts +157 -0
  716. package/src/generated/sticky.ts +213 -0
  717. package/src/geometry.ts +102 -312
  718. package/src/gradient.ts +14 -0
  719. package/src/graph.ts +849 -0
  720. package/src/group-bounds.ts +59 -12
  721. package/src/guides.ts +6 -1
  722. package/src/hit-test.ts +118 -74
  723. package/src/icons/index.ts +3 -0
  724. package/src/icons/model.ts +9 -0
  725. package/src/icons/schema.ts +19 -3
  726. package/src/ids.ts +34 -0
  727. package/src/images.ts +71 -8
  728. package/src/index.ts +2 -976
  729. package/src/instances/assignments.ts +116 -0
  730. package/src/instances/content-size.ts +23 -2
  731. package/src/instances/copies.ts +7 -10
  732. package/src/instances/cycles.ts +1 -1
  733. package/src/instances/fields.ts +47 -92
  734. package/src/{instances.ts → instances/index.ts} +69 -44
  735. package/src/instances/kept-overrides.ts +280 -0
  736. package/src/instances/main-component.ts +55 -1
  737. package/src/{instance-overrides.ts → instances/overrides.ts} +58 -2
  738. package/src/instances/placement.ts +1 -1
  739. package/src/instances/source-walk.ts +3 -9
  740. package/src/instances/swap.ts +451 -0
  741. package/src/instances/sync.ts +166 -177
  742. package/src/instances/vector-geometry.ts +3 -3
  743. package/src/layout/aspect-ratio.ts +1 -1
  744. package/src/layout/sizing.ts +1 -1
  745. package/src/layout/writes.ts +59 -0
  746. package/src/matrix.ts +1 -1
  747. package/src/mutation-impact.ts +1 -1
  748. package/src/node-defaults.ts +43 -3
  749. package/src/outline/flatten.ts +190 -0
  750. package/src/outline/heads.ts +52 -0
  751. package/src/outline/hit.ts +369 -0
  752. package/src/outline/index.ts +4 -0
  753. package/src/outline/point.ts +59 -0
  754. package/src/outline/shapes.ts +207 -0
  755. package/src/paints/index.ts +1 -0
  756. package/src/paints/schema.ts +67 -0
  757. package/src/parse-path.ts +49 -4
  758. package/src/plugin-data/fields.ts +69 -77
  759. package/src/plugin-data/index.ts +2 -0
  760. package/src/polygon.ts +17 -0
  761. package/src/preview.ts +1 -1
  762. package/src/{primitives.ts → primitives/index.ts} +2 -0
  763. package/src/primitives/schema.ts +14 -0
  764. package/src/resize.ts +32 -6
  765. package/src/scaling/node.ts +10 -6
  766. package/src/scaling/tree.ts +2 -1
  767. package/src/shaders/index.ts +3 -0
  768. package/src/shaders/schema.ts +3 -3
  769. package/src/shape-with-text/fit.ts +154 -0
  770. package/src/shape-with-text/geometry.ts +496 -0
  771. package/src/shape-with-text/index.ts +10 -0
  772. package/src/shape-with-text/kinds.ts +86 -0
  773. package/src/shared-styles.ts +169 -17
  774. package/src/slots/authoring.ts +1 -1
  775. package/src/slots/content.ts +10 -5
  776. package/src/slots/frames.ts +12 -10
  777. package/src/slots/index.ts +4 -0
  778. package/src/slots/limits.ts +1 -1
  779. package/src/snap.ts +3 -1
  780. package/src/statuses/impact.ts +38 -0
  781. package/src/statuses/index.ts +4 -0
  782. package/src/statuses/node.ts +63 -0
  783. package/src/statuses/schema.ts +39 -0
  784. package/src/statuses/workflow.ts +121 -0
  785. package/src/text/index.ts +3 -0
  786. package/src/text/lengths.ts +44 -0
  787. package/src/text/overflow.ts +12 -0
  788. package/src/text/picture.ts +0 -4
  789. package/src/text/schema.ts +7 -0
  790. package/src/transfer/apply.ts +1 -1
  791. package/src/transfer/copied.ts +72 -0
  792. package/src/transfer/history.ts +1 -1
  793. package/src/transfer/index.ts +1 -0
  794. package/src/transfer/nodes.ts +18 -19
  795. package/src/transfer/plan.ts +1 -1
  796. package/src/transfer/remove.ts +1 -1
  797. package/src/transfer/validation.ts +1 -1
  798. package/src/transfer/variables.ts +7 -6
  799. package/src/types.ts +246 -13
  800. package/src/undo.ts +64 -2
  801. package/src/variables/bindings.ts +166 -66
  802. package/src/variables/corners.ts +39 -0
  803. package/src/variables/fields.ts +83 -0
  804. package/src/variables/formula/check.ts +99 -0
  805. package/src/variables/formula/evaluate.ts +33 -0
  806. package/src/variables/formula/index.ts +129 -0
  807. package/src/variables/formula/parse.ts +160 -0
  808. package/src/variables/formula/print.ts +167 -0
  809. package/src/variables/formula/schema.ts +77 -0
  810. package/src/variables/formula/signatures.ts +266 -0
  811. package/src/variables/formula/tokens.ts +114 -0
  812. package/src/variables/formula/tree.ts +53 -0
  813. package/src/{variables.ts → variables/index.ts} +86 -146
  814. package/src/variables/resolution.ts +293 -0
  815. package/src/variables/schema.ts +31 -0
  816. package/src/variables/text.ts +51 -0
  817. package/src/variables/token.ts +27 -1
  818. package/src/variables/value.ts +92 -0
  819. package/src/vector-network.ts +263 -22
  820. package/dist/chunks/asset-keys.js.map +0 -1
  821. package/dist/chunks/behaviours/kinds.js.map +0 -1
  822. package/dist/chunks/behaviours/layers.js +0 -611
  823. package/dist/chunks/behaviours/layers.js.map +0 -1
  824. package/dist/chunks/behaviours/spec.js.map +0 -1
  825. package/dist/chunks/bindings.js +0 -18
  826. package/dist/chunks/bindings.js.map +0 -1
  827. package/dist/chunks/buffered-events.js.map +0 -1
  828. package/dist/chunks/checkpoint.js +0 -78
  829. package/dist/chunks/checkpoint.js.map +0 -1
  830. package/dist/chunks/color/contrast.js.map +0 -1
  831. package/dist/chunks/color/index.js +0 -1662
  832. package/dist/chunks/color/index.js.map +0 -1
  833. package/dist/chunks/comments/document.js.map +0 -1
  834. package/dist/chunks/comments/list.js.map +0 -1
  835. package/dist/chunks/comments/merge.js.map +0 -1
  836. package/dist/chunks/components/exposure.js +0 -2291
  837. package/dist/chunks/components/exposure.js.map +0 -1
  838. package/dist/chunks/components/variants.js +0 -32
  839. package/dist/chunks/components/variants.js.map +0 -1
  840. package/dist/chunks/coordinate.js +0 -385
  841. package/dist/chunks/coordinate.js.map +0 -1
  842. package/dist/chunks/css/grid.js.map +0 -1
  843. package/dist/chunks/css/index.js +0 -160
  844. package/dist/chunks/css/index.js.map +0 -1
  845. package/dist/chunks/events.js.map +0 -1
  846. package/dist/chunks/fields/geometry.js.map +0 -1
  847. package/dist/chunks/font-style.js +0 -96
  848. package/dist/chunks/font-style.js.map +0 -1
  849. package/dist/chunks/group-bounds.js.map +0 -1
  850. package/dist/chunks/icons/glyph.js.map +0 -1
  851. package/dist/chunks/index.js +0 -2430
  852. package/dist/chunks/index.js.map +0 -1
  853. package/dist/color.d.ts +0 -78
  854. package/dist/color.d.ts.map +0 -1
  855. package/dist/color.js +0 -3
  856. package/dist/constants2.d.ts +0 -11
  857. package/dist/constants2.d.ts.map +0 -1
  858. package/dist/css.d.ts +0 -39
  859. package/dist/css.d.ts.map +0 -1
  860. package/dist/css.js +0 -3
  861. package/dist/images2.d.ts +0 -16
  862. package/dist/images2.d.ts.map +0 -1
  863. package/dist/instances.d.ts +0 -2
  864. package/dist/instances.js +0 -2
  865. package/dist/layout.d.ts +0 -2
  866. package/dist/matrix2.d.ts +0 -16
  867. package/dist/matrix2.d.ts.map +0 -1
  868. package/dist/primitives.d.ts +0 -2
  869. package/dist/primitives.js +0 -0
  870. package/dist/primitives2.d.ts.map +0 -1
  871. package/dist/text-direction.d.ts.map +0 -1
  872. package/dist/text-direction.js.map +0 -1
  873. package/dist/text-picture.d.ts.map +0 -1
  874. package/dist/text-picture.js +0 -2
  875. package/dist/text.d.ts +0 -2
  876. package/dist/text.js +0 -3
  877. package/dist/types2.d.ts +0 -2
  878. package/dist/undo2.d.ts +0 -73
  879. package/dist/undo2.d.ts.map +0 -1
  880. package/dist/variables.d.ts +0 -2
  881. package/dist/variables.js +0 -2
  882. /package/dist/{chunks/asset-keys.js → asset-keys.js} +0 -0
  883. /package/dist/{chunks/buffered-events.js → buffered-events.js} +0 -0
  884. /package/dist/{chunks/events.js → events.js} +0 -0
  885. /package/dist/{chunks/fields → fields}/geometry.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../src/export-format.ts","../src/mutation-impact.ts","../src/variables.ts","../src/variables/fields.ts","../src/variables/bindings.ts","../src/variables/token.ts","../src/plugin-data/field.ts","../src/color/okhcl.ts","../src/plugin-data/fields.ts","../src/scaling/node.ts","../src/scaling/tree.ts","../src/fields/geometry.ts","../src/fields/text.ts","../src/transfer/plan.ts","../src/transfer/apply.ts","../src/transfer/remove.ts","../src/transfer/history.ts","../src/transfer/variables.ts","../src/transfer/nodes.ts","../src/instance-overrides.ts","../src/asset-keys.ts","../src/components/properties.ts","../src/components/variants.ts","../src/slots/frames.ts","../src/instances/main-component.ts","../src/instances/cycles.ts","../src/components/exposure.ts","../src/slots/content.ts","../src/slots/authoring.ts","../src/slots/limits.ts","../src/behaviours/kinds.ts","../src/icons/schema.ts","../src/icons/model.ts","../src/icons/glyph.ts","../src/shaders/schema.ts","../src/shaders/model.ts","../src/shaders/still.ts","../src/behaviours/layers.ts","../src/behaviours/schema.ts","../src/behaviours/model.ts","../src/behaviours/spec.ts","../src/comments/document.ts","../src/comments/list.ts","../src/comments/merge.ts","../src/comments/threads.ts","../src/copy.ts","../src/node-defaults.ts","../src/instances/fields.ts","../src/instances.ts","../src/snap.ts","../src/export-scale.ts","../src/coordinate.ts","../src/layout/aspect-ratio.ts","../src/layout/guides.ts","../src/layout/keywords.ts","../src/layout/sizing.ts","../src/text/paragraphs.ts","../src/text/lists.ts","../src/text/references.ts","../src/group-bounds.ts","../src/geometry.ts","../src/font-style.ts","../src/shared-styles.ts","../src/buffered-events.ts","../src/hit-test.ts","../src/preview.ts","../src/vector-network.ts","../src/checkpoint.ts","../src/index.ts","../src/guides.ts","../src/types.ts"],"mappings":";;;;;;;;;;cAKa;KAED,yBAAyB;iBAErB,iBAAiB,iBAAiB,SAAS;;;UCL1C;EACf,gBAAgB;EAChB,mBAAmB;EACnB,kBAAkB;EAClB,gBAAgB;EAChB,gBAAgB;;iBAGF,6BAA6B;KAUjC,0BAA0B,QAAQ;UAE7B,uBAAuB;EACtC,QAAQ;EACR,QAAQ;;;iBAIM,qBACd,OAAO,YACP,QAAQ,qBACR;;iBAoCoB,qBAAqB,GACzC,OAAO,YACP,iBAAiB,IAAI,QAAQ,KAC5B,QAAQ,uBAAuB;iBAUlB,uBAAuB,QAAQ;;;iBC5D/B,YAAY,OAAO,YAAY,UAAU;iBAQzC,eAAe,OAAO,YAAY;iBA4BlC,cAAc,OAAO,YAAY,YAAY;iBAe7C,eACd,OAAO,YACP,0BACA,cACA,MAAM,cACN,sBACA,QAAQ,gBACP;iBAsBa,iBACd,OAAO,YACP,0BACA,eACC;iBAca,iBAAiB,OAAO,YAAY;iBAWpC,gBAAgB,OAAO,YAAY;;;;;KAWvC;iBAEI,sBACd,OAAO,YACP,gBACA,sBACA,WAAU;iBAaI,cAAc,OAAO,YAAY,sBAAsB;iBAIvD,QACd,OAAO,YACP,sBACA,gBACA,cACA;;iBAgBc,WACd,OAAO,YACP,0BACA,sBACA,cACA;iBAQc,WAAW,OAAO,YAAY,sBAAsB;iBAgBpD,WACd,OAAO,YACP,sBACA,gBACA;iBAQc,eAAe,OAAO,YAAY,sBAAsB;;iBASxD,kBAAkB,YAAY,qBAAqB;iBAKnD,gBACd,OAAO,YACP,oBACA,iBACA,UAAU,cACT;iBA0Ba,qBAAqB,OAAO,YAAY,qBAAqB;iBAM7D,sBAAsB,OAAO,YAAY;iBAKzC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;KACA;KACA;;KAEA;;;KAIA;UAEK;EACf,UAAU;;EAEV;;EAEA;EACA;EACA;;UAGe;EACf;EACA;;UAGe;EACf;EACA;;;UAIe;EACf;EACA;;;cAIW;KAWD,4BAA4B;;KAG5B,qBAAqB,QAAQ,OAAO;UAE/B;EACf;EACA;EACA,iBAAiB;EACjB,sBAAsB;EACtB;EACA,sBAAsB;EACtB;EACA;EACA;EACA;EACA;EACA;EACA,QAAQ;EACR,iBAAiB;EACjB,eAAe;EACf;EACA,WAAW;;EAEX,YAAY;;EAEZ;;EAEA;;EAEA,iBAAiB;;UAGF;EACf;EACA;EACA,OAAO;;UAGQ;EACf;EACA;EACA;;KAGU;;KAEA;;KAEA;KAEA;UAEK;EACf,QAAQ;EACR;;UAGe;EACf;EACA;EACA;EACA;;KAEU;KACA;KACA;KACA;UAEK;EACf;EACA;EACA;;UAGe;EACf;EACA,QAAQ;;UAGO;EACf;EACA;EACA;EACA;;;;;;;UAQe;EACf,SAAS;EACT,gBAAgB;EAChB;EACA;;UAGe;;EAEf;EACA,cAAc;EACd;EACA;EACA;;EAEA;;;;;EAKA;;;;;;;EAOA;EACA;;UAGe;EACf;EACA;EACA;;UAGe;EACf;EACA;;KAGU,sBAAsB,QAChC,oOAaE,qMAWA;UAGa;EACf;EACA;EACA;;UAGe;EACf,UAAU;EACV;EACA;;UAGe;EACf;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;;EAEA,cAAc;;EAEd;EACA;EACA;;;UAIe;EACf;EACA;;EAEA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;EACA;;EAEA,cAAc;;EAEd;EACA;;EAEA;EACA;EACA;;EAEA;EACA,SAAS;;UAGM;EACf;EACA,MAAM;EACN;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA,QAAQ;;EAER,eAAe,QAAQ;EAEvB,OAAO;EACP,SAAS;EACT,SAAS;EACT,aAAa;EACb,QAAQ;EACR;EACA;EACA;EACA;EACA;EAC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ACf;EACA;EACA;EACA;;EAEA;;;;;;UAOe;EACf;EACA;EACA,MAAM;EACN;EACA;EACA;EACA;EACA,eAAe;;KAGL;KACA,gBAAgB;EAAsC;;KACtD,kBAAkB;;cAGjB;KAyBD,wBAAwB;cAEvB;KACD,6BAA6B;;;;;cAM5B;KACD,oBAAoB;;UAGf;EACf;EACA;;UAGe;EACf;EACA;EACA,MAAM;EACN;EACA,cAAc,eAAe;EAC7B;EACA;;EAEA,SAAS;;;;;EAKT,aAAa,QAAQ,OAAO;;EAE5B,OAAO;;EAEP,cAAc,eAAe;EAC7B,aAAa;;EAEb;;EAEA;;;KAIU,yBACT,WAAW,cAAc,UAAU,oBAAoB,mBAClD;UAES;EACf;EACA;;;;;EAKA;;EAEA;;UAGe;EACf;EACA;;EAEA,OAAO;EACP;EACA;;;;;EAKA;EACA,aAAa;;;;;EAKb;;EAEA;;;iBAIc,oBAAoB,YAAY,KAAK;;cAKxC,wBAAsB;iBAEnB,oBAAoB"}
1
+ {"version":3,"file":"types.d.ts","names":[],"sources":["../src/types.ts"],"mappings":";;;;;;UAQiB;EACf,iBAAiB,MAAM;EACvB,iBAAiB,YAAY,SAAS,QAAQ;EAC9C,wBAAwB,YAAY,SAAS,QAAQ;EACrD,iBAAiB,YAAY;EAC7B,oBAAoB,gBAAgB,4BAA4B;EAChE,mBACE,gBACA,kBACA,eACA;;KAIQ,0BAA0B;EACpC,UAAU,MAAM;EAChB,UAAU,YAAY,SAAS,QAAQ;EACvC,iBAAiB,YAAY,SAAS,QAAQ;EAC9C,UAAU,YAAY;EACtB,aAAa,gBAAgB,4BAA4B;EACzD,YACE,gBACA,kBACA,eACA;;;UAKa;;EAEf,SAAS,MAAM;;EAEf,UAAU,MAAM;;KAGN;;KAGA;UAEK;EACf,SAAS;EACT,cAAc;EACd,eAAe;EACf,QAAQ;EACR;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA,KAAK;;KAGK;KACA;UAEK;EACf;EACA;EACA;EACA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f;EACA,WAAW;;EAEX,YAAY;;EAEZ;;EAEA;;EAEA,iBAAiB;;UAGF;EACf;EACA;EACA,OAAO;;UAGQ;EACf;EACA;EACA;;KAGU;;KAEA;;KAEA;KAEA;UAEK;EACf,QAAQ;EACR;;UAGe;EACf;EACA;EACA;EACA;;KAEU;KACA;KACA;KACA;UAEK;EACf;EACA;EACA;;;UAIe;EACf;EACA;;;KAIU;;;;;UAMK;EACf;EACA,QAAQ;;EAER;;EAEA,OAAO;;EAEP;;EAEA;EACA,eAAe;;EAEf;;EAEA;;EAEA;;UAGe;EACf;EACA;EACA;EACA;;;;;;;UAQe;EACf,SAAS;EACT,gBAAgB;;EAEhB;EACA;;EAEA;;UAGe;;EAEf;EACA,cAAc;EACd;EACA;EACA;;EAEA;;;;;EAKA;;;;;;;EAOA;EACA;;;;;EAKA;;EAEA;;UAGe;EACf;EACA;EACA;;UAGe;EACf;EACA;;KAGU,sBAAsB,QAChC,oOAaE,qMAWA;UAGa;EACf;EACA;EACA;;UAGe;EACf,UAAU;EACV;EACA;;UAGe;EACf;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;;EAEA,cAAc;;EAEd;EACA;EACA;;;UAIe;EACf;EACA;;EAEA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;EACA;;EAEA,cAAc;;EAEd;EACA;;EAEA;EACA;EACA;;EAEA;EACA,SAAS;;UAGM;EACf;EACA,MAAM;EACN;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA,QAAQ;;EAER,eAAe,QAAQ;EAEvB,OAAO;EACP,SAAS;EACT,SAAS;EACT,aAAa;EACb,QAAQ;EACR;EACA;EACA;EACA;EACA;EACA,iBAAiB;EACjB;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EAEA,WAAW;EAEX;EACA;EACA;EACA;EACA;;;;;EAKA;EACA;EACA,eAAe;EACf;EACA,mBAAmB;EACnB,gBAAgB;EAChB,UAAU;EACV,g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a;;KAGH;;KAGA;UAEK;EACf;EACA,OAAO;;;UAIQ;EACf;EACA;EACA;EACA;;EAEA;;;;;;UAOe;EACf;EACA;EACA,MAAM;EACN;EACA;EACA;EACA;EACA,eAAe;;KAGL;UACK;EACf;;;UAIe;EACf;EACA,OAAO,QAAQ;EACf,kBAAkB;;KAGR,kBAAkB;;cAEjB;KAmBD,kCAAkC;UAC7B;EACf,UAAU;EACV,UAAU;;KAEA,sBAAsB,kBAAkB,gBAAgB;UACnD;EACf;EACA,MAAM;EACN,OAAO;;;;;;;;UAQQ;EACf;;EAEA;EACA,OAAO;EACP;EACA;;KAEU,gBACR,kBACA,gBACA,0BACA,kBACA;KACQ,kBAAkB;;cAGjB;KAyBD,wBAAwB;cAEvB;KACD,6BAA6B;;;;;cAM5B;KACD,oBAAoB;;;;;;UAOf;EACf;EACA;;UAGe;EACf;EACA;EACA,MAAM;EACN;EACA,cAAc,eAAe;EAC7B;EACA;;EAEA,SAAS;;;;;EAKT,aAAa,QAAQ,OAAO;;EAE5B,OAAO;;EAEP,cAAc,eAAe;EAC7B,aAAa;;EAEb;;EAEA;;;KAIU,yBACT,WAAW,cAAc,UAAU,oBAAoB,mBAClD;UAES;EACf;EACA;;;;;EAKA;;EAEA;;UAGe;EACf;EACA;;EAEA,OAAO;EACP;EACA;;;;;EAKA;EACA,aAAa;;;;;EAKb;;EAEA;;;iBAIc,oBAAoB,YAAY,KAAK;;cAKxC,wBAAsB;iBAEnB,oBAAoB"}
package/dist/types.js CHANGED
@@ -1,2 +1,89 @@
1
- import { CODE_SYNTAX_PLATFORMS, MODE_ATTRIBUTE_PATTERN, TEXT_BINDABLE_FIELDS, TOKEN_UNITS, VARIABLE_SCOPES, isLibraryCollection, isModeAttributeName } from "./chunks/behaviours/layers.js";
2
- export { CODE_SYNTAX_PLATFORMS, MODE_ATTRIBUTE_PATTERN, TEXT_BINDABLE_FIELDS, TOKEN_UNITS, VARIABLE_SCOPES, isLibraryCollection, isModeAttributeName };
1
+ //#region src/types.ts
2
+ /** The text fields a range of characters can bind to a variable, as Figma lists them. */
3
+ const TEXT_BINDABLE_FIELDS = [
4
+ "fontFamily",
5
+ "fontSize",
6
+ "fontStyle",
7
+ "fontWeight",
8
+ "letterSpacing",
9
+ "lineHeight",
10
+ "paragraphSpacing",
11
+ "paragraphIndent"
12
+ ];
13
+ /** The arithmetic, comparison, logic and conversions a formula combines values with. */
14
+ const VARIABLE_FORMULA_OPERATORS = [
15
+ "add",
16
+ "subtract",
17
+ "multiply",
18
+ "divide",
19
+ "negate",
20
+ "equal",
21
+ "notEqual",
22
+ "less",
23
+ "lessOrEqual",
24
+ "greater",
25
+ "greaterOrEqual",
26
+ "and",
27
+ "or",
28
+ "not",
29
+ "text",
30
+ "truthy",
31
+ "if"
32
+ ];
33
+ /** Property pickers a variable is offered in, as Figma names them. */
34
+ const VARIABLE_SCOPES = [
35
+ "ALL_SCOPES",
36
+ "TEXT_CONTENT",
37
+ "CORNER_RADIUS",
38
+ "WIDTH_HEIGHT",
39
+ "GAP",
40
+ "ALL_FILLS",
41
+ "FRAME_FILL",
42
+ "SHAPE_FILL",
43
+ "TEXT_FILL",
44
+ "STROKE",
45
+ "STROKE_FLOAT",
46
+ "EFFECT_FLOAT",
47
+ "EFFECT_COLOR",
48
+ "OPACITY",
49
+ "FONT_STYLE",
50
+ "FONT_FAMILY",
51
+ "FONT_SIZE",
52
+ "LINE_HEIGHT",
53
+ "LETTER_SPACING",
54
+ "PARAGRAPH_SPACING",
55
+ "PARAGRAPH_INDENT",
56
+ "FONT_VARIATIONS",
57
+ "TRANSFORM"
58
+ ];
59
+ const CODE_SYNTAX_PLATFORMS = [
60
+ "WEB",
61
+ "ANDROID",
62
+ "iOS"
63
+ ];
64
+ /**
65
+ * The CSS unit a numeric token is written in. Lengths (`px`, `rem`) stay in canvas pixels in
66
+ * the document and convert only when written as CSS; the other units store the number as written.
67
+ */
68
+ const TOKEN_UNITS = [
69
+ "none",
70
+ "px",
71
+ "rem",
72
+ "%",
73
+ "ms",
74
+ "s",
75
+ "deg"
76
+ ];
77
+ /** Whether a collection is a library's copy, which takes no variables or modes of the file's. */
78
+ function isLibraryCollection(collection) {
79
+ return !!collection.key;
80
+ }
81
+ /** An HTML attribute name a stylesheet can select on unescaped: `data-theme`, `theme`. */
82
+ const MODE_ATTRIBUTE_PATTERN = /^[A-Za-z_][\w-]*$/;
83
+ function isModeAttributeName(name) {
84
+ return name.length <= 100 && MODE_ATTRIBUTE_PATTERN.test(name);
85
+ }
86
+ //#endregion
87
+ export { CODE_SYNTAX_PLATFORMS, MODE_ATTRIBUTE_PATTERN, TEXT_BINDABLE_FIELDS, TOKEN_UNITS, VARIABLE_FORMULA_OPERATORS, VARIABLE_SCOPES, isLibraryCollection, isModeAttributeName };
88
+
89
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":[],"sources":["../src/types.ts"],"sourcesContent":["/* eslint-disable max-lines -- scene node contracts are kept together as the public graph type surface */\n\nimport type { ExportFormatId } from './export-format'\nimport type { CanvasGuide } from './guides'\nimport type { InstanceOverrideState } from './instances/overrides'\nimport type { Color, Matrix, Rect, Vector } from './primitives'\nimport type { ShapeWithTextType } from './shape-with-text/kinds'\n\nexport interface SceneGraphEvents {\n 'node:created': (node: SceneNode) => void\n 'node:updated': (id: string, changes: Partial<SceneNode>) => void\n 'node:previewUpdated': (id: string, changes: Partial<SceneNode>) => void\n 'node:deleted': (id: string, parentId: string | null) => void\n 'node:reparented': (nodeId: string, oldParentId: string | null, newParentId: string) => void\n 'node:reordered': (\n nodeId: string,\n parentId: string,\n index: number,\n previousParentId: string | null\n ) => void\n}\n\nexport type SceneGraphEventHandlers = Partial<{\n created: (node: SceneNode) => void\n updated: (id: string, changes: Partial<SceneNode>) => void\n previewUpdated: (id: string, changes: Partial<SceneNode>) => void\n deleted: (id: string, parentId: string | null) => void\n reparented: (nodeId: string, oldParentId: string | null, newParentId: string) => void\n reordered: (\n nodeId: string,\n parentId: string,\n index: number,\n previousParentId: string | null\n ) => void\n}>\n\n/** Hears about nodes as an edit adds and changes them, synchronously and before each change. */\nexport interface NodeChangeObserver {\n /** A node is about to change and is still as it was. */\n before: (node: SceneNode) => void\n /** A node was just added. */\n created: (node: SceneNode) => void\n}\n\nexport type DocumentColorSpace = 'srgb' | 'display-p3'\n\n/** What a document is for, as Figma keeps design files and FigJam boards apart. */\nexport type DocumentKind = 'design' | 'board'\n\nexport interface FigmaSourcePayload {\n rawSize: Vector | null\n rawTransform: Matrix | null\n rawNodeFields: Record<string, unknown>\n layout: FigmaLayoutMetadata | null\n symbolOverrides: unknown[]\n componentPropAssignments: unknown[]\n derivedSymbolData: unknown[]\n derivedSymbolDataLayoutVersion: number | null\n uniformScaleFactor: number | null\n}\n\nexport interface SourceMetadata {\n format: 'fig' | null\n id: string | null\n orderKey: string | null\n editedFields: string[]\n fig: FigmaSourcePayload\n}\n\nexport type HandleMirroring = 'NONE' | 'ANGLE' | 'ANGLE_AND_LENGTH'\nexport type WindingRule = 'NONZERO' | 'EVENODD'\n\nexport interface VectorVertex {\n x: number\n y: number\n strokeCap?: string\n strokeJoin?: string\n cornerRadius?: number\n handleMirroring?: HandleMirroring\n}\n\nexport interface VectorSegment {\n start: number\n end: number\n tangentStart: Vector\n tangentEnd: Vector\n}\n\nexport interface VectorRegion {\n windingRule: WindingRule\n loops: number[][]\n /** The region's own paints. Without them it draws the layer's fills, as in Figma. */\n fills?: Fill[]\n /** The shared fill style the region's paints come from. */\n fillStyleId?: string\n}\n\nexport interface VectorNetwork {\n vertices: VectorVertex[]\n segments: VectorSegment[]\n regions: VectorRegion[]\n}\n\nexport interface GeometryPath {\n windingRule: WindingRule\n commandsBlob: Uint8Array\n}\n\nexport type NodeType =\n | 'CANVAS'\n | 'FRAME'\n | 'RECTANGLE'\n | 'ROUNDED_RECTANGLE'\n | 'ELLIPSE'\n | 'TEXT'\n | 'LINE'\n | 'STAR'\n | 'POLYGON'\n | 'VECTOR'\n | 'BOOLEAN_OPERATION'\n | 'GROUP'\n | 'SECTION'\n | 'COMPONENT'\n | 'COMPONENT_SET'\n | 'INSTANCE'\n | 'CONNECTOR'\n | 'SHAPE_WITH_TEXT'\n | 'STICKY'\n\nexport type FillType =\n | 'SOLID'\n | 'GRADIENT_LINEAR'\n | 'GRADIENT_RADIAL'\n | 'GRADIENT_ANGULAR'\n | 'GRADIENT_DIAMOND'\n | 'IMAGE'\n | 'VIDEO'\n | 'PATTERN'\n | 'NOISE'\n | 'CUSTOM'\nexport type BlendMode =\n | 'NORMAL'\n | 'DARKEN'\n | 'MULTIPLY'\n | 'LINEAR_BURN'\n | 'COLOR_BURN'\n | 'LIGHTEN'\n | 'SCREEN'\n | 'LINEAR_DODGE'\n | 'COLOR_DODGE'\n | 'OVERLAY'\n | 'SOFT_LIGHT'\n | 'HARD_LIGHT'\n | 'DIFFERENCE'\n | 'EXCLUSION'\n | 'HUE'\n | 'SATURATION'\n | 'COLOR'\n | 'LUMINOSITY'\n | 'PASS_THROUGH'\nexport type ImageScaleMode = 'FILL' | 'FIT' | 'CROP' | 'TILE'\nexport type NoiseType = 'MULTITONE' | 'MONOTONE' | 'DUOTONE'\nexport type PatternTileType = 'RECTANGULAR' | 'HORIZONTAL_HEXAGONAL' | 'VERTICAL_HEXAGONAL'\nexport type PatternAlignment = 'START' | 'CENTER' | 'END'\n\nexport interface GradientStop {\n color: Color\n position: number\n}\n\nexport type GradientTransform = Matrix\n\nexport interface Fill {\n type: FillType\n color: Color\n opacity: number\n visible: boolean\n blendMode?: BlendMode\n gradientStops?: GradientStop[]\n gradientTransform?: GradientTransform\n imageHash?: string\n imageScaleMode?: ImageScaleMode\n /** A crop's image-space window; Fill, Fit and Tile ignore it. */\n imageTransform?: GradientTransform\n /** Clockwise turn of a Fill, Fit or Tile image, in multiples of 90°; a crop holds its own. */\n imageRotation?: number\n sourceNodeId?: string\n scale?: number\n spacing?: number\n patternSpacing?: Vector\n patternTileType?: PatternTileType\n verticalAlignment?: PatternAlignment\n horizontalAlignment?: PatternAlignment\n noiseType?: NoiseType\n density?: number\n noiseSize?: Vector\n customEffectId?: string\n}\n\nexport type StrokeCap =\n | 'NONE'\n | 'ROUND'\n | 'SQUARE'\n | 'ARROW_LINES'\n | 'ARROW_EQUILATERAL'\n | 'TRIANGLE_FILLED'\n | 'DIAMOND_FILLED'\n | 'CIRCLE_FILLED'\nexport type StrokeJoin = 'MITER' | 'BEVEL' | 'ROUND'\nexport type SharedStyleType = 'FILL' | 'TEXT' | 'EFFECT' | 'GRID'\nexport type SharedStyleKind = 'fill' | 'stroke' | 'text' | 'effect' | 'grid'\nexport type MaskType = 'ALPHA' | 'VECTOR' | 'LUMINANCE'\n\nexport interface LayoutGrid {\n visible?: boolean\n color?: Color\n /** `STRIPES` is the archive's name for columns or rows, along `axis`. */\n pattern?: 'COLUMNS' | 'ROWS' | 'GRID' | 'STRIPES'\n axis?: 'X' | 'Y'\n type?: 'MIN' | 'CENTER' | 'MAX' | 'STRETCH'\n alignment?: 'MIN' | 'CENTER' | 'MAX' | 'STRETCH'\n numSections?: number\n /** Figma's plugin API reports an Auto count as `null` and accepts `Infinity` for it. */\n count?: number | null\n offset?: number\n sectionSize?: number\n gutterSize?: number\n}\n\nexport interface SharedStyle {\n id: string\n nodeId: string\n name: string\n type: SharedStyleType\n}\n\n/** A stroke is a paint with the geometry that decides where it is drawn. */\nexport interface Stroke extends Fill {\n weight: number\n align: 'INSIDE' | 'CENTER' | 'OUTSIDE'\n cap?: StrokeCap\n join?: StrokeJoin\n dashPattern?: number[]\n}\n\nexport interface Effect {\n type: 'DROP_SHADOW' | 'INNER_SHADOW' | 'LAYER_BLUR' | 'BACKGROUND_BLUR' | 'FOREGROUND_BLUR'\n color: Color\n offset: Vector\n radius: number\n spread: number\n visible: boolean\n blendMode?: BlendMode\n showShadowBehindNode?: boolean\n}\n\nexport type ConstraintType = 'MIN' | 'CENTER' | 'MAX' | 'STRETCH' | 'SCALE'\nexport type TextAutoResize = 'NONE' | 'HEIGHT' | 'WIDTH_AND_HEIGHT' | 'TRUNCATE'\n\n/** Where a connector end attaches to a layer: a side, the side Figma picks, or a fixed point. */\nexport type ConnectorMagnet =\n | 'NONE'\n | 'AUTO'\n | 'AUTO_HORIZONTAL'\n | 'TOP'\n | 'RIGHT'\n | 'BOTTOM'\n | 'LEFT'\n | 'CENTER'\n | 'EDGE'\n | 'ABSOLUTE'\n\n/**\n * One end of a connector. Bound to a layer, it follows the layer by `magnet`, or by `position`\n * in the layer's own axes when the magnet is `NONE`. Free, `nodeId` is null and `position` is in\n * the connector's parent's axes.\n */\nexport interface ConnectorEndpoint {\n nodeId: string | null\n magnet: ConnectorMagnet\n position: Vector\n}\n\nexport type ConnectorLineType = 'ELBOWED' | 'STRAIGHT' | 'CURVED'\n\n/**\n * A segment of an elbow connector that was dragged into place: the line it runs along, through\n * `position`, in the connector's own axes. `position` lies midway along the segment as last drawn.\n */\nexport interface ConnectorControlPoint {\n position: Vector\n direction: 'HORIZONTAL' | 'VERTICAL'\n}\n\n/**\n * Where a connector's label was dragged along its line: `offset` of the way from the middle of\n * the line towards one end, by length, on the line or to one side of it. `ABOVE` is the side to\n * the left of the line's direction.\n */\nexport interface ConnectorLabelPosition {\n section: 'MIDDLE_TO_START' | 'MIDDLE_TO_END'\n offset: number\n offAxis: 'NONE' | 'ABOVE' | 'BELOW'\n}\nexport type TextAlignVertical = 'TOP' | 'CENTER' | 'BOTTOM'\nexport type TextCase = 'ORIGINAL' | 'UPPER' | 'LOWER' | 'TITLE'\nexport type TextDecoration = 'NONE' | 'UNDERLINE' | 'STRIKETHROUGH'\nexport type TextDecorationStyle = 'SOLID' | 'DOTTED' | 'WAVY'\nexport type LeadingTrim = 'NONE' | 'CAP_HEIGHT'\nexport type TextDirection = 'AUTO' | 'LTR' | 'RTL'\nexport type LayoutDirection = 'AUTO' | 'LTR' | 'RTL'\n/** Whether a paragraph is an item of a numbered list, a bulleted list, or no list. */\nexport type TextListType = 'NONE' | 'ORDERED' | 'UNORDERED'\n\n/** How one paragraph of a text node (a line ending at a newline) sits in a list. */\n/** Spacing a text sets for all its paragraphs and a paragraph can set for itself. */\nexport type TextParagraphSpacingField = 'listSpacing' | 'paragraphSpacing' | 'paragraphIndent'\n\nexport interface TextParagraphStyle {\n listType: TextListType\n /** Nesting level: 1–5 for list items; kept but not drawn for plain paragraphs. */\n indentation: number\n /** This paragraph's own spacing, in place of the text's; absent ones follow the text. */\n listSpacing?: number\n paragraphSpacing?: number\n paragraphIndent?: number\n}\n\nexport interface FontVariation {\n axis: string\n value: number\n}\n\nexport interface FontFeature {\n tag: string\n enabled: boolean\n}\n\n/** Where a stretch of text links to, as Figma's `HyperlinkTarget`: a URL, or a node by its ID. */\nexport interface HyperlinkTarget {\n type: 'URL' | 'NODE'\n value: string\n}\n\n/** The text fields a range of characters can bind to a variable, as Figma lists them. */\nexport const TEXT_BINDABLE_FIELDS = [\n 'fontFamily',\n 'fontSize',\n 'fontStyle',\n 'fontWeight',\n 'letterSpacing',\n 'lineHeight',\n 'paragraphSpacing',\n 'paragraphIndent'\n] as const\n\nexport type TextBindableField = (typeof TEXT_BINDABLE_FIELDS)[number]\n\n/** Variable IDs bound to text fields, by field. */\nexport type TextBoundVariables = Partial<Record<TextBindableField, string>>\n\n/**\n * A line height or letter spacing as Figma keeps it: pixels, or a percent of the font size that\n * follows the size when it changes.\n */\nexport interface TextLength {\n value: number\n unit: 'PIXELS' | 'PERCENT'\n}\n\nexport interface CharacterStyleOverride {\n fontWeight?: number\n italic?: boolean\n /** The characters' face by its font's own name for it; `null` is the face their weight picks. */\n fontStyle?: string | null\n textDecoration?: TextDecoration\n textDecorationStyle?: TextDecorationStyle\n textDecorationThickness?: number | null\n textDecorationFills?: Fill[]\n textDecorationSkipInk?: boolean\n textUnderlineOffset?: number | null\n fontSize?: number\n fontFamily?: string\n letterSpacing?: TextLength\n /** `null` is automatic, from the font. */\n lineHeight?: TextLength | null\n fills?: Fill[]\n fontVariations?: FontVariation[]\n /** Whether the characters' optical size follows their font size, in place of the text's own. */\n opticalSizeFromFontSize?: boolean\n fontFeatures?: FontFeature[]\n textLanguage?: string | null\n textCase?: TextCase\n /** A link over the characters; `null`, like leaving it out, links nowhere. */\n hyperlink?: HyperlinkTarget | null\n /** The text style the characters use in place of the text's own; `null` uses none. */\n textStyleId?: string | null\n /** The fill style the characters use in place of the text's own; `null` uses none. */\n fillStyleId?: string | null\n /** The characters' text field bindings, in place of the text's own. */\n boundVariables?: TextBoundVariables\n}\n\nexport interface StyleRun {\n start: number\n length: number\n style: CharacterStyleOverride\n}\n\nexport interface ArcData {\n startingAngle: number\n endingAngle: number\n innerRadius: number\n}\n\nexport type LayoutMode = 'NONE' | 'HORIZONTAL' | 'VERTICAL' | 'GRID'\n/** A node's sizing along one axis; fill is stored on the child, see `layoutSizing`. */\nexport type LayoutSizing = 'FIXED' | 'HUG' | 'FILL'\n/** Whether an auto-layout frame keeps its size or hugs its children along one of its axes. */\nexport type AxisSizingMode = 'FIXED' | 'HUG'\n\nexport type GridTrackSizing = 'FIXED' | 'FR' | 'AUTO'\n\nexport interface GridTrack {\n sizing: GridTrackSizing\n value: number\n}\n\nexport interface GridPosition {\n column: number\n row: number\n columnSpan: number\n rowSpan: number\n}\nexport type LayoutAlign = 'MIN' | 'CENTER' | 'MAX' | 'SPACE_BETWEEN'\nexport type LayoutCounterAlign = 'MIN' | 'CENTER' | 'MAX' | 'STRETCH' | 'BASELINE'\nexport type LayoutAlignSelf = 'AUTO' | 'MIN' | 'CENTER' | 'MAX' | 'STRETCH' | 'BASELINE'\nexport type LayoutWrap = 'NO_WRAP' | 'WRAP'\n\nexport interface PluginDataEntry {\n pluginId: string\n key: string\n value: string\n}\n\n/** A fixed width or height in pixels an export is scaled to, instead of a multiplier. */\nexport interface ExportSize {\n type: 'WIDTH' | 'HEIGHT'\n value: number\n}\n\n/** The colour profile an export is written in; the document's own unless set. */\nexport type ExportColorProfile = 'DOCUMENT' | 'SRGB' | 'DISPLAY_P3_V4'\n\n/**\n * One export a layer keeps. The options past `scale` and `format` are Figma's and read as Figma's\n * defaults when left out.\n */\nexport interface ExportSetting {\n scale: number\n format: ExportFormatId\n /** Appended to the file name. */\n suffix?: string\n /** A size that replaces `scale`. */\n size?: ExportSize\n /** Only the layer, without what overlaps it (default true). */\n contentsOnly?: boolean\n /** The layer's box rather than everything it draws, for text (default false). */\n useAbsoluteBounds?: boolean\n colorProfile?: ExportColorProfile\n /** SVG: text as outlines rather than `<text>` (default true). */\n svgOutlineText?: boolean\n /** SVG: every layer's name as its element's `id` (default false). */\n svgIdAttribute?: boolean\n /** SVG: strokes as strokes where possible rather than masked outlines (default true). */\n svgSimplifyStroke?: boolean\n}\n\nexport interface PluginRelaunchDataEntry {\n pluginId: string\n command: string\n message: string\n isDeleted: boolean\n}\n\n/**\n * One derived glyph outline for display (path text / missing-font fidelity).\n * Figma import is one producer; OpenPencil editing and reflow can regenerate it.\n * commandsBlob is in font units; paint multiplies by fontSize (and scaleX/Y).\n */\nexport interface TextPathData {\n network: VectorNetwork\n normalizedSize: Vector\n /** Where on the start segment the text starts, from 0 at its start to 1 at its end. */\n tValue: number\n forward: boolean\n /** The segment the text starts on, which Figma marks in the network blob; 0 when unmarked. */\n startSegment?: number\n}\n\nexport interface DerivedTextGlyph {\n /** UTF-16 source-text cluster start, when supplied by the shaping source. */\n firstCharacter?: number\n commandsBlob: Uint8Array\n x: number\n y: number\n fontSize: number\n /** Figma Glyph.rotation — radians, not degrees. Zero for axis-aligned text. */\n rotation?: number\n /**\n * Horizontal advance in pixels at `fontSize`, before `scaleX`, when the shaping source gave\n * one; where the glyph ends, so decorations stop at the text rather than the layer's edge.\n */\n advance?: number\n /**\n * Accumulated non-uniform resize scale (default 1). Paint order is\n * translate → scale(scaleX,Y) → rotate → scale(fontSize,-fontSize) so\n * anisotropic stretch matches scaleGeometryPaths(strokeGeometry).\n * Do not fold this into fontSize or rotated letters desync from outlines.\n */\n scaleX?: number\n scaleY?: number\n /**\n * The code points of the emoji this glyph stands for, sequence and all. Its outline is only a\n * placeholder square a 1 em wide; the emoji's image is drawn there instead, as Figma does.\n */\n emojiCodePoints?: number[]\n /** The image set Figma draws the emoji from, when the file names one other than Apple's. */\n emojiImageSet?: 'NOTO'\n}\n\nexport interface SymbolLink {\n uri: string\n displayName?: string\n displayText?: string\n}\n\nexport interface VariantPropSpec {\n propDefId: string\n value: string\n}\n\nexport type FigmaLayoutMetadata = Partial<\n Record<\n | 'stackMode'\n | 'stackCounterAlign'\n | 'stackJustify'\n | 'stackCounterAlignItems'\n | 'stackPrimaryAlignItems'\n | 'stackPrimarySizing'\n | 'stackCounterSizing'\n | 'stackWrap'\n | 'stackPositioning'\n | 'stackChildAlignSelf',\n string\n > &\n Record<\n | 'stackSpacing'\n | 'stackPadding'\n | 'stackPaddingRight'\n | 'stackPaddingBottom'\n | 'stackVerticalPadding'\n | 'stackHorizontalPadding'\n | 'stackChildPrimaryGrow'\n | 'stackCounterSpacing',\n number\n > &\n Record<'bordersTakeSpace' | 'stackReverseZIndex', boolean>\n>\n\nexport interface LibraryAssetIdentity {\n libraryId: string\n assetKey: string\n revisionId: string\n}\n\nexport interface LibraryAssetSource {\n identity: LibraryAssetIdentity\n sourceNodeId: string | null\n readOnly: boolean\n}\n\nexport interface EnabledLibraryBinding {\n libraryId: string\n revisionId: string\n enabled: boolean\n}\n\n/** The library a document publishes as. */\nexport interface SourceLibraryPublication {\n libraryId: string\n revisionId: string\n name: string\n catalogSource?: string\n}\n\n/** A reply in a canvas comment thread. */\nexport interface CommentReply {\n id: string\n author: string\n /** The author's collaboration color when they wrote it, for their avatar. */\n authorColor?: Color\n /** Markdown: bold, italic, strikethrough, links and lists. */\n text: string\n createdAt: string\n deleted?: boolean\n}\n\n/** A canvas comment thread, kept in the document's root plugin data. */\nexport interface CommentThread {\n id: string\n pageId: string\n /** Page name when the pin was placed, for readers of the raw data. */\n pageName?: string\n /** Top-level layer under the pin; the pin follows it when it moves. */\n nodeId?: string | null\n nodeName?: string | null\n /** Offset from the layer's top-left corner, in canvas units. */\n offsetX?: number\n offsetY?: number\n /** Canvas position when the pin was last saved; used when the layer is gone. */\n x: number\n y: number\n author: string\n /** The author's collaboration color when they wrote it, for their avatar. */\n authorColor?: Color\n /** Markdown: bold, italic, strikethrough, links and lists. */\n text: string\n createdAt: string\n /** Bumped on every change. */\n updatedAt: string\n resolved: boolean\n resolvedAt?: string | null\n /** Deleted threads stay as tombstones so a stale copy cannot bring them back. */\n deleted?: boolean\n replies: CommentReply[]\n}\n\nexport interface SceneNode {\n id: string\n type: NodeType\n name: string\n parentId: string | null\n childIds: string[]\n\n x: number\n y: number\n width: number\n height: number\n rotation: number\n source: SourceMetadata\n /** Materialized layout hint imported or generated outside the live Yoga layout pass. */\n derivedLayout: Partial<Rect> | null\n\n fills: Fill[]\n strokes: Stroke[]\n effects: Effect[]\n layoutGrids: LayoutGrid[]\n guides: CanvasGuide[]\n fillStyleId: string | null\n strokeStyleId: string | null\n textStyleId: string | null\n effectStyleId: string | null\n gridStyleId: string | null\n sharedStyleType: SharedStyleType | null\n opacity: number\n\n cornerRadius: number\n topLeftRadius: number\n topRightRadius: number\n bottomRightRadius: number\n bottomLeftRadius: number\n independentCorners: boolean\n cornerSmoothing: number\n\n visible: boolean\n locked: boolean\n clipsContent: boolean\n\n blendMode: BlendMode\n\n text: string\n fontSize: number\n fontFamily: string\n fontWeight: number\n italic: boolean\n /**\n * The face by the name its font gives it (\"Semi Bold\", \"Book\", \"Condensed Bold\"), which Figma\n * finds a font's face by; `null` is the face the weight and slant pick in the family.\n */\n fontStyle: string | null\n textAlignHorizontal: 'LEFT' | 'CENTER' | 'RIGHT' | 'JUSTIFIED'\n textDirection: TextDirection\n textLanguage: string | null\n textAlignVertical: TextAlignVertical\n textAutoResize: TextAutoResize\n textCase: TextCase\n textDecoration: TextDecoration\n textDecorationStyle: TextDecorationStyle\n textDecorationThickness: number | null\n textDecorationFills: Fill[]\n textDecorationSkipInk: boolean\n textUnderlineOffset: number | null\n leadingTrim: LeadingTrim\n /** `null` is automatic, from the font. */\n lineHeight: TextLength | null\n letterSpacing: TextLength\n maxLines: number | null\n /**\n * One entry per paragraph of `text`, in order. Missing entries are plain paragraphs, so text\n * without lists keeps this empty.\n */\n textParagraphs: TextParagraphStyle[]\n /** Space after a list item followed by another; a paragraph's own value comes first. */\n listSpacing: number\n /** Space after a paragraph other than between two list items. */\n paragraphSpacing: number\n /** Indent of the first line of each plain paragraph. */\n paragraphIndent: number\n /** Whether list markers hang outside the text box instead of indenting the items. */\n hangingList: boolean\n\n styleRuns: StyleRun[]\n fontVariations: FontVariation[]\n /**\n * Whether a variable font's optical size follows the font size, as Figma's \"Set optical size\n * automatically\" does by default; when it does not, the `opsz` in `fontVariations` applies.\n */\n opticalSizeFromFontSize: boolean\n fontFeatures: FontFeature[]\n\n horizontalConstraint: ConstraintType\n verticalConstraint: ConstraintType\n\n layoutMode: LayoutMode\n layoutDirection: LayoutDirection\n layoutWrap: LayoutWrap\n primaryAxisAlign: LayoutAlign\n counterAxisAlign: LayoutCounterAlign\n primaryAxisSizing: AxisSizingMode\n counterAxisSizing: AxisSizingMode\n itemSpacing: number\n counterAxisSpacing: number\n paddingTop: number\n paddingRight: number\n paddingBottom: number\n paddingLeft: number\n\n layoutPositioning: 'AUTO' | 'ABSOLUTE'\n layoutGrow: number\n layoutAlignSelf: LayoutAlignSelf\n\n vectorNetwork: VectorNetwork | null\n handleMirroring: HandleMirroring\n booleanOperation: 'UNION' | 'SUBTRACT' | 'INTERSECT' | 'EXCLUDE' | undefined\n fillGeometry: GeometryPath[]\n strokeGeometry: GeometryPath[]\n\n arcData: ArcData | null\n\n strokeCap: StrokeCap\n strokeJoin: StrokeJoin\n dashPattern: number[]\n\n borderTopWeight: number\n borderRightWeight: number\n borderBottomWeight: number\n borderLeftWeight: number\n independentStrokeWeights: boolean\n\n /**\n * The weight and alignment a node keeps for its strokes, as Figma keeps them on the node: they\n * last while it has no strokes, and a stroke added to it takes them. Each stroke still carries\n * its own `weight` and `align`, which win while the node has strokes.\n */\n strokeWeight: number\n strokeAlign: Stroke['align']\n\n strokeMiterLimit: number\n\n minWidth: number | null\n maxWidth: number | null\n minHeight: number | null\n maxHeight: number | null\n /**\n * The size whose proportions the layer keeps, as Figma stores it: the width and height it had\n * when the ratio was locked, not a reduced ratio. Null leaves the proportions free.\n */\n targetAspectRatio: Vector | null\n\n /** A connector's ends and the line between them; null on other layers. */\n connectorStart: ConnectorEndpoint | null\n connectorEnd: ConnectorEndpoint | null\n connectorLineType: ConnectorLineType\n connectorStartCap: StrokeCap\n connectorEndCap: StrokeCap\n /**\n * An elbow connector's segments between its first and last, in order, once one was dragged;\n * empty while it routes itself. Kept, unused, while the line is straight or curved.\n */\n connectorControlPoints: ConnectorControlPoint[]\n /**\n * A curved connector's two cubic control points, in the connector's own axes, once its curve\n * was dragged; null while it curves by itself. Kept, unused, while the line is not curved.\n */\n connectorCurveHandles: [Vector, Vector] | null\n /** Where a connector's label was dragged to; null while it sits midway along the line. */\n connectorLabelPosition: ConnectorLabelPosition | null\n\n isMask: boolean\n maskType: MaskType\n maskIsOutline: boolean\n\n gridTemplateColumns: GridTrack[]\n gridTemplateRows: GridTrack[]\n gridColumnGap: number\n gridRowGap: number\n gridPosition: GridPosition | null\n\n counterAxisAlignContent: 'AUTO' | 'SPACE_BETWEEN'\n itemReverseZIndex: boolean\n strokesIncludedInLayout: boolean\n\n expanded: boolean\n textTruncation: 'DISABLED' | 'ENDING'\n autoRename: boolean\n\n pointCount: number\n starInnerRadius: number\n /** The FigJam kind a SHAPE_WITH_TEXT draws; its label is the node's own text. */\n shapeWithTextType: ShapeWithTextType\n /** The height a shape with text was given; it grows past it to fit its label. 0 is unset. */\n shapeUserHeight: number\n /**\n * Whether a shape with text keeps its height and cuts its label off with \"…\" instead of growing,\n * as FigJam does once the shape's height was set.\n */\n shapeTruncates: boolean\n\n componentId: string | null\n instanceOverrides: InstanceOverrideState\n componentPropertyDefinitions: ComponentPropertyDefinition[]\n componentPropertyReferences: ComponentPropertyReference[]\n componentPropertyAssignments: Record<string, string>\n componentPropertyValues: Record<string, string>\n componentKey: string | null\n sourceLibraryKey: string | null\n publishId: string | null\n overrideKey: string | null\n sharedSymbolVersion: string | null\n publishedVersion: string | null\n librarySource: LibraryAssetSource | null\n isPublishable: boolean\n isSymbolPublishable: boolean\n /**\n * On an instance inside a component: its properties show on instances of that component,\n * as Figma's `isExposedInstance`.\n */\n isExposedInstance: boolean\n symbolDescription: string\n symbolLinks: SymbolLink[]\n variantPropSpecs: VariantPropSpec[]\n\n boundVariables: Record<string, string>\n /** Multipliers from bound numeric values to this occurrence's scene units. */\n variableBindingScales: Partial<Record<string, number>>\n /** Numeric units for new declarations owned by this node's occurrence scope. */\n variableAssignmentScales: Partial<Record<string, number>>\n /** Explicit coordinate scale relative to the containing component definition. */\n componentScale: number\n variableModes: VariableModeMap\n exportSettings: ExportSetting[]\n /**\n * The id of the status a team gave the layer, a state of the document's workflow such as Ready\n * for dev. It stays while the layer sits where it cannot show one; `effectiveStatus` tells\n * whether it shows.\n */\n status: string | null\n\n pluginData: PluginDataEntry[]\n pluginRelaunchData: PluginRelaunchDataEntry[]\n\n internalOnly: boolean\n\n flipX: boolean\n flipY: boolean\n\n textPicture: Uint8Array | null\n derivedTextGlyphs: DerivedTextGlyph[] | null\n /**\n * How far a text's lines reach down from its top: measured at its width when its text or width\n * changes, or read from the lines a file saved, and never saved itself. A fixed-size box does not\n * clip them, as in Figma, so its visual bounds reach this far. Null when not known.\n */\n derivedTextHeight: number | null\n /** Format-neutral layout path for text-on-path nodes. */\n textPathData: TextPathData | null\n /** Node-local box that maps textPathData into the node coordinate space. */\n textPathBox: Rect | null\n}\n\nexport type ComponentPropertyType = 'VARIANT' | 'TEXT' | 'BOOLEAN' | 'INSTANCE_SWAP' | 'SLOT'\n\n/** `SLOT_CONTENT` marks a frame whose children are the slot's content. */\nexport type ComponentPropertyReferenceField = 'VISIBLE' | 'TEXT' | 'INSTANCE_SWAP' | 'SLOT_CONTENT'\n\nexport interface ComponentPropertyReference {\n propertyId: string\n field: ComponentPropertyReferenceField\n}\n\n/** Guidance for a slot property; Figma reports a breach but still accepts the content. */\nexport interface SlotSettings {\n minChildren?: number\n maxChildren?: number\n allowPreferredValuesOnly: boolean\n displayEmptyByDefault: boolean\n /** Content added to the slot fills its counter axis. */\n stretchChildOnInsert: boolean\n}\n\n/**\n * For a `SLOT` property, an instance assignment (whatever its value) means the instance owns\n * that slot's content: the slot frame's children in the instance, which component sync keeps.\n */\nexport interface ComponentPropertyDefinition {\n id: string\n name: string\n type: ComponentPropertyType\n defaultValue: string\n variantOptions?: string[]\n preferredValues?: string[]\n description?: string\n slotSettings?: SlotSettings\n}\n\nexport type VariableType = 'COLOR' | 'FLOAT' | 'STRING' | 'BOOLEAN'\nexport interface VariableAlias {\n aliasId: string\n}\n\n/** Figma's two-argument color expression; opacity is a percentage, not an alpha multiplier. */\nexport interface VariableColorExpression {\n expression: 'COMPOSE_COLOR'\n color: Color | VariableAlias\n opacity: number | VariableAlias\n}\n\nexport type VariableLiteral = Color | number | string | boolean\n/** The arithmetic, comparison, logic and conversions a formula combines values with. */\nexport const VARIABLE_FORMULA_OPERATORS = [\n 'add',\n 'subtract',\n 'multiply',\n 'divide',\n 'negate',\n 'equal',\n 'notEqual',\n 'less',\n 'lessOrEqual',\n 'greater',\n 'greaterOrEqual',\n 'and',\n 'or',\n 'not',\n 'text',\n 'truthy',\n 'if'\n] as const\nexport type VariableFormulaOperator = (typeof VARIABLE_FORMULA_OPERATORS)[number]\nexport interface VariableFormulaOperation {\n operator: VariableFormulaOperator\n operands: VariableFormulaNode[]\n}\nexport type VariableFormulaNode = VariableLiteral | VariableAlias | VariableFormulaOperation\nexport interface VariableFormula {\n expression: 'FORMULA'\n type: VariableType\n value: VariableFormulaNode\n}\n/**\n * An imported expression OpenPencil cannot evaluate, kept as the file wrote it so saving writes it\n * back. `references` holds one entry per alias in `value`, in the order the format walks them, and\n * `null` where the alias names a variable this document does not have. `modes` holds the mode id of\n * each mode key in `value`, in the same walk order.\n */\nexport interface VariableUnsupportedExpression {\n expression: 'UNSUPPORTED'\n /** The function name the file gives, such as `VAR_MODE_LOOKUP`. */\n function: string\n value: Record<string, unknown>\n references: (string | null)[]\n modes: string[]\n}\nexport type VariableValue =\n | VariableLiteral\n | VariableAlias\n | VariableColorExpression\n | VariableFormula\n | VariableUnsupportedExpression\nexport type VariableModeMap = Record<string, string>\n\n/** Property pickers a variable is offered in, as Figma names them. */\nexport const VARIABLE_SCOPES = [\n 'ALL_SCOPES',\n 'TEXT_CONTENT',\n 'CORNER_RADIUS',\n 'WIDTH_HEIGHT',\n 'GAP',\n 'ALL_FILLS',\n 'FRAME_FILL',\n 'SHAPE_FILL',\n 'TEXT_FILL',\n 'STROKE',\n 'STROKE_FLOAT',\n 'EFFECT_FLOAT',\n 'EFFECT_COLOR',\n 'OPACITY',\n 'FONT_STYLE',\n 'FONT_FAMILY',\n 'FONT_SIZE',\n 'LINE_HEIGHT',\n 'LETTER_SPACING',\n 'PARAGRAPH_SPACING',\n 'PARAGRAPH_INDENT',\n 'FONT_VARIATIONS',\n 'TRANSFORM'\n] as const\nexport type VariableScope = (typeof VARIABLE_SCOPES)[number]\n\nexport const CODE_SYNTAX_PLATFORMS = ['WEB', 'ANDROID', 'iOS'] as const\nexport type CodeSyntaxPlatform = (typeof CODE_SYNTAX_PLATFORMS)[number]\n\n/**\n * The CSS unit a numeric token is written in. Lengths (`px`, `rem`) stay in canvas pixels in\n * the document and convert only when written as CSS; the other units store the number as written.\n */\nexport const TOKEN_UNITS = ['none', 'px', 'rem', '%', 'ms', 's', 'deg'] as const\nexport type TokenUnit = (typeof TOKEN_UNITS)[number]\n\n/**\n * CSS written in place of a number mode's value, such as `clamp(1rem, 4vw, 1.5rem)`. While the\n * mode holds a plain number, `resolved` records it, so a number later edited elsewhere, Figma\n * included, shows the CSS no longer describes it.\n */\nexport interface TokenExpression {\n css: string\n resolved?: number\n}\n\nexport interface Variable {\n id: string\n name: string\n type: VariableType\n collectionId: string\n valuesByMode: Record<string, VariableValue>\n description: string\n hiddenFromPublishing: boolean\n /** Absent means every scope. */\n scopes?: VariableScope[]\n /**\n * Per-platform code snippets, as Figma's Dev Mode shows them. A `WEB` snippet of `--x` or\n * `var(--x)` names the token's CSS custom property; otherwise the name is derived.\n */\n codeSyntax?: Partial<Record<CodeSyntaxPlatform, string>>\n /** FLOAT only. Absent means inferred when written as CSS. */\n unit?: TokenUnit\n /** Raw CSS by mode id, for values a number cannot express (`clamp()`, `calc()`). */\n expressions?: Record<string, TokenExpression>\n pluginData?: PluginDataEntry[]\n /** Published library key (from NodeChange.key). Used for assetRef resolution in colorVar. */\n key?: string\n /** Published library version (from NodeChange.version). Used for assetRef resolution in colorVar. */\n version?: string\n}\n\n/** Scalar numeric node fields accepted by numeric property controls. */\nexport type NumericNodeProperty = {\n [K in keyof SceneNode]-?: SceneNode[K] extends number ? K : never\n}[keyof SceneNode]\n\nexport interface VariableCollectionMode {\n modeId: string\n name: string\n /**\n * Where the mode applies in CSS: a selector (`[data-theme=\"dark\"]`, `.compact`) or an\n * at-rule prelude (`@media (max-width: 640px)`). Absent means the default for its axis.\n */\n condition?: string\n /** Where Figma lists the mode, as the file saved it; Figma orders a collection's modes by it. */\n sortPosition?: string\n}\n\nexport interface VariableCollection {\n id: string\n name: string\n /** The default mode comes first, as in Figma. */\n modes: VariableCollectionMode[]\n defaultModeId: string\n variableIds: string[]\n /**\n * The attribute that switches a mode with no condition of its own, `data-theme` for\n * `[data-theme=\"dark\"]`. Absent means one named after the collection.\n */\n modeAttribute?: string\n pluginData?: PluginDataEntry[]\n /**\n * Published library key, for a collection the file copies from a library. Such a collection\n * belongs to the library: Figma lists it with the library's, not the file's own.\n */\n key?: string\n /** Published library version, which references by key carry with it. */\n version?: string\n}\n\n/** Whether a collection is a library's copy, which takes no variables or modes of the file's. */\nexport function isLibraryCollection(collection: Pick<VariableCollection, 'key'>): boolean {\n return !!collection.key\n}\n\n/** An HTML attribute name a stylesheet can select on unescaped: `data-theme`, `theme`. */\nexport const MODE_ATTRIBUTE_PATTERN = /^[A-Za-z_][\\w-]*$/\n\nexport function isModeAttributeName(name: string): boolean {\n return name.length <= 100 && MODE_ATTRIBUTE_PATTERN.test(name)\n}\n"],"mappings":";;AAyVA,MAAa,uBAAuB;CAClC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;AAolBA,MAAa,6BAA6B;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;AAmCA,MAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAGA,MAAa,wBAAwB;CAAC;CAAO;CAAW;AAAK;;;;;AAO7D,MAAa,cAAc;CAAC;CAAQ;CAAM;CAAO;CAAK;CAAM;CAAK;AAAK;;AA+EtE,SAAgB,oBAAoB,YAAsD;CACxF,OAAO,CAAC,CAAC,WAAW;AACtB;;AAGA,MAAa,yBAAyB;AAEtC,SAAgB,oBAAoB,MAAuB;CACzD,OAAO,KAAK,UAAU,OAAO,uBAAuB,KAAK,IAAI;AAC/D"}
package/dist/undo.d.ts CHANGED
@@ -1,2 +1,93 @@
1
- import { DEFAULT_HISTORY_LIMIT, UndoEntry, UndoManager, UndoManagerOptions } from "./undo2.js";
2
- export { DEFAULT_HISTORY_LIMIT, UndoEntry, UndoManager, UndoManagerOptions };
1
+ //#region src/undo.d.ts
2
+ interface UndoEntry {
3
+ label: string;
4
+ forward: () => void;
5
+ inverse: () => void;
6
+ coalesceKey?: string;
7
+ }
8
+ interface UndoManagerOptions {
9
+ limit?: number;
10
+ /** Called after recording, undoing, redoing, or clearing committed history. */
11
+ onChange?: () => void;
12
+ }
13
+ /** How many edits undo keeps by default. */
14
+ declare const DEFAULT_HISTORY_LIMIT = 200;
15
+ declare class UndoManager {
16
+ private undoStack;
17
+ private redoStack;
18
+ private batches;
19
+ private replaying;
20
+ private openEdits;
21
+ private readonly settlers;
22
+ private readonly limit;
23
+ private readonly onChange;
24
+ constructor(options?: UndoManagerOptions);
25
+ apply(entry: UndoEntry): void;
26
+ execute(entry: UndoEntry): void;
27
+ push(entry: UndoEntry): void;
28
+ record(entry: UndoEntry): void;
29
+ /**
30
+ * Records an entry as a step of its own, outside the batches being built, such as an agent's
31
+ * edit made while a colour picker is open. Batches settle first, so the step follows the
32
+ * changes they hold so far.
33
+ */
34
+ pushStep(entry: UndoEntry): void;
35
+ /**
36
+ * Registers a hook that commits an edit still being coalesced, such as a run of picker changes.
37
+ * Undo and redo run every hook first, so they act on the newest change.
38
+ */
39
+ onBeforeHistory(settle: () => void): () => void;
40
+ private settle;
41
+ undo(): string | null;
42
+ redo(): string | null;
43
+ beginBatch(label: string, coalesceKey?: string): void;
44
+ commitBatch(): void;
45
+ runBatch<T>(label: string, fn: () => T, coalesceKey?: string): T;
46
+ rollbackBatch(): void;
47
+ /** Abandon provisional history without replaying it or changing committed undo/redo entries. */
48
+ discardBatches(): void;
49
+ clear(): void;
50
+ /** Whether undo or redo is replaying a step, whose changes are history rather than new edits. */
51
+ get isReplaying(): boolean;
52
+ /**
53
+ * Adds a change that the newest step caused, as one an editor makes in response to it, so undo
54
+ * and redo apply them together. Inside a batch it joins the batch. False with no step to join.
55
+ */
56
+ extendLastStep(entry: UndoEntry): boolean;
57
+ private replay;
58
+ get isBatching(): boolean;
59
+ /**
60
+ * Marks an edit whose step is recorded when it ends, such as an agent's call that awaits fonts
61
+ * or a layout before it finishes. Returns the function that ends it; ending it twice is a no-op.
62
+ */
63
+ openEdit(): () => void;
64
+ /**
65
+ * Whether a batch or an edit opened with `openEdit` will record a step for the changes made now,
66
+ * so they are not edits outside the history.
67
+ */
68
+ get isRecording(): boolean;
69
+ /** Committed history, or changes in an open batch that a settling hook commits first. */
70
+ get canUndo(): boolean;
71
+ get canRedo(): boolean;
72
+ /**
73
+ * The entry `depth` steps below the top of the undo stack, so a caller that pushed entries
74
+ * can tell whether they are still the most recent ones.
75
+ */
76
+ peekUndo(depth?: number): UndoEntry | undefined;
77
+ /** The entry `depth` steps below the top of the redo stack, the next one Redo applies at 0. */
78
+ peekRedo(depth?: number): UndoEntry | undefined;
79
+ /**
80
+ * Whether `entry` is applied (on the undo stack) or undone (on the redo stack); null once it
81
+ * left the history, trimmed or dropped when an edit cleared Redo.
82
+ */
83
+ stateOf(entry: UndoEntry): 'applied' | 'undone' | null;
84
+ get undoLabel(): string | null;
85
+ get redoLabel(): string | null;
86
+ private get currentBatch();
87
+ private createBatchEntry;
88
+ private pushUndoEntry;
89
+ private trimUndoStack;
90
+ }
91
+ //#endregion
92
+ export { DEFAULT_HISTORY_LIMIT, UndoEntry, UndoManager, UndoManagerOptions };
93
+ //# sourceMappingURL=undo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"undo.d.ts","names":[],"sources":["../src/undo.ts"],"mappings":";UAAiB;EACf;EACA;EACA;EACA;;UAGe;EACf;;EAEA;;;cAUW;cAEA;UACH;UACA;UACA;UACA;UACA;mBACS;mBACA;mBACA;EAEL,YAAA,UAAS;EAKrB,MAAM,OAAO;EAIb,QAAQ,OAAO;EAKf,KAAK,OAAO;EAIZ,OAAO,OAAO;;;;;;EAcd,SAAS,OAAO;;;;;EAShB,gBAAgB;UAKR;EAIR;EAUA;EAUA,WAAW,eAAe;EAI1B;EAUA,SAAS,GAAG,eAAe,UAAU,GAAG,uBAAuB;EAY/D;;EAOA;EAIA;;MAQI;;;;;EAQJ,eAAe,OAAO;UAoBd;MASJ;;;;;EAQJ;;;;;MAcI;;MAKA;MAKA;;;;;EAQJ,SAAS,iBAAY;;EAKrB,SAAS,iBAAY;;;;;EAQrB,QAAQ,OAAO;MAMX;MAIA;cAIQ;UAIJ;UASA;UAeA"}
package/dist/undo.js CHANGED
@@ -1,2 +1,236 @@
1
- import { DEFAULT_HISTORY_LIMIT, UndoManager } from "./chunks/components/exposure.js";
1
+ //#region src/undo.ts
2
+ /** How many edits undo keeps by default. */
3
+ const DEFAULT_HISTORY_LIMIT = 200;
4
+ var UndoManager = class {
5
+ undoStack = [];
6
+ redoStack = [];
7
+ batches = [];
8
+ replaying = 0;
9
+ openEdits = 0;
10
+ settlers = /* @__PURE__ */ new Set();
11
+ limit;
12
+ onChange;
13
+ constructor(options = {}) {
14
+ this.limit = options.limit ?? 200;
15
+ this.onChange = options.onChange;
16
+ }
17
+ apply(entry) {
18
+ this.execute(entry);
19
+ }
20
+ execute(entry) {
21
+ entry.forward();
22
+ this.record(entry);
23
+ }
24
+ push(entry) {
25
+ this.record(entry);
26
+ }
27
+ record(entry) {
28
+ const batch = this.currentBatch;
29
+ if (batch) {
30
+ batch.entries.push(entry);
31
+ return;
32
+ }
33
+ this.pushUndoEntry(entry);
34
+ }
35
+ /**
36
+ * Records an entry as a step of its own, outside the batches being built, such as an agent's
37
+ * edit made while a colour picker is open. Batches settle first, so the step follows the
38
+ * changes they hold so far.
39
+ */
40
+ pushStep(entry) {
41
+ this.settle();
42
+ this.pushUndoEntry(entry);
43
+ }
44
+ /**
45
+ * Registers a hook that commits an edit still being coalesced, such as a run of picker changes.
46
+ * Undo and redo run every hook first, so they act on the newest change.
47
+ */
48
+ onBeforeHistory(settle) {
49
+ this.settlers.add(settle);
50
+ return () => this.settlers.delete(settle);
51
+ }
52
+ settle() {
53
+ for (const settle of this.settlers) settle();
54
+ }
55
+ undo() {
56
+ this.settle();
57
+ const entry = this.undoStack.pop();
58
+ if (!entry) return null;
59
+ this.replay(() => entry.inverse());
60
+ this.redoStack.push(entry);
61
+ this.onChange?.();
62
+ return entry.label;
63
+ }
64
+ redo() {
65
+ this.settle();
66
+ const entry = this.redoStack.pop();
67
+ if (!entry) return null;
68
+ this.replay(() => entry.forward());
69
+ this.undoStack.push(entry);
70
+ this.onChange?.();
71
+ return entry.label;
72
+ }
73
+ beginBatch(label, coalesceKey) {
74
+ this.batches.push({
75
+ label,
76
+ entries: [],
77
+ coalesceKey
78
+ });
79
+ }
80
+ commitBatch() {
81
+ const batch = this.batches.pop();
82
+ if (!batch || batch.entries.length === 0) return;
83
+ const entry = this.createBatchEntry(batch);
84
+ const parentBatch = this.currentBatch;
85
+ if (parentBatch) parentBatch.entries.push(entry);
86
+ else this.pushUndoEntry(entry);
87
+ }
88
+ runBatch(label, fn, coalesceKey) {
89
+ this.beginBatch(label, coalesceKey);
90
+ try {
91
+ const result = fn();
92
+ this.commitBatch();
93
+ return result;
94
+ } catch (error) {
95
+ this.rollbackBatch();
96
+ throw error;
97
+ }
98
+ }
99
+ rollbackBatch() {
100
+ const batch = this.batches.pop();
101
+ if (!batch) return;
102
+ for (const entry of batch.entries.toReversed()) entry.inverse();
103
+ }
104
+ /** Abandon provisional history without replaying it or changing committed undo/redo entries. */
105
+ discardBatches() {
106
+ this.batches = [];
107
+ }
108
+ clear() {
109
+ this.undoStack = [];
110
+ this.redoStack = [];
111
+ this.discardBatches();
112
+ this.onChange?.();
113
+ }
114
+ /** Whether undo or redo is replaying a step, whose changes are history rather than new edits. */
115
+ get isReplaying() {
116
+ return this.replaying > 0;
117
+ }
118
+ /**
119
+ * Adds a change that the newest step caused, as one an editor makes in response to it, so undo
120
+ * and redo apply them together. Inside a batch it joins the batch. False with no step to join.
121
+ */
122
+ extendLastStep(entry) {
123
+ if (this.currentBatch) {
124
+ this.currentBatch.entries.push(entry);
125
+ return true;
126
+ }
127
+ const last = this.undoStack.at(-1);
128
+ if (!last) return false;
129
+ const { forward, inverse } = last;
130
+ last.forward = () => {
131
+ forward();
132
+ entry.forward();
133
+ };
134
+ last.inverse = () => {
135
+ entry.inverse();
136
+ inverse();
137
+ };
138
+ return true;
139
+ }
140
+ replay(step) {
141
+ this.replaying++;
142
+ try {
143
+ step();
144
+ } finally {
145
+ this.replaying--;
146
+ }
147
+ }
148
+ get isBatching() {
149
+ return this.batches.length > 0;
150
+ }
151
+ /**
152
+ * Marks an edit whose step is recorded when it ends, such as an agent's call that awaits fonts
153
+ * or a layout before it finishes. Returns the function that ends it; ending it twice is a no-op.
154
+ */
155
+ openEdit() {
156
+ this.openEdits++;
157
+ let open = true;
158
+ return () => {
159
+ if (!open) return;
160
+ open = false;
161
+ this.openEdits--;
162
+ };
163
+ }
164
+ /**
165
+ * Whether a batch or an edit opened with `openEdit` will record a step for the changes made now,
166
+ * so they are not edits outside the history.
167
+ */
168
+ get isRecording() {
169
+ return this.isBatching || this.openEdits > 0;
170
+ }
171
+ /** Committed history, or changes in an open batch that a settling hook commits first. */
172
+ get canUndo() {
173
+ if (this.undoStack.length > 0) return true;
174
+ return this.settlers.size > 0 && this.batches.some((batch) => batch.entries.length > 0);
175
+ }
176
+ get canRedo() {
177
+ return this.redoStack.length > 0;
178
+ }
179
+ /**
180
+ * The entry `depth` steps below the top of the undo stack, so a caller that pushed entries
181
+ * can tell whether they are still the most recent ones.
182
+ */
183
+ peekUndo(depth = 0) {
184
+ return this.undoStack.at(-1 - depth);
185
+ }
186
+ /** The entry `depth` steps below the top of the redo stack, the next one Redo applies at 0. */
187
+ peekRedo(depth = 0) {
188
+ return this.redoStack.at(-1 - depth);
189
+ }
190
+ /**
191
+ * Whether `entry` is applied (on the undo stack) or undone (on the redo stack); null once it
192
+ * left the history, trimmed or dropped when an edit cleared Redo.
193
+ */
194
+ stateOf(entry) {
195
+ if (this.undoStack.includes(entry)) return "applied";
196
+ if (this.redoStack.includes(entry)) return "undone";
197
+ return null;
198
+ }
199
+ get undoLabel() {
200
+ return this.undoStack.at(-1)?.label ?? null;
201
+ }
202
+ get redoLabel() {
203
+ return this.redoStack.at(-1)?.label ?? null;
204
+ }
205
+ get currentBatch() {
206
+ return this.batches.at(-1) ?? null;
207
+ }
208
+ createBatchEntry(batch) {
209
+ return {
210
+ label: batch.label,
211
+ forward: () => batch.entries.forEach((entry) => entry.forward()),
212
+ inverse: () => batch.entries.toReversed().forEach((entry) => entry.inverse()),
213
+ coalesceKey: batch.coalesceKey
214
+ };
215
+ }
216
+ pushUndoEntry(entry) {
217
+ const previous = this.undoStack.at(-1);
218
+ if (entry.coalesceKey && previous?.coalesceKey === entry.coalesceKey) this.undoStack[this.undoStack.length - 1] = {
219
+ ...entry,
220
+ inverse: previous.inverse
221
+ };
222
+ else this.undoStack.push(entry);
223
+ this.redoStack = [];
224
+ this.trimUndoStack();
225
+ this.onChange?.();
226
+ }
227
+ trimUndoStack() {
228
+ if (!Number.isFinite(this.limit) || this.limit <= 0) return;
229
+ const overflow = this.undoStack.length - this.limit;
230
+ if (overflow > 0) this.undoStack.splice(0, overflow);
231
+ }
232
+ };
233
+ //#endregion
2
234
  export { DEFAULT_HISTORY_LIMIT, UndoManager };
235
+
236
+ //# sourceMappingURL=undo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"undo.js","names":[],"sources":["../src/undo.ts"],"sourcesContent":["export interface UndoEntry {\n label: string\n forward: () => void\n inverse: () => void\n coalesceKey?: string\n}\n\nexport interface UndoManagerOptions {\n limit?: number\n /** Called after recording, undoing, redoing, or clearing committed history. */\n onChange?: () => void\n}\n\ninterface UndoBatch {\n label: string\n entries: UndoEntry[]\n coalesceKey?: string\n}\n\n/** How many edits undo keeps by default. */\nexport const DEFAULT_HISTORY_LIMIT = 200\n\nexport class UndoManager {\n private undoStack: UndoEntry[] = []\n private redoStack: UndoEntry[] = []\n private batches: UndoBatch[] = []\n private replaying = 0\n private openEdits = 0\n private readonly settlers = new Set<() => void>()\n private readonly limit: number\n private readonly onChange: (() => void) | undefined\n\n constructor(options: UndoManagerOptions = {}) {\n this.limit = options.limit ?? DEFAULT_HISTORY_LIMIT\n this.onChange = options.onChange\n }\n\n apply(entry: UndoEntry): void {\n this.execute(entry)\n }\n\n execute(entry: UndoEntry): void {\n entry.forward()\n this.record(entry)\n }\n\n push(entry: UndoEntry): void {\n this.record(entry)\n }\n\n record(entry: UndoEntry): void {\n const batch = this.currentBatch\n if (batch) {\n batch.entries.push(entry)\n return\n }\n this.pushUndoEntry(entry)\n }\n\n /**\n * Records an entry as a step of its own, outside the batches being built, such as an agent's\n * edit made while a colour picker is open. Batches settle first, so the step follows the\n * changes they hold so far.\n */\n pushStep(entry: UndoEntry): void {\n this.settle()\n this.pushUndoEntry(entry)\n }\n\n /**\n * Registers a hook that commits an edit still being coalesced, such as a run of picker changes.\n * Undo and redo run every hook first, so they act on the newest change.\n */\n onBeforeHistory(settle: () => void): () => void {\n this.settlers.add(settle)\n return () => this.settlers.delete(settle)\n }\n\n private settle() {\n for (const settle of this.settlers) settle()\n }\n\n undo(): string | null {\n this.settle()\n const entry = this.undoStack.pop()\n if (!entry) return null\n this.replay(() => entry.inverse())\n this.redoStack.push(entry)\n this.onChange?.()\n return entry.label\n }\n\n redo(): string | null {\n this.settle()\n const entry = this.redoStack.pop()\n if (!entry) return null\n this.replay(() => entry.forward())\n this.undoStack.push(entry)\n this.onChange?.()\n return entry.label\n }\n\n beginBatch(label: string, coalesceKey?: string): void {\n this.batches.push({ label, entries: [], coalesceKey })\n }\n\n commitBatch(): void {\n const batch = this.batches.pop()\n if (!batch || batch.entries.length === 0) return\n\n const entry = this.createBatchEntry(batch)\n const parentBatch = this.currentBatch\n if (parentBatch) parentBatch.entries.push(entry)\n else this.pushUndoEntry(entry)\n }\n\n runBatch<T>(label: string, fn: () => T, coalesceKey?: string): T {\n this.beginBatch(label, coalesceKey)\n try {\n const result = fn()\n this.commitBatch()\n return result\n } catch (error) {\n this.rollbackBatch()\n throw error\n }\n }\n\n rollbackBatch(): void {\n const batch = this.batches.pop()\n if (!batch) return\n for (const entry of batch.entries.toReversed()) entry.inverse()\n }\n\n /** Abandon provisional history without replaying it or changing committed undo/redo entries. */\n discardBatches(): void {\n this.batches = []\n }\n\n clear(): void {\n this.undoStack = []\n this.redoStack = []\n this.discardBatches()\n this.onChange?.()\n }\n\n /** Whether undo or redo is replaying a step, whose changes are history rather than new edits. */\n get isReplaying(): boolean {\n return this.replaying > 0\n }\n\n /**\n * Adds a change that the newest step caused, as one an editor makes in response to it, so undo\n * and redo apply them together. Inside a batch it joins the batch. False with no step to join.\n */\n extendLastStep(entry: UndoEntry): boolean {\n if (this.currentBatch) {\n this.currentBatch.entries.push(entry)\n return true\n }\n const last = this.undoStack.at(-1)\n if (!last) return false\n // The step keeps its identity, so callers that hold it still find it in the history.\n const { forward, inverse } = last\n last.forward = () => {\n forward()\n entry.forward()\n }\n last.inverse = () => {\n entry.inverse()\n inverse()\n }\n return true\n }\n\n private replay(step: () => void) {\n this.replaying++\n try {\n step()\n } finally {\n this.replaying--\n }\n }\n\n get isBatching(): boolean {\n return this.batches.length > 0\n }\n\n /**\n * Marks an edit whose step is recorded when it ends, such as an agent's call that awaits fonts\n * or a layout before it finishes. Returns the function that ends it; ending it twice is a no-op.\n */\n openEdit(): () => void {\n this.openEdits++\n let open = true\n return () => {\n if (!open) return\n open = false\n this.openEdits--\n }\n }\n\n /**\n * Whether a batch or an edit opened with `openEdit` will record a step for the changes made now,\n * so they are not edits outside the history.\n */\n get isRecording(): boolean {\n return this.isBatching || this.openEdits > 0\n }\n\n /** Committed history, or changes in an open batch that a settling hook commits first. */\n get canUndo(): boolean {\n if (this.undoStack.length > 0) return true\n return this.settlers.size > 0 && this.batches.some((batch) => batch.entries.length > 0)\n }\n\n get canRedo(): boolean {\n return this.redoStack.length > 0\n }\n\n /**\n * The entry `depth` steps below the top of the undo stack, so a caller that pushed entries\n * can tell whether they are still the most recent ones.\n */\n peekUndo(depth = 0): UndoEntry | undefined {\n return this.undoStack.at(-1 - depth)\n }\n\n /** The entry `depth` steps below the top of the redo stack, the next one Redo applies at 0. */\n peekRedo(depth = 0): UndoEntry | undefined {\n return this.redoStack.at(-1 - depth)\n }\n\n /**\n * Whether `entry` is applied (on the undo stack) or undone (on the redo stack); null once it\n * left the history, trimmed or dropped when an edit cleared Redo.\n */\n stateOf(entry: UndoEntry): 'applied' | 'undone' | null {\n if (this.undoStack.includes(entry)) return 'applied'\n if (this.redoStack.includes(entry)) return 'undone'\n return null\n }\n\n get undoLabel(): string | null {\n return this.undoStack.at(-1)?.label ?? null\n }\n\n get redoLabel(): string | null {\n return this.redoStack.at(-1)?.label ?? null\n }\n\n private get currentBatch(): UndoBatch | null {\n return this.batches.at(-1) ?? null\n }\n\n private createBatchEntry(batch: UndoBatch): UndoEntry {\n return {\n label: batch.label,\n forward: () => batch.entries.forEach((entry) => entry.forward()),\n inverse: () => batch.entries.toReversed().forEach((entry) => entry.inverse()),\n coalesceKey: batch.coalesceKey\n }\n }\n\n private pushUndoEntry(entry: UndoEntry): void {\n const previous = this.undoStack.at(-1)\n if (entry.coalesceKey && previous?.coalesceKey === entry.coalesceKey) {\n this.undoStack[this.undoStack.length - 1] = {\n ...entry,\n inverse: previous.inverse\n }\n } else {\n this.undoStack.push(entry)\n }\n this.redoStack = []\n this.trimUndoStack()\n this.onChange?.()\n }\n\n private trimUndoStack(): void {\n if (!Number.isFinite(this.limit) || this.limit <= 0) return\n const overflow = this.undoStack.length - this.limit\n if (overflow > 0) this.undoStack.splice(0, overflow)\n }\n}\n"],"mappings":";;AAoBA,MAAa,wBAAwB;AAErC,IAAa,cAAb,MAAyB;CACvB,YAAiC,CAAC;CAClC,YAAiC,CAAC;CAClC,UAA+B,CAAC;CAChC,YAAoB;CACpB,YAAoB;CACpB,2BAA4B,IAAI,IAAgB;CAChD;CACA;CAEA,YAAY,UAA8B,CAAC,GAAG;EAC5C,KAAK,QAAQ,QAAQ,SAAA;EACrB,KAAK,WAAW,QAAQ;CAC1B;CAEA,MAAM,OAAwB;EAC5B,KAAK,QAAQ,KAAK;CACpB;CAEA,QAAQ,OAAwB;EAC9B,MAAM,QAAQ;EACd,KAAK,OAAO,KAAK;CACnB;CAEA,KAAK,OAAwB;EAC3B,KAAK,OAAO,KAAK;CACnB;CAEA,OAAO,OAAwB;EAC7B,MAAM,QAAQ,KAAK;EACnB,IAAI,OAAO;GACT,MAAM,QAAQ,KAAK,KAAK;GACxB;EACF;EACA,KAAK,cAAc,KAAK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