veryfront 0.1.1238 → 0.1.1239

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 (472) hide show
  1. package/esm/cli/auth/login.d.ts +24 -2
  2. package/esm/cli/auth/login.d.ts.map +1 -1
  3. package/esm/cli/auth/login.js +444 -35
  4. package/esm/cli/commands/build/error-handler.js +1 -1
  5. package/esm/cli/commands/generate/command.d.ts.map +1 -1
  6. package/esm/cli/commands/generate/command.js +2 -3
  7. package/esm/cli/commands/init/init-command.d.ts.map +1 -1
  8. package/esm/cli/commands/init/init-command.js +23 -31
  9. package/esm/cli/commands/install/registry.d.ts.map +1 -1
  10. package/esm/cli/commands/install/registry.js +6 -9
  11. package/esm/cli/commands/login/command-help.d.ts.map +1 -1
  12. package/esm/cli/commands/login/command-help.js +3 -1
  13. package/esm/cli/commands/pull/command.d.ts +1 -0
  14. package/esm/cli/commands/pull/command.d.ts.map +1 -1
  15. package/esm/cli/commands/pull/command.js +49 -6
  16. package/esm/cli/commands/push/command-help.d.ts.map +1 -1
  17. package/esm/cli/commands/push/command-help.js +7 -0
  18. package/esm/cli/commands/push/command.d.ts +23 -12
  19. package/esm/cli/commands/push/command.d.ts.map +1 -1
  20. package/esm/cli/commands/push/command.js +461 -44
  21. package/esm/cli/commands/push/plan.d.ts +35 -0
  22. package/esm/cli/commands/push/plan.d.ts.map +1 -0
  23. package/esm/cli/commands/push/plan.js +96 -0
  24. package/esm/cli/commands/schedule/handler.d.ts +21 -2
  25. package/esm/cli/commands/schedule/handler.d.ts.map +1 -1
  26. package/esm/cli/commands/schedule/handler.js +74 -27
  27. package/esm/cli/commands/schema/command-help.js +1 -1
  28. package/esm/cli/commands/up/command.js +1 -1
  29. package/esm/cli/commands/webhook/handler.d.ts.map +1 -1
  30. package/esm/cli/commands/webhook/handler.js +3 -1
  31. package/esm/cli/router.d.ts.map +1 -1
  32. package/esm/cli/router.js +27 -5
  33. package/esm/cli/shared/args.d.ts +10 -0
  34. package/esm/cli/shared/args.d.ts.map +1 -1
  35. package/esm/cli/shared/args.js +15 -2
  36. package/esm/cli/shared/config.d.ts +11 -2
  37. package/esm/cli/shared/config.d.ts.map +1 -1
  38. package/esm/cli/shared/config.js +72 -27
  39. package/esm/cli/shared/project-creation.js +1 -1
  40. package/esm/cli/sync/state.d.ts +20 -0
  41. package/esm/cli/sync/state.d.ts.map +1 -0
  42. package/esm/cli/sync/state.js +193 -0
  43. package/esm/deno.js +2 -2
  44. package/esm/extensions/ext-llm-anthropic/src/anthropic-request-builder.d.ts.map +1 -1
  45. package/esm/extensions/ext-llm-anthropic/src/anthropic-request-builder.js +852 -21
  46. package/esm/extensions/ext-observability-sentry/src/policy.d.ts +2 -0
  47. package/esm/extensions/ext-observability-sentry/src/policy.d.ts.map +1 -1
  48. package/esm/extensions/ext-observability-sentry/src/policy.js +214 -3
  49. package/esm/src/agent/conversation/delegation-policy.d.ts +2 -0
  50. package/esm/src/agent/conversation/delegation-policy.d.ts.map +1 -1
  51. package/esm/src/agent/conversation/delegation-policy.js +13 -3
  52. package/esm/src/agent/conversation/hosted-terminal.d.ts.map +1 -1
  53. package/esm/src/agent/conversation/hosted-terminal.js +6 -2
  54. package/esm/src/agent/factory.d.ts.map +1 -1
  55. package/esm/src/agent/factory.js +22 -11
  56. package/esm/src/agent/hosted/chat-runtime-tool-assembly.d.ts +2 -0
  57. package/esm/src/agent/hosted/chat-runtime-tool-assembly.d.ts.map +1 -1
  58. package/esm/src/agent/hosted/chat-runtime-tool-assembly.js +6 -1
  59. package/esm/src/agent/hosted/child-fork-execution-runner.d.ts +2 -1
  60. package/esm/src/agent/hosted/child-fork-execution-runner.d.ts.map +1 -1
  61. package/esm/src/agent/hosted/child-fork-execution-runner.js +6 -3
  62. package/esm/src/agent/hosted/child-fork-step-message-preparation.d.ts +12 -3
  63. package/esm/src/agent/hosted/child-fork-step-message-preparation.d.ts.map +1 -1
  64. package/esm/src/agent/hosted/child-fork-step-message-preparation.js +16 -3
  65. package/esm/src/agent/hosted/cloud-agent-chat-execution.d.ts +1 -1
  66. package/esm/src/agent/hosted/cloud-agent-chat-execution.d.ts.map +1 -1
  67. package/esm/src/agent/hosted/cloud-agent-chat-execution.js +3 -3
  68. package/esm/src/agent/hosted/cloud-agent-child-tools.d.ts +11 -0
  69. package/esm/src/agent/hosted/cloud-agent-child-tools.d.ts.map +1 -1
  70. package/esm/src/agent/hosted/cloud-agent-child-tools.js +2 -3
  71. package/esm/src/agent/hosted/cloud-agent-config.d.ts +1 -0
  72. package/esm/src/agent/hosted/cloud-agent-config.d.ts.map +1 -1
  73. package/esm/src/agent/hosted/cloud-runtime-system-messages.d.ts +16 -1
  74. package/esm/src/agent/hosted/cloud-runtime-system-messages.d.ts.map +1 -1
  75. package/esm/src/agent/hosted/cloud-runtime-system-messages.js +13 -3
  76. package/esm/src/agent/hosted/default-chat-runtime.d.ts +2 -1
  77. package/esm/src/agent/hosted/default-chat-runtime.d.ts.map +1 -1
  78. package/esm/src/agent/hosted/default-chat-runtime.js +18 -7
  79. package/esm/src/agent/hosted/default-invoke-agent-tool.d.ts +2 -1
  80. package/esm/src/agent/hosted/default-invoke-agent-tool.d.ts.map +1 -1
  81. package/esm/src/agent/hosted/default-invoke-agent-tool.js +11 -3
  82. package/esm/src/agent/hosted/default-project-steering-refresh.d.ts +2 -1
  83. package/esm/src/agent/hosted/default-project-steering-refresh.d.ts.map +1 -1
  84. package/esm/src/agent/hosted/default-project-steering-refresh.js +4 -1
  85. package/esm/src/agent/hosted/runtime-state-resolver.d.ts +6 -4
  86. package/esm/src/agent/hosted/runtime-state-resolver.d.ts.map +1 -1
  87. package/esm/src/agent/hosted/runtime-state-resolver.js +8 -11
  88. package/esm/src/agent/index.d.ts +3 -3
  89. package/esm/src/agent/index.d.ts.map +1 -1
  90. package/esm/src/agent/project/agent-runtime.d.ts.map +1 -1
  91. package/esm/src/agent/project/agent-runtime.js +6 -3
  92. package/esm/src/agent/runtime/agent-definition.d.ts +68 -66
  93. package/esm/src/agent/runtime/agent-definition.d.ts.map +1 -1
  94. package/esm/src/agent/runtime/agent-definition.js +15 -2
  95. package/esm/src/agent/runtime/agent-invocation-contract.d.ts +2 -0
  96. package/esm/src/agent/runtime/agent-invocation-contract.d.ts.map +1 -1
  97. package/esm/src/agent/runtime/agent-markdown-adapter.js +1 -1
  98. package/esm/src/agent/runtime/agent-runtime-step.d.ts +11 -5
  99. package/esm/src/agent/runtime/agent-runtime-step.d.ts.map +1 -1
  100. package/esm/src/agent/runtime/agent-runtime-step.js +23 -6
  101. package/esm/src/agent/runtime/call-context.d.ts +42 -11
  102. package/esm/src/agent/runtime/call-context.d.ts.map +1 -1
  103. package/esm/src/agent/runtime/call-context.js +480 -42
  104. package/esm/src/agent/runtime/chat-stream-handler.d.ts +18 -0
  105. package/esm/src/agent/runtime/chat-stream-handler.d.ts.map +1 -1
  106. package/esm/src/agent/runtime/chat-stream-handler.js +38 -18
  107. package/esm/src/agent/runtime/effective-agent-system.d.ts +13 -4
  108. package/esm/src/agent/runtime/effective-agent-system.d.ts.map +1 -1
  109. package/esm/src/agent/runtime/effective-agent-system.js +29 -0
  110. package/esm/src/agent/runtime/index.d.ts +1 -0
  111. package/esm/src/agent/runtime/index.d.ts.map +1 -1
  112. package/esm/src/agent/runtime/index.js +638 -53
  113. package/esm/src/agent/runtime/load-skill-tool.d.ts +33 -3
  114. package/esm/src/agent/runtime/load-skill-tool.d.ts.map +1 -1
  115. package/esm/src/agent/runtime/load-skill-tool.js +152 -21
  116. package/esm/src/agent/runtime/model-resolution.d.ts +3 -0
  117. package/esm/src/agent/runtime/model-resolution.d.ts.map +1 -1
  118. package/esm/src/agent/runtime/model-resolution.js +14 -0
  119. package/esm/src/agent/runtime/model-transport.d.ts +1 -0
  120. package/esm/src/agent/runtime/model-transport.d.ts.map +1 -1
  121. package/esm/src/agent/runtime/model-transport.js +5 -2
  122. package/esm/src/agent/runtime/run-runtime-context.d.ts +4 -0
  123. package/esm/src/agent/runtime/run-runtime-context.d.ts.map +1 -1
  124. package/esm/src/agent/runtime/run-runtime-context.js +9 -3
  125. package/esm/src/agent/runtime/runtime-tool-config.d.ts +1 -0
  126. package/esm/src/agent/runtime/runtime-tool-config.d.ts.map +1 -1
  127. package/esm/src/agent/runtime/skill-prompt.d.ts +3 -0
  128. package/esm/src/agent/runtime/skill-prompt.d.ts.map +1 -1
  129. package/esm/src/agent/runtime/skill-prompt.js +113 -25
  130. package/esm/src/agent/runtime/streamed-assistant-message.d.ts +22 -2
  131. package/esm/src/agent/runtime/streamed-assistant-message.d.ts.map +1 -1
  132. package/esm/src/agent/runtime/streamed-assistant-message.js +26 -5
  133. package/esm/src/agent/runtime/tool-inventory.d.ts.map +1 -1
  134. package/esm/src/agent/runtime/tool-inventory.js +13 -9
  135. package/esm/src/agent/runtime/tool-result-continuation.d.ts +4 -2
  136. package/esm/src/agent/runtime/tool-result-continuation.d.ts.map +1 -1
  137. package/esm/src/agent/runtime/tool-result-continuation.js +24 -20
  138. package/esm/src/agent/schemas/agent.schema.d.ts +2 -2
  139. package/esm/src/agent/service/runtime.js +1 -1
  140. package/esm/src/agent/streaming/fork-runtime-stream.d.ts +5 -4
  141. package/esm/src/agent/streaming/fork-runtime-stream.d.ts.map +1 -1
  142. package/esm/src/agent/types.d.ts +14 -1
  143. package/esm/src/agent/types.d.ts.map +1 -1
  144. package/esm/src/chat/chat-ui-message-helpers.d.ts.map +1 -1
  145. package/esm/src/chat/chat-ui-message-helpers.js +75 -16
  146. package/esm/src/errors/catalog/build-errors.d.ts.map +1 -1
  147. package/esm/src/errors/catalog/build-errors.js +14 -0
  148. package/esm/src/errors/error-registry/build.d.ts +2 -0
  149. package/esm/src/errors/error-registry/build.d.ts.map +1 -1
  150. package/esm/src/errors/error-registry/build.js +8 -0
  151. package/esm/src/errors/error-registry/deploy.d.ts +4 -0
  152. package/esm/src/errors/error-registry/deploy.d.ts.map +1 -1
  153. package/esm/src/errors/error-registry/deploy.js +16 -0
  154. package/esm/src/errors/error-registry.d.ts +3 -0
  155. package/esm/src/errors/error-registry.d.ts.map +1 -1
  156. package/esm/src/errors/index.d.ts +2 -1
  157. package/esm/src/errors/index.d.ts.map +1 -1
  158. package/esm/src/errors/index.js +4 -3
  159. package/esm/src/errors/tenant-classification.d.ts +25 -0
  160. package/esm/src/errors/tenant-classification.d.ts.map +1 -0
  161. package/esm/src/errors/tenant-classification.js +61 -0
  162. package/esm/src/extensions/builtin-extensions.d.ts +10 -15
  163. package/esm/src/extensions/builtin-extensions.d.ts.map +1 -1
  164. package/esm/src/extensions/builtin-extensions.js +32 -26
  165. package/esm/src/extensions/deferred-extension.d.ts +4 -4
  166. package/esm/src/extensions/deferred-extension.js +4 -4
  167. package/esm/src/extensions/index.d.ts +1 -0
  168. package/esm/src/extensions/index.d.ts.map +1 -1
  169. package/esm/src/extensions/index.js +1 -0
  170. package/esm/src/html/hydration-script-builder/hydration-runtime.generated.js +1 -1
  171. package/esm/src/integrations/_data.d.ts.map +1 -1
  172. package/esm/src/integrations/_data.js +6 -0
  173. package/esm/src/integrations/schema.d.ts +8 -0
  174. package/esm/src/integrations/schema.d.ts.map +1 -1
  175. package/esm/src/integrations/schema.js +3 -0
  176. package/esm/src/integrations/types.d.ts +2 -0
  177. package/esm/src/integrations/types.d.ts.map +1 -1
  178. package/esm/src/internal-agents/run-stream.d.ts.map +1 -1
  179. package/esm/src/internal-agents/run-stream.js +35 -20
  180. package/esm/src/internal-agents/run-system-prompt.d.ts +7 -2
  181. package/esm/src/internal-agents/run-system-prompt.d.ts.map +1 -1
  182. package/esm/src/internal-agents/run-system-prompt.js +19 -13
  183. package/esm/src/internal-agents/schema.d.ts +2 -0
  184. package/esm/src/internal-agents/schema.d.ts.map +1 -1
  185. package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts.map +1 -1
  186. package/esm/src/modules/react-loader/ssr-module-loader/loader.js +2 -18
  187. package/esm/src/modules/react-loader/ssr-module-loader/ssr-dependency-validator.d.ts +11 -0
  188. package/esm/src/modules/react-loader/ssr-module-loader/ssr-dependency-validator.d.ts.map +1 -1
  189. package/esm/src/modules/react-loader/ssr-module-loader/ssr-dependency-validator.js +53 -6
  190. package/esm/src/observability/application-error-contract.d.ts +4 -0
  191. package/esm/src/observability/application-error-contract.d.ts.map +1 -1
  192. package/esm/src/observability/application-errors.d.ts.map +1 -1
  193. package/esm/src/observability/application-errors.js +55 -2
  194. package/esm/src/platform/adapters/runtime/deno/http-server.d.ts.map +1 -1
  195. package/esm/src/platform/adapters/runtime/deno/http-server.js +2 -10
  196. package/esm/src/platform/adapters/runtime/shared/request-peer.d.ts +14 -0
  197. package/esm/src/platform/adapters/runtime/shared/request-peer.d.ts.map +1 -1
  198. package/esm/src/platform/adapters/runtime/shared/request-peer.js +82 -0
  199. package/esm/src/platform/compat/http/pinned-fetch.d.ts +1 -1
  200. package/esm/src/provider/runtime-loader/provider-http.d.ts +5 -1
  201. package/esm/src/provider/runtime-loader/provider-http.d.ts.map +1 -1
  202. package/esm/src/provider/runtime-loader/provider-http.js +55 -17
  203. package/esm/src/provider/shared/index.d.ts +1 -0
  204. package/esm/src/provider/shared/index.d.ts.map +1 -1
  205. package/esm/src/provider/shared/index.js +2 -0
  206. package/esm/src/provider/types.d.ts +1 -0
  207. package/esm/src/provider/types.d.ts.map +1 -1
  208. package/esm/src/react/components/ui/adapter/builtin/combobox.d.ts +3 -0
  209. package/esm/src/react/components/ui/adapter/builtin/combobox.d.ts.map +1 -0
  210. package/esm/src/react/components/ui/adapter/builtin/combobox.js +204 -0
  211. package/esm/src/react/components/ui/adapter/builtin/dialog.d.ts +3 -0
  212. package/esm/src/react/components/ui/adapter/builtin/dialog.d.ts.map +1 -0
  213. package/esm/src/react/components/ui/adapter/builtin/dialog.js +20 -0
  214. package/esm/src/react/components/ui/adapter/builtin/drawer.d.ts +3 -0
  215. package/esm/src/react/components/ui/adapter/builtin/drawer.d.ts.map +1 -0
  216. package/esm/src/react/components/ui/adapter/builtin/drawer.js +21 -0
  217. package/esm/src/react/components/ui/adapter/builtin/index.d.ts.map +1 -1
  218. package/esm/src/react/components/ui/adapter/builtin/index.js +10 -0
  219. package/esm/src/react/components/ui/adapter/builtin/popover.d.ts +3 -0
  220. package/esm/src/react/components/ui/adapter/builtin/popover.d.ts.map +1 -0
  221. package/esm/src/react/components/ui/adapter/builtin/popover.js +28 -0
  222. package/esm/src/react/components/ui/adapter/builtin/tabs.d.ts +3 -0
  223. package/esm/src/react/components/ui/adapter/builtin/tabs.d.ts.map +1 -0
  224. package/esm/src/react/components/ui/adapter/builtin/tabs.js +73 -0
  225. package/esm/src/react/components/ui/adapter/context.d.ts.map +1 -1
  226. package/esm/src/react/components/ui/adapter/context.js +10 -0
  227. package/esm/src/react/components/ui/adapter/contract.d.ts +212 -0
  228. package/esm/src/react/components/ui/adapter/contract.d.ts.map +1 -1
  229. package/esm/src/react/components/ui/adapter/token-scope.d.ts +24 -0
  230. package/esm/src/react/components/ui/adapter/token-scope.d.ts.map +1 -0
  231. package/esm/src/react/components/ui/adapter/token-scope.js +26 -0
  232. package/esm/src/react/components/ui/alert-dialog.d.ts +101 -0
  233. package/esm/src/react/components/ui/alert-dialog.d.ts.map +1 -0
  234. package/esm/src/react/components/ui/alert-dialog.js +181 -0
  235. package/esm/src/react/components/ui/aspect-ratio.d.ts +18 -0
  236. package/esm/src/react/components/ui/aspect-ratio.d.ts.map +1 -0
  237. package/esm/src/react/components/ui/aspect-ratio.js +13 -0
  238. package/esm/src/react/components/ui/autocomplete.d.ts +67 -0
  239. package/esm/src/react/components/ui/autocomplete.d.ts.map +1 -0
  240. package/esm/src/react/components/ui/autocomplete.js +59 -0
  241. package/esm/src/react/components/ui/breadcrumb.d.ts +86 -0
  242. package/esm/src/react/components/ui/breadcrumb.d.ts.map +1 -0
  243. package/esm/src/react/components/ui/breadcrumb.js +67 -0
  244. package/esm/src/react/components/ui/calendar.d.ts +40 -0
  245. package/esm/src/react/components/ui/calendar.d.ts.map +1 -0
  246. package/esm/src/react/components/ui/calendar.js +170 -0
  247. package/esm/src/react/components/ui/combobox.d.ts +74 -0
  248. package/esm/src/react/components/ui/combobox.d.ts.map +1 -0
  249. package/esm/src/react/components/ui/combobox.js +100 -0
  250. package/esm/src/react/components/ui/context-menu.d.ts +116 -0
  251. package/esm/src/react/components/ui/context-menu.d.ts.map +1 -0
  252. package/esm/src/react/components/ui/context-menu.js +168 -0
  253. package/esm/src/react/components/ui/date-picker.d.ts +69 -0
  254. package/esm/src/react/components/ui/date-picker.d.ts.map +1 -0
  255. package/esm/src/react/components/ui/date-picker.js +96 -0
  256. package/esm/src/react/components/ui/dialog.d.ts +41 -11
  257. package/esm/src/react/components/ui/dialog.d.ts.map +1 -1
  258. package/esm/src/react/components/ui/dialog.js +47 -28
  259. package/esm/src/react/components/ui/drawer.d.ts +31 -8
  260. package/esm/src/react/components/ui/drawer.d.ts.map +1 -1
  261. package/esm/src/react/components/ui/drawer.js +33 -22
  262. package/esm/src/react/components/ui/dropdown-menu.d.ts.map +1 -1
  263. package/esm/src/react/components/ui/dropdown-menu.js +7 -75
  264. package/esm/src/react/components/ui/field.d.ts +70 -0
  265. package/esm/src/react/components/ui/field.d.ts.map +1 -0
  266. package/esm/src/react/components/ui/field.js +161 -0
  267. package/esm/src/react/components/ui/file-type.d.ts +9 -8
  268. package/esm/src/react/components/ui/file-type.d.ts.map +1 -1
  269. package/esm/src/react/components/ui/file-type.js +8 -8
  270. package/esm/src/react/components/ui/hover-card.d.ts +82 -0
  271. package/esm/src/react/components/ui/hover-card.d.ts.map +1 -0
  272. package/esm/src/react/components/ui/hover-card.js +140 -0
  273. package/esm/src/react/components/ui/index.d.ts +23 -2
  274. package/esm/src/react/components/ui/index.d.ts.map +1 -1
  275. package/esm/src/react/components/ui/index.js +21 -0
  276. package/esm/src/react/components/ui/input-otp.d.ts +37 -0
  277. package/esm/src/react/components/ui/input-otp.d.ts.map +1 -0
  278. package/esm/src/react/components/ui/input-otp.js +42 -0
  279. package/esm/src/react/components/ui/menu-keyboard.d.ts +8 -0
  280. package/esm/src/react/components/ui/menu-keyboard.d.ts.map +1 -0
  281. package/esm/src/react/components/ui/menu-keyboard.js +76 -0
  282. package/esm/src/react/components/ui/menubar.d.ts +98 -0
  283. package/esm/src/react/components/ui/menubar.d.ts.map +1 -0
  284. package/esm/src/react/components/ui/menubar.js +173 -0
  285. package/esm/src/react/components/ui/meter.d.ts +45 -0
  286. package/esm/src/react/components/ui/meter.d.ts.map +1 -0
  287. package/esm/src/react/components/ui/meter.js +59 -0
  288. package/esm/src/react/components/ui/modal-surface.d.ts +7 -1
  289. package/esm/src/react/components/ui/modal-surface.d.ts.map +1 -1
  290. package/esm/src/react/components/ui/modal-surface.js +23 -6
  291. package/esm/src/react/components/ui/navigation-menu.d.ts +101 -0
  292. package/esm/src/react/components/ui/navigation-menu.d.ts.map +1 -0
  293. package/esm/src/react/components/ui/navigation-menu.js +195 -0
  294. package/esm/src/react/components/ui/number-field.d.ts +46 -0
  295. package/esm/src/react/components/ui/number-field.d.ts.map +1 -0
  296. package/esm/src/react/components/ui/number-field.js +121 -0
  297. package/esm/src/react/components/ui/pagination.d.ts +77 -0
  298. package/esm/src/react/components/ui/pagination.d.ts.map +1 -0
  299. package/esm/src/react/components/ui/pagination.js +62 -0
  300. package/esm/src/react/components/ui/popover.d.ts +42 -13
  301. package/esm/src/react/components/ui/popover.d.ts.map +1 -1
  302. package/esm/src/react/components/ui/popover.js +25 -12
  303. package/esm/src/react/components/ui/scroll-area.d.ts +38 -0
  304. package/esm/src/react/components/ui/scroll-area.d.ts.map +1 -0
  305. package/esm/src/react/components/ui/scroll-area.js +35 -0
  306. package/esm/src/react/components/ui/separator.d.ts +20 -0
  307. package/esm/src/react/components/ui/separator.d.ts.map +1 -0
  308. package/esm/src/react/components/ui/separator.js +13 -0
  309. package/esm/src/react/components/ui/slider.d.ts +44 -0
  310. package/esm/src/react/components/ui/slider.d.ts.map +1 -0
  311. package/esm/src/react/components/ui/slider.js +46 -0
  312. package/esm/src/react/components/ui/status.d.ts +6 -5
  313. package/esm/src/react/components/ui/status.d.ts.map +1 -1
  314. package/esm/src/react/components/ui/status.js +4 -4
  315. package/esm/src/react/components/ui/tabs.d.ts +32 -9
  316. package/esm/src/react/components/ui/tabs.d.ts.map +1 -1
  317. package/esm/src/react/components/ui/tabs.js +46 -22
  318. package/esm/src/react/components/ui/toggle.d.ts +26 -0
  319. package/esm/src/react/components/ui/toggle.d.ts.map +1 -0
  320. package/esm/src/react/components/ui/toggle.js +29 -0
  321. package/esm/src/react/components/ui/use-isomorphic-layout-effect.d.ts +2 -1
  322. package/esm/src/react/components/ui/use-isomorphic-layout-effect.d.ts.map +1 -1
  323. package/esm/src/react/components/ui/use-isomorphic-layout-effect.js +6 -3
  324. package/esm/src/rendering/chunk-optimizer/source-imports.d.ts.map +1 -1
  325. package/esm/src/rendering/chunk-optimizer/source-imports.js +4 -114
  326. package/esm/src/rendering/orchestrator/module-loader/build-failure.d.ts +10 -0
  327. package/esm/src/rendering/orchestrator/module-loader/build-failure.d.ts.map +1 -1
  328. package/esm/src/rendering/orchestrator/module-loader/build-failure.js +50 -3
  329. package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.d.ts +2 -0
  330. package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.d.ts.map +1 -1
  331. package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.js +21 -6
  332. package/esm/src/rendering/orchestrator/module-loader/index.d.ts +2 -1
  333. package/esm/src/rendering/orchestrator/module-loader/index.d.ts.map +1 -1
  334. package/esm/src/rendering/orchestrator/module-loader/index.js +190 -7
  335. package/esm/src/rendering/orchestrator/module-loader/module-persistence.d.ts +4 -0
  336. package/esm/src/rendering/orchestrator/module-loader/module-persistence.d.ts.map +1 -1
  337. package/esm/src/rendering/orchestrator/module-loader/module-persistence.js +374 -7
  338. package/esm/src/rendering/orchestrator/pipeline.d.ts.map +1 -1
  339. package/esm/src/rendering/orchestrator/pipeline.js +12 -1
  340. package/esm/src/runs/runs-client.d.ts +2 -4
  341. package/esm/src/runs/runs-client.d.ts.map +1 -1
  342. package/esm/src/runs/schemas.d.ts +18 -8
  343. package/esm/src/runs/schemas.d.ts.map +1 -1
  344. package/esm/src/runs/schemas.js +26 -0
  345. package/esm/src/runtime/model-call-context.d.ts +6 -1
  346. package/esm/src/runtime/model-call-context.d.ts.map +1 -1
  347. package/esm/src/runtime/runtime-bridge.d.ts.map +1 -1
  348. package/esm/src/runtime/runtime-bridge.js +133 -15
  349. package/esm/src/schedule/factory.d.ts +8 -2
  350. package/esm/src/schedule/factory.d.ts.map +1 -1
  351. package/esm/src/schedule/factory.js +0 -8
  352. package/esm/src/schedule/index.d.ts +10 -1
  353. package/esm/src/schedule/index.d.ts.map +1 -1
  354. package/esm/src/schedule/index.js +9 -0
  355. package/esm/src/schedule/types.d.ts +30 -11
  356. package/esm/src/schedule/types.d.ts.map +1 -1
  357. package/esm/src/schedule/validation.d.ts +17 -0
  358. package/esm/src/schedule/validation.d.ts.map +1 -1
  359. package/esm/src/schedule/validation.js +93 -5
  360. package/esm/src/server/dev-server/index.d.ts +1 -1
  361. package/esm/src/server/dev-server/index.d.ts.map +1 -1
  362. package/esm/src/server/dev-server/server.d.ts +7 -3
  363. package/esm/src/server/dev-server/server.d.ts.map +1 -1
  364. package/esm/src/server/dev-server/server.js +12 -3
  365. package/esm/src/server/dev-server/types.d.ts +7 -1
  366. package/esm/src/server/dev-server/types.d.ts.map +1 -1
  367. package/esm/src/server/dev-server.d.ts +1 -1
  368. package/esm/src/server/dev-server.d.ts.map +1 -1
  369. package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
  370. package/esm/src/server/handlers/dev/framework-candidates.generated.js +2509 -34
  371. package/esm/src/server/handlers/dev/projects/index.d.ts.map +1 -1
  372. package/esm/src/server/handlers/dev/projects/index.js +3 -0
  373. package/esm/src/server/handlers/request/agent-stream.handler.d.ts.map +1 -1
  374. package/esm/src/server/handlers/request/agent-stream.handler.js +29 -24
  375. package/esm/src/server/index.d.ts +3 -3
  376. package/esm/src/server/index.d.ts.map +1 -1
  377. package/esm/src/server/index.js +10 -5
  378. package/esm/src/server/node-handler.d.ts.map +1 -1
  379. package/esm/src/server/node-handler.js +4 -1
  380. package/esm/src/server/production-server.d.ts.map +1 -1
  381. package/esm/src/server/production-server.js +2 -1
  382. package/esm/src/server/project-env/cache.d.ts +17 -0
  383. package/esm/src/server/project-env/cache.d.ts.map +1 -1
  384. package/esm/src/server/project-env/cache.js +78 -2
  385. package/esm/src/server/project-env/fetcher.d.ts.map +1 -1
  386. package/esm/src/server/project-env/fetcher.js +13 -3
  387. package/esm/src/server/project-env/index.d.ts +1 -1
  388. package/esm/src/server/project-env/index.d.ts.map +1 -1
  389. package/esm/src/server/project-env/index.js +1 -1
  390. package/esm/src/server/runtime-handler/index.d.ts.map +1 -1
  391. package/esm/src/server/runtime-handler/index.js +1 -1
  392. package/esm/src/server/runtime-handler/projects-handler.d.ts +1 -1
  393. package/esm/src/server/runtime-handler/projects-handler.d.ts.map +1 -1
  394. package/esm/src/server/runtime-handler/projects-handler.js +4 -2
  395. package/esm/src/transforms/esm/http-bundler.d.ts.map +1 -1
  396. package/esm/src/transforms/esm/http-bundler.js +6 -5
  397. package/esm/src/transforms/esm/http-cache-helpers.d.ts +11 -0
  398. package/esm/src/transforms/esm/http-cache-helpers.d.ts.map +1 -1
  399. package/esm/src/transforms/esm/http-cache-helpers.js +35 -0
  400. package/esm/src/transforms/esm/http-cache.d.ts.map +1 -1
  401. package/esm/src/transforms/esm/http-cache.js +16 -10
  402. package/esm/src/transforms/esm/specifier-resolver.d.ts.map +1 -1
  403. package/esm/src/transforms/esm/specifier-resolver.js +87 -7
  404. package/esm/src/transforms/import-rewriter/strategies/alias-strategy.d.ts +2 -0
  405. package/esm/src/transforms/import-rewriter/strategies/alias-strategy.d.ts.map +1 -1
  406. package/esm/src/transforms/import-rewriter/strategies/alias-strategy.js +11 -6
  407. package/esm/src/transforms/md/compiler/md-compiler.d.ts.map +1 -1
  408. package/esm/src/transforms/md/compiler/md-compiler.js +12 -5
  409. package/esm/src/transforms/mdx/compiler/frontmatter-extractor.d.ts +2 -0
  410. package/esm/src/transforms/mdx/compiler/frontmatter-extractor.d.ts.map +1 -1
  411. package/esm/src/transforms/mdx/compiler/frontmatter-extractor.js +33 -1
  412. package/esm/src/transforms/mdx/compiler/mdx-compiler.d.ts.map +1 -1
  413. package/esm/src/transforms/mdx/compiler/mdx-compiler.js +46 -7
  414. package/esm/src/transforms/mdx/esm-module-loader/cache/index.d.ts.map +1 -1
  415. package/esm/src/transforms/mdx/esm-module-loader/cache/index.js +8 -2
  416. package/esm/src/transforms/mdx/esm-module-loader/cache-format.d.ts +1 -0
  417. package/esm/src/transforms/mdx/esm-module-loader/cache-format.d.ts.map +1 -1
  418. package/esm/src/transforms/mdx/esm-module-loader/cache-format.js +3 -0
  419. package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.d.ts +4 -0
  420. package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.d.ts.map +1 -1
  421. package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.js +44 -8
  422. package/esm/src/transforms/mdx/esm-module-loader/missing-module.d.ts +2 -0
  423. package/esm/src/transforms/mdx/esm-module-loader/missing-module.d.ts.map +1 -1
  424. package/esm/src/transforms/mdx/esm-module-loader/missing-module.js +4 -0
  425. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.d.ts.map +1 -1
  426. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.js +5 -1
  427. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.d.ts +2 -0
  428. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.d.ts.map +1 -1
  429. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.js +50 -11
  430. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/nested-imports.d.ts +24 -12
  431. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/nested-imports.d.ts.map +1 -1
  432. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/nested-imports.js +201 -18
  433. package/esm/src/transforms/mdx/esm-module-loader/types.d.ts +5 -0
  434. package/esm/src/transforms/mdx/esm-module-loader/types.d.ts.map +1 -1
  435. package/esm/src/transforms/mdx/esm-module-loader/utils/source-spans.d.ts +22 -2
  436. package/esm/src/transforms/mdx/esm-module-loader/utils/source-spans.d.ts.map +1 -1
  437. package/esm/src/transforms/mdx/esm-module-loader/utils/source-spans.js +2080 -129
  438. package/esm/src/transforms/mdx/esm-module-loader/utils/stub-module.d.ts +11 -1
  439. package/esm/src/transforms/mdx/esm-module-loader/utils/stub-module.d.ts.map +1 -1
  440. package/esm/src/transforms/mdx/esm-module-loader/utils/stub-module.js +32 -15
  441. package/esm/src/transforms/pipeline/stages/compile.d.ts.map +1 -1
  442. package/esm/src/transforms/pipeline/stages/compile.js +44 -0
  443. package/esm/src/transforms/shared/specifier-suffix.d.ts +25 -0
  444. package/esm/src/transforms/shared/specifier-suffix.d.ts.map +1 -0
  445. package/esm/src/transforms/shared/specifier-suffix.js +43 -0
  446. package/esm/src/trigger/index.d.ts +2 -2
  447. package/esm/src/trigger/index.d.ts.map +1 -1
  448. package/esm/src/trigger/index.js +1 -1
  449. package/esm/src/trigger/local-runner.d.ts +2 -2
  450. package/esm/src/trigger/local-runner.d.ts.map +1 -1
  451. package/esm/src/trigger/local-runner.js +11 -4
  452. package/esm/src/trigger/target.d.ts +97 -5
  453. package/esm/src/trigger/target.d.ts.map +1 -1
  454. package/esm/src/trigger/target.js +175 -5
  455. package/esm/src/utils/version-constant.d.ts +1 -1
  456. package/esm/src/utils/version-constant.js +1 -1
  457. package/esm/src/webhook/types.d.ts +21 -6
  458. package/esm/src/webhook/types.d.ts.map +1 -1
  459. package/esm/src/webhook/validation.d.ts.map +1 -1
  460. package/esm/src/webhook/validation.js +27 -39
  461. package/esm/templates/index.d.ts +1 -1
  462. package/esm/templates/index.d.ts.map +1 -1
  463. package/esm/templates/loader.d.ts +6 -6
  464. package/esm/templates/loader.d.ts.map +1 -1
  465. package/esm/templates/loader.js +34 -18
  466. package/esm/templates/manifest.generated.d.ts +3 -0
  467. package/esm/templates/manifest.generated.d.ts.map +1 -0
  468. package/esm/templates/manifest.generated.js +2 -0
  469. package/package.json +8 -8
  470. package/esm/templates/manifest.d.ts +0 -664
  471. package/esm/templates/manifest.d.ts.map +0 -1
  472. package/esm/templates/manifest.js +0 -662
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Combobox - a text input that filters a dropdown `listbox` as you type, then
3
+ * commits a selection. The look is ours (theme tokens); the mechanics (query,
4
+ * filtering, `aria-activedescendant` keyboard nav, open/dismiss, portalling)
5
+ * come from the active adapter's `combobox` slot - the zero-dependency
6
+ * {@link builtinCombobox} by default, swappable to cmdk / Base UI / etc. via
7
+ * `UIAdapterProvider`.
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * import { Combobox, ComboboxInput, ComboboxContent, ComboboxItem } from "veryfront/ui";
12
+ *
13
+ * <Combobox onValueChange={setFramework}>
14
+ * <ComboboxInput placeholder="Search framework…" />
15
+ * <ComboboxContent>
16
+ * <ComboboxItem value="next">Next.js</ComboboxItem>
17
+ * <ComboboxItem value="remix">Remix</ComboboxItem>
18
+ * <ComboboxItem value="astro">Astro</ComboboxItem>
19
+ * </ComboboxContent>
20
+ * </Combobox>;
21
+ * ```
22
+ *
23
+ * @module react/components/ui/combobox
24
+ */
25
+ import * as React from "react";
26
+ import { cx as cn } from "./cva.js";
27
+ import { useAdapter } from "./adapter/context.js";
28
+ /** Combobox root - renders no node of its own (state + context only). */
29
+ export function Combobox(props) {
30
+ const { combobox } = useAdapter();
31
+ const optionLabels = React.useMemo(() => collectOptionLabels(props.children), [props.children]);
32
+ return React.createElement(combobox.Root, { ...props, optionLabels: optionLabels });
33
+ }
34
+ function collectOptionLabels(children, labels = []) {
35
+ React.Children.forEach(children, (child) => {
36
+ if (!React.isValidElement(child))
37
+ return;
38
+ if (child.type === ComboboxItem) {
39
+ const { value, textValue, children: itemChildren } = child.props;
40
+ labels.push({ value, text: resolveOptionText(value, textValue, itemChildren) });
41
+ return;
42
+ }
43
+ const nestedChildren = child.props.children;
44
+ if (nestedChildren !== undefined)
45
+ collectOptionLabels(nestedChildren, labels);
46
+ });
47
+ return labels;
48
+ }
49
+ function resolveOptionText(value, textValue, children) {
50
+ return textValue ?? collectPlainText(children) ?? value;
51
+ }
52
+ function collectPlainText(children) {
53
+ let text = "";
54
+ let hasText = false;
55
+ React.Children.forEach(children, (child) => {
56
+ if (typeof child === "string" || typeof child === "number") {
57
+ text += String(child);
58
+ hasText = true;
59
+ return;
60
+ }
61
+ if (!React.isValidElement(child))
62
+ return;
63
+ const nested = collectPlainText(child.props.children);
64
+ if (nested === undefined)
65
+ return;
66
+ text += nested;
67
+ hasText = true;
68
+ });
69
+ return hasText ? text : undefined;
70
+ }
71
+ /** The `role="combobox"` text input that drives filtering. */
72
+ export function ComboboxInput({ className, ...props }) {
73
+ const { combobox } = useAdapter();
74
+ return (React.createElement(combobox.Input, { className: cn("h-[38px] w-full rounded-md px-3 text-base", "bg-[var(--input-bg)] text-[var(--foreground)] border border-[var(--outline-border)]", "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--edge-medium)]", "disabled:cursor-not-allowed disabled:opacity-50", className), ...props }));
75
+ }
76
+ /** The floating `role="listbox"` surface, shown while filtering. */
77
+ export function ComboboxContent({ className, children, ...props }) {
78
+ const { combobox } = useAdapter();
79
+ return (React.createElement(combobox.Content, { className: cn("z-50 max-h-64 min-w-[220px] overflow-auto rounded-lg", "bg-[var(--popover)] text-[var(--foreground)] shadow-sm outline-none", className), ...props }, children));
80
+ }
81
+ /** A selectable, filterable option. Hides itself when it doesn't match the query. */
82
+ export function ComboboxItem({ value, textValue, disabled, className, children, onClick, ref, ...props }) {
83
+ const { combobox } = useAdapter();
84
+ const ctx = combobox.useCombobox();
85
+ const id = React.useId();
86
+ const text = resolveOptionText(value, textValue, children);
87
+ React.useEffect(() => {
88
+ ctx.registerOption(id, value, text, disabled);
89
+ return () => ctx.unregisterOption(id);
90
+ }, [ctx, disabled, id, value, text]);
91
+ if (!ctx.matches(text))
92
+ return null;
93
+ const active = ctx.activeId === id;
94
+ const selected = ctx.value === value;
95
+ return (React.createElement("div", { ref: ref, id: id, role: "option", "aria-selected": selected, "aria-disabled": disabled || undefined, "data-active": active ? "" : undefined, "data-disabled": disabled ? "" : undefined, onClick: (event) => {
96
+ onClick?.(event);
97
+ if (!event.defaultPrevented && !disabled)
98
+ ctx.select(value, text);
99
+ }, className: cn("flex cursor-pointer items-center rounded-md px-2.5 py-1.5 text-base", "data-[active]:bg-[var(--accent)] aria-selected:font-medium", "data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), ...props }, children ?? text));
100
+ }
@@ -0,0 +1,116 @@
1
+ /**
2
+ * ContextMenu - a menu opened by right-click (the native `contextmenu` event) at
3
+ * the pointer position, rather than by clicking a trigger button. It shares the
4
+ * exact item / surface look of {@link ./dropdown-menu.tsx DropdownMenu} (classes
5
+ * ported 1:1 from Studio, token names remapped to veryfront's `[var(--token)]`
6
+ * vocabulary) and reuses the shared {@link ./floating.tsx Floating} portal +
7
+ * fixed-positioning helper for dismissal (outside-click / `Escape`), scroll
8
+ * following, viewport clamping, and portalling into the `[data-vf-ui]` token
9
+ * scope. The only behavioural difference from DropdownMenu is the trigger: it
10
+ * captures `onContextMenu`, calls `preventDefault()`, and opens the surface at
11
+ * the pointer's `clientX` / `clientY` via a zero-size virtual anchor.
12
+ *
13
+ * A11y work (roving focus, typeahead, focus trap) is tracked in
14
+ * anchored-surface.tsx and shared with the other menu surfaces.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * <ContextMenu>
19
+ * <ContextMenuTrigger className="rounded-md border border-[var(--edge-medium)] p-8">
20
+ * Right-click here
21
+ * </ContextMenuTrigger>
22
+ * <ContextMenuContent>
23
+ * <ContextMenuLabel>Actions</ContextMenuLabel>
24
+ * <ContextMenuGroup>
25
+ * <ContextMenuItem onSelect={() => console.log("cut")}>Cut</ContextMenuItem>
26
+ * <ContextMenuItem onSelect={() => console.log("copy")}>Copy</ContextMenuItem>
27
+ * </ContextMenuGroup>
28
+ * <ContextMenuSeparator />
29
+ * <ContextMenuItem onSelect={() => console.log("delete")}>Delete</ContextMenuItem>
30
+ * </ContextMenuContent>
31
+ * </ContextMenu>
32
+ * ```
33
+ *
34
+ * @module react/components/ui/context-menu
35
+ */
36
+ import * as React from "react";
37
+ import { type PolymorphicButtonAttributes } from "./slot.js";
38
+ import { type DisclosureOptions } from "./disclosure.js";
39
+ /** Props accepted by `<ContextMenu>`. */
40
+ export interface ContextMenuProps extends DisclosureOptions {
41
+ /** The trigger and content parts to compose. */
42
+ children: React.ReactNode;
43
+ }
44
+ /**
45
+ * ContextMenu root - owns open state and the pointer position. Renders a
46
+ * zero-size, `position: fixed` virtual anchor (kept inside the token scope so
47
+ * the portalled surface resolves `var(--…)`), which `Floating` measures to place
48
+ * the surface at the last right-click.
49
+ */
50
+ export declare function ContextMenu({ children, open, defaultOpen, onOpenChange }: ContextMenuProps): React.ReactElement;
51
+ /** Props accepted by `<ContextMenuTrigger>`. */
52
+ export interface ContextMenuTriggerProps extends React.HTMLAttributes<HTMLDivElement> {
53
+ /** Merge the trigger behaviour onto your own element instead of a wrapper `div`. */
54
+ asChild?: boolean;
55
+ /** React 19: ref is a regular prop, forwarded to the trigger node. */
56
+ ref?: React.Ref<HTMLDivElement>;
57
+ }
58
+ /** Literal slotted trigger contract with an element-specific ref and events. */
59
+ export type ContextMenuSlottedTriggerProps<T extends HTMLElement = HTMLElement> = Omit<React.HTMLAttributes<T>, "children" | "ref"> & {
60
+ asChild: true;
61
+ children: React.ReactElement;
62
+ ref?: React.Ref<T>;
63
+ };
64
+ /**
65
+ * Trigger - the region a right-click opens the menu over. Captures
66
+ * `onContextMenu`, calls `preventDefault()` (suppressing the browser's native
67
+ * menu), and opens the surface at the pointer coordinates. `asChild` merges onto
68
+ * the child element, which must forward `ref` to its DOM node.
69
+ */
70
+ export declare function ContextMenuTrigger<T extends HTMLElement = HTMLElement>(props: ContextMenuSlottedTriggerProps<T>): React.ReactElement;
71
+ export declare function ContextMenuTrigger(props: ContextMenuTriggerProps): React.ReactElement;
72
+ /** Props accepted by `<ContextMenuContent>`. */
73
+ export interface ContextMenuContentProps extends React.HTMLAttributes<HTMLDivElement> {
74
+ /** Horizontal edge of the surface aligned to the pointer. @default "start" */
75
+ align?: "start" | "end";
76
+ /** Consumer ref for the surface node (forwarded through `Floating`). */
77
+ ref?: React.Ref<HTMLDivElement>;
78
+ }
79
+ /** Menu surface - portalled to the pointer position while open. No border (Studio). */
80
+ export declare function ContextMenuContent({ children, className, align, onKeyDown, ref, ...props }: ContextMenuContentProps): React.ReactElement | null;
81
+ /** Groups related items with a tight inner gap (Studio: `gap-px p-0.5`). */
82
+ export declare function ContextMenuGroup({ children, className }: {
83
+ children: React.ReactNode;
84
+ className?: string;
85
+ }): React.ReactElement;
86
+ /** Props accepted by `<ContextMenuItem>`. */
87
+ export interface ContextMenuItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
88
+ /** Called when the item is chosen (also closes the menu). */
89
+ onSelect?: () => void;
90
+ /** `asChild` merges item styling onto your own element. */
91
+ asChild?: boolean;
92
+ /** Consumer ref for the item node. */
93
+ ref?: React.Ref<HTMLButtonElement>;
94
+ }
95
+ /** Literal slotted item contract with element-specific refs and events. */
96
+ export type ContextMenuSlottedItemProps<T extends HTMLElement = HTMLElement> = Omit<PolymorphicButtonAttributes<T>, "children" | "ref" | "onSelect"> & {
97
+ /** Called when the item is chosen (also closes the menu). */
98
+ onSelect?: () => void;
99
+ asChild: true;
100
+ children: React.ReactElement;
101
+ disabled?: boolean;
102
+ ref?: React.Ref<T>;
103
+ };
104
+ /** A selectable menu item. Icons render at `size-3.5` (14px). Closes on select. */
105
+ export declare function ContextMenuItem<T extends HTMLElement = HTMLElement>(props: ContextMenuSlottedItemProps<T>): React.ReactElement;
106
+ export declare function ContextMenuItem(props: ContextMenuItemProps): React.ReactElement;
107
+ /** Full-width divider between groups (Studio: `-mx-2.5 my-2`). */
108
+ export declare function ContextMenuSeparator({ className }: {
109
+ className?: string;
110
+ }): React.ReactElement;
111
+ /** Non-interactive section label - full-strength foreground (Studio). */
112
+ export declare function ContextMenuLabel({ children, className, }: {
113
+ children: React.ReactNode;
114
+ className?: string;
115
+ }): React.ReactElement;
116
+ //# sourceMappingURL=context-menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/ui/context-menu.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAe,KAAK,2BAA2B,EAAQ,MAAM,WAAW,CAAC;AAIhF,OAAO,EAAE,KAAK,iBAAiB,EAAiB,MAAM,iBAAiB,CAAC;AAkBxE,yCAAyC;AACzC,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,gDAAgD;IAChD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,EAAE,gBAAgB,GAC9D,KAAK,CAAC,YAAY,CA8BpB;AAED,gDAAgD;AAChD,MAAM,WAAW,uBAAwB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACnF,oFAAoF;IACpF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sEAAsE;IACtE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC;AAED,gFAAgF;AAChF,MAAM,MAAM,8BAA8B,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,IAC1E,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,KAAK,CAAC,GACjD;IACA,OAAO,EAAE,IAAI,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;IAC7B,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACpB,CAAC;AAEJ;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EACpE,KAAK,EAAE,8BAA8B,CAAC,CAAC,CAAC,GACvC,KAAK,CAAC,YAAY,CAAC;AACtB,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,KAAK,CAAC,YAAY,CAAC;AAkEvF,gDAAgD;AAChD,MAAM,WAAW,uBAAwB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACnF,8EAA8E;IAC9E,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACxB,wEAAwE;IACxE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC;AAED,uFAAuF;AACvF,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,SAAS,EACT,KAAe,EACf,SAAS,EACT,GAAG,EACH,GAAG,KAAK,EACT,EAAE,uBAAuB,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CA6BrD;AAED,4EAA4E;AAC5E,wBAAgB,gBAAgB,CAC9B,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GACzE,KAAK,CAAC,YAAY,CAMpB;AAED,6CAA6C;AAC7C,MAAM,WAAW,oBAAqB,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACzF,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sCAAsC;IACtC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;CACpC;AAED,2EAA2E;AAC3E,MAAM,MAAM,2BAA2B,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,IACvE,IAAI,CAAC,2BAA2B,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,KAAK,GAAG,UAAU,CAAC,GACrE;IACA,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,IAAI,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACpB,CAAC;AAEJ,mFAAmF;AACnF,wBAAgB,eAAe,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EACjE,KAAK,EAAE,2BAA2B,CAAC,CAAC,CAAC,GACpC,KAAK,CAAC,YAAY,CAAC;AACtB,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,KAAK,CAAC,YAAY,CAAC;AAoEjF,kEAAkE;AAClE,wBAAgB,oBAAoB,CAClC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GACpC,KAAK,CAAC,YAAY,CAEpB;AAED,yEAAyE;AACzE,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,KAAK,CAAC,YAAY,CAWrB"}
@@ -0,0 +1,168 @@
1
+ /**
2
+ * ContextMenu - a menu opened by right-click (the native `contextmenu` event) at
3
+ * the pointer position, rather than by clicking a trigger button. It shares the
4
+ * exact item / surface look of {@link ./dropdown-menu.tsx DropdownMenu} (classes
5
+ * ported 1:1 from Studio, token names remapped to veryfront's `[var(--token)]`
6
+ * vocabulary) and reuses the shared {@link ./floating.tsx Floating} portal +
7
+ * fixed-positioning helper for dismissal (outside-click / `Escape`), scroll
8
+ * following, viewport clamping, and portalling into the `[data-vf-ui]` token
9
+ * scope. The only behavioural difference from DropdownMenu is the trigger: it
10
+ * captures `onContextMenu`, calls `preventDefault()`, and opens the surface at
11
+ * the pointer's `clientX` / `clientY` via a zero-size virtual anchor.
12
+ *
13
+ * A11y work (roving focus, typeahead, focus trap) is tracked in
14
+ * anchored-surface.tsx and shared with the other menu surfaces.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * <ContextMenu>
19
+ * <ContextMenuTrigger className="rounded-md border border-[var(--edge-medium)] p-8">
20
+ * Right-click here
21
+ * </ContextMenuTrigger>
22
+ * <ContextMenuContent>
23
+ * <ContextMenuLabel>Actions</ContextMenuLabel>
24
+ * <ContextMenuGroup>
25
+ * <ContextMenuItem onSelect={() => console.log("cut")}>Cut</ContextMenuItem>
26
+ * <ContextMenuItem onSelect={() => console.log("copy")}>Copy</ContextMenuItem>
27
+ * </ContextMenuGroup>
28
+ * <ContextMenuSeparator />
29
+ * <ContextMenuItem onSelect={() => console.log("delete")}>Delete</ContextMenuItem>
30
+ * </ContextMenuContent>
31
+ * </ContextMenu>
32
+ * ```
33
+ *
34
+ * @module react/components/ui/context-menu
35
+ */
36
+ import * as React from "react";
37
+ import { cx as cn } from "./cva.js";
38
+ import { composeRefs, Slot } from "./slot.js";
39
+ import { Floating } from "./floating.js";
40
+ import { focusWithoutScroll } from "./focus-management.js";
41
+ import { useMenuContentKeyboard } from "./menu-keyboard.js";
42
+ import { useDisclosure } from "./disclosure.js";
43
+ const ContextMenuContext = React.createContext(null);
44
+ /**
45
+ * ContextMenu root - owns open state and the pointer position. Renders a
46
+ * zero-size, `position: fixed` virtual anchor (kept inside the token scope so
47
+ * the portalled surface resolves `var(--…)`), which `Floating` measures to place
48
+ * the surface at the last right-click.
49
+ */
50
+ export function ContextMenu({ children, open, defaultOpen, onOpenChange }) {
51
+ const { open: isOpen, setOpen } = useDisclosure({ open, defaultOpen, onOpenChange });
52
+ const anchorRef = React.useRef(null);
53
+ const triggerRef = React.useRef(null);
54
+ const [pos, setPos] = React.useState({ x: 0, y: 0 });
55
+ const openAt = React.useCallback((x, y) => {
56
+ setPos({ x, y });
57
+ setOpen(true);
58
+ }, [setOpen]);
59
+ const ctx = React.useMemo(() => ({ open: isOpen, setOpen, anchorRef, triggerRef, openAt }), [isOpen, setOpen, openAt]);
60
+ return (React.createElement(ContextMenuContext.Provider, { value: ctx },
61
+ React.createElement("span", { ref: anchorRef, "aria-hidden": "true", style: {
62
+ position: "fixed",
63
+ left: pos.x,
64
+ top: pos.y,
65
+ width: 0,
66
+ height: 0,
67
+ pointerEvents: "none",
68
+ } }),
69
+ children));
70
+ }
71
+ export function ContextMenuTrigger({ asChild, onContextMenu, onKeyDown, children, ref, role, tabIndex, "aria-haspopup": ariaHasPopup, ...props }) {
72
+ const ctx = React.useContext(ContextMenuContext);
73
+ const triggerProps = asChild
74
+ ? { role, tabIndex, "aria-haspopup": ariaHasPopup }
75
+ : { role: role ?? "button", tabIndex: tabIndex ?? 0, "aria-haspopup": ariaHasPopup ?? "menu" };
76
+ const setTriggerRef = React.useCallback((element) => {
77
+ if (ctx)
78
+ ctx.triggerRef.current = element;
79
+ }, [ctx]);
80
+ const composedRef = React.useMemo(() => composeRefs(setTriggerRef, ref), [ref, setTriggerRef]);
81
+ const stateProps = {
82
+ "data-state": ctx?.open ? "open" : "closed",
83
+ onContextMenu: (event) => {
84
+ onContextMenu?.(event);
85
+ if (event.defaultPrevented)
86
+ return;
87
+ event.preventDefault();
88
+ ctx?.openAt(event.clientX, event.clientY);
89
+ },
90
+ onKeyDown: (event) => {
91
+ onKeyDown?.(event);
92
+ if (event.defaultPrevented || !ctx)
93
+ return;
94
+ if (event.key !== "ContextMenu" && !(event.key === "F10" && event.shiftKey))
95
+ return;
96
+ event.preventDefault();
97
+ const rect = event.currentTarget.getBoundingClientRect();
98
+ ctx.openAt(rect.left, rect.bottom);
99
+ },
100
+ };
101
+ if (asChild) {
102
+ return (React.createElement(Slot, { ref: composedRef, ...triggerProps, ...stateProps, ...props }, children));
103
+ }
104
+ return (React.createElement("div", { ref: composedRef, ...triggerProps, ...stateProps, ...props }, children));
105
+ }
106
+ /** Menu surface - portalled to the pointer position while open. No border (Studio). */
107
+ export function ContextMenuContent({ children, className, align = "start", onKeyDown, ref, ...props }) {
108
+ const ctx = React.useContext(ContextMenuContext);
109
+ if (!ctx)
110
+ return null;
111
+ const handleKeyDown = useMenuContentKeyboard({
112
+ onKeyDown,
113
+ setOpen: ctx.setOpen,
114
+ triggerRef: ctx.triggerRef,
115
+ });
116
+ return (React.createElement(Floating, { anchorRef: ctx.anchorRef, open: ctx.open, align: align, onDismiss: () => ctx.setOpen(false), initialFocus: "[role='menuitem']:not([aria-disabled='true'])", returnFocusRef: ctx.triggerRef, contentRef: ref, role: "menu", "aria-orientation": "vertical", onKeyDown: handleKeyDown, className: cn("z-50 min-w-[260px] overflow-hidden rounded-lg bg-[var(--popover)] p-2.5 text-[var(--foreground)] shadow-sm outline-none", className), ...props }, children));
117
+ }
118
+ /** Groups related items with a tight inner gap (Studio: `gap-px p-0.5`). */
119
+ export function ContextMenuGroup({ children, className }) {
120
+ return (React.createElement("div", { role: "group", className: cn("flex flex-col gap-px p-0.5", className) }, children));
121
+ }
122
+ export function ContextMenuItem({ children, className, onSelect, onClick, onKeyDown, disabled, asChild, ref, ...props }) {
123
+ const ctx = React.useContext(ContextMenuContext);
124
+ const closeAndRestoreFocus = React.useCallback(() => {
125
+ ctx?.setOpen(false);
126
+ const trigger = ctx?.triggerRef.current;
127
+ queueMicrotask(() => {
128
+ if (trigger?.isConnected)
129
+ focusWithoutScroll(trigger);
130
+ });
131
+ }, [ctx]);
132
+ const itemProps = {
133
+ role: "menuitem",
134
+ "aria-disabled": disabled || undefined,
135
+ disabled,
136
+ className: cn("relative flex w-full cursor-pointer select-none items-center gap-2.5 rounded-md px-3 h-[36px] text-base font-normal text-left text-[var(--foreground)] outline-none transition-colors", "hover:bg-[var(--tertiary)] focus:bg-[var(--tertiary)] dark:hover:bg-[var(--accent)] dark:focus:bg-[var(--accent)]", "disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-3.5 [&_svg]:shrink-0", className),
137
+ onClick: (event) => {
138
+ if (disabled)
139
+ return;
140
+ onClick?.(event);
141
+ if (event.defaultPrevented)
142
+ return;
143
+ onSelect?.();
144
+ closeAndRestoreFocus();
145
+ },
146
+ onKeyDown: (event) => {
147
+ onKeyDown?.(event);
148
+ if (event.defaultPrevented)
149
+ return;
150
+ if (disabled || (event.key !== "Enter" && event.key !== " "))
151
+ return;
152
+ event.preventDefault();
153
+ event.currentTarget.click();
154
+ },
155
+ };
156
+ if (asChild) {
157
+ return (React.createElement(Slot, { ref: ref, ...itemProps, ...props }, children));
158
+ }
159
+ return (React.createElement("button", { type: "button", ref: ref, ...itemProps, ...props }, children));
160
+ }
161
+ /** Full-width divider between groups (Studio: `-mx-2.5 my-2`). */
162
+ export function ContextMenuSeparator({ className }) {
163
+ return React.createElement("div", { className: cn("-mx-2.5 my-2 h-px bg-[var(--separator)]", className) });
164
+ }
165
+ /** Non-interactive section label - full-strength foreground (Studio). */
166
+ export function ContextMenuLabel({ children, className, }) {
167
+ return (React.createElement("div", { className: cn("px-3 py-1.5 mb-0.5 text-sm font-medium text-[var(--foreground)]", className) }, children));
168
+ }
@@ -0,0 +1,69 @@
1
+ /**
2
+ * DatePicker: a button that opens a {@link Popover} holding a {@link Calendar};
3
+ * picking a day sets the value and closes the surface. Composition-only: all
4
+ * overlay behaviour (portal into the token scope, positioning, outside-click /
5
+ * `Escape` dismiss) is reused from Popover, and the month grid is the shared
6
+ * Calendar: nothing is re-implemented here. Both the selected `value` and the
7
+ * `open` state support controlled and uncontrolled use; the parts share
8
+ * value/open/format through context. Skinned with the veryfront theme tokens.
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * import { DatePicker, DatePickerContent, DatePickerTrigger } from "veryfront/ui";
13
+ *
14
+ * function Example() {
15
+ * const [date, setDate] = React.useState<Date>();
16
+ * return (
17
+ * <DatePicker value={date} onChange={setDate}>
18
+ * <DatePickerTrigger />
19
+ * <DatePickerContent />
20
+ * </DatePicker>
21
+ * );
22
+ * }
23
+ * ```
24
+ *
25
+ * @module react/components/ui/date-picker
26
+ */
27
+ import * as React from "react";
28
+ /** Props accepted by `<DatePicker>`. */
29
+ export interface DatePickerProps {
30
+ /** The trigger and content parts to compose. */
31
+ children: React.ReactNode;
32
+ /** Controlled selected day (pair with `onChange`). @default undefined */
33
+ value?: Date;
34
+ /** Initial selected day when uncontrolled. @default undefined */
35
+ defaultValue?: Date;
36
+ /** Fires with the picked day. @default undefined */
37
+ onChange?: (date: Date) => void;
38
+ /** Controlled open state (pair with `onOpenChange`). @default undefined */
39
+ open?: boolean;
40
+ /** Initial open state when uncontrolled. @default false */
41
+ defaultOpen?: boolean;
42
+ /** Fires when the popover open state changes. @default undefined */
43
+ onOpenChange?: (open: boolean) => void;
44
+ /** Trigger label shown when no value is selected. @default "Pick a date" */
45
+ placeholder?: string;
46
+ /** Formats the selected day into the trigger's label. @default (d) => d.toLocaleDateString() */
47
+ format?: (date: Date) => string;
48
+ /** Month the calendar shows initially; moved internally by its prev/next buttons. @default value ?? today */
49
+ defaultMonth?: Date;
50
+ }
51
+ /** Root: owns `{ value, open }`, provides context, and renders the Popover. */
52
+ export declare function DatePicker({ children, value, defaultValue, onChange, open, defaultOpen, onOpenChange, placeholder, format, defaultMonth, }: DatePickerProps): React.ReactElement;
53
+ /** Props accepted by `<DatePickerTrigger>`. */
54
+ export interface DatePickerTriggerProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
55
+ /** React 19: ref is a regular prop. */
56
+ ref?: React.Ref<HTMLButtonElement>;
57
+ }
58
+ /** The field-styled button that shows the formatted value (or placeholder) and opens the popover. */
59
+ export declare function DatePickerTrigger({ className, ref, ...props }: DatePickerTriggerProps): React.ReactElement;
60
+ /** Props accepted by `<DatePickerContent>`. */
61
+ export interface DatePickerContentProps extends React.HTMLAttributes<HTMLDivElement> {
62
+ /** Horizontal alignment of the surface relative to the trigger. @default "start" */
63
+ align?: "start" | "end";
64
+ /** React 19: ref is a regular prop. */
65
+ ref?: React.Ref<HTMLDivElement>;
66
+ }
67
+ /** The Popover surface wrapping the {@link Calendar}; picking a day commits it and closes. */
68
+ export declare function DatePickerContent({ className, align, ref, ...props }: DatePickerContentProps): React.ReactElement;
69
+ //# sourceMappingURL=date-picker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/ui/date-picker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiC/B,wCAAwC;AACxC,MAAM,WAAW,eAAe;IAC9B,gDAAgD;IAChD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,yEAAyE;IACzE,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,iEAAiE;IACjE,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAChC,2EAA2E;IAC3E,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,2DAA2D;IAC3D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oEAAoE;IACpE,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gGAAgG;IAChG,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IAChC,6GAA6G;IAC7G,YAAY,CAAC,EAAE,IAAI,CAAC;CACrB;AAED,+EAA+E;AAC/E,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,YAAY,EACZ,WAA2B,EAC3B,MAA4C,EAC5C,YAAY,GACb,EAAE,eAAe,GAAG,KAAK,CAAC,YAAY,CAyCtC;AAqBD,+CAA+C;AAC/C,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC;IACvE,uCAAuC;IACvC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;CACpC;AAED,qGAAqG;AACrG,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,GAAG,EACH,GAAG,KAAK,EACT,EAAE,sBAAsB,GAAG,KAAK,CAAC,YAAY,CA6B7C;AAED,+CAA+C;AAC/C,MAAM,WAAW,sBAAuB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAClF,oFAAoF;IACpF,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACxB,uCAAuC;IACvC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC;AAED,8FAA8F;AAC9F,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,KAAe,EACf,GAAG,EACH,GAAG,KAAK,EACT,EAAE,sBAAsB,GAAG,KAAK,CAAC,YAAY,CAoB7C"}
@@ -0,0 +1,96 @@
1
+ /**
2
+ * DatePicker: a button that opens a {@link Popover} holding a {@link Calendar};
3
+ * picking a day sets the value and closes the surface. Composition-only: all
4
+ * overlay behaviour (portal into the token scope, positioning, outside-click /
5
+ * `Escape` dismiss) is reused from Popover, and the month grid is the shared
6
+ * Calendar: nothing is re-implemented here. Both the selected `value` and the
7
+ * `open` state support controlled and uncontrolled use; the parts share
8
+ * value/open/format through context. Skinned with the veryfront theme tokens.
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * import { DatePicker, DatePickerContent, DatePickerTrigger } from "veryfront/ui";
13
+ *
14
+ * function Example() {
15
+ * const [date, setDate] = React.useState<Date>();
16
+ * return (
17
+ * <DatePicker value={date} onChange={setDate}>
18
+ * <DatePickerTrigger />
19
+ * <DatePickerContent />
20
+ * </DatePicker>
21
+ * );
22
+ * }
23
+ * ```
24
+ *
25
+ * @module react/components/ui/date-picker
26
+ */
27
+ import * as React from "react";
28
+ import { cx as cn } from "./cva.js";
29
+ import { Calendar } from "./calendar.js";
30
+ import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
31
+ import { composeRefs } from "./slot.js";
32
+ const DatePickerContext = React.createContext(null);
33
+ function useDatePickerContext(part) {
34
+ const ctx = React.useContext(DatePickerContext);
35
+ if (!ctx)
36
+ throw new Error(`<${part}> must be used within <DatePicker>`);
37
+ return ctx;
38
+ }
39
+ /** Root: owns `{ value, open }`, provides context, and renders the Popover. */
40
+ export function DatePicker({ children, value, defaultValue, onChange, open, defaultOpen, onOpenChange, placeholder = "Pick a date", format = (date) => date.toLocaleDateString(), defaultMonth, }) {
41
+ const valueControlled = value !== undefined;
42
+ const [internalValue, setInternalValue] = React.useState(defaultValue);
43
+ const currentValue = valueControlled ? value : internalValue;
44
+ const openControlled = open !== undefined;
45
+ const [internalOpen, setInternalOpen] = React.useState(defaultOpen ?? false);
46
+ const currentOpen = openControlled ? open : internalOpen;
47
+ const triggerRef = React.useRef(null);
48
+ const setValue = React.useCallback((date) => {
49
+ if (!valueControlled)
50
+ setInternalValue(date);
51
+ onChange?.(date);
52
+ }, [valueControlled, onChange]);
53
+ const setOpen = React.useCallback((next) => {
54
+ if (!openControlled)
55
+ setInternalOpen(next);
56
+ onOpenChange?.(next);
57
+ }, [openControlled, onOpenChange]);
58
+ const ctx = React.useMemo(() => ({
59
+ value: currentValue,
60
+ setValue,
61
+ open: currentOpen,
62
+ setOpen,
63
+ placeholder,
64
+ format,
65
+ defaultMonth,
66
+ triggerRef,
67
+ }), [currentValue, setValue, currentOpen, setOpen, placeholder, format, defaultMonth, triggerRef]);
68
+ return (React.createElement(DatePickerContext.Provider, { value: ctx },
69
+ React.createElement(Popover, { open: currentOpen, onOpenChange: setOpen }, children)));
70
+ }
71
+ /** A calendar glyph rendered at the trailing edge of the trigger. */
72
+ function CalendarIcon() {
73
+ return (React.createElement("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", className: "size-4 shrink-0 text-[var(--muted-foreground)]" },
74
+ React.createElement("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2" }),
75
+ React.createElement("path", { d: "M16 2v4M8 2v4M3 10h18" })));
76
+ }
77
+ /** The field-styled button that shows the formatted value (or placeholder) and opens the popover. */
78
+ export function DatePickerTrigger({ className, ref, ...props }) {
79
+ const ctx = useDatePickerContext("DatePickerTrigger");
80
+ const empty = ctx.value == null;
81
+ const composedRef = React.useMemo(() => composeRefs(ctx.triggerRef, ref), [ctx.triggerRef, ref]);
82
+ return (React.createElement(PopoverTrigger, { asChild: true },
83
+ React.createElement("button", { ref: composedRef, type: "button", "data-empty": empty ? "true" : undefined, className: cn("inline-flex h-[42px] w-full items-center justify-between gap-2 rounded-md px-3 text-base", "border border-[var(--input)] bg-[var(--background)] text-[var(--foreground)]", "transition-[background-color,color] duration-150 ease-in", "hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)]", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]", "data-[empty=true]:text-[var(--muted-foreground)]", className), ...props },
84
+ React.createElement("span", { className: "truncate" }, empty ? ctx.placeholder : ctx.format(ctx.value)),
85
+ React.createElement(CalendarIcon, null))));
86
+ }
87
+ /** The Popover surface wrapping the {@link Calendar}; picking a day commits it and closes. */
88
+ export function DatePickerContent({ className, align = "start", ref, ...props }) {
89
+ const ctx = useDatePickerContext("DatePickerContent");
90
+ return (React.createElement(PopoverContent, { ref: ref, align: align, className: cn("w-auto min-w-0 p-0", className), ...props },
91
+ React.createElement(Calendar, { value: ctx.value, defaultMonth: ctx.defaultMonth, onChange: (date) => {
92
+ ctx.setValue(date);
93
+ ctx.setOpen(false);
94
+ ctx.triggerRef.current?.focus();
95
+ } })));
96
+ }
@@ -1,7 +1,25 @@
1
1
  /**
2
- * Dependency-free dialog primitive with a Studio-compatible part API. It
3
- * provides modal focus containment, focus restoration, document scroll
4
- * locking, stable ARIA relationships, and Escape/overlay dismissal.
2
+ * Dialog - BASIC fork of @radix-ui/react-dialog with the same API shape (Root /
3
+ * Trigger / Content + Header / Title / Description / Body / Footer / Action /
4
+ * Cancel / Close / Form). Classes ported 1:1 from Studio's `Dialog` (tokens
5
+ * remapped; `Heading` level 2 + `Text` inlined). Modal overlay + centered panel;
6
+ * dismisses on `Escape` and overlay click. A11y work tracked in modal-surface.tsx.
7
+ *
8
+ * @example
9
+ * ```tsx
10
+ * import { Button, Dialog, DialogAction, DialogCancel, DialogContent, DialogFooter, DialogTitle, DialogTrigger } from "veryfront/ui";
11
+ *
12
+ * <Dialog>
13
+ * <DialogTrigger asChild><Button variant="destructive">Delete</Button></DialogTrigger>
14
+ * <DialogContent>
15
+ * <DialogTitle>Delete project?</DialogTitle>
16
+ * <DialogFooter>
17
+ * <DialogCancel>Cancel</DialogCancel>
18
+ * <DialogAction onClick={remove}>Delete</DialogAction>
19
+ * </DialogFooter>
20
+ * </DialogContent>
21
+ * </Dialog>;
22
+ * ```
5
23
  *
6
24
  * @module react/components/ui/dialog
7
25
  */
@@ -9,35 +27,47 @@ import * as React from "react";
9
27
  import { type ButtonProps } from "./button.js";
10
28
  /** Props accepted by `<Dialog>`. */
11
29
  export interface DialogProps {
30
+ /** The trigger and content parts to compose. */
12
31
  children: React.ReactNode;
32
+ /** Controlled open state (pair with `onOpenChange`). */
13
33
  open?: boolean;
34
+ /** Initial open state when uncontrolled. */
14
35
  defaultOpen?: boolean;
36
+ /** Fires when the open state changes. */
15
37
  onOpenChange?: (open: boolean) => void;
16
38
  }
17
- /** Dialog root — owns open state. */
39
+ /** Dialog root - owns open state. */
18
40
  export declare function Dialog(props: DialogProps): React.ReactElement;
19
- /** Trigger — opens the dialog. `asChild` merges onto the child element. */
41
+ /** Trigger - opens the dialog. `asChild` merges onto the child element. */
20
42
  export declare function DialogTrigger(props: React.ButtonHTMLAttributes<HTMLButtonElement> & {
21
43
  asChild?: boolean;
22
44
  ref?: React.Ref<HTMLButtonElement>;
23
45
  }): React.ReactElement;
24
- /** Modal surface — overlay + centered panel, rendered while open. */
25
- export declare function DialogContent({ className, children, "aria-describedby": describedBy, ...props }: React.HTMLAttributes<HTMLDivElement>): React.ReactElement | null;
46
+ /** Props accepted by `<DialogContent>`. */
47
+ export interface DialogContentProps extends React.HTMLAttributes<HTMLDivElement> {
48
+ /** React 19: ref is a regular prop, forwarded to the dialog panel. */
49
+ ref?: React.Ref<HTMLDivElement>;
50
+ }
51
+ /** Modal surface - overlay + centered panel, rendered while open. */
52
+ export declare function DialogContent({ className, children, "aria-describedby": describedBy, ...props }: DialogContentProps): React.ReactElement | null;
26
53
  /** Left-aligned title + description block. */
27
54
  export declare function DialogHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.ReactElement;
28
- /** Dialog title — Studio Heading level 2 (20px). Semibold so Inter reads at
29
- * Studio's medium-on-Söhne weight (workbench heading convention). */
55
+ /** Dialog title - Studio Heading level 2 (20px). Semibold so Inter reads at
56
+ * Studio's medium-on-Söhne weight (workbench heading convention). Registers its
57
+ * id with the adapter so the panel adopts `aria-labelledby`. */
30
58
  export declare function DialogTitle({ className, id, ...props }: React.HTMLAttributes<HTMLHeadingElement>): React.ReactElement;
31
- /** Dialog description — body text, left-aligned. */
59
+ /** Dialog description - body text, left-aligned. Registers its id with the
60
+ * adapter so the panel adopts `aria-describedby`. */
32
61
  export declare function DialogDescription({ className, id, ...props }: React.HTMLAttributes<HTMLParagraphElement>): React.ReactElement;
33
62
  /** Scrollable body area with a bottom edge-fade. */
34
63
  export declare function DialogBody({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>): React.ReactElement;
35
- /** Sticky footer row — action left, cancel right. */
64
+ /** Sticky footer row - action left, cancel right. */
36
65
  export declare function DialogFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.ReactElement;
37
66
  /** Layout-neutral `<form>` shell (`display: contents`) wrapping header/body/footer. */
38
67
  export declare function DialogForm({ className, ...props }: React.FormHTMLAttributes<HTMLFormElement>): React.ReactElement;
39
68
  /** Props accepted by `<DialogAction>`. */
40
69
  export interface DialogActionProps extends ButtonProps {
70
+ /** Show the pending/pulsing state and block double-submits. */
41
71
  isLoading?: boolean;
42
72
  }
43
73
  /** Recommended action button (primary, default size). */