@20baht/ui 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +512 -2
  3. package/dist/components/baht-form.d.ts +206 -0
  4. package/dist/components/baht-form.js +630 -0
  5. package/dist/components/baht-workflow.d.ts +187 -0
  6. package/dist/components/baht-workflow.js +455 -0
  7. package/dist/components/base.d.ts +92 -0
  8. package/dist/components/base.js +138 -0
  9. package/dist/components/combobox-controller.d.ts +65 -0
  10. package/dist/components/combobox-controller.js +82 -0
  11. package/dist/components/define.d.ts +7 -0
  12. package/dist/components/define.js +16 -0
  13. package/dist/components/field-base.d.ts +84 -0
  14. package/dist/components/field-base.js +152 -0
  15. package/dist/components/floating.d.ts +84 -0
  16. package/dist/components/floating.js +182 -0
  17. package/dist/components/form-layout.d.ts +39 -0
  18. package/dist/components/form-layout.js +67 -0
  19. package/dist/components/form-options.d.ts +39 -0
  20. package/dist/components/form-options.js +65 -0
  21. package/dist/components/form-readonly.d.ts +20 -0
  22. package/dist/components/form-readonly.js +70 -0
  23. package/dist/components/layers.d.ts +4 -0
  24. package/dist/components/layers.js +15 -0
  25. package/dist/components/menu-controller.d.ts +65 -0
  26. package/dist/components/menu-controller.js +134 -0
  27. package/dist/components/motion.d.ts +9 -0
  28. package/dist/components/motion.js +16 -0
  29. package/dist/components/primitives/baht-accordion.d.ts +29 -0
  30. package/dist/components/primitives/baht-accordion.js +66 -0
  31. package/dist/components/primitives/baht-alert.d.ts +20 -0
  32. package/dist/components/primitives/baht-alert.js +62 -0
  33. package/dist/components/primitives/baht-app-shell.d.ts +81 -0
  34. package/dist/components/primitives/baht-app-shell.js +161 -0
  35. package/dist/components/primitives/baht-approval-chain.d.ts +59 -0
  36. package/dist/components/primitives/baht-approval-chain.js +80 -0
  37. package/dist/components/primitives/baht-avatar.d.ts +19 -0
  38. package/dist/components/primitives/baht-avatar.js +43 -0
  39. package/dist/components/primitives/baht-badge.d.ts +24 -0
  40. package/dist/components/primitives/baht-badge.js +41 -0
  41. package/dist/components/primitives/baht-bar-chart.d.ts +78 -0
  42. package/dist/components/primitives/baht-bar-chart.js +361 -0
  43. package/dist/components/primitives/baht-breadcrumbs.d.ts +23 -0
  44. package/dist/components/primitives/baht-breadcrumbs.js +45 -0
  45. package/dist/components/primitives/baht-button.d.ts +89 -0
  46. package/dist/components/primitives/baht-button.js +146 -0
  47. package/dist/components/primitives/baht-calendar.d.ts +96 -0
  48. package/dist/components/primitives/baht-calendar.js +398 -0
  49. package/dist/components/primitives/baht-card.d.ts +34 -0
  50. package/dist/components/primitives/baht-card.js +70 -0
  51. package/dist/components/primitives/baht-catalog-card.d.ts +52 -0
  52. package/dist/components/primitives/baht-catalog-card.js +90 -0
  53. package/dist/components/primitives/baht-checkbox.d.ts +7 -0
  54. package/dist/components/primitives/baht-checkbox.js +40 -0
  55. package/dist/components/primitives/baht-choice-group.d.ts +52 -0
  56. package/dist/components/primitives/baht-choice-group.js +71 -0
  57. package/dist/components/primitives/baht-code.d.ts +18 -0
  58. package/dist/components/primitives/baht-code.js +33 -0
  59. package/dist/components/primitives/baht-column-picker.d.ts +69 -0
  60. package/dist/components/primitives/baht-column-picker.js +234 -0
  61. package/dist/components/primitives/baht-comments.d.ts +38 -0
  62. package/dist/components/primitives/baht-comments.js +102 -0
  63. package/dist/components/primitives/baht-currency.d.ts +13 -0
  64. package/dist/components/primitives/baht-currency.js +69 -0
  65. package/dist/components/primitives/baht-datepicker.d.ts +77 -0
  66. package/dist/components/primitives/baht-datepicker.js +235 -0
  67. package/dist/components/primitives/baht-donut-chart.d.ts +24 -0
  68. package/dist/components/primitives/baht-donut-chart.js +88 -0
  69. package/dist/components/primitives/baht-edit-table.d.ts +45 -0
  70. package/dist/components/primitives/baht-edit-table.js +176 -0
  71. package/dist/components/primitives/baht-empty-state.d.ts +26 -0
  72. package/dist/components/primitives/baht-empty-state.js +51 -0
  73. package/dist/components/primitives/baht-error-state.d.ts +21 -0
  74. package/dist/components/primitives/baht-error-state.js +44 -0
  75. package/dist/components/primitives/baht-facts.d.ts +42 -0
  76. package/dist/components/primitives/baht-facts.js +49 -0
  77. package/dist/components/primitives/baht-fieldset.d.ts +19 -0
  78. package/dist/components/primitives/baht-fieldset.js +42 -0
  79. package/dist/components/primitives/baht-file.d.ts +27 -0
  80. package/dist/components/primitives/baht-file.js +158 -0
  81. package/dist/components/primitives/baht-filter-builder.d.ts +39 -0
  82. package/dist/components/primitives/baht-filter-builder.js +201 -0
  83. package/dist/components/primitives/baht-filter.d.ts +36 -0
  84. package/dist/components/primitives/baht-filter.js +64 -0
  85. package/dist/components/primitives/baht-heatmap.d.ts +49 -0
  86. package/dist/components/primitives/baht-heatmap.js +168 -0
  87. package/dist/components/primitives/baht-input.d.ts +10 -0
  88. package/dist/components/primitives/baht-input.js +44 -0
  89. package/dist/components/primitives/baht-keyvalue-editor.d.ts +28 -0
  90. package/dist/components/primitives/baht-keyvalue-editor.js +106 -0
  91. package/dist/components/primitives/baht-line-chart.d.ts +45 -0
  92. package/dist/components/primitives/baht-line-chart.js +183 -0
  93. package/dist/components/primitives/baht-link.d.ts +26 -0
  94. package/dist/components/primitives/baht-link.js +48 -0
  95. package/dist/components/primitives/baht-list.d.ts +29 -0
  96. package/dist/components/primitives/baht-list.js +79 -0
  97. package/dist/components/primitives/baht-loading-overlay.d.ts +15 -0
  98. package/dist/components/primitives/baht-loading-overlay.js +33 -0
  99. package/dist/components/primitives/baht-markdown-view.d.ts +17 -0
  100. package/dist/components/primitives/baht-markdown-view.js +39 -0
  101. package/dist/components/primitives/baht-markdown.d.ts +34 -0
  102. package/dist/components/primitives/baht-markdown.js +177 -0
  103. package/dist/components/primitives/baht-menu.d.ts +53 -0
  104. package/dist/components/primitives/baht-menu.js +100 -0
  105. package/dist/components/primitives/baht-meter.d.ts +67 -0
  106. package/dist/components/primitives/baht-meter.js +107 -0
  107. package/dist/components/primitives/baht-modal.d.ts +71 -0
  108. package/dist/components/primitives/baht-modal.js +164 -0
  109. package/dist/components/primitives/baht-multiselect.d.ts +8 -0
  110. package/dist/components/primitives/baht-multiselect.js +47 -0
  111. package/dist/components/primitives/baht-notification-bell.d.ts +54 -0
  112. package/dist/components/primitives/baht-notification-bell.js +143 -0
  113. package/dist/components/primitives/baht-number.d.ts +5 -0
  114. package/dist/components/primitives/baht-number.js +39 -0
  115. package/dist/components/primitives/baht-order-box.d.ts +24 -0
  116. package/dist/components/primitives/baht-order-box.js +50 -0
  117. package/dist/components/primitives/baht-otp.d.ts +49 -0
  118. package/dist/components/primitives/baht-otp.js +109 -0
  119. package/dist/components/primitives/baht-page-header.d.ts +43 -0
  120. package/dist/components/primitives/baht-page-header.js +78 -0
  121. package/dist/components/primitives/baht-pagination.d.ts +33 -0
  122. package/dist/components/primitives/baht-pagination.js +86 -0
  123. package/dist/components/primitives/baht-popover.d.ts +45 -0
  124. package/dist/components/primitives/baht-popover.js +112 -0
  125. package/dist/components/primitives/baht-progress-ring.d.ts +22 -0
  126. package/dist/components/primitives/baht-progress-ring.js +62 -0
  127. package/dist/components/primitives/baht-progress.d.ts +17 -0
  128. package/dist/components/primitives/baht-progress.js +48 -0
  129. package/dist/components/primitives/baht-radio.d.ts +7 -0
  130. package/dist/components/primitives/baht-radio.js +74 -0
  131. package/dist/components/primitives/baht-range.d.ts +38 -0
  132. package/dist/components/primitives/baht-range.js +88 -0
  133. package/dist/components/primitives/baht-rating.d.ts +40 -0
  134. package/dist/components/primitives/baht-rating.js +107 -0
  135. package/dist/components/primitives/baht-record-bar.d.ts +30 -0
  136. package/dist/components/primitives/baht-record-bar.js +60 -0
  137. package/dist/components/primitives/baht-reference-dialog.d.ts +87 -0
  138. package/dist/components/primitives/baht-reference-dialog.js +418 -0
  139. package/dist/components/primitives/baht-reference-picker.d.ts +110 -0
  140. package/dist/components/primitives/baht-reference-picker.js +321 -0
  141. package/dist/components/primitives/baht-repeater.d.ts +59 -0
  142. package/dist/components/primitives/baht-repeater.js +315 -0
  143. package/dist/components/primitives/baht-rule-builder.d.ts +24 -0
  144. package/dist/components/primitives/baht-rule-builder.js +177 -0
  145. package/dist/components/primitives/baht-saved-filters.d.ts +41 -0
  146. package/dist/components/primitives/baht-saved-filters.js +126 -0
  147. package/dist/components/primitives/baht-search.d.ts +34 -0
  148. package/dist/components/primitives/baht-search.js +71 -0
  149. package/dist/components/primitives/baht-section-header.d.ts +28 -0
  150. package/dist/components/primitives/baht-section-header.js +48 -0
  151. package/dist/components/primitives/baht-section.d.ts +23 -0
  152. package/dist/components/primitives/baht-section.js +49 -0
  153. package/dist/components/primitives/baht-select.d.ts +49 -0
  154. package/dist/components/primitives/baht-select.js +197 -0
  155. package/dist/components/primitives/baht-skeleton.d.ts +16 -0
  156. package/dist/components/primitives/baht-skeleton.js +37 -0
  157. package/dist/components/primitives/baht-sparkline.d.ts +23 -0
  158. package/dist/components/primitives/baht-sparkline.js +56 -0
  159. package/dist/components/primitives/baht-spinner.d.ts +13 -0
  160. package/dist/components/primitives/baht-spinner.js +30 -0
  161. package/dist/components/primitives/baht-split-button.d.ts +43 -0
  162. package/dist/components/primitives/baht-split-button.js +87 -0
  163. package/dist/components/primitives/baht-stat-chart.d.ts +14 -0
  164. package/dist/components/primitives/baht-stat-chart.js +38 -0
  165. package/dist/components/primitives/baht-stat.d.ts +56 -0
  166. package/dist/components/primitives/baht-stat.js +117 -0
  167. package/dist/components/primitives/baht-steps.d.ts +33 -0
  168. package/dist/components/primitives/baht-steps.js +60 -0
  169. package/dist/components/primitives/baht-swipe-row.d.ts +64 -0
  170. package/dist/components/primitives/baht-swipe-row.js +178 -0
  171. package/dist/components/primitives/baht-table.d.ts +315 -0
  172. package/dist/components/primitives/baht-table.js +640 -0
  173. package/dist/components/primitives/baht-tabs.d.ts +54 -0
  174. package/dist/components/primitives/baht-tabs.js +128 -0
  175. package/dist/components/primitives/baht-tags.d.ts +96 -0
  176. package/dist/components/primitives/baht-tags.js +323 -0
  177. package/dist/components/primitives/baht-text.d.ts +10 -0
  178. package/dist/components/primitives/baht-text.js +29 -0
  179. package/dist/components/primitives/baht-textarea.d.ts +5 -0
  180. package/dist/components/primitives/baht-textarea.js +40 -0
  181. package/dist/components/primitives/baht-theme-toggle.d.ts +44 -0
  182. package/dist/components/primitives/baht-theme-toggle.js +101 -0
  183. package/dist/components/primitives/baht-timeline.d.ts +21 -0
  184. package/dist/components/primitives/baht-timeline.js +42 -0
  185. package/dist/components/primitives/baht-toast.d.ts +29 -0
  186. package/dist/components/primitives/baht-toast.js +83 -0
  187. package/dist/components/primitives/baht-toggle.d.ts +6 -0
  188. package/dist/components/primitives/baht-toggle.js +42 -0
  189. package/dist/components/primitives/baht-tooltip.d.ts +34 -0
  190. package/dist/components/primitives/baht-tooltip.js +85 -0
  191. package/dist/components/primitives/baht-tree.d.ts +58 -0
  192. package/dist/components/primitives/baht-tree.js +159 -0
  193. package/dist/components/primitives/baht-typeahead.d.ts +92 -0
  194. package/dist/components/primitives/baht-typeahead.js +258 -0
  195. package/dist/components/primitives/baht-upload.d.ts +108 -0
  196. package/dist/components/primitives/baht-upload.js +325 -0
  197. package/dist/components/primitives/baht-wizard.d.ts +57 -0
  198. package/dist/components/primitives/baht-wizard.js +147 -0
  199. package/dist/components/primitives/charts.d.ts +134 -0
  200. package/dist/components/primitives/charts.js +184 -0
  201. package/dist/components/primitives/column-map.d.ts +56 -0
  202. package/dist/components/primitives/column-map.js +70 -0
  203. package/dist/components/primitives/control-icons.d.ts +2 -0
  204. package/dist/components/primitives/control-icons.js +40 -0
  205. package/dist/components/primitives/icons.d.ts +24 -0
  206. package/dist/components/primitives/icons.js +86 -0
  207. package/dist/components/primitives/illustrations.d.ts +21 -0
  208. package/dist/components/primitives/illustrations.js +78 -0
  209. package/dist/components/primitives/index.d.ts +89 -0
  210. package/dist/components/primitives/kbd.d.ts +6 -0
  211. package/dist/components/primitives/kbd.js +9 -0
  212. package/dist/components/primitives/listbox.d.ts +2 -0
  213. package/dist/components/primitives/listbox.js +7 -0
  214. package/dist/components/primitives/markdown-render.d.ts +9 -0
  215. package/dist/components/primitives/markdown-render.js +77 -0
  216. package/dist/components/primitives/rule-rows.d.ts +55 -0
  217. package/dist/components/primitives/rule-rows.js +75 -0
  218. package/dist/components/primitives/tag-map.d.ts +6 -0
  219. package/dist/components/primitives/tag-map.js +39 -0
  220. package/dist/components/reference-labels.d.ts +22 -0
  221. package/dist/components/reference-labels.js +29 -0
  222. package/dist/components/shortcuts.d.ts +7 -0
  223. package/dist/components/shortcuts.js +43 -0
  224. package/dist/css/components.css +7517 -0
  225. package/dist/css/datepicker.css +346 -0
  226. package/dist/css/tokens.css +679 -0
  227. package/dist/custom-elements.json +45172 -0
  228. package/dist/engine.d.ts +1 -0
  229. package/dist/engine.js +1 -0
  230. package/dist/hydrate.d.ts +9 -0
  231. package/dist/hydrate.js +46 -0
  232. package/dist/index.d.ts +7 -0
  233. package/dist/index.js +210 -0
  234. package/dist/overlay.d.ts +50 -0
  235. package/dist/overlay.js +140 -0
  236. package/dist/react.d.ts +557 -0
  237. package/dist/react.js +1 -0
  238. package/dist/register.d.ts +106 -0
  239. package/dist/register.js +99 -0
  240. package/dist/ssr.d.ts +16 -0
  241. package/dist/ssr.js +125 -0
  242. package/dist/tokens.css +8197 -0
  243. package/dist/vscode.css-custom-data.json +6 -0
  244. package/dist/vscode.html-custom-data.json +2261 -0
  245. package/dist/web-types.json +6523 -0
  246. package/package.json +157 -4
@@ -0,0 +1,99 @@
1
+ const r = {
2
+ "baht-accordion": () => import("./components/primitives/baht-accordion.js"),
3
+ "baht-tree": () => import("./components/primitives/baht-tree.js"),
4
+ "baht-calendar": () => import("./components/primitives/baht-calendar.js"),
5
+ "baht-alert": () => import("./components/primitives/baht-alert.js"),
6
+ "baht-app-shell": () => import("./components/primitives/baht-app-shell.js"),
7
+ "baht-approval-chain": () => import("./components/primitives/baht-approval-chain.js"),
8
+ "baht-avatar": () => import("./components/primitives/baht-avatar.js"),
9
+ "baht-badge": () => import("./components/primitives/baht-badge.js"),
10
+ "baht-bar-chart": () => import("./components/primitives/baht-bar-chart.js"),
11
+ "baht-breadcrumbs": () => import("./components/primitives/baht-breadcrumbs.js"),
12
+ "baht-button": () => import("./components/primitives/baht-button.js"),
13
+ "baht-card": () => import("./components/primitives/baht-card.js"),
14
+ "baht-catalog-card": () => import("./components/primitives/baht-catalog-card.js"),
15
+ "baht-checkbox": () => import("./components/primitives/baht-checkbox.js"),
16
+ "baht-code": () => import("./components/primitives/baht-code.js"),
17
+ "baht-comments": () => import("./components/primitives/baht-comments.js"),
18
+ "baht-currency": () => import("./components/primitives/baht-currency.js"),
19
+ "baht-datepicker": () => import("./components/primitives/baht-datepicker.js"),
20
+ "baht-donut-chart": () => import("./components/primitives/baht-donut-chart.js"),
21
+ "baht-edit-table": () => import("./components/primitives/baht-edit-table.js"),
22
+ "baht-empty-state": () => import("./components/primitives/baht-empty-state.js"),
23
+ "baht-error-state": () => import("./components/primitives/baht-error-state.js"),
24
+ "baht-fieldset": () => import("./components/primitives/baht-fieldset.js"),
25
+ "baht-file": () => import("./components/primitives/baht-file.js"),
26
+ "baht-filter": () => import("./components/primitives/baht-filter.js"),
27
+ "baht-filter-builder": () => import("./components/primitives/baht-filter-builder.js"),
28
+ "baht-form": () => import("./components/baht-form.js"),
29
+ "baht-heatmap": () => import("./components/primitives/baht-heatmap.js"),
30
+ "baht-input": () => import("./components/primitives/baht-input.js"),
31
+ "baht-keyvalue-editor": () => import("./components/primitives/baht-keyvalue-editor.js"),
32
+ "baht-line-chart": () => import("./components/primitives/baht-line-chart.js"),
33
+ "baht-link": () => import("./components/primitives/baht-link.js"),
34
+ "baht-list": () => import("./components/primitives/baht-list.js"),
35
+ "baht-loading-overlay": () => import("./components/primitives/baht-loading-overlay.js"),
36
+ "baht-menu": () => import("./components/primitives/baht-menu.js"),
37
+ "baht-meter": () => import("./components/primitives/baht-meter.js"),
38
+ "baht-modal": () => import("./components/primitives/baht-modal.js"),
39
+ "baht-multiselect": () => import("./components/primitives/baht-multiselect.js"),
40
+ "baht-notification-bell": () => import("./components/primitives/baht-notification-bell.js"),
41
+ "baht-number": () => import("./components/primitives/baht-number.js"),
42
+ "baht-order-box": () => import("./components/primitives/baht-order-box.js"),
43
+ "baht-otp": () => import("./components/primitives/baht-otp.js"),
44
+ "baht-page-header": () => import("./components/primitives/baht-page-header.js"),
45
+ "baht-section-header": () => import("./components/primitives/baht-section-header.js"),
46
+ "baht-facts": () => import("./components/primitives/baht-facts.js"),
47
+ "baht-choice-group": () => import("./components/primitives/baht-choice-group.js"),
48
+ "baht-search": () => import("./components/primitives/baht-search.js"),
49
+ "baht-pagination": () => import("./components/primitives/baht-pagination.js"),
50
+ "baht-popover": () => import("./components/primitives/baht-popover.js"),
51
+ "baht-progress": () => import("./components/primitives/baht-progress.js"),
52
+ "baht-progress-ring": () => import("./components/primitives/baht-progress-ring.js"),
53
+ "baht-radio": () => import("./components/primitives/baht-radio.js"),
54
+ "baht-range": () => import("./components/primitives/baht-range.js"),
55
+ "baht-markdown": () => import("./components/primitives/baht-markdown.js"),
56
+ "baht-markdown-view": () => import("./components/primitives/baht-markdown-view.js"),
57
+ "baht-rating": () => import("./components/primitives/baht-rating.js"),
58
+ "baht-record-bar": () => import("./components/primitives/baht-record-bar.js"),
59
+ "baht-column-picker": () => import("./components/primitives/baht-column-picker.js"),
60
+ "baht-saved-filters": () => import("./components/primitives/baht-saved-filters.js"),
61
+ "baht-reference-dialog": () => import("./components/primitives/baht-reference-dialog.js"),
62
+ "baht-reference-picker": () => import("./components/primitives/baht-reference-picker.js"),
63
+ "baht-repeater": () => import("./components/primitives/baht-repeater.js"),
64
+ "baht-rule-builder": () => import("./components/primitives/baht-rule-builder.js"),
65
+ "baht-section": () => import("./components/primitives/baht-section.js"),
66
+ "baht-select": () => import("./components/primitives/baht-select.js"),
67
+ "baht-skeleton": () => import("./components/primitives/baht-skeleton.js"),
68
+ "baht-sparkline": () => import("./components/primitives/baht-sparkline.js"),
69
+ "baht-spinner": () => import("./components/primitives/baht-spinner.js"),
70
+ "baht-split-button": () => import("./components/primitives/baht-split-button.js"),
71
+ "baht-stat": () => import("./components/primitives/baht-stat.js"),
72
+ "baht-stat-chart": () => import("./components/primitives/baht-stat-chart.js"),
73
+ "baht-steps": () => import("./components/primitives/baht-steps.js"),
74
+ "baht-swipe-row": () => import("./components/primitives/baht-swipe-row.js"),
75
+ "baht-table": () => import("./components/primitives/baht-table.js"),
76
+ "baht-tabs": () => import("./components/primitives/baht-tabs.js"),
77
+ "baht-tags": () => import("./components/primitives/baht-tags.js"),
78
+ "baht-text": () => import("./components/primitives/baht-text.js"),
79
+ "baht-textarea": () => import("./components/primitives/baht-textarea.js"),
80
+ "baht-theme-toggle": () => import("./components/primitives/baht-theme-toggle.js"),
81
+ "baht-timeline": () => import("./components/primitives/baht-timeline.js"),
82
+ "baht-toast": () => import("./components/primitives/baht-toast.js"),
83
+ "baht-toggle": () => import("./components/primitives/baht-toggle.js"),
84
+ "baht-tooltip": () => import("./components/primitives/baht-tooltip.js"),
85
+ "baht-typeahead": () => import("./components/primitives/baht-typeahead.js"),
86
+ "baht-upload": () => import("./components/primitives/baht-upload.js"),
87
+ "baht-wizard": () => import("./components/primitives/baht-wizard.js"),
88
+ "baht-workflow": () => import("./components/baht-workflow.js")
89
+ }, i = Object.keys(r);
90
+ async function p(a) {
91
+ const o = a.filter((t) => !Object.hasOwn(r, t));
92
+ if (o.length)
93
+ throw new Error(`registerElements: unknown tag(s) ${o.join(", ")}`);
94
+ await Promise.all(a.map((t) => r[t]()));
95
+ }
96
+ export {
97
+ i as ELEMENT_TAGS,
98
+ p as registerElements
99
+ };
package/dist/ssr.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ import { RenderInfo } from '@lit-labs/ssr';
2
+ export type { RenderInfo };
3
+ /**
4
+ * Move the declarative-shadow-root `<template>` that `@lit-labs/ssr` emits right after a
5
+ * light-DOM element's open tag into the element itself. Only elements whose tag passes
6
+ * `isLightDom` (default: every `baht-*`) are unwrapped; other custom elements keep their
7
+ * shadow roots. Nested templates are matched by depth, so composite elements
8
+ * (`<baht-form>` → `<baht-input>` …) unwrap all the way down.
9
+ */
10
+ export declare function unwrapLightDom(html: string, isLightDom?: (tag: string) => boolean): string;
11
+ /**
12
+ * Render a Lit template (or any Lit-renderable value) to an HTML string with every
13
+ * `baht-*` element rendered into its light DOM. `renderInfo` is forwarded to
14
+ * `@lit-labs/ssr`'s `render()` (e.g. `{ deferHydration: true }`).
15
+ */
16
+ export declare function renderToString(value: unknown, renderInfo?: Partial<RenderInfo>): Promise<string>;
package/dist/ssr.js ADDED
@@ -0,0 +1,125 @@
1
+ import { render as c } from "@lit-labs/ssr";
2
+ import { collectResult as d } from "@lit-labs/ssr/lib/render-result.js";
3
+ import "@20baht/engine";
4
+ import "./components/primitives/baht-button.js";
5
+ import "./components/primitives/icons.js";
6
+ import "./components/primitives/baht-badge.js";
7
+ import "./components/primitives/baht-avatar.js";
8
+ import "./components/primitives/baht-code.js";
9
+ import "./components/primitives/baht-table.js";
10
+ import "./components/primitives/baht-list.js";
11
+ import "./components/primitives/baht-pagination.js";
12
+ import "./components/primitives/baht-modal.js";
13
+ import "./components/primitives/baht-toast.js";
14
+ import "./components/primitives/baht-tooltip.js";
15
+ import "./components/primitives/baht-theme-toggle.js";
16
+ import "./components/primitives/baht-split-button.js";
17
+ import "./components/primitives/baht-menu.js";
18
+ import "./components/primitives/baht-tabs.js";
19
+ import "./components/primitives/baht-popover.js";
20
+ import "./components/primitives/baht-alert.js";
21
+ import "./components/primitives/baht-rating.js";
22
+ import "./components/primitives/baht-range.js";
23
+ import "./components/primitives/baht-otp.js";
24
+ import "./components/primitives/baht-filter.js";
25
+ import "./components/primitives/baht-swipe-row.js";
26
+ import "./components/primitives/baht-skeleton.js";
27
+ import "./components/primitives/baht-progress.js";
28
+ import "./components/primitives/baht-progress-ring.js";
29
+ import "./components/primitives/baht-spinner.js";
30
+ import "./components/primitives/baht-loading-overlay.js";
31
+ import "./components/primitives/baht-card.js";
32
+ import "./components/primitives/baht-fieldset.js";
33
+ import "./components/primitives/baht-timeline.js";
34
+ import "./components/primitives/baht-accordion.js";
35
+ import "./components/primitives/baht-tree.js";
36
+ import "./components/primitives/baht-calendar.js";
37
+ import "./components/primitives/baht-link.js";
38
+ import "./components/primitives/baht-breadcrumbs.js";
39
+ import "./components/primitives/baht-input.js";
40
+ import "./components/primitives/baht-textarea.js";
41
+ import "./components/primitives/baht-markdown.js";
42
+ import "./components/primitives/baht-markdown-view.js";
43
+ import "./components/primitives/baht-number.js";
44
+ import "./components/primitives/baht-currency.js";
45
+ import "./components/primitives/baht-select.js";
46
+ import "./components/primitives/baht-multiselect.js";
47
+ import "./components/primitives/baht-tags.js";
48
+ import "./components/primitives/baht-checkbox.js";
49
+ import "./components/primitives/baht-radio.js";
50
+ import "./components/primitives/baht-toggle.js";
51
+ import "./components/primitives/baht-datepicker.js";
52
+ import "./components/primitives/baht-file.js";
53
+ import "./components/primitives/baht-upload.js";
54
+ import "./components/primitives/baht-text.js";
55
+ import "./components/primitives/baht-section.js";
56
+ import "./components/primitives/baht-stat-chart.js";
57
+ import "./components/primitives/baht-stat.js";
58
+ import "./components/primitives/baht-sparkline.js";
59
+ import "./components/primitives/baht-donut-chart.js";
60
+ import "./components/primitives/baht-bar-chart.js";
61
+ import "./components/primitives/baht-line-chart.js";
62
+ import "./components/primitives/baht-heatmap.js";
63
+ import "./components/primitives/baht-meter.js";
64
+ import "./components/primitives/charts.js";
65
+ import "./components/primitives/baht-empty-state.js";
66
+ import "./components/primitives/baht-error-state.js";
67
+ import "./components/primitives/baht-keyvalue-editor.js";
68
+ import "./components/primitives/baht-reference-picker.js";
69
+ import "./components/primitives/baht-typeahead.js";
70
+ import "./components/primitives/baht-repeater.js";
71
+ import "./components/primitives/baht-steps.js";
72
+ import "lit/static-html.js";
73
+ import "./components/primitives/baht-comments.js";
74
+ import "./components/primitives/baht-edit-table.js";
75
+ import "./components/primitives/baht-notification-bell.js";
76
+ import "./components/primitives/baht-rule-builder.js";
77
+ import "./components/primitives/baht-app-shell.js";
78
+ import "./components/primitives/baht-approval-chain.js";
79
+ import "./components/primitives/baht-catalog-card.js";
80
+ import "./components/primitives/baht-filter-builder.js";
81
+ import "./components/primitives/baht-order-box.js";
82
+ import "./components/primitives/baht-page-header.js";
83
+ import "./components/primitives/baht-section-header.js";
84
+ import "./components/primitives/baht-facts.js";
85
+ import "./components/primitives/baht-choice-group.js";
86
+ import "./components/primitives/baht-search.js";
87
+ import "./components/primitives/baht-record-bar.js";
88
+ import "./components/primitives/baht-wizard.js";
89
+ import "./components/primitives/baht-reference-dialog.js";
90
+ import "./components/primitives/baht-column-picker.js";
91
+ import "./components/primitives/baht-saved-filters.js";
92
+ import "lit";
93
+ import "./components/primitives/illustrations.js";
94
+ import "./components/field-base.js";
95
+ import "./components/baht-form.js";
96
+ import "./components/baht-workflow.js";
97
+ const a = /<template shadowroot="(?:open|closed)" shadowrootmode="(?:open|closed)"[^>]*>|<template\b[^>]*>|<\/template>/g, u = (t) => t.startsWith("baht-");
98
+ function x(t, m = u) {
99
+ let i = "", r = 0;
100
+ const n = [];
101
+ a.lastIndex = 0;
102
+ let o;
103
+ for (; (o = a.exec(t)) !== null; ) {
104
+ const p = o[0];
105
+ if (p === "</template>") {
106
+ n.pop() && (i += t.slice(r, o.index), r = o.index + p.length);
107
+ continue;
108
+ }
109
+ let e = !1;
110
+ if (p.startsWith("<template shadowroot=")) {
111
+ const l = t.lastIndexOf("<", o.index - 1), s = /^<([a-zA-Z][\w-]*)(?:\s[^>]*)?>$/.exec(t.slice(l, o.index));
112
+ e = s !== null && m(s[1].toLowerCase());
113
+ }
114
+ n.push(e), e && (i += t.slice(r, o.index), r = o.index + p.length);
115
+ }
116
+ return i + t.slice(r);
117
+ }
118
+ async function ro(t, m) {
119
+ const i = await d(c(t, m));
120
+ return x(i);
121
+ }
122
+ export {
123
+ ro as renderToString,
124
+ x as unwrapLightDom
125
+ };