ixia-ui-react 1.7.0 → 2.0.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 (276) hide show
  1. package/README.md +24 -1
  2. package/dist/accordion/index.d.ts +41 -0
  3. package/dist/accordion/index.js +142 -0
  4. package/dist/accordion/index.js.map +1 -0
  5. package/dist/alert/index.d.ts +22 -0
  6. package/dist/alert/index.js +1 -0
  7. package/dist/alert-Dcu9R8CY.js +73 -0
  8. package/dist/alert-Dcu9R8CY.js.map +1 -0
  9. package/dist/alert-dialog/index.d.ts +39 -0
  10. package/dist/alert-dialog/index.js +134 -0
  11. package/dist/alert-dialog/index.js.map +1 -0
  12. package/dist/autocomplete/index.d.ts +2 -0
  13. package/dist/autocomplete/index.js +1 -0
  14. package/dist/autocomplete-BfpWVO1l.js +169 -0
  15. package/dist/autocomplete-BfpWVO1l.js.map +1 -0
  16. package/dist/avatar/index.d.ts +2 -0
  17. package/dist/avatar/index.js +1 -0
  18. package/dist/avatar-Bp4gZh21.js +93 -0
  19. package/dist/avatar-Bp4gZh21.js.map +1 -0
  20. package/dist/badge/index.d.ts +2 -0
  21. package/dist/badge/index.js +1 -0
  22. package/dist/badge-Cl-9WTW-.js +160 -0
  23. package/dist/badge-Cl-9WTW-.js.map +1 -0
  24. package/dist/bento-box/index.d.ts +30 -0
  25. package/dist/bento-box/index.js +103 -0
  26. package/dist/bento-box/index.js.map +1 -0
  27. package/dist/breadcrumb/index.d.ts +18 -0
  28. package/dist/breadcrumb/index.js +58 -0
  29. package/dist/breadcrumb/index.js.map +1 -0
  30. package/dist/button/index.d.ts +3 -0
  31. package/dist/button/index.js +1 -0
  32. package/dist/button-BpUC-R1J.js +307 -0
  33. package/dist/button-BpUC-R1J.js.map +1 -0
  34. package/dist/button-group/index.d.ts +2 -0
  35. package/dist/button-group/index.js +1 -0
  36. package/dist/button-group-7azbqlcO.js +269 -0
  37. package/dist/button-group-7azbqlcO.js.map +1 -0
  38. package/dist/button.types-BFKrBCGd.d.ts +10 -0
  39. package/dist/calendar/index.d.ts +63 -0
  40. package/dist/calendar/index.js +292 -0
  41. package/dist/calendar/index.js.map +1 -0
  42. package/dist/chart/index.d.ts +87 -0
  43. package/dist/chart/index.js +262 -0
  44. package/dist/chart/index.js.map +1 -0
  45. package/dist/checkbox/index.d.ts +2 -0
  46. package/dist/checkbox/index.js +1 -0
  47. package/dist/checkbox-BuUZ1Lly.js +54 -0
  48. package/dist/checkbox-BuUZ1Lly.js.map +1 -0
  49. package/dist/checkbox-group/index.d.ts +6 -0
  50. package/dist/checkbox-group/index.js +17 -0
  51. package/dist/checkbox-group/index.js.map +1 -0
  52. package/dist/cn-BDi0DfT5.js +29 -0
  53. package/dist/cn-BDi0DfT5.js.map +1 -0
  54. package/dist/code-block/index.d.ts +50 -0
  55. package/dist/code-block/index.js +208 -0
  56. package/dist/code-block/index.js.map +1 -0
  57. package/dist/collapsible/index.d.ts +2 -0
  58. package/dist/collapsible/index.js +1 -0
  59. package/dist/collapsible-BVqrh0Q0.js +44 -0
  60. package/dist/collapsible-BVqrh0Q0.js.map +1 -0
  61. package/dist/color-channel-slider/index.d.ts +2 -0
  62. package/dist/color-channel-slider/index.js +1 -0
  63. package/dist/color-channel-slider-h8mUPJ35.js +70 -0
  64. package/dist/color-channel-slider-h8mUPJ35.js.map +1 -0
  65. package/dist/color-picker/index.d.ts +137 -0
  66. package/dist/color-picker/index.js +621 -0
  67. package/dist/color-picker/index.js.map +1 -0
  68. package/dist/combobox/index.d.ts +64 -0
  69. package/dist/combobox/index.js +289 -0
  70. package/dist/combobox/index.js.map +1 -0
  71. package/dist/context-menu/index.d.ts +49 -0
  72. package/dist/context-menu/index.js +166 -0
  73. package/dist/context-menu/index.js.map +1 -0
  74. package/dist/dialog/index.d.ts +36 -0
  75. package/dist/dialog/index.js +119 -0
  76. package/dist/dialog/index.js.map +1 -0
  77. package/dist/drawer/index.d.ts +31 -0
  78. package/dist/drawer/index.js +95 -0
  79. package/dist/drawer/index.js.map +1 -0
  80. package/dist/dropzone/index.d.ts +70 -0
  81. package/dist/dropzone/index.js +479 -0
  82. package/dist/dropzone/index.js.map +1 -0
  83. package/dist/field/index.d.ts +2 -0
  84. package/dist/field/index.js +1 -0
  85. package/dist/field-DTL7eA5y.js +254 -0
  86. package/dist/field-DTL7eA5y.js.map +1 -0
  87. package/dist/form/index.d.ts +220 -0
  88. package/dist/form/index.js +3 -0
  89. package/dist/form-BxMg796f.js +192 -0
  90. package/dist/form-BxMg796f.js.map +1 -0
  91. package/dist/has-single-element-child-DLGI0Dh2.js +12 -0
  92. package/dist/has-single-element-child-DLGI0Dh2.js.map +1 -0
  93. package/dist/hooks/index.d.ts +26 -0
  94. package/dist/hooks/index.js +1 -0
  95. package/dist/hooks-DUm-q_ig.js +68 -0
  96. package/dist/hooks-DUm-q_ig.js.map +1 -0
  97. package/dist/icon/index.d.ts +2 -0
  98. package/dist/icon/index.js +1 -0
  99. package/dist/icon-D3JWfCa2.js +85 -0
  100. package/dist/icon-D3JWfCa2.js.map +1 -0
  101. package/dist/icon-container/index.d.ts +10 -0
  102. package/dist/icon-container/index.js +64 -0
  103. package/dist/icon-container/index.js.map +1 -0
  104. package/dist/index-0ZQzIKoE.d.ts +11 -0
  105. package/dist/index-B3MK1QYh.d.ts +11 -0
  106. package/dist/index-BJVMIPq4.d.ts +54 -0
  107. package/dist/index-BsV-u_jc.d.ts +4 -0
  108. package/dist/index-BygR7cUT.d.ts +22 -0
  109. package/dist/index-BzTOLSgZ.d.ts +9 -0
  110. package/dist/index-C15xiG9O.d.ts +14 -0
  111. package/dist/index-C2zco6-C.d.ts +15 -0
  112. package/dist/index-CIDOd4Z8.d.ts +56 -0
  113. package/dist/index-CQti9gFb.d.ts +49 -0
  114. package/dist/index-CiE-Rqit.d.ts +70 -0
  115. package/dist/index-D1kkOg9k.d.ts +14 -0
  116. package/dist/index-DLfdAked.d.ts +34 -0
  117. package/dist/index-DMaW_XF1.d.ts +24 -0
  118. package/dist/index-Db_QGr6S.d.ts +5 -0
  119. package/dist/index-DdFxZ3Xr.d.ts +22 -0
  120. package/dist/index-DfNHJF0t.d.ts +33 -0
  121. package/dist/index-DyQYoAUf.d.ts +29 -0
  122. package/dist/index-N2CBSUDu.d.ts +14 -0
  123. package/dist/index-PuhTRMce.d.ts +11 -0
  124. package/dist/index-Wb_tILYa.d.ts +24 -0
  125. package/dist/index-bVyqfhJS.d.ts +4 -0
  126. package/dist/index-x4f8gnaI.d.ts +15 -0
  127. package/dist/input/index.d.ts +3 -0
  128. package/dist/input/index.js +1 -0
  129. package/dist/input-Laj6dwtK.js +179 -0
  130. package/dist/input-Laj6dwtK.js.map +1 -0
  131. package/dist/input-group/index.d.ts +2 -0
  132. package/dist/input-group/index.js +1 -0
  133. package/dist/input-group-CgdazGrY.js +111 -0
  134. package/dist/input-group-CgdazGrY.js.map +1 -0
  135. package/dist/input-otp/index.d.ts +13 -0
  136. package/dist/input-otp/index.js +44 -0
  137. package/dist/input-otp/index.js.map +1 -0
  138. package/dist/input.types-816rEVWU.d.ts +20 -0
  139. package/dist/input.types-D0gyoaQv.js +48 -0
  140. package/dist/input.types-D0gyoaQv.js.map +1 -0
  141. package/dist/kbd/index.d.ts +9 -0
  142. package/dist/kbd/index.js +25 -0
  143. package/dist/kbd/index.js.map +1 -0
  144. package/dist/label/index.d.ts +8 -0
  145. package/dist/label/index.js +1 -0
  146. package/dist/label-BgpayDvN.js +27 -0
  147. package/dist/label-BgpayDvN.js.map +1 -0
  148. package/dist/layer-tree/index.d.ts +728 -0
  149. package/dist/layer-tree/index.js +685 -0
  150. package/dist/layer-tree/index.js.map +1 -0
  151. package/dist/map/google/index.d.ts +143 -0
  152. package/dist/map/google/index.js +445 -0
  153. package/dist/map/google/index.js.map +1 -0
  154. package/dist/map/index.d.ts +94 -0
  155. package/dist/map/index.js +208 -0
  156. package/dist/map/index.js.map +1 -0
  157. package/dist/map.context-Dw1D7E8m.js +11 -0
  158. package/dist/map.context-Dw1D7E8m.js.map +1 -0
  159. package/dist/menu/index.d.ts +2 -0
  160. package/dist/menu/index.js +1 -0
  161. package/dist/menu-sf13cnGp.js +173 -0
  162. package/dist/menu-sf13cnGp.js.map +1 -0
  163. package/dist/menu-tone-DWBEHoX2.js +22 -0
  164. package/dist/menu-tone-DWBEHoX2.js.map +1 -0
  165. package/dist/meter/index.d.ts +2 -0
  166. package/dist/meter/index.js +1 -0
  167. package/dist/meter-HD5taq57.js +116 -0
  168. package/dist/meter-HD5taq57.js.map +1 -0
  169. package/dist/nav-bar/index.d.ts +25 -0
  170. package/dist/nav-bar/index.js +133 -0
  171. package/dist/nav-bar/index.js.map +1 -0
  172. package/dist/navigation-menu/index.d.ts +43 -0
  173. package/dist/navigation-menu/index.js +176 -0
  174. package/dist/navigation-menu/index.js.map +1 -0
  175. package/dist/number-field/index.d.ts +14 -0
  176. package/dist/number-field/index.js +116 -0
  177. package/dist/number-field/index.js.map +1 -0
  178. package/dist/popover/index.d.ts +2 -0
  179. package/dist/popover/index.js +1 -0
  180. package/dist/popover-B1s4xXrX.js +114 -0
  181. package/dist/popover-B1s4xXrX.js.map +1 -0
  182. package/dist/preview-card/index.d.ts +13 -0
  183. package/dist/preview-card/index.js +35 -0
  184. package/dist/preview-card/index.js.map +1 -0
  185. package/dist/profile/index.d.ts +21 -0
  186. package/dist/profile/index.js +52 -0
  187. package/dist/profile/index.js.map +1 -0
  188. package/dist/progress/index.d.ts +23 -0
  189. package/dist/progress/index.js +97 -0
  190. package/dist/progress/index.js.map +1 -0
  191. package/dist/radar-ping/index.d.ts +11 -0
  192. package/dist/radar-ping/index.js +49 -0
  193. package/dist/radar-ping/index.js.map +1 -0
  194. package/dist/radio-group/index.d.ts +2 -0
  195. package/dist/radio-group/index.js +1 -0
  196. package/dist/radio-group-Dj43u35Z.js +47 -0
  197. package/dist/radio-group-Dj43u35Z.js.map +1 -0
  198. package/dist/resizeable/index.d.ts +11 -0
  199. package/dist/resizeable/index.js +31 -0
  200. package/dist/resizeable/index.js.map +1 -0
  201. package/dist/scroll-area/index.d.ts +11 -0
  202. package/dist/scroll-area/index.js +51 -0
  203. package/dist/scroll-area/index.js.map +1 -0
  204. package/dist/select/index.d.ts +2 -0
  205. package/dist/select/index.js +1 -0
  206. package/dist/select-DncJXYim.js +159 -0
  207. package/dist/select-DncJXYim.js.map +1 -0
  208. package/dist/separator/index.d.ts +2 -0
  209. package/dist/separator/index.js +1 -0
  210. package/dist/separator-DgIQp1cB.js +97 -0
  211. package/dist/separator-DgIQp1cB.js.map +1 -0
  212. package/dist/sidebar/index.d.ts +80 -0
  213. package/dist/sidebar/index.js +334 -0
  214. package/dist/sidebar/index.js.map +1 -0
  215. package/dist/site-header/index.d.ts +22 -0
  216. package/dist/site-header/index.js +55 -0
  217. package/dist/site-header/index.js.map +1 -0
  218. package/dist/skeleton/index.d.ts +4 -0
  219. package/dist/skeleton/index.js +1 -0
  220. package/dist/skeleton-DSG3FWby.js +13 -0
  221. package/dist/skeleton-DSG3FWby.js.map +1 -0
  222. package/dist/slider/index.d.ts +2 -0
  223. package/dist/slider/index.js +1 -0
  224. package/dist/slider-D_XlV4OW.js +114 -0
  225. package/dist/slider-D_XlV4OW.js.map +1 -0
  226. package/dist/slider-group/index.d.ts +46 -0
  227. package/dist/slider-group/index.js +198 -0
  228. package/dist/slider-group/index.js.map +1 -0
  229. package/dist/styles.css +6 -17
  230. package/dist/switch/index.d.ts +2 -0
  231. package/dist/switch/index.js +1 -0
  232. package/dist/switch-DXHixGHe.js +23 -0
  233. package/dist/switch-DXHixGHe.js.map +1 -0
  234. package/dist/table/index.d.ts +920 -0
  235. package/dist/table/index.js +1544 -0
  236. package/dist/table/index.js.map +1 -0
  237. package/dist/tabs/index.d.ts +2 -0
  238. package/dist/tabs/index.js +1 -0
  239. package/dist/tabs-DTC7coap.js +270 -0
  240. package/dist/tabs-DTC7coap.js.map +1 -0
  241. package/dist/text-area/index.d.ts +2 -0
  242. package/dist/text-area/index.js +1 -0
  243. package/dist/text-area-H6HjKnv_.js +50 -0
  244. package/dist/text-area-H6HjKnv_.js.map +1 -0
  245. package/dist/themes/hogarth.css +0 -4
  246. package/dist/themes/mabel.css +0 -4
  247. package/dist/themes/maculata.css +0 -4
  248. package/dist/themes/monadelpha.css +0 -4
  249. package/dist/themes/venus.css +0 -4
  250. package/dist/themes/viridiflora.css +0 -4
  251. package/dist/toast/index.d.ts +65 -0
  252. package/dist/toast/index.js +216 -0
  253. package/dist/toast/index.js.map +1 -0
  254. package/dist/toggle/index.d.ts +2 -0
  255. package/dist/toggle/index.js +1 -0
  256. package/dist/toggle-ZT9thVmz.js +73 -0
  257. package/dist/toggle-ZT9thVmz.js.map +1 -0
  258. package/dist/toggle-group/index.d.ts +10 -0
  259. package/dist/toggle-group/index.js +63 -0
  260. package/dist/toggle-group/index.js.map +1 -0
  261. package/dist/toggle-group-context-CBNZEf1I.js +6 -0
  262. package/dist/toggle-group-context-CBNZEf1I.js.map +1 -0
  263. package/dist/tooltip/index.d.ts +18 -0
  264. package/dist/tooltip/index.js +1 -0
  265. package/dist/tooltip-B6z3tDbW.js +41 -0
  266. package/dist/tooltip-B6z3tDbW.js.map +1 -0
  267. package/dist/trim-text-children-CQRFg2fL.js +33 -0
  268. package/dist/trim-text-children-CQRFg2fL.js.map +1 -0
  269. package/dist/utils/index.d.ts +4 -0
  270. package/dist/utils/index.js +3 -0
  271. package/dist/utils-BI2x7nW5.js +5 -0
  272. package/dist/utils-BI2x7nW5.js.map +1 -0
  273. package/package.json +100 -31
  274. package/dist/index.d.ts +0 -7993
  275. package/dist/index.js +0 -17219
  276. package/dist/index.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["useTableContext","useTableContext","useTableContext","useTableContext","useCellContext","useTableContext","useTableContext","useCellContext","useTableContext","useCellContext","useTableContext","useTableContext","useCellContext","useCellContext","useTableContext","useCellContext","useTableContext"],"sources":["../../src/components/layer-tree/layer-tree-utils.ts","../../src/components/layer-tree/layer-tree-context.tsx","../../src/components/layer-tree/layer-tree.types.ts","../../src/components/layer-tree/layer-tree.tsx","../../src/components/layer-tree/layer-tree-row.tsx","../../src/components/layer-tree/layer-tree-body.tsx","../../src/components/layer-tree/layer-tree-expand-all.tsx","../../src/components/layer-tree/layer-tree-footer.tsx","../../src/components/layer-tree/layer-tree-icon-cell.tsx","../../src/components/layer-tree/layer-tree-locked-all.tsx","../../src/components/layer-tree/layer-tree-locked-cell.tsx","../../src/components/layer-tree/layer-tree-node-icon.tsx","../../src/components/layer-tree/layer-tree-search.tsx","../../src/components/layer-tree/layer-tree-sort.tsx","../../src/components/layer-tree/layer-tree-text-cell.tsx","../../src/components/layer-tree/layer-tree-trigger-cell.tsx","../../src/components/layer-tree/layer-tree-visibility-all.tsx","../../src/components/layer-tree/layer-tree-visibility-cell.tsx","../../src/components/layer-tree/layer-tree-table.tsx"],"sourcesContent":["import {\n assignPrototypeAPIs,\n assignTableAPIs,\n functionalUpdate,\n makeStateUpdater,\n} from '@tanstack/react-table'\nimport type {\n Row,\n RowData,\n Table,\n TableFeature,\n TableFeatures,\n Updater,\n} from '@tanstack/react-table'\n\nimport type { RowLockedState, RowVisibilityState } from './layer-tree.types'\n\n/**\n * Base constraint for tree node data types used by layer tree utilities.\n */\ninterface LayerTreeNodeBase {\n id: string\n children?: this[]\n}\n\ntype LayerTreeTable = Table<TableFeatures, RowData>\ntype LayerTreeRow = Row<TableFeatures, RowData>\n\n/**\n * Recursively searches for a node by ID in a nested tree structure.\n *\n * @param nodes - The array of nodes to search through\n * @param nodeId - The ID of the node to find\n * @returns The matching node or `null` if not found\n *\n * @example\n * ```ts\n * const node = findLayerTreeNode(layers, 'layer-001')\n * if (node) console.log(node.name)\n * ```\n */\nconst findLayerTreeNode = <TData extends LayerTreeNodeBase>(\n nodes: TData[],\n nodeId: string,\n ): TData | null => {\n for (const node of nodes) {\n if (node.id === nodeId) {\n return node\n }\n if (node.children?.length) {\n const match = findLayerTreeNode(node.children, nodeId)\n if (match) {\n return match\n }\n }\n }\n // oxlint-disable-next-line unicorn/no-null\n return null\n },\n /**\n * Removes a node from a nested tree structure by ID.\n *\n * @param nodes - The array of nodes to remove from\n * @param nodeId - The ID of the node to remove\n * @returns An object containing the updated tree and the removed node (if found)\n *\n * @example\n * ```ts\n * const { nextNodes, removedNode } = removeLayerTreeNode(layers, 'layer-001')\n * if (removedNode) setLayers(nextNodes)\n * ```\n */\n removeLayerTreeNode = <TData extends LayerTreeNodeBase>(\n nodes: TData[],\n nodeId: string,\n ): { nextNodes: TData[]; removedNode: TData | null } => {\n // oxlint-disable-next-line unicorn/no-null\n let removedNode: TData | null = null\n\n const nextNodes = nodes.flatMap((node) => {\n if (node.id === nodeId) {\n removedNode = node\n return []\n }\n if (!node.children?.length) {\n return [node]\n }\n\n const { nextNodes: nextChildren, removedNode: nestedRemovedNode } = removeLayerTreeNode(\n node.children,\n nodeId,\n )\n if (!nestedRemovedNode) {\n return [node]\n }\n\n removedNode = nestedRemovedNode\n return [{ ...node, children: nextChildren }]\n })\n\n return { nextNodes, removedNode }\n },\n /**\n * Inserts a node as a child of the specified folder node.\n *\n * @param nodes - The array of nodes to search through\n * @param folderId - The ID of the folder to insert into\n * @param nodeToInsert - The node to insert\n * @returns A new tree with the node inserted\n *\n * @example\n * ```ts\n * const newTree = insertLayerTreeNode(layers, 'folder-001', newLayer)\n * setLayers(newTree)\n * ```\n */\n insertLayerTreeNode = <TData extends LayerTreeNodeBase>(\n nodes: TData[],\n folderId: string,\n nodeToInsert: TData,\n ): TData[] =>\n nodes.map((node) => {\n if (node.id === folderId) {\n return { ...node, children: [...(node.children ?? []), nodeToInsert] }\n }\n if (!node.children?.length) {\n return node\n }\n return {\n ...node,\n children: insertLayerTreeNode(node.children, folderId, nodeToInsert),\n }\n }),\n containsLayerTreeNode = (nodes: LayerTreeNodeBase[], nodeId: string) =>\n Boolean(findLayerTreeNode(nodes, nodeId)),\n moveNodeIntoFolder = <TData extends LayerTreeNodeBase>(\n nodes: TData[],\n sourceId: string,\n targetId: string,\n ): TData[] => {\n const { nextNodes, removedNode } = removeLayerTreeNode(nodes, sourceId)\n if (!removedNode) {\n return nodes\n }\n return insertLayerTreeNode(nextNodes, targetId, removedNode)\n },\n /**\n * Moves a node from its current position into a target folder.\n * Prevents circular references by checking if target is a descendant of source.\n *\n * @param nodes - The array of nodes\n * @param sourceId - The ID of the node to move\n * @param targetId - The ID of the folder to move into\n * @returns A new tree with the node moved, or the original tree if the move is invalid\n *\n * @example\n * ```ts\n * const newTree = moveLayerTreeNode(layers, 'layer-001', 'folder-002')\n * setLayers(newTree)\n * ```\n */\n moveLayerTreeNode = <TData extends LayerTreeNodeBase>(\n nodes: TData[],\n sourceId: string,\n targetId: string,\n ): TData[] => {\n if (sourceId === targetId) {\n return nodes\n }\n\n const sourceNode = findLayerTreeNode(nodes, sourceId),\n targetNode = findLayerTreeNode(nodes, targetId)\n\n // Target must exist and be a folder (have children array)\n if (!sourceNode || !targetNode?.children) {\n return nodes\n }\n // Prevent circular reference: can't move into own descendant\n if (containsLayerTreeNode(sourceNode.children ?? [], targetId)) {\n return nodes\n }\n\n return moveNodeIntoFolder(nodes, sourceId, targetId)\n },\n /**\n * Moves a node to the root level of the tree.\n *\n * @param nodes - The array of nodes\n * @param sourceId - The ID of the node to move\n * @returns A new tree with the node at root level\n *\n * @example\n * ```ts\n * const newTree = moveLayerTreeNodeToRoot(layers, 'layer-001')\n * setLayers(newTree)\n * ```\n */\n moveLayerTreeNodeToRoot = <TData extends LayerTreeNodeBase>(\n nodes: TData[],\n sourceId: string,\n ): TData[] => {\n const { nextNodes, removedNode } = removeLayerTreeNode(nodes, sourceId)\n if (!removedNode) {\n return nodes\n }\n return [...nextNodes, removedNode]\n },\n rowVisibilityFeature: TableFeature = {\n assignRowPrototype: (prototype, table) => {\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion\n const layerTable = table as unknown as LayerTreeTable\n assignPrototypeAPIs('rowVisibilityFeature', prototype, table, {\n row_getIsVisible: {\n fn: (row) =>\n layerTable.atoms.rowVisibility?.get()?.[row.id] ??\n layerTable.options.getRowVisible?.(row) ??\n true,\n },\n row_toggleVisibility: {\n fn: (row, value?: boolean) => {\n layerTable.options.onRowVisibilityChange?.((old: RowVisibilityState) => ({\n ...old,\n [row.id]: value ?? !(old[row.id] ?? true),\n }))\n },\n },\n })\n },\n constructTableAPIs: (table) => {\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion\n const layerTable = table as unknown as LayerTreeTable,\n isRowVisible = (row: LayerTreeRow) =>\n layerTable.atoms.rowVisibility?.get()?.[row.id] ??\n layerTable.options.getRowVisible?.(row) ??\n true,\n setRowVisibility = (updater: Updater<RowVisibilityState>) => {\n const safeUpdater: Updater<RowVisibilityState> = (old) => functionalUpdate(updater, old)\n layerTable.options.onRowVisibilityChange?.(safeUpdater)\n },\n getIsAllRowsVisible = () =>\n layerTable.getRowModel().flatRows.every((row) => isRowVisible(row))\n\n assignTableAPIs('rowVisibilityFeature', layerTable, {\n table_getIsAllRowsVisible: {\n fn: () => getIsAllRowsVisible(),\n },\n table_resetRowVisibility: {\n fn: () => setRowVisibility(layerTable.initialState.rowVisibility ?? {}),\n },\n table_setRowVisibility: {\n fn: (updater: Updater<RowVisibilityState>) => setRowVisibility(updater),\n },\n table_toggleAllRowsVisible: {\n fn: (value?: boolean) => {\n const next = value ?? !getIsAllRowsVisible()\n setRowVisibility(() => {\n const state: RowVisibilityState = {}\n for (const row of layerTable.getRowModel().flatRows) {\n state[row.id] = next\n }\n return state\n })\n },\n },\n })\n },\n getDefaultTableOptions: (table) => ({\n enableRowVisibility: true,\n onRowVisibilityChange: makeStateUpdater('rowVisibility', table),\n }),\n getInitialState: (initialState) => ({\n rowVisibility: {},\n ...initialState,\n }),\n },\n rowLockedFeature: TableFeature = {\n assignRowPrototype: (prototype, table) => {\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion\n const layerTable = table as unknown as LayerTreeTable\n assignPrototypeAPIs('rowLockedFeature', prototype, table, {\n row_getIsLocked: {\n fn: (row) =>\n layerTable.atoms.rowLocked?.get()?.[row.id] ??\n layerTable.options.getRowLocked?.(row) ??\n false,\n },\n row_toggleLocked: {\n fn: (row, value?: boolean) => {\n layerTable.options.onRowLockedChange?.((old: RowLockedState) => ({\n ...old,\n [row.id]: value ?? !(old[row.id] ?? false),\n }))\n },\n },\n })\n },\n constructTableAPIs: (table) => {\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion\n const layerTable = table as unknown as LayerTreeTable,\n isRowLocked = (row: LayerTreeRow) =>\n layerTable.atoms.rowLocked?.get()?.[row.id] ??\n layerTable.options.getRowLocked?.(row) ??\n false,\n setRowLocked = (updater: Updater<RowLockedState>) => {\n const safeUpdater: Updater<RowLockedState> = (old) => functionalUpdate(updater, old)\n layerTable.options.onRowLockedChange?.(safeUpdater)\n },\n getIsAllRowsLocked = () =>\n layerTable.getRowModel().flatRows.every((row) => isRowLocked(row))\n\n assignTableAPIs('rowLockedFeature', layerTable, {\n table_getIsAllRowsLocked: {\n fn: () => getIsAllRowsLocked(),\n },\n table_resetRowLocked: {\n fn: () => setRowLocked(layerTable.initialState.rowLocked ?? {}),\n },\n table_setRowLocked: {\n fn: (updater: Updater<RowLockedState>) => setRowLocked(updater),\n },\n table_toggleAllRowsLocked: {\n fn: (value?: boolean) => {\n const next = value ?? !getIsAllRowsLocked()\n setRowLocked(() => {\n const state: RowLockedState = {}\n for (const row of layerTable.getRowModel().flatRows) {\n state[row.id] = next\n }\n return state\n })\n },\n },\n })\n },\n getDefaultTableOptions: (table) => ({\n enableRowLocked: true,\n onRowLockedChange: makeStateUpdater('rowLocked', table),\n }),\n getInitialState: (initialState) => ({\n rowLocked: {},\n ...initialState,\n }),\n }\n\nexport {\n findLayerTreeNode,\n insertLayerTreeNode,\n moveLayerTreeNode,\n moveLayerTreeNodeToRoot,\n removeLayerTreeNode,\n rowLockedFeature,\n rowVisibilityFeature,\n type LayerTreeNodeBase,\n}\n","import {\n createExpandedRowModel,\n metaHelper,\n rowExpandingFeature,\n tableFeatures,\n columnFacetingFeature,\n columnFilteringFeature,\n columnSizingFeature,\n columnVisibilityFeature,\n createFacetedRowModel,\n createFacetedUniqueValues,\n createFilteredRowModel,\n createPaginatedRowModel,\n createSortedRowModel,\n createTableHookContexts,\n filterFn_arrHas,\n filterFn_arrIncludes,\n filterFn_arrIncludesAll,\n filterFn_arrIncludesSome,\n filterFn_between,\n filterFn_betweenInclusive,\n filterFn_empty,\n filterFn_endsWith,\n filterFn_equals,\n filterFn_equalsString,\n filterFn_equalsStringSensitive,\n filterFn_inDateRange,\n filterFn_inNumberRange,\n filterFn_includesString,\n filterFn_includesStringSensitive,\n filterFn_notEmpty,\n filterFn_startsWith,\n filterFn_weakEquals,\n globalFilteringFeature,\n rowPaginationFeature,\n rowSelectionFeature,\n rowSortingFeature,\n sortFn_alphanumeric,\n sortFn_basic,\n sortFn_datetime,\n sortFn_text,\n} from '@tanstack/react-table'\n\nimport { rowLockedFeature, rowVisibilityFeature } from './layer-tree-utils'\nimport type { LayerTreeColumnMeta, LayerTreeTableMeta } from './layer-tree.types'\n\nconst features = tableFeatures({\n columnFacetingFeature,\n columnFilteringFeature,\n columnMeta: metaHelper<LayerTreeColumnMeta>(),\n columnSizingFeature,\n columnVisibilityFeature,\n expandedRowModel: createExpandedRowModel(),\n facetedRowModel: createFacetedRowModel(),\n facetedUniqueValues: createFacetedUniqueValues(),\n filterFns: {\n arrHas: filterFn_arrHas,\n arrIncludes: filterFn_arrIncludes,\n arrIncludesAll: filterFn_arrIncludesAll,\n arrIncludesSome: filterFn_arrIncludesSome,\n between: filterFn_between,\n betweenInclusive: filterFn_betweenInclusive,\n empty: filterFn_empty,\n endsWith: filterFn_endsWith,\n equals: filterFn_equals,\n equalsString: filterFn_equalsString,\n equalsStringSensitive: filterFn_equalsStringSensitive,\n inDateRange: filterFn_inDateRange,\n inNumberRange: filterFn_inNumberRange,\n includesString: filterFn_includesString,\n includesStringSensitive: filterFn_includesStringSensitive,\n notEmpty: filterFn_notEmpty,\n startsWith: filterFn_startsWith,\n weakEquals: filterFn_weakEquals,\n },\n filteredRowModel: createFilteredRowModel(),\n globalFilteringFeature,\n paginatedRowModel: createPaginatedRowModel(),\n rowExpandingFeature,\n rowLockedFeature,\n rowPaginationFeature,\n rowSelectionFeature,\n rowSortingFeature,\n rowVisibilityFeature,\n sortFns: {\n alphanumeric: sortFn_alphanumeric,\n basic: sortFn_basic,\n datetime: sortFn_datetime,\n text: sortFn_text,\n },\n sortedRowModel: createSortedRowModel(),\n tableMeta: metaHelper<LayerTreeTableMeta>(),\n }),\n { tableContext, cellContext, headerContext, useTableContext, useCellContext, useHeaderContext } =\n createTableHookContexts<typeof features>()\n\nexport {\n cellContext,\n features,\n headerContext,\n tableContext,\n useCellContext,\n useHeaderContext,\n useTableContext,\n}\n","import type {\n OnChangeFn,\n Row,\n RowData,\n TableFeature,\n TableFeatures,\n Updater,\n} from '@tanstack/react-table'\nimport { cva } from 'class-variance-authority'\nimport type { VariantProps } from 'class-variance-authority'\nimport React from 'react'\n\nimport type { Button } from '../button'\nimport type { IconComponent } from '../icon'\nimport type { InputGroup } from '../input-group'\n\ndeclare module '@tanstack/react-table' {\n interface Plugins {\n rowLockedFeature: TableFeature\n rowVisibilityFeature: TableFeature\n }\n\n interface TableState_FeatureMap {\n rowLockedFeature: LayerTreeState_RowLocked\n rowVisibilityFeature: LayerTreeState_RowVisibility\n }\n\n interface TableOptions_FeatureMap<TFeatures extends TableFeatures, TData extends RowData> {\n rowLockedFeature: LayerTreeOptions_RowLocked<TData>\n rowVisibilityFeature: LayerTreeOptions_RowVisibility<TData>\n }\n\n interface Table_FeatureMap<TFeatures extends TableFeatures, TData extends RowData> {\n rowLockedFeature: LayerTreeTable_RowLocked\n rowVisibilityFeature: LayerTreeTable_RowVisibility\n }\n\n interface Row_FeatureMap<TFeatures extends TableFeatures, TData extends RowData> {\n rowLockedFeature: LayerTreeRow_RowLocked\n rowVisibilityFeature: LayerTreeRow_RowVisibility\n }\n}\n\ntype LayerTreeProps = React.ComponentProps<'div'> & {\n onDNDStart?: (event: { nodeId: string }) => void\n onDNDEnd?: (event: { sourceNodeId: string; targetNodeId: string }) => void\n}\n\ntype LayerTreeBodyProps = React.ComponentProps<'div'>\ntype LayerTreeRowProps = React.ComponentProps<'div'> & {\n rowId: string\n}\n\ntype LayerTreeTriggerCellProps = React.ComponentProps<'button'> & {\n dndDisabled?: boolean\n}\ntype LayerTreeSearchProps = React.ComponentProps<typeof InputGroup> & {\n placeholder?: string\n}\ntype LayerTreeExpandAllProps = React.ComponentProps<typeof Button>\ntype LayerTreeFooterProps = React.ComponentProps<'div'>\ntype LayerTreeSortProps = React.ComponentProps<'button'>\ntype LayerTreeIconCellProps = React.ComponentProps<'div'>\ntype LayerTreeLockedCellProps = React.ComponentProps<typeof Button>\ntype LayerTreeLockedAllProps = React.ComponentProps<typeof Button>\ntype LayerTreeVisibilityCellProps = React.ComponentProps<typeof Button>\ntype LayerTreeVisibilityAllProps = React.ComponentProps<typeof Button>\ntype LayerTreeNodeIconProps = React.ComponentProps<'div'> & {\n icon: IconComponent\n}\ntype LayerTreeTextCellProps = React.ComponentProps<'span'> &\n VariantProps<typeof layerTreeTextCellVariants>\n\nconst layerTreeTextCellVariants = cva('min-w-0 grow truncate px-2xs', {\n defaultVariants: {\n size: 'medium',\n },\n variants: {\n size: {\n large: 'style-text-default-1',\n medium: 'style-text-default-0',\n small: 'style-text-default--1',\n },\n },\n }),\n // oxlint-disable-next-line unicorn/no-null\n LayerTreeContext = React.createContext<LayerTreeContextType | null>(null),\n useLayerTree = () => {\n const context = React.useContext<LayerTreeContextType | null>(LayerTreeContext)\n\n if (!context) {\n throw new Error('useLayerTree must be used within a LayerTreeProvider')\n }\n\n return context\n }\n\ninterface LayerTreeColumnMeta {\n fill?: boolean\n}\n\ninterface LayerTreeTableMeta {\n translations?: {\n buttonLabels?: {\n ascending?: string\n descending?: string\n }\n }\n}\n\ntype RowVisibilityState = Record<string, boolean>\n\ninterface LayerTreeState_RowVisibility {\n rowVisibility: RowVisibilityState\n}\n\ninterface LayerTreeOptions_RowVisibility<TData extends RowData = RowData> {\n enableRowVisibility?: boolean\n onRowVisibilityChange?: OnChangeFn<RowVisibilityState>\n getRowVisible?: (row: Row<TableFeatures, TData>) => boolean\n}\n\ninterface LayerTreeTable_RowVisibility {\n setRowVisibility: (updater: Updater<RowVisibilityState>) => void\n resetRowVisibility: () => void\n toggleAllRowsVisible: (value?: boolean) => void\n getIsAllRowsVisible: () => boolean\n}\n\ninterface LayerTreeRow_RowVisibility {\n getIsVisible: () => boolean\n toggleVisibility: (value?: boolean) => void\n}\n\ntype RowLockedState = Record<string, boolean>\n\ninterface LayerTreeState_RowLocked {\n rowLocked: RowLockedState\n}\n\ninterface LayerTreeOptions_RowLocked<TData extends RowData = RowData> {\n enableRowLocked?: boolean\n onRowLockedChange?: OnChangeFn<RowLockedState>\n getRowLocked?: (row: Row<TableFeatures, TData>) => boolean\n}\n\ninterface LayerTreeTable_RowLocked {\n setRowLocked: (updater: Updater<RowLockedState>) => void\n resetRowLocked: () => void\n toggleAllRowsLocked: (value?: boolean) => void\n getIsAllRowsLocked: () => boolean\n}\n\ninterface LayerTreeRow_RowLocked {\n getIsLocked: () => boolean\n toggleLocked: (value?: boolean) => void\n}\n\ntype LayerTreeContextType = LayerTreeProps & {\n draggingNodeId: string | null\n}\n\nexport { LayerTreeContext, layerTreeTextCellVariants, useLayerTree }\nexport type {\n RowLockedState,\n RowVisibilityState,\n LayerTreeContextType,\n LayerTreeState_RowVisibility,\n LayerTreeOptions_RowVisibility,\n LayerTreeTable_RowVisibility,\n LayerTreeRow_RowVisibility,\n LayerTreeState_RowLocked,\n LayerTreeOptions_RowLocked,\n LayerTreeTable_RowLocked,\n LayerTreeRow_RowLocked,\n LayerTreeTableMeta,\n LayerTreeColumnMeta,\n LayerTreeProps,\n LayerTreeBodyProps,\n LayerTreeRowProps,\n LayerTreeTriggerCellProps,\n LayerTreeSearchProps,\n LayerTreeFooterProps,\n LayerTreeSortProps,\n LayerTreeIconCellProps,\n LayerTreeLockedCellProps,\n LayerTreeLockedAllProps,\n LayerTreeVisibilityCellProps,\n LayerTreeVisibilityAllProps,\n LayerTreeNodeIconProps,\n LayerTreeTextCellProps,\n LayerTreeExpandAllProps,\n}\n","// oxlint-disable unicorn/no-null\nimport { Feedback } from '@dnd-kit/dom'\nimport { DragDropProvider, DragOverlay } from '@dnd-kit/react'\nimport type { DragEndEvent, DragStartEvent } from '@dnd-kit/react'\nimport React from 'react'\n\nimport { cn } from '@/utils/cn'\n\nimport { Badge } from '../badge'\nimport { useTableContext } from './layer-tree-context'\nimport { LayerTreeContext } from './layer-tree.types'\nimport type { LayerTreeProps } from './layer-tree.types'\n\nconst PARENT_ROW_COUNT = 1\n\nexport function LayerTree({\n onDNDStart: onDragStart,\n onDNDEnd: onDragEnd,\n className,\n children,\n ref,\n ...props\n}: LayerTreeProps) {\n const table = useTableContext(),\n [draggingNodeId, setDraggingNodeId] = React.useState<string | null>(null),\n handleDragStart = ({ operation: { source } }: DragStartEvent) => {\n setDraggingNodeId(source?.data.nodeId ?? null)\n if (onDragStart) {\n onDragStart({ nodeId: source?.data.nodeId ?? '' })\n }\n },\n handleDragEnd = ({ operation: { source, target } }: DragEndEvent) => {\n setDraggingNodeId(null)\n if (onDragEnd) {\n const targetNodeId = target?.data.folderId ?? target?.data.nodeId ?? null\n onDragEnd({\n sourceNodeId: source?.data.nodeId ?? '',\n targetNodeId,\n })\n }\n }\n\n return (\n <DragDropProvider\n onDragStart={handleDragStart}\n onDragEnd={handleDragEnd}\n plugins={(defaults) => [...defaults, Feedback.configure({ dropAnimation: null })]}\n >\n <LayerTreeContext.Provider\n value={{\n children,\n className,\n draggingNodeId,\n ref,\n ...props,\n }}\n >\n <div className={cn('flex flex-col justify-between', className)} ref={ref} {...props}>\n {children}\n <DragOverlay>\n {(source) => (\n <div\n className={cn(\n 'relative rounded-md border border-neutral-border bg-neutral-container px-xs py-3xs opacity-80 shadow-md transition-opacity',\n )}\n >\n {table.getRow(String(source.id)).renderValue('name') ?? source.id}\n <Badge className=\"absolute -top-xs -right-xs\" tone=\"neutral\">\n {table.getRow(String(source.id))?.subRows.length + PARENT_ROW_COUNT}\n </Badge>\n </div>\n )}\n </DragOverlay>\n </div>\n </LayerTreeContext.Provider>\n </DragDropProvider>\n )\n}\n\nexport { useLayerTree } from './layer-tree.types'\n","import { cn } from '@/utils/cn'\n\nimport { useTableContext } from './layer-tree-context'\nimport type { useTableContext as useRegisteredTableContext } from './layer-tree-table'\nimport type { LayerTreeRowProps } from './layer-tree.types'\n\nconst ROOT_DEPTH = 0,\n FIRST_CELL_INDEX = 0,\n ROW_INDENT_PER_LEVEL = 24,\n EMPTY_LEAF_COUNT = 0,\n VISIBLE_OPACITY = 1,\n HIDDEN_OPACITY = 0.5\n\nexport function LayerTreeRow({ rowId, className, children, ref, ...props }: LayerTreeRowProps) {\n // The registered table hook adds AppCell and FlexRender at runtime.\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion\n const table = useTableContext() as ReturnType<typeof useRegisteredTableContext>\n\n return (\n <table.Subscribe\n selector={(state) => ({\n expanded: state.expanded,\n rowSelection: state.rowSelection,\n rowVisibility: state.rowVisibility,\n })}\n >\n {() => {\n const row = table.getRowModel().rows.find((candidate) => candidate.id === rowId),\n indent = (row?.depth ?? ROOT_DEPTH) * ROW_INDENT_PER_LEVEL,\n leafRows = row?.getLeafRows() ?? []\n let isVisible = row?.getIsVisible() ?? true\n\n if (leafRows.length > EMPTY_LEAF_COUNT) {\n isVisible = leafRows.some((leaf) => leaf.getIsVisible())\n }\n\n return (\n <div className={cn('flex w-full items-center gap-3xs', className)} ref={ref} {...props}>\n {children}\n {row?.getVisibleCells().map((cell, cellIndex) => {\n const isFirstCell = cellIndex === FIRST_CELL_INDEX,\n isFill = cell.column.columnDef.meta?.fill ?? cell.column.id === 'name'\n let marginLeft: number | undefined = undefined,\n opacity = HIDDEN_OPACITY\n\n if (isFirstCell) {\n marginLeft = indent\n }\n if (isVisible) {\n opacity = VISIBLE_OPACITY\n }\n\n return (\n <table.AppCell key={cell.id} cell={cell}>\n {(renderedCell) => (\n <div\n style={{\n marginLeft,\n opacity,\n }}\n className={cn(\n 'flex items-center',\n isFill && 'min-w-0 grow gap-3xs',\n !isFill && 'w-fit shrink-0',\n )}\n >\n <table.FlexRender cell={renderedCell} />\n </div>\n )}\n </table.AppCell>\n )\n })}\n </div>\n )\n }}\n </table.Subscribe>\n )\n}\n","import { useDroppable } from '@dnd-kit/react'\n\nimport { cn } from '@/utils/cn'\n\nimport { useTableContext } from './layer-tree-context'\nimport { LayerTreeRow } from './layer-tree-row'\nimport type { LayerTreeBodyProps } from './layer-tree.types'\n\nexport function LayerTreeBody({ className, children, ...props }: LayerTreeBodyProps) {\n const table = useTableContext(),\n { isDropTarget, ref } = useDroppable({\n data: {\n folderId: 'root',\n nodeId: 'root',\n },\n id: 'root-dropzone',\n })\n\n return (\n <table.Subscribe selector={(state) => state}>\n {() => (\n <div className={cn('flex min-h-0 w-full grow flex-col', className)} {...props}>\n {children}\n <div className=\"flex min-h-0 w-full flex-col gap-xs overflow-y-auto\">\n {table.getRowModel().rows.map((row) => (\n <LayerTreeRow key={row.id} rowId={row.id} />\n ))}\n </div>\n <div\n ref={ref}\n className={cn(\n 'grow',\n isDropTarget &&\n 'rounded-lg bg-success-container ring-1 ring-success-default ring-inset',\n )}\n />\n </div>\n )}\n </table.Subscribe>\n )\n}\n","import { cn } from '@/utils/cn'\n\nimport { Button } from '../button'\nimport { Icon } from '../icon'\nimport { useTableContext } from './layer-tree-context'\nimport type { LayerTreeExpandAllProps } from './layer-tree.types'\n\nexport function LayerTreeExpandAll({ className, ref, ...props }: LayerTreeExpandAllProps) {\n const table = useTableContext(),\n handleClick = () => {\n if (table.getIsSomeRowsExpanded()) {\n table.toggleAllRowsExpanded(false)\n } else {\n table.toggleAllRowsExpanded(true)\n }\n }\n\n return (\n <table.Subscribe selector={(state) => state.expanded}>\n {() => (\n <Button\n aria-label=\"Expand or collapse all layers\"\n size=\"medium\"\n tone=\"neutral\"\n variant=\"ghost\"\n onClick={handleClick}\n className={cn('', className)}\n ref={ref}\n {...props}\n >\n {table.getIsSomeRowsExpanded() && <Icon name=\"folderOpen\" />}\n {!table.getIsSomeRowsExpanded() && <Icon name=\"folderExpandAll\" />}\n </Button>\n )}\n </table.Subscribe>\n )\n}\n","import { cn } from '@/utils/cn'\n\nimport type { LayerTreeFooterProps } from './layer-tree.types'\n\nexport function LayerTreeFooter({ className, ref, ...props }: LayerTreeFooterProps) {\n return <div className={cn('flex flex-col gap-3xs', className)} ref={ref} {...props} />\n}\n","import { createElement } from 'react'\nimport type { ReactNode } from 'react'\n\nimport { cn } from '@/utils/cn'\n\nimport { Icon } from '../icon'\nimport type { IconComponent } from '../icon'\nimport { useCellContext, useTableContext } from './layer-tree-context'\nimport type { LayerTreeIconCellProps } from './layer-tree.types'\n\nexport function LayerTreeIconCell({ className, children, ref, ...props }: LayerTreeIconCellProps) {\n const cell = useCellContext<IconComponent>(),\n table = useTableContext(),\n icon = cell.getValue(),\n { row } = cell,\n hasChildren = row.getCanExpand() && Boolean(row.getLeafRows().length)\n\n return (\n <table.Subscribe selector={(state) => state.expanded}>\n {() => {\n const isExpanded = row.getIsExpanded()\n\n let iconNode: ReactNode = createElement(icon)\n if (hasChildren && isExpanded) {\n iconNode = <Icon name=\"folderOpen\" />\n } else if (hasChildren) {\n iconNode = <Icon name=\"folder\" />\n }\n\n return (\n <div\n className={cn('flex w-fit shrink-0 items-center [&>svg]:size-sm', className)}\n ref={ref}\n {...props}\n >\n {children}\n {iconNode}\n </div>\n )\n }}\n </table.Subscribe>\n )\n}\n","import { cn } from '@/utils/cn'\n\nimport { Button } from '../button'\nimport { Icon } from '../icon'\nimport { useTableContext } from './layer-tree-context'\nimport type { LayerTreeLockedAllProps } from './layer-tree.types'\n\nexport function LayerTreeLockedAll({\n className,\n children,\n ref,\n ...props\n}: LayerTreeLockedAllProps) {\n const table = useTableContext(),\n allRows = table.getCoreRowModel().flatRows,\n handleClick = (isLocked: boolean) => {\n const next = !isLocked\n for (const leafRow of allRows) {\n leafRow.toggleLocked(next)\n }\n }\n\n return (\n <table.Subscribe selector={(state) => state.rowLocked}>\n {() => {\n const isLocked = allRows.some((leafRow) => leafRow.getIsLocked())\n\n return (\n <Button\n aria-label=\"Toggle all layers lock\"\n size=\"small\"\n tone=\"neutral\"\n variant=\"ghost\"\n onClick={() => handleClick(isLocked)}\n className={cn('', className)}\n ref={ref}\n {...props}\n >\n {children}\n {isLocked && <Icon name=\"locked\" />}\n {!isLocked && <Icon name=\"unlocked\" />}\n </Button>\n )\n }}\n </table.Subscribe>\n )\n}\n","import { cn } from '@/utils/cn'\n\nimport { Button } from '../button'\nimport { Icon } from '../icon'\nimport { useCellContext, useTableContext } from './layer-tree-context'\nimport type { LayerTreeLockedCellProps } from './layer-tree.types'\n\nexport function LayerTreeLockedCell({\n className,\n children,\n ref,\n ...props\n}: LayerTreeLockedCellProps) {\n const cell = useCellContext<boolean>(),\n table = useTableContext(),\n { row } = cell,\n rows = row.getLeafRows(),\n handleClick = (isLocked: boolean) => {\n const next = !isLocked\n for (const leafRow of rows) {\n leafRow.toggleLocked(next)\n }\n }\n\n if (!rows.length) {\n rows.push(row)\n }\n\n return (\n <table.Subscribe selector={(state) => state.rowLocked}>\n {() => {\n const isLocked = rows.every((leafRow) => leafRow.getIsLocked())\n\n return (\n <Button\n aria-label=\"Toggle layer lock\"\n size=\"small\"\n tone=\"neutral\"\n variant=\"ghost\"\n onClick={() => handleClick(isLocked)}\n className={cn('', className)}\n ref={ref}\n {...props}\n >\n {children}\n {isLocked && <Icon name=\"locked\" />}\n {!isLocked && <Icon name=\"unlocked\" />}\n </Button>\n )\n }}\n </table.Subscribe>\n )\n}\n","import { cn } from '@/utils/cn'\n\nimport { Icon } from '../icon'\nimport { useCellContext } from './layer-tree-context'\nimport type { LayerTreeNodeIconProps } from './layer-tree.types'\n\nexport function LayerTreeNodeIcon({\n icon: NodeIcon,\n className,\n children,\n ref,\n ...props\n}: LayerTreeNodeIconProps) {\n const cell = useCellContext(),\n { row } = cell,\n hasChildren = row.getCanExpand() && Boolean(row.getLeafRows().length)\n let nodeIcon = <NodeIcon />\n\n if (hasChildren) {\n nodeIcon = <Icon name=\"folder\" />\n if (row.getIsExpanded()) {\n nodeIcon = <Icon name=\"folderOpen\" />\n }\n }\n\n return (\n <div className={cn('', className)} ref={ref} {...props}>\n {children}\n {nodeIcon}\n </div>\n )\n}\n","import { cn } from '@/utils/cn'\n\nimport { Icon } from '../icon'\nimport { InputGroup, InputGroupAddon, InputGroupInput } from '../input-group'\nimport { useTableContext } from './layer-tree-context'\nimport type { LayerTreeSearchProps } from './layer-tree.types'\n\nexport function LayerTreeSearch({\n placeholder,\n className,\n children,\n ref,\n ...props\n}: LayerTreeSearchProps) {\n const table = useTableContext()\n\n return (\n <table.Subscribe selector={(state) => state.globalFilter}>\n {(globalFilter) => (\n <InputGroup className={cn('', className)} ref={ref} {...props}>\n <InputGroupAddon>\n <Icon name=\"search\" />\n </InputGroupAddon>\n <InputGroupInput\n placeholder={placeholder}\n onChange={(event) => table.setGlobalFilter(event.target.value)}\n value={globalFilter ?? ''}\n />\n {children}\n </InputGroup>\n )}\n </table.Subscribe>\n )\n}\n","import { cn } from '@/utils/cn'\n\nimport { Button } from '../button'\nimport { Icon } from '../icon'\nimport {\n Menu,\n MenuCheckboxItem,\n MenuPopup,\n MenuSubmenu,\n MenuSubmenuTrigger,\n MenuTrigger,\n} from '../menu'\nimport { useTableContext } from './layer-tree-context'\nimport type { LayerTreeSortProps } from './layer-tree.types'\n\nfunction getColumnHeaderLabel(header: unknown, fallback: string): string {\n if (typeof header === 'string') {\n return header\n }\n return fallback\n}\n\nexport function LayerTreeSort({ className, children, ref, ...props }: LayerTreeSortProps) {\n const table = useTableContext(),\n buttonLabels = table.options.meta?.translations?.buttonLabels ?? {},\n ascendingLabel = buttonLabels.ascending ?? 'Ascending',\n descendingLabel = buttonLabels.descending ?? 'Descending',\n handleSort = (columnId: string, direction: 'asc' | 'desc') => {\n const column = table.getColumn(columnId),\n currentSort = column?.getIsSorted()\n\n if (currentSort === direction) {\n column?.clearSorting()\n return\n }\n\n column?.toggleSorting(direction === 'desc', column.getCanMultiSort())\n }\n\n return (\n <Menu>\n <MenuTrigger className={cn('shrink-0', className)} ref={ref} {...props}>\n <Button aria-label=\"Sort layers\" variant=\"ghost\" size=\"medium\" tone=\"neutral\">\n <Icon name=\"sort\" />\n </Button>\n </MenuTrigger>\n <MenuPopup align=\"end\">\n <table.Subscribe selector={(state) => state.sorting}>\n {() =>\n table\n .getAllColumns()\n .filter((column) => column.getCanSort())\n .map((column) => (\n <MenuSubmenu key={column.id}>\n <MenuSubmenuTrigger>\n {getColumnHeaderLabel(column.columnDef.header, column.id)}\n </MenuSubmenuTrigger>\n <MenuPopup>\n {children}\n <MenuCheckboxItem\n checked={column.getIsSorted() === 'asc'}\n onClick={() => handleSort(column.id, 'asc')}\n >\n <Icon name=\"sortDescending\" />\n {ascendingLabel}\n </MenuCheckboxItem>\n <MenuCheckboxItem\n checked={column.getIsSorted() === 'desc'}\n onClick={() => handleSort(column.id, 'desc')}\n >\n <Icon name=\"sortAscending\" />\n {descendingLabel}\n </MenuCheckboxItem>\n </MenuPopup>\n </MenuSubmenu>\n ))\n }\n </table.Subscribe>\n </MenuPopup>\n </Menu>\n )\n}\n","import { cn } from '@/utils/cn'\n\nimport { useCellContext } from './layer-tree-context'\nimport { layerTreeTextCellVariants } from './layer-tree.types'\nimport type { LayerTreeTextCellProps } from './layer-tree.types'\n\nexport function LayerTreeTextCell({\n size,\n className,\n children,\n ref,\n ...props\n}: LayerTreeTextCellProps) {\n const cell = useCellContext<string>()\n\n return (\n <span className={cn(layerTreeTextCellVariants({ className, size }))} ref={ref} {...props}>\n {children}\n {cell.getValue()}\n </span>\n )\n}\n","import { useDraggable, useDroppable } from '@dnd-kit/react'\nimport React from 'react'\n\nimport { cn } from '@/utils/cn'\n\nimport { useCellContext } from './layer-tree-context'\nimport { useLayerTree } from './layer-tree.types'\nimport type { LayerTreeTriggerCellProps } from './layer-tree.types'\n\nexport function LayerTreeTriggerCell({\n className,\n children,\n dndDisabled,\n onClick,\n ...props\n}: LayerTreeTriggerCellProps) {\n const cell = useCellContext<string>(),\n { draggingNodeId } = useLayerTree(),\n { row } = cell,\n hasChildren = row.getCanExpand(),\n isSelected = row.getIsSelected(),\n { ref: draggableRef, isDragging } = useDraggable({\n data: {\n isFolder: hasChildren,\n nodeId: row.id,\n },\n disabled: dndDisabled,\n id: row.id,\n }),\n { ref: droppableRef, isDropTarget } = useDroppable({\n data: {\n folderId: row.id,\n isFolder: hasChildren,\n nodeId: row.id,\n },\n disabled: dndDisabled || !hasChildren,\n id: `folder:${row.id}`,\n }),\n setNodeRef = (element: Element | null) => {\n draggableRef(element)\n droppableRef(element)\n },\n selectRow = (event: React.MouseEvent<HTMLButtonElement>) => {\n if (!row.getCanSelect()) {\n return\n }\n if (!event.shiftKey) {\n cell.table.resetRowSelection()\n }\n row.getToggleSelectedHandler()({ shiftKey: event.shiftKey, target: { checked: true } })\n },\n handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event)\n if (event.defaultPrevented) {\n return\n }\n if (hasChildren) {\n row.toggleExpanded()\n return\n }\n selectRow(event)\n },\n isAncestorDragging = (() => {\n if (!draggingNodeId) {\n return false\n }\n let parent = row.getParentRow()\n while (parent) {\n if (parent.id === draggingNodeId) {\n return true\n }\n parent = parent.getParentRow()\n }\n return false\n })()\n\n return (\n <button\n type=\"button\"\n onClick={handleClick}\n className={cn(\n 'flex h-lg min-w-0 grow items-center justify-start gap-2xs truncate rounded-lg px-2xs style-text-default-0 transition-all hover:cursor-pointer [&>svg]:size-sm [&>svg]:shrink-0',\n hasChildren &&\n isDropTarget &&\n 'bg-success-container text-success-on-container ring ring-success-border',\n isSelected && 'bg-neutral-default text-neutral-on-default',\n !isSelected && 'hover:bg-neutral-container hover:text-neutral-on-container',\n (isDragging || isAncestorDragging) && 'opacity-60',\n className,\n )}\n ref={setNodeRef}\n {...props}\n >\n {children}\n {cell.getValue()}\n </button>\n )\n}\n","import { cn } from '@/utils/cn'\n\nimport { Button } from '../button'\nimport { Icon } from '../icon'\nimport { useTableContext } from './layer-tree-context'\nimport type { LayerTreeVisibilityAllProps } from './layer-tree.types'\n\nexport function LayerTreeVisibilityAll({\n className,\n children,\n ref,\n ...props\n}: LayerTreeVisibilityAllProps) {\n const table = useTableContext(),\n allRows = table.getCoreRowModel().flatRows,\n handleClick = (isVisible: boolean) => {\n const next = !isVisible\n for (const leafRow of allRows) {\n leafRow.toggleVisibility(next)\n }\n }\n\n return (\n <table.Subscribe selector={(state) => state.rowVisibility}>\n {() => {\n const isVisible = allRows.some((leafRow) => leafRow.getIsVisible())\n\n return (\n <Button\n aria-label=\"Toggle all layers visibility\"\n size=\"small\"\n tone=\"neutral\"\n variant=\"ghost\"\n onClick={() => handleClick(isVisible)}\n className={cn('', className)}\n ref={ref}\n {...props}\n >\n {children}\n {isVisible && <Icon name=\"visible\" />}\n {!isVisible && <Icon name=\"hidden\" />}\n </Button>\n )\n }}\n </table.Subscribe>\n )\n}\n","import { cn } from '@/utils/cn'\n\nimport { Button } from '../button'\nimport { Icon } from '../icon'\nimport { useCellContext, useTableContext } from './layer-tree-context'\nimport type { LayerTreeVisibilityCellProps } from './layer-tree.types'\n\nexport function LayerTreeVisibilityCell({\n className,\n children,\n ref,\n ...props\n}: LayerTreeVisibilityCellProps) {\n const cell = useCellContext<boolean>(),\n table = useTableContext(),\n { row } = cell,\n rows = row.getLeafRows(),\n handleClick = (isVisible: boolean) => {\n const next = !isVisible\n for (const leafRow of rows) {\n leafRow.toggleVisibility(next)\n }\n }\n\n if (!rows.length) {\n rows.push(row)\n }\n\n return (\n <table.Subscribe selector={(state) => state.rowVisibility}>\n {() => {\n const isVisible = rows.some((leafRow) => leafRow.getIsVisible())\n\n return (\n <Button\n aria-label=\"Toggle layer visibility\"\n size=\"small\"\n tone=\"neutral\"\n variant=\"ghost\"\n onClick={() => handleClick(isVisible)}\n className={cn('', className)}\n ref={ref}\n {...props}\n >\n {children}\n {isVisible && <Icon name=\"visible\" />}\n {!isVisible && <Icon name=\"hidden\" />}\n </Button>\n )\n }}\n </table.Subscribe>\n )\n}\n","import { createTableHook } from '@tanstack/react-table'\n\nimport { LayerTree } from './layer-tree'\nimport { LayerTreeBody } from './layer-tree-body'\nimport { features, cellContext, headerContext, tableContext } from './layer-tree-context'\nimport { LayerTreeExpandAll } from './layer-tree-expand-all'\nimport { LayerTreeFooter } from './layer-tree-footer'\nimport { LayerTreeIconCell } from './layer-tree-icon-cell'\nimport { LayerTreeLockedAll } from './layer-tree-locked-all'\nimport { LayerTreeLockedCell } from './layer-tree-locked-cell'\nimport { LayerTreeNodeIcon } from './layer-tree-node-icon'\nimport { LayerTreeRow } from './layer-tree-row'\nimport { LayerTreeSearch } from './layer-tree-search'\nimport { LayerTreeSort } from './layer-tree-sort'\nimport { LayerTreeTextCell } from './layer-tree-text-cell'\nimport { LayerTreeTriggerCell } from './layer-tree-trigger-cell'\nimport { LayerTreeVisibilityAll } from './layer-tree-visibility-all'\nimport { LayerTreeVisibilityCell } from './layer-tree-visibility-cell'\n\nconst { createAppColumnHelper, useAppTable, useTableContext, useCellContext, useHeaderContext } =\n createTableHook({\n cellComponents: {\n LayerTreeIconCell,\n LayerTreeLockedCell,\n LayerTreeNodeIcon,\n LayerTreeTextCell,\n LayerTreeTriggerCell,\n LayerTreeVisibilityCell,\n },\n cellContext,\n features,\n headerComponents: {},\n headerContext,\n tableComponents: {\n LayerTree,\n LayerTreeBody,\n LayerTreeExpandAll,\n LayerTreeFooter,\n LayerTreeLockedAll,\n LayerTreeRow,\n LayerTreeSearch,\n LayerTreeSort,\n LayerTreeVisibilityAll,\n },\n tableContext,\n })\n\nexport { createAppColumnHelper, useAppTable, useCellContext, useHeaderContext, useTableContext }\n\nexport { features } from './layer-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,uBAAuB,aAAa,iBAAiB,gBAAgB,qBAC3E,gBAAgB;CACd,gBAAgB;EACd;EACA;EACA;EACA;EACA;EACA;CACF;CACA;CACA;CACA,kBAAkB,CAAC;CACnB;CACA,iBAAiB;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA;AACF,CAAC"}
@@ -0,0 +1,143 @@
1
+ import { a as AutocompleteItem, c as AutocompleteInputGroup, h as AutocompleteCollection, m as AutocompleteContent, o as AutocompleteInputGroupInput, p as AutocompleteEmpty, r as AutocompleteStatus, t as Autocomplete } from "../../index-BJVMIPq4.js";
2
+ import { t as ButtonGroup } from "../../index-B3MK1QYh.js";
3
+ import { t as Button } from "../../index-bVyqfhJS.js";
4
+ import React$1, { ComponentPropsWithRef, Key, ReactNode } from "react";
5
+ import { APIProviderProps, AdvancedMarker, MapProps } from "@vis.gl/react-google-maps";
6
+ import { ReactAsyncDebouncer } from "@tanstack/react-pacer";
7
+ import { ClusterFeature, ClusterProperties, Options, PointFeature } from "supercluster";
8
+ import { DeckProps } from "@deck.gl/core";
9
+ import { BBox, FeatureCollection, GeoJsonProperties, Point } from "geojson";
10
+ type GoogleMapProps = APIProviderProps;
11
+ type GoogleMapFrameProps = MapProps;
12
+ type GoogleMapGeolocateControlProps = React.ComponentProps<typeof Button> & {
13
+ zoomLevel?: number;
14
+ };
15
+ type GoogleMapZoomControlProps = React.ComponentProps<typeof ButtonGroup> & {
16
+ step?: number;
17
+ };
18
+ type GoogleMapDeckGLOverlayProps = Omit<DeckProps, 'layers'> & {
19
+ interleaved?: boolean;
20
+ };
21
+ type GoogleMapClusterLayerItem<Properties extends GeoJsonProperties, ClusterPropertiesValue extends GeoJsonProperties = ClusterProperties> = ClusterFeature<ClusterPropertiesValue> | PointFeature<Properties>;
22
+ interface GoogleMapClusterRenderContext<Properties extends GeoJsonProperties> {
23
+ getLeaves: () => PointFeature<Properties>[];
24
+ getExpansionZoom: () => number;
25
+ }
26
+ interface GoogleMapClusterLayerProps<Properties extends GeoJsonProperties, ClusterPropertiesValue extends GeoJsonProperties = ClusterProperties> {
27
+ items: readonly GoogleMapClusterLayerItem<Properties, ClusterPropertiesValue>[];
28
+ getKey: (item: PointFeature<Properties>) => Key;
29
+ getLeaves: (clusterId: number) => PointFeature<Properties>[];
30
+ getClusterExpansionZoom: (clusterId: number) => number;
31
+ renderItem: (item: PointFeature<Properties>) => ReactNode;
32
+ renderCluster: (cluster: ClusterFeature<ClusterPropertiesValue>, context: GoogleMapClusterRenderContext<Properties>) => ReactNode;
33
+ children?: ReactNode;
34
+ }
35
+ type GoogleMapTiltControlProps = React.ComponentProps<typeof Button>;
36
+ declare function GoogleMap$1({ children, ...props }: GoogleMapProps): import("react").JSX.Element;
37
+ type GoogleMapClusterProps = ComponentPropsWithRef<typeof AdvancedMarker> & {
38
+ count: number;
39
+ label: string;
40
+ };
41
+ export declare function GoogleMapCluster({ className, children, count, label, collisionBehavior, zIndex, ...props }: GoogleMapClusterProps): import("react").JSX.Element;
42
+ export declare function GoogleMapClusterLayer<Properties extends GeoJsonProperties, ClusterPropertiesValue extends GeoJsonProperties = ClusterProperties>({ items, getKey, getLeaves, getClusterExpansionZoom, renderItem, renderCluster, children }: GoogleMapClusterLayerProps<Properties, ClusterPropertiesValue>): import("react").JSX.Element;
43
+ export declare function GoogleMapDeckGLOverlay({ interleaved, ...deckProps }: GoogleMapDeckGLOverlayProps): undefined;
44
+ export declare function GoogleMapFrame({ className, children, ...props }: GoogleMapFrameProps): React$1.JSX.Element;
45
+ export declare function GoogleMapGeolocateControl({ zoomLevel, className, children, ref, ...props }: GoogleMapGeolocateControlProps): React$1.JSX.Element;
46
+ type GoogleMapMarkerProps = ComponentPropsWithRef<typeof AdvancedMarker>;
47
+ export declare function GoogleMapMarker({ collisionBehavior, ...props }: GoogleMapMarkerProps): import("react").JSX.Element;
48
+ interface GoogleMapMarkerLayerProps<Item> {
49
+ items: readonly Item[];
50
+ getKey: (item: Item) => Key;
51
+ renderItem: (item: Item) => ReactNode;
52
+ children?: ReactNode;
53
+ }
54
+ export declare function GoogleMapMarkerLayer<Item>({ items, getKey, renderItem, children }: GoogleMapMarkerLayerProps<Item>): import("react").JSX.Element;
55
+ interface GoogleMapSearchControlValue {
56
+ debouncer: ReactAsyncDebouncer<(query: string) => Promise<google.maps.places.AutocompleteSuggestion[]>, {
57
+ isPending: boolean;
58
+ }>;
59
+ locale?: Intl.Locale;
60
+ selectSuggestion: (suggestion: google.maps.places.AutocompleteSuggestion) => Promise<void>;
61
+ selectFirstSuggestion: () => Promise<void>;
62
+ results: google.maps.places.AutocompleteSuggestion[];
63
+ setResults: React$1.Dispatch<React$1.SetStateAction<google.maps.places.AutocompleteSuggestion[]>>;
64
+ }
65
+ type GoogleMapSearchControlContextProps = GoogleMapSearchControlValue;
66
+ type GoogleMapSearchControlProps = React$1.ComponentProps<typeof Autocomplete> & {
67
+ locale?: Intl.Locale;
68
+ debounceInterval?: number;
69
+ onSuggestionSelect?: (suggestion: google.maps.places.AutocompleteSuggestion) => Promise<void>;
70
+ };
71
+ type GoogleMapSearchControlInputGroupProps = React$1.ComponentProps<typeof AutocompleteInputGroup>;
72
+ type GoogleMapSearchControlInputProps = React$1.ComponentProps<typeof AutocompleteInputGroupInput>;
73
+ type GoogleMapSearchControlSuggestionProps = Omit<React$1.ComponentProps<typeof AutocompleteItem>, 'children'> & {
74
+ suggestion: google.maps.places.AutocompleteSuggestion;
75
+ children: (suggestion: google.maps.places.AutocompleteSuggestion) => React$1.ReactNode;
76
+ };
77
+ type GoogleMapsSearchControlStatusProps = Omit<React$1.ComponentProps<typeof AutocompleteStatus>, 'children'> & {
78
+ children: (status: {
79
+ isPending: boolean;
80
+ results: google.maps.places.AutocompleteSuggestion[] | undefined;
81
+ }) => React$1.ReactNode;
82
+ };
83
+ type GoogleMapsSearchControlResultsProps = Omit<React$1.ComponentProps<typeof AutocompleteCollection>, 'children'> & {
84
+ children: (result: google.maps.places.AutocompleteSuggestion, index: number) => React$1.ReactNode;
85
+ };
86
+ type GoogleMapSearchControlEmptyProps = React$1.ComponentProps<typeof AutocompleteEmpty>;
87
+ type GoogleMapSearchControlContentProps = React$1.ComponentProps<typeof AutocompleteContent>;
88
+ type GoogleMapSearchControlSubmitProps = React$1.ComponentProps<typeof Button>;
89
+ export declare function GoogleMapSearchControl({ onSuggestionSelect, onValueChange, value: controlledValue, defaultValue, itemToStringValue, debounceInterval, locale, children, ...props }: GoogleMapSearchControlProps): React$1.JSX.Element;
90
+ export declare function GoogleMapSearchControlEmpty({ className, children, ref, ...props }: GoogleMapSearchControlEmptyProps): import("react").JSX.Element;
91
+ export declare function GoogleMapSearchControlInput({ className, onKeyDown, ref, ...props }: GoogleMapSearchControlInputProps): import("react").JSX.Element;
92
+ export declare function GoogleMapSearchControlInputGroup({ className, ref, ...props }: GoogleMapSearchControlInputGroupProps): import("react").JSX.Element;
93
+ export declare function GoogleMapSearchControlSubmit({ className, onClick, ref, ...props }: GoogleMapSearchControlSubmitProps): React$1.JSX.Element;
94
+ export declare function GoogleMapSearchControlSuggestion({ suggestion, className, children, ref, ...props }: GoogleMapSearchControlSuggestionProps): import("react").JSX.Element;
95
+ export declare function GoogleMapTiltControl({ className, children, ref, ...props }: GoogleMapTiltControlProps): import("react").JSX.Element;
96
+ export declare function GoogleMapZoomControl({ step, className, children, ref, ...props }: GoogleMapZoomControlProps): import("react").JSX.Element;
97
+ export declare function GoogleMapSearchControlContent({ className, ref, ...props }: GoogleMapSearchControlContentProps): import("react").JSX.Element;
98
+ export declare function GoogleMapsSearchControlResults({ children, ...props }: GoogleMapsSearchControlResultsProps): import("react").JSX.Element;
99
+ export declare function GoogleMapsSearchControlStatus({ className, children, ref, ...props }: GoogleMapsSearchControlStatusProps): import("react").JSX.Element;
100
+ declare function useGoogleMapSearchControl(): GoogleMapSearchControlValue;
101
+ interface UseGoogleMapViewportOptions {
102
+ padding?: number;
103
+ }
104
+ interface UseGoogleMapViewportResult {
105
+ bounds: BBox;
106
+ zoom: number;
107
+ }
108
+ export declare function useGoogleMapViewport({ padding }?: UseGoogleMapViewportOptions): UseGoogleMapViewportResult;
109
+ interface UseSuperclusterOptions<Properties extends GeoJsonProperties, ClusterPropertiesValue extends GeoJsonProperties> {
110
+ geojson: FeatureCollection<Point, Properties>;
111
+ bounds: BBox;
112
+ zoom: number;
113
+ options?: Options<Properties, ClusterPropertiesValue>;
114
+ }
115
+ interface UseSuperclusterResult<Properties extends GeoJsonProperties, ClusterPropertiesValue extends GeoJsonProperties> {
116
+ clusters: (ClusterFeature<ClusterPropertiesValue> | PointFeature<Properties>)[];
117
+ getChildren: (clusterId: number) => (ClusterFeature<ClusterPropertiesValue> | PointFeature<Properties>)[];
118
+ getClusterExpansionZoom: (clusterId: number) => number;
119
+ getLeaves: (clusterId: number, limit?: number, offset?: number) => PointFeature<Properties>[];
120
+ }
121
+ export declare function useSupercluster<Properties extends GeoJsonProperties, ClusterPropertiesValue extends GeoJsonProperties = ClusterProperties>({ geojson, bounds, zoom, options }: UseSuperclusterOptions<Properties, ClusterPropertiesValue>): UseSuperclusterResult<Properties, ClusterPropertiesValue>;
122
+ declare const GoogleMap: typeof GoogleMap$1 & {
123
+ Cluster: typeof GoogleMapCluster;
124
+ ClusterLayer: typeof GoogleMapClusterLayer;
125
+ DeckGLOverlay: typeof GoogleMapDeckGLOverlay;
126
+ Frame: typeof GoogleMapFrame;
127
+ GeolocateControl: typeof GoogleMapGeolocateControl;
128
+ Marker: typeof GoogleMapMarker;
129
+ MarkerLayer: typeof GoogleMapMarkerLayer;
130
+ SearchControl: typeof GoogleMapSearchControl;
131
+ SearchControlContent: typeof GoogleMapSearchControlContent;
132
+ SearchControlEmpty: typeof GoogleMapSearchControlEmpty;
133
+ SearchControlInput: typeof GoogleMapSearchControlInput;
134
+ SearchControlInputGroup: typeof GoogleMapSearchControlInputGroup;
135
+ SearchControlResults: typeof GoogleMapsSearchControlResults;
136
+ SearchControlStatus: typeof GoogleMapsSearchControlStatus;
137
+ SearchControlSubmit: typeof GoogleMapSearchControlSubmit;
138
+ SearchControlSuggestion: typeof GoogleMapSearchControlSuggestion;
139
+ TiltControl: typeof GoogleMapTiltControl;
140
+ ZoomControl: typeof GoogleMapZoomControl;
141
+ };
142
+ export { GoogleMap, type GoogleMapClusterLayerItem, type GoogleMapClusterLayerProps, type GoogleMapClusterProps, type GoogleMapClusterRenderContext, type GoogleMapDeckGLOverlayProps, type GoogleMapFrameProps, type GoogleMapGeolocateControlProps, type GoogleMapMarkerLayerProps, type GoogleMapMarkerProps, type GoogleMapProps, type GoogleMapSearchControlContentProps, type GoogleMapSearchControlContextProps, type GoogleMapSearchControlEmptyProps, type GoogleMapSearchControlInputGroupProps, type GoogleMapSearchControlInputProps, type GoogleMapSearchControlProps, type GoogleMapSearchControlSubmitProps, type GoogleMapSearchControlSuggestionProps, type GoogleMapSearchControlValue, type GoogleMapTiltControlProps, type GoogleMapZoomControlProps, type GoogleMapsSearchControlResultsProps, type GoogleMapsSearchControlStatusProps, type UseGoogleMapViewportOptions, type UseGoogleMapViewportResult, type UseSuperclusterOptions, type UseSuperclusterResult, useGoogleMapSearchControl };
143
+ //# sourceMappingURL=index.d.ts.map