@stacksjs/defaults 0.70.207 → 0.70.208

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 (408) hide show
  1. package/TODO.md +21 -0
  2. package/ai/AGENTS.md +79 -0
  3. package/ai/README.md +45 -0
  4. package/ai/claude/launch.json +12 -0
  5. package/ai/skills/stacks-actions/SKILL.md +128 -0
  6. package/ai/skills/stacks-ai/SKILL.md +276 -0
  7. package/ai/skills/stacks-alias/SKILL.md +94 -0
  8. package/ai/skills/stacks-analytics/SKILL.md +91 -0
  9. package/ai/skills/stacks-api/SKILL.md +738 -0
  10. package/ai/skills/stacks-arrays/SKILL.md +277 -0
  11. package/ai/skills/stacks-auth/SKILL.md +422 -0
  12. package/ai/skills/stacks-auto-imports/SKILL.md +138 -0
  13. package/ai/skills/stacks-brandkit/SKILL.md +811 -0
  14. package/ai/skills/stacks-browse/SKILL.md +127 -0
  15. package/ai/skills/stacks-browse/scripts/browse.ts +492 -0
  16. package/ai/skills/stacks-browser/SKILL.md +145 -0
  17. package/ai/skills/stacks-buddy/SKILL.md +676 -0
  18. package/ai/skills/stacks-build/SKILL.md +163 -0
  19. package/ai/skills/stacks-cache/SKILL.md +125 -0
  20. package/ai/skills/stacks-calendar/SKILL.md +113 -0
  21. package/ai/skills/stacks-chat/SKILL.md +371 -0
  22. package/ai/skills/stacks-cli/SKILL.md +112 -0
  23. package/ai/skills/stacks-cloud/SKILL.md +192 -0
  24. package/ai/skills/stacks-cms/SKILL.md +217 -0
  25. package/ai/skills/stacks-collections/SKILL.md +82 -0
  26. package/ai/skills/stacks-commerce/SKILL.md +114 -0
  27. package/ai/skills/stacks-composables/SKILL.md +161 -0
  28. package/ai/skills/stacks-config/SKILL.md +144 -0
  29. package/ai/skills/stacks-configuration/SKILL.md +154 -0
  30. package/ai/skills/stacks-cron/SKILL.md +123 -0
  31. package/ai/skills/stacks-crosswind/SKILL.md +190 -0
  32. package/ai/skills/stacks-dashboard/SKILL.md +173 -0
  33. package/ai/skills/stacks-database/SKILL.md +286 -0
  34. package/ai/skills/stacks-datetime/SKILL.md +269 -0
  35. package/ai/skills/stacks-dependencies/SKILL.md +111 -0
  36. package/ai/skills/stacks-deploy/SKILL.md +102 -0
  37. package/ai/skills/stacks-design-brutalist/SKILL.md +110 -0
  38. package/ai/skills/stacks-design-minimalist/SKILL.md +115 -0
  39. package/ai/skills/stacks-design-output/SKILL.md +55 -0
  40. package/ai/skills/stacks-design-soft/SKILL.md +156 -0
  41. package/ai/skills/stacks-design-taste/SKILL.md +1012 -0
  42. package/ai/skills/stacks-design-taste-codex/SKILL.md +294 -0
  43. package/ai/skills/stacks-desktop/SKILL.md +78 -0
  44. package/ai/skills/stacks-development/SKILL.md +298 -0
  45. package/ai/skills/stacks-dns/SKILL.md +149 -0
  46. package/ai/skills/stacks-docs/SKILL.md +109 -0
  47. package/ai/skills/stacks-email/SKILL.md +236 -0
  48. package/ai/skills/stacks-enums/SKILL.md +100 -0
  49. package/ai/skills/stacks-env/SKILL.md +181 -0
  50. package/ai/skills/stacks-error-handling/SKILL.md +137 -0
  51. package/ai/skills/stacks-events/SKILL.md +228 -0
  52. package/ai/skills/stacks-faker/SKILL.md +158 -0
  53. package/ai/skills/stacks-git/SKILL.md +158 -0
  54. package/ai/skills/stacks-guard/SKILL.md +98 -0
  55. package/ai/skills/stacks-health/SKILL.md +75 -0
  56. package/ai/skills/stacks-http/SKILL.md +316 -0
  57. package/ai/skills/stacks-i18n/SKILL.md +198 -0
  58. package/ai/skills/stacks-image-to-code/SKILL.md +629 -0
  59. package/ai/skills/stacks-imagegen-mobile/SKILL.md +1474 -0
  60. package/ai/skills/stacks-imagegen-web/SKILL.md +998 -0
  61. package/ai/skills/stacks-investigate/SKILL.md +119 -0
  62. package/ai/skills/stacks-jobs/SKILL.md +136 -0
  63. package/ai/skills/stacks-lint/SKILL.md +184 -0
  64. package/ai/skills/stacks-listeners/SKILL.md +99 -0
  65. package/ai/skills/stacks-logging/SKILL.md +78 -0
  66. package/ai/skills/stacks-mail/SKILL.md +120 -0
  67. package/ai/skills/stacks-middleware/SKILL.md +249 -0
  68. package/ai/skills/stacks-migrations/SKILL.md +105 -0
  69. package/ai/skills/stacks-models/SKILL.md +267 -0
  70. package/ai/skills/stacks-new-feature/SKILL.md +206 -0
  71. package/ai/skills/stacks-notifications/SKILL.md +210 -0
  72. package/ai/skills/stacks-objects/SKILL.md +205 -0
  73. package/ai/skills/stacks-office-hours/SKILL.md +134 -0
  74. package/ai/skills/stacks-orm/SKILL.md +342 -0
  75. package/ai/skills/stacks-path/SKILL.md +118 -0
  76. package/ai/skills/stacks-payments/SKILL.md +373 -0
  77. package/ai/skills/stacks-plan-review/SKILL.md +152 -0
  78. package/ai/skills/stacks-plugins/SKILL.md +149 -0
  79. package/ai/skills/stacks-push/SKILL.md +376 -0
  80. package/ai/skills/stacks-query-builder/SKILL.md +128 -0
  81. package/ai/skills/stacks-queue/SKILL.md +559 -0
  82. package/ai/skills/stacks-realtime/SKILL.md +442 -0
  83. package/ai/skills/stacks-redesign/SKILL.md +182 -0
  84. package/ai/skills/stacks-registry/SKILL.md +58 -0
  85. package/ai/skills/stacks-repl/SKILL.md +80 -0
  86. package/ai/skills/stacks-retro/SKILL.md +122 -0
  87. package/ai/skills/stacks-review/SKILL.md +135 -0
  88. package/ai/skills/stacks-router/SKILL.md +231 -0
  89. package/ai/skills/stacks-routes/SKILL.md +105 -0
  90. package/ai/skills/stacks-scaffolding/SKILL.md +162 -0
  91. package/ai/skills/stacks-scheduler/SKILL.md +363 -0
  92. package/ai/skills/stacks-search-engine/SKILL.md +112 -0
  93. package/ai/skills/stacks-security/SKILL.md +129 -0
  94. package/ai/skills/stacks-security-audit/SKILL.md +128 -0
  95. package/ai/skills/stacks-server/SKILL.md +458 -0
  96. package/ai/skills/stacks-shell/SKILL.md +62 -0
  97. package/ai/skills/stacks-slug/SKILL.md +87 -0
  98. package/ai/skills/stacks-sms/SKILL.md +385 -0
  99. package/ai/skills/stacks-socials/SKILL.md +303 -0
  100. package/ai/skills/stacks-storage/SKILL.md +576 -0
  101. package/ai/skills/stacks-strings/SKILL.md +416 -0
  102. package/ai/skills/stacks-stx/SKILL.md +176 -0
  103. package/ai/skills/stacks-technical-diagrams/LICENSE +22 -0
  104. package/ai/skills/stacks-technical-diagrams/SKILL.md +290 -0
  105. package/ai/skills/stacks-technical-diagrams/agents/openai.yaml +4 -0
  106. package/ai/skills/stacks-technical-diagrams/assets/template.html +1252 -0
  107. package/ai/skills/stacks-technical-diagrams/bin/technical-diagrams.mjs +289 -0
  108. package/ai/skills/stacks-technical-diagrams/bunfig.toml +1 -0
  109. package/ai/skills/stacks-technical-diagrams/examples/agent-run.lifecycle.json +64 -0
  110. package/ai/skills/stacks-technical-diagrams/examples/agent-tool-call.workflow.json +88 -0
  111. package/ai/skills/stacks-technical-diagrams/examples/cache-miss-request.sequence.json +75 -0
  112. package/ai/skills/stacks-technical-diagrams/examples/product-analytics.dataflow.json +70 -0
  113. package/ai/skills/stacks-technical-diagrams/examples/web-app.architecture.json +41 -0
  114. package/ai/skills/stacks-technical-diagrams/renderers/architecture/grid.mjs +62 -0
  115. package/ai/skills/stacks-technical-diagrams/renderers/architecture/render-architecture.mjs +371 -0
  116. package/ai/skills/stacks-technical-diagrams/renderers/dataflow/README.md +82 -0
  117. package/ai/skills/stacks-technical-diagrams/renderers/dataflow/render-dataflow.mjs +295 -0
  118. package/ai/skills/stacks-technical-diagrams/renderers/lifecycle/README.md +91 -0
  119. package/ai/skills/stacks-technical-diagrams/renderers/lifecycle/render-lifecycle.mjs +384 -0
  120. package/ai/skills/stacks-technical-diagrams/renderers/sequence/README.md +84 -0
  121. package/ai/skills/stacks-technical-diagrams/renderers/sequence/render-sequence.mjs +257 -0
  122. package/ai/skills/stacks-technical-diagrams/renderers/shared/cli.mjs +42 -0
  123. package/ai/skills/stacks-technical-diagrams/renderers/shared/generated-validators.mjs +13 -0
  124. package/ai/skills/stacks-technical-diagrams/renderers/shared/geometry.mjs +230 -0
  125. package/ai/skills/stacks-technical-diagrams/renderers/shared/layout-report.mjs +40 -0
  126. package/ai/skills/stacks-technical-diagrams/renderers/shared/utils.mjs +88 -0
  127. package/ai/skills/stacks-technical-diagrams/renderers/shared/validator.mjs +40 -0
  128. package/ai/skills/stacks-technical-diagrams/renderers/workflow/README.md +103 -0
  129. package/ai/skills/stacks-technical-diagrams/renderers/workflow/render-workflow.mjs +481 -0
  130. package/ai/skills/stacks-technical-diagrams/schemas/README.md +68 -0
  131. package/ai/skills/stacks-technical-diagrams/schemas/architecture.schema.json +121 -0
  132. package/ai/skills/stacks-technical-diagrams/schemas/common.schema.json +43 -0
  133. package/ai/skills/stacks-technical-diagrams/schemas/dataflow.schema.json +221 -0
  134. package/ai/skills/stacks-technical-diagrams/schemas/lifecycle.schema.json +241 -0
  135. package/ai/skills/stacks-technical-diagrams/schemas/sequence.schema.json +186 -0
  136. package/ai/skills/stacks-technical-diagrams/schemas/workflow.schema.json +332 -0
  137. package/ai/skills/stacks-technical-diagrams/scripts/check-render-output.mjs +297 -0
  138. package/ai/skills/stacks-technical-diagrams/scripts/render-examples.mjs +28 -0
  139. package/ai/skills/stacks-testing/SKILL.md +129 -0
  140. package/ai/skills/stacks-tunnel/SKILL.md +125 -0
  141. package/ai/skills/stacks-types/SKILL.md +178 -0
  142. package/ai/skills/stacks-ui/SKILL.md +246 -0
  143. package/ai/skills/stacks-utils/SKILL.md +444 -0
  144. package/ai/skills/stacks-validation/SKILL.md +371 -0
  145. package/ai/skills/stacks-whois/SKILL.md +315 -0
  146. package/assets/world-map-data.ts +121 -0
  147. package/bootstrap.ts +114 -0
  148. package/docs/api-examples.md +46 -0
  149. package/docs/index.md +24 -0
  150. package/docs/markdown-examples.md +87 -0
  151. package/functions/analytics.ts +97 -0
  152. package/functions/api.ts +143 -0
  153. package/functions/auth.ts +208 -0
  154. package/functions/billing/payments.ts +149 -0
  155. package/functions/blog.ts +120 -0
  156. package/functions/cms/categorizables.ts +107 -0
  157. package/functions/cms/pages.ts +108 -0
  158. package/functions/cms/posts.ts +100 -0
  159. package/functions/cms/taggables.ts +102 -0
  160. package/functions/commerce/coupons.ts +128 -0
  161. package/functions/commerce/customers.ts +128 -0
  162. package/functions/commerce/gift-cards.ts +119 -0
  163. package/functions/commerce/orders.ts +112 -0
  164. package/functions/commerce/payments.ts +119 -0
  165. package/functions/commerce/products/categories.ts +123 -0
  166. package/functions/commerce/products/manufacturers.ts +123 -0
  167. package/functions/commerce/products/products.ts +123 -0
  168. package/functions/commerce/products/reviews.ts +123 -0
  169. package/functions/commerce/products/units.ts +123 -0
  170. package/functions/commerce/products/variants.ts +123 -0
  171. package/functions/commerce/shippings/delivery-routes.ts +123 -0
  172. package/functions/commerce/shippings/digital-deliveries.ts +119 -0
  173. package/functions/commerce/shippings/drivers.ts +123 -0
  174. package/functions/commerce/shippings/license-keys.ts +123 -0
  175. package/functions/commerce/shippings/shipping-methods.ts +123 -0
  176. package/functions/commerce/shippings/shipping-rates.ts +119 -0
  177. package/functions/commerce/shippings/shipping-zones.ts +119 -0
  178. package/functions/commerce/taxes.ts +119 -0
  179. package/functions/commerce/waitlist/products.ts +123 -0
  180. package/functions/commerce/waitlist/restaurants.ts +123 -0
  181. package/functions/craft.ts +107 -0
  182. package/functions/dashboard.ts +153 -0
  183. package/functions/inbox.ts +95 -0
  184. package/functions/jobs.ts +86 -0
  185. package/functions/monitoring/errors.ts +295 -0
  186. package/functions/queue.ts +111 -0
  187. package/functions/realtime/websockets.ts +96 -0
  188. package/functions/realtime.ts +52 -0
  189. package/functions/releases.ts +49 -0
  190. package/functions/search.ts +126 -0
  191. package/functions/toasts.ts +95 -0
  192. package/functions/uploads.ts +216 -0
  193. package/ide/.gitignore +4 -0
  194. package/ide/cursor/rules/auto-imports.mdc +574 -0
  195. package/ide/cursor/rules/code-style.mdc +12 -0
  196. package/ide/cursor/rules/documentation.mdc +9 -0
  197. package/ide/cursor/rules/error-handling-validation.mdc +11 -0
  198. package/ide/cursor/rules/key-conventions.mdc +11 -0
  199. package/ide/cursor/rules/project-structure.mdc +169 -0
  200. package/ide/cursor/rules/readme.mdc +318 -0
  201. package/ide/cursor/rules/syntax-formatting.mdc +9 -0
  202. package/ide/cursor/rules/testing.mdc +10 -0
  203. package/ide/cursor/rules/typescript.mdc +9 -0
  204. package/ide/cursor/rules/ui-styling.mdc +0 -0
  205. package/ide/dictionary.txt +397 -0
  206. package/ide/jetbrains/.fleet/settings.json +4 -0
  207. package/ide/jetbrains/.idea/.gitignore +5 -0
  208. package/ide/jetbrains/.idea/.name +1 -0
  209. package/ide/jetbrains/.idea/inspectionProfiles/Project_Default.xml +6 -0
  210. package/ide/jetbrains/.idea/jsLinters/eslint.xml +7 -0
  211. package/ide/jetbrains/.idea/modules.xml +8 -0
  212. package/ide/jetbrains/.idea/stacks.iml +22 -0
  213. package/ide/jetbrains/.idea/vcs.xml +6 -0
  214. package/ide/jetbrains/.idea/webResources.xml +14 -0
  215. package/ide/jetbrains/IntelliJ IDEA Global Settings +0 -0
  216. package/ide/jetbrains/installed.txt +4 -0
  217. package/ide/jetbrains/options/github-copilot.xml +5 -0
  218. package/ide/jetbrains/options/nodejs.xml +7 -0
  219. package/ide/jetbrains/options/templates.xml +124 -0
  220. package/ide/jetbrains/templates/JavaScript.xml +6 -0
  221. package/ide/jetbrains/templates/Stacks.xml +8 -0
  222. package/ide/vscode/.vscode/README.md +23 -0
  223. package/ide/vscode/.vscode/extensions.json +5 -0
  224. package/ide/vscode/.vscode/settings.json +176 -0
  225. package/ide/vscode/.vscode/stacks.code-snippets +181 -0
  226. package/ide/vscode/LICENSE.md +21 -0
  227. package/ide/vscode/README.md +36 -0
  228. package/ide/vscode/logo.png +0 -0
  229. package/ide/vscode/package.json +79 -0
  230. package/ide/zed/.zed/settings.json +139 -0
  231. package/lang/README.md +28 -0
  232. package/lang/de.yml +14 -0
  233. package/lang/en.yml +15 -0
  234. package/package.json +19 -3
  235. package/project/bootstrap +161 -0
  236. package/project/buddy +175 -0
  237. package/project/storage/framework/tsconfig.app.json +50 -0
  238. package/project/storage/framework/tsconfig.base.json +58 -0
  239. package/routes/core.ts +78 -0
  240. package/routes/dashboard-api.ts +233 -0
  241. package/routes/dashboard.ts +739 -0
  242. package/routes/email.ts +129 -0
  243. package/stores/[name].stx +16 -0
  244. package/stores/git.ts +71 -0
  245. package/stores/payment.ts +474 -0
  246. package/stores/queue.ts +43 -0
  247. package/stores/user.ts +29 -0
  248. package/stx-components-plugin.ts +25 -0
  249. package/styles/design-tokens.css +597 -0
  250. package/types/dashboard.ts +70 -0
  251. package/types/defaults.ts +438 -0
  252. package/vcs/github/CODE_OF_CONDUCT.md +83 -0
  253. package/vcs/github/CONTRIBUTING.md +187 -0
  254. package/vcs/github/EXPLANATIONS.md +41 -0
  255. package/vcs/github/FUNDING.yml +1 -0
  256. package/vcs/github/ISSUE_TEMPLATE/bug_report.yml +49 -0
  257. package/vcs/github/ISSUE_TEMPLATE/config.yml +10 -0
  258. package/vcs/github/ISSUE_TEMPLATE/feature_request.yml +44 -0
  259. package/vcs/github/SECURITY.md +70 -0
  260. package/vcs/github/renovate.json +5 -0
  261. package/vcs/github/stale.yml +14 -0
  262. package/vcs/github/workflows/README.md +16 -0
  263. package/vcs/github/workflows/ci.yml +114 -0
  264. package/vcs/github/workflows/export-size.yml +25 -0
  265. package/vcs/github/workflows/labeler.yml +13 -0
  266. package/vcs/github/workflows/release.yml +219 -0
  267. package/views/[...all].stx +8 -0
  268. package/views/about.md +3 -0
  269. package/views/auth/login.stx +1 -0
  270. package/views/auth/signup.stx +85 -0
  271. package/views/dashboard/.discovered-models.json +542 -0
  272. package/views/dashboard/AUDIT.md +904 -0
  273. package/views/dashboard/[...all].stx +89 -0
  274. package/views/dashboard/access-tokens/index.stx +177 -0
  275. package/views/dashboard/actions/index.stx +129 -0
  276. package/views/dashboard/analytics/blog/index.stx +356 -0
  277. package/views/dashboard/analytics/browsers/index.stx +263 -0
  278. package/views/dashboard/analytics/commerce/sales/index.stx +329 -0
  279. package/views/dashboard/analytics/commerce/web/index.stx +379 -0
  280. package/views/dashboard/analytics/countries/index.stx +289 -0
  281. package/views/dashboard/analytics/devices/index.stx +305 -0
  282. package/views/dashboard/analytics/events/index.stx +536 -0
  283. package/views/dashboard/analytics/index.stx +88 -0
  284. package/views/dashboard/analytics/marketing/index.stx +315 -0
  285. package/views/dashboard/analytics/pages/index.stx +271 -0
  286. package/views/dashboard/analytics/referrers/index.stx +319 -0
  287. package/views/dashboard/analytics/web/index.stx +356 -0
  288. package/views/dashboard/buddy/index.stx +198 -0
  289. package/views/dashboard/ci/index.stx +462 -0
  290. package/views/dashboard/cloud/index.stx +452 -0
  291. package/views/dashboard/commands/index.stx +295 -0
  292. package/views/dashboard/commerce/categories/index.stx +406 -0
  293. package/views/dashboard/commerce/coupons/index.stx +485 -0
  294. package/views/dashboard/commerce/customers/index.stx +410 -0
  295. package/views/dashboard/commerce/dashboard/index.stx +287 -0
  296. package/views/dashboard/commerce/delivery/delivery-routes.stx +305 -0
  297. package/views/dashboard/commerce/delivery/digital-delivery.stx +332 -0
  298. package/views/dashboard/commerce/delivery/drivers.stx +397 -0
  299. package/views/dashboard/commerce/delivery/index.stx +18 -0
  300. package/views/dashboard/commerce/delivery/license-keys.stx +380 -0
  301. package/views/dashboard/commerce/delivery/shipping-methods.stx +346 -0
  302. package/views/dashboard/commerce/delivery/shipping-rates.stx +338 -0
  303. package/views/dashboard/commerce/delivery/shipping-zones.stx +302 -0
  304. package/views/dashboard/commerce/delivery/tabs.ts +25 -0
  305. package/views/dashboard/commerce/gift-cards/index.stx +561 -0
  306. package/views/dashboard/commerce/manufacturers/index.stx +308 -0
  307. package/views/dashboard/commerce/orders/index.stx +247 -0
  308. package/views/dashboard/commerce/payments/index.stx +535 -0
  309. package/views/dashboard/commerce/pos/index.stx +653 -0
  310. package/views/dashboard/commerce/printers/devices/index.stx +273 -0
  311. package/views/dashboard/commerce/printers/receipts/index.stx +308 -0
  312. package/views/dashboard/commerce/products/detail.stx +563 -0
  313. package/views/dashboard/commerce/products/index.stx +370 -0
  314. package/views/dashboard/commerce/reviews/index.stx +656 -0
  315. package/views/dashboard/commerce/reviews/index.ts +0 -0
  316. package/views/dashboard/commerce/taxes/index.stx +377 -0
  317. package/views/dashboard/commerce/units/index.stx +317 -0
  318. package/views/dashboard/commerce/variants/index.stx +319 -0
  319. package/views/dashboard/commerce/waitlist/products.stx +942 -0
  320. package/views/dashboard/commerce/waitlist/restaurant.stx +1024 -0
  321. package/views/dashboard/components/index.stx +330 -0
  322. package/views/dashboard/composables/index.ts +19 -0
  323. package/views/dashboard/composables/useChart.ts +77 -0
  324. package/views/dashboard/composables/useNavigation.ts +99 -0
  325. package/views/dashboard/composables/useRole.ts +58 -0
  326. package/views/dashboard/composables/useTheme.ts +74 -0
  327. package/views/dashboard/content/authors/index.stx +171 -0
  328. package/views/dashboard/content/blog/index.stx +493 -0
  329. package/views/dashboard/content/categories/index.stx +169 -0
  330. package/views/dashboard/content/comments/index.stx +189 -0
  331. package/views/dashboard/content/dashboard.stx +383 -0
  332. package/views/dashboard/content/files/index.stx +706 -0
  333. package/views/dashboard/content/pages/index.stx +174 -0
  334. package/views/dashboard/content/posts/index.stx +269 -0
  335. package/views/dashboard/content/seo/index.stx +240 -0
  336. package/views/dashboard/content/tags/index.stx +167 -0
  337. package/views/dashboard/data/activity/index.stx +261 -0
  338. package/views/dashboard/data/dashboard/index.stx +116 -0
  339. package/views/dashboard/data/subscribers.stx +270 -0
  340. package/views/dashboard/data/teams.stx +275 -0
  341. package/views/dashboard/data/users.stx +279 -0
  342. package/views/dashboard/dependencies/index.stx +178 -0
  343. package/views/dashboard/deployments/[id].stx +234 -0
  344. package/views/dashboard/deployments/index.stx +9 -0
  345. package/views/dashboard/dns/index.stx +163 -0
  346. package/views/dashboard/environment/index.stx +283 -0
  347. package/views/dashboard/errors/index.stx +274 -0
  348. package/views/dashboard/forgot-password.stx +57 -0
  349. package/views/dashboard/functions/index.stx +159 -0
  350. package/views/dashboard/health/index.stx +248 -0
  351. package/views/dashboard/inbox/activity.stx +350 -0
  352. package/views/dashboard/inbox/index.stx +452 -0
  353. package/views/dashboard/inbox/settings.stx +290 -0
  354. package/views/dashboard/index.stx +252 -0
  355. package/views/dashboard/insights/index.stx +529 -0
  356. package/views/dashboard/jobs/[id].stx +430 -0
  357. package/views/dashboard/jobs/history.stx +222 -0
  358. package/views/dashboard/jobs/index.stx +214 -0
  359. package/views/dashboard/kanban/[id].stx +899 -0
  360. package/views/dashboard/kanban/index.stx +260 -0
  361. package/views/dashboard/layouts/default.stx +565 -0
  362. package/views/dashboard/layouts/guest.stx +10 -0
  363. package/views/dashboard/login.stx +48 -0
  364. package/views/dashboard/logs/index.stx +540 -0
  365. package/views/dashboard/mailboxes/index.stx +149 -0
  366. package/views/dashboard/management/permissions/index.stx +490 -0
  367. package/views/dashboard/marketing/campaigns/index.stx +604 -0
  368. package/views/dashboard/marketing/lists/index.stx +514 -0
  369. package/views/dashboard/marketing/reviews/index.stx +475 -0
  370. package/views/dashboard/marketing/social-posts/index.stx +560 -0
  371. package/views/dashboard/models/[model].stx +195 -0
  372. package/views/dashboard/models/index.stx +159 -0
  373. package/views/dashboard/monitoring/errors/index.stx +415 -0
  374. package/views/dashboard/notifications/dashboard.stx +383 -0
  375. package/views/dashboard/notifications/email.stx +336 -0
  376. package/views/dashboard/notifications/history.stx +373 -0
  377. package/views/dashboard/notifications/sms.stx +332 -0
  378. package/views/dashboard/packages/index.stx +195 -0
  379. package/views/dashboard/queries/[id].stx +381 -0
  380. package/views/dashboard/queries/history.stx +227 -0
  381. package/views/dashboard/queries/index.stx +335 -0
  382. package/views/dashboard/queries/slow.stx +318 -0
  383. package/views/dashboard/queue/index.stx +427 -0
  384. package/views/dashboard/realtime/index.stx +429 -0
  385. package/views/dashboard/register.stx +46 -0
  386. package/views/dashboard/releases/index.stx +389 -0
  387. package/views/dashboard/requests/index.stx +462 -0
  388. package/views/dashboard/serverless/index.stx +475 -0
  389. package/views/dashboard/servers/[id].stx +299 -0
  390. package/views/dashboard/servers/index.stx +483 -0
  391. package/views/dashboard/settings/billing.stx +50 -0
  392. package/views/dashboard/settings/index.stx +256 -0
  393. package/views/dashboard/settings/mail.stx +252 -0
  394. package/views/dashboard/stores/auth.ts +123 -0
  395. package/views/dashboard/stores/ci.ts +342 -0
  396. package/views/dashboard/stores/index.ts +129 -0
  397. package/views/dashboard/stores/kanban.ts +723 -0
  398. package/views/dashboard/stores/rbac.ts +350 -0
  399. package/views/dashboard/stx.config.ts +34 -0
  400. package/views/dashboard/teams/[id].stx +170 -0
  401. package/views/forum/category.stx +92 -0
  402. package/views/forum/index.stx +209 -0
  403. package/views/forum/new-topic.stx +113 -0
  404. package/views/forum/profile.stx +1 -0
  405. package/views/forum/topic.stx +143 -0
  406. package/views/hello-world/[name].stx +47 -0
  407. package/views/index.stx +21 -0
  408. package/views/system-tray/index.stx +147 -0
@@ -0,0 +1,144 @@
1
+ ---
2
+ name: stacks-config
3
+ description: Use when working with Stacks configuration — the 44 config files, config helper functions, default values, environment-specific overrides, or the defineApp/defineDatabase/etc builder functions. Covers @stacksjs/config and the config/ directory.
4
+ license: MIT
5
+ compatibility: Bun >= 1.3.0, TypeScript
6
+ allowed-tools: Read Edit Write Bash Grep Glob
7
+ ---
8
+
9
+ # Stacks Configuration
10
+
11
+ ## Key Paths
12
+ - Core package: `storage/framework/core/config/src/`
13
+ - Configuration directory: `config/`
14
+ - Defaults: `storage/framework/core/config/src/defaults.ts`
15
+ - Overrides: `storage/framework/core/config/src/overrides.ts`
16
+
17
+ ## Config API
18
+
19
+ ```typescript
20
+ import { config, getConfig } from '@stacksjs/config'
21
+
22
+ config.app.name // 'Stacks'
23
+ config.database // full database config
24
+ config.auth // auth config
25
+ getConfig() // returns full StacksOptions
26
+ ```
27
+
28
+ ## Individual Config Exports
29
+
30
+ ```typescript
31
+ import { ai, analytics, app, auth, cache, cloud, cli, database, dns, docs, email, errors, git, hashing, library, logging, notification, payment, ports, queue, realtime, security, saas, searchEngine, services, filesystems, team, ui } from '@stacksjs/config'
32
+ ```
33
+
34
+ ## Config Builder Functions
35
+
36
+ ```typescript
37
+ import { defineApp, defineDatabase, defineCache, defineEmail } from '@stacksjs/config'
38
+
39
+ // Used in config files:
40
+ export default defineApp({
41
+ name: 'My App',
42
+ env: 'production',
43
+ url: 'https://myapp.com'
44
+ }) satisfies AppConfig
45
+ ```
46
+
47
+ All builders: `defineApp`, `defineCache`, `defineCdn`, `defineChat`, `defineCli`, `defineDatabase`, `defineDependencies`, `defineDns`, `defineEmailConfig`, `defineEmail`, `defineGit`, `defineHashing`, `defineLibrary`, `defineNotification`, `definePayment`, `defineQueue`, `defineSearchEngine`, `defineSecurity`, `defineServices`, `defineSms`, `defineFilesystems`, `defineUi`, `defineModel`, `defineEvents`
48
+
49
+ ## Helper Functions
50
+ - `determineAppEnv(): 'dev' | 'stage' | 'prod' | string`
51
+ - `localUrl(): string` — local development URL
52
+
53
+ ## All 44 Config Files
54
+
55
+ ### Core App
56
+ | File | Type | Key Settings |
57
+ |------|------|-------------|
58
+ | `app.ts` | AppConfig | name, env, url, debug, key, timezone, locale |
59
+ | `auth.ts` | AuthConfig | guards, providers, tokenExpiry(30d), tokenRotation(7d), passwordReset |
60
+ | `database.ts` | DatabaseConfig | default driver, connections (sqlite/mysql/postgres/dynamodb), queryLogging |
61
+ | `cache.ts` | CacheConfig | driver('memory'), ttl(3600), maxKeys(-1), redis config |
62
+ | `env.ts` | EnvConfig | validation schemas for env vars |
63
+ | `stacks.ts` | StackExtensionRegistry | extension definitions |
64
+
65
+ ### Services
66
+ | File | Type | Key Settings |
67
+ |------|------|-------------|
68
+ | `email.ts` | EmailConfig | from, domain, mailboxes, server config, ports, categorization, default('ses') |
69
+ | `sms.ts` | SmsConfig | enabled(false), provider('twilio'), drivers (twilio/vonage/pinpoint) |
70
+ | `notification.ts` | NotificationConfig | default('email') |
71
+ | `payment.ts` | PaymentConfig | driver('stripe'), stripe keys |
72
+ | `ai.ts` | AiConfig | default model, AWS Bedrock models |
73
+ | `analytics.ts` | AnalyticsConfig | driver('fathom'), tracking settings |
74
+
75
+ ### Infrastructure
76
+ | File | Type | Key Settings |
77
+ |------|------|-------------|
78
+ | `cloud.ts` | CloudConfig | project, mode(server/serverless), environments, infrastructure |
79
+ | `dns.ts` | DnsConfig | a, aaaa, cname, mx, txt records, nameservers |
80
+ | `queue.ts` | QueueConfig | default('sync'), connections (sync/database/redis/sqs/memory) |
81
+ | `realtime.ts` | RealtimeConfig | enabled(true), mode, driver, channels, WebSocket config |
82
+ | `search-engine.ts` | SearchEngineConfig | driver('opensearch') |
83
+
84
+ ### Development
85
+ | File | Type | Key Settings |
86
+ |------|------|-------------|
87
+ | `ports.ts` | Ports | frontend:3000, backend:3001, admin:3002, ... api:3008 |
88
+ | `lint.ts` | PickierOptions | format rules, indent, quotes, semi |
89
+ | `git.ts` | GitConfig | hooks, scopes, commit types |
90
+ | `commit.ts` | UserConfig | cz-git conventional commit config |
91
+ | `logging.ts` | LoggingConfig | logsPath, deploymentsPath |
92
+ | `docs.ts` | BunPressOptions | docsDir, outDir, nav, sitemap |
93
+
94
+ ### Security
95
+ | File | Type | Key Settings |
96
+ |------|------|-------------|
97
+ | `security.ts` | SecurityConfig | firewall (enabled, countryCodes, rateLimitPerMinute:500) |
98
+ | `hashing.ts` | HashingConfig | driver('bcrypt'), bcrypt.rounds(12), argon2 config |
99
+
100
+ ### Features
101
+ | File | Type | Key Settings |
102
+ |------|------|-------------|
103
+ | `blog.ts` | BlogConfig | subdomain, postsPerPage, enableComments/RSS/sitemap |
104
+ | `cms.ts` | CmsConfig | content management settings |
105
+ | `saas.ts` | SaasConfig | plans (Hobby/Pro/Lifetime with pricing), webhook, currencies |
106
+ | `ui.ts` | HeadwindOptions | content, output, minify |
107
+ | `stx.ts` | StxOptions | componentsDir, layoutsDir, partialsDir |
108
+
109
+ ### Data & Storage
110
+ | File | Type | Key Settings |
111
+ |------|------|-------------|
112
+ | `filesystems.ts` | FilesystemsConfig | driver('bun'), root, s3 config, defaultVisibility('private') |
113
+ | `file-systems.ts` | — | re-exports from filesystems.ts |
114
+ | `query-builder.ts` | — | re-exports from qb.ts |
115
+ | `qb.ts` | QueryBuilderConfig | dialect, timestamps, pagination, softDeletes, transactions |
116
+
117
+ ### Other
118
+ | File | Type | Key Settings |
119
+ |------|------|-------------|
120
+ | `buddy-bot.ts` | BuddyBotConfig | repository, dashboard, workflows |
121
+ | `cli.ts` | BinaryConfig | name, command, description |
122
+ | `deps.ts` | PantryConfig | system dependencies (bun, sqlite, redis, etc.) |
123
+ | `errors.ts` | ErrorConfig | comprehensive validation error messages |
124
+ | `library.ts` | LibraryConfig | name, owner, webComponents, functions |
125
+ | `phone.ts` | PhoneConfig | enabled, provider, businessHours |
126
+ | `services.ts` | ServicesConfig | API keys for 20+ services |
127
+ | `team.ts` | Team | name, members |
128
+
129
+ ## Default Values (from defaults.ts)
130
+ - App name: `'Stacks'`
131
+ - Cache driver: `'memory'`
132
+ - Database: SQLite at `database/stacks.sqlite`
133
+ - Hashing: bcrypt, 12 rounds
134
+ - Auth token expiry: 30 days
135
+ - Ports: frontend 3000, backend 3001, admin 3002, api 3008
136
+
137
+ ## Gotchas
138
+ - Config files are TypeScript with `satisfies` for type checking
139
+ - All configs support environment variable overrides via `env.*`
140
+ - Framework provides defaults — user overrides in `~/config/*.ts`
141
+ - Two duplicate file pairs: `file-systems.ts`/`filesystems.ts` and `query-builder.ts`/`qb.ts`
142
+ - Config changes may require dev server restart
143
+ - The `services.ts` file contains API keys for AWS, Stripe, Slack, Discord, OpenAI, Anthropic, etc.
144
+ - Lazy loading is used in config to avoid circular dependencies
@@ -0,0 +1,154 @@
1
+ ---
2
+ name: stacks-configuration
3
+ description: Use when setting up or modifying Stacks project-level configuration — bunfig.toml preload order, the tsconfig chain and TypeScript 7 / tsgo type checking, workspace configuration, .env setup, package.json scripts, system requirements (Bun >= 1.3.0, SQLite >= 3.47.2), or the project bootstrap process. For individual feature configs (database, email, auth, etc.), see the specific package skills instead.
4
+ license: MIT
5
+ compatibility: Bun >= 1.3.0, TypeScript
6
+ allowed-tools: Read Edit Write Bash Grep Glob
7
+ ---
8
+
9
+ # Stacks Project Configuration
10
+
11
+ Project-level configuration files that control the development environment, build system, and runtime. For feature-specific configs (database, email, auth, etc.), see the corresponding package skill.
12
+
13
+ ## bunfig.toml
14
+
15
+ ```toml
16
+ # Order matters: the env layer decrypts .env before the preloader reads it.
17
+ preload = [
18
+ "./storage/framework/core/env/plugin.ts",
19
+ "./storage/framework/defaults/resources/plugins/preloader.ts",
20
+ ]
21
+
22
+ [test]
23
+ preload = [
24
+ "./storage/framework/core/env/plugin.ts",
25
+ "./tests/setup.ts",
26
+ ]
27
+ coverage = false
28
+
29
+ [run]
30
+ bun = true # equivalent to `bun --bun` for `bun run`
31
+
32
+ [serve.static]
33
+ plugins = ["bun-plugin-stx"] # stx template processing for static serves
34
+
35
+ [install]
36
+ registry = { url = "https://registry.npmjs.org/", token = "$BUN_AUTH_TOKEN" }
37
+ linker = "hoisted" # REQUIRED when using better-dx
38
+ ```
39
+
40
+ See `stacks-plugins` for what each preloaded module does, and why some commands
41
+ deliberately skip the auto-import graph.
42
+
43
+ ## TypeScript
44
+
45
+ There is exactly **one** tsconfig in the project root. It extends the framework's
46
+ app config, and restates the tunable defaults so you can edit or delete any one
47
+ of them:
48
+
49
+ ```
50
+ tsconfig.json <- yours; the only one in the root
51
+ extends storage/framework/tsconfig.app.json <- app paths, include/exclude
52
+ extends storage/framework/tsconfig.base.json <- every compiler option
53
+ ```
54
+
55
+ - Change a line in the root `compilerOptions` to override that option.
56
+ - Delete a line to fall back to the framework default.
57
+ - Delete the whole block to take the defaults wholesale.
58
+
59
+ Path aliases, module resolution, and which files get checked are owned by the
60
+ framework and update with it.
61
+
62
+ Framework internals are checked separately by
63
+ `storage/framework/tsconfig.framework.json` - do not point your root config at
64
+ `storage/framework/**`.
65
+
66
+ ```bash
67
+ bun run typecheck:app # app/, config/, resources/, routes/
68
+ bun run typecheck # framework internals
69
+ bun run typecheck:clean # drop the incremental cache
70
+ ```
71
+
72
+ Type checking runs on TypeScript 7 - `tsc` is the native Go compiler (tsgo), so
73
+ both checks finish in a couple of seconds. Options removed in 7.0 (`baseUrl`,
74
+ `importsNotUsedAsValues`, `preserveValueImports`, `suppressImplicitAnyIndexErrors`)
75
+ are gone from every config; path mappings resolve relative to the file that
76
+ declares them, so no `baseUrl` is needed.
77
+
78
+ Incremental build info lands in `storage/framework/.cache/typescript/`, not in
79
+ `node_modules`, so it survives a reinstall.
80
+
81
+ ## package.json (Root)
82
+
83
+ Key sections:
84
+ ```json
85
+ {
86
+ "type": "module",
87
+ "workspaces": [
88
+ "storage/framework/**",
89
+ "!**/node_modules/**",
90
+ "!**/dist/**",
91
+ "!**/docs/deps/**",
92
+ "!storage/framework/server/storage/**",
93
+ "!storage/framework/cache/**"
94
+ ],
95
+ "engines": {
96
+ "bun": ">=1.3.0"
97
+ },
98
+ "systemDependencies": {
99
+ "sqlite": ">=3.47.2"
100
+ }
101
+ }
102
+ ```
103
+
104
+ ## .env Setup
105
+
106
+ ```bash
107
+ # Required
108
+ APP_NAME=MyApp
109
+ APP_ENV=local # local | dev | stage | prod
110
+ APP_KEY= # generate with: buddy key:generate
111
+ APP_URL=http://localhost:3000
112
+
113
+ # Database
114
+ DB_CONNECTION=sqlite # sqlite | mysql | postgres
115
+ DB_DATABASE=database/stacks.sqlite
116
+
117
+ # Optional (add as needed)
118
+ AWS_ACCESS_KEY_ID=
119
+ AWS_SECRET_ACCESS_KEY=
120
+ STRIPE_SECRET_KEY=
121
+ MAIL_MAILER=ses
122
+ ```
123
+
124
+ ## System Requirements
125
+ - **Bun** >= 1.3.0 (runtime + package manager)
126
+ - **SQLite** >= 3.47.2 (default database)
127
+
128
+ ## Key Project Scripts
129
+ ```bash
130
+ bun run dev # start dev server
131
+ bun run build # production build
132
+ bun run lint # lint (uses pickier)
133
+ bun run test # run tests
134
+ bun run deploy # deploy to cloud
135
+ bun run fresh # clean reinstall
136
+ bun run build:reset # full clean rebuild
137
+ ```
138
+
139
+ ## better-dx Integration
140
+ - Provides `typescript`, `pickier`, `bun-plugin-dtsx` as peer dependencies
141
+ - Do NOT install these separately if `better-dx` is in package.json
142
+ - REQUIRES `linker = "hoisted"` in bunfig.toml
143
+
144
+ ## Gotchas
145
+ - `bunfig.toml` MUST have `linker = "hoisted"` when better-dx is installed
146
+ - **Preload order is load-bearing** — the env plugin decrypts `.env` before the
147
+ preloader reads it. Swapping them breaks encrypted config
148
+ - The stx plugin belongs under `[serve.static]`, not `[serve]`
149
+ - **One tsconfig in the root.** Adding a second (a `tsconfig.framework.json`, say)
150
+ splits the source of truth. Point scripts at the framework's config by path
151
+ instead
152
+ - Workspace excludes prevent `node_modules` and `dist` from being treated as packages
153
+ - `.env` is auto-loaded by Bun — no dotenv package needed
154
+ - Generate APP_KEY before deployment: `buddy key:generate`
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: stacks-cron
3
+ description: Use when working with cron expressions in a Stacks application — parsing cron syntax, registering OS-level cron jobs, or low-level scheduling. Covers @stacksjs/cron. For higher-level scheduling, see stacks-scheduler.
4
+ license: MIT
5
+ compatibility: Bun >= 1.3.0, TypeScript
6
+ allowed-tools: Read Edit Write Bash Grep Glob
7
+ ---
8
+
9
+ # Stacks Cron
10
+
11
+ Low-level cron expression parser and OS-level job registration. For most scheduling tasks, use `@stacksjs/scheduler` instead.
12
+
13
+ ## Key Paths
14
+ - Core package: `storage/framework/core/cron/src/`
15
+ - Package: `@stacksjs/cron`
16
+
17
+ ## Source Files
18
+ ```
19
+ cron/src/
20
+ ├── index.ts # Re-exports
21
+ ├── parser.ts # Cron expression parser (parseCron)
22
+ ├── types.ts # Type definitions
23
+ └── bun-cron.d.ts # Bun.cron type declarations
24
+ ```
25
+
26
+ ## API
27
+
28
+ ### parse
29
+
30
+ ```typescript
31
+ import { parse } from '@stacksjs/cron'
32
+
33
+ function parse(expression: string, relativeDate?: Date | number): Date | null
34
+ ```
35
+
36
+ Parses a cron expression and returns the next matching UTC date. Falls back to native `Bun.cron.parse()` if available.
37
+
38
+ ```typescript
39
+ parse('0 0 * * *') // Next midnight UTC
40
+ parse('*/5 * * * *') // Next 5-minute mark
41
+ parse('0 9 * * MON-FRI') // Next weekday at 9 AM
42
+ parse('0 0 1 * *', new Date()) // Next 1st of month from now
43
+ ```
44
+
45
+ ### parseCron (Native Implementation)
46
+
47
+ ```typescript
48
+ import { parseCron } from '@stacksjs/cron'
49
+
50
+ function parseCron(expression: string, relativeDate?: Date | number): Date | null
51
+ ```
52
+
53
+ Full 5-field cron parser supporting:
54
+
55
+ | Field | Values | Special Characters |
56
+ |-------|--------|--------------------|
57
+ | Minute | 0-59 | `*` `,` `-` `/` |
58
+ | Hour | 0-23 | `*` `,` `-` `/` |
59
+ | Day of Month | 1-31 | `*` `,` `-` `/` |
60
+ | Month | 1-12 or JAN-DEC | `*` `,` `-` `/` |
61
+ | Day of Week | 0-6 or SUN-SAT | `*` `,` `-` `/` |
62
+
63
+ ### Nicknames
64
+
65
+ | Nickname | Equivalent |
66
+ |----------|-----------|
67
+ | `@yearly` / `@annually` | `0 0 1 1 *` |
68
+ | `@monthly` | `0 0 1 * *` |
69
+ | `@weekly` | `0 0 * * 0` |
70
+ | `@daily` / `@midnight` | `0 0 * * *` |
71
+ | `@hourly` | `0 * * * *` |
72
+
73
+ ### register
74
+
75
+ ```typescript
76
+ import { register } from '@stacksjs/cron'
77
+
78
+ async function register(path: string, schedule: string, title: string): Promise<void>
79
+ ```
80
+
81
+ Registers an OS-level cron job. Requires Bun.cron support.
82
+
83
+ - `path` — path to the script (must export `scheduled(controller)` handler)
84
+ - `schedule` — cron expression
85
+ - `title` — job identifier (alphanumeric, hyphens, underscores only)
86
+
87
+ ### remove
88
+
89
+ ```typescript
90
+ import { remove } from '@stacksjs/cron'
91
+
92
+ async function remove(title: string): Promise<void>
93
+ ```
94
+
95
+ Removes a registered cron job by title.
96
+
97
+ ## Types
98
+
99
+ ```typescript
100
+ type CatchCallbackFn = (error: Error) => void
101
+ type ProtectCallbackFn = () => void
102
+ type IntRange<Min, Max> // TypeScript utility for bounded integer ranges
103
+ ```
104
+
105
+ ## Cron Expression Examples
106
+
107
+ ```typescript
108
+ parse('*/5 * * * *') // Every 5 minutes
109
+ parse('0 */2 * * *') // Every 2 hours
110
+ parse('0 9,17 * * *') // At 9 AM and 5 PM
111
+ parse('0 0 * * MON') // Every Monday at midnight
112
+ parse('0 0 1,15 * *') // 1st and 15th of each month
113
+ parse('30 4 * * SUN') // Sundays at 4:30 AM
114
+ ```
115
+
116
+ ## Gotchas
117
+ - **Low-level primitive** — for most use cases, prefer `@stacksjs/scheduler` which provides `.daily()`, `.hourly()`, etc.
118
+ - **UTC dates** — `parse()` returns UTC dates, not local time
119
+ - **POSIX OR logic** — when both dayOfMonth and dayOfWeek are specified (not `*`), matches if EITHER matches
120
+ - **Named values** — supports JAN-DEC and SUN-SAT (case-insensitive)
121
+ - **Searches up to ~4 years** — parser iterates forward to find the next match, stops after ~4 years
122
+ - **OS-level registration** — `register()` requires Bun.cron support (not available in all environments)
123
+ - **`register()` scripts must export `scheduled()`** — the target file must have a `scheduled(controller)` handler
@@ -0,0 +1,190 @@
1
+ ---
2
+ name: stacks-crosswind
3
+ description: Use when styling components in a Stacks application — utility-first CSS classes, theming, responsive design, variants, custom rules, or CSS generation. Crosswind is the CSS utility engine powering Stacks' Crosswind config.
4
+ license: MIT
5
+ compatibility: Bun >= 1.3.0, TypeScript
6
+ allowed-tools: Read Edit Write Bash Grep Glob
7
+ ---
8
+
9
+ # Crosswind CSS Framework
10
+
11
+ Crosswind (`@cwcss/crosswind`) is the utility-first CSS engine for Stacks — similar to Tailwind CSS but built for Bun.
12
+
13
+ ## Design & anti-slop skills
14
+
15
+ For taste-level guidance on *which* utilities to reach for (layout variance, spacing rhythm, color calibration, motion), see the design-taste family: `stacks-design-taste` (flagship), the presets `stacks-design-soft` / `stacks-design-minimalist` / `stacks-design-brutalist`, `stacks-redesign`, `stacks-design-output`, and the image-first `stacks-image-to-code` / `stacks-imagegen-web` / `stacks-imagegen-mobile` / `stacks-brandkit`.
16
+
17
+ ## Key Paths
18
+ - Package: `node_modules/@cwcss/crosswind/`
19
+ - UI config: `config/ui.ts` (Crosswind options referencing Crosswind)
20
+ - Default styles: `storage/framework/defaults/styles/`
21
+ - Output: `storage/framework/stx/cache/cw-<hash>.css`, one file per page (stx's `stateDir`, set in `config/ui.ts`)
22
+
23
+ ## Core API
24
+
25
+ ### CSSGenerator
26
+
27
+ ```typescript
28
+ import { CSSGenerator } from '@cwcss/crosswind'
29
+
30
+ const generator = new CSSGenerator(config: CrosswindConfig)
31
+ generator.generate(className: string): void // Process a single class
32
+ generator.toCSS(includePreflight?, minify?): string // Output CSS
33
+ generator.reset(): void // Clear generated CSS
34
+ ```
35
+
36
+ ### Parser
37
+
38
+ ```typescript
39
+ import { parseClass, expandBracketSyntax, extractClasses, extractAttributifyClasses } from '@cwcss/crosswind'
40
+
41
+ parseClass('hover:bg-blue-500'): ParsedClass
42
+ // { raw: 'hover:bg-blue-500', variants: ['hover'], utility: 'bg-blue-500', important: false, arbitrary: false }
43
+
44
+ extractClasses(htmlContent: string, options?): Set<string>
45
+ expandBracketSyntax('text-[#1a1a1a]', config?): string[]
46
+ extractAttributifyClasses(content, config?): Set<string>
47
+ ```
48
+
49
+ ### Scanner
50
+
51
+ ```typescript
52
+ import { Scanner } from '@cwcss/crosswind'
53
+
54
+ const scanner = new Scanner(patterns: string[], transformer?, extractOptions?)
55
+ await scanner.scan(): Promise<ScanResult>
56
+ await scanner.scanFile(filePath: string): Promise<Set<string>>
57
+ scanner.scanContent(content: string): Set<string>
58
+ ```
59
+
60
+ ### Build Functions
61
+
62
+ ```typescript
63
+ import { build, writeCSS, buildAndWrite } from '@cwcss/crosswind'
64
+
65
+ const result = await build(config: CrosswindConfig): Promise<BuildResult>
66
+ await writeCSS(css: string, outputPath: string): Promise<void>
67
+ await buildAndWrite(config: CrosswindConfig): Promise<BuildResult>
68
+
69
+ interface BuildResult {
70
+ css: string
71
+ classes: Set<string>
72
+ duration: number
73
+ compiledClasses?: Map<string, { className: string, utilities: string[] }>
74
+ transformedFiles?: Map<string, string>
75
+ }
76
+ ```
77
+
78
+ ### Bun Plugin
79
+
80
+ ```typescript
81
+ import { plugin } from '@cwcss/crosswind'
82
+
83
+ const bunPlugin = plugin(options?: CrosswindPluginOptions): BunPlugin
84
+ ```
85
+
86
+ ## Configuration
87
+
88
+ ```typescript
89
+ interface CrosswindConfig {
90
+ content: string[] // Glob patterns for source files
91
+ output: string // Output CSS file path
92
+ minify: boolean
93
+ watch: boolean
94
+ verbose?: boolean
95
+ theme: Theme
96
+ shortcuts: Record<string, string | string[]>
97
+ rules: CustomRule[]
98
+ variants: VariantConfig
99
+ safelist: string[] // Always include these classes
100
+ blocklist: string[] // Never include these classes
101
+ preflights: Preflight[]
102
+ presets: Preset[]
103
+ compileClass?: CompileClassConfig
104
+ attributify?: AttributifyConfig
105
+ bracketSyntax?: BracketSyntaxConfig
106
+ cssVariables?: boolean
107
+ }
108
+ ```
109
+
110
+ ### Theme
111
+
112
+ ```typescript
113
+ interface Theme {
114
+ colors: Record<string, string | Record<string, string>>
115
+ spacing: Record<string, string>
116
+ fontSize: Record<string, [string, { lineHeight: string }]>
117
+ fontFamily: Record<string, string[]>
118
+ screens: Record<string, string>
119
+ borderRadius: Record<string, string>
120
+ boxShadow: Record<string, string>
121
+ extend?: Partial<Omit<Theme, 'extend'>>
122
+ }
123
+ ```
124
+
125
+ ### Variants (40+ built-in)
126
+
127
+ ```
128
+ responsive, hover, focus, active, disabled, dark, group, peer,
129
+ before, after, marker, first, last, odd, even, first-of-type,
130
+ last-of-type, visited, checked, focus-within, focus-visible,
131
+ placeholder, selection, file, required, valid, invalid, read-only,
132
+ autofill, open, closed, empty, enabled, only, target, indeterminate,
133
+ default, optional, print, rtl, ltr, motion-safe, motion-reduce,
134
+ contrast-more, contrast-less
135
+ ```
136
+
137
+ ### Parsed Class Structure
138
+
139
+ ```typescript
140
+ interface ParsedClass {
141
+ raw: string // Original class string
142
+ variants: string[] // Applied variants (hover, focus, etc.)
143
+ utility: string // Core utility name
144
+ value?: string // Arbitrary value if present
145
+ important: boolean // Has ! prefix
146
+ arbitrary: boolean // Uses [] brackets
147
+ typeHint?: string // Type hint for arbitrary values
148
+ }
149
+ ```
150
+
151
+ ## Usage in Templates
152
+
153
+ ```html
154
+ <div class="flex items-center justify-between p-4 bg-white rounded-lg shadow">
155
+ <h1 class="font-bold text-2xl text-gray-900">Title</h1>
156
+ <button class="px-4 py-2 text-white bg-blue-500 hover:bg-blue-600 rounded">
157
+ Click me
158
+ </button>
159
+ </div>
160
+
161
+ <!-- Arbitrary values -->
162
+ <div class="grid-cols-[1fr_2fr] w-[calc(100%-2rem)] text-[#1a1a1a]">
163
+
164
+ <!-- Dark mode -->
165
+ <div class="text-black dark:text-white bg-white dark:bg-gray-900">
166
+
167
+ <!-- Responsive -->
168
+ <div class="w-full md:w-1/2 lg:w-1/3">
169
+ ```
170
+
171
+ ## Built-in Utility Categories
172
+ - Display (flex, grid, block, hidden, container)
173
+ - Flexbox (direction, wrap, justify, align, gap)
174
+ - Spacing (margin, padding)
175
+ - Sizing (width, height, min/max)
176
+ - Typography (font-size, font-weight, line-height, text-align, text-color)
177
+ - Colors (background, text, border, ring)
178
+ - Borders (width, radius, style)
179
+ - Effects (shadow, opacity)
180
+ - Transitions & animations
181
+
182
+ ## Gotchas
183
+ - **Not Tailwind** — Crosswind is a separate implementation with Tailwind-compatible syntax
184
+ - **Stacks uses Crosswind config** — `config/ui.ts` defines Crosswind options which feed Crosswind
185
+ - **Output is per-page, content-hashed** — `storage/framework/stx/cache/cw-<hash>.css`, generated on demand rather than one bundled stylesheet. The directory is gitignored and safe to delete; the next request regenerates it
186
+ - **Bun plugin available** — can be used as a Bun build plugin for automatic CSS generation
187
+ - **Attributify mode** — optional mode where utilities can be written as HTML attributes instead of classes
188
+ - **Bracket syntax** — `text-[#custom]` for arbitrary values, same as Tailwind JIT
189
+ - **Custom rules** — defined as `[RegExp, (match) => Record<string, string>]` tuples
190
+ - **Presets** — extensible via presets for shared configurations