@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,397 @@
1
+ ---
2
+ name: seji-authoring
3
+ description: Use for UI or component work in a project that has Seji (design/ folder): building or changing components, screens, states or design pages (installing / setting up Seji itself: the seji skill). Use when authoring or revising artboards, editor-level pages, page boards, state frames, free-layout items, flows, providers or component pages, and when running component operations (component list/show/describe/rename/merge/deprecate/delete/tidy/revert, propose component). Defines the Page/Frame boundary, PageBoard API, FreeCanvas/FreeItem, defineFlow, componentPages, and thin-shell src/ vs design/ architecture. For applying review items use seji; for tokens use seji-tokens.
4
+ ---
5
+
6
+ # Authoring a Seji
7
+
8
+ This skill owns setup, design content and component pages. Applying review items (including
9
+ `kind: "component"` items), status and verification: **seji**. Tokens, token commands
10
+ and `propose token`: **seji-tokens**.
11
+
12
+ Seji has three levels: an artboard, pages, and frames.
13
+
14
+ - **Artboard** = one design project (`design/<id>/design.tsx`).
15
+ - **Page** = one editor-level canvas board. A page is not an iframe and has no page shell.
16
+ - **Frame** = one independently runnable iframe. A page can contain several frames.
17
+
18
+ ## Setup & bootstrap (complete in one pass)
19
+
20
+ Setup is owned by the **seji** skill ("Setup from zero"): the global CLI
21
+ (`npm i -g @rien7/seji@latest`), then `seji setup` in the project (it writes
22
+ `design/` and the `tokens.generated.css` import and runs `doctor --deep`) and `seji dev`.
23
+ Finish it in one pass without pausing for confirmation. The project gets no dependency: the CLI
24
+ provides `@rien7/design-surface-runtime` to `design/` (Vite aliases it, the types are in
25
+ `design/.seji/types/`); the editor, Vite launcher and CLI stay global. Mounting `designPlugin(...)` in `vite.config.ts` remains an
26
+ optional alternative to `seji dev` (`designPlugin` deduplicates cleanly if both are
27
+ present; never add manual `optimizeDeps` workarounds). After setup, run typecheck /
28
+ `seji tokens check` and confirm `/__seji` loads cleanly.
29
+
30
+ ## Start a new artboard
31
+
32
+ Scaffold the minimal `design/` structure once (`--app <dir>` in a monorepo with several apps):
33
+
34
+ ```bash
35
+ seji setup
36
+ ```
37
+
38
+ Or create one directory per design:
39
+
40
+ ```text
41
+ design/<id>/design.tsx
42
+ ```
43
+
44
+ Export a `defineDesign` default. The Vite plugin discovers `design/<id>/design.tsx`; no registry edit is
45
+ needed. Open `/__seji?design=<id>&page=<page>&frame=<frame>` in the Vite dev server.
46
+
47
+ ### Thin-shell rule (`src/` vs `design/`)
48
+
49
+ **Product UI components must live in `src/` (or your shared UI package); `design/` holds state frames, mock data, canvas annotations, and canvas-only sketch components in `design/<design>/sketches/`.**
50
+
51
+ - Author reusable components, business UI, and styles in `src/`, then import them into `design/<id>/design.tsx` frames.
52
+ - Never build a duplicate copy of a product component inside `design/` and apply review changes to it — review items (`NodeRef.source`, `component`) resolve directly to the live component in `src/`, and a copy leaves the product unchanged.
53
+ - Canvas-only components (new pages, explorations, undecided directions) are sketches and go in `design/<design>/sketches/`; see the next section for where to write.
54
+ - Keep `design/<id>/design.tsx` focused on `defineDesign`, `PageBoard`, `FrameConfig` states, mock props/providers, and page-level notes/annotations.
55
+
56
+ ### Product components vs sketch components
57
+
58
+ - **Product component**: lives in `src/` (or the shared UI package) and is used by a product entry
59
+ point.
60
+ - **Sketch component**: exists only for the canvas; the product never uses it. Sketches live in
61
+ `design/<design>/sketches/`. The folder is the label; no extra annotation is needed. A file in
62
+ `design/` outside `sketches/` that exports a React component is misplaced (`seji check` warns;
63
+ exceptions: `design.tsx`, `providers.tsx`, the tokens / components index files).
64
+
65
+ Where to write:
66
+
67
+ 1. **The comment or request is about existing product UI** → change `src/`. Start from the source the
68
+ comment points at and follow it to the component the product actually renders before editing.
69
+ Before marking it resolved, write in the reply the call chain from the product entry point to that
70
+ component and the `src/` file you changed.
71
+ 2. **A new page, inspiration, a few directions, an undecided adjustment** → you may write sketch
72
+ components in `design/<design>/sketches/`. Anything reusable still comes from `src/`: import the
73
+ existing components and tokens, never copy them.
74
+ 3. **The comment is about a sketch component** (the editor shows a `Sketch` tag; the prompt line says
75
+ `Sketch: yes`) → change the sketch. Say in the reply: "Only the sketch changed; the product did
76
+ not."
77
+ 4. **The direction is decided** (the person says "this one" / "build it into the product", or hands a
78
+ sketch to the agent to build into the product) → move the sketch into `src/`: merge it into the
79
+ existing product component, or create one if there is none. Then make the frame render the `src/`
80
+ component, delete the sketch, and write the call chain in the reply.
81
+ 5. **Unsure whether it is 1 or 2** (e.g. `src/` has a similar component but the comment reads like a
82
+ new direction) → ask the person first; do not guess.
83
+ 6. **Common mistake**: making the change in a sketch or a copy and then marking a comment about the
84
+ product resolved. `seji status … resolved` prints a reminder when a product-targeted comment is
85
+ resolved while only `design/` files changed.
86
+
87
+ ## Minimal example
88
+
89
+ ```tsx
90
+ import { defineDesign, type PageBoardProps } from '@rien7/design-surface-runtime'
91
+ import { CheckoutCard } from '@/components/CheckoutCard'
92
+
93
+ export default defineDesign({
94
+ title: 'Checkout',
95
+ pages: [
96
+ {
97
+ id: 'main',
98
+ title: 'Main',
99
+ size: [1200, 800],
100
+ board: MainBoard,
101
+ frames: [
102
+ { id: 'desktop', title: 'Desktop', size: [960, 640], component: CheckoutDesktop },
103
+ ],
104
+ },
105
+ ],
106
+ })
107
+
108
+ function MainBoard({ frames, renderFrame }: PageBoardProps) {
109
+ return <div className="flex flex-wrap gap-6">{frames.map(renderFrame)}</div>
110
+ }
111
+
112
+ function CheckoutDesktop() {
113
+ return (
114
+ <div data-ds="checkout-shell" className="p-6">
115
+ <CheckoutCard total="$48.00" />
116
+ </div>
117
+ )
118
+ }
119
+ ```
120
+
121
+ > [!IMPORTANT]
122
+ > **Reserved `page.id` values**: Never use `'overview'`, `'tokens'`, `'consolidate'` or `'changes'` as a `page.id` in `defineDesign`. They are reserved by the editor for the Component overview, Token, Consolidate and Changes pages.
123
+
124
+ ## Page
125
+
126
+ A page is rendered by the editor directly:
127
+
128
+ ```tsx
129
+ {
130
+ id: 'comment-box',
131
+ title: 'CommentBox',
132
+ description: 'States for empty, drafting, and posted comments.',
133
+ size: [1200, 900],
134
+ board: CommentBoxBoard,
135
+ frames: [composeFrame, detailFrame],
136
+ }
137
+ ```
138
+
139
+ The page board (`board`) is editor-level React content. It can render:
140
+
141
+ - page title, description, captions and notes
142
+ - arrows and other annotations
143
+ - one or more frames through `renderFrame`
144
+ - any layout around the frames
145
+
146
+ ### Board layout
147
+
148
+ Lay the frames out as a grid, not one long row:
149
+
150
+ - Wrap to a new row when a row is full. Keep the whole page close to a landscape screen: width at most twice the height. Never a single long horizontal strip.
151
+ - One group of states per row (e.g. a component's sizes, or default/loading/empty/error); the next group goes on the row below. A flow reads left to right, then wraps down to the next row.
152
+ - At most 3–4 desktop-size frames per row; phone-size frames can fit more.
153
+ - Set the page `size` to the actual extent of the laid-out board.
154
+
155
+ Page annotations are **not inspectable**. The inspector runtime only runs inside frame iframes. Do not add page-level `data-ds-ignore`; it is not needed and is not the architecture.
156
+
157
+ The page has no outer card border, background card, or page-level frame bar. Its canvas styling belongs to the page surface.
158
+
159
+ ## Frame
160
+
161
+ A frame is a standalone iframe with its own route:
162
+
163
+ ```text
164
+ /__seji/preview?design=<design>&page=<page>&frame=<frame>
165
+ ```
166
+
167
+ - One frame = one state.
168
+ - `FrameConfig.size` is an explicit authored size. The design content assigns it;
169
+ the editor does not auto-measure and resize frames.
170
+ - The frame chrome and the state viewport are the same width. Opening a popup must
171
+ not change the chrome or the frame size, and must not squeeze labels or fields.
172
+ Leave enough width for the state content and enough height for its popup.
173
+ - Each frame has system chrome: title, state id, size and one inspect/run toggle (eye / play).
174
+ - Use declared color, radius, spacing and type tokens instead of literal palette values.
175
+ Reuse existing semantic tokens first (`seji usage` shows what each token is used
176
+ for; read its `$description`). If a semantic role is truly missing, propose it with
177
+ `seji propose token` (explicit `--tier`, `--description`, `--rationale`; see
178
+ seji-tokens), reference it with a fallback
179
+ (`var(--proposed-token, var(--existing-fallback))`) and write DTCG source only after the human
180
+ approves.
181
+ - The toggle switches the iframe inline between inspect and run. It must not open a new tab.
182
+ - Write interaction states as real CSS states (`:hover`, `:active`, `:focus-visible`, `:disabled`
183
+ or Tailwind `hover:` / `active:` / `focus-visible:` / `disabled:`). The inspector forces those
184
+ rules to show small state previews under the artboard (pressed = `:active`); JS-only hover state
185
+ cannot be previewed.
186
+ - The frame is the context for inspector selection, comments and free-layout items. The review ledger is design-level; tokens are design-scoped.
187
+ - Do not put a card border, radius, shadow, inner page header or a second chrome inside the frame.
188
+
189
+ ## PageBoard API
190
+
191
+ ```tsx
192
+ type PageBoardProps = {
193
+ page: PageConfig
194
+ frames: FrameConfig[]
195
+ activeFrameId: string
196
+ playing: ReadonlySet<string>
197
+ onActivateFrame: (frameId: string) => void
198
+ renderFrame: (frame: FrameConfig) => ReactNode
199
+ }
200
+ ```
201
+
202
+ The board renders `renderFrame(frame)` for each state. The system renders the frame chrome, iframe, loading/error states, selection and comments.
203
+
204
+ ## Exploring directions (side-by-side comparison)
205
+
206
+ When requirements or visual direction are still open, **show 2–3 concrete directions side by side on one `PageBoard`** instead of describing alternatives in prose:
207
+
208
+ - Put each direction in its own frame on the same page (`direction-a`, `direction-b`, `direction-c`) with identical viewport sizes so visual density, hierarchy, and token usage are directly comparable.
209
+ - Use editor-level `PageBoard` annotations (short title + 1–2 line trade-off caption above or below each `renderFrame(frame)`) to explain what each option optimizes for — annotations stay outside the iframes so they never pollute inspection or comments.
210
+ - Build every direction from real `src/` components and declared tokens; direction-only components are sketches in `design/<design>/sketches/` (or `propose token` with fallback if a direction introduces a new semantic role).
211
+ - Once the human picks a direction (via comment or chat), keep the winning implementation in `src/`, remove the discarded direction frames, and expand the remaining page into concrete interaction states (`default`, `loading`, `empty`, `error`).
212
+
213
+ ## Free layout (`FreeCanvas` & `FreeItem`)
214
+
215
+ Use `FreeCanvas` and `FreeItem` from `@rien7/design-surface-runtime` when a frame has free-positioned elements that can be Alt-dragged or adjusted numerically in the Inspector:
216
+
217
+ ```tsx
218
+ import { FreeCanvas, FreeItem } from '@rien7/design-surface-runtime'
219
+ import { HeroBanner } from '@/components/HeroBanner'
220
+
221
+ function HeroFrame() {
222
+ return (
223
+ <FreeCanvas width={1120} height={600}>
224
+ <FreeItem id="hero" x={32} y={32} width={420} height={260}>
225
+ <HeroBanner />
226
+ </FreeItem>
227
+ </FreeCanvas>
228
+ )
229
+ }
230
+ ```
231
+
232
+ - `FreeItem` sets `data-ds={id}` and `data-free-item={id}` so `free` review items restore reliably across reloads.
233
+ - Apply `free` review item `to` rects back to `FreeItem` props (`x`, `y`, `width`, `height`).
234
+
235
+ ## Flows (`defineFlow`, `useDesignFlow`, `FrameConfig.state`)
236
+
237
+ Attach an optional finite-state flow to a design so interactive Play frames and static state frames share transitions:
238
+
239
+ ```tsx
240
+ import { defineDesign, defineFlow, useDesignFlow } from '@rien7/design-surface-runtime'
241
+ import { PayButton } from '@/components/PayButton'
242
+
243
+ export const flow = defineFlow({
244
+ initial: 'idle',
245
+ states: {
246
+ idle: { on: { PAY: 'pending' } },
247
+ pending: { on: { OK: 'done', FAIL: 'error' } },
248
+ error: { on: { RETRY: 'pending' } },
249
+ done: {},
250
+ },
251
+ })
252
+
253
+ export default defineDesign({
254
+ title: 'Payment',
255
+ flow,
256
+ pages: [
257
+ {
258
+ id: 'states',
259
+ title: 'States',
260
+ size: [1200, 720],
261
+ frames: [
262
+ { id: 'idle', title: 'Idle', size: [480, 320], state: 'idle', component: PayPreview },
263
+ { id: 'error', title: 'Error', size: [480, 320], state: 'error', component: PayPreview },
264
+ ],
265
+ },
266
+ ],
267
+ })
268
+
269
+ function PayPreview() {
270
+ const { state, send } = useDesignFlow()
271
+ return (
272
+ <PayButton data-ds="pay-btn" pending={state === 'pending'} error={state === 'error'} onClick={() => send('PAY')} />
273
+ )
274
+ }
275
+ ```
276
+
277
+ - `FrameConfig.state` sets the initial flow state for that frame.
278
+ - Without `flow`, frames can use plain React state.
279
+
280
+ ## Providers (`design/providers.tsx`)
281
+
282
+ Wrap every preview frame with your app's providers (theme context, router memory wrapper, tooltips, i18n) in `design/providers.tsx`:
283
+
284
+ ```tsx
285
+ import type { ReactNode } from 'react'
286
+ import { Tooltip } from '@base-ui/react/tooltip'
287
+
288
+ export function Providers({ children }: { children: ReactNode }) {
289
+ return <Tooltip.Provider>{children}</Tooltip.Provider>
290
+ }
291
+ ```
292
+
293
+ ## Component pages (`design/components.ts`)
294
+
295
+ - One page per component.
296
+ - One frame per state.
297
+ - Import and render the real component from `src/`.
298
+ - Register each component's page in `design/components.ts` (and optional manual `componentSources`):
299
+
300
+ ```ts
301
+ // design/components.ts
302
+ export const componentPages = {
303
+ Button: { design: 'app', page: 'button' },
304
+ Card: { design: 'app', page: 'card' },
305
+ }
306
+
307
+ export const componentSources = {
308
+ // Optional fallback when a component is outside componentGroups globs
309
+ ExternalWidget: 'src/widgets/ExternalWidget.tsx',
310
+ }
311
+ ```
312
+
313
+ - Do not create a page per state and do not nest a whole board inside another iframe.
314
+ - Give every component-page frame a `category` — the canvas tags the frame with it and the page
315
+ header counts them:
316
+
317
+ | `category` | Frame shows | Example (Button) |
318
+ | --- | --- | --- |
319
+ | `style` | A visual variant | primary, text |
320
+ | `state` | A data / UI state CSS cannot force | loading, empty, error, selected |
321
+ | `content` | A content variant | with icon, long label, unit |
322
+ | `usage` | A scene from whoever uses it | comment-mode toggle, breadcrumb |
323
+
324
+ ```tsx
325
+ { id: 'loading', title: 'Loading', size: [280, 160], category: 'state', render: () => <ButtonState variant="loading" /> }
326
+ ```
327
+
328
+ - A component page holds style × state × content. `usage` scenes belong on the page of the
329
+ component or screen that uses it; if a page has them, propose a tidy instead of moving them
330
+ yourself: `seji propose component Button --frames comment,locale --rationale "…"`.
331
+ The human approves it on the page (or with
332
+ `seji proposal <design> <id> approve`); only then move / remove the frames.
333
+ - Write a usage note for each component (`seji component describe Button "…"` →
334
+ `design/components.json` `$description`): when to use it and what to use instead. Read the notes
335
+ (`seji component list` / `show <Name>`) before choosing a component; never pick a
336
+ deprecated one — use its `replacement`.
337
+ - Base vs composite layers come from the project, not from you guessing: list the base component
338
+ files in `design/components.json`:
339
+
340
+ ```json
341
+ { "layers": { "base": ["src/components/ui/*.tsx"] } }
342
+ ```
343
+
344
+ Every other catalog component is composite. Without `layers.base` the editor shows no layer split.
345
+ - Integrating a new component is a task you hand back as changes: add the component page (all
346
+ states, categorized), its `componentPages` entry and usage note, then let the human review it.
347
+ - The Inspector identifies the nearest React component and source location (`file:line`) from the live React tree. The Inspector does not edit component props, variants, or Tailwind classes — those belong in `src/` TSX.
348
+
349
+ ## Component operations
350
+
351
+ Headless, the same functions as the component page and `/__seji/api/components`. The component
352
+ set is the seji plugin's `componentGroups` (from `vite.config.*`, else
353
+ `design/surface.config.json`; `--config <file>` picks a Vite config).
354
+
355
+ ```bash
356
+ seji component list # layer, status, tokens, primitive / hard-coded (JSON)
357
+ seji component show Button # usage note, tokenRows, literals, items, renamedFrom (JSON)
358
+ seji component describe Button "…" # $description in design/components.json ("" clears)
359
+ seji component rename Button --to ChromeButton [--reason …] [--design <id>] [--dry-run]
360
+ seji component merge OldCard --into Card [--dry-run]
361
+ seji component deprecate OldCard (--replacement Card | --no-replacement) --reason "…" [--replace-all [--dry-run]]
362
+ seji component undeprecate OldCard
363
+ seji component delete OldCard # an item for the agent: search the project for uses, replace them, then delete
364
+ seji component tidy Button --frames a,b # human tidy item; refused while an agent proposal waits
365
+ seji component revert <batchId> [--force] [--dry-run]
366
+ seji propose component Button --frames comment,locale --rationale "…" # agent tidy proposal
367
+ seji proposal <design> <id> approve|reject|reset [--note …] # the human's decision
368
+ ```
369
+
370
+ - **rename / merge / deprecate --replace-all** are executed by the tool from the syntax tree
371
+ (export, file named after it, imports — aliases keep their local name — JSX, `as={X}`,
372
+ `createElement`, re-exports, `design/components.ts` / `design/components.json` keys): one
373
+ revertible batch + one `component` item listing what it changed and the leftovers for the agent.
374
+ `--dry-run` prints the plan and writes nothing. merge and replace also write the deprecation;
375
+ merging into (or replacing with) a deprecated component is refused.
376
+ - **deprecate** (mark only) / **undeprecate** write only `design/components.json`, no item.
377
+ `design/components.json` is the single owner of `$description`, `$deprecated`, `replacement`,
378
+ `deprecatedAt`; never edit it by hand when a command exists.
379
+ - **delete** / **tidy** record a `component` item for the agent (see seji).
380
+ - After a tool rename, `component show <NewName>` reports `renamedFrom` until the item is resolved
381
+ or reverted (frames may still render the old name until a package is rebuilt).
382
+ - `--design <id>` names the ledger when the component has no page and the project has several
383
+ designs.
384
+
385
+ ## Pages vs components
386
+
387
+ - **Page** is the navigation unit: one page board, one canvas node, one entry under Pages.
388
+ - **Component page** is a page whose subject is one component. It is listed under Components, not duplicated under Pages.
389
+ - **Frame** is a state inside a page. Frames are never top-level page/component navigation entries.
390
+
391
+ ## Comments
392
+
393
+ Review comments are editor chrome. They are anchored to a frame's content and rendered outside the iframe. Never put review pins, threads or a review composer inside a page board or a state frame.
394
+
395
+ ## Handoff
396
+
397
+ The browser records review items in `design/<design>/review.json`; it never writes TSX or CSS. To apply pending items follow **seji** (`seji prompt <design>`, `snapshot wait`, then `status` / `reply`). Do not edit generated token files and do not archive items manually.