@mapvx/web-components 0.0.22 → 0.0.24

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 (37) hide show
  1. package/dist/cjs/{base-floor-selector-DHIQdC2s.cjs → base-floor-selector-CHfESDHE.cjs} +2 -2
  2. package/dist/cjs/{class-map-BGLcy4Zq.cjs → class-map-hyA27jHC.cjs} +2 -2
  3. package/dist/cjs/compact-floor-selector-Def-YJ-o.cjs +174 -0
  4. package/dist/cjs/{consume-vuXzE_ul.cjs → consume-De0hbKnD.cjs} +2 -2
  5. package/dist/cjs/{custom-map-CqKD5Fum.cjs → custom-map-D5AbTB7G.cjs} +26 -6
  6. package/dist/cjs/{floor-selector-Bp_umxgG.cjs → floor-selector-urAHbfeG.cjs} +2 -2
  7. package/dist/cjs/{lazy-load-DWZU-puG.cjs → lazy-load-CxL4pQ50.cjs} +2 -2
  8. package/dist/cjs/map-view-with-modal.cjs +50 -35
  9. package/dist/cjs/{qr-modal-7T6NzJv6.cjs → qr-modal-DMHM405t.cjs} +2 -2
  10. package/dist/cjs/{route-options-DdF4AtDx.cjs → route-options-BZQaj2EM.cjs} +2 -2
  11. package/dist/cjs/route-view-totems.cjs +8 -3
  12. package/dist/components/custom-map.d.ts +13 -0
  13. package/dist/components/custom-map.js +64 -0
  14. package/dist/components/floor-selector.d.ts +6 -0
  15. package/dist/components/floor-selector.js +40 -0
  16. package/dist/components/qr-modal.d.ts +7 -0
  17. package/dist/components/qr-modal.js +69 -0
  18. package/dist/components/route-options.d.ts +6 -0
  19. package/dist/components/route-options.js +51 -0
  20. package/dist/components/zoom-controls.d.ts +6 -0
  21. package/dist/components/zoom-controls.js +40 -0
  22. package/dist/es/assets/{compact-floor-selector-D-LPjNVW.js → compact-floor-selector-BS3kmZbM.js} +55 -41
  23. package/dist/es/assets/{components-BGe90NOX.js → components-Cg181WRf.js} +26 -9
  24. package/dist/es/assets/{map-view-with-modal-CwE9e04X.js → map-view-with-modal-DRCi4MZE.js} +68 -67
  25. package/dist/es/assets/{route-view-totems-Cu8sG0kp.js → route-view-totems-Bpxdz9bU.js} +13 -8
  26. package/dist/es/assets/{utils-4sQ3ZnpP.js → utils-D3oP0BX3.js} +3 -3
  27. package/dist/es/index.js +2 -2
  28. package/dist/es/route-view-totems.js +2 -2
  29. package/dist/iife/map-view-with-modal.js +135 -77
  30. package/dist/iife/route-view-totems.js +29 -4
  31. package/dist/route-view-totems.d.ts +16 -0
  32. package/dist/route-view-totems.js +58 -0
  33. package/dist/utils/styles.d.ts +2 -0
  34. package/dist/utils/styles.js +5 -0
  35. package/package.json +4 -4
  36. package/dist/cjs/compact-floor-selector-BCLDxKto.cjs +0 -151
  37. package/dist/update-timestamp.txt +0 -1
@@ -0,0 +1,16 @@
1
+ import { LitElement } from 'lit';
2
+ import './components/custom-map.js';
3
+ import './components/floor-selector.js';
4
+ import './components/qr-modal.js';
5
+ import './components/route-options.js';
6
+ import './components/zoom-controls.js';
7
+ export declare class RouteViewTotems extends LitElement {
8
+ styles: import("lit").CSSResult[];
9
+ apiKey: string;
10
+ parentPlaceId: string;
11
+ locale: string;
12
+ originId: string;
13
+ destinationId: string;
14
+ render(): import("lit-html").TemplateResult<1>;
15
+ }
16
+ //# sourceMappingURL=route-view-totems.d.ts.map
@@ -0,0 +1,58 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { LitElement, html, css } from 'lit';
8
+ import { customElement, property } from 'lit/decorators.js';
9
+ import { tailwindStyles } from './utils/styles';
10
+ import './components/custom-map.js';
11
+ import './components/floor-selector.js';
12
+ import './components/qr-modal.js';
13
+ import './components/route-options.js';
14
+ import './components/zoom-controls.js';
15
+ let RouteViewTotems = class RouteViewTotems extends LitElement {
16
+ constructor() {
17
+ super(...arguments);
18
+ this.styles = [tailwindStyles, css ``];
19
+ this.apiKey = '';
20
+ this.parentPlaceId = '';
21
+ this.locale = 'es';
22
+ this.originId = '';
23
+ this.destinationId = '';
24
+ }
25
+ render() {
26
+ return html `
27
+ <div class="flex flex-col items-center justify-center h-full">
28
+ <custom-map
29
+ apiKey="${this.apiKey}"
30
+ parentPlaceId="${this.parentPlaceId}"
31
+ locale="${this.locale}"
32
+ originId="${this.originId}"
33
+ destinationId="${this.destinationId}"
34
+ ></custom-map>
35
+ </div>
36
+ `;
37
+ }
38
+ };
39
+ __decorate([
40
+ property({ type: String })
41
+ ], RouteViewTotems.prototype, "apiKey", void 0);
42
+ __decorate([
43
+ property({ type: String })
44
+ ], RouteViewTotems.prototype, "parentPlaceId", void 0);
45
+ __decorate([
46
+ property({ type: String })
47
+ ], RouteViewTotems.prototype, "locale", void 0);
48
+ __decorate([
49
+ property({ type: String })
50
+ ], RouteViewTotems.prototype, "originId", void 0);
51
+ __decorate([
52
+ property({ type: String })
53
+ ], RouteViewTotems.prototype, "destinationId", void 0);
54
+ RouteViewTotems = __decorate([
55
+ customElement('route-view-totems')
56
+ ], RouteViewTotems);
57
+ export { RouteViewTotems };
58
+ //# sourceMappingURL=route-view-totems.js.map
@@ -0,0 +1,2 @@
1
+ export declare const tailwindStyles: import("lit").CSSResult;
2
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { css } from 'lit';
2
+ export const tailwindStyles = css `
3
+ @import 'tailwindcss';
4
+ `;
5
+ //# sourceMappingURL=styles.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mapvx/web-components",
3
3
  "description": "MapVX Web Components is a web components library that provides interactive and accessible mapping solutions. Built with Lit, it offers a modern, lightweight, and framework-agnostic way to integrate maps into any web application.",
4
- "version": "0.0.22",
4
+ "version": "0.0.24",
5
5
  "type": "module",
6
6
  "author": "Mapvx",
7
7
  "homepage": "https://mapvx.com",
@@ -73,9 +73,9 @@
73
73
  "husky": "^9.1.7",
74
74
  "lint-staged": "^15.5.1",
75
75
  "lit-analyzer": "^2.0.3",
76
- "next": "^14.2.31",
77
- "nextra": "^4.3.0",
78
- "nextra-theme-docs": "^4.3.0",
76
+ "next": "^13.5.6",
77
+ "nextra": "^2.13.2",
78
+ "nextra-theme-docs": "^2.13.2",
79
79
  "prettier": "^3.5.3",
80
80
  "sonarqube-scanner": "^3.3.0",
81
81
  "terser": "^5.39.1",
@@ -1,151 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./lazy-load-DWZU-puG.cjs"),t=require("./class-map-BGLcy4Zq.cjs"),e=require("./base-floor-selector-DHIQdC2s.cjs");var r,i,s=Object.defineProperty,l=Object.getOwnPropertyDescriptor,a=o=>{throw TypeError(o)},n=(o,t,e,r)=>{for(var i,a=r>1?void 0:r?l(t,e):t,n=o.length-1;n>=0;n--)(i=o[n])&&(a=(r?i(t,e,a):i(a))||a);return r&&a&&s(t,e,a),a},d=(o,t,e)=>t.has(o)||a("Cannot "+e),p=(o,t,e)=>(d(o,t,"read from private field"),e?e.call(o):t.get(o)),c=(o,t,e)=>t.has(o)?a("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(o):t.set(o,e),h=(o,t,e,r)=>(d(o,t,"write to private field"),t.set(o,e),e);exports.CompactFloorSelector=class extends e.BaseFloorSelector{constructor(){super(...arguments),c(this,r,"#251660"),c(this,i,1),this.isOpen=!1,this._handleClickOutside=o=>{this.isOpen&&!this.shadowRoot?.contains(o.target)&&(this.isOpen=!1,this.requestUpdate())}}get borderColor(){return p(this,r)}set borderColor(o){h(this,r,o)}get borderWidth(){return p(this,i)}set borderWidth(o){h(this,i,o)}_toggleDropdown(o){o.stopPropagation(),this.isOpen=!this.isOpen,this.requestUpdate()}_selectFloor(o){this.selectFloor(o),this.isOpen=!1,this.requestUpdate()}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._handleClickOutside)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutside)}render(){if(!this.sdkData)return o.x`<div>No data</div>`;const e=this.getFloors(),r=this.getCurrentFloor(),i=r?this.getFloorDisplayName(r):"Seleccionar piso";return o.x`
2
- <div class="floor-dropdown">
3
- <button
4
- class=${t.e({"floor-button":!0,active:!!r,open:this.isOpen})}
5
- style="border: ${this.borderWidth}px solid ${this.borderColor};"
6
- @click=${this._toggleDropdown}
7
- >
8
- <span>${i}</span>
9
- <div class="dropdown-arrow"></div>
10
- </button>
11
-
12
- <div
13
- class=${t.e({"floor-list":!0,open:this.isOpen})}
14
- >
15
- ${e.map((e=>{const r=this.isFloorActive(e);return o.x`
16
- <div
17
- class=${t.e({"floor-option":!0,active:r})}
18
- @click=${()=>this._selectFloor(e.key)}
19
- >
20
- ${this.getFloorDisplayName(e)}
21
- </div>
22
- `}))}
23
- </div>
24
- </div>
25
- `}},r=new WeakMap,i=new WeakMap,exports.CompactFloorSelector.styles=[o.i$1`
26
- :host {
27
- display: block;
28
- position: relative;
29
- z-index: 1000;
30
- }
31
-
32
- .floor-dropdown {
33
- position: relative;
34
- display: inline-block;
35
- }
36
-
37
- .floor-button {
38
- background: #fff;
39
- border-radius: 8px;
40
- padding: 8px 12px;
41
- font-size: 14px;
42
- font-weight: 500;
43
- color: #251660;
44
- cursor: pointer;
45
- display: flex;
46
- align-items: center;
47
- gap: 8px;
48
- min-width: 120px;
49
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
50
- transition: all 0.2s ease;
51
- }
52
-
53
- .floor-button:hover {
54
- border-color: #007bff;
55
- box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
56
- }
57
-
58
- .floor-button.active {
59
- background: #fff;
60
- color: #251660;
61
- border-color: #251660;
62
- }
63
-
64
- .floor-button.disabled {
65
- opacity: 0.5;
66
- cursor: not-allowed;
67
- }
68
-
69
- .dropdown-arrow {
70
- width: 0;
71
- height: 0;
72
- border-left: 4px solid transparent;
73
- border-right: 4px solid transparent;
74
- border-top: 4px solid currentColor;
75
- transition: transform 0.2s ease;
76
- }
77
-
78
- .floor-button.open .dropdown-arrow {
79
- transform: rotate(180deg);
80
- }
81
-
82
- .floor-list {
83
- position: absolute;
84
- top: 100%;
85
- left: 0;
86
- right: 0;
87
- background: #fff;
88
- border: 1px solid #ddd;
89
- border-radius: 8px;
90
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
91
- max-height: 200px;
92
- overflow-y: auto;
93
- z-index: 1001;
94
- margin-top: 4px;
95
- display: none;
96
- }
97
-
98
- .floor-list.open {
99
- display: block;
100
- }
101
-
102
- .floor-option {
103
- padding: 8px 12px;
104
- cursor: pointer;
105
- border-bottom: 1px solid #f0f0f0;
106
- transition: background-color 0.2s ease;
107
- font-size: 14px;
108
- color: #251660;
109
- }
110
-
111
- .floor-option:last-child {
112
- border-bottom: none;
113
- }
114
-
115
- .floor-option:hover {
116
- background-color: #f8f9fa;
117
- }
118
-
119
- .floor-option.active {
120
- background-color: #f3e7ff;
121
- color: #251660;
122
- }
123
-
124
- .floor-option.disabled {
125
- opacity: 0.5;
126
- cursor: not-allowed;
127
- }
128
-
129
- .floor-option.disabled:hover {
130
- background-color: transparent;
131
- }
132
-
133
- /* Mobile styles */
134
- @media (max-width: 768px) {
135
- .floor-button {
136
- font-size: 12px;
137
- padding: 6px 10px;
138
- min-width: 100px;
139
- }
140
-
141
- .floor-option {
142
- font-size: 12px;
143
- padding: 6px 10px;
144
- }
145
-
146
- .floor-list {
147
- max-height: 150px;
148
- }
149
- }
150
- `],n([o.n({type:String})],exports.CompactFloorSelector.prototype,"borderColor",1),n([o.n({type:Number})],exports.CompactFloorSelector.prototype,"borderWidth",1),exports.CompactFloorSelector=n([o.t("compact-floor-selector")],exports.CompactFloorSelector);
151
- //# sourceMappingURL=compact-floor-selector-BCLDxKto.cjs.map
@@ -1 +0,0 @@
1
- 23-06-2025 12:53:37 -04