@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
@@ -1 +1 @@
1
- import{B as m}from"./geotiff-A5UjhI6L.js";import"./sandbox-CsRXlgCO.js";import"./lens-PYsLu_MA.js";import"./__vite-browser-external-B1O5LaIO.js";class u extends m{constructor(i){if(super(i),typeof createImageBitmap>"u")throw new Error("Cannot decode WebImage as `createImageBitmap` is not available");if(typeof document>"u"&&typeof OffscreenCanvas>"u")throw new Error("Cannot decode WebImage as neither `document` nor `OffscreenCanvas` is not available")}async decodeBlock(i){const c=new Blob([i]),e=await createImageBitmap(c);let t;typeof document<"u"?(t=document.createElement("canvas"),t.width=e.width,t.height=e.height):t=new OffscreenCanvas(e.width,e.height);const d=t.getContext("2d");d.drawImage(e,0,0);const r=d.getImageData(0,0,e.width,e.height).data,s=this.parameters.samplesPerPixel||4;if(s===4)return r.buffer;if(s===3){const a=new Uint8ClampedArray(e.width*e.height*3);for(let n=0,o=0;n<a.length;n+=3,o+=4)a[n]=r[o],a[n+1]=r[o+1],a[n+2]=r[o+2];return a.buffer}else throw new Error(`Unsupported SamplesPerPixel value: ${s}`)}}export{u as default};
1
+ import{B as m}from"./geotiff-CrVtDRFq.js";import"./sandbox-BAC3a-eN.js";import"./lens-PYsLu_MA.js";import"./__vite-browser-external-B1O5LaIO.js";class u extends m{constructor(i){if(super(i),typeof createImageBitmap>"u")throw new Error("Cannot decode WebImage as `createImageBitmap` is not available");if(typeof document>"u"&&typeof OffscreenCanvas>"u")throw new Error("Cannot decode WebImage as neither `document` nor `OffscreenCanvas` is not available")}async decodeBlock(i){const c=new Blob([i]),e=await createImageBitmap(c);let t;typeof document<"u"?(t=document.createElement("canvas"),t.width=e.width,t.height=e.height):t=new OffscreenCanvas(e.width,e.height);const d=t.getContext("2d");d.drawImage(e,0,0);const r=d.getImageData(0,0,e.width,e.height).data,s=this.parameters.samplesPerPixel||4;if(s===4)return r.buffer;if(s===3){const a=new Uint8ClampedArray(e.width*e.height*3);for(let n=0,o=0;n<a.length;n+=3,o+=4)a[n]=r[o],a[n+1]=r[o+1],a[n+2]=r[o+2];return a.buffer}else throw new Error(`Unsupported SamplesPerPixel value: ${s}`)}}export{u as default};
@@ -0,0 +1,142 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/exceljs.min-DsuzKYnj.js","assets/zip-DFgP-l20.js"])))=>i.map(i=>d[i]);
2
+ import { _ as p, __tla as __tla_0 } from "./sandbox-BAC3a-eN.js";
3
+ import { d as w, __tla as __tla_1 } from "./index-COYokSKc.js";
4
+ import "./lens-PYsLu_MA.js";
5
+ import "./zip-DFgP-l20.js";
6
+ import "./arrow-CXWhTnNT.js";
7
+ import "./drawing-2d-C71b8Ugx.js";
8
+ import "./bcf-QeHK_Aud.js";
9
+ import { __tla as __tla_2 } from "./exporters-B4LbZFeT.js";
10
+ import { __tla as __tla_3 } from "./server-client-Cjwnm7il.js";
11
+ import { __tla as __tla_4 } from "./ids-DjsGFN10.js";
12
+ import "./three-CQBzFWY2.js";
13
+ let I;
14
+ let __tla = Promise.all([
15
+ (()=>{
16
+ try {
17
+ return __tla_0;
18
+ } catch {}
19
+ })(),
20
+ (()=>{
21
+ try {
22
+ return __tla_1;
23
+ } catch {}
24
+ })(),
25
+ (()=>{
26
+ try {
27
+ return __tla_2;
28
+ } catch {}
29
+ })(),
30
+ (()=>{
31
+ try {
32
+ return __tla_3;
33
+ } catch {}
34
+ })(),
35
+ (()=>{
36
+ try {
37
+ return __tla_4;
38
+ } catch {}
39
+ })()
40
+ ]).then(async ()=>{
41
+ const g = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", F = "#,##0.####", b = (o)=>Math.max(8, Math.min(80, Math.round(o / 7)));
42
+ function h(o, a) {
43
+ return o == null ? null : a.numeric && typeof o == "number" && Number.isFinite(o) ? o : w(o);
44
+ }
45
+ I = async function(o) {
46
+ const a = (await p(async ()=>{
47
+ const { default: t } = await import("./exceljs.min-DsuzKYnj.js").then((e)=>e.e);
48
+ return {
49
+ default: t
50
+ };
51
+ }, __vite__mapDeps([0,1]))).default, i = new a.Workbook;
52
+ i.creator = "IFC-Lite";
53
+ const l = i.addWorksheet((o.title || "List").slice(0, 31), {
54
+ views: [
55
+ {
56
+ state: "frozen",
57
+ ySplit: 4
58
+ }
59
+ ]
60
+ }), n = o.columns, c = n.length;
61
+ l.addRow([
62
+ o.title || "List"
63
+ ]), l.mergeCells(1, 1, 1, c), l.getCell(1, 1).font = {
64
+ bold: !0,
65
+ size: 14
66
+ }, l.addRow([
67
+ `${o.totals.count.toLocaleString()} elements · ${o.generatedAt}`
68
+ ]), l.mergeCells(2, 1, 2, c), l.getCell(2, 1).font = {
69
+ italic: !0,
70
+ size: 9,
71
+ color: {
72
+ argb: "FF94A3B8"
73
+ }
74
+ }, l.addRow([]);
75
+ const u = l.addRow(n.map((t)=>t.label));
76
+ u.font = {
77
+ bold: !0,
78
+ color: {
79
+ argb: "FFFFFFFF"
80
+ }
81
+ }, u.eachCell((t)=>{
82
+ t.fill = {
83
+ type: "pattern",
84
+ pattern: "solid",
85
+ fgColor: {
86
+ argb: "FF334155"
87
+ }
88
+ }, t.alignment = {
89
+ vertical: "middle"
90
+ };
91
+ }), n.forEach((t, e)=>{
92
+ const r = l.getColumn(e + 1);
93
+ r.width = b(t.width), t.numeric && (r.numFmt = F, r.alignment = {
94
+ horizontal: "right"
95
+ });
96
+ });
97
+ const d = (t, e)=>{
98
+ const r = l.addRow(n.map((s, m)=>h(t[m], s)));
99
+ e && (r.outlineLevel = e);
100
+ };
101
+ if (o.groups) {
102
+ for (const t of o.groups){
103
+ const e = l.addRow(n.map((r, s)=>s === 0 ? `${t.label} (${t.count})` : r.summed ? t.sums[r.id] : null));
104
+ e.font = {
105
+ bold: !0
106
+ }, e.eachCell((r)=>{
107
+ r.fill = {
108
+ type: "pattern",
109
+ pattern: "solid",
110
+ fgColor: {
111
+ argb: "FFE2E8F0"
112
+ }
113
+ };
114
+ });
115
+ for (const r of t.rows)d(r, 1);
116
+ }
117
+ l.properties.outlineLevelRow = 1;
118
+ } else for (const t of o.rows)d(t);
119
+ if (o.sumColumnIds.length > 0) {
120
+ const t = l.addRow(n.map((e, r)=>e.summed ? o.totals.sums[e.id] : r === 0 ? `Total (${o.totals.count})` : null));
121
+ t.font = {
122
+ bold: !0
123
+ }, t.eachCell((e)=>{
124
+ e.border = {
125
+ top: {
126
+ style: "double",
127
+ color: {
128
+ argb: "FF334155"
129
+ }
130
+ }
131
+ };
132
+ });
133
+ }
134
+ const f = await i.xlsx.writeBuffer();
135
+ return new Blob([
136
+ f
137
+ ], {
138
+ type: g
139
+ });
140
+ };
141
+ });
142
+ export { I as toXlsx, __tla };