@muloka/figma-console-mcp 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (443) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +898 -0
  3. package/dist/apps/design-system-dashboard/scoring/accessibility.d.ts +14 -0
  4. package/dist/apps/design-system-dashboard/scoring/accessibility.d.ts.map +1 -0
  5. package/dist/apps/design-system-dashboard/scoring/accessibility.js +278 -0
  6. package/dist/apps/design-system-dashboard/scoring/accessibility.js.map +1 -0
  7. package/dist/apps/design-system-dashboard/scoring/component-metadata.d.ts +29 -0
  8. package/dist/apps/design-system-dashboard/scoring/component-metadata.d.ts.map +1 -0
  9. package/dist/apps/design-system-dashboard/scoring/component-metadata.js +358 -0
  10. package/dist/apps/design-system-dashboard/scoring/component-metadata.js.map +1 -0
  11. package/dist/apps/design-system-dashboard/scoring/consistency.d.ts +14 -0
  12. package/dist/apps/design-system-dashboard/scoring/consistency.d.ts.map +1 -0
  13. package/dist/apps/design-system-dashboard/scoring/consistency.js +342 -0
  14. package/dist/apps/design-system-dashboard/scoring/consistency.js.map +1 -0
  15. package/dist/apps/design-system-dashboard/scoring/coverage.d.ts +14 -0
  16. package/dist/apps/design-system-dashboard/scoring/coverage.d.ts.map +1 -0
  17. package/dist/apps/design-system-dashboard/scoring/coverage.js +231 -0
  18. package/dist/apps/design-system-dashboard/scoring/coverage.js.map +1 -0
  19. package/dist/apps/design-system-dashboard/scoring/engine.d.ts +27 -0
  20. package/dist/apps/design-system-dashboard/scoring/engine.d.ts.map +1 -0
  21. package/dist/apps/design-system-dashboard/scoring/engine.js +93 -0
  22. package/dist/apps/design-system-dashboard/scoring/engine.js.map +1 -0
  23. package/dist/apps/design-system-dashboard/scoring/naming-semantics.d.ts +14 -0
  24. package/dist/apps/design-system-dashboard/scoring/naming-semantics.d.ts.map +1 -0
  25. package/dist/apps/design-system-dashboard/scoring/naming-semantics.js +309 -0
  26. package/dist/apps/design-system-dashboard/scoring/naming-semantics.js.map +1 -0
  27. package/dist/apps/design-system-dashboard/scoring/token-architecture.d.ts +14 -0
  28. package/dist/apps/design-system-dashboard/scoring/token-architecture.d.ts.map +1 -0
  29. package/dist/apps/design-system-dashboard/scoring/token-architecture.js +350 -0
  30. package/dist/apps/design-system-dashboard/scoring/token-architecture.js.map +1 -0
  31. package/dist/apps/design-system-dashboard/scoring/types.d.ts +89 -0
  32. package/dist/apps/design-system-dashboard/scoring/types.d.ts.map +1 -0
  33. package/dist/apps/design-system-dashboard/scoring/types.js +41 -0
  34. package/dist/apps/design-system-dashboard/scoring/types.js.map +1 -0
  35. package/dist/apps/design-system-dashboard/server.d.ts +24 -0
  36. package/dist/apps/design-system-dashboard/server.d.ts.map +1 -0
  37. package/dist/apps/design-system-dashboard/server.js +160 -0
  38. package/dist/apps/design-system-dashboard/server.js.map +1 -0
  39. package/dist/apps/token-browser/server.d.ts +26 -0
  40. package/dist/apps/token-browser/server.d.ts.map +1 -0
  41. package/dist/apps/token-browser/server.js +137 -0
  42. package/dist/apps/token-browser/server.js.map +1 -0
  43. package/dist/browser/base.d.ts +58 -0
  44. package/dist/browser/base.d.ts.map +1 -0
  45. package/dist/browser/base.js +6 -0
  46. package/dist/browser/base.js.map +1 -0
  47. package/dist/browser/local.d.ts +87 -0
  48. package/dist/browser/local.d.ts.map +1 -0
  49. package/dist/browser/local.js +318 -0
  50. package/dist/browser/local.js.map +1 -0
  51. package/dist/cloudflare/apps/design-system-dashboard/scoring/accessibility.js +277 -0
  52. package/dist/cloudflare/apps/design-system-dashboard/scoring/component-metadata.js +357 -0
  53. package/dist/cloudflare/apps/design-system-dashboard/scoring/consistency.js +341 -0
  54. package/dist/cloudflare/apps/design-system-dashboard/scoring/coverage.js +230 -0
  55. package/dist/cloudflare/apps/design-system-dashboard/scoring/engine.js +92 -0
  56. package/dist/cloudflare/apps/design-system-dashboard/scoring/naming-semantics.js +308 -0
  57. package/dist/cloudflare/apps/design-system-dashboard/scoring/token-architecture.js +349 -0
  58. package/dist/cloudflare/apps/design-system-dashboard/scoring/types.js +40 -0
  59. package/dist/cloudflare/apps/design-system-dashboard/server.js +159 -0
  60. package/dist/cloudflare/apps/token-browser/server.js +136 -0
  61. package/dist/cloudflare/browser-manager.js +157 -0
  62. package/dist/cloudflare/core/accessibility-tools.js +361 -0
  63. package/dist/cloudflare/core/annotation-tools.js +230 -0
  64. package/dist/cloudflare/core/cloud-websocket-connector.js +419 -0
  65. package/dist/cloudflare/core/cloud-websocket-relay.js +198 -0
  66. package/dist/cloudflare/core/comment-tools.js +292 -0
  67. package/dist/cloudflare/core/config.js +153 -0
  68. package/dist/cloudflare/core/console-monitor.js +427 -0
  69. package/dist/cloudflare/core/deep-component-tools.js +128 -0
  70. package/dist/cloudflare/core/design-code-tools.js +2793 -0
  71. package/dist/cloudflare/core/design-system-manifest.js +265 -0
  72. package/dist/cloudflare/core/design-system-tools.js +882 -0
  73. package/dist/cloudflare/core/diagnose-tool.js +100 -0
  74. package/dist/cloudflare/core/diff/changelog-formatter.js +275 -0
  75. package/dist/cloudflare/core/diff/diff-engine.js +334 -0
  76. package/dist/cloudflare/core/diff/property-compare.js +36 -0
  77. package/dist/cloudflare/core/diff/version-cache.js +74 -0
  78. package/dist/cloudflare/core/enrichment/enrichment-service.js +374 -0
  79. package/dist/cloudflare/core/enrichment/index.js +7 -0
  80. package/dist/cloudflare/core/enrichment/relationship-mapper.js +351 -0
  81. package/dist/cloudflare/core/enrichment/style-resolver.js +346 -0
  82. package/dist/cloudflare/core/figjam-tools.js +547 -0
  83. package/dist/cloudflare/core/figma-api.js +509 -0
  84. package/dist/cloudflare/core/figma-connector.js +7 -0
  85. package/dist/cloudflare/core/figma-reconstruction-spec.js +402 -0
  86. package/dist/cloudflare/core/figma-style-extractor.js +311 -0
  87. package/dist/cloudflare/core/figma-tools.js +3302 -0
  88. package/dist/cloudflare/core/identity.js +96 -0
  89. package/dist/cloudflare/core/library-tools.js +580 -0
  90. package/dist/cloudflare/core/logger.js +53 -0
  91. package/dist/cloudflare/core/port-discovery.js +935 -0
  92. package/dist/cloudflare/core/resolve-package-root.js +11 -0
  93. package/dist/cloudflare/core/slides-tools.js +714 -0
  94. package/dist/cloudflare/core/slot-tools.js +334 -0
  95. package/dist/cloudflare/core/snippet-injector.js +96 -0
  96. package/dist/cloudflare/core/tokens/alias-resolver.js +205 -0
  97. package/dist/cloudflare/core/tokens/config.js +294 -0
  98. package/dist/cloudflare/core/tokens/dialect.js +232 -0
  99. package/dist/cloudflare/core/tokens/figma-converter.js +323 -0
  100. package/dist/cloudflare/core/tokens/formatters/css-vars.js +338 -0
  101. package/dist/cloudflare/core/tokens/formatters/dtcg.js +376 -0
  102. package/dist/cloudflare/core/tokens/formatters/index.js +45 -0
  103. package/dist/cloudflare/core/tokens/formatters/json.js +205 -0
  104. package/dist/cloudflare/core/tokens/formatters/less.js +4 -0
  105. package/dist/cloudflare/core/tokens/formatters/scss.js +258 -0
  106. package/dist/cloudflare/core/tokens/formatters/stubs.js +13 -0
  107. package/dist/cloudflare/core/tokens/formatters/style-dictionary-v3.js +213 -0
  108. package/dist/cloudflare/core/tokens/formatters/tailwind-v3.js +237 -0
  109. package/dist/cloudflare/core/tokens/formatters/tailwind-v4.js +335 -0
  110. package/dist/cloudflare/core/tokens/formatters/tokens-studio.js +256 -0
  111. package/dist/cloudflare/core/tokens/formatters/ts-module.js +198 -0
  112. package/dist/cloudflare/core/tokens/index.js +16 -0
  113. package/dist/cloudflare/core/tokens/parsers/css-vars.js +4 -0
  114. package/dist/cloudflare/core/tokens/parsers/dtcg.js +280 -0
  115. package/dist/cloudflare/core/tokens/parsers/index.js +138 -0
  116. package/dist/cloudflare/core/tokens/parsers/json.js +7 -0
  117. package/dist/cloudflare/core/tokens/parsers/scss.js +4 -0
  118. package/dist/cloudflare/core/tokens/parsers/stubs.js +20 -0
  119. package/dist/cloudflare/core/tokens/parsers/style-dictionary-v3.js +4 -0
  120. package/dist/cloudflare/core/tokens/parsers/tailwind-v3.js +4 -0
  121. package/dist/cloudflare/core/tokens/parsers/tailwind-v4.js +4 -0
  122. package/dist/cloudflare/core/tokens/parsers/tokens-studio.js +4 -0
  123. package/dist/cloudflare/core/tokens/schemas.js +152 -0
  124. package/dist/cloudflare/core/tokens/transforms/color.js +12 -0
  125. package/dist/cloudflare/core/tokens/transforms/index.js +29 -0
  126. package/dist/cloudflare/core/tokens/transforms/size.js +7 -0
  127. package/dist/cloudflare/core/tokens/types.js +18 -0
  128. package/dist/cloudflare/core/tokens-tools.js +1788 -0
  129. package/dist/cloudflare/core/types/design-code.js +4 -0
  130. package/dist/cloudflare/core/types/enriched.js +5 -0
  131. package/dist/cloudflare/core/types/index.js +4 -0
  132. package/dist/cloudflare/core/variable-resolver.js +85 -0
  133. package/dist/cloudflare/core/version-tools.js +1199 -0
  134. package/dist/cloudflare/core/websocket-connector.js +436 -0
  135. package/dist/cloudflare/core/websocket-server.js +956 -0
  136. package/dist/cloudflare/core/write-tools.js +2506 -0
  137. package/dist/cloudflare/index.js +3010 -0
  138. package/dist/core/accessibility-tools.d.ts +21 -0
  139. package/dist/core/accessibility-tools.d.ts.map +1 -0
  140. package/dist/core/accessibility-tools.js +362 -0
  141. package/dist/core/accessibility-tools.js.map +1 -0
  142. package/dist/core/annotation-tools.d.ts +14 -0
  143. package/dist/core/annotation-tools.d.ts.map +1 -0
  144. package/dist/core/annotation-tools.js +231 -0
  145. package/dist/core/annotation-tools.js.map +1 -0
  146. package/dist/core/comment-tools.d.ts +11 -0
  147. package/dist/core/comment-tools.d.ts.map +1 -0
  148. package/dist/core/comment-tools.js +293 -0
  149. package/dist/core/comment-tools.js.map +1 -0
  150. package/dist/core/config.d.ts +17 -0
  151. package/dist/core/config.d.ts.map +1 -0
  152. package/dist/core/config.js +154 -0
  153. package/dist/core/config.js.map +1 -0
  154. package/dist/core/console-monitor.d.ts +82 -0
  155. package/dist/core/console-monitor.d.ts.map +1 -0
  156. package/dist/core/console-monitor.js +428 -0
  157. package/dist/core/console-monitor.js.map +1 -0
  158. package/dist/core/deep-component-tools.d.ts +14 -0
  159. package/dist/core/deep-component-tools.d.ts.map +1 -0
  160. package/dist/core/deep-component-tools.js +129 -0
  161. package/dist/core/deep-component-tools.js.map +1 -0
  162. package/dist/core/design-code-tools.d.ts +116 -0
  163. package/dist/core/design-code-tools.d.ts.map +1 -0
  164. package/dist/core/design-code-tools.js +2794 -0
  165. package/dist/core/design-code-tools.js.map +1 -0
  166. package/dist/core/design-system-manifest.d.ts +273 -0
  167. package/dist/core/design-system-manifest.d.ts.map +1 -0
  168. package/dist/core/design-system-manifest.js +266 -0
  169. package/dist/core/design-system-manifest.js.map +1 -0
  170. package/dist/core/design-system-tools.d.ts +67 -0
  171. package/dist/core/design-system-tools.d.ts.map +1 -0
  172. package/dist/core/design-system-tools.js +883 -0
  173. package/dist/core/design-system-tools.js.map +1 -0
  174. package/dist/core/diagnose-tool.d.ts +41 -0
  175. package/dist/core/diagnose-tool.d.ts.map +1 -0
  176. package/dist/core/diagnose-tool.js +101 -0
  177. package/dist/core/diagnose-tool.js.map +1 -0
  178. package/dist/core/diff/changelog-formatter.d.ts +35 -0
  179. package/dist/core/diff/changelog-formatter.d.ts.map +1 -0
  180. package/dist/core/diff/changelog-formatter.js +276 -0
  181. package/dist/core/diff/changelog-formatter.js.map +1 -0
  182. package/dist/core/diff/diff-engine.d.ts +127 -0
  183. package/dist/core/diff/diff-engine.d.ts.map +1 -0
  184. package/dist/core/diff/diff-engine.js +335 -0
  185. package/dist/core/diff/diff-engine.js.map +1 -0
  186. package/dist/core/diff/property-compare.d.ts +19 -0
  187. package/dist/core/diff/property-compare.d.ts.map +1 -0
  188. package/dist/core/diff/property-compare.js +37 -0
  189. package/dist/core/diff/property-compare.js.map +1 -0
  190. package/dist/core/diff/version-cache.d.ts +40 -0
  191. package/dist/core/diff/version-cache.d.ts.map +1 -0
  192. package/dist/core/diff/version-cache.js +75 -0
  193. package/dist/core/diff/version-cache.js.map +1 -0
  194. package/dist/core/enrichment/enrichment-service.d.ts +52 -0
  195. package/dist/core/enrichment/enrichment-service.d.ts.map +1 -0
  196. package/dist/core/enrichment/enrichment-service.js +375 -0
  197. package/dist/core/enrichment/enrichment-service.js.map +1 -0
  198. package/dist/core/enrichment/index.d.ts +8 -0
  199. package/dist/core/enrichment/index.d.ts.map +1 -0
  200. package/dist/core/enrichment/index.js +8 -0
  201. package/dist/core/enrichment/index.js.map +1 -0
  202. package/dist/core/enrichment/relationship-mapper.d.ts +106 -0
  203. package/dist/core/enrichment/relationship-mapper.d.ts.map +1 -0
  204. package/dist/core/enrichment/relationship-mapper.js +352 -0
  205. package/dist/core/enrichment/relationship-mapper.js.map +1 -0
  206. package/dist/core/enrichment/style-resolver.d.ts +85 -0
  207. package/dist/core/enrichment/style-resolver.d.ts.map +1 -0
  208. package/dist/core/enrichment/style-resolver.js +347 -0
  209. package/dist/core/enrichment/style-resolver.js.map +1 -0
  210. package/dist/core/figjam-tools.d.ts +8 -0
  211. package/dist/core/figjam-tools.d.ts.map +1 -0
  212. package/dist/core/figjam-tools.js +548 -0
  213. package/dist/core/figjam-tools.js.map +1 -0
  214. package/dist/core/figma-api.d.ts +254 -0
  215. package/dist/core/figma-api.d.ts.map +1 -0
  216. package/dist/core/figma-api.js +510 -0
  217. package/dist/core/figma-api.js.map +1 -0
  218. package/dist/core/figma-connector.d.ts +214 -0
  219. package/dist/core/figma-connector.d.ts.map +1 -0
  220. package/dist/core/figma-connector.js +8 -0
  221. package/dist/core/figma-connector.js.map +1 -0
  222. package/dist/core/figma-desktop-connector.d.ts +312 -0
  223. package/dist/core/figma-desktop-connector.d.ts.map +1 -0
  224. package/dist/core/figma-desktop-connector.js +1298 -0
  225. package/dist/core/figma-desktop-connector.js.map +1 -0
  226. package/dist/core/figma-reconstruction-spec.d.ts +166 -0
  227. package/dist/core/figma-reconstruction-spec.d.ts.map +1 -0
  228. package/dist/core/figma-reconstruction-spec.js +403 -0
  229. package/dist/core/figma-reconstruction-spec.js.map +1 -0
  230. package/dist/core/figma-style-extractor.d.ts +76 -0
  231. package/dist/core/figma-style-extractor.d.ts.map +1 -0
  232. package/dist/core/figma-style-extractor.js +312 -0
  233. package/dist/core/figma-style-extractor.js.map +1 -0
  234. package/dist/core/figma-tools.d.ts +22 -0
  235. package/dist/core/figma-tools.d.ts.map +1 -0
  236. package/dist/core/figma-tools.js +3303 -0
  237. package/dist/core/figma-tools.js.map +1 -0
  238. package/dist/core/identity.d.ts +41 -0
  239. package/dist/core/identity.d.ts.map +1 -0
  240. package/dist/core/identity.js +97 -0
  241. package/dist/core/identity.js.map +1 -0
  242. package/dist/core/library-tools.d.ts +17 -0
  243. package/dist/core/library-tools.d.ts.map +1 -0
  244. package/dist/core/library-tools.js +581 -0
  245. package/dist/core/library-tools.js.map +1 -0
  246. package/dist/core/logger.d.ts +22 -0
  247. package/dist/core/logger.d.ts.map +1 -0
  248. package/dist/core/logger.js +54 -0
  249. package/dist/core/logger.js.map +1 -0
  250. package/dist/core/port-discovery.d.ts +211 -0
  251. package/dist/core/port-discovery.d.ts.map +1 -0
  252. package/dist/core/port-discovery.js +936 -0
  253. package/dist/core/port-discovery.js.map +1 -0
  254. package/dist/core/resolve-package-root.d.ts +2 -0
  255. package/dist/core/resolve-package-root.d.ts.map +1 -0
  256. package/dist/core/resolve-package-root.js +12 -0
  257. package/dist/core/resolve-package-root.js.map +1 -0
  258. package/dist/core/slides-tools.d.ts +8 -0
  259. package/dist/core/slides-tools.d.ts.map +1 -0
  260. package/dist/core/slides-tools.js +715 -0
  261. package/dist/core/slides-tools.js.map +1 -0
  262. package/dist/core/slot-tools.d.ts +7 -0
  263. package/dist/core/slot-tools.d.ts.map +1 -0
  264. package/dist/core/slot-tools.js +335 -0
  265. package/dist/core/slot-tools.js.map +1 -0
  266. package/dist/core/snippet-injector.d.ts +24 -0
  267. package/dist/core/snippet-injector.d.ts.map +1 -0
  268. package/dist/core/snippet-injector.js +97 -0
  269. package/dist/core/snippet-injector.js.map +1 -0
  270. package/dist/core/tokens/alias-resolver.d.ts +97 -0
  271. package/dist/core/tokens/alias-resolver.d.ts.map +1 -0
  272. package/dist/core/tokens/alias-resolver.js +206 -0
  273. package/dist/core/tokens/alias-resolver.js.map +1 -0
  274. package/dist/core/tokens/config.d.ts +380 -0
  275. package/dist/core/tokens/config.d.ts.map +1 -0
  276. package/dist/core/tokens/config.js +295 -0
  277. package/dist/core/tokens/config.js.map +1 -0
  278. package/dist/core/tokens/dialect.d.ts +107 -0
  279. package/dist/core/tokens/dialect.d.ts.map +1 -0
  280. package/dist/core/tokens/dialect.js +233 -0
  281. package/dist/core/tokens/dialect.js.map +1 -0
  282. package/dist/core/tokens/figma-converter.d.ts +102 -0
  283. package/dist/core/tokens/figma-converter.d.ts.map +1 -0
  284. package/dist/core/tokens/figma-converter.js +324 -0
  285. package/dist/core/tokens/figma-converter.js.map +1 -0
  286. package/dist/core/tokens/formatters/css-vars.d.ts +24 -0
  287. package/dist/core/tokens/formatters/css-vars.d.ts.map +1 -0
  288. package/dist/core/tokens/formatters/css-vars.js +339 -0
  289. package/dist/core/tokens/formatters/css-vars.js.map +1 -0
  290. package/dist/core/tokens/formatters/dtcg.d.ts +28 -0
  291. package/dist/core/tokens/formatters/dtcg.d.ts.map +1 -0
  292. package/dist/core/tokens/formatters/dtcg.js +377 -0
  293. package/dist/core/tokens/formatters/dtcg.js.map +1 -0
  294. package/dist/core/tokens/formatters/index.d.ts +30 -0
  295. package/dist/core/tokens/formatters/index.d.ts.map +1 -0
  296. package/dist/core/tokens/formatters/index.js +46 -0
  297. package/dist/core/tokens/formatters/index.js.map +1 -0
  298. package/dist/core/tokens/formatters/json.d.ts +37 -0
  299. package/dist/core/tokens/formatters/json.d.ts.map +1 -0
  300. package/dist/core/tokens/formatters/json.js +206 -0
  301. package/dist/core/tokens/formatters/json.js.map +1 -0
  302. package/dist/core/tokens/formatters/less.d.ts +4 -0
  303. package/dist/core/tokens/formatters/less.d.ts.map +1 -0
  304. package/dist/core/tokens/formatters/less.js +5 -0
  305. package/dist/core/tokens/formatters/less.js.map +1 -0
  306. package/dist/core/tokens/formatters/scss.d.ts +26 -0
  307. package/dist/core/tokens/formatters/scss.d.ts.map +1 -0
  308. package/dist/core/tokens/formatters/scss.js +259 -0
  309. package/dist/core/tokens/formatters/scss.js.map +1 -0
  310. package/dist/core/tokens/formatters/stubs.d.ts +9 -0
  311. package/dist/core/tokens/formatters/stubs.d.ts.map +1 -0
  312. package/dist/core/tokens/formatters/stubs.js +14 -0
  313. package/dist/core/tokens/formatters/stubs.js.map +1 -0
  314. package/dist/core/tokens/formatters/style-dictionary-v3.d.ts +45 -0
  315. package/dist/core/tokens/formatters/style-dictionary-v3.d.ts.map +1 -0
  316. package/dist/core/tokens/formatters/style-dictionary-v3.js +214 -0
  317. package/dist/core/tokens/formatters/style-dictionary-v3.js.map +1 -0
  318. package/dist/core/tokens/formatters/tailwind-v3.d.ts +37 -0
  319. package/dist/core/tokens/formatters/tailwind-v3.d.ts.map +1 -0
  320. package/dist/core/tokens/formatters/tailwind-v3.js +238 -0
  321. package/dist/core/tokens/formatters/tailwind-v3.js.map +1 -0
  322. package/dist/core/tokens/formatters/tailwind-v4.d.ts +41 -0
  323. package/dist/core/tokens/formatters/tailwind-v4.d.ts.map +1 -0
  324. package/dist/core/tokens/formatters/tailwind-v4.js +336 -0
  325. package/dist/core/tokens/formatters/tailwind-v4.js.map +1 -0
  326. package/dist/core/tokens/formatters/tokens-studio.d.ts +44 -0
  327. package/dist/core/tokens/formatters/tokens-studio.d.ts.map +1 -0
  328. package/dist/core/tokens/formatters/tokens-studio.js +257 -0
  329. package/dist/core/tokens/formatters/tokens-studio.js.map +1 -0
  330. package/dist/core/tokens/formatters/ts-module.d.ts +35 -0
  331. package/dist/core/tokens/formatters/ts-module.d.ts.map +1 -0
  332. package/dist/core/tokens/formatters/ts-module.js +199 -0
  333. package/dist/core/tokens/formatters/ts-module.js.map +1 -0
  334. package/dist/core/tokens/index.d.ts +18 -0
  335. package/dist/core/tokens/index.d.ts.map +1 -0
  336. package/dist/core/tokens/index.js +17 -0
  337. package/dist/core/tokens/index.js.map +1 -0
  338. package/dist/core/tokens/parsers/css-vars.d.ts +3 -0
  339. package/dist/core/tokens/parsers/css-vars.d.ts.map +1 -0
  340. package/dist/core/tokens/parsers/css-vars.js +5 -0
  341. package/dist/core/tokens/parsers/css-vars.js.map +1 -0
  342. package/dist/core/tokens/parsers/dtcg.d.ts +21 -0
  343. package/dist/core/tokens/parsers/dtcg.d.ts.map +1 -0
  344. package/dist/core/tokens/parsers/dtcg.js +281 -0
  345. package/dist/core/tokens/parsers/dtcg.js.map +1 -0
  346. package/dist/core/tokens/parsers/index.d.ts +37 -0
  347. package/dist/core/tokens/parsers/index.d.ts.map +1 -0
  348. package/dist/core/tokens/parsers/index.js +139 -0
  349. package/dist/core/tokens/parsers/index.js.map +1 -0
  350. package/dist/core/tokens/parsers/json.d.ts +4 -0
  351. package/dist/core/tokens/parsers/json.d.ts.map +1 -0
  352. package/dist/core/tokens/parsers/json.js +8 -0
  353. package/dist/core/tokens/parsers/json.js.map +1 -0
  354. package/dist/core/tokens/parsers/scss.d.ts +3 -0
  355. package/dist/core/tokens/parsers/scss.d.ts.map +1 -0
  356. package/dist/core/tokens/parsers/scss.js +5 -0
  357. package/dist/core/tokens/parsers/scss.js.map +1 -0
  358. package/dist/core/tokens/parsers/stubs.d.ts +15 -0
  359. package/dist/core/tokens/parsers/stubs.d.ts.map +1 -0
  360. package/dist/core/tokens/parsers/stubs.js +21 -0
  361. package/dist/core/tokens/parsers/stubs.js.map +1 -0
  362. package/dist/core/tokens/parsers/style-dictionary-v3.d.ts +3 -0
  363. package/dist/core/tokens/parsers/style-dictionary-v3.d.ts.map +1 -0
  364. package/dist/core/tokens/parsers/style-dictionary-v3.js +5 -0
  365. package/dist/core/tokens/parsers/style-dictionary-v3.js.map +1 -0
  366. package/dist/core/tokens/parsers/tailwind-v3.d.ts +3 -0
  367. package/dist/core/tokens/parsers/tailwind-v3.d.ts.map +1 -0
  368. package/dist/core/tokens/parsers/tailwind-v3.js +5 -0
  369. package/dist/core/tokens/parsers/tailwind-v3.js.map +1 -0
  370. package/dist/core/tokens/parsers/tailwind-v4.d.ts +3 -0
  371. package/dist/core/tokens/parsers/tailwind-v4.d.ts.map +1 -0
  372. package/dist/core/tokens/parsers/tailwind-v4.js +5 -0
  373. package/dist/core/tokens/parsers/tailwind-v4.js.map +1 -0
  374. package/dist/core/tokens/parsers/tokens-studio.d.ts +3 -0
  375. package/dist/core/tokens/parsers/tokens-studio.d.ts.map +1 -0
  376. package/dist/core/tokens/parsers/tokens-studio.js +5 -0
  377. package/dist/core/tokens/parsers/tokens-studio.js.map +1 -0
  378. package/dist/core/tokens/schemas.d.ts +155 -0
  379. package/dist/core/tokens/schemas.d.ts.map +1 -0
  380. package/dist/core/tokens/schemas.js +153 -0
  381. package/dist/core/tokens/schemas.js.map +1 -0
  382. package/dist/core/tokens/transforms/color.d.ts +9 -0
  383. package/dist/core/tokens/transforms/color.d.ts.map +1 -0
  384. package/dist/core/tokens/transforms/color.js +13 -0
  385. package/dist/core/tokens/transforms/color.js.map +1 -0
  386. package/dist/core/tokens/transforms/index.d.ts +36 -0
  387. package/dist/core/tokens/transforms/index.d.ts.map +1 -0
  388. package/dist/core/tokens/transforms/index.js +30 -0
  389. package/dist/core/tokens/transforms/index.js.map +1 -0
  390. package/dist/core/tokens/transforms/size.d.ts +7 -0
  391. package/dist/core/tokens/transforms/size.d.ts.map +1 -0
  392. package/dist/core/tokens/transforms/size.js +8 -0
  393. package/dist/core/tokens/transforms/size.js.map +1 -0
  394. package/dist/core/tokens/types.d.ts +284 -0
  395. package/dist/core/tokens/types.d.ts.map +1 -0
  396. package/dist/core/tokens/types.js +19 -0
  397. package/dist/core/tokens/types.js.map +1 -0
  398. package/dist/core/tokens-tools.d.ts +285 -0
  399. package/dist/core/tokens-tools.d.ts.map +1 -0
  400. package/dist/core/tokens-tools.js +1789 -0
  401. package/dist/core/tokens-tools.js.map +1 -0
  402. package/dist/core/types/design-code.d.ts +271 -0
  403. package/dist/core/types/design-code.d.ts.map +1 -0
  404. package/dist/core/types/design-code.js +5 -0
  405. package/dist/core/types/design-code.js.map +1 -0
  406. package/dist/core/types/enriched.d.ts +213 -0
  407. package/dist/core/types/enriched.d.ts.map +1 -0
  408. package/dist/core/types/enriched.js +6 -0
  409. package/dist/core/types/enriched.js.map +1 -0
  410. package/dist/core/types/index.d.ts +104 -0
  411. package/dist/core/types/index.d.ts.map +1 -0
  412. package/dist/core/types/index.js +5 -0
  413. package/dist/core/types/index.js.map +1 -0
  414. package/dist/core/variable-resolver.d.ts +45 -0
  415. package/dist/core/variable-resolver.d.ts.map +1 -0
  416. package/dist/core/variable-resolver.js +86 -0
  417. package/dist/core/variable-resolver.js.map +1 -0
  418. package/dist/core/version-tools.d.ts +59 -0
  419. package/dist/core/version-tools.d.ts.map +1 -0
  420. package/dist/core/version-tools.js +1200 -0
  421. package/dist/core/version-tools.js.map +1 -0
  422. package/dist/core/websocket-connector.d.ts +247 -0
  423. package/dist/core/websocket-connector.d.ts.map +1 -0
  424. package/dist/core/websocket-connector.js +437 -0
  425. package/dist/core/websocket-connector.js.map +1 -0
  426. package/dist/core/websocket-server.d.ts +290 -0
  427. package/dist/core/websocket-server.d.ts.map +1 -0
  428. package/dist/core/websocket-server.js +957 -0
  429. package/dist/core/websocket-server.js.map +1 -0
  430. package/dist/core/write-tools.d.ts +7 -0
  431. package/dist/core/write-tools.d.ts.map +1 -0
  432. package/dist/core/write-tools.js +2507 -0
  433. package/dist/core/write-tools.js.map +1 -0
  434. package/dist/local.d.ts +105 -0
  435. package/dist/local.d.ts.map +1 -0
  436. package/dist/local.js +3314 -0
  437. package/dist/local.js.map +1 -0
  438. package/figma-desktop-bridge/README.md +365 -0
  439. package/figma-desktop-bridge/code.js +7359 -0
  440. package/figma-desktop-bridge/icon.png +0 -0
  441. package/figma-desktop-bridge/manifest.json +67 -0
  442. package/figma-desktop-bridge/ui.html +2783 -0
  443. package/package.json +103 -0
@@ -0,0 +1,153 @@
1
+ /**
2
+ * Zod schemas for the figma_export_tokens and figma_import_tokens MCP tools.
3
+ *
4
+ * Kept in a dedicated file because they're the AI-facing surface of the token
5
+ * sync engine — the descriptions matter for prompt comprehension, and they
6
+ * need to stay in sync with `src/core/tokens/types.ts` (the internal model).
7
+ */
8
+ import { z } from "zod";
9
+ /**
10
+ * Output format enum mirrors `ExportFormat` from `./types.ts`. Listed in the
11
+ * same priority order — DTCG and Tokens Studio first as the canonical JSON
12
+ * outputs, then CSS-family formats, then code modules, then back-compat.
13
+ */
14
+ export const ExportFormatSchema = z.enum([
15
+ "dtcg",
16
+ "tokens-studio",
17
+ "css-vars",
18
+ "tailwind-v4",
19
+ "tailwind-v3",
20
+ "scss",
21
+ "less",
22
+ "ts-module",
23
+ "json-flat",
24
+ "json-nested",
25
+ "style-dictionary-v3",
26
+ ]);
27
+ export const ImportFormatSchema = z.enum([
28
+ "auto",
29
+ "dtcg",
30
+ "tokens-studio",
31
+ "css-vars",
32
+ "tailwind-v4",
33
+ "tailwind-v3-config",
34
+ "scss",
35
+ "style-dictionary-v3",
36
+ "json-flat",
37
+ "json-nested",
38
+ ]);
39
+ export const SyncStrategySchema = z.enum(["merge", "replace", "dry-run"]);
40
+ export const ConflictResolutionSchema = z.enum([
41
+ "ask",
42
+ "figma-wins",
43
+ "code-wins",
44
+ "skip",
45
+ ]);
46
+ const ColorFormatSchema = z.enum(["hex", "hex8", "rgba", "oklch", "hsl"]);
47
+ const SizeUnitSchema = z.enum(["px", "rem", "pt", "dp"]);
48
+ /**
49
+ * Schema for figma_export_tokens. Most fields are optional — the typical call
50
+ * is zero-arg, picking everything up from `tokens.config.json` autodiscovery.
51
+ */
52
+ export const ExportTokensInputSchema = z.object({
53
+ scope: z
54
+ .enum(["file", "collection"])
55
+ .optional()
56
+ .describe("Whether to export the entire file's variables ('file', default) or just specific collections via collectionIds."),
57
+ collectionIds: z
58
+ .array(z.string())
59
+ .optional()
60
+ .describe("Specific Figma collection IDs to export. Required when scope is 'collection'. Use figma_get_variables to enumerate available collections."),
61
+ modes: z
62
+ .union([z.array(z.string()), z.literal("all")])
63
+ .optional()
64
+ .describe("Modes to include in the output. 'all' (default) exports every mode in every collection. Pass an array like ['Light', 'Dark'] to filter."),
65
+ format: ExportFormatSchema.optional().describe("Specific output format to emit. When omitted, formats come from tokens.config.json's generated.formats list. Common starting choices: 'dtcg' for the canonical JSON, 'css-vars' for runtime CSS custom properties, 'tailwind-v4' for Tailwind v4 @theme blocks."),
66
+ outputPath: z
67
+ .string()
68
+ .optional()
69
+ .describe("Filesystem path to write the output file(s) to. Relative paths resolve against the project root (the directory containing tokens.config.json) or cwd if no config. When omitted, the output is returned inline in the response (suitable for the AI to inspect or write via its own file tools)."),
70
+ configPath: z
71
+ .string()
72
+ .optional()
73
+ .describe("Explicit path to a tokens.config.json file. When omitted, the tool walks up from cwd looking for one — typical case is zero-arg."),
74
+ strategy: SyncStrategySchema.optional().describe("How to handle existing output files. 'merge' (default) diffs against current contents and writes only changed tokens, preserving code-only additions. 'replace' wipes and rewrites. 'dry-run' computes the diff and reports what would change without writing."),
75
+ prefix: z
76
+ .string()
77
+ .optional()
78
+ .describe("Prefix prepended to every output token name (e.g. 'ds-', 'al-'). Only affects formatters that emit named tokens — DTCG and JSON outputs use unmodified paths."),
79
+ resolveAliases: z
80
+ .boolean()
81
+ .optional()
82
+ .describe("If true, alias references are resolved to literal values in the output. Default is false for JSON formats (preserves alias semantics) and true for CSS/SCSS/Tailwind/etc. (which can't natively express aliases)."),
83
+ splitByMode: z
84
+ .boolean()
85
+ .optional()
86
+ .describe("Emit one file per mode (e.g. tokens-light.css, tokens-dark.css). Default false (single file with all modes)."),
87
+ splitByCollection: z
88
+ .boolean()
89
+ .optional()
90
+ .describe("Emit one file per Figma collection. Default false. Useful when collections map to different runtime themes."),
91
+ dtcgDialect: z
92
+ .enum(["legacy", "2025"])
93
+ .optional()
94
+ .describe("DTCG dialect for dtcg/json-flat/json-nested outputs. legacy (default): hex-string colors, maximum compatibility (Style Dictionary v4, Tokens Studio). 2025: DTCG 2025.10 object colors/dimensions (Style Dictionary v5+). Other formats (css-vars, scss, tailwind, ts-module) render final code and ignore this option."),
95
+ colorFormat: ColorFormatSchema.optional().describe("Color value format in the output. Default: 'hex'. Use 'oklch' for modern Tailwind v4 charts."),
96
+ sizeUnit: SizeUnitSchema.optional().describe("Unit for dimension tokens. Default: 'rem' for web outputs, 'pt' for iOS, 'dp' for Android."),
97
+ remBase: z
98
+ .number()
99
+ .positive()
100
+ .optional()
101
+ .describe("Base font size in pixels for px→rem conversion. Default: 16."),
102
+ });
103
+ /**
104
+ * Schema for figma_import_tokens. Mirrors export's shape on the inverse
105
+ * direction: instead of producing files, this consumes payloads or files and
106
+ * pushes the diff to Figma.
107
+ */
108
+ export const ImportTokensInputSchema = z
109
+ .object({
110
+ format: ImportFormatSchema.optional().describe("Format of the input payload. 'auto' (default) detects from payload shape or file extension. Pass an explicit format if auto-detection misfires."),
111
+ payload: z
112
+ .string()
113
+ .optional()
114
+ .describe("Single-file content to import. Use this for one-shot imports without setting up tokens.config.json. Mutually exclusive with `files` and `configPath`."),
115
+ files: z
116
+ .array(z.object({
117
+ path: z.string().describe("Relative or absolute filesystem path."),
118
+ content: z.string().describe("File contents."),
119
+ }))
120
+ .optional()
121
+ .describe("Multi-file import (used for Tokens Studio's split-set format, or for projects with many DTCG source files). Mutually exclusive with `payload` and `configPath`."),
122
+ configPath: z
123
+ .string()
124
+ .optional()
125
+ .describe("Explicit path to tokens.config.json. When omitted, the tool autodiscovers and uses the config's source.dir to find files. Mutually exclusive with `payload` and `files`."),
126
+ strategy: SyncStrategySchema.optional().describe("How to apply changes. 'merge' (default) diffs against current Figma state and applies only deltas, preserving Figma-only variables. 'replace' wipes the target collections and rewrites. 'dry-run' computes the diff and reports without touching Figma."),
127
+ collectionMapping: z
128
+ .record(z.string())
129
+ .optional()
130
+ .describe("Map input token set names to Figma collection names. Example: {'primitives': 'Primitive Tokens'}. When omitted, set names map 1:1 to collection names."),
131
+ modeMapping: z
132
+ .record(z.string())
133
+ .optional()
134
+ .describe("Map input mode names to Figma mode names. Useful when source uses 'light'/'dark' and Figma uses 'Light'/'Dark'. Defaults to 1:1 mapping with case preservation."),
135
+ prefix: z
136
+ .string()
137
+ .optional()
138
+ .describe("Prefix to strip from input token names on import. E.g. with prefix 'ds-', a token named '--ds-color-primary' becomes 'color/primary'."),
139
+ onConflict: ConflictResolutionSchema.optional().describe("How to resolve true two-sided conflicts (both Figma and code changed the same token since last sync). 'ask' (default) surfaces the conflict and writes nothing. 'figma-wins' / 'code-wins' apply the corresponding side. 'skip' leaves conflicted tokens alone but proceeds with the rest."),
140
+ dryRun: z
141
+ .boolean()
142
+ .optional()
143
+ .describe("Shorthand for strategy: 'dry-run'. Computes the diff and returns a preview without applying any changes to Figma."),
144
+ })
145
+ .refine((data) => {
146
+ // Exactly one of payload / files / configPath should be set (or none,
147
+ // which triggers tokens.config.json autodiscovery).
148
+ const sources = [data.payload, data.files, data.configPath].filter((x) => x !== undefined);
149
+ return sources.length <= 1;
150
+ }, {
151
+ message: "Pass at most one of: payload, files, configPath. (Or none, to autodiscover tokens.config.json.)",
152
+ });
153
+ //# sourceMappingURL=schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/core/tokens/schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC;IACvC,MAAM;IACN,eAAe;IACf,UAAU;IACV,aAAa;IACb,aAAa;IACb,MAAM;IACN,MAAM;IACN,WAAW;IACX,WAAW;IACX,aAAa;IACb,qBAAqB;CACtB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC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,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,CACvB,CAAC;IACF,OAAO,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC;AAC7B,CAAC,EACD;IACE,OAAO,EACL,iGAAiG;CACpG,CACF,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Color value transforms. Convert between hex, hex8 (with alpha), rgba, oklch,
3
+ * and hsl representations. Stub — DTCG and CSS-vars output preserve source
4
+ * values; format-specific transforms will land alongside the Tailwind v4 /
5
+ * SCSS formatters.
6
+ */
7
+ import type { Transform } from "./index.js";
8
+ export declare const colorToFormat: Transform;
9
+ //# sourceMappingURL=color.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../../src/core/tokens/transforms/color.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAoB,MAAM,YAAY,CAAC;AAE9D,eAAO,MAAM,aAAa,EAAE,SAS3B,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Color value transforms. Convert between hex, hex8 (with alpha), rgba, oklch,
3
+ * and hsl representations. Stub — DTCG and CSS-vars output preserve source
4
+ * values; format-specific transforms will land alongside the Tailwind v4 /
5
+ * SCSS formatters.
6
+ */
7
+ export const colorToFormat = (value, _token, _opts) => {
8
+ // Pass through. The DTCG and CSS-vars formatters don't need transforms —
9
+ // they preserve / format source values inline. Hex↔oklch↔rgba etc. will be
10
+ // implemented when format-specific output requires conversion.
11
+ return value;
12
+ };
13
+ //# sourceMappingURL=color.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color.js","sourceRoot":"","sources":["../../../../src/core/tokens/transforms/color.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,MAAM,CAAC,MAAM,aAAa,GAAc,CACtC,KAAiB,EACjB,MAAa,EACb,KAAuB,EACvB,EAAE;IACF,yEAAyE;IACzE,2EAA2E;IAC3E,+DAA+D;IAC/D,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Token-value transforms. Each transform is a pure function that takes a
3
+ * TokenValue (and an options bag) and returns a transformed TokenValue.
4
+ *
5
+ * Transforms are composable — formatters call them in a pipeline appropriate
6
+ * for the output format (e.g. CSS variables need px→rem and string color
7
+ * normalization; DTCG output skips transforms entirely since it preserves the
8
+ * source representation).
9
+ *
10
+ * Currently ships stubs that pass values through unchanged. The DTCG and
11
+ * CSS variables formatters don't need transforms because they handle their
12
+ * own value formatting inline. Transforms will be implemented when the
13
+ * Tailwind v4 / SCSS / TS module formatters land.
14
+ */
15
+ import type { Token, TokenValue } from "../types.js";
16
+ export interface TransformOptions {
17
+ /** Desired color output format. Defaults to "hex". */
18
+ colorFormat?: "hex" | "hex8" | "rgba" | "oklch" | "hsl";
19
+ /** Desired dimension unit. Defaults to "rem" for web. */
20
+ sizeUnit?: "px" | "rem" | "pt" | "dp";
21
+ /** Base font size for px↔rem conversion. Defaults to 16. */
22
+ remBase?: number;
23
+ }
24
+ export interface Transform {
25
+ /**
26
+ * Apply the transform to a single token value. Returns a new value
27
+ * (transforms are pure).
28
+ */
29
+ (value: TokenValue, token: Token, opts: TransformOptions): TokenValue;
30
+ }
31
+ /**
32
+ * Run a pipeline of transforms on a token's value(s). Iterates every mode
33
+ * and applies each transform in order.
34
+ */
35
+ export declare function runTransforms(token: Token, transforms: Transform[], opts: TransformOptions): Token;
36
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/tokens/transforms/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,WAAW,gBAAgB;IAC/B,sDAAsD;IACtD,WAAW,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;IACxD,yDAAyD;IACzD,QAAQ,CAAC,EAAE,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC;IACtC,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,SAAS;IACxB;;;OAGG;IACH,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,gBAAgB,GAAG,UAAU,CAAC;CACvE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,SAAS,EAAE,EACvB,IAAI,EAAE,gBAAgB,GACrB,KAAK,CAUP"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Token-value transforms. Each transform is a pure function that takes a
3
+ * TokenValue (and an options bag) and returns a transformed TokenValue.
4
+ *
5
+ * Transforms are composable — formatters call them in a pipeline appropriate
6
+ * for the output format (e.g. CSS variables need px→rem and string color
7
+ * normalization; DTCG output skips transforms entirely since it preserves the
8
+ * source representation).
9
+ *
10
+ * Currently ships stubs that pass values through unchanged. The DTCG and
11
+ * CSS variables formatters don't need transforms because they handle their
12
+ * own value formatting inline. Transforms will be implemented when the
13
+ * Tailwind v4 / SCSS / TS module formatters land.
14
+ */
15
+ /**
16
+ * Run a pipeline of transforms on a token's value(s). Iterates every mode
17
+ * and applies each transform in order.
18
+ */
19
+ export function runTransforms(token, transforms, opts) {
20
+ const newValues = {};
21
+ for (const [mode, value] of Object.entries(token.values)) {
22
+ let result = value;
23
+ for (const transform of transforms) {
24
+ result = transform(result, token, opts);
25
+ }
26
+ newValues[mode] = result;
27
+ }
28
+ return { ...token, values: newValues };
29
+ }
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/tokens/transforms/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAqBH;;;GAGG;AACH,MAAM,UAAU,aAAa,CAC3B,KAAY,EACZ,UAAuB,EACvB,IAAsB;IAEtB,MAAM,SAAS,GAAoB,EAAE,CAAC;IACtC,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;QACzD,IAAI,MAAM,GAAG,KAAK,CAAC;QACnB,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;YACnC,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAC1C,CAAC;QACD,SAAS,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;IAC3B,CAAC;IACD,OAAO,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AACzC,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Dimension/size value transforms. Convert px ↔ rem ↔ pt ↔ dp. Stub —
3
+ * to be implemented when Tailwind v4 / SCSS / TS formatters ship.
4
+ */
5
+ import type { Transform } from "./index.js";
6
+ export declare const sizeToUnit: Transform;
7
+ //# sourceMappingURL=size.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"size.d.ts","sourceRoot":"","sources":["../../../../src/core/tokens/transforms/size.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAoB,MAAM,YAAY,CAAC;AAE9D,eAAO,MAAM,UAAU,EAAE,SAMxB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Dimension/size value transforms. Convert px ↔ rem ↔ pt ↔ dp. Stub —
3
+ * to be implemented when Tailwind v4 / SCSS / TS formatters ship.
4
+ */
5
+ export const sizeToUnit = (value, _token, _opts) => {
6
+ return value;
7
+ };
8
+ //# sourceMappingURL=size.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"size.js","sourceRoot":"","sources":["../../../../src/core/tokens/transforms/size.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,MAAM,CAAC,MAAM,UAAU,GAAc,CACnC,KAAiB,EACjB,MAAa,EACb,KAAuB,EACvB,EAAE;IACF,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
@@ -0,0 +1,284 @@
1
+ /**
2
+ * Canonical internal token model for figma-console-mcp's token sync engine.
3
+ *
4
+ * Every parser (DTCG, Tokens Studio, CSS vars, Tailwind, etc.) produces this
5
+ * shape. Every formatter (DTCG, CSS vars, Tailwind v4, SCSS, TS, etc.) consumes
6
+ * this shape. Keeps the engine fan-out clean: N parsers + M formatters means
7
+ * N + M modules, not N * M conversion pairs.
8
+ *
9
+ * Aligned with the DTCG (Design Tokens Community Group) W3C spec where
10
+ * possible — see https://tr.designtokens.org/format/ — but the internal model
11
+ * is richer because it carries Figma metadata, multi-mode values per-token,
12
+ * and our $extensions for round-trip ID preservation.
13
+ */
14
+ /**
15
+ * The DTCG-aligned set of token types. Maps directly to `$type` in DTCG output.
16
+ * Composite types (typography, shadow, gradient, etc.) have structured `$value`
17
+ * objects; primitive types have scalar values.
18
+ */
19
+ export type TokenType = "color" | "dimension" | "fontFamily" | "fontWeight" | "duration" | "cubicBezier" | "number" | "string" | "boolean" | "shadow" | "typography" | "gradient" | "border" | "transition" | "strokeStyle";
20
+ /**
21
+ * The DTCG composite token value shapes. Used inside TokenValue.literal when
22
+ * the token type is composite.
23
+ */
24
+ export interface TypographyValue {
25
+ fontFamily: string | string[];
26
+ fontSize: string | number;
27
+ fontWeight: string | number;
28
+ lineHeight?: string | number;
29
+ letterSpacing?: string | number;
30
+ }
31
+ export interface ShadowValue {
32
+ color: string;
33
+ offsetX: string | number;
34
+ offsetY: string | number;
35
+ blur: string | number;
36
+ spread?: string | number;
37
+ inset?: boolean;
38
+ }
39
+ export interface GradientStop {
40
+ color: string;
41
+ position: number;
42
+ }
43
+ export interface GradientValue {
44
+ type: "linear" | "radial" | "conic";
45
+ angle?: number;
46
+ stops: GradientStop[];
47
+ }
48
+ export interface BorderValue {
49
+ color: string;
50
+ width: string | number;
51
+ style: string;
52
+ }
53
+ export interface TransitionValue {
54
+ duration: string | number;
55
+ timingFunction: string | number[];
56
+ delay?: string | number;
57
+ }
58
+ /**
59
+ * A single token value. Either a literal (primitive scalar or composite object)
60
+ * or an alias reference to another token by its dot-path.
61
+ *
62
+ * Examples:
63
+ * { literal: "#4085F2" } // primitive color
64
+ * { reference: "color.primitive.blue.500" } // alias
65
+ * { literal: { fontFamily: "Inter", ... } } // composite typography
66
+ */
67
+ export interface TokenValue {
68
+ literal?: string | number | boolean | number[] | TypographyValue | ShadowValue | ShadowValue[] | GradientValue | BorderValue | TransitionValue | Record<string, unknown>;
69
+ reference?: string;
70
+ /**
71
+ * TRANSIENT — full-precision Figma rgba floats (0–1) carried alongside the
72
+ * hex-string literal for COLOR tokens. The DTCG 2025.10 dialect emits
73
+ * `components` from these floats instead of round-tripping through the
74
+ * 8-bit-quantized hex. Set only by the Figma converter; never serialized
75
+ * into output (formatters read it at render time, and lastSyncedValue /
76
+ * diff samples strip it via stripRawColorFromValues).
77
+ */
78
+ rawColor?: {
79
+ r: number;
80
+ g: number;
81
+ b: number;
82
+ a: number;
83
+ };
84
+ }
85
+ /**
86
+ * Our vendor namespace inside DTCG $extensions. Survives round-trip through
87
+ * any DTCG-compliant tool that preserves $extensions verbatim (Style
88
+ * Dictionary v4, Tokens Studio, Figma's announced 2026 native export, etc).
89
+ *
90
+ * The presence of `variableId` is what makes diff-aware merge non-destructive:
91
+ * renames on either side don't create duplicates because the ID is the
92
+ * primary match key.
93
+ */
94
+ export interface FigmaMcpExtensions {
95
+ /** Figma variable ID (`VariableID:1234:5678`). Survives renames. */
96
+ variableId?: string;
97
+ /** Figma collection ID. Used to route the variable to the right collection. */
98
+ collectionId?: string;
99
+ /**
100
+ * Figma's native resolvedType for the source variable (COLOR / FLOAT /
101
+ * STRING / BOOLEAN / TIMING / EASING). Import uses this to know the true
102
+ * write type — critically, TIMING and EASING variables are read-only via
103
+ * the Plugin API and must never be sent to setValueForMode.
104
+ */
105
+ figmaResolvedType?: string;
106
+ /**
107
+ * The original Figma variable name when it differs from the token path
108
+ * (e.g. TIMING/EASING variables carry a trailing "/Timing" or "/Easing"
109
+ * segment that we strip from the token path). Preserved for round-trip.
110
+ */
111
+ figmaName?: string;
112
+ /**
113
+ * Spring easing parameters per mode (mass/stiffness/damping) for EASING
114
+ * variables whose value can't be represented as a DTCG cubicBezier.
115
+ */
116
+ spring?: Record<string, unknown>;
117
+ /**
118
+ * Figma variable scopes (e.g. ["FILL_COLOR", "STROKE_COLOR"]). OMITTED
119
+ * when the variable has the default scoping (["ALL_SCOPES"] or empty) so
120
+ * legacy output stays byte-identical. Import semantics: an absent field
121
+ * means "no opinion" (never resets Figma-side scopes); an explicit
122
+ * ["ALL_SCOPES"] resets to the default.
123
+ */
124
+ scopes?: string[];
125
+ /**
126
+ * Figma per-platform code syntax (e.g. { WEB: "var(--color-primary)" }).
127
+ * OMITTED when empty. Import semantics: an absent field means "no
128
+ * opinion"; a present object is authoritative — platforms missing from it
129
+ * are removed via removeVariableCodeSyntax on apply.
130
+ */
131
+ codeSyntax?: Record<string, string>;
132
+ /**
133
+ * Formatter/parser round-trip markers (transient — written into DTCG
134
+ * output by the formatter, absorbed and stripped by the parser):
135
+ * `primaryMode` records which mode name the token's `$value` represents;
136
+ * `leafRemap` marks a leaf emitted under the reserved "@" key because its
137
+ * name collided with a group of the same name.
138
+ */
139
+ primaryMode?: string;
140
+ leafRemap?: boolean;
141
+ /**
142
+ * The value(s) that were synced to/from Figma the last time this tool ran.
143
+ * Used to detect true two-sided conflicts: if BOTH the current Figma value
144
+ * and the current code value differ from this, we don't have a clean winner.
145
+ */
146
+ lastSyncedValue?: Record<string, TokenValue>;
147
+ /** ISO timestamp of the last successful sync for this token. */
148
+ lastSyncedAt?: string;
149
+ }
150
+ /**
151
+ * A single design token in our internal model. Carries enough information to
152
+ * round-trip through Figma without losing identity, name, type, value, modes,
153
+ * description, or vendor extensions.
154
+ */
155
+ export interface Token {
156
+ /**
157
+ * Hierarchical path, e.g. ["color", "primary"] or
158
+ * ["typography", "heading", "1"]. Joined with "/" for display and most
159
+ * output formats. Joined with "." for DTCG alias references.
160
+ */
161
+ path: string[];
162
+ /** DTCG-aligned token type. */
163
+ type: TokenType;
164
+ /** Optional human-readable description (DTCG `$description`). */
165
+ description?: string;
166
+ /**
167
+ * Map of mode name → value. Single-mode tokens have one entry. Multi-mode
168
+ * tokens (typically theme tokens) have one entry per mode.
169
+ *
170
+ * Mode names match the corresponding Figma collection's mode names by
171
+ * default; can be remapped via tokens.config.json's modes.map.
172
+ */
173
+ values: Record<string, TokenValue>;
174
+ /**
175
+ * Vendor extensions. Our own metadata lives under
176
+ * `extensions["figma-console-mcp"]`. We preserve other vendors' extensions
177
+ * verbatim during round-trip (e.g. `studio.tokens` from Tokens Studio).
178
+ */
179
+ extensions?: Record<string, unknown> & {
180
+ "figma-console-mcp"?: FigmaMcpExtensions;
181
+ };
182
+ }
183
+ /**
184
+ * A grouping of related tokens. Maps 1:1 to a Figma variable collection.
185
+ *
186
+ * Examples: a "Primitives" set with raw color/spacing primitives; a "Semantic"
187
+ * set with aliases to primitives; a "Theme" set with light/dark mode values.
188
+ */
189
+ export interface TokenSet {
190
+ /** Display name. Maps to the Figma collection name. */
191
+ name: string;
192
+ description?: string;
193
+ /**
194
+ * Mode names in this set. Single-mode sets use a single mode (typically
195
+ * "Default" or "Value"). Multi-mode sets list each mode (e.g.
196
+ * ["Light", "Dark"]).
197
+ */
198
+ modes: string[];
199
+ tokens: Token[];
200
+ /** Set-level metadata. */
201
+ meta?: {
202
+ /** Figma collection ID. Set on first sync, used as primary match key. */
203
+ figmaCollectionId?: string;
204
+ /**
205
+ * Source files that contributed tokens to this set. Used by formatters
206
+ * that emit one-file-per-set to derive output filenames, and by parsers
207
+ * to track provenance for conflict reporting.
208
+ */
209
+ sourceFiles?: string[];
210
+ };
211
+ }
212
+ /**
213
+ * The top-level container that export produces and import consumes. Holds
214
+ * one or more TokenSets plus file-level metadata.
215
+ */
216
+ export interface TokenDocument {
217
+ /**
218
+ * Format identifier. Helps consumers detect our extended DTCG output
219
+ * (where we stash Figma IDs in $extensions) vs vanilla DTCG.
220
+ */
221
+ $schema?: "https://tr.designtokens.org/format/" | "https://figma-console-mcp.southleft.com/schemas/dtcg-extended-v1.json";
222
+ sets: TokenSet[];
223
+ meta?: {
224
+ /** Figma file key the document was exported from. */
225
+ figmaFileKey?: string;
226
+ /** ISO timestamp the document was generated/parsed. */
227
+ exportedAt?: string;
228
+ /** MCP version that produced/parsed the document. */
229
+ mcpVersion?: string;
230
+ };
231
+ }
232
+ /**
233
+ * The strategies both tools accept. Mirrored on export and import sides for
234
+ * predictability — same name, same semantic, opposite direction.
235
+ */
236
+ export type SyncStrategy = "merge" | "replace" | "dry-run";
237
+ /**
238
+ * How to resolve true two-sided conflicts (both Figma and code changed the
239
+ * same token since last sync).
240
+ */
241
+ export type ConflictResolution =
242
+ /** Surface the conflict to the AI/user, write nothing. */
243
+ "ask"
244
+ /** Figma's value wins, code gets overwritten. */
245
+ | "figma-wins"
246
+ /** Code's value wins, Figma gets overwritten. */
247
+ | "code-wins"
248
+ /** Skip the conflicted token, continue with the rest. */
249
+ | "skip";
250
+ /**
251
+ * Diff result for a single token. Produced by the matcher, consumed by the
252
+ * applier and the dry-run reporter.
253
+ */
254
+ export interface TokenDiff {
255
+ path: string[];
256
+ /** How the match was made — used for diagnostics and conflict explanation. */
257
+ matchedBy: "id" | "path" | "none";
258
+ /** What action the merge engine recommends. */
259
+ action: "create" | "update" | "rename" | "delete" | "no-op" | "conflict" | "preserve-other-side";
260
+ /** The token from the "left" side of the diff (typically Figma on export). */
261
+ before?: Token;
262
+ /** The token from the "right" side of the diff (typically code on export). */
263
+ after?: Token;
264
+ /** For conflicts: the last-synced value that diverged. */
265
+ lastSynced?: Record<string, TokenValue>;
266
+ /** Human-readable reason for the action, used in dry-run output. */
267
+ reason?: string;
268
+ }
269
+ /**
270
+ * Output formats supported by figma_export_tokens. Listed in priority order
271
+ * — earlier formats are the canonical/primary outputs.
272
+ */
273
+ export type ExportFormat = "dtcg" | "tokens-studio" | "css-vars" | "tailwind-v4" | "tailwind-v3" | "scss" | "less" | "ts-module" | "json-flat" | "json-nested" | "style-dictionary-v3";
274
+ /**
275
+ * Input formats supported by figma_import_tokens. `auto` triggers detection
276
+ * from payload structure or file extension.
277
+ */
278
+ export type ImportFormat = "auto" | "dtcg" | "tokens-studio" | "css-vars" | "tailwind-v4" | "tailwind-v3-config" | "scss" | "style-dictionary-v3" | "json-flat" | "json-nested";
279
+ /**
280
+ * Identifier returned in MCP-tagged responses so callers know which vendor
281
+ * extensions namespace to read.
282
+ */
283
+ export declare const FIGMA_MCP_EXTENSION_KEY: "figma-console-mcp";
284
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/tokens/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAEjB,OAAO,GACP,WAAW,GACX,YAAY,GACZ,YAAY,GACZ,UAAU,GACV,aAAa,GACb,QAAQ,GACR,QAAQ,GACR,SAAS,GAET,QAAQ,GACR,YAAY,GACZ,UAAU,GACV,QAAQ,GACR,YAAY,GACZ,aAAa,CAAC;AAElB;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC9B,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,OAA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;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,GAEpB,MAAM,GACN,eAAe,GAEf,UAAU,GACV,aAAa,GACb,aAAa,GACb,MAAM,GACN,MAAM,GAEN,WAAW,GACX,WAAW,GACX,aAAa,GAEb,qBAAqB,CAAC;AAE1B;;;GAGG;AACH,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,MAAM,GACN,eAAe,GACf,UAAU,GACV,aAAa,GACb,oBAAoB,GACpB,MAAM,GACN,qBAAqB,GACrB,WAAW,GACX,aAAa,CAAC;AAElB;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAG,mBAA4B,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Canonical internal token model for figma-console-mcp's token sync engine.
3
+ *
4
+ * Every parser (DTCG, Tokens Studio, CSS vars, Tailwind, etc.) produces this
5
+ * shape. Every formatter (DTCG, CSS vars, Tailwind v4, SCSS, TS, etc.) consumes
6
+ * this shape. Keeps the engine fan-out clean: N parsers + M formatters means
7
+ * N + M modules, not N * M conversion pairs.
8
+ *
9
+ * Aligned with the DTCG (Design Tokens Community Group) W3C spec where
10
+ * possible — see https://tr.designtokens.org/format/ — but the internal model
11
+ * is richer because it carries Figma metadata, multi-mode values per-token,
12
+ * and our $extensions for round-trip ID preservation.
13
+ */
14
+ /**
15
+ * Identifier returned in MCP-tagged responses so callers know which vendor
16
+ * extensions namespace to read.
17
+ */
18
+ export const FIGMA_MCP_EXTENSION_KEY = "figma-console-mcp";
19
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/tokens/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAqVH;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,mBAA4B,CAAC"}