@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.
- package/LICENSE +21 -0
- package/README.md +90 -2
- package/css/ui-kit.css +901 -0
- package/dist/chunk-028rzptn.js +253 -0
- package/dist/chunk-028rzptn.js.map +10 -0
- package/dist/chunk-0x0et52k.js +82 -0
- package/dist/chunk-0x0et52k.js.map +10 -0
- package/dist/chunk-17gmkyd1.js +195 -0
- package/dist/chunk-17gmkyd1.js.map +10 -0
- package/dist/chunk-19jsevr8.js +17 -0
- package/dist/chunk-19jsevr8.js.map +10 -0
- package/dist/chunk-1t1fbbme.js +171 -0
- package/dist/chunk-1t1fbbme.js.map +10 -0
- package/dist/chunk-26ban96z.js +151 -0
- package/dist/chunk-26ban96z.js.map +10 -0
- package/dist/chunk-39hey5ns.js +2034 -0
- package/dist/chunk-39hey5ns.js.map +19 -0
- package/dist/chunk-3f0bjycv.js +481 -0
- package/dist/chunk-3f0bjycv.js.map +10 -0
- package/dist/chunk-3zpf64v4.js +108 -0
- package/dist/chunk-3zpf64v4.js.map +10 -0
- package/dist/chunk-4jrq15v9.js +919 -0
- package/dist/chunk-4jrq15v9.js.map +10 -0
- package/dist/chunk-8dacesjp.js +289 -0
- package/dist/chunk-8dacesjp.js.map +10 -0
- package/dist/chunk-8een770x.js +2546 -0
- package/dist/chunk-8een770x.js.map +29 -0
- package/dist/chunk-8jv2g2ne.js +371 -0
- package/dist/chunk-8jv2g2ne.js.map +10 -0
- package/dist/chunk-abdqb4e5.js +156 -0
- package/dist/chunk-abdqb4e5.js.map +10 -0
- package/dist/chunk-af27xdf2.js +891 -0
- package/dist/chunk-af27xdf2.js.map +11 -0
- package/dist/chunk-amsyqyh9.js +23 -0
- package/dist/chunk-amsyqyh9.js.map +9 -0
- package/dist/chunk-czbcw9e1.js +503 -0
- package/dist/chunk-czbcw9e1.js.map +11 -0
- package/dist/chunk-dar8mz91.js +73 -0
- package/dist/chunk-dar8mz91.js.map +10 -0
- package/dist/chunk-dsddmmdk.js +136 -0
- package/dist/chunk-dsddmmdk.js.map +10 -0
- package/dist/chunk-edx7tas6.js +89 -0
- package/dist/chunk-edx7tas6.js.map +10 -0
- package/dist/chunk-es4tgmvr.js +1686 -0
- package/dist/chunk-es4tgmvr.js.map +12 -0
- package/dist/chunk-f2aqj672.js +240 -0
- package/dist/chunk-f2aqj672.js.map +11 -0
- package/dist/chunk-h6k57hyd.js +146 -0
- package/dist/chunk-h6k57hyd.js.map +10 -0
- package/dist/chunk-hkx78qgj.js +1548 -0
- package/dist/chunk-hkx78qgj.js.map +12 -0
- package/dist/chunk-hq57r97c.js +770 -0
- package/dist/chunk-hq57r97c.js.map +11 -0
- package/dist/chunk-jct2e2h1.js +139 -0
- package/dist/chunk-jct2e2h1.js.map +10 -0
- package/dist/chunk-je0j5sn4.js +246 -0
- package/dist/chunk-je0j5sn4.js.map +10 -0
- package/dist/chunk-k2b698v5.js +754 -0
- package/dist/chunk-k2b698v5.js.map +12 -0
- package/dist/chunk-kv58555q.js +267 -0
- package/dist/chunk-kv58555q.js.map +11 -0
- package/dist/chunk-m0msvrte.js +15 -0
- package/dist/chunk-m0msvrte.js.map +10 -0
- package/dist/chunk-m3t14v77.js +30 -0
- package/dist/chunk-m3t14v77.js.map +10 -0
- package/dist/chunk-mctp30cp.js +1466 -0
- package/dist/chunk-mctp30cp.js.map +10 -0
- package/dist/chunk-n37qb5m5.js +1408 -0
- package/dist/chunk-n37qb5m5.js.map +10 -0
- package/dist/chunk-nhhgsdt3.js +570 -0
- package/dist/chunk-nhhgsdt3.js.map +11 -0
- package/dist/chunk-pxydj130.js +28 -0
- package/dist/chunk-pxydj130.js.map +10 -0
- package/dist/chunk-qmbwp4k7.js +3275 -0
- package/dist/chunk-qmbwp4k7.js.map +13 -0
- package/dist/chunk-qzxf0aa2.js +149 -0
- package/dist/chunk-qzxf0aa2.js.map +10 -0
- package/dist/chunk-rbjyp9ff.js +47 -0
- package/dist/chunk-rbjyp9ff.js.map +10 -0
- package/dist/chunk-rbkc50xg.js +103 -0
- package/dist/chunk-rbkc50xg.js.map +10 -0
- package/dist/chunk-rn6f0s6x.js +66 -0
- package/dist/chunk-rn6f0s6x.js.map +9 -0
- package/dist/chunk-rswzbfa2.js +422 -0
- package/dist/chunk-rswzbfa2.js.map +10 -0
- package/dist/chunk-rzns0reg.js +157 -0
- package/dist/chunk-rzns0reg.js.map +10 -0
- package/dist/chunk-s851vtje.js +90 -0
- package/dist/chunk-s851vtje.js.map +10 -0
- package/dist/chunk-vak164kx.js +15 -0
- package/dist/chunk-vak164kx.js.map +9 -0
- package/dist/chunk-vpvnvegz.js +480 -0
- package/dist/chunk-vpvnvegz.js.map +10 -0
- package/dist/chunk-x4pk7vxm.js +10 -0
- package/dist/chunk-x4pk7vxm.js.map +10 -0
- package/dist/chunk-xd2fwgek.js +53 -0
- package/dist/chunk-xd2fwgek.js.map +10 -0
- package/dist/chunk-y71rd8qf.js +499 -0
- package/dist/chunk-y71rd8qf.js.map +10 -0
- package/dist/chunk-zjmt193s.js +34 -0
- package/dist/chunk-zjmt193s.js.map +9 -0
- package/dist/components/blocks/CustomHtmlBlock.d.ts +14 -0
- package/dist/components/blocks/LoginFormBlock.d.ts +16 -0
- package/dist/components/blocks/SidebarMenuBlock.d.ts +11 -0
- package/dist/components/blocks/SliderBlock.d.ts +13 -0
- package/dist/components/code/code-editor.d.ts +58 -0
- package/dist/components/code/code-preview.d.ts +18 -0
- package/dist/components/code/index.d.ts +4 -0
- package/dist/components/code/validator.d.ts +10 -0
- package/dist/components/code/vsc-themes.d.ts +6 -0
- package/dist/components/dashboard/compound/context.d.ts +14 -0
- package/dist/components/dashboard/compound/dashboard.d.ts +14 -0
- package/dist/components/dashboard/compound/index.d.ts +18 -0
- package/dist/components/dashboard/compound/main.d.ts +25 -0
- package/dist/components/dashboard/compound/sidebar.d.ts +5 -0
- package/dist/components/dashboard/dashboard-head-info.d.ts +38 -0
- package/dist/components/dashboard/dashboard-head.d.ts +19 -0
- package/dist/components/dashboard/dataview.d.ts +19 -0
- package/dist/components/dashboard/detailview.d.ts +1 -0
- package/dist/components/dashboard/formview.d.ts +265 -0
- package/dist/components/dashboard/pageformview.d.ts +79 -0
- package/dist/components/dashboard/styling/background-color-control.d.ts +34 -0
- package/dist/components/dashboard/styling/background-control.d.ts +45 -0
- package/dist/components/dashboard/styling/border-control.d.ts +14 -0
- package/dist/components/dashboard/styling/color-control.d.ts +22 -0
- package/dist/components/dashboard/styling/index.d.ts +7 -0
- package/dist/components/dashboard/styling/radius-control.d.ts +15 -0
- package/dist/components/dashboard/styling/spacing-control.d.ts +17 -0
- package/dist/components/dashboard/styling/types.d.ts +50 -0
- package/dist/components/document/index.d.ts +25 -0
- package/dist/components/ecommerce/commerce-cards.d.ts +37 -0
- package/dist/components/effect/action-animation.d.ts +14 -0
- package/dist/components/effect/element-animation.d.ts +41 -0
- package/dist/components/effect/page-transition.d.ts +10 -0
- package/dist/components/layout/BlockPalette.d.ts +14 -0
- package/dist/components/layout/DynamicLayout.d.ts +56 -0
- package/dist/components/layout/GridRow.d.ts +37 -0
- package/dist/components/layout/LayoutBuilder.d.ts +52 -0
- package/dist/components/layout/WidgetFieldsForm.d.ts +15 -0
- package/dist/components/ui/accordion.d.ts +36 -0
- package/dist/components/ui/action-bar.d.ts +46 -0
- package/dist/components/ui/alert.d.ts +25 -0
- package/dist/components/ui/animated.d.ts +41 -0
- package/dist/components/ui/app-shell.d.ts +53 -0
- package/dist/components/ui/avatar.d.ts +18 -0
- package/dist/components/ui/badge.d.ts +15 -0
- package/dist/components/ui/breadcrumb.d.ts +20 -0
- package/dist/components/ui/button-icon.d.ts +9 -0
- package/dist/components/ui/button.d.ts +37 -0
- package/dist/components/ui/calendar.d.ts +14 -0
- package/dist/components/ui/card-skeleton-aware.d.ts +2 -0
- package/dist/components/ui/card.d.ts +36 -0
- package/dist/components/ui/chart.d.ts +75 -0
- package/dist/components/ui/chat-bubble.d.ts +74 -0
- package/dist/components/ui/code.d.ts +85 -0
- package/dist/components/ui/code.js +21 -0
- package/dist/components/ui/code.js.map +9 -0
- package/dist/components/ui/collapsible.d.ts +25 -0
- package/dist/components/ui/control-group.d.ts +39 -0
- package/dist/components/ui/dashboard-grid/DashboardDropSlot.d.ts +10 -0
- package/dist/components/ui/dashboard-grid/DashboardGrid.d.ts +5 -0
- package/dist/components/ui/dashboard-grid/DashboardWidgetCard.d.ts +43 -0
- package/dist/components/ui/dashboard-grid/useDashboardDnd.d.ts +36 -0
- package/dist/components/ui/data-empty.d.ts +24 -0
- package/dist/components/ui/data-list.d.ts +16 -0
- package/dist/components/ui/data-table.d.ts +48 -0
- package/dist/components/ui/data-view/DataView.d.ts +46 -0
- package/dist/components/ui/data-view/DataViewCalendar.d.ts +18 -0
- package/dist/components/ui/data-view/DataViewContent.d.ts +5 -0
- package/dist/components/ui/data-view/DataViewFilter.d.ts +8 -0
- package/dist/components/ui/data-view/DataViewGrid.d.ts +32 -0
- package/dist/components/ui/data-view/DataViewHeader.d.ts +22 -0
- package/dist/components/ui/data-view/DataViewKanban.d.ts +16 -0
- package/dist/components/ui/data-view/DataViewPivot.d.ts +15 -0
- package/dist/components/ui/data-view/DataViewTable.d.ts +33 -0
- package/dist/components/ui/data-view/index.d.ts +9 -0
- package/dist/components/ui/date-time-picker.d.ts +205 -0
- package/dist/components/ui/drawer.d.ts +71 -0
- package/dist/components/ui/dropdown-animation.d.ts +7 -0
- package/dist/components/ui/dropdown.d.ts +71 -0
- package/dist/components/ui/error-state.d.ts +15 -0
- package/dist/components/ui/filter-bar.d.ts +50 -0
- package/dist/components/ui/filter-bar.js +19 -0
- package/dist/components/ui/filter-bar.js.map +9 -0
- package/dist/components/ui/font.d.ts +24 -0
- package/dist/components/ui/form-advanced.d.ts +198 -0
- package/dist/components/ui/form-compound.d.ts +58 -0
- package/dist/components/ui/form-context.d.ts +19 -0
- package/dist/components/ui/form.d.ts +451 -0
- package/dist/components/ui/format-currency.d.ts +10 -0
- package/dist/components/ui/format-date.d.ts +28 -0
- package/dist/components/ui/format-number.d.ts +22 -0
- package/dist/components/ui/format-time.d.ts +5 -0
- package/dist/components/ui/grid.d.ts +30 -0
- package/dist/components/ui/heading.d.ts +9 -0
- package/dist/components/ui/indicator.d.ts +17 -0
- package/dist/components/ui/initial-icon.d.ts +11 -0
- package/dist/components/ui/input-code.d.ts +27 -0
- package/dist/components/ui/input-grid.d.ts +54 -0
- package/dist/components/ui/input.d.ts +37 -0
- package/dist/components/ui/invoice-blocks.d.ts +124 -0
- package/dist/components/ui/invoice-document.d.ts +63 -0
- package/dist/components/ui/kanban.d.ts +16 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/lazy-load.d.ts +13 -0
- package/dist/components/ui/lightbox.d.ts +15 -0
- package/dist/components/ui/list.d.ts +33 -0
- package/dist/components/ui/loading.d.ts +79 -0
- package/dist/components/ui/media-card.d.ts +50 -0
- package/dist/components/ui/media-player.d.ts +47 -0
- package/dist/components/ui/menu.d.ts +24 -0
- package/dist/components/ui/modal.d.ts +233 -0
- package/dist/components/ui/page.d.ts +51 -0
- package/dist/components/ui/pagination.d.ts +16 -0
- package/dist/components/ui/print.d.ts +173 -0
- package/dist/components/ui/project-card.d.ts +43 -0
- package/dist/components/ui/radius-control.d.ts +36 -0
- package/dist/components/ui/rich-text-editor.d.ts +32 -0
- package/dist/components/ui/select-card.d.ts +56 -0
- package/dist/components/ui/sidebar-logo.d.ts +11 -0
- package/dist/components/ui/sidebar-menu.d.ts +82 -0
- package/dist/components/ui/sidebar-search.d.ts +7 -0
- package/dist/components/ui/skeletons.d.ts +46 -0
- package/dist/components/ui/surface.d.ts +13 -0
- package/dist/components/ui/table-pivot.d.ts +10 -0
- package/dist/components/ui/table.d.ts +258 -0
- package/dist/components/ui/tabs.d.ts +79 -0
- package/dist/components/ui/task-board.d.ts +29 -0
- package/dist/components/ui/terminal.d.ts +51 -0
- package/dist/components/ui/text-sensor.d.ts +9 -0
- package/dist/components/ui/theme-styler.d.ts +3 -0
- package/dist/components/ui/theme-toggle.d.ts +23 -0
- package/dist/components/ui/tooltip.d.ts +11 -0
- package/dist/components/website/account-banner.d.ts +11 -0
- package/dist/components/website/account-layout.d.ts +20 -0
- package/dist/components/website/account.d.ts +46 -0
- package/dist/components/website/ambient.d.ts +19 -0
- package/dist/components/website/auth.d.ts +35 -0
- package/dist/components/website/blog/blog-list-custom.d.ts +3 -0
- package/dist/components/website/blog/blog-list-gallery.d.ts +2 -0
- package/dist/components/website/blog/blog-list-grid.d.ts +2 -0
- package/dist/components/website/blog/blog-list-list.d.ts +2 -0
- package/dist/components/website/blog.d.ts +50 -0
- package/dist/components/website/carousel.d.ts +58 -0
- package/dist/components/website/cart.d.ts +31 -0
- package/dist/components/website/catalogue-view.d.ts +81 -0
- package/dist/components/website/catalogue.d.ts +96 -0
- package/dist/components/website/comment.d.ts +52 -0
- package/dist/components/website/eclipse.d.ts +15 -0
- package/dist/components/website/feature-grid.d.ts +58 -0
- package/dist/components/website/filter.d.ts +109 -0
- package/dist/components/website/hero.d.ts +89 -0
- package/dist/components/website/localize.d.ts +36 -0
- package/dist/components/website/logo.d.ts +24 -0
- package/dist/components/website/megamenu.d.ts +10 -0
- package/dist/components/website/navbar.d.ts +42 -0
- package/dist/components/website/notification.d.ts +58 -0
- package/dist/components/website/price.d.ts +26 -0
- package/dist/components/website/pricing.d.ts +21 -0
- package/dist/components/website/product.d.ts +32 -0
- package/dist/components/website/rating.d.ts +36 -0
- package/dist/components/website/review-form.d.ts +54 -0
- package/dist/components/website/reviews.d.ts +119 -0
- package/dist/components/website/search.d.ts +30 -0
- package/dist/entries/accordion.d.ts +1 -0
- package/dist/entries/accordion.js +9 -0
- package/dist/entries/accordion.js.map +9 -0
- package/dist/entries/alert.d.ts +1 -0
- package/dist/entries/alert.js +10 -0
- package/dist/entries/alert.js.map +9 -0
- package/dist/entries/badge.d.ts +1 -0
- package/dist/entries/badge.js +11 -0
- package/dist/entries/badge.js.map +9 -0
- package/dist/entries/breadcrumb.d.ts +1 -0
- package/dist/entries/breadcrumb.js +10 -0
- package/dist/entries/breadcrumb.js.map +9 -0
- package/dist/entries/button.d.ts +1 -0
- package/dist/entries/button.js +12 -0
- package/dist/entries/button.js.map +9 -0
- package/dist/entries/card.d.ts +1 -0
- package/dist/entries/card.js +25 -0
- package/dist/entries/card.js.map +9 -0
- package/dist/entries/chart.d.ts +1 -0
- package/dist/entries/chart.js +130 -0
- package/dist/entries/chart.js.map +10 -0
- package/dist/entries/components.d.ts +53 -0
- package/dist/entries/components.js +643 -0
- package/dist/entries/components.js.map +9 -0
- package/dist/entries/dashboard/dataview.d.ts +1 -0
- package/dist/entries/dashboard/dataview.js +82 -0
- package/dist/entries/dashboard/dataview.js.map +10 -0
- package/dist/entries/dashboard/pageformview.d.ts +1 -0
- package/dist/entries/dashboard/pageformview.js +34 -0
- package/dist/entries/dashboard/pageformview.js.map +9 -0
- package/dist/entries/data-table.d.ts +1 -0
- package/dist/entries/data-table.js +22 -0
- package/dist/entries/data-table.js.map +9 -0
- package/dist/entries/date-time-picker.d.ts +1 -0
- package/dist/entries/date-time-picker.js +28 -0
- package/dist/entries/date-time-picker.js.map +9 -0
- package/dist/entries/document.d.ts +1 -0
- package/dist/entries/document.js +69 -0
- package/dist/entries/document.js.map +10 -0
- package/dist/entries/drawer.d.ts +1 -0
- package/dist/entries/drawer.js +20 -0
- package/dist/entries/drawer.js.map +9 -0
- package/dist/entries/dropdown.d.ts +1 -0
- package/dist/entries/dropdown.js +29 -0
- package/dist/entries/dropdown.js.map +9 -0
- package/dist/entries/error-state.d.ts +1 -0
- package/dist/entries/error-state.js +14 -0
- package/dist/entries/error-state.js.map +9 -0
- package/dist/entries/favorite-button.d.ts +1 -0
- package/dist/entries/favorite-button.js +7 -0
- package/dist/entries/favorite-button.js.map +10 -0
- package/dist/entries/font.d.ts +1 -0
- package/dist/entries/font.js +10 -0
- package/dist/entries/font.js.map +9 -0
- package/dist/entries/form-advanced.d.ts +1 -0
- package/dist/entries/form-advanced.js +39 -0
- package/dist/entries/form-advanced.js.map +9 -0
- package/dist/entries/form.d.ts +1 -0
- package/dist/entries/form.js +74 -0
- package/dist/entries/form.js.map +9 -0
- package/dist/entries/heading.d.ts +1 -0
- package/dist/entries/heading.js +8 -0
- package/dist/entries/heading.js.map +9 -0
- package/dist/entries/input.d.ts +1 -0
- package/dist/entries/input.js +11 -0
- package/dist/entries/input.js.map +9 -0
- package/dist/entries/layout.d.ts +4 -0
- package/dist/entries/layout.js +101 -0
- package/dist/entries/layout.js.map +9 -0
- package/dist/entries/lazy-load.d.ts +1 -0
- package/dist/entries/lazy-load.js +9 -0
- package/dist/entries/lazy-load.js.map +9 -0
- package/dist/entries/list.d.ts +1 -0
- package/dist/entries/list.js +13 -0
- package/dist/entries/list.js.map +9 -0
- package/dist/entries/loading.d.ts +1 -0
- package/dist/entries/loading.js +18 -0
- package/dist/entries/loading.js.map +9 -0
- package/dist/entries/menu.d.ts +1 -0
- package/dist/entries/menu.js +17 -0
- package/dist/entries/menu.js.map +9 -0
- package/dist/entries/modal.d.ts +1 -0
- package/dist/entries/modal.js +33 -0
- package/dist/entries/modal.js.map +9 -0
- package/dist/entries/product.d.ts +2 -0
- package/dist/entries/product.js +10 -0
- package/dist/entries/product.js.map +9 -0
- package/dist/entries/select-card.d.ts +1 -0
- package/dist/entries/select-card.js +13 -0
- package/dist/entries/select-card.js.map +9 -0
- package/dist/entries/skeletons.d.ts +1 -0
- package/dist/entries/skeletons.js +35 -0
- package/dist/entries/skeletons.js.map +9 -0
- package/dist/entries/surface.d.ts +1 -0
- package/dist/entries/surface.js +10 -0
- package/dist/entries/surface.js.map +9 -0
- package/dist/entries/table.d.ts +1 -0
- package/dist/entries/table.js +65 -0
- package/dist/entries/table.js.map +9 -0
- package/dist/entries/tabs.d.ts +1 -0
- package/dist/entries/tabs.js +20 -0
- package/dist/entries/tabs.js.map +9 -0
- package/dist/entries/theme-styler.d.ts +1 -0
- package/dist/entries/theme-styler.js +26 -0
- package/dist/entries/theme-styler.js.map +9 -0
- package/dist/entries/toast.d.ts +1 -0
- package/dist/entries/toast.js +13 -0
- package/dist/entries/toast.js.map +9 -0
- package/dist/index.d.ts +163 -0
- package/dist/index.js +19864 -0
- package/dist/index.js.map +92 -0
- package/dist/lib/color/className.d.ts +14 -0
- package/dist/lib/color/config.d.ts +82 -0
- package/dist/lib/color/engine.d.ts +221 -0
- package/dist/lib/color/generator.d.ts +45 -0
- package/dist/lib/color/index.d.ts +5 -0
- package/dist/lib/color/safelist.d.ts +1 -0
- package/dist/lib/color/types.d.ts +12 -0
- package/dist/lib/font/config.d.ts +13 -0
- package/dist/lib/font/engine.d.ts +77 -0
- package/dist/lib/font/index.d.ts +3 -0
- package/dist/lib/font/types.d.ts +27 -0
- package/dist/lib/icon/config.d.ts +37 -0
- package/dist/lib/icon/engine.d.ts +84 -0
- package/dist/lib/icon/index.d.ts +3 -0
- package/dist/lib/icon/presets.d.ts +71 -0
- package/dist/lib/layout/config.d.ts +7 -0
- package/dist/lib/layout/engine.d.ts +224 -0
- package/dist/lib/layout/types.d.ts +151 -0
- package/dist/lib/layout/useActiveBreakpoint.d.ts +14 -0
- package/dist/lib/layout/useBlockDrag.d.ts +47 -0
- package/dist/lib/layout/useSectionDrag.d.ts +30 -0
- package/dist/lib/layout/useSpanResize.d.ts +31 -0
- package/dist/lib/localize/data.d.ts +9 -0
- package/dist/lib/product-utils.d.ts +7 -0
- package/dist/lib/sanitize/sanitizeHtml.d.ts +52 -0
- package/dist/lib/theme/motion.d.ts +27 -0
- package/dist/lib/theme/motion.js +12 -0
- package/dist/lib/theme/motion.js.map +9 -0
- package/dist/lib/theme/types.d.ts +133 -0
- package/dist/lib/useUndoRedo.d.ts +21 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/types/product.d.ts +27 -0
- package/package.json +442 -4
|
@@ -0,0 +1,770 @@
|
|
|
1
|
+
// src/config/layout.json
|
|
2
|
+
var layout_default = {
|
|
3
|
+
$schema: "./schema/layout.schema.json",
|
|
4
|
+
settings: {
|
|
5
|
+
maxSiteWidth: 1900,
|
|
6
|
+
contentAreaSpacing: 60,
|
|
7
|
+
contentEdgeSpacing: 5,
|
|
8
|
+
narrowContainerMaxWidth: 750,
|
|
9
|
+
wideAlignmentOffset: 130
|
|
10
|
+
},
|
|
11
|
+
blocks: {
|
|
12
|
+
b_header: {
|
|
13
|
+
name: "Header Utama",
|
|
14
|
+
type: "component",
|
|
15
|
+
componentKey: "HeaderBlock",
|
|
16
|
+
components: [
|
|
17
|
+
"LogoBlock",
|
|
18
|
+
"SearchBar",
|
|
19
|
+
"UserAction"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
b_sidebar: {
|
|
23
|
+
name: "Sidebar Menu",
|
|
24
|
+
type: "component",
|
|
25
|
+
componentKey: "SidebarBlock",
|
|
26
|
+
components: [
|
|
27
|
+
"SidebarNav",
|
|
28
|
+
"ProfileWidget"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
b_content: {
|
|
32
|
+
name: "Konten Utama",
|
|
33
|
+
type: "component",
|
|
34
|
+
componentKey: "ContentBlock",
|
|
35
|
+
components: [
|
|
36
|
+
"PageContent",
|
|
37
|
+
"FooterInfo"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
b_footer: {
|
|
41
|
+
name: "Footer",
|
|
42
|
+
type: "component",
|
|
43
|
+
componentKey: "FooterBlock",
|
|
44
|
+
components: [
|
|
45
|
+
"FooterInfo"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
b_footer_links: {
|
|
49
|
+
name: "Footer Links",
|
|
50
|
+
type: "component",
|
|
51
|
+
componentKey: "FooterLinksBlock",
|
|
52
|
+
components: [
|
|
53
|
+
"FooterLinks",
|
|
54
|
+
"FooterSocial"
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
b_offcanvas_trigger: {
|
|
58
|
+
name: "Toggle Off-Canvas",
|
|
59
|
+
type: "component",
|
|
60
|
+
componentKey: "OffCanvasTriggerBlock"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
presets: {
|
|
64
|
+
default: {
|
|
65
|
+
preset: "default",
|
|
66
|
+
top: {
|
|
67
|
+
sections: [
|
|
68
|
+
{
|
|
69
|
+
id: "sec-migrated-top-default",
|
|
70
|
+
container: {
|
|
71
|
+
base: {
|
|
72
|
+
type: "wrapper"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
items: [
|
|
76
|
+
{
|
|
77
|
+
id: "t1",
|
|
78
|
+
blockId: "b_header",
|
|
79
|
+
grid: {
|
|
80
|
+
span: {
|
|
81
|
+
base: 12
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
main: {
|
|
90
|
+
sections: [
|
|
91
|
+
{
|
|
92
|
+
id: "sec-migrated-main-default",
|
|
93
|
+
container: {
|
|
94
|
+
base: {
|
|
95
|
+
type: "wrapper"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
items: [
|
|
99
|
+
{
|
|
100
|
+
id: "m1",
|
|
101
|
+
blockId: "b_sidebar",
|
|
102
|
+
grid: {
|
|
103
|
+
span: {
|
|
104
|
+
base: 12,
|
|
105
|
+
md: 3
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
id: "m2",
|
|
111
|
+
blockId: "b_content",
|
|
112
|
+
grid: {
|
|
113
|
+
span: {
|
|
114
|
+
base: 12,
|
|
115
|
+
md: 9
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
bottom: {
|
|
124
|
+
sections: []
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
homepage: {
|
|
128
|
+
preset: "homepage",
|
|
129
|
+
top: {
|
|
130
|
+
sections: [
|
|
131
|
+
{
|
|
132
|
+
id: "sec-migrated-top-homepage",
|
|
133
|
+
container: {
|
|
134
|
+
base: {
|
|
135
|
+
type: "full-width-wrapper"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
items: [
|
|
139
|
+
{
|
|
140
|
+
id: "ht1",
|
|
141
|
+
blockId: "b_header",
|
|
142
|
+
grid: {
|
|
143
|
+
span: {
|
|
144
|
+
base: 12
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
main: {
|
|
153
|
+
sections: [
|
|
154
|
+
{
|
|
155
|
+
id: "sec-migrated-main-homepage",
|
|
156
|
+
container: {
|
|
157
|
+
base: {
|
|
158
|
+
type: "wrapper"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
items: [
|
|
162
|
+
{
|
|
163
|
+
id: "hm1",
|
|
164
|
+
blockId: "b_content",
|
|
165
|
+
grid: {
|
|
166
|
+
span: {
|
|
167
|
+
base: 12
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
]
|
|
174
|
+
},
|
|
175
|
+
bottom: {
|
|
176
|
+
sections: [
|
|
177
|
+
{
|
|
178
|
+
id: "sec-migrated-bottom-homepage",
|
|
179
|
+
container: {
|
|
180
|
+
base: {
|
|
181
|
+
type: "full-width-wrapper"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
items: [
|
|
185
|
+
{
|
|
186
|
+
id: "hb1",
|
|
187
|
+
blockId: "b_footer",
|
|
188
|
+
grid: {
|
|
189
|
+
span: {
|
|
190
|
+
base: 12,
|
|
191
|
+
md: 4
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
id: "hb2",
|
|
197
|
+
blockId: "b_footer_links",
|
|
198
|
+
grid: {
|
|
199
|
+
span: {
|
|
200
|
+
base: 12,
|
|
201
|
+
md: 8
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
layout1: {
|
|
211
|
+
preset: "layout1",
|
|
212
|
+
top: {
|
|
213
|
+
sections: [
|
|
214
|
+
{
|
|
215
|
+
id: "sec-migrated-top-homepage",
|
|
216
|
+
container: {
|
|
217
|
+
base: {
|
|
218
|
+
type: "full-width-wrapper"
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
items: [
|
|
222
|
+
{
|
|
223
|
+
id: "item-f5c80c0d-2bda-4dcb-8559-6c97ffeab076",
|
|
224
|
+
blockId: "b_offcanvas_trigger",
|
|
225
|
+
grid: {
|
|
226
|
+
span: {
|
|
227
|
+
base: 2,
|
|
228
|
+
lg: 2,
|
|
229
|
+
md: 1
|
|
230
|
+
},
|
|
231
|
+
visible: {
|
|
232
|
+
base: true,
|
|
233
|
+
lg: false
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
settings: {
|
|
237
|
+
targetSectionId: "left-drawer"
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
id: "ht1",
|
|
242
|
+
blockId: "b_header",
|
|
243
|
+
grid: {
|
|
244
|
+
span: {
|
|
245
|
+
base: 10,
|
|
246
|
+
lg: 12,
|
|
247
|
+
md: 11
|
|
248
|
+
},
|
|
249
|
+
visible: {
|
|
250
|
+
base: true,
|
|
251
|
+
lg: true,
|
|
252
|
+
md: true
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
],
|
|
257
|
+
offcanvasOnMobile: false,
|
|
258
|
+
offcanvasOnTablet: false
|
|
259
|
+
}
|
|
260
|
+
]
|
|
261
|
+
},
|
|
262
|
+
main: {
|
|
263
|
+
sections: [
|
|
264
|
+
{
|
|
265
|
+
id: "sec-65d308df-e219-4244-ae5f-4c43d53f50c2",
|
|
266
|
+
name: "",
|
|
267
|
+
container: {
|
|
268
|
+
base: {
|
|
269
|
+
type: "wrapper"
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
items: [
|
|
273
|
+
{
|
|
274
|
+
id: "item-1bde3173-b5ec-43db-8e5e-a21a9671f50f",
|
|
275
|
+
blockId: "b_sidebar",
|
|
276
|
+
grid: {
|
|
277
|
+
span: {
|
|
278
|
+
base: 12
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
],
|
|
283
|
+
offcanvasOnMobile: true,
|
|
284
|
+
offcanvasPosition: "left",
|
|
285
|
+
offcanvasOnTablet: true,
|
|
286
|
+
visible: {
|
|
287
|
+
base: true,
|
|
288
|
+
lg: false
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
id: "sec-migrated-main-homepage",
|
|
293
|
+
container: {
|
|
294
|
+
base: {
|
|
295
|
+
type: "wrapper"
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
items: [
|
|
299
|
+
{
|
|
300
|
+
id: "hm1",
|
|
301
|
+
blockId: "b_content",
|
|
302
|
+
grid: {
|
|
303
|
+
span: {
|
|
304
|
+
base: 12,
|
|
305
|
+
lg: 9
|
|
306
|
+
},
|
|
307
|
+
visible: {
|
|
308
|
+
base: true,
|
|
309
|
+
lg: true
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
id: "item-98ee929c-25d4-4b70-9b65-6f6f296b69a8",
|
|
315
|
+
blockId: "b_sidebar",
|
|
316
|
+
grid: {
|
|
317
|
+
span: {
|
|
318
|
+
base: 12,
|
|
319
|
+
lg: 3
|
|
320
|
+
},
|
|
321
|
+
visible: {
|
|
322
|
+
base: false,
|
|
323
|
+
md: false,
|
|
324
|
+
lg: true
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
]
|
|
329
|
+
}
|
|
330
|
+
]
|
|
331
|
+
},
|
|
332
|
+
bottom: {
|
|
333
|
+
sections: [
|
|
334
|
+
{
|
|
335
|
+
id: "sec-migrated-bottom-homepage",
|
|
336
|
+
container: {
|
|
337
|
+
base: {
|
|
338
|
+
type: "full-width-wrapper"
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
items: [
|
|
342
|
+
{
|
|
343
|
+
id: "hb1",
|
|
344
|
+
blockId: "b_footer",
|
|
345
|
+
grid: {
|
|
346
|
+
span: {
|
|
347
|
+
base: 12,
|
|
348
|
+
md: 4
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
id: "hb2",
|
|
354
|
+
blockId: "b_footer_links",
|
|
355
|
+
grid: {
|
|
356
|
+
span: {
|
|
357
|
+
base: 12,
|
|
358
|
+
md: 8
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
]
|
|
363
|
+
}
|
|
364
|
+
]
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
blog: {
|
|
368
|
+
preset: "blog",
|
|
369
|
+
top: {
|
|
370
|
+
sections: [
|
|
371
|
+
{
|
|
372
|
+
id: "sec-migrated-top-blog",
|
|
373
|
+
container: {
|
|
374
|
+
base: {
|
|
375
|
+
type: "wrapper"
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
items: [
|
|
379
|
+
{
|
|
380
|
+
id: "bt1",
|
|
381
|
+
blockId: "b_header",
|
|
382
|
+
grid: {
|
|
383
|
+
span: {
|
|
384
|
+
base: 12
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
]
|
|
389
|
+
}
|
|
390
|
+
]
|
|
391
|
+
},
|
|
392
|
+
main: {
|
|
393
|
+
sections: [
|
|
394
|
+
{
|
|
395
|
+
id: "sec-migrated-main-blog",
|
|
396
|
+
container: {
|
|
397
|
+
base: {
|
|
398
|
+
type: "wrapper"
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
items: [
|
|
402
|
+
{
|
|
403
|
+
id: "bm1",
|
|
404
|
+
blockId: "b_content",
|
|
405
|
+
grid: {
|
|
406
|
+
span: {
|
|
407
|
+
base: 12,
|
|
408
|
+
md: 8
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
id: "bm2",
|
|
414
|
+
blockId: "b_sidebar",
|
|
415
|
+
grid: {
|
|
416
|
+
span: {
|
|
417
|
+
base: 12,
|
|
418
|
+
md: 4
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
]
|
|
423
|
+
}
|
|
424
|
+
]
|
|
425
|
+
},
|
|
426
|
+
bottom: {
|
|
427
|
+
sections: []
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
};
|
|
432
|
+
|
|
433
|
+
// src/lib/layout/config.ts
|
|
434
|
+
var DEFAULT_LAYOUT_SETTINGS2 = layout_default.settings;
|
|
435
|
+
var DEFAULT_BLOCKS2 = layout_default.blocks;
|
|
436
|
+
var DEFAULT_LAYOUT_PRESETS2 = layout_default.presets;
|
|
437
|
+
|
|
438
|
+
// src/lib/layout/engine.ts
|
|
439
|
+
var layoutSettings = { ...DEFAULT_LAYOUT_SETTINGS2 };
|
|
440
|
+
function getLayoutSettings2() {
|
|
441
|
+
return layoutSettings;
|
|
442
|
+
}
|
|
443
|
+
function setLayoutSettings2(overrides) {
|
|
444
|
+
layoutSettings = { ...layoutSettings, ...overrides };
|
|
445
|
+
}
|
|
446
|
+
function resetLayoutSettings2() {
|
|
447
|
+
layoutSettings = { ...DEFAULT_LAYOUT_SETTINGS2 };
|
|
448
|
+
}
|
|
449
|
+
var blockRegistry = {};
|
|
450
|
+
function setBlockComponents2(overrides) {
|
|
451
|
+
const normalized = {};
|
|
452
|
+
for (const [key, value] of Object.entries(overrides)) {
|
|
453
|
+
normalized[key] = typeof value === "function" ? { component: value } : value;
|
|
454
|
+
}
|
|
455
|
+
blockRegistry = { ...blockRegistry, ...normalized };
|
|
456
|
+
}
|
|
457
|
+
function getBlockComponent2(key) {
|
|
458
|
+
return blockRegistry[key]?.component;
|
|
459
|
+
}
|
|
460
|
+
function getBlockDefaultProps2(key) {
|
|
461
|
+
return blockRegistry[key]?.defaultProps ?? {};
|
|
462
|
+
}
|
|
463
|
+
function getBlockFields2(key) {
|
|
464
|
+
return blockRegistry[key]?.fields ?? {};
|
|
465
|
+
}
|
|
466
|
+
function getRegisteredBlockComponentKeys2() {
|
|
467
|
+
return Object.keys(blockRegistry);
|
|
468
|
+
}
|
|
469
|
+
function resetBlockComponents2() {
|
|
470
|
+
blockRegistry = {};
|
|
471
|
+
}
|
|
472
|
+
var blocks = { ...DEFAULT_BLOCKS2 };
|
|
473
|
+
function setBlocks2(overrides) {
|
|
474
|
+
blocks = { ...blocks, ...overrides };
|
|
475
|
+
}
|
|
476
|
+
function getBlocks2() {
|
|
477
|
+
return blocks;
|
|
478
|
+
}
|
|
479
|
+
function resetBlocks2() {
|
|
480
|
+
blocks = { ...DEFAULT_BLOCKS2 };
|
|
481
|
+
}
|
|
482
|
+
function removeBlock2(key) {
|
|
483
|
+
const next = { ...blocks };
|
|
484
|
+
delete next[key];
|
|
485
|
+
blocks = next;
|
|
486
|
+
}
|
|
487
|
+
var BREAKPOINT_ORDER = ["base", "sm", "md", "lg", "xl"];
|
|
488
|
+
function resolveResponsive2(value, bp) {
|
|
489
|
+
if (bp === "base")
|
|
490
|
+
return value.base;
|
|
491
|
+
let resolved = value.base;
|
|
492
|
+
for (const candidate of BREAKPOINT_ORDER) {
|
|
493
|
+
if (candidate === "base")
|
|
494
|
+
continue;
|
|
495
|
+
if (value[candidate] !== undefined)
|
|
496
|
+
resolved = value[candidate];
|
|
497
|
+
if (candidate === bp)
|
|
498
|
+
break;
|
|
499
|
+
}
|
|
500
|
+
return resolved;
|
|
501
|
+
}
|
|
502
|
+
function resolveSectionZone2(section, homeZoneKey, bp) {
|
|
503
|
+
if (bp === "base" && section.offcanvasOnMobile)
|
|
504
|
+
return "offcanvas";
|
|
505
|
+
if (bp === "md" && section.offcanvasOnTablet)
|
|
506
|
+
return "offcanvas";
|
|
507
|
+
return homeZoneKey;
|
|
508
|
+
}
|
|
509
|
+
var COL_SPAN_CLASS = {
|
|
510
|
+
base: {
|
|
511
|
+
1: "col-span-1",
|
|
512
|
+
2: "col-span-2",
|
|
513
|
+
3: "col-span-3",
|
|
514
|
+
4: "col-span-4",
|
|
515
|
+
5: "col-span-5",
|
|
516
|
+
6: "col-span-6",
|
|
517
|
+
7: "col-span-7",
|
|
518
|
+
8: "col-span-8",
|
|
519
|
+
9: "col-span-9",
|
|
520
|
+
10: "col-span-10",
|
|
521
|
+
11: "col-span-11",
|
|
522
|
+
12: "col-span-12"
|
|
523
|
+
},
|
|
524
|
+
sm: {
|
|
525
|
+
1: "sm:col-span-1",
|
|
526
|
+
2: "sm:col-span-2",
|
|
527
|
+
3: "sm:col-span-3",
|
|
528
|
+
4: "sm:col-span-4",
|
|
529
|
+
5: "sm:col-span-5",
|
|
530
|
+
6: "sm:col-span-6",
|
|
531
|
+
7: "sm:col-span-7",
|
|
532
|
+
8: "sm:col-span-8",
|
|
533
|
+
9: "sm:col-span-9",
|
|
534
|
+
10: "sm:col-span-10",
|
|
535
|
+
11: "sm:col-span-11",
|
|
536
|
+
12: "sm:col-span-12"
|
|
537
|
+
},
|
|
538
|
+
md: {
|
|
539
|
+
1: "md:col-span-1",
|
|
540
|
+
2: "md:col-span-2",
|
|
541
|
+
3: "md:col-span-3",
|
|
542
|
+
4: "md:col-span-4",
|
|
543
|
+
5: "md:col-span-5",
|
|
544
|
+
6: "md:col-span-6",
|
|
545
|
+
7: "md:col-span-7",
|
|
546
|
+
8: "md:col-span-8",
|
|
547
|
+
9: "md:col-span-9",
|
|
548
|
+
10: "md:col-span-10",
|
|
549
|
+
11: "md:col-span-11",
|
|
550
|
+
12: "md:col-span-12"
|
|
551
|
+
},
|
|
552
|
+
lg: {
|
|
553
|
+
1: "lg:col-span-1",
|
|
554
|
+
2: "lg:col-span-2",
|
|
555
|
+
3: "lg:col-span-3",
|
|
556
|
+
4: "lg:col-span-4",
|
|
557
|
+
5: "lg:col-span-5",
|
|
558
|
+
6: "lg:col-span-6",
|
|
559
|
+
7: "lg:col-span-7",
|
|
560
|
+
8: "lg:col-span-8",
|
|
561
|
+
9: "lg:col-span-9",
|
|
562
|
+
10: "lg:col-span-10",
|
|
563
|
+
11: "lg:col-span-11",
|
|
564
|
+
12: "lg:col-span-12"
|
|
565
|
+
},
|
|
566
|
+
xl: {
|
|
567
|
+
1: "xl:col-span-1",
|
|
568
|
+
2: "xl:col-span-2",
|
|
569
|
+
3: "xl:col-span-3",
|
|
570
|
+
4: "xl:col-span-4",
|
|
571
|
+
5: "xl:col-span-5",
|
|
572
|
+
6: "xl:col-span-6",
|
|
573
|
+
7: "xl:col-span-7",
|
|
574
|
+
8: "xl:col-span-8",
|
|
575
|
+
9: "xl:col-span-9",
|
|
576
|
+
10: "xl:col-span-10",
|
|
577
|
+
11: "xl:col-span-11",
|
|
578
|
+
12: "xl:col-span-12"
|
|
579
|
+
}
|
|
580
|
+
};
|
|
581
|
+
var ORDER_CLASS = {
|
|
582
|
+
base: { 1: "order-1", 2: "order-2", 3: "order-3", 4: "order-4", 5: "order-5", 6: "order-6" },
|
|
583
|
+
sm: { 1: "sm:order-1", 2: "sm:order-2", 3: "sm:order-3", 4: "sm:order-4", 5: "sm:order-5", 6: "sm:order-6" },
|
|
584
|
+
md: { 1: "md:order-1", 2: "md:order-2", 3: "md:order-3", 4: "md:order-4", 5: "md:order-5", 6: "md:order-6" },
|
|
585
|
+
lg: { 1: "lg:order-1", 2: "lg:order-2", 3: "lg:order-3", 4: "lg:order-4", 5: "lg:order-5", 6: "lg:order-6" },
|
|
586
|
+
xl: { 1: "xl:order-1", 2: "xl:order-2", 3: "xl:order-3", 4: "xl:order-4", 5: "xl:order-5", 6: "xl:order-6" }
|
|
587
|
+
};
|
|
588
|
+
var VISIBILITY_CLASS = {
|
|
589
|
+
base: { show: "", hide: "hidden" },
|
|
590
|
+
sm: { show: "sm:block", hide: "sm:hidden" },
|
|
591
|
+
md: { show: "md:block", hide: "md:hidden" },
|
|
592
|
+
lg: { show: "lg:block", hide: "lg:hidden" },
|
|
593
|
+
xl: { show: "xl:block", hide: "xl:hidden" }
|
|
594
|
+
};
|
|
595
|
+
var BREAKPOINT_PX2 = {
|
|
596
|
+
base: 0,
|
|
597
|
+
sm: 640,
|
|
598
|
+
md: 768,
|
|
599
|
+
lg: 1024,
|
|
600
|
+
xl: 1280
|
|
601
|
+
};
|
|
602
|
+
var ALIGN_CLASS = {
|
|
603
|
+
base: { left: "justify-self-start text-left", center: "justify-self-center text-center", right: "justify-self-end text-right", justify: "text-justify", auto: "" },
|
|
604
|
+
sm: { left: "sm:justify-self-start sm:text-left", center: "sm:justify-self-center sm:text-center", right: "sm:justify-self-end sm:text-right", justify: "sm:text-justify", auto: "" },
|
|
605
|
+
md: { left: "md:justify-self-start md:text-left", center: "md:justify-self-center md:text-center", right: "md:justify-self-end md:text-right", justify: "md:text-justify", auto: "" },
|
|
606
|
+
lg: { left: "lg:justify-self-start lg:text-left", center: "lg:justify-self-center lg:text-center", right: "lg:justify-self-end lg:text-right", justify: "lg:text-justify", auto: "" },
|
|
607
|
+
xl: { left: "xl:justify-self-start xl:text-left", center: "xl:justify-self-center xl:text-center", right: "xl:justify-self-end xl:text-right", justify: "xl:text-justify", auto: "" }
|
|
608
|
+
};
|
|
609
|
+
var CONTAINER_CLASS = {
|
|
610
|
+
base: { wrapper: "container mx-auto max-w-7xl px-4", "full-width-wrapper": "w-full", "full-width": "w-full", custom: "w-full" },
|
|
611
|
+
sm: { wrapper: "sm:container sm:mx-auto sm:max-w-7xl sm:px-4", "full-width-wrapper": "sm:w-full", "full-width": "sm:w-full", custom: "sm:w-full" },
|
|
612
|
+
md: { wrapper: "md:container md:mx-auto md:max-w-7xl md:px-4", "full-width-wrapper": "md:w-full", "full-width": "md:w-full", custom: "md:w-full" },
|
|
613
|
+
lg: { wrapper: "lg:container lg:mx-auto lg:max-w-7xl lg:px-4", "full-width-wrapper": "lg:w-full", "full-width": "lg:w-full", custom: "lg:w-full" },
|
|
614
|
+
xl: { wrapper: "xl:container xl:mx-auto xl:max-w-7xl xl:px-4", "full-width-wrapper": "xl:w-full", "full-width": "xl:w-full", custom: "xl:w-full" }
|
|
615
|
+
};
|
|
616
|
+
function getColSpanClass2(span, bp = "base") {
|
|
617
|
+
return COL_SPAN_CLASS[bp][span] ?? (bp === "base" ? "col-span-full" : "");
|
|
618
|
+
}
|
|
619
|
+
function gridClassNames2(grid, forceBp) {
|
|
620
|
+
if (forceBp) {
|
|
621
|
+
const span = resolveResponsive2(grid.span, forceBp);
|
|
622
|
+
const classes = [getColSpanClass2(span, "base")];
|
|
623
|
+
if (grid.order) {
|
|
624
|
+
const order = resolveResponsive2({ ...grid.order, base: grid.order.base ?? 0 }, forceBp);
|
|
625
|
+
if (order && ORDER_CLASS.base[order])
|
|
626
|
+
classes.push(ORDER_CLASS.base[order]);
|
|
627
|
+
}
|
|
628
|
+
if (grid.align) {
|
|
629
|
+
const align = resolveResponsive2({ ...grid.align, base: grid.align.base ?? "auto" }, forceBp);
|
|
630
|
+
if (align && ALIGN_CLASS.base[align])
|
|
631
|
+
classes.push(ALIGN_CLASS.base[align]);
|
|
632
|
+
}
|
|
633
|
+
if (grid.visible) {
|
|
634
|
+
const visible = resolveResponsive2({ ...grid.visible, base: grid.visible.base ?? true }, forceBp);
|
|
635
|
+
if (visible === false)
|
|
636
|
+
classes.push("hidden");
|
|
637
|
+
}
|
|
638
|
+
return classes.filter(Boolean).join(" ");
|
|
639
|
+
}
|
|
640
|
+
const classes = [];
|
|
641
|
+
for (const bp of Object.keys(grid.span)) {
|
|
642
|
+
const span = grid.span[bp];
|
|
643
|
+
if (span !== undefined)
|
|
644
|
+
classes.push(getColSpanClass2(span, bp));
|
|
645
|
+
}
|
|
646
|
+
if (grid.order) {
|
|
647
|
+
for (const bp of Object.keys(grid.order)) {
|
|
648
|
+
const order = grid.order[bp];
|
|
649
|
+
if (order !== undefined && ORDER_CLASS[bp][order])
|
|
650
|
+
classes.push(ORDER_CLASS[bp][order]);
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
if (grid.align) {
|
|
654
|
+
for (const bp of Object.keys(grid.align)) {
|
|
655
|
+
const align = grid.align[bp];
|
|
656
|
+
if (align && ALIGN_CLASS[bp][align])
|
|
657
|
+
classes.push(ALIGN_CLASS[bp][align]);
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
if (grid.visible) {
|
|
661
|
+
for (const bp of Object.keys(grid.visible)) {
|
|
662
|
+
const visible = grid.visible[bp];
|
|
663
|
+
if (visible !== undefined)
|
|
664
|
+
classes.push(VISIBILITY_CLASS[bp][visible ? "show" : "hide"]);
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
return classes.filter(Boolean).join(" ");
|
|
668
|
+
}
|
|
669
|
+
function sectionVisibilityClass2(visible, forceBp) {
|
|
670
|
+
if (!visible)
|
|
671
|
+
return "";
|
|
672
|
+
if (forceBp) {
|
|
673
|
+
const v = resolveResponsive2({ ...visible, base: visible.base ?? true }, forceBp);
|
|
674
|
+
return v === false ? "hidden" : "";
|
|
675
|
+
}
|
|
676
|
+
const classes = [];
|
|
677
|
+
for (const bp of Object.keys(visible)) {
|
|
678
|
+
const v = visible[bp];
|
|
679
|
+
if (v !== undefined)
|
|
680
|
+
classes.push(VISIBILITY_CLASS[bp][v ? "show" : "hide"]);
|
|
681
|
+
}
|
|
682
|
+
return classes.filter(Boolean).join(" ");
|
|
683
|
+
}
|
|
684
|
+
function containerClassNames2(container) {
|
|
685
|
+
const classes = [];
|
|
686
|
+
for (const bp of Object.keys(container)) {
|
|
687
|
+
const setting = container[bp];
|
|
688
|
+
if (setting)
|
|
689
|
+
classes.push(CONTAINER_CLASS[bp][setting.type]);
|
|
690
|
+
}
|
|
691
|
+
return classes.filter(Boolean).join(" ");
|
|
692
|
+
}
|
|
693
|
+
var currentLayout = DEFAULT_LAYOUT_PRESETS2.default;
|
|
694
|
+
function setLayout2(schema) {
|
|
695
|
+
currentLayout = schema;
|
|
696
|
+
}
|
|
697
|
+
function getLayout2() {
|
|
698
|
+
return currentLayout;
|
|
699
|
+
}
|
|
700
|
+
function resetLayout2() {
|
|
701
|
+
currentLayout = DEFAULT_LAYOUT_PRESETS2.default;
|
|
702
|
+
}
|
|
703
|
+
function createSection2() {
|
|
704
|
+
return { id: `sec-${crypto.randomUUID()}`, name: "", container: { base: { type: "wrapper" } }, items: [] };
|
|
705
|
+
}
|
|
706
|
+
function sectionHtmlId2(section) {
|
|
707
|
+
const slug = (section.name ?? "").trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
708
|
+
return slug || section.id;
|
|
709
|
+
}
|
|
710
|
+
var customPresets = {};
|
|
711
|
+
function registerLayoutPreset2(name, schema) {
|
|
712
|
+
customPresets[name] = schema;
|
|
713
|
+
saveLayoutToLocalStorage2();
|
|
714
|
+
}
|
|
715
|
+
function getLayoutPresets2() {
|
|
716
|
+
return { ...DEFAULT_LAYOUT_PRESETS2, ...customPresets };
|
|
717
|
+
}
|
|
718
|
+
function exportLayoutConfig2() {
|
|
719
|
+
return {
|
|
720
|
+
blocks: { ...blocks },
|
|
721
|
+
layout: JSON.parse(JSON.stringify(currentLayout)),
|
|
722
|
+
customPresets: JSON.parse(JSON.stringify(customPresets))
|
|
723
|
+
};
|
|
724
|
+
}
|
|
725
|
+
function importLayoutConfig2(config) {
|
|
726
|
+
if (config.blocks)
|
|
727
|
+
blocks = { ...blocks, ...config.blocks };
|
|
728
|
+
if (config.layout)
|
|
729
|
+
currentLayout = config.layout;
|
|
730
|
+
if (config.customPresets)
|
|
731
|
+
customPresets = { ...customPresets, ...config.customPresets };
|
|
732
|
+
}
|
|
733
|
+
function resetLayoutConfig2() {
|
|
734
|
+
blocks = { ...DEFAULT_BLOCKS2 };
|
|
735
|
+
currentLayout = DEFAULT_LAYOUT_PRESETS2.default;
|
|
736
|
+
customPresets = {};
|
|
737
|
+
}
|
|
738
|
+
var LOCAL_STORAGE_KEY = "deweb-ui-kit:layout-builder";
|
|
739
|
+
function saveLayoutToLocalStorage2() {
|
|
740
|
+
if (typeof localStorage === "undefined")
|
|
741
|
+
return;
|
|
742
|
+
try {
|
|
743
|
+
localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(exportLayoutConfig2()));
|
|
744
|
+
} catch (err) {
|
|
745
|
+
console.warn("[Deweb UI] Gagal simpan Layout Builder ke localStorage:", err);
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
function restoreLayoutFromLocalStorage2() {
|
|
749
|
+
if (typeof localStorage === "undefined")
|
|
750
|
+
return false;
|
|
751
|
+
const raw = localStorage.getItem(LOCAL_STORAGE_KEY);
|
|
752
|
+
if (!raw)
|
|
753
|
+
return false;
|
|
754
|
+
try {
|
|
755
|
+
importLayoutConfig2(JSON.parse(raw));
|
|
756
|
+
return true;
|
|
757
|
+
} catch (err) {
|
|
758
|
+
console.warn("[Deweb UI] Gagal restore Layout Builder dari localStorage (data korup?):", err);
|
|
759
|
+
return false;
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
function clearLayoutLocalStorage2() {
|
|
763
|
+
if (typeof localStorage === "undefined")
|
|
764
|
+
return;
|
|
765
|
+
localStorage.removeItem(LOCAL_STORAGE_KEY);
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
export { DEFAULT_LAYOUT_SETTINGS2, DEFAULT_BLOCKS2, DEFAULT_LAYOUT_PRESETS2, getLayoutSettings2, setLayoutSettings2, resetLayoutSettings2, setBlockComponents2, getBlockComponent2, getBlockDefaultProps2, getBlockFields2, getRegisteredBlockComponentKeys2, resetBlockComponents2, setBlocks2, getBlocks2, resetBlocks2, removeBlock2, resolveResponsive2, resolveSectionZone2, BREAKPOINT_PX2, getColSpanClass2, gridClassNames2, sectionVisibilityClass2, containerClassNames2, setLayout2, getLayout2, resetLayout2, createSection2, sectionHtmlId2, registerLayoutPreset2, getLayoutPresets2, exportLayoutConfig2, importLayoutConfig2, resetLayoutConfig2, saveLayoutToLocalStorage2, restoreLayoutFromLocalStorage2, clearLayoutLocalStorage2 };
|
|
769
|
+
|
|
770
|
+
//# debugId=7C14D5BF0201B40A64756E2164756E21
|