@avs/go 0.14.72000 → 0.14.72008

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 (43) hide show
  1. package/README.md +1 -1
  2. package/dist/avs-element-mixin.d.ts +28 -0
  3. package/dist/avs-element-mixin.d.ts.map +1 -0
  4. package/dist/avs-element-mixin.js +108 -0
  5. package/dist/avs-go-dataviz.d.ts +457 -0
  6. package/dist/avs-go-dataviz.d.ts.map +1 -0
  7. package/dist/avs-go-dataviz.js +2090 -0
  8. package/dist/avs-go-dynamic-html.d.ts +52 -0
  9. package/dist/avs-go-dynamic-html.d.ts.map +1 -0
  10. package/dist/avs-go-dynamic-html.js +124 -0
  11. package/dist/avs-go-info.d.ts +57 -0
  12. package/dist/avs-go-info.d.ts.map +1 -0
  13. package/dist/avs-go-info.js +127 -0
  14. package/dist/avs-go.min.js +211 -160
  15. package/dist/avs-renderer.d.ts +37 -0
  16. package/dist/avs-renderer.d.ts.map +1 -0
  17. package/dist/avs-renderer.js +33 -0
  18. package/dist/constants.d.ts +21 -0
  19. package/dist/constants.d.ts.map +1 -0
  20. package/dist/constants.js +20 -0
  21. package/dist/icons.d.ts +28 -0
  22. package/dist/icons.d.ts.map +1 -0
  23. package/dist/icons.js +27 -0
  24. package/dist/index.d.ts +23 -0
  25. package/dist/index.d.ts.map +1 -0
  26. package/dist/index.js +22 -0
  27. package/dist/types.d.ts +142 -0
  28. package/dist/types.d.ts.map +1 -0
  29. package/dist/types.js +36 -0
  30. package/package.json +4 -3
  31. package/rollup.config.js +17 -7
  32. package/src/avs-element-mixin.ts +126 -0
  33. package/src/{avs-go-dataviz.js → avs-go-dataviz.ts} +518 -654
  34. package/src/{avs-go-dynamic-html.js → avs-go-dynamic-html.ts} +37 -50
  35. package/src/{avs-go-info.js → avs-go-info.ts} +36 -47
  36. package/src/{avs-renderer.js → avs-renderer.ts} +10 -2
  37. package/src/{constants.js → constants.ts} +1 -1
  38. package/src/icons.ts +29 -0
  39. package/src/{avs-go.js → index.ts} +3 -3
  40. package/src/types.ts +160 -0
  41. package/tsconfig.json +16 -0
  42. package/src/avs-element-base.js +0 -119
  43. package/src/logo.js +0 -29
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2018 Advanced Visual Systems Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ *
17
+ * This product includes software developed at
18
+ * Advanced Visual Systems Inc. (http://www.avs.com)
19
+ */
20
+ import { WebGLRenderer } from 'three';
21
+ /**
22
+ * `avs-renderer` is a custom element created internally by
23
+ * `avs-go-dataviz` to share a single instance of THREE.WebGLRenderer
24
+ * between multiple viewers.
25
+ *
26
+ * @customElement
27
+ */
28
+ export declare class AvsRenderer extends HTMLElement {
29
+ webGLRenderer: WebGLRenderer;
30
+ connectedCallback(): void;
31
+ }
32
+ declare global {
33
+ interface HTMLElementTagNameMap {
34
+ 'avs-renderer': AvsRenderer;
35
+ }
36
+ }
37
+ //# sourceMappingURL=avs-renderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avs-renderer.d.ts","sourceRoot":"","sources":["../src/avs-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC;;;;;;GAMG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C,aAAa,EAAE,aAAa,CAAC;IAE7B,iBAAiB;CAGlB;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;KAC7B;CACF"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2018 Advanced Visual Systems Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ *
17
+ * This product includes software developed at
18
+ * Advanced Visual Systems Inc. (http://www.avs.com)
19
+ */
20
+ import { WebGLRenderer } from 'three';
21
+ /**
22
+ * `avs-renderer` is a custom element created internally by
23
+ * `avs-go-dataviz` to share a single instance of THREE.WebGLRenderer
24
+ * between multiple viewers.
25
+ *
26
+ * @customElement
27
+ */
28
+ export class AvsRenderer extends HTMLElement {
29
+ connectedCallback() {
30
+ this.webGLRenderer = new WebGLRenderer({ alpha: true });
31
+ }
32
+ }
33
+ customElements.define('avs-renderer', AvsRenderer);
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2018 Advanced Visual Systems Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ *
17
+ * This product includes software developed at
18
+ * Advanced Visual Systems Inc. (http://www.avs.com)
19
+ */
20
+ export declare const VERSION: string;
21
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,OAAO,EAAE,MAAqB,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2018 Advanced Visual Systems Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ *
17
+ * This product includes software developed at
18
+ * Advanced Visual Systems Inc. (http://www.avs.com)
19
+ */
20
+ export const VERSION = '0.14.72008';
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2018 Advanced Visual Systems Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ *
17
+ * This product includes software developed at
18
+ * Advanced Visual Systems Inc. (http://www.avs.com)
19
+ */
20
+ export declare const AVS: string;
21
+ export declare const TIMELAPSE: string;
22
+ export declare const CAMERA: string;
23
+ export declare const PLAY: string;
24
+ export declare const HOME: string;
25
+ export declare const DELETE: string;
26
+ export declare const COPY: string;
27
+ export declare const LINK: string;
28
+ //# sourceMappingURL=icons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../src/icons.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,GAAG,EAAE,MAAm8F,CAAC;AAEt9F,eAAO,MAAM,SAAS,EAAE,MAAib,CAAC;AAC1c,eAAO,MAAM,MAAM,EAAE,MAA0b,CAAC;AAChd,eAAO,MAAM,IAAI,EAAE,MAA+O,CAAC;AACnQ,eAAO,MAAM,IAAI,EAAE,MAA4Q,CAAC;AAChS,eAAO,MAAM,MAAM,EAAE,MAA4R,CAAC;AAClT,eAAO,MAAM,IAAI,EAAE,MAA8T,CAAC;AAClV,eAAO,MAAM,IAAI,EAAE,MAA0W,CAAC"}
package/dist/icons.js ADDED
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2018 Advanced Visual Systems Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ *
17
+ * This product includes software developed at
18
+ * Advanced Visual Systems Inc. (http://www.avs.com)
19
+ */
20
+ export const AVS = "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"46px\" viewBox=\"0 0 12.170833 12.170834\" width=\"46px\"><path d=\"M 7.2486073,9.9076469 H 5.2849946 L 8.4704866,6.123394 6.2360101,3.4130208 7.1885217,2.271515 10.424524,6.122616 Z M 6.0677825,8.6164059 3.9785527,6.1181874 6.0843599,3.5947138 8.1676051,6.1217782 Z M 1.7215741,6.1177086 6.5503222,0.33124232 H 8.5047186 L 3.6754319,6.1184268 5.9155339,8.7972611 4.958833,9.9337997 Z M 7.3399924,2.0900614 9.0019205,0.09856041 H 6.441462 L 1.4175556,6.1188457 4.7994028,10.140329 H 7.3569887 L 10.728423,6.122616 Z\" style=\"display:inline;fill:#2e8cbd;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0598462\" id=\"path22\" /><path d=\"M 7.2486073,9.9076469 H 5.2849946 L 8.4704866,6.123394 6.2360101,3.4130208 7.1885217,2.271515 10.424524,6.122616 Z M 6.0677825,8.6164059 3.9785527,6.1181874 6.0843599,3.5947138 8.1676051,6.1217782 Z M 1.7215741,6.1177086 6.5503222,0.33124232 H 8.5047186 L 3.6754319,6.1184268 5.9155339,8.7972611 4.958833,9.9337997 Z M 7.3399924,2.0900614 9.0019205,0.09856041 H 6.441462 L 1.4175556,6.1188457 4.7994028,10.140329 H 7.3569887 L 10.728423,6.122616 Z\" style=\"fill:none;stroke:#2e8cbd;stroke-width:0.179539;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1\" id=\"path26\" /><g id=\"g78\" class=\"spinnerBackground\"><path d=\"M 5.0916012,7.2951741 C 4.5581951,6.6568 4.1217726,6.1273448 4.1217726,6.1186069 c 0,-0.022412 1.9511841,-2.3603376 1.9654853,-2.3550616 0.00645,0.00237 0.4481639,0.5337638 0.981573,1.1808488 L 8.0386633,6.1209126 7.7794202,6.4289493 C 7.6368389,6.5983701 7.1955674,7.1235887 6.7988191,7.5961017 6.4020707,8.0686158 6.0738528,8.4553619 6.0694438,8.4555369 6.0650388,8.4557059 5.6250056,7.9335497 5.0916012,7.2951741 Z\" id=\"path39\" /><path d=\"M 5.5264617,9.7764122 C 5.5385577,9.7616559 6.2319291,8.9374956 7.0672769,7.9449584 7.9026265,6.9524246 8.5861155,6.1329723 8.5861409,6.1239554 8.5861681,6.1149485 8.0879549,5.5032753 7.4789997,4.7647 6.8700453,4.0261248 6.3741103,3.4156149 6.3769213,3.4080117 6.3797713,3.4004117 6.562373,3.1774787 6.7827896,2.9126121 7.164399,2.4540426 7.1848936,2.4323657 7.2117806,2.4588741 7.2273026,2.4741751 7.9274525,3.3048587 8.767655,4.3048177 L 10.295296,6.1229243 9.4136171,7.1736012 C 8.9286921,7.751474 8.2336861,8.5795488 7.8691565,9.0137659 L 7.2063776,9.8032561 H 6.3554188 c -0.7939025,0 -0.8494825,-0.00179 -0.8289571,-0.026839 z\" id=\"path41\" /><path d=\"M 3.4382986,7.9881037 C 2.6063322,7.0074024 1.9089456,6.1852746 1.8885531,6.1611518 L 1.8514763,6.1172937 4.2262773,3.2714352 6.6010789,0.42557499 H 7.4490822 8.2970851 L 7.0763447,1.8883334 c -3.0218884,3.6209928 -3.5158893,4.2139972 -3.519859,4.2252855 -0.00231,0.00662 0.4954141,0.6094855 1.1060858,1.3397178 0.6106728,0.7302338 1.1103133,1.3348316 1.1103133,1.3435515 0,0.017734 -0.7956667,0.9718373 -0.8117152,0.9733472 -0.00562,5.108e-4 -0.6909038,-0.80143 -1.522871,-1.7821306 z\" id=\"path43\" /></g></svg>";
21
+ export const TIMELAPSE = "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"currentColor\"><path d=\"M0 0h24v24H0V0z\" fill=\"none\"/><path d=\"M16.24 7.75c-1.17-1.17-2.7-1.76-4.24-1.76v6l-4.24 4.24c2.34 2.34 6.14 2.34 8.49 0 2.34-2.34 2.34-6.14-.01-8.48zM12 1.99c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"/></svg>";
22
+ export const CAMERA = "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"currentColor\"><path d=\"M0 0h24v24H0V0z\" fill=\"none\"/><path d=\"M20 4h-3.17L15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V6h4.05l1.83-2h4.24l1.83 2H20v12zM12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0 8c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z\"/></svg>";
23
+ export const PLAY = "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"currentColor\"><path d=\"M0 0h24v24H0V0z\" fill=\"none\"/><path d=\"M10 8.64L15.27 12 10 15.36V8.64M8 5v14l11-7L8 5z\"/></svg>";
24
+ export const HOME = "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"currentColor\"><path d=\"M0 0h24v24H0V0z\" fill=\"none\"/><path d=\"M12 5.69l5 4.5V18h-2v-6H9v6H7v-7.81l5-4.5M12 3L2 12h3v8h6v-6h2v6h6v-8h3L12 3z\"/></svg>";
25
+ export const DELETE = "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"currentColor\"><path d=\"M0 0h24v24H0V0z\" fill=\"none\"/><path d=\"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z\"/></svg>";
26
+ export const COPY = "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"currentColor\"><path d=\"M0 0h24v24H0V0z\" fill=\"none\"/><path d=\"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z\"/></svg>";
27
+ export const LINK = "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"currentColor\"><path d=\"M0 0h24v24H0V0z\" fill=\"none\"/><path d=\"M17 7h-4v2h4c1.65 0 3 1.35 3 3s-1.35 3-3 3h-4v2h4c2.76 0 5-2.24 5-5s-2.24-5-5-5zm-6 8H7c-1.65 0-3-1.35-3-3s1.35-3 3-3h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-2zm-3-4h8v2H8z\"/></svg>";
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2018 Advanced Visual Systems Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ *
17
+ * This product includes software developed at
18
+ * Advanced Visual Systems Inc. (http://www.avs.com)
19
+ */
20
+ export { AvsGoDataViz } from './avs-go-dataviz';
21
+ export { AvsGoInfo } from './avs-go-info';
22
+ export { AvsGoDynamicHtml } from './avs-go-dynamic-html';
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2018 Advanced Visual Systems Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ *
17
+ * This product includes software developed at
18
+ * Advanced Visual Systems Inc. (http://www.avs.com)
19
+ */
20
+ export { AvsGoDataViz } from './avs-go-dataviz';
21
+ export { AvsGoInfo } from './avs-go-info';
22
+ export { AvsGoDynamicHtml } from './avs-go-dynamic-html';
@@ -0,0 +1,142 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Advanced Visual Systems Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ *
17
+ * This product includes software developed at
18
+ * Advanced Visual Systems Inc. (http://www.avs.com)
19
+ */
20
+ export declare enum Renderer {
21
+ IMAGE = "IMAGE",
22
+ SVG = "SVG",
23
+ THREEJS = "THREEJS"
24
+ }
25
+ export declare enum PickDepth {
26
+ CLOSEST = "CLOSEST",
27
+ ALL = "ALL"
28
+ }
29
+ export declare enum PickLevel {
30
+ SCENE_NODE = "SCENE_NODE",
31
+ CELL_SET = "CELL_SET",
32
+ CELL = "CELL"
33
+ }
34
+ export interface PanProperties {
35
+ widthZoomLevel?: number;
36
+ heightZoomLevel?: number;
37
+ }
38
+ export interface StreamProperties {
39
+ chunkSizeFirst?: number;
40
+ chunkSize?: number;
41
+ chunkId?: string;
42
+ }
43
+ export interface PickDetail {
44
+ x?: number;
45
+ y?: number;
46
+ left?: number;
47
+ right?: number;
48
+ top?: number;
49
+ bottom?: number;
50
+ selected?: Array<SelectedInfo>;
51
+ }
52
+ export interface PickProperties extends PickDetail {
53
+ type: string;
54
+ level?: PickLevel;
55
+ depth?: PickDepth;
56
+ highlight?: boolean;
57
+ highlightColor?: string;
58
+ highlightLayer?: boolean;
59
+ }
60
+ export interface RendererProperties {
61
+ name?: string;
62
+ userProperties?: object;
63
+ type: Renderer;
64
+ width: number;
65
+ height: number;
66
+ themeName?: string;
67
+ cssProperties?: object;
68
+ pickProperties?: PickProperties;
69
+ panProperties?: PanProperties;
70
+ streamProperties?: StreamProperties;
71
+ transformMatrix?: Array<number>;
72
+ fullReset?: boolean;
73
+ }
74
+ export interface DataVizModel {
75
+ sceneProperties: {
76
+ name: string;
77
+ userProperties?: object;
78
+ };
79
+ dataSourceProperties?: {
80
+ name: string;
81
+ userProperties?: object;
82
+ };
83
+ rendererProperties?: RendererProperties;
84
+ }
85
+ export interface SelectedInfo {
86
+ seriesIndex?: number;
87
+ itemIndex?: number;
88
+ componentInfo?: string;
89
+ }
90
+ export interface MotionCaptureFrame {
91
+ time: number;
92
+ scale: number;
93
+ position: Array<number>;
94
+ rotation: Array<number>;
95
+ }
96
+ export interface HttpResponse {
97
+ error?: string;
98
+ }
99
+ export interface SceneInfo {
100
+ color?: string;
101
+ backgroundColor?: string;
102
+ fontFamily?: string;
103
+ }
104
+ export interface ThreeJS {
105
+ chunkId?: string;
106
+ moreChunks?: boolean;
107
+ }
108
+ export interface DataVizResponse extends HttpResponse {
109
+ sceneInfo?: SceneInfo;
110
+ selectionInfo?: PickProperties;
111
+ image?: string;
112
+ imagemap?: string;
113
+ svg?: string;
114
+ threejs?: ThreeJS;
115
+ }
116
+ export interface InfoModel {
117
+ infoProperties: {
118
+ name: string;
119
+ userProperties?: object;
120
+ };
121
+ dataSourceProperties?: {
122
+ name: string;
123
+ userProperties?: object;
124
+ };
125
+ }
126
+ export interface InfoResponse extends HttpResponse {
127
+ info?: string;
128
+ }
129
+ export interface DynamicHtmlModel {
130
+ dynamicHtmlProperties: {
131
+ name: string;
132
+ userProperties?: object;
133
+ };
134
+ dataSourceProperties?: {
135
+ name: string;
136
+ userProperties?: object;
137
+ };
138
+ }
139
+ export interface DynamicHtmlResponse extends HttpResponse {
140
+ html?: string;
141
+ }
142
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,oBAAY,QAAQ;IAClB,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,OAAO,YAAY;CACpB;AAED,oBAAY,SAAS;IACnB,OAAO,YAAY;IACnB,GAAG,QAAQ;CACZ;AAED,oBAAY,SAAS;IACnB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,IAAI,SAAS;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;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AAC,EAAE,MAAM,CAAC;CACf"}
package/dist/types.js ADDED
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Advanced Visual Systems Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ *
17
+ * This product includes software developed at
18
+ * Advanced Visual Systems Inc. (http://www.avs.com)
19
+ */
20
+ export var Renderer;
21
+ (function (Renderer) {
22
+ Renderer["IMAGE"] = "IMAGE";
23
+ Renderer["SVG"] = "SVG";
24
+ Renderer["THREEJS"] = "THREEJS";
25
+ })(Renderer || (Renderer = {}));
26
+ export var PickDepth;
27
+ (function (PickDepth) {
28
+ PickDepth["CLOSEST"] = "CLOSEST";
29
+ PickDepth["ALL"] = "ALL";
30
+ })(PickDepth || (PickDepth = {}));
31
+ export var PickLevel;
32
+ (function (PickLevel) {
33
+ PickLevel["SCENE_NODE"] = "SCENE_NODE";
34
+ PickLevel["CELL_SET"] = "CELL_SET";
35
+ PickLevel["CELL"] = "CELL";
36
+ })(PickLevel || (PickLevel = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avs/go",
3
- "version": "0.14.72000",
3
+ "version": "0.14.72008",
4
4
  "description": "AVS/Go",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -15,15 +15,16 @@
15
15
  ],
16
16
  "author": "Advanced Visual Systems Inc.",
17
17
  "main": "dist/avs-go.min.js",
18
+ "types": "dist/index.d.ts",
18
19
  "repository": {
19
20
  "type": "git",
20
21
  "url": "git+https://github.com/avs/avs-go.git",
21
22
  "directory": "packages/core"
22
23
  },
23
24
  "scripts": {
24
- "build": "rollup -c",
25
+ "build": "tsc && rollup -c",
25
26
  "start": "http-server -o demo/jsonView.html",
26
- "type-check": "echo 'No TypeScript in core package'"
27
+ "type-check": "tsc"
27
28
  },
28
29
  "license": "Apache-2.0",
29
30
  "dependencies": {
package/rollup.config.js CHANGED
@@ -1,16 +1,26 @@
1
1
  import terser from '@rollup/plugin-terser';
2
- import nodeResolve from '@rollup/plugin-node-resolve';
2
+ import resolve from '@rollup/plugin-node-resolve';
3
+ import summary from 'rollup-plugin-summary';
3
4
 
4
5
  export default {
5
- input: [
6
- 'src/avs-go.js'
7
- ],
6
+ input: 'dist/index.js',
7
+ onwarn(warning) {
8
+ if (warning.code !== 'THIS_IS_UNDEFINED') {
9
+ console.error(`(!) ${warning.message}`);
10
+ }
11
+ },
8
12
  plugins: [
9
- nodeResolve(),
10
- terser()
13
+ resolve(),
14
+ terser({
15
+ ecma: 2021,
16
+ module: true,
17
+ warnings: true
18
+ }),
19
+ summary()
11
20
  ],
12
21
  output: {
13
22
  file: 'dist/avs-go.min.js',
14
- format: 'umd'
23
+ format: 'umd',
24
+ name: 'AvsGo'
15
25
  }
16
26
  }
@@ -0,0 +1,126 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2018 Advanced Visual Systems Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ *
17
+ * This product includes software developed at
18
+ * Advanced Visual Systems Inc. (http://www.avs.com)
19
+ */
20
+
21
+ import { LitElement } from 'lit';
22
+ import { VERSION } from './constants.js';
23
+ import { HttpResponse } from './types.js';
24
+
25
+ type Constructor<T = {}> = new (...args: any[]) => T;
26
+
27
+ export declare class AvsElementMixinInterface {
28
+ _httpRequest(url: string, onLoad?: (response: any) => void, onError?: () => void, model?: object);
29
+ _dispatchErrorEvent(error: string);
30
+ }
31
+
32
+ export const AvsElementMixin = <T extends Constructor<LitElement>>(superClass: T) => {
33
+ class AvsElementMixinClass extends superClass {
34
+ /**
35
+ * Generate a HTTP request.
36
+ * @param url URL to an instance of AVS/Go server or file to get.
37
+ * @param model Model content to POST to the server (or undefined to generate a GET request).
38
+ */
39
+ _httpRequest(url: string, onLoad?: (response: any) => void, onError?: () => void, model?: object) {
40
+ if (!url) {
41
+ this._dispatchErrorEvent("'url' property must point to an instance of AVS/Go server.");
42
+ onError?.();
43
+ }
44
+
45
+ // Assembly the request body
46
+ const verArray = VERSION.split('.');
47
+ const version = [parseInt(verArray[0]), parseInt(verArray[1]), parseInt(verArray[2])];
48
+ const body = {
49
+ source: this.localName,
50
+ model: model,
51
+ version: version
52
+ };
53
+
54
+ // Send the request
55
+ fetch(url, {
56
+ method: model ? 'POST' : 'GET',
57
+ headers: {
58
+ 'Content-Type': 'application/json'
59
+ },
60
+ body: model ? JSON.stringify(body) : undefined
61
+ })
62
+ .then(response => response.json())
63
+ .then((response: HttpResponse) => {
64
+ if (response.error) {
65
+ this._processServerError(response.error);
66
+ onError?.();
67
+ }
68
+ else {
69
+ onLoad?.(response);
70
+ }
71
+ })
72
+ .catch(error => {
73
+ this._dispatchErrorEvent(error);
74
+ onError?.();
75
+ });
76
+ }
77
+
78
+ /**
79
+ * @param error
80
+ */
81
+ _processServerError(error: string) {
82
+ if (!error) {
83
+ return;
84
+ }
85
+
86
+ const goException = JSON.parse(decodeURIComponent(error.replace(/\+/g, '%20')));
87
+ let output = "An error occurred on the AVS/Go server";
88
+
89
+ for (const key in goException) {
90
+ if (goException.hasOwnProperty(key)) {
91
+ if (output != "") {
92
+ output += "\n ";
93
+ }
94
+ output += key + ": ";
95
+ const child = goException[key];
96
+ if (child === Object(child)) {
97
+ output = output + JSON.stringify(child);
98
+ }
99
+ else {
100
+ output = output + goException[key];
101
+ }
102
+ }
103
+ }
104
+
105
+ this._dispatchErrorEvent(output);
106
+ }
107
+
108
+ /**
109
+ *
110
+ * @param {any} error
111
+ */
112
+ _dispatchErrorEvent(error: string) {
113
+ /**
114
+ * Error message from AVS/Go Web Component or Server.
115
+ * @event avs-error
116
+ */
117
+ this.dispatchEvent(new CustomEvent('avs-error', {
118
+ bubbles: true,
119
+ composed: true,
120
+ detail: error
121
+ }));
122
+ }
123
+ };
124
+
125
+ return AvsElementMixinClass as Constructor<AvsElementMixinInterface> & T;
126
+ }