@ifc-lite/viewer 1.26.0 → 1.27.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 (89) hide show
  1. package/.turbo/turbo-build.log +38 -31
  2. package/CHANGELOG.md +29 -0
  3. package/dist/assets/{basketViewActivator-ZpTYWE3K.js → basketViewActivator-B3CdrLsb.js} +7 -7
  4. package/dist/assets/{bcf-Ctcu_Sc2.js → bcf-QeHK_Aud.js} +1 -1
  5. package/dist/assets/{browser-DXS29_v9.js → browser-BIoDDfBW.js} +1 -1
  6. package/dist/assets/{cesium-BoVuJvTC.js → cesium-CzZn5yVA.js} +319 -319
  7. package/dist/assets/{deflate-Cnx0il6E.js → deflate-B-d0SYQM.js} +1 -1
  8. package/dist/assets/exceljs.min-DsuzKYnj.js +29 -0
  9. package/dist/assets/{exporters-DSq76AVM.js → exporters-B4LbZFeT.js} +1422 -1194
  10. package/dist/assets/geometry.worker-BdH-E6NB.js +1 -0
  11. package/dist/assets/{geotiff-A5UjhI6L.js → geotiff-CrVtDRFq.js} +10 -10
  12. package/dist/assets/html2canvas.esm-Ge7aVWlp.js +5 -0
  13. package/dist/assets/{ids-DiLcGTer.js → ids-DjsGFN10.js} +4 -4
  14. package/dist/assets/ifc-lite_bg-DsYUIHm3.wasm +0 -0
  15. package/dist/assets/{index-BAH8IJVR.js → index-COYokSKc.js} +38319 -35469
  16. package/dist/assets/index-ajK6D32J.css +1 -0
  17. package/dist/assets/index.es-CY202jA3.js +6866 -0
  18. package/dist/assets/{jpeg-BzSkwo5D.js → jpeg-D4wOkf5h.js} +1 -1
  19. package/dist/assets/jspdf.es.min-DIGb9BHN.js +19571 -0
  20. package/dist/assets/jspdf.plugin.autotable-BBLUVd7n.js +2 -0
  21. package/dist/assets/{lerc-Cg2Rz-D5.js → lerc-DmW0_tgf.js} +1 -1
  22. package/dist/assets/{lzw-BBPPLW-0.js → lzw-oWetY-d6.js} +1 -1
  23. package/dist/assets/{maplibre-gl-Do6O5tDc.js → maplibre-gl-BF3Z0idw.js} +1 -1
  24. package/dist/assets/{native-bridge-CPojOeGE.js → native-bridge-BX8_tHXE.js} +1 -1
  25. package/dist/assets/{packbits-yLSpjW-V.js → packbits-F8Nkp4NY.js} +1 -1
  26. package/dist/assets/{pako.esm-Cram60i4.js → pako.esm-n3Pgozwg.js} +1 -1
  27. package/dist/assets/{parser.worker-8md211IW.js → parser.worker-D591Zu_-.js} +3 -3
  28. package/dist/assets/pdf-Dsh3HPZB.js +135 -0
  29. package/dist/assets/raw-D9iw0tmc.js +1 -0
  30. package/dist/assets/{sandbox-CsRXlgCO.js → sandbox-BAC3a-eN.js} +1735 -1660
  31. package/dist/assets/server-client-Cjwnm7il.js +706 -0
  32. package/dist/assets/{webimage-YafxjjGr.js → webimage-BLV1dgmd.js} +1 -1
  33. package/dist/assets/xlsx-Bc2HTrjC.js +142 -0
  34. package/dist/assets/{zip-BJqVbRkU.js → zip-DFgP-l20.js} +1 -1
  35. package/dist/assets/{zstd-CkSLOiuu.js → zstd-C_1HxVrA.js} +1 -1
  36. package/dist/index.html +8 -8
  37. package/package.json +10 -7
  38. package/src/components/mcp/PlaygroundChat.tsx +1 -0
  39. package/src/components/mcp/data.ts +6 -0
  40. package/src/components/mcp/playground-dispatcher.ts +277 -0
  41. package/src/components/mcp/types.ts +2 -1
  42. package/src/components/ui/combo-input.tsx +163 -0
  43. package/src/components/ui/tabs.tsx +1 -1
  44. package/src/components/viewer/PropertiesPanel.tsx +13 -6
  45. package/src/components/viewer/SearchInline.tsx +62 -2
  46. package/src/components/viewer/SearchModal.filter.builder.tsx +24 -393
  47. package/src/components/viewer/SearchModal.filter.editors.tsx +503 -0
  48. package/src/components/viewer/SearchModal.filter.tsx +64 -1
  49. package/src/components/viewer/SearchModal.tsx +19 -6
  50. package/src/components/viewer/Viewport.tsx +15 -0
  51. package/src/components/viewer/lists/ColumnHeaderMenu.tsx +84 -0
  52. package/src/components/viewer/lists/ListBuilder.tsx +789 -280
  53. package/src/components/viewer/lists/ListGroupingBar.tsx +72 -0
  54. package/src/components/viewer/lists/ListPanel.tsx +49 -5
  55. package/src/components/viewer/lists/ListResultsTable.tsx +270 -176
  56. package/src/components/viewer/lists/list-table-utils.ts +123 -0
  57. package/src/generated/mcp-catalog.json +4 -0
  58. package/src/hooks/source-key.ts +35 -0
  59. package/src/hooks/useAlignmentLines3D.ts +1 -26
  60. package/src/hooks/useGridLines3D.ts +140 -0
  61. package/src/lib/length-unit-scale.ts +41 -0
  62. package/src/lib/lists/adapter.ts +136 -11
  63. package/src/lib/lists/export/csv.ts +47 -0
  64. package/src/lib/lists/export/index.ts +49 -0
  65. package/src/lib/lists/export/model.ts +111 -0
  66. package/src/lib/lists/export/pdf.ts +67 -0
  67. package/src/lib/lists/export/xlsx.ts +83 -0
  68. package/src/lib/lists/index.ts +2 -0
  69. package/src/lib/search/filter-evaluate.test.ts +81 -0
  70. package/src/lib/search/filter-evaluate.ts +59 -87
  71. package/src/lib/search/filter-match.ts +167 -0
  72. package/src/lib/search/filter-rules.test.ts +25 -0
  73. package/src/lib/search/filter-rules.ts +75 -2
  74. package/src/lib/search/filter-schema.ts +0 -0
  75. package/src/lib/slab-edit.test.ts +72 -0
  76. package/src/lib/slab-edit.ts +159 -19
  77. package/src/sdk/adapters/export-adapter.ts +3 -3
  78. package/src/sdk/adapters/query-adapter.ts +3 -3
  79. package/src/store/slices/listSlice.ts +6 -0
  80. package/src/store/slices/mutationSlice.ts +14 -6
  81. package/src/store/slices/searchSlice.ts +29 -3
  82. package/src/utils/nativeSpatialDataStore.ts +6 -0
  83. package/src/utils/serverDataModel.test.ts +6 -0
  84. package/src/utils/serverDataModel.ts +7 -0
  85. package/dist/assets/geometry.worker-0Q9qEa6p.js +0 -1
  86. package/dist/assets/ifc-lite_bg-CEZnhM2e.wasm +0 -0
  87. package/dist/assets/index-B9Ug2EqU.css +0 -1
  88. package/dist/assets/raw-BQrAgxwT.js +0 -1
  89. package/dist/assets/server-client-Bk4c1CPO.js +0 -626
@@ -46,6 +46,7 @@ import {
46
46
  type SectionClipForGrid,
47
47
  } from '../../hooks/useSymbolicAnnotations.js';
48
48
  import { useAlignmentLines3D } from '../../hooks/useAlignmentLines3D.js';
49
+ import { useGridLines3D } from '../../hooks/useGridLines3D.js';
49
50
 
50
51
  interface ViewportProps {
51
52
  geometry: MeshData[] | null;
@@ -901,6 +902,20 @@ export function Viewport({
901
902
  }
902
903
  }, [alignmentVertices3D, isInitialized]);
903
904
 
905
+ // Structural-grid (IfcGridAxis) lines, gated by the `ifcGrid` type-visibility
906
+ // toggle (issue #967). Parsed once per source + cached; only the upload/clear
907
+ // is toggled so flipping visibility doesn't re-parse.
908
+ const gridVertices3D = useGridLines3D();
909
+ useEffect(() => {
910
+ const renderer = rendererRef.current;
911
+ if (!renderer || !isInitialized) return;
912
+ if (!ifcGridVisible || gridVertices3D.length === 0) {
913
+ renderer.clearGridLines3D();
914
+ } else {
915
+ renderer.uploadGridLines3D(gridVertices3D);
916
+ }
917
+ }, [gridVertices3D, ifcGridVisible, isInitialized]);
918
+
904
919
  // Upload IfcAnnotation text + fill data for the WebGPU symbolic overlay
905
920
  // pipelines. Map the hook's per-annotation records into the SymbolicFillInput
906
921
  // / SymbolicTextInput shape the renderer expects. Empty arrays clear cleanly.
@@ -0,0 +1,84 @@
1
+ /* This Source Code Form is subject to the terms of the Mozilla Public
2
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
+
5
+ /**
6
+ * Per-column actions menu for the Lists results table header. Brings
7
+ * grouping / aggregation / sorting onto the table itself so the user never
8
+ * has to round-trip through the list settings.
9
+ */
10
+
11
+ import { ArrowUp, ArrowDown, Group, Ungroup, Sigma, Palette, MoreVertical } from 'lucide-react';
12
+ import {
13
+ DropdownMenu,
14
+ DropdownMenuTrigger,
15
+ DropdownMenuContent,
16
+ DropdownMenuItem,
17
+ DropdownMenuCheckboxItem,
18
+ DropdownMenuSeparator,
19
+ } from '@/components/ui/dropdown-menu';
20
+ import { cn } from '@/lib/utils';
21
+
22
+ interface ColumnHeaderMenuProps {
23
+ isNumeric: boolean;
24
+ isGroupedBy: boolean;
25
+ isSummed: boolean;
26
+ active: boolean;
27
+ onSort: (dir: 'asc' | 'desc') => void;
28
+ onToggleGroup: () => void;
29
+ onToggleSum: () => void;
30
+ onColorBy: () => void;
31
+ }
32
+
33
+ export function ColumnHeaderMenu({
34
+ isNumeric, isGroupedBy, isSummed, active,
35
+ onSort, onToggleGroup, onToggleSum, onColorBy,
36
+ }: ColumnHeaderMenuProps) {
37
+ return (
38
+ <DropdownMenu>
39
+ <DropdownMenuTrigger asChild>
40
+ <button
41
+ aria-label="Column options"
42
+ onClick={(e) => e.stopPropagation()}
43
+ className={cn(
44
+ 'shrink-0 rounded-sm p-0.5 transition-opacity hover:text-foreground',
45
+ active
46
+ ? 'text-primary opacity-100'
47
+ : 'text-muted-foreground opacity-0 group-hover/col:opacity-100 data-[state=open]:opacity-100',
48
+ )}
49
+ >
50
+ <MoreVertical className="h-3 w-3" />
51
+ </button>
52
+ </DropdownMenuTrigger>
53
+ <DropdownMenuContent align="start" className="w-52">
54
+ <DropdownMenuItem className="gap-2 text-xs" onClick={() => onSort('asc')}>
55
+ <ArrowUp className="h-3.5 w-3.5" /> Sort ascending
56
+ </DropdownMenuItem>
57
+ <DropdownMenuItem className="gap-2 text-xs" onClick={() => onSort('desc')}>
58
+ <ArrowDown className="h-3.5 w-3.5" /> Sort descending
59
+ </DropdownMenuItem>
60
+ <DropdownMenuSeparator />
61
+ <DropdownMenuItem className="gap-2 text-xs" onClick={onToggleGroup}>
62
+ {isGroupedBy
63
+ ? (<><Ungroup className="h-3.5 w-3.5" /> Remove grouping</>)
64
+ : (<><Group className="h-3.5 w-3.5" /> Group by this column</>)}
65
+ </DropdownMenuItem>
66
+ <DropdownMenuCheckboxItem
67
+ className="text-xs"
68
+ checked={isSummed}
69
+ disabled={!isNumeric}
70
+ onCheckedChange={onToggleSum}
71
+ >
72
+ <span className="flex items-center gap-2">
73
+ <Sigma className="h-3.5 w-3.5" />
74
+ {isNumeric ? 'Sum / total this column' : 'Sum (numeric only)'}
75
+ </span>
76
+ </DropdownMenuCheckboxItem>
77
+ <DropdownMenuSeparator />
78
+ <DropdownMenuItem className="gap-2 text-xs" onClick={onColorBy}>
79
+ <Palette className="h-3.5 w-3.5" /> Colour by this column
80
+ </DropdownMenuItem>
81
+ </DropdownMenuContent>
82
+ </DropdownMenu>
83
+ );
84
+ }