@birdapi/velinstyle 1.1.0 → 1.2.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 (328) hide show
  1. package/README.de.md +89 -161
  2. package/README.md +187 -119
  3. package/cli/blueprint.js +98 -5
  4. package/cli/blueprints/app-chrome.html +18 -0
  5. package/cli/blueprints/benefits-grid.html +9 -0
  6. package/cli/blueprints/bottom-nav-mobile.html +2 -1
  7. package/cli/blueprints/cookie-consent.html +1 -1
  8. package/cli/blueprints/cta-band.html +6 -0
  9. package/cli/blueprints/faq-section.html +18 -0
  10. package/cli/blueprints/filter-bar.html +4 -4
  11. package/cli/blueprints/form-contact.html +6 -5
  12. package/cli/blueprints/hero-section.html +3 -3
  13. package/cli/blueprints/notification-center.html +1 -1
  14. package/cli/blueprints/onboarding.html +2 -1
  15. package/cli/blueprints/ops-console.html +29 -0
  16. package/cli/blueprints/pricing-band.html +37 -0
  17. package/cli/blueprints/process-steps.html +10 -0
  18. package/cli/blueprints/services-grid.html +9 -0
  19. package/cli/blueprints/settings-panel.html +8 -6
  20. package/cli/blueprints/split-hero.html +25 -0
  21. package/cli/blueprints/testimonials.html +8 -0
  22. package/cli/blueprints/trust-bar.html +10 -0
  23. package/cli/cli-manifest.json +81 -17
  24. package/cli/contrast-utils.js +97 -0
  25. package/cli/create.js +370 -0
  26. package/cli/docgen/extract-attributes.js +128 -10
  27. package/cli/docgen/extract-cli.js +3 -2
  28. package/cli/docgen/extract-components.js +61 -2
  29. package/cli/docgen/extract-utilities.js +10 -10
  30. package/cli/doctor.js +119 -0
  31. package/cli/index.js +560 -44
  32. package/cli/meta.js +84 -1
  33. package/cli/perf-audit.js +15 -2
  34. package/cli/prompt-engine.js +243 -0
  35. package/cli/review.js +268 -0
  36. package/cli/scaffold.js +119 -4
  37. package/cli/scanner-rules-data.js +7 -0
  38. package/cli/scanner.js +357 -4
  39. package/cli/serve.js +81 -0
  40. package/cli/skills.js +223 -0
  41. package/cli/transparency.js +221 -0
  42. package/cli/wc-api.js +89 -0
  43. package/cli/workflow.js +42 -0
  44. package/components/index.js +2 -0
  45. package/components/runtime/component-loaders.js +2 -0
  46. package/components/velin-accordion.js +62 -13
  47. package/components/velin-bottom-nav.js +10 -0
  48. package/components/velin-calendar.js +212 -0
  49. package/components/velin-command.js +18 -2
  50. package/components/velin-data-table.js +78 -1
  51. package/components/velin-dialog.js +4 -1
  52. package/components/velin-drawer.js +2 -4
  53. package/components/velin-file-dropzone.js +162 -0
  54. package/components/velin-icon.js +22 -1
  55. package/components/velin-lightbox.js +5 -3
  56. package/components/velin-modal.js +2 -4
  57. package/components/velin-search.js +1 -1
  58. package/components/velin-sheet.js +2 -4
  59. package/core/a11y/component-contracts.json +20 -3
  60. package/core/attributes/registry.js +14 -0
  61. package/core/meta/build.js +125 -5
  62. package/core/meta/design-constraints/contact.json +9 -0
  63. package/core/meta/design-constraints/faq.json +9 -0
  64. package/core/meta/design-constraints/hero.json +13 -0
  65. package/core/meta/knowledge/components.json +622 -0
  66. package/core/meta/knowledge/tokens.json +282 -0
  67. package/core/meta/pages/registry.json +294 -0
  68. package/core/meta/schema.js +13 -1
  69. package/core/meta/sections/registry.json +185 -0
  70. package/core/transparency/attach.js +74 -0
  71. package/core/transparency/claims.js +97 -0
  72. package/core/transparency/doctor.js +142 -0
  73. package/core/transparency/engine.js +75 -0
  74. package/core/transparency/export.js +98 -0
  75. package/core/transparency/index.js +30 -0
  76. package/core/transparency/migrate.js +130 -0
  77. package/core/transparency/normalize.js +125 -0
  78. package/core/transparency/policy.js +105 -0
  79. package/core/transparency/providers.js +235 -0
  80. package/core/transparency/registry.js +104 -0
  81. package/core/transparency/renderer.js +111 -0
  82. package/core/transparency/reporter.js +113 -0
  83. package/core/transparency/validator.js +112 -0
  84. package/dist/chunks/attach-H2ZSEAE6.js +365 -0
  85. package/dist/chunks/{attributes-STYCS3O5.js → attributes-A423NX5J.js} +3 -3
  86. package/dist/chunks/attributes-DZCXX2RZ.js +404 -0
  87. package/dist/chunks/{attributes-353XDOAX.js → attributes-F6UPIEVP.js} +1 -1
  88. package/dist/chunks/{attributes-ADOKLKA7.js → attributes-GLYXGGAL.js} +3 -3
  89. package/dist/chunks/{attributes-TPANLMLF.js → attributes-UFTYOSAU.js} +3 -3
  90. package/dist/chunks/attributes-XGLXLR2T.js +391 -0
  91. package/dist/chunks/attributes-YF4NI2QS.js +391 -0
  92. package/dist/chunks/browser-AUABBYUK.js +1544 -0
  93. package/dist/chunks/{chunk-RSMRR27R.js → chunk-2LSKX57P.js} +12 -10
  94. package/dist/chunks/{chunk-IEHKRARD.js → chunk-2TGCVDUL.js} +11 -9
  95. package/dist/chunks/{chunk-SRL6EWHP.js → chunk-5JWGUAPC.js} +17 -13
  96. package/dist/chunks/chunk-7YSO2OQ2.js +113 -0
  97. package/dist/chunks/{chunk-QVHYL3R4.js → chunk-BHR3ZG6U.js} +6 -6
  98. package/dist/chunks/chunk-CQMTCEI6.js +113 -0
  99. package/dist/chunks/{chunk-J472ERN2.js → chunk-JMSIHEYX.js} +15 -4
  100. package/dist/chunks/{chunk-MKZP2TBH.js → chunk-L7ZGUU4D.js} +2 -2
  101. package/dist/chunks/chunk-TUGIPKW5.js +113 -0
  102. package/dist/chunks/{highlight-GJHHV4KM.js → highlight-M2ELQNYK.js} +1 -1
  103. package/dist/chunks/runtime-entry.js +1 -1
  104. package/dist/chunks/{velin-accordion-FBIPAEXG.js → velin-accordion-WSY6BMLA.js} +64 -10
  105. package/dist/chunks/{velin-bottom-nav-7GEMPIM6.js → velin-bottom-nav-5RVRNGIP.js} +25 -0
  106. package/dist/chunks/{velin-bottom-nav-N3DFQR66.js → velin-bottom-nav-N5F4UO2I.js} +26 -1
  107. package/dist/chunks/velin-calendar-OFE6THUD.js +210 -0
  108. package/dist/chunks/velin-calendar-PGVNJTXK.js +217 -0
  109. package/dist/chunks/velin-calendar-XC7JRDSH.js +217 -0
  110. package/dist/chunks/{velin-code-block-CIAURDRJ.js → velin-code-block-ZGWG7JI5.js} +1 -1
  111. package/dist/chunks/{velin-combobox-NXS4QB4R.js → velin-combobox-56V2ZWT5.js} +1 -1
  112. package/dist/chunks/{velin-command-ONKO2A3J.js → velin-command-2HO2EKR6.js} +29 -2
  113. package/dist/chunks/{velin-command-TMLSRGIU.js → velin-command-ZJSLPK7B.js} +30 -3
  114. package/dist/chunks/{velin-copy-NYDBOKXT.js → velin-copy-XDQSV2XU.js} +1 -1
  115. package/dist/chunks/{velin-countdown-4ZVDGK4R.js → velin-countdown-V4Z5MA63.js} +1 -1
  116. package/dist/chunks/velin-data-table-UVR42UUM.js +372 -0
  117. package/dist/chunks/{velin-dialog-GTTZI564.js → velin-dialog-3YK2RPRV.js} +9 -2
  118. package/dist/chunks/{velin-dialog-ELFOZIXZ.js → velin-dialog-S24KAP4S.js} +3 -1
  119. package/dist/chunks/{velin-drawer-BE6TYN3H.js → velin-drawer-5PNU624J.js} +2 -4
  120. package/dist/chunks/{velin-drawer-DLL2GLT6.js → velin-drawer-CCM6S25D.js} +3 -5
  121. package/dist/chunks/{velin-email-RBX6ZR4S.js → velin-email-TNFONXPW.js} +1 -1
  122. package/dist/chunks/velin-file-dropzone-QRGF2JNA.js +154 -0
  123. package/dist/chunks/velin-file-dropzone-XIZMJ3NB.js +154 -0
  124. package/dist/chunks/{velin-icon-7M76DOPB.js → velin-icon-A6NCXGUK.js} +59 -17
  125. package/dist/chunks/{velin-icon-ZTSKUOVN.js → velin-icon-EC4B5XCM.js} +18 -5
  126. package/dist/chunks/{velin-lightbox-6E7CAATP.js → velin-lightbox-FFK4TUUP.js} +7 -6
  127. package/dist/chunks/{velin-lightbox-NXA3U2FM.js → velin-lightbox-P725FLTY.js} +5 -4
  128. package/dist/chunks/{velin-menubar-J66JXRWW.js → velin-menubar-6I2LM5HL.js} +1 -1
  129. package/dist/chunks/{velin-modal-5HYNNNUI.js → velin-modal-ICTMGRSU.js} +7 -8
  130. package/dist/chunks/{velin-modal-AEOTZ67O.js → velin-modal-JBNODH7D.js} +2 -4
  131. package/dist/chunks/{velin-popover-T72HK3DF.js → velin-popover-WZG2GHBL.js} +25 -4
  132. package/dist/chunks/{velin-rating-N4DI2XNL.js → velin-rating-QBBYRRBU.js} +1 -1
  133. package/dist/chunks/{velin-search-7B4KJ6TX.js → velin-search-B3L6J2RP.js} +2 -2
  134. package/dist/chunks/{velin-search-2XRQFBCS.js → velin-search-L3UG6NDQ.js} +5 -4
  135. package/dist/chunks/{velin-secure-field-6PV7RZDJ.js → velin-secure-field-DGYMP7OK.js} +1 -1
  136. package/dist/chunks/{velin-segmented-control-GYD5BIXQ.js → velin-segmented-control-P74GJPAR.js} +1 -1
  137. package/dist/chunks/{velin-sheet-R2Y67X6H.js → velin-sheet-M5GZZD7G.js} +2 -4
  138. package/dist/chunks/{velin-sheet-OUK6572T.js → velin-sheet-X7RXIWKV.js} +3 -5
  139. package/dist/chunks/{velin-stepper-X54WGHDG.js → velin-stepper-4YQJUHPC.js} +12 -5
  140. package/dist/chunks/{velin-toast-OMMOA2DK.js → velin-toast-UG5LWTG2.js} +5 -1
  141. package/dist/chunks/{velin-tooltip-BDHGRTQB.js → velin-tooltip-ZDH5SDLU.js} +1 -1
  142. package/dist/llms.txt +31 -8
  143. package/dist/search-index.json +182 -10
  144. package/dist/velin-agent.json +3980 -31
  145. package/dist/velinstyle-components.iife.js +1622 -286
  146. package/dist/velinstyle-components.js +1624 -286
  147. package/dist/velinstyle-components.min.js +262 -114
  148. package/dist/velinstyle.css +412 -67
  149. package/dist/velinstyle.d.ts +2 -0
  150. package/dist/velinstyle.min.css +1 -1
  151. package/package.json +21 -6
  152. package/packages/skill-engine/README.md +24 -0
  153. package/packages/skill-engine/package.json +7 -0
  154. package/packages/skill-engine/src/catalog.js +29 -0
  155. package/packages/skill-engine/src/index.js +5 -0
  156. package/packages/skill-engine/src/install.js +69 -0
  157. package/packages/skill-engine/src/registry.js +27 -0
  158. package/packages/skill-engine/src/resolve.js +68 -0
  159. package/packages/skill-engine/src/validate.js +40 -0
  160. package/packages/velinstyle-skills/README.md +6 -0
  161. package/packages/velinstyle-skills/adapter.json +8 -0
  162. package/packages/velinstyle-skills/bundles/landing-starter.bundle.yaml +12 -0
  163. package/packages/velinstyle-skills/bundles/review-suite.bundle.yaml +11 -0
  164. package/packages/velinstyle-skills/catalog.json +1004 -0
  165. package/packages/velinstyle-skills/graphs/component-ship.graph.yaml +14 -0
  166. package/packages/velinstyle-skills/graphs/landingpage.graph.yaml +21 -0
  167. package/packages/velinstyle-skills/graphs/release-gate.graph.yaml +15 -0
  168. package/packages/velinstyle-skills/index.js +22 -0
  169. package/packages/velinstyle-skills/package.json +7 -0
  170. package/packages/velinstyle-skills/packs/accessibility.pack.yaml +9 -0
  171. package/packages/velinstyle-skills/packs/design.pack.yaml +10 -0
  172. package/packages/velinstyle-skills/packs/documentation.pack.yaml +8 -0
  173. package/packages/velinstyle-skills/packs/enterprise.pack.yaml +10 -0
  174. package/packages/velinstyle-skills/packs/frontend.pack.yaml +10 -0
  175. package/packages/velinstyle-skills/packs/review.pack.yaml +9 -0
  176. package/packages/velinstyle-skills/projects/admin-panel.project.yaml +12 -0
  177. package/packages/velinstyle-skills/projects/blog.project.yaml +11 -0
  178. package/packages/velinstyle-skills/projects/documentation-portal.project.yaml +13 -0
  179. package/packages/velinstyle-skills/projects/ecommerce-shop.project.yaml +12 -0
  180. package/packages/velinstyle-skills/projects/landing-page.project.yaml +12 -0
  181. package/packages/velinstyle-skills/projects/laravel-dashboard.project.yaml +12 -0
  182. package/packages/velinstyle-skills/projects/marketing-website.project.yaml +14 -0
  183. package/packages/velinstyle-skills/projects/portfolio.project.yaml +12 -0
  184. package/packages/velinstyle-skills/registry.json +142 -0
  185. package/packages/velinstyle-skills/scripts/generate-assets.mjs +163 -0
  186. package/packages/velinstyle-skills/skills/velin-a11y-focus-keyboard/SKILL.md +57 -0
  187. package/packages/velinstyle-skills/skills/velin-a11y-page-checklist/SKILL.md +57 -0
  188. package/packages/velinstyle-skills/skills/velin-a11y-scan-fix/SKILL.md +57 -0
  189. package/packages/velinstyle-skills/skills/velin-ai-agent-briefing/SKILL.md +57 -0
  190. package/packages/velinstyle-skills/skills/velin-ai-plan-scaffold-review/SKILL.md +57 -0
  191. package/packages/velinstyle-skills/skills/velin-ai-skill-authoring/SKILL.md +57 -0
  192. package/packages/velinstyle-skills/skills/velin-components-accessibility-map/SKILL.md +57 -0
  193. package/packages/velinstyle-skills/skills/velin-components-api-contract/SKILL.md +57 -0
  194. package/packages/velinstyle-skills/skills/velin-components-recipe/SKILL.md +57 -0
  195. package/packages/velinstyle-skills/skills/velin-components-select-compose/SKILL.md +57 -0
  196. package/packages/velinstyle-skills/skills/velin-design-hero-compose/SKILL.md +57 -0
  197. package/packages/velinstyle-skills/skills/velin-design-section-rhythm/SKILL.md +57 -0
  198. package/packages/velinstyle-skills/skills/velin-design-surface-roles/SKILL.md +57 -0
  199. package/packages/velinstyle-skills/skills/velin-dev-component-wire/SKILL.md +57 -0
  200. package/packages/velinstyle-skills/skills/velin-dev-page-scaffold/SKILL.md +57 -0
  201. package/packages/velinstyle-skills/skills/velin-dev-plan-first/SKILL.md +57 -0
  202. package/packages/velinstyle-skills/skills/velin-docs-component-guide/SKILL.md +57 -0
  203. package/packages/velinstyle-skills/skills/velin-docs-generate-api/SKILL.md +57 -0
  204. package/packages/velinstyle-skills/skills/velin-dx-doctor-setup/SKILL.md +57 -0
  205. package/packages/velinstyle-skills/skills/velin-dx-project-init/SKILL.md +57 -0
  206. package/packages/velinstyle-skills/skills/velin-migration-legacy-wc/SKILL.md +57 -0
  207. package/packages/velinstyle-skills/skills/velin-migration-prefix-classes/SKILL.md +57 -0
  208. package/packages/velinstyle-skills/skills/velin-motion-reduced-safe/SKILL.md +57 -0
  209. package/packages/velinstyle-skills/skills/velin-motion-reveal-feedback/SKILL.md +57 -0
  210. package/packages/velinstyle-skills/skills/velin-perf-audit-fix/SKILL.md +57 -0
  211. package/packages/velinstyle-skills/skills/velin-perf-runtime-tree-shake/SKILL.md +57 -0
  212. package/packages/velinstyle-skills/skills/velin-release-changelog-sync/SKILL.md +57 -0
  213. package/packages/velinstyle-skills/skills/velin-release-meta-rebuild/SKILL.md +57 -0
  214. package/packages/velinstyle-skills/skills/velin-review-conversion-hero/SKILL.md +57 -0
  215. package/packages/velinstyle-skills/skills/velin-review-page-gate/SKILL.md +57 -0
  216. package/packages/velinstyle-skills/skills/velin-review-seo-meta/SKILL.md +57 -0
  217. package/packages/velinstyle-skills/skills/velin-security-sanitize-html/SKILL.md +57 -0
  218. package/packages/velinstyle-skills/skills/velin-security-scan-pii/SKILL.md +57 -0
  219. package/packages/velinstyle-skills/skills/velin-testing-a11y-suite/SKILL.md +57 -0
  220. package/packages/velinstyle-skills/skills/velin-testing-visual-smoke/SKILL.md +57 -0
  221. package/packages/velinstyle-skills/skills/velin-themes-apply-token/SKILL.md +57 -0
  222. package/packages/velinstyle-skills/skills/velin-themes-contrast-check/SKILL.md +57 -0
  223. package/packages/velinstyle-skills/skills/velin-utilities-layout-apply/SKILL.md +57 -0
  224. package/packages/velinstyle-skills/skills/velin-utilities-prefix-fix/SKILL.md +57 -0
  225. package/packages/velinstyle-skills/skills/velin-utilities-token-map/SKILL.md +57 -0
  226. package/packages/velinstyle-skills/templates/admin-panel.template.yaml +12 -0
  227. package/packages/velinstyle-skills/templates/blog.template.yaml +12 -0
  228. package/packages/velinstyle-skills/templates/documentation-portal.template.yaml +12 -0
  229. package/packages/velinstyle-skills/templates/ecommerce-shop.template.yaml +13 -0
  230. package/packages/velinstyle-skills/templates/landing-page.template.yaml +12 -0
  231. package/packages/velinstyle-skills/templates/laravel-dashboard.template.yaml +11 -0
  232. package/packages/velinstyle-skills/templates/marketing-website.template.yaml +13 -0
  233. package/packages/velinstyle-skills/templates/portfolio.template.yaml +12 -0
  234. package/schemas/component-knowledge.schema.json +33 -0
  235. package/schemas/design-constraint.schema.json +15 -0
  236. package/schemas/design-intelligence.schema.json +19 -0
  237. package/schemas/design-rule.schema.json +19 -0
  238. package/schemas/page-template.schema.json +24 -0
  239. package/schemas/review-report.schema.json +36 -0
  240. package/schemas/section.schema.json +22 -0
  241. package/schemas/skill-bundle.schema.json +15 -0
  242. package/schemas/skill-graph.schema.json +25 -0
  243. package/schemas/skill-pack.schema.json +14 -0
  244. package/schemas/skill-project.schema.json +16 -0
  245. package/schemas/skill-record.schema.json +27 -0
  246. package/schemas/skill-registry.schema.json +17 -0
  247. package/schemas/skill-template.schema.json +17 -0
  248. package/schemas/token-graph.schema.json +27 -0
  249. package/schemas/utility.schema.json +166 -0
  250. package/src/components/alert.css +22 -1
  251. package/src/components/calendar-dropzone.css +5 -0
  252. package/src/components/transparency.css +138 -0
  253. package/src/layout/app-shell.css +33 -0
  254. package/src/tokens/shadow.css +13 -0
  255. package/src/utilities/border.css +2 -0
  256. package/src/utilities/display.css +1 -24
  257. package/src/utilities/responsive.css +16 -1
  258. package/src/utilities/spacing.css +32 -0
  259. package/src/velinstyle.css +3 -0
  260. package/dist/chunks/attributes-3BZLI7XF.js +0 -364
  261. package/dist/chunks/attributes-4N5JP4CG.js +0 -364
  262. package/dist/chunks/attributes-5Q2WXGRC.js +0 -374
  263. package/dist/chunks/attributes-AIR7SVLK.js +0 -364
  264. package/dist/chunks/attributes-BGRN5XZO.js +0 -364
  265. package/dist/chunks/attributes-BVSQAYLR.js +0 -364
  266. package/dist/chunks/attributes-CDYFUY7Y.js +0 -364
  267. package/dist/chunks/attributes-JMYJZBPE.js +0 -364
  268. package/dist/chunks/attributes-R5JY3X4O.js +0 -374
  269. package/dist/chunks/attributes-TNSPQTHX.js +0 -374
  270. package/dist/chunks/chunk-2354NEBP.js +0 -109
  271. package/dist/chunks/chunk-2VNA7G7S.js +0 -109
  272. package/dist/chunks/chunk-AQLRJSGG.js +0 -109
  273. package/dist/chunks/chunk-EWPSDMQT.js +0 -109
  274. package/dist/chunks/chunk-LA7264K4.js +0 -85
  275. package/dist/chunks/chunk-QTJJ3DPO.js +0 -109
  276. package/dist/chunks/chunk-RZQVWFHW.js +0 -109
  277. package/dist/chunks/chunk-U4XHMZ7D.js +0 -109
  278. package/dist/chunks/chunk-V5YIUA6G.js +0 -109
  279. package/dist/chunks/chunk-XIET2VSZ.js +0 -109
  280. package/dist/chunks/chunk-XYLJ2GCB.js +0 -205
  281. package/dist/chunks/chunk-ZPSPKUYD.js +0 -109
  282. package/dist/chunks/highlight-XTHRKBA3.js +0 -37
  283. package/dist/chunks/velin-bottom-nav-2N2TYWOF.js +0 -86
  284. package/dist/chunks/velin-carousel-Y5VCOABZ.js +0 -213
  285. package/dist/chunks/velin-code-block-ASUBTAQV.js +0 -119
  286. package/dist/chunks/velin-code-block-TSUKPY4C.js +0 -123
  287. package/dist/chunks/velin-code-block-Y6CM726Q.js +0 -119
  288. package/dist/chunks/velin-combobox-2KDTCQ7N.js +0 -155
  289. package/dist/chunks/velin-command-M7RNHUPR.js +0 -136
  290. package/dist/chunks/velin-copy-T5KDTDXP.js +0 -81
  291. package/dist/chunks/velin-countdown-5XSTN3BH.js +0 -101
  292. package/dist/chunks/velin-counter-ISCTEAHI.js +0 -118
  293. package/dist/chunks/velin-dialog-D2GUHSCD.js +0 -144
  294. package/dist/chunks/velin-dialog-IJLFDXAJ.js +0 -144
  295. package/dist/chunks/velin-dialog-TNS3WXMB.js +0 -144
  296. package/dist/chunks/velin-drawer-MJS6WCF7.js +0 -130
  297. package/dist/chunks/velin-email-N5B5ZYTE.js +0 -90
  298. package/dist/chunks/velin-icon-KZO3IEHG.js +0 -164
  299. package/dist/chunks/velin-lightbox-I75U6JF4.js +0 -140
  300. package/dist/chunks/velin-lightbox-QOTB4PRL.js +0 -140
  301. package/dist/chunks/velin-lightbox-UCD6N7HF.js +0 -140
  302. package/dist/chunks/velin-live-dot-XHUZCIDZ.js +0 -67
  303. package/dist/chunks/velin-menubar-SFEXJE56.js +0 -86
  304. package/dist/chunks/velin-modal-2HOBXE6F.js +0 -176
  305. package/dist/chunks/velin-modal-GLI2XZZB.js +0 -176
  306. package/dist/chunks/velin-popover-EXINRIGJ.js +0 -145
  307. package/dist/chunks/velin-popover-OXX7MRZ6.js +0 -145
  308. package/dist/chunks/velin-popover-YKCCROJG.js +0 -145
  309. package/dist/chunks/velin-rating-XRQJV4LO.js +0 -91
  310. package/dist/chunks/velin-scroll-top-F2FCZNYD.js +0 -58
  311. package/dist/chunks/velin-search-4YHJWYSS.js +0 -556
  312. package/dist/chunks/velin-search-LWHY23Q5.js +0 -474
  313. package/dist/chunks/velin-secure-field-H7FSBUJW.js +0 -95
  314. package/dist/chunks/velin-segmented-control-PQX6LKOJ.js +0 -109
  315. package/dist/chunks/velin-sheet-3OGI4HD7.js +0 -119
  316. package/dist/chunks/velin-sparkline-GVEANJVW.js +0 -184
  317. package/dist/chunks/velin-sparkline-KDA3GQAN.js +0 -162
  318. package/dist/chunks/velin-stepper-2ZIHLKGM.js +0 -141
  319. package/dist/chunks/velin-stepper-FYEUEWE6.js +0 -141
  320. package/dist/chunks/velin-stepper-wc-QU3KRVQR.js +0 -133
  321. package/dist/chunks/velin-theme-toggle-BNNS7WLV.js +0 -285
  322. package/dist/chunks/velin-theme-toggle-NO7V4TWI.js +0 -285
  323. package/dist/chunks/velin-theme-toggle-QELCJM2Q.js +0 -291
  324. package/dist/chunks/velin-toast-RCZ4CSUC.js +0 -109
  325. package/dist/chunks/velin-toast-WEUBTJG6.js +0 -109
  326. package/dist/chunks/velin-tooltip-664IOHZA.js +0 -112
  327. package/dist/chunks/velin-tooltip-wc-LXDVT6DE.js +0 -103
  328. package/dist/chunks/worker-client-R6DBYPFT.js +0 -46
package/cli/serve.js ADDED
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Static file server for local previews.
3
+ */
4
+ import { createServer } from 'http';
5
+ import { readFileSync, existsSync, statSync } from 'fs';
6
+ import { join, resolve, extname, normalize } from 'path';
7
+
8
+ const MIME = {
9
+ '.html': 'text/html; charset=utf-8',
10
+ '.css': 'text/css; charset=utf-8',
11
+ '.js': 'text/javascript; charset=utf-8',
12
+ '.mjs': 'text/javascript; charset=utf-8',
13
+ '.json': 'application/json; charset=utf-8',
14
+ '.svg': 'image/svg+xml',
15
+ '.png': 'image/png',
16
+ '.jpg': 'image/jpeg',
17
+ '.jpeg': 'image/jpeg',
18
+ '.webp': 'image/webp',
19
+ '.woff2': 'font/woff2',
20
+ '.ico': 'image/x-icon',
21
+ '.map': 'application/json',
22
+ };
23
+
24
+ function safeJoin(root, reqPath) {
25
+ const decoded = decodeURIComponent((reqPath || '/').split('?')[0]);
26
+ const cleaned = normalize(decoded).replace(/^(\.\.[/\\])+/, '');
27
+ const full = resolve(root, '.' + (cleaned.startsWith('/') || cleaned.startsWith('\\') ? cleaned : `/${cleaned}`));
28
+ if (!full.startsWith(resolve(root))) return null;
29
+ return full;
30
+ }
31
+
32
+ /**
33
+ * @param {{ dir?: string, port?: number, host?: string }} opts
34
+ */
35
+ export function serveStatic(opts = {}) {
36
+ const dir = resolve(opts.dir || '.');
37
+ const port = Number(opts.port) || 4173;
38
+ const host = opts.host || '127.0.0.1';
39
+
40
+ if (!existsSync(dir) || !statSync(dir).isDirectory()) {
41
+ return { ok: false, error: `Not a directory: ${dir}` };
42
+ }
43
+
44
+ const server = createServer((req, res) => {
45
+ let filePath = safeJoin(dir, req.url || '/');
46
+ if (!filePath) {
47
+ res.writeHead(403);
48
+ res.end('Forbidden');
49
+ return;
50
+ }
51
+ if (existsSync(filePath) && statSync(filePath).isDirectory()) {
52
+ filePath = join(filePath, 'index.html');
53
+ }
54
+ if (!existsSync(filePath) || !statSync(filePath).isFile()) {
55
+ res.writeHead(404, { 'Content-Type': 'text/plain; charset=utf-8' });
56
+ res.end('Not found');
57
+ return;
58
+ }
59
+ const type = MIME[extname(filePath).toLowerCase()] || 'application/octet-stream';
60
+ try {
61
+ const body = readFileSync(filePath);
62
+ res.writeHead(200, { 'Content-Type': type });
63
+ res.end(body);
64
+ } catch {
65
+ res.writeHead(500);
66
+ res.end('Read error');
67
+ }
68
+ });
69
+
70
+ return new Promise((resolvePromise) => {
71
+ server.listen(port, host, () => {
72
+ resolvePromise({
73
+ ok: true,
74
+ server,
75
+ url: `http://${host}:${port}/`,
76
+ dir,
77
+ close: () => new Promise((r) => server.close(() => r())),
78
+ });
79
+ });
80
+ });
81
+ }
package/cli/skills.js ADDED
@@ -0,0 +1,223 @@
1
+ import { resolve, join, dirname } from 'path';
2
+ import { existsSync, mkdirSync, writeFileSync } from 'fs';
3
+ import { fileURLToPath } from 'url';
4
+ import {
5
+ loadRegistry,
6
+ listSkills,
7
+ findSkillById,
8
+ validateRegistry,
9
+ resolveSkillGraph,
10
+ installSelection,
11
+ } from '../packages/skill-engine/src/index.js';
12
+
13
+ const __dirname = dirname(fileURLToPath(import.meta.url));
14
+ const PKG_ROOT = join(__dirname, '..');
15
+ const REGISTRY_PATH = join(PKG_ROOT, 'packages', 'velinstyle-skills', 'registry.json');
16
+ const SKILLS_ROOT = join(PKG_ROOT, 'packages', 'velinstyle-skills');
17
+
18
+ function argValue(argv, flag) {
19
+ const idx = argv.indexOf(flag);
20
+ return idx !== -1 ? argv[idx + 1] : null;
21
+ }
22
+
23
+ function hasFlag(argv, flag) {
24
+ return argv.includes(flag);
25
+ }
26
+
27
+ export function loadSkillRegistry() {
28
+ return loadRegistry(REGISTRY_PATH);
29
+ }
30
+
31
+ export function skillsList(argv = []) {
32
+ const registry = loadSkillRegistry();
33
+ const items = listSkills(registry, {
34
+ capability: argValue(argv, '--capability') || undefined,
35
+ status: argValue(argv, '--status') || undefined,
36
+ priority: argValue(argv, '--priority') || undefined,
37
+ origin: argValue(argv, '--origin') || undefined,
38
+ category: argValue(argv, '--category') || undefined,
39
+ });
40
+ if (hasFlag(argv, '--json')) {
41
+ console.log(JSON.stringify(items, null, 2));
42
+ return;
43
+ }
44
+ for (const item of items) {
45
+ console.log(`${item.id} [${item.category}] ${item.priority}/${item.status} capabilities=${(item.capabilities || []).join(',')}`);
46
+ }
47
+ console.log(`\n${items.length} skill(s)`);
48
+ }
49
+
50
+ export function skillsShow(skillId, argv = []) {
51
+ const registry = loadSkillRegistry();
52
+ const skill = findSkillById(registry, skillId);
53
+ if (!skill) {
54
+ console.error(`Unknown skill: ${skillId}`);
55
+ process.exit(1);
56
+ }
57
+ if (hasFlag(argv, '--human')) {
58
+ console.log(formatSkillHuman(skill));
59
+ return;
60
+ }
61
+ console.log(JSON.stringify(skill, null, 2));
62
+ }
63
+
64
+ function formatSkillHuman(skill) {
65
+ const lines = [
66
+ `# ${skill.id}`,
67
+ '',
68
+ skill.title ? `**${skill.title}**` : '',
69
+ skill.summary || skill.description || '',
70
+ '',
71
+ `- Category: ${skill.category || '—'}`,
72
+ `- Status: ${skill.status || '—'}`,
73
+ `- Priority: ${skill.priority || '—'}`,
74
+ `- Capabilities: ${(skill.capabilities || []).join(', ') || '—'}`,
75
+ ];
76
+ if (skill.requiresCli?.length) lines.push(`- CLI: ${skill.requiresCli.join(', ')}`);
77
+ if (skill.inputs?.length) {
78
+ lines.push('', '## Inputs');
79
+ for (const input of skill.inputs) {
80
+ if (typeof input === 'string') {
81
+ lines.push(`- \`${input}\``);
82
+ continue;
83
+ }
84
+ const label = input.name || input.id || input.key || input.type || JSON.stringify(input);
85
+ lines.push(`- \`${label}\`${input.required ? ' (required)' : ''}: ${input.description || input.type || ''}`.trim());
86
+ }
87
+ }
88
+ if (skill.outputs?.length) {
89
+ lines.push('', '## Outputs');
90
+ for (const output of skill.outputs) {
91
+ if (typeof output === 'string') {
92
+ lines.push(`- \`${output}\``);
93
+ continue;
94
+ }
95
+ const label = output.name || output.id || output.key || output.type || JSON.stringify(output);
96
+ lines.push(`- \`${label}\`: ${output.description || output.type || ''}`.trim());
97
+ }
98
+ }
99
+ if (skill.dependsOn?.length) {
100
+ lines.push('', `## Depends on`, skill.dependsOn.map((d) => `- ${d}`).join('\n'));
101
+ }
102
+ lines.push('', '_Tip: blueprints must only emit classes present in CSS (`velinstyle blueprint --strict`)._');
103
+ return lines.filter(Boolean).join('\n');
104
+ }
105
+
106
+ export function skillsInstall(argv = []) {
107
+ const selection = argv[0];
108
+ if (!selection) {
109
+ console.error('Usage: velinstyle skills install <skill-id|pack|bundle:id|project:id>');
110
+ process.exit(1);
111
+ }
112
+ const target = resolve(argValue(argv, '--target') || '.cursor/skills');
113
+ mkdirSync(target, { recursive: true });
114
+ const registry = loadSkillRegistry();
115
+ const result = installSelection(registry, {
116
+ selection,
117
+ skillsRoot: SKILLS_ROOT,
118
+ targetRoot: target,
119
+ includeDependencies: !hasFlag(argv, '--no-deps'),
120
+ });
121
+ for (const installed of result.installed) console.log(`Installed ${installed}`);
122
+ if (result.issues.length) {
123
+ for (const issue of result.issues) console.warn(`Warning: ${issue}`);
124
+ }
125
+ const markerPath = join(target, 'registry-source.json');
126
+ writeFileSync(markerPath, JSON.stringify({ source: REGISTRY_PATH, installed: result.installed }, null, 2), 'utf-8');
127
+ }
128
+
129
+ export function skillsRun(skillId, argv = []) {
130
+ const registry = loadSkillRegistry();
131
+ const resolved = resolveSkillGraph(registry, skillId);
132
+ if (resolved.issues.length) {
133
+ for (const issue of resolved.issues) console.error(issue);
134
+ process.exit(1);
135
+ }
136
+ const steps = [];
137
+ for (const id of resolved.orderedSkillIds) {
138
+ const skill = findSkillById(registry, id);
139
+ if (!skill) continue;
140
+ steps.push({ id: skill.id, requiresCli: skill.requiresCli || [], onlyIf: skill.onlyIf || [] });
141
+ }
142
+ if (hasFlag(argv, '--json')) {
143
+ console.log(JSON.stringify({ steps }, null, 2));
144
+ return;
145
+ }
146
+ for (const step of steps) {
147
+ console.log(`- ${step.id}`);
148
+ if (step.requiresCli.length) console.log(` cli: ${step.requiresCli.join(', ')}`);
149
+ if (step.onlyIf.length) console.log(` onlyIf: ${step.onlyIf.join(', ')}`);
150
+ }
151
+ }
152
+
153
+ export function skillsValidate() {
154
+ const registry = loadSkillRegistry();
155
+ const result = validateRegistry(registry);
156
+ if (result.errors.length) {
157
+ for (const error of result.errors) console.error(`Error: ${error}`);
158
+ }
159
+ if (result.warnings.length) {
160
+ for (const warning of result.warnings) console.warn(`Warning: ${warning}`);
161
+ }
162
+ console.log(result.ok ? 'skills registry valid' : 'skills registry invalid');
163
+ process.exit(result.ok ? 0 : 1);
164
+ }
165
+
166
+ export async function skillsDoctor(argv = []) {
167
+ const { doctorSkillPaths } = await import('../scripts/check-skills-paths.mjs');
168
+ const result = doctorSkillPaths(PKG_ROOT);
169
+ if (hasFlag(argv, '--json')) {
170
+ console.log(JSON.stringify(result, null, 2));
171
+ process.exit(result.ok ? 0 : 1);
172
+ }
173
+ if (!result.ok) {
174
+ console.error(`skills doctor FAILED (${result.errors.length} missing path(s)):`);
175
+ for (const e of result.errors) console.error(` - ${e}`);
176
+ process.exit(1);
177
+ }
178
+ console.log(`skills doctor OK (${result.checked} paths).`);
179
+ }
180
+
181
+ export function skillsIndex(kind) {
182
+ const registry = loadSkillRegistry();
183
+ const map = {
184
+ packs: registry.packs || [],
185
+ bundles: registry.bundles || [],
186
+ templates: registry.templates || [],
187
+ projects: registry.projects || [],
188
+ graphs: registry.workflowGraphs || [],
189
+ };
190
+ const out = map[kind] || [];
191
+ console.log(JSON.stringify(out, null, 2));
192
+ }
193
+
194
+ export function skillsCommand(argv = []) {
195
+ const sub = argv[0];
196
+ if (!sub || sub === '--help' || sub === '-h') {
197
+ console.log(`Usage: velinstyle skills <subcommand>
198
+
199
+ Subcommands:
200
+ list [--category <id>] [--status <id>] [--json]
201
+ show <skill-id> [--human]
202
+ install <skill-id|pack:id|bundle:id|template:id>
203
+ run <skill-id> [--json] (dry-run / inspect — not apply)
204
+ validate
205
+ doctor [--json] Fail if demo/docs/starter paths missing
206
+ packs | bundles | templates | projects | graphs
207
+ `);
208
+ process.exit(0);
209
+ }
210
+ if (sub === 'list') return skillsList(argv.slice(1));
211
+ if (sub === 'show') return skillsShow(argv[1], argv.slice(2));
212
+ if (sub === 'install') return skillsInstall(argv.slice(1));
213
+ if (sub === 'run') return skillsRun(argv[1], argv.slice(2));
214
+ if (sub === 'validate') return skillsValidate();
215
+ if (sub === 'doctor') return skillsDoctor(argv.slice(1));
216
+ if (sub === 'packs' || sub === 'bundles' || sub === 'templates' || sub === 'projects' || sub === 'graphs') return skillsIndex(sub);
217
+ console.error(`Unknown skills subcommand: ${sub}`);
218
+ process.exit(1);
219
+ }
220
+
221
+ export function getRegistryPathForMeta() {
222
+ return REGISTRY_PATH;
223
+ }
@@ -0,0 +1,221 @@
1
+ /**
2
+ * CLI: velinstyle transparency doctor|validate|report|export|migrate|scan
3
+ */
4
+ import { existsSync, readFileSync, writeFileSync, mkdirSync, readdirSync, statSync } from 'fs';
5
+ import { join, resolve, extname, basename } from 'path';
6
+ import {
7
+ createTransparencyEngine,
8
+ normalizePolicy,
9
+ } from '../core/transparency/index.js';
10
+
11
+ function loadPolicy(policyPath) {
12
+ if (!policyPath) return normalizePolicy({});
13
+ const abs = resolve(policyPath);
14
+ if (!existsSync(abs)) throw new Error(`Policy not found: ${abs}`);
15
+ return normalizePolicy(JSON.parse(readFileSync(abs, 'utf-8')));
16
+ }
17
+
18
+ function collectHtmlFiles(target) {
19
+ const abs = resolve(target || '.');
20
+ if (!existsSync(abs)) throw new Error(`Path not found: ${abs}`);
21
+ const st = statSync(abs);
22
+ if (st.isFile()) return [abs];
23
+ const out = [];
24
+ const walk = (dir) => {
25
+ for (const name of readdirSync(dir)) {
26
+ if (name === 'node_modules' || name === '.git' || name === 'dist') continue;
27
+ const p = join(dir, name);
28
+ const s = statSync(p);
29
+ if (s.isDirectory()) walk(p);
30
+ else if (/\.html?$/i.test(name)) out.push(p);
31
+ }
32
+ };
33
+ walk(abs);
34
+ return out;
35
+ }
36
+
37
+ function printScores(scores, C) {
38
+ if (!scores) return;
39
+ console.log(C.bold('\nScores'));
40
+ for (const [k, v] of Object.entries(scores)) {
41
+ console.log(` ${k.padEnd(14)} ${v}%`);
42
+ }
43
+ }
44
+
45
+ /**
46
+ * @param {string[]} args process.argv slice after "transparency"
47
+ * @param {{ C: object, getArg: Function, hasFlag: Function }} util
48
+ */
49
+ export async function transparencyCmd(args, util) {
50
+ const { C, getArg, hasFlag } = util;
51
+ const sub = args[0] || 'doctor';
52
+ const rest = args.slice(1);
53
+ const target = rest.find((a) => !a.startsWith('-')) || '.';
54
+ const policyPath = getArg('--policy');
55
+ const policy = loadPolicy(policyPath);
56
+ const asJson = hasFlag('--json');
57
+ const engine = createTransparencyEngine({ policy });
58
+
59
+ if (sub === 'scan') {
60
+ return runDoctor(target, engine, { asJson, C });
61
+ }
62
+ if (sub === 'doctor') {
63
+ return runDoctor(target, engine, { asJson, C });
64
+ }
65
+ if (sub === 'validate') {
66
+ return runValidate(target, engine, { asJson, C });
67
+ }
68
+ if (sub === 'report') {
69
+ return runReport(target, engine, { C, getArg });
70
+ }
71
+ if (sub === 'export') {
72
+ return runExport(target, engine, { C, getArg });
73
+ }
74
+ if (sub === 'migrate') {
75
+ return runMigrate(target, engine, { C, hasFlag, getArg });
76
+ }
77
+ if (sub === 'suggest') {
78
+ return runMigrate(target, engine, { C, hasFlag, getArg, forceDry: true });
79
+ }
80
+ if (sub === 'apply') {
81
+ return runMigrate(target, engine, { C, hasFlag, getArg, forceApply: true });
82
+ }
83
+
84
+ console.log(`Unknown transparency subcommand: ${sub}
85
+ Usage:
86
+ velinstyle transparency doctor|validate|report|export|migrate|scan [path]
87
+ `);
88
+ process.exitCode = 1;
89
+ }
90
+
91
+ async function runDoctor(target, engine, { asJson, C }) {
92
+ const files = collectHtmlFiles(target);
93
+ if (!files.length) {
94
+ console.log(C.yellow('No HTML files found.'));
95
+ process.exitCode = 1;
96
+ return;
97
+ }
98
+ const reports = [];
99
+ let failed = 0;
100
+ for (const file of files) {
101
+ const html = readFileSync(file, 'utf-8');
102
+ const report = await engine.doctor(html, { file });
103
+ reports.push(report);
104
+ if (!report.ok) failed += 1;
105
+ if (!asJson) {
106
+ console.log(C.bold(`\n── ${basename(file)} ──`));
107
+ console.log(report.ok ? C.green('PASS') : C.red('FAIL'));
108
+ console.log(`disclosures=${report.summary.disclosures} errors=${report.summary.errors} warnings=${report.summary.warnings}`);
109
+ printScores(report.scores, C);
110
+ for (const f of report.findings.slice(0, 40)) {
111
+ const color = f.severity === 'error' ? C.red : f.severity === 'warning' ? C.yellow : C.dim;
112
+ console.log(color(` [${f.severity}] ${f.code}: ${f.message}`));
113
+ }
114
+ if (report.findings.length > 40) console.log(C.dim(` … ${report.findings.length - 40} more`));
115
+ }
116
+ }
117
+ if (asJson) {
118
+ console.log(JSON.stringify(files.length === 1 ? reports[0] : { reports }, null, 2));
119
+ } else {
120
+ console.log(failed ? C.red(`\ntransparency doctor: ${failed} file(s) failed`) : C.green('\ntransparency doctor: ok'));
121
+ }
122
+ if (failed) process.exitCode = 1;
123
+ return reports;
124
+ }
125
+
126
+ async function runValidate(target, engine, { asJson, C }) {
127
+ const files = collectHtmlFiles(target);
128
+ const all = [];
129
+ let failed = 0;
130
+ for (const file of files) {
131
+ const html = readFileSync(file, 'utf-8');
132
+ const result = await engine.validate(html, { file });
133
+ all.push({ file, ...result });
134
+ if (!result.ok) failed += 1;
135
+ if (!asJson) {
136
+ console.log(`${basename(file)}: ${result.ok ? C.green('valid') : C.red('invalid')} (${result.findings.length} findings)`);
137
+ }
138
+ }
139
+ if (asJson) console.log(JSON.stringify(all, null, 2));
140
+ if (failed) process.exitCode = 1;
141
+ }
142
+
143
+ async function runReport(target, engine, { C, getArg }) {
144
+ const outDir = resolve(getArg('--out') || 'transparency-report');
145
+ mkdirSync(outDir, { recursive: true });
146
+ const files = collectHtmlFiles(target);
147
+ const combined = { schema: 'velinstyle.transparency.report.bundle', version: 1, files: [] };
148
+ for (const file of files) {
149
+ const html = readFileSync(file, 'utf-8');
150
+ const artifacts = await engine.report(html, { file, title: `Transparency — ${basename(file)}` });
151
+ const base = basename(file, extname(file));
152
+ writeFileSync(join(outDir, `${base}.report.json`), JSON.stringify(artifacts.json, null, 2));
153
+ writeFileSync(join(outDir, `${base}.report.sarif`), JSON.stringify(artifacts.sarif, null, 2));
154
+ writeFileSync(join(outDir, `${base}.report.html`), artifacts.html);
155
+ combined.files.push({ file, scores: artifacts.json.scores, ok: artifacts.json.ok });
156
+ }
157
+ writeFileSync(join(outDir, 'index.json'), JSON.stringify(combined, null, 2));
158
+ console.log(C.green(`Wrote transparency reports to ${outDir}`));
159
+ }
160
+
161
+ async function runExport(target, engine, { C, getArg }) {
162
+ const format = getArg('--format') || 'json';
163
+ const out = getArg('--output') || getArg('-o');
164
+ const files = collectHtmlFiles(target);
165
+ const fresh = createTransparencyEngine({ policy: engine.policy });
166
+ for (const file of files) {
167
+ const html = readFileSync(file, 'utf-8');
168
+ const { records } = await createTransparencyEngine({ policy: engine.policy }).ingest(html, { file });
169
+ for (const r of records) fresh.registry.register(r);
170
+ }
171
+ const body = fresh.export(format);
172
+ if (out) {
173
+ writeFileSync(resolve(out), body);
174
+ console.log(C.green(`Exported ${format} → ${out}`));
175
+ } else {
176
+ console.log(body);
177
+ }
178
+ }
179
+
180
+ async function runMigrate(target, engine, { C, hasFlag, getArg, forceDry, forceApply }) {
181
+ const apply = forceApply || hasFlag('--apply') || hasFlag('--write');
182
+ const dryRun = forceDry || (!apply);
183
+ const files = collectHtmlFiles(target);
184
+ let total = 0;
185
+ for (const file of files) {
186
+ const html = readFileSync(file, 'utf-8');
187
+ const result = await engine.migrate(html, { file, apply: apply && !dryRun, dryRun });
188
+ total += result.suggestions.length;
189
+ console.log(C.bold(`\n── ${basename(file)} ──`));
190
+ console.log(`${result.suggestions.length} suggestion(s)${apply && !dryRun ? `, applied ${result.applied}` : ' (dry-run)'}`);
191
+ for (const s of result.suggestions.slice(0, 30)) {
192
+ console.log(C.dim(` • ${s.id || s.field || s.kind}: ${s.reason}`));
193
+ }
194
+ if (apply && !dryRun && result.applied) {
195
+ writeFileSync(file, result.html);
196
+ console.log(C.green(` wrote ${file}`));
197
+ }
198
+ }
199
+ if (!total) console.log(C.green('\nNo migration suggestions.'));
200
+ }
201
+
202
+ /**
203
+ * Lightweight doctor for velinstyle check integration.
204
+ */
205
+ export async function transparencyCheckStep(path, { policyPath, quiet, C } = {}) {
206
+ const policy = loadPolicy(policyPath);
207
+ const engine = createTransparencyEngine({ policy });
208
+ const files = collectHtmlFiles(path);
209
+ if (!files.length) return { ok: true, skipped: true, scores: null };
210
+ let failed = 0;
211
+ let lastScores = null;
212
+ for (const file of files.slice(0, 20)) {
213
+ const report = await engine.doctor(readFileSync(file, 'utf-8'), { file });
214
+ lastScores = report.scores;
215
+ if (!report.ok) failed += 1;
216
+ if (!quiet) {
217
+ console.log(` ${basename(file)}: transparency ${report.scores?.transparency ?? '—'}% (${report.summary.errors} errors)`);
218
+ }
219
+ }
220
+ return { ok: failed === 0, failed, scores: lastScores };
221
+ }
package/cli/wc-api.js ADDED
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Human-readable WC API from source + generated docs tip.
3
+ */
4
+ import { existsSync, readFileSync } from 'fs';
5
+ import { join } from 'path';
6
+
7
+ /**
8
+ * @param {string} pkgRoot
9
+ * @param {string} tag
10
+ */
11
+ export function describeWcApi(pkgRoot, tag) {
12
+ const name = String(tag || '').replace(/^</, '').replace(/>$/, '').trim();
13
+ if (!name.startsWith('velin-')) {
14
+ return { ok: false, error: `Expected a velin-* tag (got "${tag || ''}"). Example: velinstyle wc api velin-toast` };
15
+ }
16
+ const file = join(pkgRoot, 'components', `${name}.js`);
17
+ if (!existsSync(file)) {
18
+ return { ok: false, error: `No source at components/${name}.js` };
19
+ }
20
+ const src = readFileSync(file, 'utf-8');
21
+ const attrs = [...src.matchAll(/static\s+get\s+observedAttributes\(\)\s*\{\s*return\s*\[([^\]]*)\]/gs)]
22
+ .map((m) => m[1].split(',').map((s) => s.replace(/['"`\s]/g, '')).filter(Boolean))
23
+ .flat();
24
+ const methods = [...src.matchAll(/^\s{2}([a-zA-Z_][\w]*)\s*\([^)]*\)\s*\{/gm)]
25
+ .map((m) => m[1])
26
+ .filter((n) => !['constructor', 'connectedCallback', 'disconnectedCallback', 'attributeChangedCallback', 'adoptedCallback'].includes(n));
27
+ const showSig = src.match(/show\s*\(\s*\{([^}]*)\}\s*=\s*\{\s*\}\s*\)/);
28
+ const events = [...src.matchAll(/new\s+CustomEvent\(\s*['"]([^'"]+)['"]/g)].map((m) => m[1]);
29
+ const unique = (arr) => [...new Set(arr)];
30
+
31
+ const docPath = join(pkgRoot, 'docs/generated/components', `${name}.md`);
32
+ const hasDoc = existsSync(docPath);
33
+
34
+ let example = '';
35
+ if (name === 'velin-toast' && showSig) {
36
+ example = `<velin-toast></velin-toast>
37
+ <script type="module">
38
+ const t = document.querySelector('velin-toast');
39
+ t.show({ message: 'Saved', type: 'success', duration: 4000 });
40
+ </script>`;
41
+ } else if (name === 'velin-calendar') {
42
+ example = `<velin-calendar label="Pick a day" value="2026-07-30"></velin-calendar>`;
43
+ } else if (name === 'velin-file-dropzone') {
44
+ example = `<velin-file-dropzone label="Files" accept=".pdf,.png" multiple></velin-file-dropzone>`;
45
+ } else if (name === 'velin-data-table') {
46
+ example = `<velin-data-table label="Rows" page-size="5" filter-input="#q" editable>
47
+ <table>…</table>
48
+ </velin-data-table>`;
49
+ }
50
+
51
+ return {
52
+ ok: true,
53
+ tag: name,
54
+ source: `components/${name}.js`,
55
+ observedAttributes: unique(attrs),
56
+ methods: unique(methods),
57
+ events: unique(events),
58
+ showSignature: showSig ? `show({ ${showSig[1].trim()} } = {})` : null,
59
+ generatedDoc: hasDoc ? `docs/generated/components/${name}.md` : null,
60
+ example: example || null,
61
+ };
62
+ }
63
+
64
+ export function formatWcApi(report) {
65
+ if (!report.ok) return report.error;
66
+ const lines = [
67
+ `# <${report.tag}>`,
68
+ '',
69
+ `Source: \`${report.source}\``,
70
+ report.generatedDoc ? `Generated docs: \`${report.generatedDoc}\`` : 'Generated docs: (missing — run `velinstyle docs generate`)',
71
+ '',
72
+ '## observedAttributes',
73
+ report.observedAttributes.length ? report.observedAttributes.map((a) => `- \`${a}\``).join('\n') : '_none_',
74
+ '',
75
+ '## Methods (from source)',
76
+ report.methods.length ? report.methods.map((m) => `- \`${m}()\``).join('\n') : '_none detected_',
77
+ ];
78
+ if (report.showSignature) {
79
+ lines.push('', '## Toast show()', `\`${report.showSignature}\``);
80
+ }
81
+ if (report.events.length) {
82
+ lines.push('', '## Custom events', report.events.map((e) => `- \`${e}\``).join('\n'));
83
+ }
84
+ if (report.example) {
85
+ lines.push('', '## Example', '```html', report.example, '```');
86
+ }
87
+ lines.push('', '_Tip: offline create projects include `vendor/velinstyle/docs/` mini copies of core WC markdown._');
88
+ return lines.join('\n');
89
+ }
@@ -0,0 +1,42 @@
1
+ import { loadRegistry, resolveWorkflowGraph } from '../packages/skill-engine/src/index.js';
2
+ import { getRegistryPathForMeta } from './skills.js';
3
+
4
+ function hasFlag(argv, flag) {
5
+ return argv.includes(flag);
6
+ }
7
+
8
+ export function workflowCommand(argv = []) {
9
+ const workflowId = argv[0];
10
+ if (!workflowId || workflowId === '--help' || workflowId === '-h') {
11
+ console.log(`Usage: velinstyle workflow <graph-id|project:id> [--json]
12
+
13
+ Examples:
14
+ velinstyle workflow landingpage
15
+ velinstyle workflow project:marketing-site --json
16
+ `);
17
+ process.exit(0);
18
+ }
19
+ const registry = loadRegistry(getRegistryPathForMeta());
20
+ let resolved;
21
+ if (workflowId.startsWith('project:')) {
22
+ const projectId = workflowId.replace('project:', '');
23
+ const project = (registry.projects || []).find((item) => item.id === projectId);
24
+ if (!project) {
25
+ console.error(`Unknown project: ${projectId}`);
26
+ process.exit(1);
27
+ }
28
+ resolved = resolveWorkflowGraph(registry, project.workflowGraph);
29
+ } else {
30
+ resolved = resolveWorkflowGraph(registry, workflowId);
31
+ }
32
+ if (resolved.issues.length) {
33
+ for (const issue of resolved.issues) console.error(issue);
34
+ process.exit(1);
35
+ }
36
+ if (hasFlag(argv, '--json')) {
37
+ console.log(JSON.stringify(resolved, null, 2));
38
+ return;
39
+ }
40
+ console.log(`Workflow steps (${resolved.orderedSteps.length}):`);
41
+ for (const step of resolved.orderedSteps) console.log(`- ${step}`);
42
+ }
@@ -35,6 +35,8 @@ export { default as VelinLiveDot } from './velin-live-dot.js';
35
35
  export { default as VelinCodeBlock } from './velin-code-block.js';
36
36
  export { default as VelinDataTable } from './velin-data-table.js';
37
37
  export { default as VelinFormSummary } from './velin-form-summary.js';
38
+ export { default as VelinCalendar } from './velin-calendar.js';
39
+ export { default as VelinFileDropzone } from './velin-file-dropzone.js';
38
40
  export { default as VelinSearch } from './velin-search.js';
39
41
  export { bindDeclarativeSearch } from './velin-search.js';
40
42
  export { initReveal, initMotion, velinMotion } from './velin-reveal.js';
@@ -5,6 +5,7 @@ export const COMPONENT_LOADERS = {
5
5
  'velin-accordion': () => import('../velin-accordion.js'),
6
6
  'velin-announcer': () => import('../velin-announcer.js'),
7
7
  'velin-bottom-nav': () => import('../velin-bottom-nav.js'),
8
+ 'velin-calendar': () => import('../velin-calendar.js'),
8
9
  'velin-carousel': () => import('../velin-carousel.js'),
9
10
  'velin-code-block': () => import('../velin-code-block.js'),
10
11
  'velin-collapse': () => import('../velin-collapse.js'),
@@ -18,6 +19,7 @@ export const COMPONENT_LOADERS = {
18
19
  'velin-drawer': () => import('../velin-drawer.js'),
19
20
  'velin-dropdown': () => import('../velin-dropdown.js'),
20
21
  'velin-email': () => import('../velin-email.js'),
22
+ 'velin-file-dropzone': () => import('../velin-file-dropzone.js'),
21
23
  'velin-form-summary': () => import('../velin-form-summary.js'),
22
24
  'velin-icon': () => import('../velin-icon.js'),
23
25
  'velin-lightbox': () => import('../velin-lightbox.js'),