davaux 0.8.0

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 (333) hide show
  1. package/BASELINE.md +169 -0
  2. package/CLAUDE.md +518 -0
  3. package/LICENSE +21 -0
  4. package/README.md +36 -0
  5. package/ROADMAP.md +198 -0
  6. package/build.mjs +101 -0
  7. package/client/control.ts +247 -0
  8. package/client/hydrate.ts +37 -0
  9. package/client/index.ts +19 -0
  10. package/client/jsx-runtime.ts +209 -0
  11. package/client/resource.ts +122 -0
  12. package/client/signal.ts +211 -0
  13. package/client/store.ts +110 -0
  14. package/client/useHead.ts +63 -0
  15. package/dist/build/config.d.ts +3 -0
  16. package/dist/build/config.d.ts.map +1 -0
  17. package/dist/build/config.js +38 -0
  18. package/dist/build/config.js.map +7 -0
  19. package/dist/build/index.d.ts +2 -0
  20. package/dist/build/index.d.ts.map +1 -0
  21. package/dist/build/index.js +13 -0
  22. package/dist/build/index.js.map +7 -0
  23. package/dist/build/plugins.d.ts +7 -0
  24. package/dist/build/plugins.d.ts.map +1 -0
  25. package/dist/build/plugins.js +85 -0
  26. package/dist/build/plugins.js.map +7 -0
  27. package/dist/cli.d.ts +2 -0
  28. package/dist/cli.d.ts.map +1 -0
  29. package/dist/cli.js +427 -0
  30. package/dist/cli.js.map +7 -0
  31. package/dist/client/control.d.ts +49 -0
  32. package/dist/client/control.d.ts.map +1 -0
  33. package/dist/client/control.js +154 -0
  34. package/dist/client/control.js.map +7 -0
  35. package/dist/client/hydrate.d.ts +7 -0
  36. package/dist/client/hydrate.d.ts.map +1 -0
  37. package/dist/client/hydrate.js +23 -0
  38. package/dist/client/hydrate.js.map +7 -0
  39. package/dist/client/index.d.ts +12 -0
  40. package/dist/client/index.d.ts.map +1 -0
  41. package/dist/client/index.js +32 -0
  42. package/dist/client/index.js.map +7 -0
  43. package/dist/client/jsx-runtime.d.ts +40 -0
  44. package/dist/client/jsx-runtime.d.ts.map +1 -0
  45. package/dist/client/jsx-runtime.js +139 -0
  46. package/dist/client/jsx-runtime.js.map +7 -0
  47. package/dist/client/resource.d.ts +31 -0
  48. package/dist/client/resource.d.ts.map +1 -0
  49. package/dist/client/resource.js +64 -0
  50. package/dist/client/resource.js.map +7 -0
  51. package/dist/client/signal.d.ts +90 -0
  52. package/dist/client/signal.d.ts.map +1 -0
  53. package/dist/client/signal.js +115 -0
  54. package/dist/client/signal.js.map +7 -0
  55. package/dist/client/store.d.ts +26 -0
  56. package/dist/client/store.d.ts.map +1 -0
  57. package/dist/client/store.js +63 -0
  58. package/dist/client/store.js.map +7 -0
  59. package/dist/client/useHead.d.ts +28 -0
  60. package/dist/client/useHead.d.ts.map +1 -0
  61. package/dist/client/useHead.js +33 -0
  62. package/dist/client/useHead.js.map +7 -0
  63. package/dist/config.d.ts +182 -0
  64. package/dist/config.d.ts.map +1 -0
  65. package/dist/config.js +21 -0
  66. package/dist/config.js.map +7 -0
  67. package/dist/create-multisite.d.ts +2 -0
  68. package/dist/create-multisite.d.ts.map +1 -0
  69. package/dist/create-multisite.js +291 -0
  70. package/dist/create-multisite.js.map +7 -0
  71. package/dist/create.d.ts +2 -0
  72. package/dist/create.d.ts.map +1 -0
  73. package/dist/create.js +179 -0
  74. package/dist/create.js.map +7 -0
  75. package/dist/dev/blueprints.d.ts +11 -0
  76. package/dist/dev/blueprints.d.ts.map +1 -0
  77. package/dist/dev/blueprints.js +65 -0
  78. package/dist/dev/blueprints.js.map +7 -0
  79. package/dist/dev/components.d.ts +19 -0
  80. package/dist/dev/components.d.ts.map +1 -0
  81. package/dist/dev/components.js +87 -0
  82. package/dist/dev/components.js.map +7 -0
  83. package/dist/dev/insert.d.ts +11 -0
  84. package/dist/dev/insert.d.ts.map +1 -0
  85. package/dist/dev/insert.js +160 -0
  86. package/dist/dev/insert.js.map +7 -0
  87. package/dist/dev/remove.d.ts +53 -0
  88. package/dist/dev/remove.d.ts.map +1 -0
  89. package/dist/dev/remove.js +518 -0
  90. package/dist/dev/remove.js.map +7 -0
  91. package/dist/dev/watch.d.ts +26 -0
  92. package/dist/dev/watch.d.ts.map +1 -0
  93. package/dist/dev/watch.js +2905 -0
  94. package/dist/dev/watch.js.map +7 -0
  95. package/dist/errors.d.ts +6 -0
  96. package/dist/errors.d.ts.map +1 -0
  97. package/dist/errors.js +63 -0
  98. package/dist/errors.js.map +7 -0
  99. package/dist/generate.d.ts +2 -0
  100. package/dist/generate.d.ts.map +1 -0
  101. package/dist/generate.js +191 -0
  102. package/dist/generate.js.map +7 -0
  103. package/dist/index.d.ts +9 -0
  104. package/dist/index.d.ts.map +1 -0
  105. package/dist/index.js +57 -0
  106. package/dist/index.js.map +7 -0
  107. package/dist/island.d.ts +24 -0
  108. package/dist/island.d.ts.map +1 -0
  109. package/dist/island.js +15 -0
  110. package/dist/island.js.map +7 -0
  111. package/dist/jsx-runtime.d.ts +406 -0
  112. package/dist/jsx-runtime.d.ts.map +1 -0
  113. package/dist/jsx-runtime.js +90 -0
  114. package/dist/jsx-runtime.js.map +7 -0
  115. package/dist/link.d.ts +27 -0
  116. package/dist/link.d.ts.map +1 -0
  117. package/dist/link.js +29 -0
  118. package/dist/link.js.map +7 -0
  119. package/dist/oml/fragment.d.ts +16 -0
  120. package/dist/oml/fragment.d.ts.map +1 -0
  121. package/dist/oml/fragment.js +26 -0
  122. package/dist/oml/fragment.js.map +7 -0
  123. package/dist/oml/index.d.ts +11 -0
  124. package/dist/oml/index.d.ts.map +1 -0
  125. package/dist/oml/index.js +21 -0
  126. package/dist/oml/index.js.map +7 -0
  127. package/dist/oml/jsx-runtime.d.ts +34 -0
  128. package/dist/oml/jsx-runtime.d.ts.map +1 -0
  129. package/dist/oml/jsx-runtime.js +59 -0
  130. package/dist/oml/jsx-runtime.js.map +7 -0
  131. package/dist/oml/jsx.d.ts +14 -0
  132. package/dist/oml/jsx.d.ts.map +1 -0
  133. package/dist/oml/jsx.js +96 -0
  134. package/dist/oml/jsx.js.map +7 -0
  135. package/dist/oml/page.d.ts +7 -0
  136. package/dist/oml/page.d.ts.map +1 -0
  137. package/dist/oml/page.js +6 -0
  138. package/dist/oml/page.js.map +7 -0
  139. package/dist/oml/render.d.ts +13 -0
  140. package/dist/oml/render.d.ts.map +1 -0
  141. package/dist/oml/render.js +117 -0
  142. package/dist/oml/render.js.map +7 -0
  143. package/dist/oml/types.d.ts +79 -0
  144. package/dist/oml/types.d.ts.map +1 -0
  145. package/dist/oml/types.js +64 -0
  146. package/dist/oml/types.js.map +7 -0
  147. package/dist/router/handler.d.ts +53 -0
  148. package/dist/router/handler.d.ts.map +1 -0
  149. package/dist/router/handler.js +342 -0
  150. package/dist/router/handler.js.map +7 -0
  151. package/dist/router/matcher.d.ts +21 -0
  152. package/dist/router/matcher.d.ts.map +1 -0
  153. package/dist/router/matcher.js +28 -0
  154. package/dist/router/matcher.js.map +7 -0
  155. package/dist/router/scanner.d.ts +17 -0
  156. package/dist/router/scanner.d.ts.map +1 -0
  157. package/dist/router/scanner.js +197 -0
  158. package/dist/router/scanner.js.map +7 -0
  159. package/dist/server/index.d.ts +23 -0
  160. package/dist/server/index.d.ts.map +1 -0
  161. package/dist/server/index.js +29 -0
  162. package/dist/server/index.js.map +7 -0
  163. package/dist/signal.d.ts +15 -0
  164. package/dist/signal.d.ts.map +1 -0
  165. package/dist/signal.js +29 -0
  166. package/dist/signal.js.map +7 -0
  167. package/dist/ssg.d.ts +45 -0
  168. package/dist/ssg.d.ts.map +1 -0
  169. package/dist/ssg.js +175 -0
  170. package/dist/ssg.js.map +7 -0
  171. package/dist/test/actions.test.d.ts +2 -0
  172. package/dist/test/actions.test.d.ts.map +1 -0
  173. package/dist/test/body-limits.test.d.ts +2 -0
  174. package/dist/test/body-limits.test.d.ts.map +1 -0
  175. package/dist/test/errors.test.d.ts +2 -0
  176. package/dist/test/errors.test.d.ts.map +1 -0
  177. package/dist/test/fixtures/routes/[id].page.d.ts +4 -0
  178. package/dist/test/fixtures/routes/[id].page.d.ts.map +1 -0
  179. package/dist/test/fixtures/routes/_error.d.ts +3 -0
  180. package/dist/test/fixtures/routes/_error.d.ts.map +1 -0
  181. package/dist/test/fixtures/routes/_global.d.ts +3 -0
  182. package/dist/test/fixtures/routes/_global.d.ts.map +1 -0
  183. package/dist/test/fixtures/routes/_layout-template.d.ts +3 -0
  184. package/dist/test/fixtures/routes/_layout-template.d.ts.map +1 -0
  185. package/dist/test/fixtures/routes/_layout.d.ts +3 -0
  186. package/dist/test/fixtures/routes/_layout.d.ts.map +1 -0
  187. package/dist/test/fixtures/routes/_layout_scripts.d.ts +3 -0
  188. package/dist/test/fixtures/routes/_layout_scripts.d.ts.map +1 -0
  189. package/dist/test/fixtures/routes/_middleware.d.ts +3 -0
  190. package/dist/test/fixtures/routes/_middleware.d.ts.map +1 -0
  191. package/dist/test/fixtures/routes/_redirect301_mw.d.ts +3 -0
  192. package/dist/test/fixtures/routes/_redirect301_mw.d.ts.map +1 -0
  193. package/dist/test/fixtures/routes/_redirect_mw.d.ts +3 -0
  194. package/dist/test/fixtures/routes/_redirect_mw.d.ts.map +1 -0
  195. package/dist/test/fixtures/routes/about.page.d.ts +3 -0
  196. package/dist/test/fixtures/routes/about.page.d.ts.map +1 -0
  197. package/dist/test/fixtures/routes/action.page.d.ts +6 -0
  198. package/dist/test/fixtures/routes/action.page.d.ts.map +1 -0
  199. package/dist/test/fixtures/routes/api/form-all.post.d.ts +3 -0
  200. package/dist/test/fixtures/routes/api/form-all.post.d.ts.map +1 -0
  201. package/dist/test/fixtures/routes/api/form-limited.post.d.ts +6 -0
  202. package/dist/test/fixtures/routes/api/form-limited.post.d.ts.map +1 -0
  203. package/dist/test/fixtures/routes/api/response-obj.get.d.ts +3 -0
  204. package/dist/test/fixtures/routes/api/response-obj.get.d.ts.map +1 -0
  205. package/dist/test/fixtures/routes/api/upload.post.d.ts +12 -0
  206. package/dist/test/fixtures/routes/api/upload.post.d.ts.map +1 -0
  207. package/dist/test/fixtures/routes/api/users.get.d.ts +6 -0
  208. package/dist/test/fixtures/routes/api/users.get.d.ts.map +1 -0
  209. package/dist/test/fixtures/routes/api/xml.get.d.ts +3 -0
  210. package/dist/test/fixtures/routes/api/xml.get.d.ts.map +1 -0
  211. package/dist/test/fixtures/routes/auth/_middleware.d.ts +3 -0
  212. package/dist/test/fixtures/routes/auth/_middleware.d.ts.map +1 -0
  213. package/dist/test/fixtures/routes/auth/protected.page.d.ts +3 -0
  214. package/dist/test/fixtures/routes/auth/protected.page.d.ts.map +1 -0
  215. package/dist/test/fixtures/routes/index.page.d.ts +3 -0
  216. package/dist/test/fixtures/routes/index.page.d.ts.map +1 -0
  217. package/dist/test/fixtures/routes/oml.page.d.ts +3 -0
  218. package/dist/test/fixtures/routes/oml.page.d.ts.map +1 -0
  219. package/dist/test/fixtures/routes/redirect.page.d.ts +3 -0
  220. package/dist/test/fixtures/routes/redirect.page.d.ts.map +1 -0
  221. package/dist/test/fixtures/routes/ssg/[slug].page.d.ts +5 -0
  222. package/dist/test/fixtures/routes/ssg/[slug].page.d.ts.map +1 -0
  223. package/dist/test/fixtures/routes/ssg/server.page.d.ts +4 -0
  224. package/dist/test/fixtures/routes/ssg/server.page.d.ts.map +1 -0
  225. package/dist/test/fixtures/routes/state.page.d.ts +3 -0
  226. package/dist/test/fixtures/routes/state.page.d.ts.map +1 -0
  227. package/dist/test/fixtures/routes/throw.page.d.ts +3 -0
  228. package/dist/test/fixtures/routes/throw.page.d.ts.map +1 -0
  229. package/dist/test/fixtures/routes/wiki/[...slug].page.d.ts +3 -0
  230. package/dist/test/fixtures/routes/wiki/[...slug].page.d.ts.map +1 -0
  231. package/dist/test/helpers.d.ts +37 -0
  232. package/dist/test/helpers.d.ts.map +1 -0
  233. package/dist/test/layouts.test.d.ts +2 -0
  234. package/dist/test/layouts.test.d.ts.map +1 -0
  235. package/dist/test/middleware.test.d.ts +2 -0
  236. package/dist/test/middleware.test.d.ts.map +1 -0
  237. package/dist/test/multipart.test.d.ts +2 -0
  238. package/dist/test/multipart.test.d.ts.map +1 -0
  239. package/dist/test/oml-routing.test.d.ts +2 -0
  240. package/dist/test/oml-routing.test.d.ts.map +1 -0
  241. package/dist/test/oml.test.d.ts +2 -0
  242. package/dist/test/oml.test.d.ts.map +1 -0
  243. package/dist/test/redirects.test.d.ts +2 -0
  244. package/dist/test/redirects.test.d.ts.map +1 -0
  245. package/dist/test/routing.test.d.ts +2 -0
  246. package/dist/test/routing.test.d.ts.map +1 -0
  247. package/dist/test/ssg.test.d.ts +2 -0
  248. package/dist/test/ssg.test.d.ts.map +1 -0
  249. package/dist/test/web-response.test.d.ts +2 -0
  250. package/dist/test/web-response.test.d.ts.map +1 -0
  251. package/dist/types.d.ts +314 -0
  252. package/dist/types.d.ts.map +1 -0
  253. package/dist/types.js +292 -0
  254. package/dist/types.js.map +7 -0
  255. package/package.json +103 -0
  256. package/pka.config.json +32 -0
  257. package/src/build/config.ts +42 -0
  258. package/src/build/index.ts +6 -0
  259. package/src/build/plugins.ts +118 -0
  260. package/src/cli.ts +502 -0
  261. package/src/config.ts +197 -0
  262. package/src/create-multisite.ts +310 -0
  263. package/src/create.ts +194 -0
  264. package/src/dev/blueprints.ts +75 -0
  265. package/src/dev/components.ts +108 -0
  266. package/src/dev/insert.ts +221 -0
  267. package/src/dev/remove.ts +677 -0
  268. package/src/dev/watch.ts +3098 -0
  269. package/src/env.d.ts +5 -0
  270. package/src/errors.ts +64 -0
  271. package/src/generate.ts +228 -0
  272. package/src/index.ts +67 -0
  273. package/src/island.ts +47 -0
  274. package/src/jsx-runtime.d.ts +408 -0
  275. package/src/jsx-runtime.d.ts.map +1 -0
  276. package/src/jsx-runtime.ts +536 -0
  277. package/src/link.ts +49 -0
  278. package/src/oml/fragment.ts +54 -0
  279. package/src/oml/index.ts +21 -0
  280. package/src/oml/jsx-runtime.ts +121 -0
  281. package/src/oml/jsx.ts +151 -0
  282. package/src/oml/page.ts +13 -0
  283. package/src/oml/render.ts +181 -0
  284. package/src/oml/types.ts +159 -0
  285. package/src/router/handler.ts +515 -0
  286. package/src/router/matcher.ts +52 -0
  287. package/src/router/scanner.ts +272 -0
  288. package/src/server/index.ts +49 -0
  289. package/src/signal.ts +39 -0
  290. package/src/ssg.ts +253 -0
  291. package/src/test/actions.test.ts +40 -0
  292. package/src/test/body-limits.test.ts +83 -0
  293. package/src/test/errors.test.ts +53 -0
  294. package/src/test/fixtures/routes/[id].page.ts +3 -0
  295. package/src/test/fixtures/routes/_error.ts +6 -0
  296. package/src/test/fixtures/routes/_global.ts +8 -0
  297. package/src/test/fixtures/routes/_layout-template.ts +7 -0
  298. package/src/test/fixtures/routes/_layout.ts +7 -0
  299. package/src/test/fixtures/routes/_layout_scripts.ts +8 -0
  300. package/src/test/fixtures/routes/_middleware.ts +8 -0
  301. package/src/test/fixtures/routes/_redirect301_mw.ts +5 -0
  302. package/src/test/fixtures/routes/_redirect_mw.ts +5 -0
  303. package/src/test/fixtures/routes/about.page.ts +6 -0
  304. package/src/test/fixtures/routes/action.page.ts +11 -0
  305. package/src/test/fixtures/routes/api/form-all.post.ts +5 -0
  306. package/src/test/fixtures/routes/api/form-limited.post.ts +6 -0
  307. package/src/test/fixtures/routes/api/response-obj.get.ts +17 -0
  308. package/src/test/fixtures/routes/api/upload.post.ts +14 -0
  309. package/src/test/fixtures/routes/api/users.get.ts +3 -0
  310. package/src/test/fixtures/routes/api/xml.get.ts +5 -0
  311. package/src/test/fixtures/routes/auth/_middleware.ts +11 -0
  312. package/src/test/fixtures/routes/auth/protected.page.ts +3 -0
  313. package/src/test/fixtures/routes/index.page.ts +3 -0
  314. package/src/test/fixtures/routes/oml.page.ts +7 -0
  315. package/src/test/fixtures/routes/redirect.page.ts +3 -0
  316. package/src/test/fixtures/routes/ssg/[slug].page.ts +8 -0
  317. package/src/test/fixtures/routes/ssg/server.page.ts +5 -0
  318. package/src/test/fixtures/routes/state.page.ts +4 -0
  319. package/src/test/fixtures/routes/throw.page.ts +5 -0
  320. package/src/test/fixtures/routes/wiki/[...slug].page.ts +3 -0
  321. package/src/test/helpers.ts +132 -0
  322. package/src/test/layouts.test.ts +76 -0
  323. package/src/test/middleware.test.ts +69 -0
  324. package/src/test/multipart.test.ts +91 -0
  325. package/src/test/oml-routing.test.ts +59 -0
  326. package/src/test/oml.test.ts +429 -0
  327. package/src/test/redirects.test.ts +32 -0
  328. package/src/test/routing.test.ts +118 -0
  329. package/src/test/ssg.test.ts +273 -0
  330. package/src/test/web-response.test.ts +33 -0
  331. package/src/types.ts +670 -0
  332. package/tsconfig.client.json +17 -0
  333. package/tsconfig.json +20 -0
@@ -0,0 +1,406 @@
1
+ type Primitive = string | number | boolean | null | undefined;
2
+ type Child = Primitive | Promise<string | object | null> | Child[];
3
+ type StyleObject = Record<string, string | number>;
4
+ export type Props = {
5
+ children?: Child | Child[];
6
+ key?: string | number;
7
+ ref?: unknown;
8
+ dangerouslySetInnerHTML?: {
9
+ __html: string;
10
+ };
11
+ style?: string | StyleObject;
12
+ className?: string;
13
+ htmlFor?: string;
14
+ tabIndex?: number;
15
+ [prop: string]: unknown;
16
+ };
17
+ export type ComponentType<P extends Props = Props> = (props: P) => JSX.Element;
18
+ export declare function jsx(type: string | ComponentType, props: Props, _key?: string | number): Promise<string>;
19
+ export declare const jsxs: typeof jsx;
20
+ export declare const jsxDEV: typeof jsx;
21
+ export declare const Fragment = "__Fragment__";
22
+ export declare namespace JSX {
23
+ export type Element = Promise<string>;
24
+ export interface ElementChildrenAttribute {
25
+ children: object;
26
+ }
27
+ export interface IntrinsicAttributes {
28
+ key?: string | number;
29
+ }
30
+ interface HTMLAttributes {
31
+ id?: string;
32
+ class?: string;
33
+ className?: string;
34
+ style?: string | StyleObject;
35
+ title?: string;
36
+ lang?: string;
37
+ dir?: 'ltr' | 'rtl' | 'auto';
38
+ hidden?: boolean;
39
+ tabIndex?: number;
40
+ tabindex?: number;
41
+ role?: string;
42
+ slot?: string;
43
+ draggable?: boolean;
44
+ spellcheck?: boolean;
45
+ contenteditable?: boolean | 'true' | 'false';
46
+ dangerouslySetInnerHTML?: {
47
+ __html: string;
48
+ };
49
+ [attr: string]: unknown;
50
+ }
51
+ interface AnchorAttributes extends HTMLAttributes {
52
+ href?: string;
53
+ target?: '_blank' | '_self' | '_parent' | '_top' | string;
54
+ rel?: string;
55
+ download?: string | boolean;
56
+ hreflang?: string;
57
+ type?: string;
58
+ }
59
+ interface InputAttributes extends HTMLAttributes {
60
+ type?: string;
61
+ name?: string;
62
+ value?: string | number;
63
+ defaultValue?: string | number;
64
+ checked?: boolean;
65
+ defaultChecked?: boolean;
66
+ placeholder?: string;
67
+ disabled?: boolean;
68
+ readonly?: boolean;
69
+ required?: boolean;
70
+ min?: string | number;
71
+ max?: string | number;
72
+ step?: string | number;
73
+ multiple?: boolean;
74
+ accept?: string;
75
+ autocomplete?: string;
76
+ autofocus?: boolean;
77
+ form?: string;
78
+ pattern?: string;
79
+ list?: string;
80
+ }
81
+ interface FormAttributes extends HTMLAttributes {
82
+ action?: string;
83
+ method?: 'get' | 'post';
84
+ enctype?: string;
85
+ target?: string;
86
+ novalidate?: boolean;
87
+ autocomplete?: string;
88
+ }
89
+ interface ButtonAttributes extends HTMLAttributes {
90
+ type?: 'button' | 'submit' | 'reset';
91
+ disabled?: boolean;
92
+ form?: string;
93
+ name?: string;
94
+ value?: string;
95
+ autofocus?: boolean;
96
+ }
97
+ interface ImgAttributes extends HTMLAttributes {
98
+ src?: string;
99
+ alt?: string;
100
+ width?: number | string;
101
+ height?: number | string;
102
+ loading?: 'lazy' | 'eager';
103
+ decoding?: 'async' | 'auto' | 'sync';
104
+ srcset?: string;
105
+ sizes?: string;
106
+ }
107
+ interface LinkAttributes extends HTMLAttributes {
108
+ href?: string;
109
+ rel?: string;
110
+ type?: string;
111
+ media?: string;
112
+ as?: string;
113
+ crossorigin?: string;
114
+ integrity?: string;
115
+ }
116
+ interface ScriptAttributes extends HTMLAttributes {
117
+ src?: string;
118
+ type?: string;
119
+ async?: boolean;
120
+ defer?: boolean;
121
+ module?: boolean;
122
+ crossorigin?: string;
123
+ integrity?: string;
124
+ nonce?: string;
125
+ }
126
+ interface MetaAttributes extends HTMLAttributes {
127
+ name?: string;
128
+ content?: string;
129
+ charset?: string;
130
+ httpEquiv?: string;
131
+ property?: string;
132
+ }
133
+ interface LabelAttributes extends HTMLAttributes {
134
+ htmlFor?: string;
135
+ for?: string;
136
+ form?: string;
137
+ }
138
+ interface SelectAttributes extends HTMLAttributes {
139
+ name?: string;
140
+ value?: string;
141
+ defaultValue?: string;
142
+ multiple?: boolean;
143
+ disabled?: boolean;
144
+ required?: boolean;
145
+ size?: number;
146
+ form?: string;
147
+ autocomplete?: string;
148
+ }
149
+ interface TextareaAttributes extends HTMLAttributes {
150
+ name?: string;
151
+ value?: string;
152
+ defaultValue?: string;
153
+ placeholder?: string;
154
+ disabled?: boolean;
155
+ readonly?: boolean;
156
+ required?: boolean;
157
+ rows?: number;
158
+ cols?: number;
159
+ maxlength?: number;
160
+ form?: string;
161
+ autocomplete?: string;
162
+ autofocus?: boolean;
163
+ wrap?: 'hard' | 'soft';
164
+ }
165
+ interface VideoAttributes extends HTMLAttributes {
166
+ src?: string;
167
+ controls?: boolean;
168
+ autoplay?: boolean;
169
+ loop?: boolean;
170
+ muted?: boolean;
171
+ poster?: string;
172
+ width?: number | string;
173
+ height?: number | string;
174
+ preload?: 'auto' | 'metadata' | 'none';
175
+ }
176
+ interface AudioAttributes extends HTMLAttributes {
177
+ src?: string;
178
+ controls?: boolean;
179
+ autoplay?: boolean;
180
+ loop?: boolean;
181
+ muted?: boolean;
182
+ preload?: 'auto' | 'metadata' | 'none';
183
+ }
184
+ interface ColAttributes extends HTMLAttributes {
185
+ span?: number;
186
+ }
187
+ interface TdAttributes extends HTMLAttributes {
188
+ colspan?: number;
189
+ rowspan?: number;
190
+ headers?: string;
191
+ }
192
+ interface ThAttributes extends TdAttributes {
193
+ scope?: 'col' | 'row' | 'colgroup' | 'rowgroup';
194
+ abbr?: string;
195
+ }
196
+ interface IframeAttributes extends HTMLAttributes {
197
+ src?: string;
198
+ srcdoc?: string;
199
+ name?: string;
200
+ sandbox?: string;
201
+ allow?: string;
202
+ allowfullscreen?: boolean;
203
+ width?: number | string;
204
+ height?: number | string;
205
+ loading?: 'lazy' | 'eager';
206
+ referrerpolicy?: string;
207
+ }
208
+ export interface IntrinsicElements {
209
+ html: HTMLAttributes;
210
+ head: HTMLAttributes;
211
+ body: HTMLAttributes;
212
+ title: HTMLAttributes;
213
+ base: HTMLAttributes & {
214
+ href?: string;
215
+ target?: string;
216
+ };
217
+ link: LinkAttributes;
218
+ meta: MetaAttributes;
219
+ style: HTMLAttributes & {
220
+ media?: string;
221
+ };
222
+ script: ScriptAttributes;
223
+ noscript: HTMLAttributes;
224
+ main: HTMLAttributes;
225
+ header: HTMLAttributes;
226
+ footer: HTMLAttributes;
227
+ nav: HTMLAttributes;
228
+ section: HTMLAttributes;
229
+ article: HTMLAttributes;
230
+ aside: HTMLAttributes;
231
+ h1: HTMLAttributes;
232
+ h2: HTMLAttributes;
233
+ h3: HTMLAttributes;
234
+ h4: HTMLAttributes;
235
+ h5: HTMLAttributes;
236
+ h6: HTMLAttributes;
237
+ hgroup: HTMLAttributes;
238
+ address: HTMLAttributes;
239
+ div: HTMLAttributes;
240
+ span: HTMLAttributes;
241
+ p: HTMLAttributes;
242
+ pre: HTMLAttributes;
243
+ blockquote: HTMLAttributes & {
244
+ cite?: string;
245
+ };
246
+ hr: HTMLAttributes;
247
+ br: HTMLAttributes;
248
+ wbr: HTMLAttributes;
249
+ figure: HTMLAttributes;
250
+ figcaption: HTMLAttributes;
251
+ details: HTMLAttributes & {
252
+ open?: boolean;
253
+ };
254
+ summary: HTMLAttributes;
255
+ dialog: HTMLAttributes & {
256
+ open?: boolean;
257
+ };
258
+ ul: HTMLAttributes;
259
+ ol: HTMLAttributes & {
260
+ start?: number;
261
+ reversed?: boolean;
262
+ type?: string;
263
+ };
264
+ li: HTMLAttributes & {
265
+ value?: number;
266
+ };
267
+ dl: HTMLAttributes;
268
+ dt: HTMLAttributes;
269
+ dd: HTMLAttributes;
270
+ a: AnchorAttributes;
271
+ em: HTMLAttributes;
272
+ strong: HTMLAttributes;
273
+ small: HTMLAttributes;
274
+ s: HTMLAttributes;
275
+ cite: HTMLAttributes;
276
+ q: HTMLAttributes & {
277
+ cite?: string;
278
+ };
279
+ dfn: HTMLAttributes;
280
+ abbr: HTMLAttributes;
281
+ code: HTMLAttributes;
282
+ var: HTMLAttributes;
283
+ samp: HTMLAttributes;
284
+ kbd: HTMLAttributes;
285
+ sub: HTMLAttributes;
286
+ sup: HTMLAttributes;
287
+ b: HTMLAttributes;
288
+ u: HTMLAttributes;
289
+ i: HTMLAttributes;
290
+ mark: HTMLAttributes;
291
+ ruby: HTMLAttributes;
292
+ rp: HTMLAttributes;
293
+ rt: HTMLAttributes;
294
+ bdi: HTMLAttributes;
295
+ bdo: HTMLAttributes;
296
+ time: HTMLAttributes & {
297
+ datetime?: string;
298
+ };
299
+ data: HTMLAttributes & {
300
+ value?: string;
301
+ };
302
+ form: FormAttributes;
303
+ label: LabelAttributes;
304
+ input: InputAttributes;
305
+ button: ButtonAttributes;
306
+ select: SelectAttributes;
307
+ datalist: HTMLAttributes;
308
+ optgroup: HTMLAttributes & {
309
+ label?: string;
310
+ disabled?: boolean;
311
+ };
312
+ option: HTMLAttributes & {
313
+ value?: string;
314
+ disabled?: boolean;
315
+ selected?: boolean;
316
+ label?: string;
317
+ };
318
+ textarea: TextareaAttributes;
319
+ output: HTMLAttributes & {
320
+ for?: string;
321
+ form?: string;
322
+ name?: string;
323
+ };
324
+ progress: HTMLAttributes & {
325
+ value?: number;
326
+ max?: number;
327
+ };
328
+ meter: HTMLAttributes & {
329
+ value?: number;
330
+ min?: number;
331
+ max?: number;
332
+ low?: number;
333
+ high?: number;
334
+ optimum?: number;
335
+ };
336
+ fieldset: HTMLAttributes & {
337
+ disabled?: boolean;
338
+ form?: string;
339
+ name?: string;
340
+ };
341
+ legend: HTMLAttributes;
342
+ img: ImgAttributes;
343
+ video: VideoAttributes;
344
+ audio: AudioAttributes;
345
+ source: HTMLAttributes & {
346
+ src?: string;
347
+ type?: string;
348
+ srcset?: string;
349
+ sizes?: string;
350
+ media?: string;
351
+ };
352
+ track: HTMLAttributes & {
353
+ src?: string;
354
+ kind?: string;
355
+ label?: string;
356
+ srclang?: string;
357
+ default?: boolean;
358
+ };
359
+ embed: HTMLAttributes & {
360
+ src?: string;
361
+ type?: string;
362
+ width?: number | string;
363
+ height?: number | string;
364
+ };
365
+ object: HTMLAttributes & {
366
+ data?: string;
367
+ type?: string;
368
+ width?: number | string;
369
+ height?: number | string;
370
+ };
371
+ picture: HTMLAttributes;
372
+ canvas: HTMLAttributes & {
373
+ width?: number | string;
374
+ height?: number | string;
375
+ };
376
+ map: HTMLAttributes & {
377
+ name?: string;
378
+ };
379
+ area: HTMLAttributes & {
380
+ alt?: string;
381
+ coords?: string;
382
+ shape?: string;
383
+ href?: string;
384
+ target?: string;
385
+ };
386
+ table: HTMLAttributes;
387
+ caption: HTMLAttributes;
388
+ colgroup: HTMLAttributes & {
389
+ span?: number;
390
+ };
391
+ col: ColAttributes;
392
+ thead: HTMLAttributes;
393
+ tbody: HTMLAttributes;
394
+ tfoot: HTMLAttributes;
395
+ tr: HTMLAttributes;
396
+ td: TdAttributes;
397
+ th: ThAttributes;
398
+ iframe: IframeAttributes;
399
+ portal: HTMLAttributes;
400
+ menu: HTMLAttributes;
401
+ [tag: string]: HTMLAttributes;
402
+ }
403
+ export {};
404
+ }
405
+ export {};
406
+ //# sourceMappingURL=jsx-runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsx-runtime.d.ts","sourceRoot":"","sources":["../src/jsx-runtime.ts"],"names":[],"mappings":"AAIA,KAAK,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAA;AAE7D,KAAK,KAAK,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,GAAG,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AM,EAAE,cAAc,GAAG;YAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;SAAE,CAAA;QAC9E,GAAG,EAAE,cAAc,GAAG;YAAE,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;QACvC,IAAI,EAAE,cAAc,GAAG;YACrB,GAAG,CAAC,EAAE,MAAM,CAAA;YACZ,MAAM,CAAC,EAAE,MAAM,CAAA;YACf,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,IAAI,CAAC,EAAE,MAAM,CAAA;YACb,MAAM,CAAC,EAAE,MAAM,CAAA;SAChB,CAAA;QAGD,KAAK,EAAE,cAAc,CAAA;QACrB,OAAO,EAAE,cAAc,CAAA;QACvB,QAAQ,EAAE,cAAc,GAAG;YAAE,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;QAC5C,GAAG,EAAE,aAAa,CAAA;QAClB,KAAK,EAAE,cAAc,CAAA;QACrB,KAAK,EAAE,cAAc,CAAA;QACrB,KAAK,EAAE,cAAc,CAAA;QACrB,EAAE,EAAE,cAAc,CAAA;QAClB,EAAE,EAAE,YAAY,CAAA;QAChB,EAAE,EAAE,YAAY,CAAA;QAGhB,MAAM,EAAE,gBAAgB,CAAA;QACxB,MAAM,EAAE,cAAc,CAAA;QACtB,IAAI,EAAE,cAAc,CAAA;QAGpB,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAAA;KAC9B;;CACF"}
@@ -0,0 +1,90 @@
1
+ const VOID_ELEMENTS = /* @__PURE__ */ new Set([
2
+ "area",
3
+ "base",
4
+ "br",
5
+ "col",
6
+ "embed",
7
+ "hr",
8
+ "img",
9
+ "input",
10
+ "link",
11
+ "meta",
12
+ "param",
13
+ "source",
14
+ "track",
15
+ "wbr"
16
+ ]);
17
+ function escapeHtml(s) {
18
+ return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
19
+ }
20
+ function styleToString(style) {
21
+ return Object.entries(style).map(([k, v]) => {
22
+ const prop = k.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`);
23
+ return `${prop}:${v}`;
24
+ }).join(";");
25
+ }
26
+ async function renderChildren(children) {
27
+ if (children == null || children === false) return "";
28
+ if (Array.isArray(children)) {
29
+ const parts = await Promise.all(children.map((c) => renderChildren(c)));
30
+ return parts.join("");
31
+ }
32
+ if (children instanceof Promise) {
33
+ const resolved = await children;
34
+ if (resolved !== null && typeof resolved === "object") {
35
+ const { renderToHtml } = await import("./oml/render.js");
36
+ return renderToHtml(resolved);
37
+ }
38
+ return resolved ?? "";
39
+ }
40
+ if (typeof children === "boolean") return "";
41
+ return escapeHtml(String(children));
42
+ }
43
+ function renderAttrs(props) {
44
+ const parts = [];
45
+ for (const [key, val] of Object.entries(props)) {
46
+ if (key === "children" || key === "key" || key === "ref" || key === "dangerouslySetInnerHTML")
47
+ continue;
48
+ if (val === false || val == null) continue;
49
+ const attr = key === "className" ? "class" : key === "htmlFor" ? "for" : key === "tabIndex" ? "tabindex" : key;
50
+ if (attr.startsWith("on") && attr[2] === attr[2]?.toUpperCase()) continue;
51
+ if (val === true) {
52
+ parts.push(attr);
53
+ continue;
54
+ }
55
+ if (attr === "style") {
56
+ const css = typeof val === "string" ? val : styleToString(val);
57
+ parts.push(`style="${escapeHtml(css)}"`);
58
+ continue;
59
+ }
60
+ parts.push(`${attr}="${escapeHtml(String(val))}"`);
61
+ }
62
+ return parts.length ? ` ${parts.join(" ")}` : "";
63
+ }
64
+ async function jsx(type, props, _key) {
65
+ if (typeof type === "function") {
66
+ const result = type(props);
67
+ return result instanceof Promise ? await result : result;
68
+ }
69
+ if (type === Fragment) {
70
+ return renderChildren(props.children);
71
+ }
72
+ if (props.dangerouslySetInnerHTML) {
73
+ const attrs2 = renderAttrs(props);
74
+ return `<${type}${attrs2}>${props.dangerouslySetInnerHTML.__html}</${type}>`;
75
+ }
76
+ const attrs = renderAttrs(props);
77
+ if (VOID_ELEMENTS.has(type)) return `<${type}${attrs}>`;
78
+ const children = await renderChildren(props.children);
79
+ return `<${type}${attrs}>${children}</${type}>`;
80
+ }
81
+ const jsxs = jsx;
82
+ const jsxDEV = jsx;
83
+ const Fragment = "__Fragment__";
84
+ export {
85
+ Fragment,
86
+ jsx,
87
+ jsxDEV,
88
+ jsxs
89
+ };
90
+ //# sourceMappingURL=jsx-runtime.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/jsx-runtime.ts"],
4
+ "sourcesContent": ["// Server JSX runtime \u2014 renders component trees to HTML strings.\n// TypeScript resolves this via jsxImportSource: \"davaux\" in tsconfig.json.\n// Async components are fully supported: any component may return Promise<string>.\n\ntype Primitive = string | number | boolean | null | undefined\n// Promise<object|null> lets OML JSX elements (Promise<OmlNode|string>) pass as children without errors.\ntype Child = Primitive | Promise<string | object | null> | Child[]\ntype StyleObject = Record<string, string | number>\n\nexport type Props = {\n children?: Child | Child[]\n key?: string | number\n ref?: unknown\n dangerouslySetInnerHTML?: { __html: string }\n style?: string | StyleObject\n className?: string\n htmlFor?: string\n tabIndex?: number\n [prop: string]: unknown\n}\n\nexport type ComponentType<P extends Props = Props> = (props: P) => JSX.Element\n\n// \u2500\u2500\u2500 HTML helpers \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nconst VOID_ELEMENTS = new Set([\n 'area',\n 'base',\n 'br',\n 'col',\n 'embed',\n 'hr',\n 'img',\n 'input',\n 'link',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr',\n])\n\nfunction escapeHtml(s: string): string {\n return s\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n .replace(/\"/g, '&quot;')\n .replace(/'/g, '&#39;')\n}\n\nfunction styleToString(style: StyleObject): string {\n return Object.entries(style)\n .map(([k, v]) => {\n // camelCase \u2192 kebab-case\n const prop = k.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`)\n return `${prop}:${v}`\n })\n .join(';')\n}\n\nasync function renderChildren(children: Child | Child[] | undefined): Promise<string> {\n if (children == null || children === false) return ''\n if (Array.isArray(children)) {\n const parts = await Promise.all(children.map((c) => renderChildren(c)))\n return parts.join('')\n }\n if (children instanceof Promise) {\n const resolved = await children\n // The OML jsx runtime produces OmlNode objects instead of strings. Render them to\n // HTML on the fly \u2014 the import is cached by Node after the first call.\n if (resolved !== null && typeof resolved === 'object') {\n const { renderToHtml } = await import('./oml/render.js')\n return renderToHtml(resolved as never)\n }\n return (resolved ?? '') as string\n }\n if (typeof children === 'boolean') return ''\n return escapeHtml(String(children))\n}\n\nfunction renderAttrs(props: Props): string {\n const parts: string[] = []\n\n for (const [key, val] of Object.entries(props)) {\n if (key === 'children' || key === 'key' || key === 'ref' || key === 'dangerouslySetInnerHTML')\n continue\n\n if (val === false || val == null) continue\n\n // Map React-isms to HTML attributes\n const attr =\n key === 'className'\n ? 'class'\n : key === 'htmlFor'\n ? 'for'\n : key === 'tabIndex'\n ? 'tabindex'\n : key\n\n // Skip event handlers \u2014 they have no meaning in SSR\n if (attr.startsWith('on') && attr[2] === attr[2]?.toUpperCase()) continue\n\n if (val === true) {\n parts.push(attr)\n continue\n }\n\n if (attr === 'style') {\n const css = typeof val === 'string' ? val : styleToString(val as StyleObject)\n parts.push(`style=\"${escapeHtml(css)}\"`)\n continue\n }\n\n parts.push(`${attr}=\"${escapeHtml(String(val))}\"`)\n }\n\n return parts.length ? ` ${parts.join(' ')}` : ''\n}\n\n// \u2500\u2500\u2500 JSX factory \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport async function jsx(\n type: string | ComponentType,\n props: Props,\n _key?: string | number,\n): Promise<string> {\n if (typeof type === 'function') {\n const result = type(props)\n return (result instanceof Promise ? await result : result) as unknown as string\n }\n\n if (type === Fragment) {\n return renderChildren(props.children)\n }\n\n if (props.dangerouslySetInnerHTML) {\n const attrs = renderAttrs(props)\n return `<${type}${attrs}>${props.dangerouslySetInnerHTML.__html}</${type}>`\n }\n\n const attrs = renderAttrs(props)\n if (VOID_ELEMENTS.has(type)) return `<${type}${attrs}>`\n\n const children = await renderChildren(props.children)\n return `<${type}${attrs}>${children}</${type}>`\n}\n\nexport const jsxs = jsx\nexport const jsxDEV = jsx\n\nexport const Fragment = '__Fragment__'\n\n// \u2500\u2500\u2500 JSX namespace (used by TypeScript for element type checking) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport namespace JSX {\n // Always Promise<string> \u2014 async functions returning JSX auto-unwrap to Promise<string>.\n // Sync functions returning JSX also satisfy this because JSX.Element = Promise<string>\n // and a sync function returning a promise is valid where Promise<string> is expected.\n export type Element = Promise<string>\n\n export interface ElementChildrenAttribute {\n children: object\n }\n\n export interface IntrinsicAttributes {\n key?: string | number\n }\n\n // Shared HTML attribute base\n interface HTMLAttributes {\n id?: string\n class?: string\n className?: string\n style?: string | StyleObject\n title?: string\n lang?: string\n dir?: 'ltr' | 'rtl' | 'auto'\n hidden?: boolean\n tabIndex?: number\n tabindex?: number\n role?: string\n slot?: string\n draggable?: boolean\n spellcheck?: boolean\n contenteditable?: boolean | 'true' | 'false'\n dangerouslySetInnerHTML?: { __html: string }\n // data-* and aria-*\n [attr: string]: unknown\n }\n\n interface AnchorAttributes extends HTMLAttributes {\n href?: string\n target?: '_blank' | '_self' | '_parent' | '_top' | string\n rel?: string\n download?: string | boolean\n hreflang?: string\n type?: string\n }\n\n interface InputAttributes extends HTMLAttributes {\n type?: string\n name?: string\n value?: string | number\n defaultValue?: string | number\n checked?: boolean\n defaultChecked?: boolean\n placeholder?: string\n disabled?: boolean\n readonly?: boolean\n required?: boolean\n min?: string | number\n max?: string | number\n step?: string | number\n multiple?: boolean\n accept?: string\n autocomplete?: string\n autofocus?: boolean\n form?: string\n pattern?: string\n list?: string\n }\n\n interface FormAttributes extends HTMLAttributes {\n action?: string\n method?: 'get' | 'post'\n enctype?: string\n target?: string\n novalidate?: boolean\n autocomplete?: string\n }\n\n interface ButtonAttributes extends HTMLAttributes {\n type?: 'button' | 'submit' | 'reset'\n disabled?: boolean\n form?: string\n name?: string\n value?: string\n autofocus?: boolean\n }\n\n interface ImgAttributes extends HTMLAttributes {\n src?: string\n alt?: string\n width?: number | string\n height?: number | string\n loading?: 'lazy' | 'eager'\n decoding?: 'async' | 'auto' | 'sync'\n srcset?: string\n sizes?: string\n }\n\n interface LinkAttributes extends HTMLAttributes {\n href?: string\n rel?: string\n type?: string\n media?: string\n as?: string\n crossorigin?: string\n integrity?: string\n }\n\n interface ScriptAttributes extends HTMLAttributes {\n src?: string\n type?: string\n async?: boolean\n defer?: boolean\n module?: boolean\n crossorigin?: string\n integrity?: string\n nonce?: string\n }\n\n interface MetaAttributes extends HTMLAttributes {\n name?: string\n content?: string\n charset?: string\n httpEquiv?: string\n property?: string\n }\n\n interface LabelAttributes extends HTMLAttributes {\n htmlFor?: string\n for?: string\n form?: string\n }\n\n interface SelectAttributes extends HTMLAttributes {\n name?: string\n value?: string\n defaultValue?: string\n multiple?: boolean\n disabled?: boolean\n required?: boolean\n size?: number\n form?: string\n autocomplete?: string\n }\n\n interface TextareaAttributes extends HTMLAttributes {\n name?: string\n value?: string\n defaultValue?: string\n placeholder?: string\n disabled?: boolean\n readonly?: boolean\n required?: boolean\n rows?: number\n cols?: number\n maxlength?: number\n form?: string\n autocomplete?: string\n autofocus?: boolean\n wrap?: 'hard' | 'soft'\n }\n\n interface VideoAttributes extends HTMLAttributes {\n src?: string\n controls?: boolean\n autoplay?: boolean\n loop?: boolean\n muted?: boolean\n poster?: string\n width?: number | string\n height?: number | string\n preload?: 'auto' | 'metadata' | 'none'\n }\n\n interface AudioAttributes extends HTMLAttributes {\n src?: string\n controls?: boolean\n autoplay?: boolean\n loop?: boolean\n muted?: boolean\n preload?: 'auto' | 'metadata' | 'none'\n }\n\n interface ColAttributes extends HTMLAttributes {\n span?: number\n }\n\n interface TdAttributes extends HTMLAttributes {\n colspan?: number\n rowspan?: number\n headers?: string\n }\n\n interface ThAttributes extends TdAttributes {\n scope?: 'col' | 'row' | 'colgroup' | 'rowgroup'\n abbr?: string\n }\n\n interface IframeAttributes extends HTMLAttributes {\n src?: string\n srcdoc?: string\n name?: string\n sandbox?: string\n allow?: string\n allowfullscreen?: boolean\n width?: number | string\n height?: number | string\n loading?: 'lazy' | 'eager'\n referrerpolicy?: string\n }\n\n export interface IntrinsicElements {\n // Document structure\n html: HTMLAttributes\n head: HTMLAttributes\n body: HTMLAttributes\n title: HTMLAttributes\n base: HTMLAttributes & { href?: string; target?: string }\n link: LinkAttributes\n meta: MetaAttributes\n style: HTMLAttributes & { media?: string }\n script: ScriptAttributes\n noscript: HTMLAttributes\n\n // Sectioning\n main: HTMLAttributes\n header: HTMLAttributes\n footer: HTMLAttributes\n nav: HTMLAttributes\n section: HTMLAttributes\n article: HTMLAttributes\n aside: HTMLAttributes\n h1: HTMLAttributes\n h2: HTMLAttributes\n h3: HTMLAttributes\n h4: HTMLAttributes\n h5: HTMLAttributes\n h6: HTMLAttributes\n hgroup: HTMLAttributes\n address: HTMLAttributes\n\n // Content\n div: HTMLAttributes\n span: HTMLAttributes\n p: HTMLAttributes\n pre: HTMLAttributes\n blockquote: HTMLAttributes & { cite?: string }\n hr: HTMLAttributes\n br: HTMLAttributes\n wbr: HTMLAttributes\n figure: HTMLAttributes\n figcaption: HTMLAttributes\n details: HTMLAttributes & { open?: boolean }\n summary: HTMLAttributes\n dialog: HTMLAttributes & { open?: boolean }\n\n // Lists\n ul: HTMLAttributes\n ol: HTMLAttributes & { start?: number; reversed?: boolean; type?: string }\n li: HTMLAttributes & { value?: number }\n dl: HTMLAttributes\n dt: HTMLAttributes\n dd: HTMLAttributes\n\n // Inline text\n a: AnchorAttributes\n em: HTMLAttributes\n strong: HTMLAttributes\n small: HTMLAttributes\n s: HTMLAttributes\n cite: HTMLAttributes\n q: HTMLAttributes & { cite?: string }\n dfn: HTMLAttributes\n abbr: HTMLAttributes\n code: HTMLAttributes\n var: HTMLAttributes\n samp: HTMLAttributes\n kbd: HTMLAttributes\n sub: HTMLAttributes\n sup: HTMLAttributes\n b: HTMLAttributes\n u: HTMLAttributes\n i: HTMLAttributes\n mark: HTMLAttributes\n ruby: HTMLAttributes\n rp: HTMLAttributes\n rt: HTMLAttributes\n bdi: HTMLAttributes\n bdo: HTMLAttributes\n time: HTMLAttributes & { datetime?: string }\n data: HTMLAttributes & { value?: string }\n\n // Forms\n form: FormAttributes\n label: LabelAttributes\n input: InputAttributes\n button: ButtonAttributes\n select: SelectAttributes\n datalist: HTMLAttributes\n optgroup: HTMLAttributes & { label?: string; disabled?: boolean }\n option: HTMLAttributes & {\n value?: string\n disabled?: boolean\n selected?: boolean\n label?: string\n }\n textarea: TextareaAttributes\n output: HTMLAttributes & { for?: string; form?: string; name?: string }\n progress: HTMLAttributes & { value?: number; max?: number }\n meter: HTMLAttributes & {\n value?: number\n min?: number\n max?: number\n low?: number\n high?: number\n optimum?: number\n }\n fieldset: HTMLAttributes & { disabled?: boolean; form?: string; name?: string }\n legend: HTMLAttributes\n\n // Media\n img: ImgAttributes\n video: VideoAttributes\n audio: AudioAttributes\n source: HTMLAttributes & {\n src?: string\n type?: string\n srcset?: string\n sizes?: string\n media?: string\n }\n track: HTMLAttributes & {\n src?: string\n kind?: string\n label?: string\n srclang?: string\n default?: boolean\n }\n embed: HTMLAttributes & {\n src?: string\n type?: string\n width?: number | string\n height?: number | string\n }\n object: HTMLAttributes & {\n data?: string\n type?: string\n width?: number | string\n height?: number | string\n }\n picture: HTMLAttributes\n canvas: HTMLAttributes & { width?: number | string; height?: number | string }\n map: HTMLAttributes & { name?: string }\n area: HTMLAttributes & {\n alt?: string\n coords?: string\n shape?: string\n href?: string\n target?: string\n }\n\n // Tables\n table: HTMLAttributes\n caption: HTMLAttributes\n colgroup: HTMLAttributes & { span?: number }\n col: ColAttributes\n thead: HTMLAttributes\n tbody: HTMLAttributes\n tfoot: HTMLAttributes\n tr: HTMLAttributes\n td: TdAttributes\n th: ThAttributes\n\n // Interactive\n iframe: IframeAttributes\n portal: HTMLAttributes\n menu: HTMLAttributes\n\n // Obsolete / catch-all\n [tag: string]: HTMLAttributes\n }\n}\n"],
5
+ "mappings": "AAyBA,MAAM,gBAAgB,oBAAI,IAAI;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAED,SAAS,WAAW,GAAmB;AACrC,SAAO,EACJ,QAAQ,MAAM,OAAO,EACrB,QAAQ,MAAM,MAAM,EACpB,QAAQ,MAAM,MAAM,EACpB,QAAQ,MAAM,QAAQ,EACtB,QAAQ,MAAM,OAAO;AAC1B;AAEA,SAAS,cAAc,OAA4B;AACjD,SAAO,OAAO,QAAQ,KAAK,EACxB,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM;AAEf,UAAM,OAAO,EAAE,QAAQ,UAAU,CAAC,MAAM,IAAI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K,GAAG,IAAI,KAAK,WAAW,OAAO,GAAG,CAAC,CAAC,GAAG;AAAA,EACnD;AAEA,SAAO,MAAM,SAAS,IAAI,MAAM,KAAK,GAAG,CAAC,KAAK;AAChD;AAIA,eAAsB,IACpB,MACA,OACA,MACiB;AACjB,MAAI,OAAO,SAAS,YAAY;AAC9B,UAAM,SAAS,KAAK,KAAK;AACzB,WAAQ,kBAAkB,UAAU,MAAM,SAAS;AAAA,EACrD;AAEA,MAAI,SAAS,UAAU;AACrB,WAAO,eAAe,MAAM,QAAQ;AAAA,EACtC;AAEA,MAAI,MAAM,yBAAyB;AACjC,UAAMA,SAAQ,YAAY,KAAK;AAC/B,WAAO,IAAI,IAAI,GAAGA,MAAK,IAAI,MAAM,wBAAwB,MAAM,KAAK,IAAI;AAAA,EAC1E;AAEA,QAAM,QAAQ,YAAY,KAAK;AAC/B,MAAI,cAAc,IAAI,IAAI,EAAG,QAAO,IAAI,IAAI,GAAG,KAAK;AAEpD,QAAM,WAAW,MAAM,eAAe,MAAM,QAAQ;AACpD,SAAO,IAAI,IAAI,GAAG,KAAK,IAAI,QAAQ,KAAK,IAAI;AAC9C;AAEO,MAAM,OAAO;AACb,MAAM,SAAS;AAEf,MAAM,WAAW;",
6
+ "names": ["attrs"]
7
+ }
package/dist/link.d.ts ADDED
@@ -0,0 +1,27 @@
1
+ import type { JSX } from './jsx-runtime.js';
2
+ import type { RequestContext } from './types.js';
3
+ type AnchorProps = JSX.IntrinsicElements['a'];
4
+ type LinkProps = AnchorProps & {
5
+ activeClass?: string;
6
+ external?: boolean;
7
+ };
8
+ /**
9
+ * Create basePath-aware link utilities for use in layouts and pages.
10
+ *
11
+ * Returns `{ link, Link }`:
12
+ * - `link(href)` — prefixes the configured `basePath` to absolute paths.
13
+ * - `Link` — a JSX `<a>` component that also handles `activeClass` detection
14
+ * and sets safe defaults (`rel="noopener noreferrer"`, `target="_blank"`) for
15
+ * external links.
16
+ *
17
+ * @example
18
+ * const { link, Link } = createLink(ctx)
19
+ * <Link href="/about" activeClass="active">About</Link>
20
+ * <Link href="https://example.com" external>External</Link>
21
+ */
22
+ export declare function createLink(ctx: RequestContext): {
23
+ link: (href: string) => string;
24
+ Link: ({ href, activeClass, external, class: className, rel, target, ...rest }: LinkProps) => Promise<string>;
25
+ };
26
+ export {};
27
+ //# sourceMappingURL=link.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../src/link.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAE3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAEhD,KAAK,WAAW,GAAG,GAAG,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAA;AAC7C,KAAK,SAAS,GAAG,WAAW,GAAG;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,cAAc;iBACxB,MAAM;oFASvB,SAAS;EAcb"}
package/dist/link.js ADDED
@@ -0,0 +1,29 @@
1
+ import { jsx } from "./jsx-runtime.js";
2
+ function createLink(ctx) {
3
+ const link = (href) => href.startsWith("/") ? `${ctx.basePath}${href}` : href;
4
+ const Link = ({
5
+ href = "",
6
+ activeClass,
7
+ external,
8
+ class: className,
9
+ rel,
10
+ target,
11
+ ...rest
12
+ }) => {
13
+ const resolvedHref = link(href);
14
+ const isActive = activeClass != null && resolvedHref === ctx.url.pathname;
15
+ const classes = [className, isActive ? activeClass : void 0].filter(Boolean).join(" ") || void 0;
16
+ const resolvedTarget = external && !target ? "_blank" : target;
17
+ const resolvedRel = external && !rel ? "noopener noreferrer" : rel;
18
+ return jsx(
19
+ "a",
20
+ { href: resolvedHref, class: classes, target: resolvedTarget, rel: resolvedRel, ...rest },
21
+ void 0
22
+ );
23
+ };
24
+ return { link, Link };
25
+ }
26
+ export {
27
+ createLink
28
+ };
29
+ //# sourceMappingURL=link.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/link.ts"],
4
+ "sourcesContent": ["import type { JSX } from './jsx-runtime.js'\nimport { jsx } from './jsx-runtime.js'\nimport type { RequestContext } from './types.js'\n\ntype AnchorProps = JSX.IntrinsicElements['a']\ntype LinkProps = AnchorProps & {\n activeClass?: string\n external?: boolean\n}\n\n/**\n * Create basePath-aware link utilities for use in layouts and pages.\n *\n * Returns `{ link, Link }`:\n * - `link(href)` \u2014 prefixes the configured `basePath` to absolute paths.\n * - `Link` \u2014 a JSX `<a>` component that also handles `activeClass` detection\n * and sets safe defaults (`rel=\"noopener noreferrer\"`, `target=\"_blank\"`) for\n * external links.\n *\n * @example\n * const { link, Link } = createLink(ctx)\n * <Link href=\"/about\" activeClass=\"active\">About</Link>\n * <Link href=\"https://example.com\" external>External</Link>\n */\nexport function createLink(ctx: RequestContext) {\n const link = (href: string) => (href.startsWith('/') ? `${ctx.basePath}${href}` : href)\n const Link = ({\n href = '',\n activeClass,\n external,\n class: className,\n rel,\n target,\n ...rest\n }: LinkProps) => {\n const resolvedHref = link(href)\n const isActive = activeClass != null && resolvedHref === ctx.url.pathname\n const classes =\n [className, isActive ? activeClass : undefined].filter(Boolean).join(' ') || undefined\n const resolvedTarget = external && !target ? '_blank' : target\n const resolvedRel = external && !rel ? 'noopener noreferrer' : rel\n return jsx(\n 'a',\n { href: resolvedHref, class: classes, target: resolvedTarget, rel: resolvedRel, ...rest },\n undefined,\n )\n }\n return { link, Link }\n}\n"],
5
+ "mappings": "AACA,SAAS,WAAW;AAuBb,SAAS,WAAW,KAAqB;AAC9C,QAAM,OAAO,CAAC,SAAkB,KAAK,WAAW,GAAG,IAAI,GAAG,IAAI,QAAQ,GAAG,IAAI,KAAK;AAClF,QAAM,OAAO,CAAC;AAAA,IACZ,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,MAAiB;AACf,UAAM,eAAe,KAAK,IAAI;AAC9B,UAAM,WAAW,eAAe,QAAQ,iBAAiB,IAAI,IAAI;AACjE,UAAM,UACJ,CAAC,WAAW,WAAW,cAAc,MAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,KAAK;AAC/E,UAAM,iBAAiB,YAAY,CAAC,SAAS,WAAW;AACxD,UAAM,cAAc,YAAY,CAAC,MAAM,wBAAwB;AAC/D,WAAO;AAAA,MACL;AAAA,MACA,EAAE,MAAM,cAAc,OAAO,SAAS,QAAQ,gBAAgB,KAAK,aAAa,GAAG,KAAK;AAAA,MACxF;AAAA,IACF;AAAA,EACF;AACA,SAAO,EAAE,MAAM,KAAK;AACtB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,16 @@
1
+ import type { OmlNode } from './types.js';
2
+ export type OmlFragmentOptions<P> = {
3
+ /** Derive a stable string cache key from props. Defaults to JSON.stringify(props). */
4
+ key?: (props: P) => string;
5
+ /** Time-to-live in milliseconds. Omit for indefinite caching. */
6
+ ttl?: number;
7
+ };
8
+ /** Invalidate all fragment caches — useful after CMS updates or programmatic cache busting. */
9
+ export declare function clearAllFragments(): void;
10
+ /** Define a cached, no-props OML fragment. The function runs once; subsequent calls return the cached node. */
11
+ export declare function defineFragment(fn: () => OmlNode | Promise<OmlNode>, options?: {
12
+ ttl?: number;
13
+ }): () => Promise<OmlNode>;
14
+ /** Define a cached OML fragment that accepts props. Caches per unique prop combination. */
15
+ export declare function defineFragment<P extends Record<string, unknown>>(fn: (props: P) => OmlNode | Promise<OmlNode>, options?: OmlFragmentOptions<P>): (props: P) => Promise<OmlNode>;
16
+ //# sourceMappingURL=fragment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fragment.d.ts","sourceRoot":"","sources":["../../src/oml/fragment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEzC,MAAM,MAAM,kBAAkB,CAAC,CAAC,IAAI;IAClC,sFAAsF;IACtF,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,MAAM,CAAA;IAC1B,iEAAiE;IACjE,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAMD,+FAA+F;AAC/F,wBAAgB,iBAAiB,IAAI,IAAI,CAExC;AAED,+GAA+G;AAC/G,wBAAgB,cAAc,CAC5B,EAAE,EAAE,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,EACpC,OAAO,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GACzB,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;AAEzB,2FAA2F;AAC3F,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9D,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,EAC5C,OAAO,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAC9B,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA"}