@deweb.id/ui-kit 0.0.0-stage → 0.1.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 (408) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +90 -2
  3. package/css/ui-kit.css +901 -0
  4. package/dist/chunk-028rzptn.js +253 -0
  5. package/dist/chunk-028rzptn.js.map +10 -0
  6. package/dist/chunk-0x0et52k.js +82 -0
  7. package/dist/chunk-0x0et52k.js.map +10 -0
  8. package/dist/chunk-17gmkyd1.js +195 -0
  9. package/dist/chunk-17gmkyd1.js.map +10 -0
  10. package/dist/chunk-19jsevr8.js +17 -0
  11. package/dist/chunk-19jsevr8.js.map +10 -0
  12. package/dist/chunk-1t1fbbme.js +171 -0
  13. package/dist/chunk-1t1fbbme.js.map +10 -0
  14. package/dist/chunk-26ban96z.js +151 -0
  15. package/dist/chunk-26ban96z.js.map +10 -0
  16. package/dist/chunk-39hey5ns.js +2034 -0
  17. package/dist/chunk-39hey5ns.js.map +19 -0
  18. package/dist/chunk-3f0bjycv.js +481 -0
  19. package/dist/chunk-3f0bjycv.js.map +10 -0
  20. package/dist/chunk-3zpf64v4.js +108 -0
  21. package/dist/chunk-3zpf64v4.js.map +10 -0
  22. package/dist/chunk-4jrq15v9.js +919 -0
  23. package/dist/chunk-4jrq15v9.js.map +10 -0
  24. package/dist/chunk-8dacesjp.js +289 -0
  25. package/dist/chunk-8dacesjp.js.map +10 -0
  26. package/dist/chunk-8een770x.js +2546 -0
  27. package/dist/chunk-8een770x.js.map +29 -0
  28. package/dist/chunk-8jv2g2ne.js +371 -0
  29. package/dist/chunk-8jv2g2ne.js.map +10 -0
  30. package/dist/chunk-abdqb4e5.js +156 -0
  31. package/dist/chunk-abdqb4e5.js.map +10 -0
  32. package/dist/chunk-af27xdf2.js +891 -0
  33. package/dist/chunk-af27xdf2.js.map +11 -0
  34. package/dist/chunk-amsyqyh9.js +23 -0
  35. package/dist/chunk-amsyqyh9.js.map +9 -0
  36. package/dist/chunk-czbcw9e1.js +503 -0
  37. package/dist/chunk-czbcw9e1.js.map +11 -0
  38. package/dist/chunk-dar8mz91.js +73 -0
  39. package/dist/chunk-dar8mz91.js.map +10 -0
  40. package/dist/chunk-dsddmmdk.js +136 -0
  41. package/dist/chunk-dsddmmdk.js.map +10 -0
  42. package/dist/chunk-edx7tas6.js +89 -0
  43. package/dist/chunk-edx7tas6.js.map +10 -0
  44. package/dist/chunk-es4tgmvr.js +1686 -0
  45. package/dist/chunk-es4tgmvr.js.map +12 -0
  46. package/dist/chunk-f2aqj672.js +240 -0
  47. package/dist/chunk-f2aqj672.js.map +11 -0
  48. package/dist/chunk-h6k57hyd.js +146 -0
  49. package/dist/chunk-h6k57hyd.js.map +10 -0
  50. package/dist/chunk-hkx78qgj.js +1548 -0
  51. package/dist/chunk-hkx78qgj.js.map +12 -0
  52. package/dist/chunk-hq57r97c.js +770 -0
  53. package/dist/chunk-hq57r97c.js.map +11 -0
  54. package/dist/chunk-jct2e2h1.js +139 -0
  55. package/dist/chunk-jct2e2h1.js.map +10 -0
  56. package/dist/chunk-je0j5sn4.js +246 -0
  57. package/dist/chunk-je0j5sn4.js.map +10 -0
  58. package/dist/chunk-k2b698v5.js +754 -0
  59. package/dist/chunk-k2b698v5.js.map +12 -0
  60. package/dist/chunk-kv58555q.js +267 -0
  61. package/dist/chunk-kv58555q.js.map +11 -0
  62. package/dist/chunk-m0msvrte.js +15 -0
  63. package/dist/chunk-m0msvrte.js.map +10 -0
  64. package/dist/chunk-m3t14v77.js +30 -0
  65. package/dist/chunk-m3t14v77.js.map +10 -0
  66. package/dist/chunk-mctp30cp.js +1466 -0
  67. package/dist/chunk-mctp30cp.js.map +10 -0
  68. package/dist/chunk-n37qb5m5.js +1408 -0
  69. package/dist/chunk-n37qb5m5.js.map +10 -0
  70. package/dist/chunk-nhhgsdt3.js +570 -0
  71. package/dist/chunk-nhhgsdt3.js.map +11 -0
  72. package/dist/chunk-pxydj130.js +28 -0
  73. package/dist/chunk-pxydj130.js.map +10 -0
  74. package/dist/chunk-qmbwp4k7.js +3275 -0
  75. package/dist/chunk-qmbwp4k7.js.map +13 -0
  76. package/dist/chunk-qzxf0aa2.js +149 -0
  77. package/dist/chunk-qzxf0aa2.js.map +10 -0
  78. package/dist/chunk-rbjyp9ff.js +47 -0
  79. package/dist/chunk-rbjyp9ff.js.map +10 -0
  80. package/dist/chunk-rbkc50xg.js +103 -0
  81. package/dist/chunk-rbkc50xg.js.map +10 -0
  82. package/dist/chunk-rn6f0s6x.js +66 -0
  83. package/dist/chunk-rn6f0s6x.js.map +9 -0
  84. package/dist/chunk-rswzbfa2.js +422 -0
  85. package/dist/chunk-rswzbfa2.js.map +10 -0
  86. package/dist/chunk-rzns0reg.js +157 -0
  87. package/dist/chunk-rzns0reg.js.map +10 -0
  88. package/dist/chunk-s851vtje.js +90 -0
  89. package/dist/chunk-s851vtje.js.map +10 -0
  90. package/dist/chunk-vak164kx.js +15 -0
  91. package/dist/chunk-vak164kx.js.map +9 -0
  92. package/dist/chunk-vpvnvegz.js +480 -0
  93. package/dist/chunk-vpvnvegz.js.map +10 -0
  94. package/dist/chunk-x4pk7vxm.js +10 -0
  95. package/dist/chunk-x4pk7vxm.js.map +10 -0
  96. package/dist/chunk-xd2fwgek.js +53 -0
  97. package/dist/chunk-xd2fwgek.js.map +10 -0
  98. package/dist/chunk-y71rd8qf.js +499 -0
  99. package/dist/chunk-y71rd8qf.js.map +10 -0
  100. package/dist/chunk-zjmt193s.js +34 -0
  101. package/dist/chunk-zjmt193s.js.map +9 -0
  102. package/dist/components/blocks/CustomHtmlBlock.d.ts +14 -0
  103. package/dist/components/blocks/LoginFormBlock.d.ts +16 -0
  104. package/dist/components/blocks/SidebarMenuBlock.d.ts +11 -0
  105. package/dist/components/blocks/SliderBlock.d.ts +13 -0
  106. package/dist/components/code/code-editor.d.ts +58 -0
  107. package/dist/components/code/code-preview.d.ts +18 -0
  108. package/dist/components/code/index.d.ts +4 -0
  109. package/dist/components/code/validator.d.ts +10 -0
  110. package/dist/components/code/vsc-themes.d.ts +6 -0
  111. package/dist/components/dashboard/compound/context.d.ts +14 -0
  112. package/dist/components/dashboard/compound/dashboard.d.ts +14 -0
  113. package/dist/components/dashboard/compound/index.d.ts +18 -0
  114. package/dist/components/dashboard/compound/main.d.ts +25 -0
  115. package/dist/components/dashboard/compound/sidebar.d.ts +5 -0
  116. package/dist/components/dashboard/dashboard-head-info.d.ts +38 -0
  117. package/dist/components/dashboard/dashboard-head.d.ts +19 -0
  118. package/dist/components/dashboard/dataview.d.ts +19 -0
  119. package/dist/components/dashboard/detailview.d.ts +1 -0
  120. package/dist/components/dashboard/formview.d.ts +265 -0
  121. package/dist/components/dashboard/pageformview.d.ts +79 -0
  122. package/dist/components/dashboard/styling/background-color-control.d.ts +34 -0
  123. package/dist/components/dashboard/styling/background-control.d.ts +45 -0
  124. package/dist/components/dashboard/styling/border-control.d.ts +14 -0
  125. package/dist/components/dashboard/styling/color-control.d.ts +22 -0
  126. package/dist/components/dashboard/styling/index.d.ts +7 -0
  127. package/dist/components/dashboard/styling/radius-control.d.ts +15 -0
  128. package/dist/components/dashboard/styling/spacing-control.d.ts +17 -0
  129. package/dist/components/dashboard/styling/types.d.ts +50 -0
  130. package/dist/components/document/index.d.ts +25 -0
  131. package/dist/components/ecommerce/commerce-cards.d.ts +37 -0
  132. package/dist/components/effect/action-animation.d.ts +14 -0
  133. package/dist/components/effect/element-animation.d.ts +41 -0
  134. package/dist/components/effect/page-transition.d.ts +10 -0
  135. package/dist/components/layout/BlockPalette.d.ts +14 -0
  136. package/dist/components/layout/DynamicLayout.d.ts +56 -0
  137. package/dist/components/layout/GridRow.d.ts +37 -0
  138. package/dist/components/layout/LayoutBuilder.d.ts +52 -0
  139. package/dist/components/layout/WidgetFieldsForm.d.ts +15 -0
  140. package/dist/components/ui/accordion.d.ts +36 -0
  141. package/dist/components/ui/action-bar.d.ts +46 -0
  142. package/dist/components/ui/alert.d.ts +25 -0
  143. package/dist/components/ui/animated.d.ts +41 -0
  144. package/dist/components/ui/app-shell.d.ts +53 -0
  145. package/dist/components/ui/avatar.d.ts +18 -0
  146. package/dist/components/ui/badge.d.ts +15 -0
  147. package/dist/components/ui/breadcrumb.d.ts +20 -0
  148. package/dist/components/ui/button-icon.d.ts +9 -0
  149. package/dist/components/ui/button.d.ts +37 -0
  150. package/dist/components/ui/calendar.d.ts +14 -0
  151. package/dist/components/ui/card-skeleton-aware.d.ts +2 -0
  152. package/dist/components/ui/card.d.ts +36 -0
  153. package/dist/components/ui/chart.d.ts +75 -0
  154. package/dist/components/ui/chat-bubble.d.ts +74 -0
  155. package/dist/components/ui/code.d.ts +85 -0
  156. package/dist/components/ui/code.js +21 -0
  157. package/dist/components/ui/code.js.map +9 -0
  158. package/dist/components/ui/collapsible.d.ts +25 -0
  159. package/dist/components/ui/control-group.d.ts +39 -0
  160. package/dist/components/ui/dashboard-grid/DashboardDropSlot.d.ts +10 -0
  161. package/dist/components/ui/dashboard-grid/DashboardGrid.d.ts +5 -0
  162. package/dist/components/ui/dashboard-grid/DashboardWidgetCard.d.ts +43 -0
  163. package/dist/components/ui/dashboard-grid/useDashboardDnd.d.ts +36 -0
  164. package/dist/components/ui/data-empty.d.ts +24 -0
  165. package/dist/components/ui/data-list.d.ts +16 -0
  166. package/dist/components/ui/data-table.d.ts +48 -0
  167. package/dist/components/ui/data-view/DataView.d.ts +46 -0
  168. package/dist/components/ui/data-view/DataViewCalendar.d.ts +18 -0
  169. package/dist/components/ui/data-view/DataViewContent.d.ts +5 -0
  170. package/dist/components/ui/data-view/DataViewFilter.d.ts +8 -0
  171. package/dist/components/ui/data-view/DataViewGrid.d.ts +32 -0
  172. package/dist/components/ui/data-view/DataViewHeader.d.ts +22 -0
  173. package/dist/components/ui/data-view/DataViewKanban.d.ts +16 -0
  174. package/dist/components/ui/data-view/DataViewPivot.d.ts +15 -0
  175. package/dist/components/ui/data-view/DataViewTable.d.ts +33 -0
  176. package/dist/components/ui/data-view/index.d.ts +9 -0
  177. package/dist/components/ui/date-time-picker.d.ts +205 -0
  178. package/dist/components/ui/drawer.d.ts +71 -0
  179. package/dist/components/ui/dropdown-animation.d.ts +7 -0
  180. package/dist/components/ui/dropdown.d.ts +71 -0
  181. package/dist/components/ui/error-state.d.ts +15 -0
  182. package/dist/components/ui/filter-bar.d.ts +50 -0
  183. package/dist/components/ui/filter-bar.js +19 -0
  184. package/dist/components/ui/filter-bar.js.map +9 -0
  185. package/dist/components/ui/font.d.ts +24 -0
  186. package/dist/components/ui/form-advanced.d.ts +198 -0
  187. package/dist/components/ui/form-compound.d.ts +58 -0
  188. package/dist/components/ui/form-context.d.ts +19 -0
  189. package/dist/components/ui/form.d.ts +451 -0
  190. package/dist/components/ui/format-currency.d.ts +10 -0
  191. package/dist/components/ui/format-date.d.ts +28 -0
  192. package/dist/components/ui/format-number.d.ts +22 -0
  193. package/dist/components/ui/format-time.d.ts +5 -0
  194. package/dist/components/ui/grid.d.ts +30 -0
  195. package/dist/components/ui/heading.d.ts +9 -0
  196. package/dist/components/ui/indicator.d.ts +17 -0
  197. package/dist/components/ui/initial-icon.d.ts +11 -0
  198. package/dist/components/ui/input-code.d.ts +27 -0
  199. package/dist/components/ui/input-grid.d.ts +54 -0
  200. package/dist/components/ui/input.d.ts +37 -0
  201. package/dist/components/ui/invoice-blocks.d.ts +124 -0
  202. package/dist/components/ui/invoice-document.d.ts +63 -0
  203. package/dist/components/ui/kanban.d.ts +16 -0
  204. package/dist/components/ui/label.d.ts +4 -0
  205. package/dist/components/ui/lazy-load.d.ts +13 -0
  206. package/dist/components/ui/lightbox.d.ts +15 -0
  207. package/dist/components/ui/list.d.ts +33 -0
  208. package/dist/components/ui/loading.d.ts +79 -0
  209. package/dist/components/ui/media-card.d.ts +50 -0
  210. package/dist/components/ui/media-player.d.ts +47 -0
  211. package/dist/components/ui/menu.d.ts +24 -0
  212. package/dist/components/ui/modal.d.ts +233 -0
  213. package/dist/components/ui/page.d.ts +51 -0
  214. package/dist/components/ui/pagination.d.ts +16 -0
  215. package/dist/components/ui/print.d.ts +173 -0
  216. package/dist/components/ui/project-card.d.ts +43 -0
  217. package/dist/components/ui/radius-control.d.ts +36 -0
  218. package/dist/components/ui/rich-text-editor.d.ts +32 -0
  219. package/dist/components/ui/select-card.d.ts +56 -0
  220. package/dist/components/ui/sidebar-logo.d.ts +11 -0
  221. package/dist/components/ui/sidebar-menu.d.ts +82 -0
  222. package/dist/components/ui/sidebar-search.d.ts +7 -0
  223. package/dist/components/ui/skeletons.d.ts +46 -0
  224. package/dist/components/ui/surface.d.ts +13 -0
  225. package/dist/components/ui/table-pivot.d.ts +10 -0
  226. package/dist/components/ui/table.d.ts +258 -0
  227. package/dist/components/ui/tabs.d.ts +79 -0
  228. package/dist/components/ui/task-board.d.ts +29 -0
  229. package/dist/components/ui/terminal.d.ts +51 -0
  230. package/dist/components/ui/text-sensor.d.ts +9 -0
  231. package/dist/components/ui/theme-styler.d.ts +3 -0
  232. package/dist/components/ui/theme-toggle.d.ts +23 -0
  233. package/dist/components/ui/tooltip.d.ts +11 -0
  234. package/dist/components/website/account-banner.d.ts +11 -0
  235. package/dist/components/website/account-layout.d.ts +20 -0
  236. package/dist/components/website/account.d.ts +46 -0
  237. package/dist/components/website/ambient.d.ts +19 -0
  238. package/dist/components/website/auth.d.ts +35 -0
  239. package/dist/components/website/blog/blog-list-custom.d.ts +3 -0
  240. package/dist/components/website/blog/blog-list-gallery.d.ts +2 -0
  241. package/dist/components/website/blog/blog-list-grid.d.ts +2 -0
  242. package/dist/components/website/blog/blog-list-list.d.ts +2 -0
  243. package/dist/components/website/blog.d.ts +50 -0
  244. package/dist/components/website/carousel.d.ts +58 -0
  245. package/dist/components/website/cart.d.ts +31 -0
  246. package/dist/components/website/catalogue-view.d.ts +81 -0
  247. package/dist/components/website/catalogue.d.ts +96 -0
  248. package/dist/components/website/comment.d.ts +52 -0
  249. package/dist/components/website/eclipse.d.ts +15 -0
  250. package/dist/components/website/feature-grid.d.ts +58 -0
  251. package/dist/components/website/filter.d.ts +109 -0
  252. package/dist/components/website/hero.d.ts +89 -0
  253. package/dist/components/website/localize.d.ts +36 -0
  254. package/dist/components/website/logo.d.ts +24 -0
  255. package/dist/components/website/megamenu.d.ts +10 -0
  256. package/dist/components/website/navbar.d.ts +42 -0
  257. package/dist/components/website/notification.d.ts +58 -0
  258. package/dist/components/website/price.d.ts +26 -0
  259. package/dist/components/website/pricing.d.ts +21 -0
  260. package/dist/components/website/product.d.ts +32 -0
  261. package/dist/components/website/rating.d.ts +36 -0
  262. package/dist/components/website/review-form.d.ts +54 -0
  263. package/dist/components/website/reviews.d.ts +119 -0
  264. package/dist/components/website/search.d.ts +30 -0
  265. package/dist/entries/accordion.d.ts +1 -0
  266. package/dist/entries/accordion.js +9 -0
  267. package/dist/entries/accordion.js.map +9 -0
  268. package/dist/entries/alert.d.ts +1 -0
  269. package/dist/entries/alert.js +10 -0
  270. package/dist/entries/alert.js.map +9 -0
  271. package/dist/entries/badge.d.ts +1 -0
  272. package/dist/entries/badge.js +11 -0
  273. package/dist/entries/badge.js.map +9 -0
  274. package/dist/entries/breadcrumb.d.ts +1 -0
  275. package/dist/entries/breadcrumb.js +10 -0
  276. package/dist/entries/breadcrumb.js.map +9 -0
  277. package/dist/entries/button.d.ts +1 -0
  278. package/dist/entries/button.js +12 -0
  279. package/dist/entries/button.js.map +9 -0
  280. package/dist/entries/card.d.ts +1 -0
  281. package/dist/entries/card.js +25 -0
  282. package/dist/entries/card.js.map +9 -0
  283. package/dist/entries/chart.d.ts +1 -0
  284. package/dist/entries/chart.js +130 -0
  285. package/dist/entries/chart.js.map +10 -0
  286. package/dist/entries/components.d.ts +53 -0
  287. package/dist/entries/components.js +643 -0
  288. package/dist/entries/components.js.map +9 -0
  289. package/dist/entries/dashboard/dataview.d.ts +1 -0
  290. package/dist/entries/dashboard/dataview.js +82 -0
  291. package/dist/entries/dashboard/dataview.js.map +10 -0
  292. package/dist/entries/dashboard/pageformview.d.ts +1 -0
  293. package/dist/entries/dashboard/pageformview.js +34 -0
  294. package/dist/entries/dashboard/pageformview.js.map +9 -0
  295. package/dist/entries/data-table.d.ts +1 -0
  296. package/dist/entries/data-table.js +22 -0
  297. package/dist/entries/data-table.js.map +9 -0
  298. package/dist/entries/date-time-picker.d.ts +1 -0
  299. package/dist/entries/date-time-picker.js +28 -0
  300. package/dist/entries/date-time-picker.js.map +9 -0
  301. package/dist/entries/document.d.ts +1 -0
  302. package/dist/entries/document.js +69 -0
  303. package/dist/entries/document.js.map +10 -0
  304. package/dist/entries/drawer.d.ts +1 -0
  305. package/dist/entries/drawer.js +20 -0
  306. package/dist/entries/drawer.js.map +9 -0
  307. package/dist/entries/dropdown.d.ts +1 -0
  308. package/dist/entries/dropdown.js +29 -0
  309. package/dist/entries/dropdown.js.map +9 -0
  310. package/dist/entries/error-state.d.ts +1 -0
  311. package/dist/entries/error-state.js +14 -0
  312. package/dist/entries/error-state.js.map +9 -0
  313. package/dist/entries/favorite-button.d.ts +1 -0
  314. package/dist/entries/favorite-button.js +7 -0
  315. package/dist/entries/favorite-button.js.map +10 -0
  316. package/dist/entries/font.d.ts +1 -0
  317. package/dist/entries/font.js +10 -0
  318. package/dist/entries/font.js.map +9 -0
  319. package/dist/entries/form-advanced.d.ts +1 -0
  320. package/dist/entries/form-advanced.js +39 -0
  321. package/dist/entries/form-advanced.js.map +9 -0
  322. package/dist/entries/form.d.ts +1 -0
  323. package/dist/entries/form.js +74 -0
  324. package/dist/entries/form.js.map +9 -0
  325. package/dist/entries/heading.d.ts +1 -0
  326. package/dist/entries/heading.js +8 -0
  327. package/dist/entries/heading.js.map +9 -0
  328. package/dist/entries/input.d.ts +1 -0
  329. package/dist/entries/input.js +11 -0
  330. package/dist/entries/input.js.map +9 -0
  331. package/dist/entries/layout.d.ts +4 -0
  332. package/dist/entries/layout.js +101 -0
  333. package/dist/entries/layout.js.map +9 -0
  334. package/dist/entries/lazy-load.d.ts +1 -0
  335. package/dist/entries/lazy-load.js +9 -0
  336. package/dist/entries/lazy-load.js.map +9 -0
  337. package/dist/entries/list.d.ts +1 -0
  338. package/dist/entries/list.js +13 -0
  339. package/dist/entries/list.js.map +9 -0
  340. package/dist/entries/loading.d.ts +1 -0
  341. package/dist/entries/loading.js +18 -0
  342. package/dist/entries/loading.js.map +9 -0
  343. package/dist/entries/menu.d.ts +1 -0
  344. package/dist/entries/menu.js +17 -0
  345. package/dist/entries/menu.js.map +9 -0
  346. package/dist/entries/modal.d.ts +1 -0
  347. package/dist/entries/modal.js +33 -0
  348. package/dist/entries/modal.js.map +9 -0
  349. package/dist/entries/product.d.ts +2 -0
  350. package/dist/entries/product.js +10 -0
  351. package/dist/entries/product.js.map +9 -0
  352. package/dist/entries/select-card.d.ts +1 -0
  353. package/dist/entries/select-card.js +13 -0
  354. package/dist/entries/select-card.js.map +9 -0
  355. package/dist/entries/skeletons.d.ts +1 -0
  356. package/dist/entries/skeletons.js +35 -0
  357. package/dist/entries/skeletons.js.map +9 -0
  358. package/dist/entries/surface.d.ts +1 -0
  359. package/dist/entries/surface.js +10 -0
  360. package/dist/entries/surface.js.map +9 -0
  361. package/dist/entries/table.d.ts +1 -0
  362. package/dist/entries/table.js +65 -0
  363. package/dist/entries/table.js.map +9 -0
  364. package/dist/entries/tabs.d.ts +1 -0
  365. package/dist/entries/tabs.js +20 -0
  366. package/dist/entries/tabs.js.map +9 -0
  367. package/dist/entries/theme-styler.d.ts +1 -0
  368. package/dist/entries/theme-styler.js +26 -0
  369. package/dist/entries/theme-styler.js.map +9 -0
  370. package/dist/entries/toast.d.ts +1 -0
  371. package/dist/entries/toast.js +13 -0
  372. package/dist/entries/toast.js.map +9 -0
  373. package/dist/index.d.ts +163 -0
  374. package/dist/index.js +19864 -0
  375. package/dist/index.js.map +92 -0
  376. package/dist/lib/color/className.d.ts +14 -0
  377. package/dist/lib/color/config.d.ts +82 -0
  378. package/dist/lib/color/engine.d.ts +221 -0
  379. package/dist/lib/color/generator.d.ts +45 -0
  380. package/dist/lib/color/index.d.ts +5 -0
  381. package/dist/lib/color/safelist.d.ts +1 -0
  382. package/dist/lib/color/types.d.ts +12 -0
  383. package/dist/lib/font/config.d.ts +13 -0
  384. package/dist/lib/font/engine.d.ts +77 -0
  385. package/dist/lib/font/index.d.ts +3 -0
  386. package/dist/lib/font/types.d.ts +27 -0
  387. package/dist/lib/icon/config.d.ts +37 -0
  388. package/dist/lib/icon/engine.d.ts +84 -0
  389. package/dist/lib/icon/index.d.ts +3 -0
  390. package/dist/lib/icon/presets.d.ts +71 -0
  391. package/dist/lib/layout/config.d.ts +7 -0
  392. package/dist/lib/layout/engine.d.ts +224 -0
  393. package/dist/lib/layout/types.d.ts +151 -0
  394. package/dist/lib/layout/useActiveBreakpoint.d.ts +14 -0
  395. package/dist/lib/layout/useBlockDrag.d.ts +47 -0
  396. package/dist/lib/layout/useSectionDrag.d.ts +30 -0
  397. package/dist/lib/layout/useSpanResize.d.ts +31 -0
  398. package/dist/lib/localize/data.d.ts +9 -0
  399. package/dist/lib/product-utils.d.ts +7 -0
  400. package/dist/lib/sanitize/sanitizeHtml.d.ts +52 -0
  401. package/dist/lib/theme/motion.d.ts +27 -0
  402. package/dist/lib/theme/motion.js +12 -0
  403. package/dist/lib/theme/motion.js.map +9 -0
  404. package/dist/lib/theme/types.d.ts +133 -0
  405. package/dist/lib/useUndoRedo.d.ts +21 -0
  406. package/dist/lib/utils.d.ts +2 -0
  407. package/dist/types/product.d.ts +27 -0
  408. package/package.json +442 -4
@@ -0,0 +1,71 @@
1
+ import type { IconComponent } from './config';
2
+ export declare const lucidePreset: Record<string, IconComponent>;
3
+ /**
4
+ * Heroicons (24/outline) -- TEMPLATE, bukan preset yang otomatis jalan. Package
5
+ * `@heroicons/react` HARUS di-install di project consumer sendiri (`pnpm add
6
+ * @heroicons/react`) sebelum blok import di bawah bisa resolve. Uncomment lalu sesuaikan
7
+ * sebelum dipakai:
8
+ *
9
+ * ```ts
10
+ * import {
11
+ * EnvelopeIcon,
12
+ * LinkIcon,
13
+ * LockClosedIcon,
14
+ * HashtagIcon,
15
+ * LanguageIcon,
16
+ * SwatchIcon,
17
+ * ChevronLeftIcon,
18
+ * ChevronRightIcon,
19
+ * ChevronUpIcon,
20
+ * ChevronDownIcon,
21
+ * PlusIcon,
22
+ * MinusIcon,
23
+ * XMarkIcon,
24
+ * CheckIcon,
25
+ * MagnifyingGlassIcon,
26
+ * EllipsisHorizontalIcon,
27
+ * CheckCircleIcon,
28
+ * XCircleIcon,
29
+ * ExclamationTriangleIcon,
30
+ * InformationCircleIcon,
31
+ * } from '@heroicons/react/24/outline'
32
+ * import type { IconComponent } from '@deweb/ui-kit'
33
+ *
34
+ * export const heroiconsOutlinePreset: Record<string, IconComponent> = {
35
+ * mail: EnvelopeIcon,
36
+ * link: LinkIcon,
37
+ * lock: LockClosedIcon,
38
+ * hash: HashtagIcon,
39
+ * text: LanguageIcon,
40
+ * color: SwatchIcon,
41
+ * chevronLeft: ChevronLeftIcon,
42
+ * chevronRight: ChevronRightIcon,
43
+ * chevronUp: ChevronUpIcon,
44
+ * chevronDown: ChevronDownIcon,
45
+ * plus: PlusIcon,
46
+ * minus: MinusIcon,
47
+ * close: XMarkIcon,
48
+ * check: CheckIcon,
49
+ * search: MagnifyingGlassIcon,
50
+ * moreHorizontal: EllipsisHorizontalIcon,
51
+ * statusSuccess: CheckCircleIcon,
52
+ * statusError: XCircleIcon,
53
+ * statusWarning: ExclamationTriangleIcon,
54
+ * statusInfo: InformationCircleIcon,
55
+ * }
56
+ * ```
57
+ *
58
+ * Font Awesome (react-fontawesome) beda API -- komponennya butuh prop `icon` (bukan
59
+ * langsung dirender polos), jadi tidak plug-and-play sebagai IconComponent. Perlu wrapper
60
+ * tipis dulu, contoh:
61
+ * ```ts
62
+ * import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
63
+ * import { faEnvelope } from '@fortawesome/free-solid-svg-icons'
64
+ * import type { IconComponent } from '@deweb/ui-kit'
65
+ *
66
+ * const FaMail: IconComponent = ({ size, className }) => (
67
+ * <FontAwesomeIcon icon={faEnvelope} style={{ fontSize: size }} className={className} />
68
+ * )
69
+ * // lalu masukkan FaMail dkk ke object preset seperti contoh Heroicons di atas.
70
+ * ```
71
+ */
@@ -0,0 +1,7 @@
1
+ import type { BlockDefinition, LayoutSchema, LayoutSettings } from './types';
2
+ /** Global Layout Settings default -- max site width, content spacing, dst. */
3
+ export declare const DEFAULT_LAYOUT_SETTINGS: LayoutSettings;
4
+ /** Block registry default -- sumber data (nama/type/componentKey/html) yang dibaca dari config/layout.json. */
5
+ export declare const DEFAULT_BLOCKS: Record<string, BlockDefinition>;
6
+ /** Preset layout default -- tiap key adalah nama preset (default/homepage/blog, dst). */
7
+ export declare const DEFAULT_LAYOUT_PRESETS: Record<string, LayoutSchema>;
@@ -0,0 +1,224 @@
1
+ /**
2
+ * Layout engine -- SATU sumber kebenaran untuk struktur halaman di seluruh @deweb/ui-kit,
3
+ * mirroring pola lib/color/ (state module-level + export/import config) dan lib/icon/
4
+ * (component registry via setXxxLibrary, resolve by-key) tapi untuk tata letak.
5
+ *
6
+ * TIGA LAPIS (2026-08-03, mirip Color: Base -> Theme -> Component, tapi arahnya terbalik --
7
+ * di sini mulai dari unit terkecil ke terbesar):
8
+ * 1) BLOCK -- unit atom, isinya komponen React terdaftar (`type: 'component'`) ATAU HTML
9
+ * mentah (`type: 'html'`, untuk blank/custom block tanpa registrasi). Komponen didaftarkan
10
+ * programatik lewat setBlockComponents() (persis setIconLibrary()), definisi block (nama/
11
+ * type/componentKey/html) adalah DATA terpisah dari komponennya sendiri -- disimpan di
12
+ * `blocks` state, bisa di-custom lewat setBlocks() sama seperti setColorPalette().
13
+ * 2) GRID -- span/order/align per LayoutItem, RESPONSIVE per-breakpoint (base/sm/md/lg/xl,
14
+ * mobile-first cascade seperti Tailwind). resolveResponsive() jalan mirip resolveBaseHex()
15
+ * di color engine tapi utk breakpoint, bukan warna.
16
+ * 3) CONTAINER -- lebar Zone (wrapper/full-width/custom), juga responsive per-breakpoint.
17
+ *
18
+ * LAYOUT (LayoutSchema) menyusun ketiganya ke Zone (top/main/bottom/offcanvas) -- inilah
19
+ * PRESET, disimpan/dipulihkan lewat exportLayoutConfig()/importLayoutConfig() persis seperti
20
+ * exportColorConfig()/importColorConfig(). registerLayoutPreset() menambah preset baru ke
21
+ * memory runtime -- consumer (UI admin "Simpan sebagai Preset") yang bertanggung jawab
22
+ * persist ke file/database, sama filosofi yang didokumentasikan di color engine.
23
+ *
24
+ * Tailwind v4 TIDAK bisa scan className yang dirakit dari string interpolation murni --
25
+ * makanya gridClassNames()/containerClassNames() WAJIB pakai lookup table statis (semua
26
+ * kombinasi span x breakpoint sebagai literal string), BUKAN template string `${bp}:col-span-${n}`.
27
+ * Lihat catatan @source di DEWEB_UI_KIT.md -- bug yang sama persis pernah terjadi utk CSS
28
+ * @deweb/ui-kit di production build.
29
+ */
30
+ import type * as React from 'react';
31
+ import type { BlockDefinition, Breakpoint, ContainerConfig, GridConfig, LayoutSchema, LayoutSection, LayoutSettings, Responsive, ZoneKey } from './types';
32
+ export declare function getLayoutSettings(): LayoutSettings;
33
+ export declare function setLayoutSettings(overrides: Partial<LayoutSettings>): void;
34
+ export declare function resetLayoutSettings(): void;
35
+ export type BlockComponent = React.ComponentType<Record<string, unknown>>;
36
+ /** Tipe kontrol form utk 1 field -- menentukan input apa yang dirender Block Manager utk
37
+ * field ini. `color` pakai InputColor (components/ui/form.tsx, sudah ada -- hex + native
38
+ * color-picker), `image` text URL + preview thumbnail (BUKAN upload file -- kebanyakan
39
+ * Widget CMS ambil gambar yang sudah ada di storage/CDN, bukan upload baru; kalau nanti
40
+ * butuh upload sungguhan, itu perlu endpoint terpisah, belum ada di skema ini). Pola sama
41
+ * seperti Puck `ComponentConfig.fields` / Builder.io `inputs[]` / Shopify section
42
+ * `{% schema %}` settings -- lihat DEWEB_UI_KIT.md § Modular Exports & § Block Registry
43
+ * utk riset pembanding. */
44
+ export type WidgetFieldType = 'text' | 'number' | 'checkbox' | 'select' | 'color' | 'image';
45
+ export interface WidgetFieldSchema {
46
+ type: WidgetFieldType;
47
+ label: string;
48
+ /** Wajib -- dipakai sbg fallback SAAT USER BELUM PERNAH override field ini utk instance
49
+ * tsb (beda dari BlockComponentEntry.defaultProps yg 1 nilai global dipakai SEMUA instance
50
+ * -- fields[key].default cuma dipakai kalau LayoutItem.settings belum punya override). */
51
+ default: unknown;
52
+ /** Wajib kalau type: 'select'. */
53
+ options?: {
54
+ label: string;
55
+ value: string;
56
+ }[];
57
+ /** Tampilkan error "wajib diisi" di WidgetFieldsForm kalau nilai efektif (settings[key]
58
+ * ?? default) kosong -- STRING kosong/whitespace ATAU null/undefined dianggap kosong,
59
+ * angka 0/boolean false TIDAK (nilai valid, bukan "kosong"). */
60
+ required?: boolean;
61
+ }
62
+ /** Entri registrasi lengkap -- component + defaultProps opsional, dipakai saat live preview
63
+ * (Block Manager) atau render final (DynamicLayout) supaya component dengan props WAJIB
64
+ * (mis. LoginFormBlock butuh `action`) tetap aman di-instantiate tanpa crash. Pola sama
65
+ * seperti block.json `attributes.default` di Gutenberg / `defaultProps` di Puck --
66
+ * required-ness diselesaikan lewat "selalu ada default", bukan "cuma boleh daftar component
67
+ * zero-props". `component: any` (bukan BlockComponent) SENGAJA -- component dgn shape props
68
+ * spesifik (mis. `{ action: string }`) tidak assignable ke `Record<string, unknown>` generik,
69
+ * registry ini menyimpan campuran banyak component beda shape props jadi butuh longgar di
70
+ * titik registrasi; runtime tetap aman karena defaultProps WAJIB mengisi semua prop wajib. */
71
+ export interface BlockComponentEntry {
72
+ component: React.ComponentType<any>;
73
+ defaultProps?: Record<string, unknown>;
74
+ /** Skema field opsional -- kalau diisi, Block Manager & Layout Builder otomatis me-render
75
+ * form edit props PER-INSTANCE (bukan cuma defaultProps global). Key HARUS cocok dgn nama
76
+ * prop component-nya (mis. { action: {...} } utk LoginFormBlock yg punya prop `action`). */
77
+ fields?: Record<string, WidgetFieldSchema>;
78
+ }
79
+ /** Daftarkan komponen React sungguhan per key -- dipanggil sekali di entry point (App.tsx),
80
+ * sama pola dengan setIconLibrary(). Key ini yang dirujuk BlockDefinition.componentKey.
81
+ * Terima 2 bentuk value per key: component polos (shortcut utk component zero-props, sama
82
+ * seperti sebelumnya) ATAU { component, defaultProps } utk component yang butuh props. */
83
+ export declare function setBlockComponents(overrides: Record<string, BlockComponent | BlockComponentEntry>): void;
84
+ export declare function getBlockComponent(key: string): BlockComponent | undefined;
85
+ /** defaultProps yang didaftarkan bareng component (kalau ada) -- disuntikkan saat render
86
+ * `<Component {...defaultProps} />` supaya component ber-props-wajib tidak crash saat
87
+ * di-instantiate tanpa konfigurasi user (live preview Block Manager / grid item baru). */
88
+ export declare function getBlockDefaultProps(key: string): Record<string, unknown>;
89
+ /** Skema field yg didaftarkan bareng component (kalau ada) -- dipakai Block Manager utk
90
+ * auto-generate form edit props per-instance. `{}` kalau Widget ini tidak punya fields
91
+ * (fallback ke defaultProps statis seperti sebelumnya, tidak ada form). */
92
+ export declare function getBlockFields(key: string): Record<string, WidgetFieldSchema>;
93
+ /** Semua componentKey yang sudah terdaftar -- dipakai Block Manager utk mengisi dropdown
94
+ * pemilihan component (bukan text input bebas, supaya tidak ada typo/key yang belum ada). */
95
+ export declare function getRegisteredBlockComponentKeys(): string[];
96
+ export declare function resetBlockComponents(): void;
97
+ export declare function setBlocks(overrides: Record<string, BlockDefinition>): void;
98
+ export declare function getBlocks(): Record<string, BlockDefinition>;
99
+ export declare function resetBlocks(): void;
100
+ /** Hapus 1 block dari registry data -- TIDAK cascade ke LayoutItem yang masih mereferensikan
101
+ * key ini (DynamicLayout sudah punya fallback "Block Not Found" utk blockId menggantung). */
102
+ export declare function removeBlock(key: string): void;
103
+ /** Resolve nilai Responsive<T> pada breakpoint target -- ambil nilai eksplisit tertinggi
104
+ * yang <= target (mobile-first), fallback ke base kalau tidak ada override di antaranya.
105
+ *
106
+ * BUG (ditemukan 2026-08-03): versi lama `if (candidate === 'base') continue` LALU cek
107
+ * `if (candidate === bp) break` di iterasi SETELAHNYA -- kalau `bp === 'base'`, syarat
108
+ * break itu TIDAK PERNAH match (karena `candidate` sudah di-skip lewat 'base' dan tidak
109
+ * kembali lagi), jadi loop lanjut proses SEMUA breakpoint lain (sm/md/lg/xl) walau yang
110
+ * diminta cuma 'base' -- override di breakpoint manapun yang lebih besar (mis. 'lg')
111
+ * ikut "bocor" ke hasil resolve 'base', padahal arahnya harusnya kebalik (base yang
112
+ * diwarisi ke atas, bukan sebaliknya). User report konkret: toggle hide Block di
113
+ * breakpoint Desktop (lg) bikin Block itu ikut ke-hide juga saat cek di breakpoint
114
+ * Mobile (base). Fix: early-return kalau `bp === 'base'` (tidak ada breakpoint di
115
+ * bawahnya utk dicek), baru lanjut loop normal utk breakpoint lain. */
116
+ export declare function resolveResponsive<T>(value: Responsive<T>, bp: Breakpoint): T;
117
+ /** Zone AKTIF tempat 1 Section dirender di breakpoint tertentu. 2 FLAG SEDERHANA
118
+ * independen (bukan cascade, lihat catatan panjang di LayoutSection.
119
+ * offcanvasOnMobile kenapa versi cascade sebelumnya bug/membingungkan) --
120
+ * `offcanvasOnMobile` cuma berlaku KHUSUS breakpoint 'base' (Mobile),
121
+ * `offcanvasOnTablet` cuma berlaku KHUSUS breakpoint 'md' (Tablet). SEMUA
122
+ * breakpoint lain (sm/lg/xl) SELALU balik ke `homeZoneKey` (Zone rumah/
123
+ * struktural), tidak ada warisan/pengaruh silang sama sekali antar flag maupun
124
+ * antar breakpoint. Dipakai SATU fungsi ini di 2 tempat -- DynamicLayout
125
+ * (production, activeBp dari useActiveBreakpoint/matchMedia) DAN LayoutBuilder
126
+ * Editor Zone (activeBp dari breakpoint switcher builder) -- supaya keduanya
127
+ * TIDAK PERNAH divergen soal Section pindah ke Zone mana di breakpoint mana. */
128
+ export declare function resolveSectionZone(section: LayoutSection, homeZoneKey: ZoneKey, bp: Breakpoint): ZoneKey;
129
+ /** Lebar real (px) tiap breakpoint -- Tailwind v4 default, DIKONFIRMASI tidak ada
130
+ * override `--breakpoint-*` di css/ui-kit.css. Dipakai LayoutBuilder utk nunjukin
131
+ * angka px asli di sebelah label Base/SM/MD/LG/XL (sebelumnya cuma label abstrak
132
+ * tanpa konteks ukuran) dan utk nge-cap lebar Live Preview biar bener2 simulasi
133
+ * device width, bukan cuma label doang. `base` = 0 (mobile-first, unprefixed). */
134
+ export declare const BREAKPOINT_PX: Record<Breakpoint, number>;
135
+ /** getColSpanClass -- dipertahankan namanya utk kompatibilitas pemanggil lama (DynamicLayout),
136
+ * sekarang menerima breakpoint opsional (default 'base'). */
137
+ export declare function getColSpanClass(span: number, bp?: Breakpoint): string;
138
+ /** Gabungkan className semua breakpoint yang ter-set di GridConfig (span/order/align) jadi
139
+ * 1 string siap pakai -- dipakai DynamicLayout DAN nantinya code-gen.
140
+ *
141
+ * `forceBp` (opsional, 2026-08-03) -- kalau diisi, resolve nilai EFEKTIF di
142
+ * breakpoint itu (mobile-first cascade, resolveResponsive) dan hasilkan HANYA
143
+ * 1 className LITERAL tanpa prefix responsive (mis. "col-span-12" bukan
144
+ * "md:col-span-3"). Dipakai builder/preview yang men-SIMULASIKAN 1 breakpoint
145
+ * tertentu (kotak preview dikecilin scr visual via maxWidth, TAPI browser
146
+ * aslinya tetap lebar penuh -- real CSS media query `md:` TETAP aktif kalau
147
+ * innerWidth browser >= 768px, TIDAK PEDULI lebar parent div manapun). Tanpa
148
+ * ini, preview cuma "Desktop yang di-crop" -- span/order/align/visible tidak
149
+ * BENERAN reflow sesuai breakpoint simulasi (user report: "itu karena dia
150
+ * ambil layout mode desktop... di kecilin doang"). TANPA forceBp (default,
151
+ * dipakai DynamicLayout production tanpa forceBreakpoint): perilaku SEKARANG
152
+ * -- gabungan semua breakpoint dgn prefix, browser sendiri yang pilih sesuai
153
+ * viewport SUNGGUHAN via media query asli. Pola sama persis dgn GridRow.tsx
154
+ * (Editor Zone) yang SUDAH benar dari awal (span[activeBp] literal, no prefix). */
155
+ export declare function gridClassNames(grid: GridConfig, forceBp?: Breakpoint): string;
156
+ /** ClassName visibility utk 1 SECTION utuh (bukan 1 Block/LayoutItem) -- reuse
157
+ * VISIBILITY_CLASS yang sama dgn gridClassNames(), tapi dipisah jadi fungsi
158
+ * sendiri karena LayoutSection.visible adalah field independen dari GridConfig
159
+ * (Section bisa disembunyikan utuh terlepas dari visible per-item di dalamnya).
160
+ * Dipakai DynamicLayout (production, real CSS media query -- 1 code path yang
161
+ * sama benar2 responsive) dan LayoutBuilder Editor Zone (builder, evaluasi nilai
162
+ * efektif via resolveResponsive utk styling dim/blur).
163
+ *
164
+ * `forceBp` (opsional, 2026-08-03) -- sama alasan dgn gridClassNames(): kalau
165
+ * diisi, resolve nilai efektif SATU breakpoint & return literal 'hidden'/''
166
+ * (bukan gabungan class prefixed) supaya simulasi preview breakpoint builder
167
+ * BENERAN menyembunyikan Section, bukan bergantung media query browser asli. */
168
+ export declare function sectionVisibilityClass(visible: Responsive<boolean> | undefined, forceBp?: Breakpoint): string;
169
+ /** Gabungkan className semua breakpoint yang ter-set di ContainerConfig -- hanya class
170
+ * background-level ('full-width'/'custom' = w-full, 'wrapper' = container mx-auto).
171
+ * CATATAN (2026-08-03): DynamicLayout TIDAK lagi pakai fungsi ini utk cap konten --
172
+ * cap max-width sebenarnya (dari Global Layout Settings) diterapkan via inline style di
173
+ * ContainerBox (DynamicLayout.tsx), karena nilainya numerik per-instance (px/vw), bukan
174
+ * class Tailwind statis. Fungsi ini dipertahankan sbg utility publik utk consumer yang
175
+ * cuma butuh className background-level tanpa cap logic penuh. */
176
+ export declare function containerClassNames(container: ContainerConfig): string;
177
+ export declare function setLayout(schema: LayoutSchema): void;
178
+ export declare function getLayout(): LayoutSchema;
179
+ export declare function resetLayout(): void;
180
+ /** Section baru kosong, Container default 'wrapper' -- dipakai tombol "+ New Section" di builder. */
181
+ export declare function createSection(): LayoutSection;
182
+ /** HTML id yang dipakai DynamicLayout saat render 1 Section -- slug dari `name` kalau diisi
183
+ * (spasi -> dash, lowercase, buang karakter non alfanumerik), fallback ke `id` random section
184
+ * kalau `name` kosong/hasil slug-nya kosong (mis. cuma emoji/simbol). */
185
+ export declare function sectionHtmlId(section: LayoutSection): string;
186
+ /** Simpan preset baru ke memory runtime, LANGSUNG ikut ke-persist ke localStorage
187
+ * (2026-08-03 -- sebelumnya cuma memory, hilang tiap reload/tab baru, jadi
188
+ * halaman /sample/pages/layout1 dst tidak bisa diandalkan). deweb-ui.json
189
+ * (DEFAULT_LAYOUT_PRESETS) TETAP satu-satunya sumber permanen/git-committed --
190
+ * localStorage di sini murni lapisan "coba-coba" custom preset di ATASNYA,
191
+ * TIDAK PERNAH menimpa/mengubah file JSON asli. */
192
+ export declare function registerLayoutPreset(name: string, schema: LayoutSchema): void;
193
+ /** Semua preset tersedia -- default (dari deweb-ui.json) + custom yang didaftarkan runtime. */
194
+ export declare function getLayoutPresets(): Record<string, LayoutSchema>;
195
+ export interface LayoutConfig {
196
+ blocks: Record<string, BlockDefinition>;
197
+ layout: LayoutSchema;
198
+ /** Preset custom (via "Simpan sebagai Preset") -- opsional utk kompatibilitas
199
+ * mundur dgn export lama yang belum punya field ini. */
200
+ customPresets?: Record<string, LayoutSchema>;
201
+ }
202
+ /** Export seluruh state saat ini (block definitions + layout aktif + preset
203
+ * custom) jadi 1 objek JSON-serializable -- simpan ke file/database dari sisi
204
+ * consumer. */
205
+ export declare function exportLayoutConfig(): LayoutConfig;
206
+ /** Pulihkan state (block definitions + layout aktif + preset custom) dari
207
+ * config yang sebelumnya di-export & disimpan -- partial, field yang tidak ada
208
+ * tetap pakai default/current. `customPresets` di-MERGE (bukan replace) --
209
+ * preset yang disimpan lintas beberapa sesi builder terakumulasi, konsisten
210
+ * dgn perilaku additive registerLayoutPreset(). */
211
+ export declare function importLayoutConfig(config: Partial<LayoutConfig>): void;
212
+ export declare function resetLayoutConfig(): void;
213
+ /** Simpan state builder saat ini (blocks + layout aktif) ke localStorage -- dipanggil
214
+ * SETIAP kali layout berubah (resize, drag, add/remove block/Section, dst) dari
215
+ * LayoutBuilder via applyLayout(). Silent no-op kalau localStorage tidak tersedia
216
+ * (SSR) -- TAPI log warning kalau localStorage ADA tapi gagal (mis. quota exceeded),
217
+ * supaya user tahu perubahan terbaru mungkin tidak ke-save. */
218
+ export declare function saveLayoutToLocalStorage(): void;
219
+ /** Pulihkan state builder dari localStorage kalau ada -- dipanggil SEKALI saat
220
+ * LayoutBuilder mount (lewat useState lazy initializer, BUKAN useEffect, supaya
221
+ * tidak ada flash konten default sebelum restore selesai). Return true kalau
222
+ * berhasil restore, false kalau tidak ada data tersimpan (builder pakai default). */
223
+ export declare function restoreLayoutFromLocalStorage(): boolean;
224
+ export declare function clearLayoutLocalStorage(): void;
@@ -0,0 +1,151 @@
1
+ export type Breakpoint = 'base' | 'sm' | 'md' | 'lg' | 'xl';
2
+ /** Nilai per-breakpoint, mobile-first -- `base` wajib ada, breakpoint lain override opsional. */
3
+ export type Responsive<T> = {
4
+ base: T;
5
+ } & Partial<Record<Exclude<Breakpoint, 'base'>, T>>;
6
+ export type BlockAlign = 'left' | 'center' | 'right' | 'justify' | 'auto';
7
+ /** 4 mode Container -- lihat dokumentasi lengkap di DEWEB_UI_KIT.md § Container:
8
+ * - wrapper: box & konten sama-sama dibatasi maxSiteWidth (dari layout.settings, global).
9
+ * - full-width-wrapper: box 100vw (bleed penuh), KONTEN tetap dibatasi maxSiteWidth.
10
+ * - full-width: box DAN konten sama-sama 100vw, tidak ada cap sama sekali.
11
+ * - custom: box 100vw, KONTEN dibatasi angka yang di-input manual per-instance
12
+ * (ContainerSetting.customWidthPx) -- BUKAN dari maxSiteWidth global. */
13
+ export type ContainerType = 'wrapper' | 'full-width-wrapper' | 'full-width' | 'custom';
14
+ export type BlockContentType = 'component' | 'html';
15
+ /** Sisi drawer muncul -- HANYA relevan utk Section di dalam Zone `offcanvas` (diabaikan
16
+ * di Zone top/main/bottom, yang selalu render inline mengikuti alur halaman). */
17
+ export type OffCanvasPosition = 'left' | 'right' | 'top' | 'bottom';
18
+ /** Block -- unit atom (setara Base Color): HTML mentah ATAU komponen React terdaftar. */
19
+ export interface BlockDefinition {
20
+ name: string;
21
+ type: BlockContentType;
22
+ /** Wajib kalau type: 'component' -- key di block registry (lihat setBlockComponents). */
23
+ componentKey?: string;
24
+ /** Wajib kalau type: 'html' -- HTML mentah, di-render via dangerouslySetInnerHTML. */
25
+ html?: string;
26
+ /** Label komponen anak (dekoratif, dipakai builder utk badge preview) -- opsional. */
27
+ components?: string[];
28
+ }
29
+ export interface GridConfig {
30
+ span: Responsive<number>;
31
+ order?: Responsive<number>;
32
+ align?: Responsive<BlockAlign>;
33
+ /** Kontrol tampil/sembunyi per breakpoint -- mobile-first cascade SAMA seperti
34
+ * span/order/align (resolveResponsive). true/undefined = tampil (default), false
35
+ * = sembunyi MULAI breakpoint ini SAMPAI di-override lagi di breakpoint lebih
36
+ * besar. Dipakai utk kasus block yang cuma relevan di layar lebar (mis. Sidebar)
37
+ * -- di-hide mulai 'base', ditampilkan lagi di 'md' via visible.md = true. */
38
+ visible?: Responsive<boolean>;
39
+ }
40
+ export interface LayoutItem {
41
+ id: string;
42
+ blockId: string;
43
+ grid: GridConfig;
44
+ /** Konfigurasi spesifik per-instance untuk block ini (misal: target section ID untuk trigger off-canvas). */
45
+ settings?: Record<string, any>;
46
+ }
47
+ /** Global Layout Settings -- dipakai Container (wrapper/full-width/custom) di seluruh
48
+ * Zone/Section, BUKAN nilai per-instance. Sama filosofi dengan Color/Icon/Font: JSON-first,
49
+ * override-able runtime via setLayoutSettings(). */
50
+ export interface LayoutSettings {
51
+ /** Lebar maksimum situs, px. */
52
+ maxSiteWidth: number;
53
+ /** Jarak vertikal antara area konten utama dan header/footer, px. */
54
+ contentAreaSpacing: number;
55
+ /** Jarak horizontal antara area konten dan tepi layar, vw. */
56
+ contentEdgeSpacing: number;
57
+ /** Lebar maksimum struktur narrow-width (mis. post/page narrow), px. */
58
+ narrowContainerMaxWidth: number;
59
+ /** Offset elemen dengan alignment 'wide', px. */
60
+ wideAlignmentOffset: number;
61
+ }
62
+ /** Setting Container per-breakpoint -- `type` selalu ada, `customWidthPx` HANYA relevan
63
+ * saat type === 'custom' (lebar konten manual per-instance, px -- BUKAN dari maxSiteWidth
64
+ * global). */
65
+ export interface ContainerSetting {
66
+ type: ContainerType;
67
+ customWidthPx?: number;
68
+ }
69
+ export type ContainerConfig = Responsive<ContainerSetting>;
70
+ /** Section -- grup Block dalam 1 Zone, punya Container sendiri (independen dari Zone-nya).
71
+ * Zone bisa punya banyak Section SEKALIGUS item lepas (tanpa Section) -- keduanya sah. */
72
+ export interface LayoutSection {
73
+ id: string;
74
+ /** Nama section (opsional) -- di-slugify jadi HTML id saat render (lihat sectionHtmlId()
75
+ * di engine.ts). Kalau kosong, fallback ke `id` random sebagai HTML id. */
76
+ name?: string;
77
+ /** Warna latar section (hex/CSS color) -- opsional, dirender di div yang lebar-nya
78
+ * mengikuti Container type (lihat ContainerBox di DynamicLayout.tsx). Ini yang
79
+ * membuat perbedaan wrapper/full-width-wrapper/full-width/custom kelihatan SECARA
80
+ * VISUAL (background bleed vs capped), bukan cuma beda angka di computed style. */
81
+ backgroundColor?: string;
82
+ container: ContainerConfig;
83
+ items: LayoutItem[];
84
+ /** Sisi drawer muncul -- HANYA dipakai kalau Section ini ada di dalam Zone
85
+ * `offcanvas` (lihat LayoutSchema.offcanvas). Tiap Section off-canvas bebas pilih
86
+ * sisi sendiri (2026-08-03) -- BUKAN 1 posisi global utk seluruh panel, karena bisa
87
+ * ada beberapa drawer berbeda (mis. menu mobile di left, notification panel di
88
+ * right) sekaligus. Diabaikan/tidak relevan di Zone top/main/bottom. */
89
+ offcanvasPosition?: OffCanvasPosition;
90
+ /** DUA flag SEDERHANA independen (BUKAN Responsive/cascade, 2026-08-03 --
91
+ * revisi dari desain awal `responsiveZone?: Responsive<ZoneKey>` yang
92
+ * mobile-first cascade). Versi cascade itu PUNYA BUG PERILAKU: nge-set
93
+ * override di breakpoint 'base' (Mobile) otomatis ikut "mewarisi" ke
94
+ * breakpoint lebih besar (lg/xl, Desktop) yang belum di-override -- user
95
+ * report: "waktu aku pindah di mode mobile, mode desktop jg ikut pindah ke
96
+ * off canvas" -- exactly cascade mobile-first bekerja seperti span/order/
97
+ * visible, TAPI utk kasus "Section pindah Zone" itu justru membingungkan
98
+ * (bukan span/order yang emang wajar diwariskan, ini soal SATU Section ada
99
+ * di parent DOM mana). Fix: 2 flag ON/OFF independen, TIDAK ADA cascade sama
100
+ * sekali -- `offcanvasOnMobile` utk breakpoint base, `offcanvasOnTablet`
101
+ * KHUSUS md (ditambahkan 2026-08-03 -- user butuh Tablet juga bisa Off
102
+ * Canvas, bukan cuma Mobile: "ini off canvas bisa di tablet dan mobile
103
+ * kayaknya, terutama tablet MD itu"). Bisa dicentang salah satu, keduanya,
104
+ * atau tidak sama sekali -- SALING INDEPENDEN, tidak saling pengaruh. Desktop
105
+ * (sm/lg/xl) TETAP TIDAK PERNAH terpengaruh apapun. Lihat resolveSectionZone()
106
+ * di engine.ts dan useActiveBreakpoint.ts utk resolusi runtime (matchMedia,
107
+ * BUKAN CSS murni -- Off Canvas adalah subtree DOM berbeda dari Top/Main/
108
+ * Bottom, CSS show/hide tidak bisa reparent elemen ke container lain). */
109
+ offcanvasOnMobile?: boolean;
110
+ offcanvasOnTablet?: boolean;
111
+ /** Kontrol tampil/sembunyi SELURUH Section per breakpoint -- SAMA pola cascade
112
+ * mobile-first dgn GridConfig.visible (BEDA kasus dari offcanvasOnMobile di
113
+ * atas: ini soal "tampil/sembunyi di tempat yang SAMA", bukan pindah parent
114
+ * DOM/Zone, jadi cascade mobile-first di sini WAJAR & diinginkan -- true/
115
+ * undefined = tampil, false = sembunyi mulai breakpoint ini sampai
116
+ * di-override lagi di breakpoint lebih besar). Section yang hidden TETAP
117
+ * kelihatan di Editor Zone builder (dgn efek blur/dim sbg penanda), TIDAK
118
+ * PERNAH hard-hide di editor -- production (DynamicLayout) yang benar2 skip
119
+ * render-nya via CSS (sama pendekatan gridClassNames() utk GridConfig.visible). */
120
+ visible?: Responsive<boolean>;
121
+ }
122
+ /** Nama Zone (top/main/bottom/offcanvas) sebagai type -- dipakai LayoutSection.
123
+ * responsiveZone DAN signature resolveSectionZone()/ZoneRenderer. */
124
+ export type ZoneKey = 'top' | 'main' | 'bottom' | 'offcanvas';
125
+ /** Zone (top/main/bottom/offcanvas) -- MURNI struktural, tidak punya Container/
126
+ * backgroundColor/items sendiri (2026-08-03, dihapus dari desain awal yang sempat
127
+ * punya "item lepas"). SETIAP Block WAJIB berada di dalam 1 Section -- Zone cuma
128
+ * wadah berisi Section-Section. */
129
+ export interface LayoutZone {
130
+ sections: LayoutSection[];
131
+ }
132
+ export interface LayoutSchema {
133
+ preset: string;
134
+ top?: LayoutZone;
135
+ main?: LayoutZone;
136
+ bottom?: LayoutZone;
137
+ /** Off Canvas -- BUKAN Zone yang render inline mengikuti alur halaman seperti
138
+ * Top/Main/Bottom, tapi panel drawer tersembunyi (mis. menu navigasi mobile),
139
+ * mirip filosofi Modal/Notification -- muncul "mengambang" di atas konten, di-toggle
140
+ * buka/tutup, bukan bagian layout utama. Strukturnya IDENTIK dengan Zone lain
141
+ * (banyak Section, tiap Section Container sendiri) supaya builder-nya (drag/resize/
142
+ * grid) bisa 100% reuse -- bedanya cuma tiap Section di sini punya
143
+ * `offcanvasPosition` sendiri (left/right/top/bottom sisi drawer), dan
144
+ * DynamicLayout.tsx merender tiap Section sebagai drawer terpisah, bukan 1 blok
145
+ * inline di alur <main>. */
146
+ offcanvas?: LayoutZone;
147
+ }
148
+ export interface EngineLayoutState {
149
+ blocks: Record<string, BlockDefinition>;
150
+ layout: LayoutSchema;
151
+ }
@@ -0,0 +1,14 @@
1
+ import type { Breakpoint } from './types';
2
+ /**
3
+ * Breakpoint AKTIF browser sungguhan (lebar viewport nyata) -- BEDA dari `activeBp`
4
+ * di LayoutBuilder (yang cuma state pilihan user, simulasi lewat width-constrained
5
+ * preview box). Dipakai DynamicLayout di PRODUCTION supaya Section dgn
6
+ * `responsiveZone` (lihat types.ts) pindah render location secara otomatis saat
7
+ * browser di-resize/rotate -- SSR-safe (return 'base' kalau window/matchMedia
8
+ * belum ada, sama filosofi guard `typeof localStorage === 'undefined'` yang sudah
9
+ * dipakai saveLayoutToLocalStorage di engine.ts).
10
+ *
11
+ * Pakai matchMedia listener (bukan resize event polling) -- lebih murah, browser
12
+ * yang urus threshold-nya, dan otomatis re-render React lewat setState di listener.
13
+ */
14
+ export declare function useActiveBreakpoint(): Breakpoint;
@@ -0,0 +1,47 @@
1
+ import * as React from 'react';
2
+ import type { LayoutSchema } from './types';
3
+ /**
4
+ * Drag-to-move block antar posisi (reorder dalam 1 row) ATAU antar Section (LINTAS Zone
5
+ * Top/Main/Bottom) -- pola SAMA PERSIS dengan useKanbanDnd.ts (Pages Kit): ref-mirrored
6
+ * state, listener pointermove/pointerup window-level dipasang sekali saat mount,
7
+ * drop-target di-resolve via document.elementFromPoint() + data-* attribute -- BUKAN
8
+ * library drag-and-drop.
9
+ *
10
+ * DROP-TARGET KEY -- string yang mengidentifikasi 1 Section tempat item bisa di-drop:
11
+ * "top:sec-abc123" -> Section dengan id "sec-abc123" di dalam Zone Top
12
+ * SELALU ada bagian Section-nya (2026-08-03) -- Zone TIDAK PUNYA item lepas lagi, SETIAP
13
+ * Block wajib berada di dalam 1 Section (lihat LayoutZone di types.ts). Encoding ini
14
+ * dipasang di attribute `data-zone-key` pada elemen row (GridRow), di-parse balik oleh
15
+ * hook ini saat resolve drop position.
16
+ *
17
+ * DUA MODE DRAG:
18
+ * 1) MOVE -- drag item YANG SUDAH ADA di grid (dari GridRow, grip handle existing item)
19
+ * -- pola sama dengan versi sebelumnya (reorder + pindah lintas Zone/Section).
20
+ * 2) PLACE -- drag block DARI Blocks Palette (belum ada LayoutItem sama sekali) --
21
+ * startDragFromPalette() dipakai, saat drop, LayoutItem BARU dibuat (id random,
22
+ * span default 1) lalu disisipkan ke posisi yang di-resolve. Ini yang menggantikan
23
+ * tombol "+ Add Block" lama yang auto-pick block index 0 -- sekarang user EKSPLISIT
24
+ * pilih block mana yang mau ditaruh, lewat card mana yang di-drag. Kalau target Zone
25
+ * BELUM punya Section sama sekali (drop langsung ke box Zone kosong), Section baru
26
+ * di-auto-create dulu (createSection()) baru Block ditaruh di dalamnya -- supaya user
27
+ * tetap bisa mulai isi Zone kosong lewat drag tanpa wajib klik "+ New Section" dulu.
28
+ */
29
+ interface DragState {
30
+ dragMode: 'move' | 'place' | null;
31
+ draggingId: string | null;
32
+ placingBlockId: string | null;
33
+ dragX: number;
34
+ dragY: number;
35
+ offsetX: number;
36
+ offsetY: number;
37
+ width: number;
38
+ height: number;
39
+ dropTargetKey: string | null;
40
+ dropBeforeId: string | null;
41
+ }
42
+ export declare function useBlockDrag(layout: LayoutSchema, onChange: (layout: LayoutSchema) => void): {
43
+ drag: DragState;
44
+ startDrag: (itemId: string) => (e: React.PointerEvent) => void;
45
+ startDragFromPalette: (blockId: string) => (e: React.PointerEvent) => void;
46
+ };
47
+ export {};
@@ -0,0 +1,30 @@
1
+ import * as React from 'react';
2
+ import type { LayoutSchema } from './types';
3
+ /**
4
+ * Drag-to-move Section ITU SENDIRI (dengan semua Block isinya) -- reorder dalam 1 Zone
5
+ * ATAU pindah ke Zone lain. Pola SAMA PERSIS useKanbanDnd.ts/useBlockDrag.ts: ref-mirrored
6
+ * state, listener pointermove/pointerup window-level dipasang sekali, drop-target
7
+ * di-resolve via document.elementFromPoint() + data-* attribute.
8
+ *
9
+ * BEDA dari useBlockDrag (yang granularity-nya 1 LayoutItem, drop-target-nya 1 row/GridRow):
10
+ * hook ini granularity-nya 1 LayoutSection UTUH (id + name + container + semua items di
11
+ * dalamnya ikut pindah bersama), drop-target-nya adalah ZONE ITU SENDIRI (data-section-zone),
12
+ * bukan row individual. Sumbu before/after dihitung VERTIKAL (Section stack vertikal dalam 1
13
+ * Zone), beda dari useBlockDrag yang horizontal (Block berjajar dalam 1 row).
14
+ */
15
+ interface DragState {
16
+ draggingId: string | null;
17
+ dragX: number;
18
+ dragY: number;
19
+ offsetX: number;
20
+ offsetY: number;
21
+ width: number;
22
+ height: number;
23
+ dropZoneKey: string | null;
24
+ dropBeforeId: string | null;
25
+ }
26
+ export declare function useSectionDrag(layout: LayoutSchema, onChange: (layout: LayoutSchema) => void): {
27
+ drag: DragState;
28
+ startSectionDrag: (sectionId: string) => (e: React.PointerEvent) => void;
29
+ };
30
+ export {};
@@ -0,0 +1,31 @@
1
+ import * as React from 'react';
2
+ import type { Breakpoint, LayoutItem } from './types';
3
+ /** Bentuk minimal yang dibutuhkan hook ini -- items saja (bukan LayoutZone penuh),
4
+ * supaya dipakai baik utk item lepas Zone maupun item di dalam 1 Section. */
5
+ interface ItemsHolder {
6
+ items: LayoutItem[];
7
+ }
8
+ /**
9
+ * Drag-to-resize span di GridRow -- pola SAMA PERSIS dengan useKanbanDnd.ts (Pages Kit):
10
+ * ref-mirrored state supaya pointermove handler selalu baca nilai terbaru tanpa
11
+ * re-subscribe listener tiap pixel gerakan, listener window-level dipasang SEKALI saat
12
+ * mount (bukan per-item), Pointer Events (bukan mouse) supaya konsisten touch+mouse.
13
+ *
14
+ * BEDA dari useKanbanDnd: ini RESIZE, bukan reorder-lintas-kolom -- tidak ada drop-zone/
15
+ * collision detection, cuma clamp span baru ke [1,12] lalu commit. Overflow row (total
16
+ * span > 12) SENGAJA tidak di-cascade-shrink ke sibling (v1 simplification) -- CSS grid
17
+ * otomatis wrap ke baris baru, builder cuma kasih hint teks kalau total > 12.
18
+ */
19
+ interface DragState {
20
+ draggingItemId: string | null;
21
+ startX: number;
22
+ startSpan: number;
23
+ columnWidthPx: number;
24
+ liveSpan: number;
25
+ }
26
+ export declare function useSpanResize(zone: ItemsHolder, activeBp: Breakpoint, onChange: (zone: ItemsHolder) => void): {
27
+ rowRef: React.RefObject<HTMLDivElement | null>;
28
+ drag: DragState;
29
+ startResize: (itemId: string) => (e: React.PointerEvent) => void;
30
+ };
31
+ export {};
@@ -0,0 +1,9 @@
1
+ export interface LocalizeItem {
2
+ label: string;
3
+ name?: string;
4
+ value: string;
5
+ flag?: string;
6
+ countryCode?: string;
7
+ }
8
+ export declare const LANGUAGES: LocalizeItem[];
9
+ export declare const CURRENCIES: LocalizeItem[];
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Helper untuk komponen product/ Component Kit -- versi disederhanakan dari
3
+ * ~/lib/utils.ts (getMediaUrl) yang aslinya resolve CDN
4
+ * internal Cyclopedia. Di sini return url apa adanya / placeholder.
5
+ */
6
+ export declare function getMediaUrl(path?: string): string;
7
+ export declare function formatPrice(amount: number): string;