@rien7/seji 0.0.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (414) hide show
  1. package/bin/design-surface.mjs +6 -0
  2. package/bin/postinstall.mjs +19 -0
  3. package/bin/seji.mjs +585 -0
  4. package/dist/agent/host.d.mts +34 -0
  5. package/dist/agent/host.mjs +387 -0
  6. package/dist/agent/messages.d.mts +9 -0
  7. package/dist/agent/messages.mjs +70 -0
  8. package/dist/agent/runtimes.mjs +157 -0
  9. package/dist/cli/app.mjs +321 -0
  10. package/dist/cli/appScan.mjs +284 -0
  11. package/dist/cli/catalog.mjs +78 -0
  12. package/dist/cli/component.mjs +165 -0
  13. package/dist/cli/consolidate.mjs +159 -0
  14. package/dist/cli/cssImport.mjs +68 -0
  15. package/dist/cli/dev.mjs +339 -0
  16. package/dist/cli/doctor.mjs +311 -0
  17. package/dist/cli/init.mjs +338 -0
  18. package/dist/cli/legacyNames.mjs +266 -0
  19. package/dist/cli/migrate.mjs +163 -0
  20. package/dist/cli/prompt.mjs +34 -0
  21. package/dist/cli/propose.mjs +208 -0
  22. package/dist/cli/providers.mjs +344 -0
  23. package/dist/cli/reviewOps.mjs +110 -0
  24. package/dist/cli/semver.mjs +45 -0
  25. package/dist/cli/setup.mjs +360 -0
  26. package/dist/cli/sketches.mjs +47 -0
  27. package/dist/cli/skills.mjs +150 -0
  28. package/dist/cli/snapshot.mjs +107 -0
  29. package/dist/cli/tokenOps.mjs +120 -0
  30. package/dist/cli/types.mjs +191 -0
  31. package/dist/cli/updater.mjs +274 -0
  32. package/dist/components/astIndex.mjs +992 -0
  33. package/dist/components/ops.mjs +1069 -0
  34. package/dist/editor/AgentProposalCard.d.ts +10 -0
  35. package/dist/editor/AgentProposalCard.d.ts.map +1 -0
  36. package/dist/editor/AgentProposalCard.js +31 -0
  37. package/dist/editor/AgentProposalCard.js.map +1 -0
  38. package/dist/editor/App.d.ts +2 -0
  39. package/dist/editor/App.d.ts.map +1 -0
  40. package/dist/editor/App.js +2834 -0
  41. package/dist/editor/App.js.map +1 -0
  42. package/dist/editor/CanvasHud.d.ts +12 -0
  43. package/dist/editor/CanvasHud.d.ts.map +1 -0
  44. package/dist/editor/CanvasHud.js +13 -0
  45. package/dist/editor/CanvasHud.js.map +1 -0
  46. package/dist/editor/CanvasSurface.d.ts +31 -0
  47. package/dist/editor/CanvasSurface.d.ts.map +1 -0
  48. package/dist/editor/CanvasSurface.js +270 -0
  49. package/dist/editor/CanvasSurface.js.map +1 -0
  50. package/dist/editor/CommentPopover.d.ts +17 -0
  51. package/dist/editor/CommentPopover.d.ts.map +1 -0
  52. package/dist/editor/CommentPopover.js +62 -0
  53. package/dist/editor/CommentPopover.js.map +1 -0
  54. package/dist/editor/Comments.d.ts +13 -0
  55. package/dist/editor/Comments.d.ts.map +1 -0
  56. package/dist/editor/Comments.js +41 -0
  57. package/dist/editor/Comments.js.map +1 -0
  58. package/dist/editor/ComponentPage.d.ts +28 -0
  59. package/dist/editor/ComponentPage.d.ts.map +1 -0
  60. package/dist/editor/ComponentPage.js +55 -0
  61. package/dist/editor/ComponentPage.js.map +1 -0
  62. package/dist/editor/ComponentPanel.d.ts +38 -0
  63. package/dist/editor/ComponentPanel.d.ts.map +1 -0
  64. package/dist/editor/ComponentPanel.js +275 -0
  65. package/dist/editor/ComponentPanel.js.map +1 -0
  66. package/dist/editor/Glyph.d.ts +51 -0
  67. package/dist/editor/Glyph.d.ts.map +1 -0
  68. package/dist/editor/Glyph.js +50 -0
  69. package/dist/editor/Glyph.js.map +1 -0
  70. package/dist/editor/History.d.ts +7 -0
  71. package/dist/editor/History.d.ts.map +1 -0
  72. package/dist/editor/History.js +51 -0
  73. package/dist/editor/History.js.map +1 -0
  74. package/dist/editor/Inspector.d.ts +56 -0
  75. package/dist/editor/Inspector.d.ts.map +1 -0
  76. package/dist/editor/Inspector.js +510 -0
  77. package/dist/editor/Inspector.js.map +1 -0
  78. package/dist/editor/LazyMount.d.ts +10 -0
  79. package/dist/editor/LazyMount.d.ts.map +1 -0
  80. package/dist/editor/LazyMount.js +29 -0
  81. package/dist/editor/LazyMount.js.map +1 -0
  82. package/dist/editor/LocaleSwitch.d.ts +3 -0
  83. package/dist/editor/LocaleSwitch.d.ts.map +1 -0
  84. package/dist/editor/LocaleSwitch.js +9 -0
  85. package/dist/editor/LocaleSwitch.js.map +1 -0
  86. package/dist/editor/PreviewFrame.d.ts +10 -0
  87. package/dist/editor/PreviewFrame.d.ts.map +1 -0
  88. package/dist/editor/PreviewFrame.js +22 -0
  89. package/dist/editor/PreviewFrame.js.map +1 -0
  90. package/dist/editor/ProjectIndex.d.ts +12 -0
  91. package/dist/editor/ProjectIndex.d.ts.map +1 -0
  92. package/dist/editor/ProjectIndex.js +43 -0
  93. package/dist/editor/ProjectIndex.js.map +1 -0
  94. package/dist/editor/PromoteComponent.d.ts +28 -0
  95. package/dist/editor/PromoteComponent.d.ts.map +1 -0
  96. package/dist/editor/PromoteComponent.js +33 -0
  97. package/dist/editor/PromoteComponent.js.map +1 -0
  98. package/dist/editor/PromoteForm.d.ts +18 -0
  99. package/dist/editor/PromoteForm.d.ts.map +1 -0
  100. package/dist/editor/PromoteForm.js +35 -0
  101. package/dist/editor/PromoteForm.js.map +1 -0
  102. package/dist/editor/PromoteToken.d.ts +31 -0
  103. package/dist/editor/PromoteToken.d.ts.map +1 -0
  104. package/dist/editor/PromoteToken.js +94 -0
  105. package/dist/editor/PromoteToken.js.map +1 -0
  106. package/dist/editor/StatePreviews.d.ts +28 -0
  107. package/dist/editor/StatePreviews.d.ts.map +1 -0
  108. package/dist/editor/StatePreviews.js +113 -0
  109. package/dist/editor/StatePreviews.js.map +1 -0
  110. package/dist/editor/ValueCombo.d.ts +51 -0
  111. package/dist/editor/ValueCombo.d.ts.map +1 -0
  112. package/dist/editor/ValueCombo.js +260 -0
  113. package/dist/editor/ValueCombo.js.map +1 -0
  114. package/dist/editor/agent/AgentPanel.d.ts +19 -0
  115. package/dist/editor/agent/AgentPanel.d.ts.map +1 -0
  116. package/dist/editor/agent/AgentPanel.js +271 -0
  117. package/dist/editor/agent/AgentPanel.js.map +1 -0
  118. package/dist/editor/agent/Markdown.d.ts +5 -0
  119. package/dist/editor/agent/Markdown.d.ts.map +1 -0
  120. package/dist/editor/agent/Markdown.js +28 -0
  121. package/dist/editor/agent/Markdown.js.map +1 -0
  122. package/dist/editor/agent/agentApi.d.ts +106 -0
  123. package/dist/editor/agent/agentApi.d.ts.map +1 -0
  124. package/dist/editor/agent/agentApi.js +66 -0
  125. package/dist/editor/agent/agentApi.js.map +1 -0
  126. package/dist/editor/agent/toolLines.d.ts +38 -0
  127. package/dist/editor/agent/toolLines.d.ts.map +1 -0
  128. package/dist/editor/agent/toolLines.js +159 -0
  129. package/dist/editor/agent/toolLines.js.map +1 -0
  130. package/dist/editor/agent/useAgent.d.ts +15 -0
  131. package/dist/editor/agent/useAgent.d.ts.map +1 -0
  132. package/dist/editor/agent/useAgent.js +65 -0
  133. package/dist/editor/agent/useAgent.js.map +1 -0
  134. package/dist/editor/api.d.ts +378 -0
  135. package/dist/editor/api.d.ts.map +1 -0
  136. package/dist/editor/api.js +247 -0
  137. package/dist/editor/api.js.map +1 -0
  138. package/dist/editor/camera.d.ts +18 -0
  139. package/dist/editor/camera.d.ts.map +1 -0
  140. package/dist/editor/camera.js +40 -0
  141. package/dist/editor/camera.js.map +1 -0
  142. package/dist/editor/canvas.d.ts +25 -0
  143. package/dist/editor/canvas.d.ts.map +1 -0
  144. package/dist/editor/canvas.js +35 -0
  145. package/dist/editor/canvas.js.map +1 -0
  146. package/dist/editor/changes/ChangesPage.d.ts +25 -0
  147. package/dist/editor/changes/ChangesPage.d.ts.map +1 -0
  148. package/dist/editor/changes/ChangesPage.js +132 -0
  149. package/dist/editor/changes/ChangesPage.js.map +1 -0
  150. package/dist/editor/changes/changeModel.d.ts +25 -0
  151. package/dist/editor/changes/changeModel.d.ts.map +1 -0
  152. package/dist/editor/changes/changeModel.js +81 -0
  153. package/dist/editor/changes/changeModel.js.map +1 -0
  154. package/dist/editor/changes/changeState.d.mts +29 -0
  155. package/dist/editor/changes/changeState.mjs +187 -0
  156. package/dist/editor/chrome/EditorChrome.d.ts +49 -0
  157. package/dist/editor/chrome/EditorChrome.d.ts.map +1 -0
  158. package/dist/editor/chrome/EditorChrome.js +21 -0
  159. package/dist/editor/chrome/EditorChrome.js.map +1 -0
  160. package/dist/editor/drafts.d.ts +46 -0
  161. package/dist/editor/drafts.d.ts.map +1 -0
  162. package/dist/editor/drafts.js +38 -0
  163. package/dist/editor/drafts.js.map +1 -0
  164. package/dist/editor/i18n.d.ts +29 -0
  165. package/dist/editor/i18n.d.ts.map +1 -0
  166. package/dist/editor/i18n.js +2320 -0
  167. package/dist/editor/i18n.js.map +1 -0
  168. package/dist/editor/iconStroke.d.ts +6 -0
  169. package/dist/editor/iconStroke.d.ts.map +1 -0
  170. package/dist/editor/iconStroke.js +6 -0
  171. package/dist/editor/iconStroke.js.map +1 -0
  172. package/dist/editor/main.d.ts +2 -0
  173. package/dist/editor/main.d.ts.map +1 -0
  174. package/dist/editor/main.js +14 -0
  175. package/dist/editor/main.js.map +1 -0
  176. package/dist/editor/model.d.ts +16 -0
  177. package/dist/editor/model.d.ts.map +1 -0
  178. package/dist/editor/model.js +11 -0
  179. package/dist/editor/model.js.map +1 -0
  180. package/dist/editor/reasons.d.ts +44 -0
  181. package/dist/editor/reasons.d.ts.map +1 -0
  182. package/dist/editor/reasons.js +131 -0
  183. package/dist/editor/reasons.js.map +1 -0
  184. package/dist/editor/reviewLifecycle.d.ts +8 -0
  185. package/dist/editor/reviewLifecycle.d.ts.map +1 -0
  186. package/dist/editor/reviewLifecycle.js +21 -0
  187. package/dist/editor/reviewLifecycle.js.map +1 -0
  188. package/dist/editor/styles.css +8737 -0
  189. package/dist/editor/tokenMatch.d.ts +59 -0
  190. package/dist/editor/tokenMatch.d.ts.map +1 -0
  191. package/dist/editor/tokenMatch.js +198 -0
  192. package/dist/editor/tokenMatch.js.map +1 -0
  193. package/dist/editor/tokens/ConsolidatePage.d.ts +16 -0
  194. package/dist/editor/tokens/ConsolidatePage.d.ts.map +1 -0
  195. package/dist/editor/tokens/ConsolidatePage.js +244 -0
  196. package/dist/editor/tokens/ConsolidatePage.js.map +1 -0
  197. package/dist/editor/tokens/TokenActivity.d.ts +18 -0
  198. package/dist/editor/tokens/TokenActivity.d.ts.map +1 -0
  199. package/dist/editor/tokens/TokenActivity.js +18 -0
  200. package/dist/editor/tokens/TokenActivity.js.map +1 -0
  201. package/dist/editor/tokens/TokenDialogs.d.ts +26 -0
  202. package/dist/editor/tokens/TokenDialogs.d.ts.map +1 -0
  203. package/dist/editor/tokens/TokenDialogs.js +119 -0
  204. package/dist/editor/tokens/TokenDialogs.js.map +1 -0
  205. package/dist/editor/tokens/TokenList.d.ts +21 -0
  206. package/dist/editor/tokens/TokenList.d.ts.map +1 -0
  207. package/dist/editor/tokens/TokenList.js +98 -0
  208. package/dist/editor/tokens/TokenList.js.map +1 -0
  209. package/dist/editor/tokens/TokenPage.d.ts +25 -0
  210. package/dist/editor/tokens/TokenPage.d.ts.map +1 -0
  211. package/dist/editor/tokens/TokenPage.js +108 -0
  212. package/dist/editor/tokens/TokenPage.js.map +1 -0
  213. package/dist/editor/tokens/tokenModel.d.ts +35 -0
  214. package/dist/editor/tokens/tokenModel.d.ts.map +1 -0
  215. package/dist/editor/tokens/tokenModel.js +72 -0
  216. package/dist/editor/tokens/tokenModel.js.map +1 -0
  217. package/dist/editor/ui/Button.d.ts +3 -0
  218. package/dist/editor/ui/Button.d.ts.map +1 -0
  219. package/dist/editor/ui/Button.js +6 -0
  220. package/dist/editor/ui/Button.js.map +1 -0
  221. package/dist/editor/ui/CommentBox.d.ts +23 -0
  222. package/dist/editor/ui/CommentBox.d.ts.map +1 -0
  223. package/dist/editor/ui/CommentBox.js +41 -0
  224. package/dist/editor/ui/CommentBox.js.map +1 -0
  225. package/dist/editor/ui/Icon.d.ts +8 -0
  226. package/dist/editor/ui/Icon.d.ts.map +1 -0
  227. package/dist/editor/ui/Icon.js +6 -0
  228. package/dist/editor/ui/Icon.js.map +1 -0
  229. package/dist/editor/ui/IconButton.d.ts +11 -0
  230. package/dist/editor/ui/IconButton.d.ts.map +1 -0
  231. package/dist/editor/ui/IconButton.js +6 -0
  232. package/dist/editor/ui/IconButton.js.map +1 -0
  233. package/dist/editor/ui/NumberInput.d.ts +14 -0
  234. package/dist/editor/ui/NumberInput.d.ts.map +1 -0
  235. package/dist/editor/ui/NumberInput.js +6 -0
  236. package/dist/editor/ui/NumberInput.js.map +1 -0
  237. package/dist/editor/ui/PageLine.d.ts +14 -0
  238. package/dist/editor/ui/PageLine.d.ts.map +1 -0
  239. package/dist/editor/ui/PageLine.js +7 -0
  240. package/dist/editor/ui/PageLine.js.map +1 -0
  241. package/dist/editor/ui/SearchPicker.d.ts +41 -0
  242. package/dist/editor/ui/SearchPicker.d.ts.map +1 -0
  243. package/dist/editor/ui/SearchPicker.js +82 -0
  244. package/dist/editor/ui/SearchPicker.js.map +1 -0
  245. package/dist/editor/ui/Select.d.ts +19 -0
  246. package/dist/editor/ui/Select.d.ts.map +1 -0
  247. package/dist/editor/ui/Select.js +12 -0
  248. package/dist/editor/ui/Select.js.map +1 -0
  249. package/dist/editor/ui/TokenField.d.ts +14 -0
  250. package/dist/editor/ui/TokenField.d.ts.map +1 -0
  251. package/dist/editor/ui/TokenField.js +41 -0
  252. package/dist/editor/ui/TokenField.js.map +1 -0
  253. package/dist/editor/ui/TokenPicker.d.ts +31 -0
  254. package/dist/editor/ui/TokenPicker.d.ts.map +1 -0
  255. package/dist/editor/ui/TokenPicker.js +26 -0
  256. package/dist/editor/ui/TokenPicker.js.map +1 -0
  257. package/dist/editor/useBuildError.d.ts +7 -0
  258. package/dist/editor/useBuildError.d.ts.map +1 -0
  259. package/dist/editor/useBuildError.js +30 -0
  260. package/dist/editor/useBuildError.js.map +1 -0
  261. package/dist/editor/useLatestRequest.d.ts +22 -0
  262. package/dist/editor/useLatestRequest.d.ts.map +1 -0
  263. package/dist/editor/useLatestRequest.js +49 -0
  264. package/dist/editor/useLatestRequest.js.map +1 -0
  265. package/dist/editor-bundle/editor.css +2 -0
  266. package/dist/editor-bundle/editor.js +83 -0
  267. package/dist/editor-ui.d.ts +15 -0
  268. package/dist/editor-ui.d.ts.map +1 -0
  269. package/dist/editor-ui.js +14 -0
  270. package/dist/editor-ui.js.map +1 -0
  271. package/dist/inspector/runtime.d.ts +18 -0
  272. package/dist/inspector/runtime.d.ts.map +1 -0
  273. package/dist/inspector/runtime.js +1280 -0
  274. package/dist/inspector/runtime.js.map +1 -0
  275. package/dist/preview/main.d.ts +3 -0
  276. package/dist/preview/main.d.ts.map +1 -0
  277. package/dist/preview/main.js +320 -0
  278. package/dist/preview/main.js.map +1 -0
  279. package/dist/preview/preview.css +40 -0
  280. package/dist/runtime/index.d.ts +3 -0
  281. package/dist/runtime/index.d.ts.map +1 -0
  282. package/dist/runtime/index.js +2 -0
  283. package/dist/runtime/index.js.map +1 -0
  284. package/dist/shared/buildError.d.mts +27 -0
  285. package/dist/shared/buildError.mjs +141 -0
  286. package/dist/shared/cameraFit.d.mts +16 -0
  287. package/dist/shared/cameraFit.mjs +47 -0
  288. package/dist/shared/canvasLayout.d.mts +13 -0
  289. package/dist/shared/canvasLayout.mjs +171 -0
  290. package/dist/shared/commentShots.d.mts +12 -0
  291. package/dist/shared/commentShots.mjs +53 -0
  292. package/dist/shared/componentExtract.d.mts +43 -0
  293. package/dist/shared/componentExtract.mjs +136 -0
  294. package/dist/shared/componentMeta.d.mts +26 -0
  295. package/dist/shared/componentMeta.mjs +87 -0
  296. package/dist/shared/componentOps.d.mts +70 -0
  297. package/dist/shared/componentOps.mjs +407 -0
  298. package/dist/shared/componentTarget.d.mts +15 -0
  299. package/dist/shared/componentTarget.mjs +58 -0
  300. package/dist/shared/components.d.mts +30 -0
  301. package/dist/shared/components.mjs +106 -0
  302. package/dist/shared/consolidateCategories.d.mts +2 -0
  303. package/dist/shared/consolidateCategories.mjs +6 -0
  304. package/dist/shared/env.d.mts +4 -0
  305. package/dist/shared/env.mjs +18 -0
  306. package/dist/shared/gitChanges.d.mts +2 -0
  307. package/dist/shared/gitChanges.mjs +30 -0
  308. package/dist/shared/legacyPaths.d.mts +1 -0
  309. package/dist/shared/legacyPaths.mjs +9 -0
  310. package/dist/shared/oklab.d.mts +6 -0
  311. package/dist/shared/oklab.mjs +56 -0
  312. package/dist/shared/optimizeEntries.d.mts +5 -0
  313. package/dist/shared/optimizeEntries.mjs +24 -0
  314. package/dist/shared/packages.d.mts +11 -0
  315. package/dist/shared/packages.mjs +96 -0
  316. package/dist/shared/projectFiles.d.mts +23 -0
  317. package/dist/shared/projectFiles.mjs +72 -0
  318. package/dist/shared/prompt.d.mts +25 -0
  319. package/dist/shared/prompt.mjs +217 -0
  320. package/dist/shared/proposals.d.mts +11 -0
  321. package/dist/shared/proposals.mjs +42 -0
  322. package/dist/shared/protocol.d.ts +122 -0
  323. package/dist/shared/protocol.d.ts.map +1 -0
  324. package/dist/shared/protocol.js +7 -0
  325. package/dist/shared/protocol.js.map +1 -0
  326. package/dist/shared/reviewArchive.d.mts +4 -0
  327. package/dist/shared/reviewArchive.mjs +19 -0
  328. package/dist/shared/reviewStore.d.mts +30 -0
  329. package/dist/shared/reviewStore.mjs +218 -0
  330. package/dist/shared/reviewVerify.d.mts +21 -0
  331. package/dist/shared/reviewVerify.mjs +158 -0
  332. package/dist/shared/sizeModes.d.mts +15 -0
  333. package/dist/shared/sizeModes.mjs +53 -0
  334. package/dist/shared/sketches.d.mts +10 -0
  335. package/dist/shared/sketches.mjs +64 -0
  336. package/dist/shared/snapshotCheck.d.mts +13 -0
  337. package/dist/shared/snapshotCheck.mjs +81 -0
  338. package/dist/shared/timeout.d.mts +1 -0
  339. package/dist/shared/timeout.mjs +15 -0
  340. package/dist/shared/tokens.d.ts +2 -0
  341. package/dist/shared/tokens.d.ts.map +1 -0
  342. package/dist/shared/tokens.js +2 -0
  343. package/dist/shared/tokens.js.map +1 -0
  344. package/dist/shared/types.d.ts +689 -0
  345. package/dist/shared/types.d.ts.map +1 -0
  346. package/dist/shared/types.js +13 -0
  347. package/dist/shared/types.js.map +1 -0
  348. package/dist/shared/wheelRouting.d.mts +9 -0
  349. package/dist/shared/wheelRouting.mjs +31 -0
  350. package/dist/shared/writeScope.mjs +96 -0
  351. package/dist/snapshots/diff.d.mts +28 -0
  352. package/dist/snapshots/diff.mjs +263 -0
  353. package/dist/snapshots/index.d.mts +110 -0
  354. package/dist/snapshots/index.mjs +638 -0
  355. package/dist/snapshots/render.d.mts +24 -0
  356. package/dist/snapshots/render.mjs +250 -0
  357. package/dist/snapshots/toolOps.d.mts +25 -0
  358. package/dist/snapshots/toolOps.mjs +69 -0
  359. package/dist/tokens/adapters/css.mjs +51 -0
  360. package/dist/tokens/adapters/cssInCode.mjs +314 -0
  361. package/dist/tokens/adapters/oxcShared.mjs +80 -0
  362. package/dist/tokens/adapters/preprocessor.mjs +63 -0
  363. package/dist/tokens/adapters/registry.mjs +53 -0
  364. package/dist/tokens/adapters/tailwindcss.mjs +424 -0
  365. package/dist/tokens/adapters/types.mjs +117 -0
  366. package/dist/tokens/consolidate/index.d.mts +42 -0
  367. package/dist/tokens/consolidate/index.mjs +111 -0
  368. package/dist/tokens/consolidate/normalize.mjs +479 -0
  369. package/dist/tokens/consolidate/plan.mjs +726 -0
  370. package/dist/tokens/consolidate/scan.mjs +928 -0
  371. package/dist/tokens/extract.mjs +441 -0
  372. package/dist/tokens/moduleData.d.mts +14 -0
  373. package/dist/tokens/moduleData.mjs +32 -0
  374. package/dist/tokens/opLock.d.mts +4 -0
  375. package/dist/tokens/opLock.mjs +108 -0
  376. package/dist/tokens/ops.d.mts +71 -0
  377. package/dist/tokens/ops.mjs +1511 -0
  378. package/dist/tokens/pipeline.mjs +813 -0
  379. package/dist/tokens/report.d.mts +47 -0
  380. package/dist/tokens/report.mjs +257 -0
  381. package/dist/tokens/rewrite/code.mjs +172 -0
  382. package/dist/tokens/rewrite/css.mjs +154 -0
  383. package/dist/tokens/rewrite/index.mjs +244 -0
  384. package/dist/tokens/rewrite/tailwind.mjs +288 -0
  385. package/dist/tokens/rewrite/text.mjs +116 -0
  386. package/dist/tokens/rewrite/value.mjs +115 -0
  387. package/dist/tokens/usage.d.mts +97 -0
  388. package/dist/tokens/usage.mjs +680 -0
  389. package/dist/vite/agent.d.ts +21 -0
  390. package/dist/vite/agent.d.ts.map +1 -0
  391. package/dist/vite/agent.js +165 -0
  392. package/dist/vite/agent.js.map +1 -0
  393. package/dist/vite/events.d.ts +27 -0
  394. package/dist/vite/events.d.ts.map +1 -0
  395. package/dist/vite/events.js +156 -0
  396. package/dist/vite/events.js.map +1 -0
  397. package/dist/vite/layout.d.ts +2 -0
  398. package/dist/vite/layout.d.ts.map +1 -0
  399. package/dist/vite/layout.js +4 -0
  400. package/dist/vite/layout.js.map +1 -0
  401. package/dist/vite/plugin.d.ts +40 -0
  402. package/dist/vite/plugin.d.ts.map +1 -0
  403. package/dist/vite/plugin.js +1264 -0
  404. package/dist/vite/plugin.js.map +1 -0
  405. package/dist/vite/requestGuard.d.mts +3 -0
  406. package/dist/vite/requestGuard.mjs +43 -0
  407. package/dist/vite/review.d.ts +11 -0
  408. package/dist/vite/review.d.ts.map +1 -0
  409. package/dist/vite/review.js +283 -0
  410. package/dist/vite/review.js.map +1 -0
  411. package/package.json +106 -1
  412. package/skills/seji/SKILL.md +400 -0
  413. package/skills/seji-authoring/SKILL.md +397 -0
  414. package/skills/seji-tokens/SKILL.md +432 -0
@@ -0,0 +1,314 @@
1
+ import {
2
+ camelToKebab,
3
+ parseSourceAst,
4
+ propertyKeyName,
5
+ staticStringOf,
6
+ walkAst,
7
+ } from './oxcShared.mjs'
8
+ import { extractCssValueDiagnostics } from './types.mjs'
9
+
10
+ const CODE_EXT_RE = /\.(?:tsx|jsx|ts|js|mts|cts|mjs|cjs)$/i
11
+ const STYLE_OBJECT_NAME_RE = /(?:^|_|-)styles?$/i
12
+
13
+ function analyzeStyleObject(
14
+ objNode,
15
+ { file, content, locationAt, adapter, diagnostics, nested = false, hooks, parentProperty },
16
+ ) {
17
+ for (const prop of objNode.properties ?? []) {
18
+ if (prop.type === 'SpreadElement') {
19
+ hooks?.onUnsupported?.(prop, 'dynamic-style-expression')
20
+ const loc = locationAt(prop.start)
21
+ diagnostics.push({
22
+ file,
23
+ ...loc,
24
+ adapter,
25
+ kind: 'unsupported',
26
+ property: '...spread',
27
+ value: content.slice(prop.start, Math.min(prop.end, prop.start + 60)),
28
+ reason: 'dynamic-style-expression',
29
+ })
30
+ continue
31
+ }
32
+ if (prop.type !== 'Property') continue
33
+ if (prop.computed) {
34
+ hooks?.onUnsupported?.(prop, 'dynamic-style-expression')
35
+ const loc = locationAt(prop.start)
36
+ diagnostics.push({
37
+ file,
38
+ ...loc,
39
+ adapter,
40
+ kind: 'unsupported',
41
+ value: content.slice(prop.start, Math.min(prop.end, prop.start + 60)),
42
+ reason: 'dynamic-style-expression',
43
+ })
44
+ continue
45
+ }
46
+
47
+ const rawKey = propertyKeyName(prop.key)
48
+ const property = rawKey ? camelToKebab(rawKey) : undefined
49
+ const valNode = prop.value
50
+ // Inside a StyleX condition map (`color: { default: …, ':hover': … }`) the CSS property
51
+ // is the map's key, not `default` / `:hover` / `@media …`.
52
+ const conditionKey = Boolean(rawKey && (rawKey.startsWith(':') || rawKey.startsWith('@') || rawKey === 'default'))
53
+ const cssProperty = conditionKey && parentProperty ? parentProperty : property
54
+
55
+ if (
56
+ nested &&
57
+ valNode?.type === 'ObjectExpression' &&
58
+ rawKey &&
59
+ (rawKey.startsWith(':') || rawKey.startsWith('@') || rawKey === 'default')
60
+ ) {
61
+ analyzeStyleObject(valNode, { file, content, locationAt, adapter, diagnostics, nested: true, hooks, parentProperty })
62
+ continue
63
+ }
64
+
65
+ if (nested && valNode?.type === 'ObjectExpression') {
66
+ // Nested pseudo/media map inside stylex.create({ card: { color: { default: ..., ':hover': ... } } })
67
+ analyzeStyleObject(valNode, {
68
+ file,
69
+ content,
70
+ locationAt,
71
+ adapter,
72
+ diagnostics,
73
+ nested: true,
74
+ hooks,
75
+ parentProperty: property,
76
+ })
77
+ continue
78
+ }
79
+
80
+ const strVal = staticStringOf(valNode)
81
+ if (strVal !== null) {
82
+ hooks?.onString?.(valNode, strVal, cssProperty)
83
+ const loc = locationAt(valNode.start)
84
+ diagnostics.push(
85
+ ...extractCssValueDiagnostics({
86
+ file,
87
+ ...loc,
88
+ adapter,
89
+ property,
90
+ value: strVal,
91
+ includeLiterals: true,
92
+ }),
93
+ )
94
+ continue
95
+ }
96
+
97
+ if (
98
+ valNode?.type === 'Literal' &&
99
+ (typeof valNode.value === 'number' || typeof valNode.value === 'boolean' || valNode.value === null)
100
+ ) {
101
+ continue
102
+ }
103
+
104
+ if (valNode) {
105
+ hooks?.onUnsupported?.(valNode, 'dynamic-style-expression')
106
+ const loc = locationAt(valNode.start)
107
+ diagnostics.push({
108
+ file,
109
+ ...loc,
110
+ adapter,
111
+ kind: 'unsupported',
112
+ ...(property ? { property } : {}),
113
+ value: content.slice(valNode.start, Math.min(valNode.end, valNode.start + 60)),
114
+ reason: 'dynamic-style-expression',
115
+ })
116
+ }
117
+ }
118
+ }
119
+
120
+ /**
121
+ * Walk style={{}} objects, `*Styles` / CSSProperties objects and StyleX create() calls.
122
+ * `hooks.onString(node, value, property)` sees every static style string node and
123
+ * `hooks.onUnsupported(node, reason)` every dynamic one (the token rewriters use both).
124
+ */
125
+ export function walkCssInCode(file, content, ctx, hooks) {
126
+ const { program, locationAt } = parseSourceAst(file, content, ctx)
127
+ const diagnostics = []
128
+ const stylexNamespaces = new Set()
129
+ const stylexCreators = new Set()
130
+ const stylexVarDefiners = new Set()
131
+ const stylexEnabled = !ctx?.enabledIds || ctx.enabledIds.has('stylex')
132
+ const visitedObjects = new Set()
133
+
134
+ walkAst(program, (node) => {
135
+ if (node.type === 'ImportDeclaration' && node.source?.value === '@stylexjs/stylex') {
136
+ for (const spec of node.specifiers ?? []) {
137
+ if (spec.type === 'ImportNamespaceSpecifier' || spec.type === 'ImportDefaultSpecifier') {
138
+ stylexNamespaces.add(spec.local.name)
139
+ } else if (spec.type === 'ImportSpecifier') {
140
+ const imported = spec.imported?.name ?? spec.imported?.value
141
+ if (imported === 'create') stylexCreators.add(spec.local.name)
142
+ if (imported === 'defineVars') stylexVarDefiners.add(spec.local.name)
143
+ }
144
+ }
145
+ return false
146
+ }
147
+ })
148
+
149
+ walkAst(program, (node) => {
150
+ if (node.type === 'JSXAttribute' && node.name?.type === 'JSXIdentifier' && node.name.name === 'style') {
151
+ const container = node.value
152
+ if (!container || container.type !== 'JSXExpressionContainer') return false
153
+ const expr = container.expression
154
+ if (!expr || expr.type === 'JSXEmptyExpression') return false
155
+ if (expr.type === 'ObjectExpression') {
156
+ visitedObjects.add(expr)
157
+ analyzeStyleObject(expr, {
158
+ file,
159
+ content,
160
+ locationAt,
161
+ adapter: 'css-in-code',
162
+ diagnostics,
163
+ hooks,
164
+ })
165
+ } else {
166
+ hooks?.onUnsupported?.(expr, 'dynamic-style-expression')
167
+ const loc = locationAt(expr.start)
168
+ diagnostics.push({
169
+ file,
170
+ ...loc,
171
+ adapter: 'css-in-code',
172
+ kind: 'unsupported',
173
+ property: 'style',
174
+ value: content.slice(expr.start, Math.min(expr.end, expr.start + 60)),
175
+ reason: 'dynamic-style-expression',
176
+ })
177
+ }
178
+ return false
179
+ }
180
+
181
+ if (node.type === 'CallExpression') {
182
+ const callee = node.callee
183
+ const isStylexCreate =
184
+ (callee?.type === 'MemberExpression' &&
185
+ callee.object?.type === 'Identifier' &&
186
+ stylexNamespaces.has(callee.object.name) &&
187
+ callee.property?.type === 'Identifier' &&
188
+ callee.property.name === 'create') ||
189
+ (callee?.type === 'Identifier' && stylexCreators.has(callee.name))
190
+
191
+ const isStylexDefineVars =
192
+ (callee?.type === 'MemberExpression' &&
193
+ callee.object?.type === 'Identifier' &&
194
+ stylexNamespaces.has(callee.object.name) &&
195
+ callee.property?.type === 'Identifier' &&
196
+ callee.property.name === 'defineVars') ||
197
+ (callee?.type === 'Identifier' && stylexVarDefiners.has(callee.name))
198
+
199
+ if (isStylexDefineVars && stylexEnabled) {
200
+ hooks?.onUnsupported?.(node, 'stylex-define-vars')
201
+ const loc = locationAt(node.start)
202
+ diagnostics.push({
203
+ file,
204
+ ...loc,
205
+ adapter: 'stylex',
206
+ kind: 'unsupported',
207
+ value: content.slice(node.start, Math.min(node.end, node.start + 60)),
208
+ reason: 'stylex-define-vars',
209
+ })
210
+ return false
211
+ }
212
+
213
+ if (isStylexCreate) {
214
+ const arg = node.arguments?.[0]
215
+ if (arg?.type === 'ObjectExpression') {
216
+ visitedObjects.add(arg)
217
+ for (const ruleProp of arg.properties ?? []) {
218
+ if (ruleProp.type !== 'Property') continue
219
+ const ruleName = propertyKeyName(ruleProp.key)
220
+ if (ruleProp.value?.type === 'ObjectExpression') {
221
+ visitedObjects.add(ruleProp.value)
222
+ analyzeStyleObject(ruleProp.value, {
223
+ file,
224
+ content,
225
+ locationAt,
226
+ adapter: 'css-in-code',
227
+ diagnostics,
228
+ nested: true,
229
+ hooks,
230
+ })
231
+ } else if (
232
+ stylexEnabled &&
233
+ (ruleProp.value?.type === 'ArrowFunctionExpression' ||
234
+ ruleProp.value?.type === 'FunctionExpression')
235
+ ) {
236
+ hooks?.onUnsupported?.(ruleProp.value, 'dynamic-stylex-function')
237
+ const loc = locationAt(ruleProp.value.start)
238
+ diagnostics.push({
239
+ file,
240
+ ...loc,
241
+ adapter: 'stylex',
242
+ kind: 'unsupported',
243
+ ...(ruleName ? { property: ruleName } : {}),
244
+ value: content.slice(ruleProp.value.start, Math.min(ruleProp.value.end, ruleProp.value.start + 60)),
245
+ reason: 'dynamic-stylex-function',
246
+ })
247
+ } else if (stylexEnabled && ruleProp.value) {
248
+ hooks?.onUnsupported?.(ruleProp.value, 'dynamic-style-expression')
249
+ const loc = locationAt(ruleProp.value.start)
250
+ diagnostics.push({
251
+ file,
252
+ ...loc,
253
+ adapter: 'stylex',
254
+ kind: 'unsupported',
255
+ ...(ruleName ? { property: ruleName } : {}),
256
+ value: content.slice(ruleProp.value.start, Math.min(ruleProp.value.end, ruleProp.value.start + 60)),
257
+ reason: 'dynamic-style-expression',
258
+ })
259
+ }
260
+ }
261
+ } else if (stylexEnabled && arg) {
262
+ hooks?.onUnsupported?.(arg, 'dynamic-style-expression')
263
+ const loc = locationAt(arg.start)
264
+ diagnostics.push({
265
+ file,
266
+ ...loc,
267
+ adapter: 'stylex',
268
+ kind: 'unsupported',
269
+ value: content.slice(arg.start, Math.min(arg.end, arg.start + 60)),
270
+ reason: 'dynamic-style-expression',
271
+ })
272
+ }
273
+ return false
274
+ }
275
+ }
276
+
277
+ if (
278
+ node.type === 'VariableDeclarator' &&
279
+ node.id?.type === 'Identifier' &&
280
+ node.init?.type === 'ObjectExpression' &&
281
+ !visitedObjects.has(node.init)
282
+ ) {
283
+ const nameMatch = STYLE_OBJECT_NAME_RE.test(node.id.name)
284
+ const typeText = node.id.typeAnnotation
285
+ ? content.slice(node.id.typeAnnotation.start, node.id.typeAnnotation.end)
286
+ : ''
287
+ const typeMatch = /\bCSSProperties\b/.test(typeText)
288
+ if (nameMatch || typeMatch) {
289
+ visitedObjects.add(node.init)
290
+ analyzeStyleObject(node.init, {
291
+ file,
292
+ content,
293
+ locationAt,
294
+ adapter: 'css-in-code',
295
+ diagnostics,
296
+ hooks,
297
+ })
298
+ return false
299
+ }
300
+ }
301
+ })
302
+
303
+ return diagnostics
304
+ }
305
+
306
+ export const cssInCodeAdapter = {
307
+ id: 'css-in-code',
308
+ detect(file) {
309
+ return CODE_EXT_RE.test(file)
310
+ },
311
+ analyze(file, content, ctx) {
312
+ return walkCssInCode(file, content, ctx)
313
+ },
314
+ }
@@ -0,0 +1,80 @@
1
+ import { parse } from '@babel/parser'
2
+
3
+ import { createLineIndex } from './types.mjs'
4
+
5
+ export function parseSourceAst(file, content, ctx) {
6
+ const cache = ctx?.parseCache
7
+ const existing = cache?.get(file)
8
+ if (existing && existing.content === content) return existing
9
+
10
+ const isTs = /\.(?:tsx?|mts|cts)$/i.test(file)
11
+ const isJsx = /\.(?:tsx|jsx|js|mjs|cjs)$/i.test(file)
12
+ const plugins = ['estree', 'decorators-legacy']
13
+ if (isTs) plugins.push('typescript')
14
+ if (isJsx) plugins.push('jsx')
15
+
16
+ let program = { type: 'Program', body: [] }
17
+ let errors = []
18
+ try {
19
+ const ast = parse(content, {
20
+ sourceType: 'unambiguous',
21
+ errorRecovery: true,
22
+ plugins,
23
+ })
24
+ program = ast.program
25
+ errors = ast.errors ?? []
26
+ } catch (error) {
27
+ errors = [error]
28
+ }
29
+
30
+ const locationAt = createLineIndex(content)
31
+ const entry = {
32
+ content,
33
+ program,
34
+ errors,
35
+ locationAt,
36
+ }
37
+ cache?.set(file, entry)
38
+ return entry
39
+ }
40
+
41
+ export function walkAst(node, visitor, parent = null) {
42
+ if (!node || typeof node !== 'object') return
43
+ if (Array.isArray(node)) {
44
+ for (const item of node) walkAst(item, visitor, parent)
45
+ return
46
+ }
47
+ if (typeof node.type === 'string') {
48
+ const stop = visitor(node, parent)
49
+ if (stop === false) return
50
+ }
51
+ for (const [key, value] of Object.entries(node)) {
52
+ if (key === 'type' || key === 'start' || key === 'end' || key === 'loc' || key === 'extra' || key === 'comments') {
53
+ continue
54
+ }
55
+ if (value && typeof value === 'object') {
56
+ walkAst(value, visitor, node)
57
+ }
58
+ }
59
+ }
60
+
61
+ export function staticStringOf(node) {
62
+ if (!node) return null
63
+ if (node.type === 'Literal' && typeof node.value === 'string') return node.value
64
+ if (node.type === 'TemplateLiteral' && (!node.expressions || node.expressions.length === 0)) {
65
+ return (node.quasis ?? []).map((quasi) => quasi.value?.cooked ?? quasi.value?.raw ?? '').join('')
66
+ }
67
+ return null
68
+ }
69
+
70
+ export function propertyKeyName(keyNode) {
71
+ if (!keyNode) return null
72
+ if (keyNode.type === 'Identifier') return keyNode.name
73
+ if (keyNode.type === 'Literal' && typeof keyNode.value === 'string') return keyNode.value
74
+ return null
75
+ }
76
+
77
+ export function camelToKebab(name) {
78
+ if (name.startsWith('--')) return name
79
+ return name.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase()
80
+ }
@@ -0,0 +1,63 @@
1
+ import path from 'node:path'
2
+
3
+ import { analyzeCssAst } from './css.mjs'
4
+
5
+ async function tryImportParser(pkgName) {
6
+ try {
7
+ const mod = await import(pkgName)
8
+ return mod.default ?? mod
9
+ } catch {
10
+ return null
11
+ }
12
+ }
13
+
14
+ export const scssAdapter = {
15
+ id: 'scss',
16
+ detect(file) {
17
+ return /\.(?:scss|sass)$/i.test(file)
18
+ },
19
+ async analyze(file, content) {
20
+ const parserPkg = /\.sass$/i.test(file) ? 'postcss-sass' : 'postcss-scss'
21
+ const parser = await tryImportParser(parserPkg)
22
+ if (!parser || typeof parser.parse !== 'function') {
23
+ return [
24
+ {
25
+ file,
26
+ line: 1,
27
+ column: 1,
28
+ adapter: 'scss',
29
+ kind: 'unsupported',
30
+ value: path.basename(file),
31
+ reason: 'parser-not-installed',
32
+ },
33
+ ]
34
+ }
35
+ const rootAst = parser.parse(content, { from: file })
36
+ return analyzeCssAst({ file, rootAst, adapter: 'scss' })
37
+ },
38
+ }
39
+
40
+ export const lessAdapter = {
41
+ id: 'less',
42
+ detect(file) {
43
+ return /\.less$/i.test(file)
44
+ },
45
+ async analyze(file, content) {
46
+ const parser = await tryImportParser('postcss-less')
47
+ if (!parser || typeof parser.parse !== 'function') {
48
+ return [
49
+ {
50
+ file,
51
+ line: 1,
52
+ column: 1,
53
+ adapter: 'less',
54
+ kind: 'unsupported',
55
+ value: path.basename(file),
56
+ reason: 'parser-not-installed',
57
+ },
58
+ ]
59
+ }
60
+ const rootAst = parser.parse(content, { from: file })
61
+ return analyzeCssAst({ file, rootAst, adapter: 'less' })
62
+ },
63
+ }
@@ -0,0 +1,53 @@
1
+ import { readFileSync } from 'node:fs'
2
+ import { relative, sep } from 'node:path'
3
+
4
+ import { cssAdapter } from './css.mjs'
5
+ import { cssInCodeAdapter } from './cssInCode.mjs'
6
+ import { lessAdapter, scssAdapter } from './preprocessor.mjs'
7
+ import { tailwindcssAdapter } from './tailwindcss.mjs'
8
+
9
+ export const DEFAULT_ADAPTERS = [
10
+ cssAdapter,
11
+ cssInCodeAdapter,
12
+ tailwindcssAdapter,
13
+ scssAdapter,
14
+ lessAdapter,
15
+ ]
16
+
17
+ const toPosix = (file) => file.split(sep).join('/')
18
+
19
+ export function resolveAdapters(configuredIds) {
20
+ if (!Array.isArray(configuredIds) || configuredIds.length === 0) {
21
+ return {
22
+ adapters: DEFAULT_ADAPTERS,
23
+ enabledIds: null,
24
+ }
25
+ }
26
+ const enabledIds = new Set(configuredIds.map(String))
27
+ return {
28
+ adapters: DEFAULT_ADAPTERS.filter((adapter) => enabledIds.has(adapter.id)),
29
+ enabledIds,
30
+ }
31
+ }
32
+
33
+ export async function analyzeFilesWithAdapters({ root, files, adapters: configuredIds }) {
34
+ const { adapters, enabledIds } = resolveAdapters(configuredIds)
35
+ const parseCache = new Map()
36
+ const diagnostics = []
37
+
38
+ for (const absFile of files) {
39
+ const relFile = toPosix(relative(root, absFile))
40
+ const matching = adapters.filter((adapter) => adapter.detect(relFile))
41
+ if (!matching.length) continue
42
+ const content = readFileSync(absFile, 'utf8')
43
+ const ctx = { root, parseCache, enabledIds }
44
+ for (const adapter of matching) {
45
+ const results = await adapter.analyze(relFile, content, ctx)
46
+ if (Array.isArray(results) && results.length) {
47
+ diagnostics.push(...results)
48
+ }
49
+ }
50
+ }
51
+
52
+ return diagnostics
53
+ }